Twitter Moments Softaware (TMS) - The #1 Automated Twitter Software Tool! [ AD ]

Only registered customers are allowed to post in this forum. For everyone else it is read-only.

Avatar

Lost password?
Advanced Search

— Forum Scope —




— Match —





— Forum Options —





Minimum search word length is 3 characters - maximum search word length is 84 characters

Media attachment in custom field
Topic Rating: 0 Topic Rating: 0 Topic Rating: 0 Topic Rating: 0 Topic Rating: 0 Topic Rating: 0 (0 votes) 
October 2, 2020
11:01 am
Avatar
B8europe
Member
Members
Forum Posts: 37
Member Since:
February 16, 2016
Offline

Hi,

I’m usually able to add a value from a xml element <url> to a custom field. e.g. $post[‘custom_fields’][‘video_url’] = trim($xml_tags[‘url’][‘val’]);

were <url>** login to see this link **;

Now in this feed a media attachment is defined with the <enclosure> attribute

** login to see this link **

<enclosure url=”https://content.kink.com/imagedb/5699/v/h/320/hires/5699_7.mp4″ length=”0″ type=”video/mp4″/>

CyberSEO is able to add it to the post with the media attachment setting. However, I would like to send the attachment URL to the custom field $post[‘custom_fields’][‘video_url’]

$post[‘custom_fields’][‘video_url’] = $post[‘media_content’] and $post[‘custom_fields’][‘video_url’] = $post[‘enclosure_url’] obviously doesn’t work

October 3, 2020
2:48 pm
Avatar
admin
Admin
Forum Posts: 2738
Member Since:
July 2, 2009
Offline
October 5, 2020
10:29 am
Avatar
B8europe
Member
Members
Forum Posts: 37
Member Since:
February 16, 2016
Offline

Thanks for you fast reply,

I’m not sure I understand these steps? Do you mean in step 1 to view the XML structure in the feed settings preview mode? And I do not understand were to type print_r($post”).

I can see three structures in the feed settings Preview Mode:

1) Post Content

2) Attachment

3) XML structure

In the raw XML feed I see <enclosure url=”https://content.kink.com/imagedb/5699/v/h/320/hires/5699_7.mp4″ length=”0″ type=”video/mp4″/>. So CyberSEO sees the Attachment and can add it to the post in Basic settings.

If I add %enclosure_url% to the Advanced>Post content field I get the URL in the Post.

However, in the Feed Setting Preview Mode XML structure I see <enclosure></enclosure>.

So, How can I tell CyberSEO to add the enclosure URL ”https://content.kink.com/imagedb/5699/v/h/320/hires/5699_7.mp4″ to the custom field $post[‘custom_fields’][‘video_url’]?

October 5, 2020
12:39 pm
Avatar
admin
Admin
Forum Posts: 2738
Member Since:
July 2, 2009
Offline
October 5, 2020
12:44 pm
Avatar
admin
Admin
Forum Posts: 2738
Member Since:
July 2, 2009
Offline
October 6, 2020
2:51 pm
Avatar
B8europe
Member
Members
Forum Posts: 37
Member Since:
February 16, 2016
Offline

OK.

I see I need to clarify something here:

** login to see this link **

I’ve made a screenshot of what I mean. This theme uses a Custom field “video_url” any mp4 video is displayed as a tube video. The Post content is displayed as text under the video. I do not want a video attachment in the post but in the custom field “video_url”. I will keep it in mind if I need to use the blog though.

In the Advanced>PHP code field I use code to send a video URL to this custom field.

e.g. $post[‘custom_fields’][‘video_url’] = trim($xml_tags[‘url’][‘val’]); in this example the XML tag “url” (<url>content url</url>) contained the video mp4 url

Somehow, I cannot find the correct code for CyberSEO in this particular feed:

** login to see this link **

<enclosure url=”https://content.kink.com/imagedb/5699/v/h/320/hires/5699_7.mp4″ length=”0″ type=”video/mp4″/>

October 15, 2020
3:23 pm
Avatar
admin
Admin
Forum Posts: 2738
Member Since:
July 2, 2009
Offline
October 20, 2020
11:57 am
Avatar
B8europe
Member
Members
Forum Posts: 37
Member Since:
February 16, 2016
Offline

admin said
You can do it like this:

<br />

$post['custom_fields']['video_url'] = $post['enclosure_url'];

  

Hi, That works. However I tried that at first and it didn’t work. Now it does. Nevertheless TNX

October 20, 2020
12:52 pm
Avatar
admin
Admin
Forum Posts: 2738
Member Since:
July 2, 2009
Offline
Forum Timezone: Europe/Moscow

Most Users Ever Online: 67

Currently Online:
3 Guest(s)

Currently Browsing this Page:
1 Guest(s)

Top Posters:

ninja321: 62

Freedom: 54

adultdenim: 44

allgoodies: 38

B8europe: 37

schiz: 33

Member Stats:

Guest Posters: 349

Members: 1571

Moderators: 0

Admins: 1

Forum Stats:

Groups: 2

Forums: 5

Topics: 1185

Posts: 5862

Newest Members:

webiner78, chris.christianwestermann, info.gringosmexicanos, lapressegalactique, Nosmas, monicagarciaribas

Administrators: admin: 2738

May 4, 2011

Media attachment in custom field | CyberSEO | Support Forums

Only registered customers are allowed to post in this forum. For everyone else it is read-only.