The Arcive of Official vBulletin Modifications Site.It is not a VB3 engine, just a parsed copy! |
|
#1
|
|||
|
|||
Rss Feed Manager - Including Images from Craigslist
Using the Vbulletin RSS Feed Manager, I'm trying to pull images (if available) from Craigslist ads but I'm having a hard time figuring out the right fieldname to make it happen.
Below is the snipet from the feed I'm pulling...any ideas? I greatly appreciate it thank you. Code:
<enc:enclosure resource="http://images.craigslist.org/00f0f_491SwIpTU8b_300x300.jpg" type="image/jpeg"/> |
#2
|
|||
|
|||
Did you try {feed:enc:enclosure}? I'm not sure if that will work or not, I haven't had a chance to try it myself.
Edit: actually you might try {feed:enc:enclosure:location}. |
#3
|
|||
|
|||
Well, I tried it but unfortunately I don't see a way to access the image url without changing the code or creating a plugin. So, I created this plugin using hook location rssposter_parse_rss:
Code:
$handled = array('link', 'description', 'title', 'id', 'guid', 'pubDate', 'date', 'enclosure_link', 'enclosure_href', 'content', 'content:encoded', 'author', 'dc:creator'); if (!in_array($field, $handled)) { $parts = explode(':', $field); if (count($parts) > 1) { $att = array_pop($parts); $f = implode(':', $parts); if (is_string($item[$f][$att])) $handled_value = $item[$f][$att]; } } If you create that plugin, then you should be able to get the image url using {feed:enc:enclosure:resource}. |
#4
|
|||
|
|||
Quote:
|
#5
|
|||
|
|||
What I meant was to create a new plugin and fill in the fields, using rssposter_parse_rss for the hook location and the above for the code. But I exported the one I wrote, in case you'd rather do that. I attached the file here. What you do is go to Plugins & Products > Download /Upload Plugins, and scroll to the bottom to use the Import function.
|
#6
|
|||
|
|||
Quote:
I.E. http://www.njstangers.org/showthread...son%29-x0024-8 |
#7
|
|||
|
|||
Hmm... try <img src="{feed:enc:enclosure:resource}">
|
#8
|
|||
|
|||
That's perfect, I did what you did and used some basic html image code in the rss feed manager box to get images to show. D
--------------- Added [DATE]1423180287[/DATE] at [TIME]1423180287[/TIME] --------------- Is there a way to modify that code to get it to show more than one image or all the images? |
#9
|
|||
|
|||
Only if they're actually in the feed. You can look at the xml of the feed and see if there's more than one image url. I looked at it when I was working on that and I don't think there was, but you should check to make sure.
|
#10
|
|||
|
|||
yeah you are right, it only shows the main image in the rss feed from CL...thank you for all your help
|
|
|
X vBulletin 3.8.12 by vBS Debug Information | |
---|---|
|
|
More Information | |
Template Usage:
Phrase Groups Available:
|
Included Files:
Hooks Called:
|