May 4, 2011

Using the "dc:creator" tag | CyberSEO | Support Forums

Avatar

Please consider registering
guest

sp_LogInOut Log In sp_Registration Register

Register | Lost password?
Advanced Search

— Forum Scope —




— Match —





— Forum Options —





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

sp_Feed Topic RSS sp_TopicIcon
Using the "dc:creator" tag
Topic Rating: 0 Topic Rating: 0 Topic Rating: 0 Topic Rating: 0 Topic Rating: 0 Topic Rating: 0 (0 votes) 
December 21, 2016
3:47 pm
Avatar
schiz
Member
Members
Forum Posts: 31
Member Since:
July 26, 2011
sp_UserOfflineSmall Offline

I was curious as to how to pull the dc:creator tag from an RSS feed.  I would like to use the tag to assign the proper author to new posts.  I didn’t see it in the array, when I pulled in a feed.

Here’s a sample of the feed:

<pubDate>Fri, 16 Dec 2016 23:00:00 +0000</pubDate>
<dc:creator><![CDATA[John Smith]]></dc:creator>
<category><![CDATA[Sports News]]></category>

From there, I plan on assigning the proper author ID to the post.

if ($post[“dc:creator”] = “John Smith”){

$post[“post_author”] = “2”;

}

Is this possible? I didn’t see this referenced in the support forums.

Thanks!

December 21, 2016
3:54 pm
Avatar
admin
Admin
Forum Posts: 2157
Member Since:
July 1, 2009
sp_UserOfflineSmall Offline

You can do it like this.

Custom fields:

dc:creator->author

PHP code :

if ($post["custom_fields"]["author"] == "John Smith") {
    $post["post_author"] = 2;
}
January 20, 2017
2:35 pm
Avatar
schiz
Member
Members
Forum Posts: 31
Member Since:
July 26, 2011
sp_UserOfflineSmall Offline

I just wanted to say thanks.  I forgot to thank you, before.

Forum Timezone: America/Los_Angeles

Most Users Ever Online: 67

Currently Online:
5 Guest(s)

Currently Browsing this Page:
1 Guest(s)

Top Posters:

smyk78: 101

cyber1: 76

tonyparra: 70

Downloadz Portal: 61

andreich: 55

Freedom: 54

Member Stats:

Guest Posters: 32

Members: 786

Moderators: 0

Admins: 1

Forum Stats:

Groups: 2

Forums: 5

Topics: 934

Posts: 4557

Newest Members:

shadabad, gaialorenzi, s.popadiin@gmail.com, tugeye, mularzlll@gmail.com, mehaul

Administrators: admin: 2157