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
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