PDA


View Full Version : Module: RSS / XML / MyYahoo Feeds


mfarmerhi
05-28-2005, 08:56 PM
This thread was inspired by Sniper's thread (http://www.vbadvanced.com/forum/showthread.php?p=47141#post47141). There were just a few things about his code that I didn't like.

I needed a module that:Made my feeds available to everyone, the more readers the better, for me
Was simple. I wanted to make as few changes as possible. None, in fact (aside from adding a template and module). This code pulls Yahoo's "Add to MyYahoo" logo from their site (rather than requiring you to upload another image), doesn't require any hacking of any php pages, doesn't perform any additional checking (like seeing if they are a Member -- I want EVERYONE to read my content, or checking whether they my RSS syndication is on -- I assume no one'll be adding this module IF YOU DON'T HAVE RSS TURNED ON ;))
Delivers my feeds regardless of whether you have an "@yahoo.com" Email address (and regardless of whether you used that Email to sign up for the forums with
Added feeds not only for MyYahoo, but direct RSS and XML feeds for those using other RSS readers.

First, ensure that you have the external feeds enabled:
AdminCP --> vBulletin Options --> External Data Provider --> Enable RSS Syndication
AdminCP --> vBulletin Options --> External Data Provider --> Enable XML Syndication

Next, upload the attached 2 icons to forums/images/misc folder (the RSS and XML icons, the MyYahoo icon is drawn directly from their site).

Then add a new template. I titled my "adv_portal_rss", changing the blue coding to your forum's URL.

IF YOU WANT A NON-COLLAPSING MODULE:<table align="center" border="0" cellpadding="$stylevar[cellpadding]" cellspacing="$stylevar[cellspacing]" class="tborder" width="100%">
<tr>
<td class="tcat"><span class="smallfont"><strong>$vba_options[portal_blockbullet] RSS Content Feeds</strong></span></td>
</tr>
<tr>
<td class="$getbgrow" width="100%">
<center>
<p>Add YOUR FORUM NAME Content, Automatically Delivered, to Your Browser!</strong><br>
<font size=1>(Click on icons for the RSS or XML Feed, or to add to MyYahoo!)</font>
<p><a href="http://YOUR FORUM URL/external.php?type=rss2" target="_new"><img src="$stylevar[imgdir_misc]/rss2.jpg" border="0"></a>
<p><a href="http://YOUR FORUM URL/external.php?type=xml" target="_new"><img src="$stylevar[imgdir_misc]/xml.jpg" border="0"></a>
<p><a href="http://add.my.yahoo.com/content?url=http%3A//YOUR FORUM URL/external.php%3Ftype%3Drss2%20"><img src="http://us.i1.yimg.com/us.yimg.com/i/us/my/addtomyyahoo4.gif" width="91" height="17" border="0" align=middle alt="Add to My Yahoo!"></a>
</center>
</td>
</tr>
</table>
<br />


IF YOU WANT A COLLAPSING MODULE (adapted from sniper's code, untested):<table align="center" border="0" cellpadding="$stylevar[cellpadding]" cellspacing="$stylevar[cellspacing]" class="tborder" width="100%">
<thead>
<tr>
<td class="tcat smallfont" style="font-weight: bold; border-top: 0px;"><a style="float: $stylevar[right]" href="#" onclick="return toggle_collapse('forumhome_$mods[filename]')"><img id="collapseimg_forumhome_$mods[filename]" src="$stylevar[imgdir_button]/collapse_tcat$vbcollapse[collapseimg_forumhome_randomtopic].gif" width="15" height="15" border="0" alt="Collapse/Expand" /></a><strong>$vba_options[portal_blockbullet] RSS Content Feeds</strong></td>
</tr>
</thead>
<tfoot style="display: none;"><tr><td></td></tr></tfoot>
<tbody id="collapseobj_forumhome_$mods[filename]">
<tr style="$vbcollapse[collapseobj_forumhome_randomtopic]">
<td class="$getbgrow smallfont">
<center>
<p>Add YOUR FORUM NAME Content, Automatically Delivered, to Your Browser!</strong><br>
<font size=1>(Click on icons for the RSS or XML Feed, or to add to MyYahoo!)</font>
<p><a href="http://YOUR FORUM URL/external.php?type=rss2" target="_new"><img src="$stylevar[imgdir_misc]/rss2.jpg" border="0"></a>
<p><a href="http://YOUR FORUM URL/external.php?type=xml" target="_new"><img src="$stylevar[imgdir_misc]/xml.jpg" border="0"></a>
<p><a href="http://add.my.yahoo.com/content?url=http%3A//YOUR FORUM URL/external.php%3Ftype%3Drss2%20"><img src="http://us.i1.yimg.com/us.yimg.com/i/us/my/addtomyyahoo4.gif" width="91" height="17" border="0" align=middle alt="Add to My Yahoo!"></a>
</center>
</td>
</tr>
</tbody>
</table>


Finally, add a module:

Title: RSS Module
File: none
OR Template: rss
Active: yes
Column: right or left

That should be it.

You can check out the non-collapsing module on my home page, bottom left-hand corner: http://TotalLifeSuccess.com

~ Mark

mfarmerhi
05-28-2005, 09:06 PM
To be complete, I wanted to add these links:

Yahoo's FAQ for Publishers: http://my.yahoo.com/s/faq/rss/publishers.html

Yahoo's Syndication Code Generator: http://my.yahoo.com/s/button.html

These are only for addt'l info. If you follow the directions above, you shouldn't need to refer to either.

~ Mark

john_robot
11-05-2005, 04:33 AM
This thread was inspired by Sniper's thread (http://www.vbadvanced.com/forum/showthread.php?p=47141#post47141). There were just a few things about his code that I didn't like.

I needed a module that:Made my feeds available to everyone, the more readers the better, for me
Was simple. I wanted to make as few changes as possible. None, in fact (aside from adding a template and module). This code pulls Yahoo's "Add to MyYahoo" logo from their site (rather than requiring you to upload another image), doesn't require any hacking of any php pages, doesn't perform any additional checking (like seeing if they are a Member -- I want EVERYONE to read my content, or checking whether they my RSS syndication is on -- I assume no one'll be adding this module IF YOU DON'T HAVE RSS TURNED ON ;))
Delivers my feeds regardless of whether you have an "@yahoo.com" Email address (and regardless of whether you used that Email to sign up for the forums with
Added feeds not only for MyYahoo, but direct RSS and XML feeds for those using other RSS readers.

First, ensure that you have the external feeds enabled:
AdminCP --> vBulletin Options --> External Data Provider --> Enable RSS Syndication
AdminCP --> vBulletin Options --> External Data Provider --> Enable XML Syndication

Next, upload the attached 2 icons to forums/images/misc folder (the RSS and XML icons, the MyYahoo icon is drawn directly from their site).

Then add a new template. I titled my "adv_portal_rss", changing the blue coding to your forum's URL.

IF YOU WANT A NON-COLLAPSING MODULE:<table align="center" border="0" cellpadding="$stylevar[cellpadding]" cellspacing="$stylevar[cellspacing]" class="tborder" width="100%">
<tr>
<td class="tcat"><span class="smallfont"><strong>$vba_options[portal_blockbullet] RSS Content Feeds</strong></span></td>
</tr>
<tr>
<td class="$getbgrow" width="100%">
<center>
<p>Add YOUR FORUM NAME Content, Automatically Delivered, to Your Browser!</strong><br>
<font size=1>(Click on icons for the RSS or XML Feed, or to add to MyYahoo!)</font>
<p><a href="http://YOUR FORUM URL/external.php?type=rss2" target="_new"><img src="$stylevar[imgdir_misc]/rss2.jpg" border="0"></a>
<p><a href="http://YOUR FORUM URL/external.php?type=xml" target="_new"><img src="$stylevar[imgdir_misc]/xml.jpg" border="0"></a>
<p><a href="http://add.my.yahoo.com/content?url=http%3A//YOUR FORUM URL/external.php%3Ftype%3Drss2%20"><img src="http://us.i1.yimg.com/us.yimg.com/i/us/my/addtomyyahoo4.gif" width="91" height="17" border="0" align=middle alt="Add to My Yahoo!"></a>
</center>
</td>
</tr>
</table>
<br />


IF YOU WANT A COLLAPSING MODULE (adapted from sniper's code, untested):<table align="center" border="0" cellpadding="$stylevar[cellpadding]" cellspacing="$stylevar[cellspacing]" class="tborder" width="100%">
<thead>
<tr>
<td class="tcat smallfont" style="font-weight: bold; border-top: 0px;"><a style="float: $stylevar[right]" href="#" onclick="return toggle_collapse('forumhome_$mods[filename]')"><img id="collapseimg_forumhome_$mods[filename]" src="$stylevar[imgdir_button]/collapse_tcat$vbcollapse[collapseimg_forumhome_randomtopic].gif" width="15" height="15" border="0" alt="Collapse/Expand" /></a><strong>$vba_options[portal_blockbullet] RSS Content Feeds</strong></td>
</tr>
</thead>
<tfoot style="display: none;"><tr><td></td></tr></tfoot>
<tbody id="collapseobj_forumhome_$mods[filename]">
<tr style="$vbcollapse[collapseobj_forumhome_randomtopic]">
<td class="$getbgrow smallfont">
<center>
<p>Add YOUR FORUM NAME Content, Automatically Delivered, to Your Browser!</strong><br>
<font size=1>(Click on icons for the RSS or XML Feed, or to add to MyYahoo!)</font>
<p><a href="http://YOUR FORUM URL/external.php?type=rss2" target="_new"><img src="$stylevar[imgdir_misc]/rss2.jpg" border="0"></a>
<p><a href="http://YOUR FORUM URL/external.php?type=xml" target="_new"><img src="$stylevar[imgdir_misc]/xml.jpg" border="0"></a>
<p><a href="http://add.my.yahoo.com/content?url=http%3A//YOUR FORUM URL/external.php%3Ftype%3Drss2%20"><img src="http://us.i1.yimg.com/us.yimg.com/i/us/my/addtomyyahoo4.gif" width="91" height="17" border="0" align=middle alt="Add to My Yahoo!"></a>
</center>
</td>
</tr>
</tbody>
</table>


Finally, add a module:

Title: RSS Module
File: none
OR Template: rss
Active: yes
Column: right or left

That should be it.

You can check out the non-collapsing module on my home page, bottom left-hand corner: http://TotalLifeSuccess.com

~ Mark


Hi Thank you for the details

When I add your feed to my yahoo Your home page link display as
http://us.lrd.yahoo.com/_ylt=Ahkof4yoAOvWdQxMfktMOucE1vAI/SIG=116ajoe0j/**http%3a//totallifesuccess.com/forum

http%3a//totallifesuccess.com/forum - is there any way to remove "%3a" in between http --- totallifesuccess.com/forum

also is there any posibluity of removeing http://us.lrd.yahoo.com/_ylt=Ahkof4yoAOvWdQxMfktMOucE1vAI/SIG=116ajoe0j/** and keep a direct link http://totallifesuccess.com/forum

ab7fh
01-14-2006, 12:47 AM
I tried this hack in CPMS 2.x. It works, but I can't put any other modules "below" it in the right column. When I try, the module that I put below it, in this case the "stock" search module appears at the bottom and spreads out side to side.

What needs to be changed to make everything work together?

TIA

ab7fh
01-14-2006, 12:49 AM
BTW, I'm running Vb 3.0.12

ab7fh
01-16-2006, 10:52 PM
Btt

ab7fh
01-23-2006, 11:32 PM
Finally got back to this and got it to work. In CPMS 2 "Use Module Shell Template" needs to be set to "NO".