Go Back   vb.org Archive > vBulletin Modifications > Archive > vB.org Archives > vBulletin 3.5 > vBulletin 3.5 Template Modifications
FAQ Community Calendar Today's Posts Search

Reply
 
Thread Tools
Show RSS Feed Icon in each forum Details »»
Show RSS Feed Icon in each forum
Version: 1.00, by Wayne Luke (Senior Member) Wayne Luke is offline
Developer Last Online: Oct 2023 Show Printable Version Email this Page

Version: 3.5.3 Rating:
Released: 01-09-2006 Last Update: Never Installs: 187
Uses Plugins Template Edits
Additional Files  
No support by the author.

So I wanted to add an image link to each forum for its unique RSS feed. This would allow people to subscribe to their favorite forums with their favorite News Reader instead of email. It would always be up to date and accurate.

There are three steps to doing this.

First, I decided I needed a small plugin to determine if RSS was turned on within the forumdisplay template. Go to your plugin manager and add the following code to the "forumdisplay_start" plugin.

PHP Code:
if ($vbulletin->options['externalrss'])
{
   
$show['rss'] = true;

Next we will be editing the forumdisplay template itself.

Find:
HTML Code:
<table class="tborder" cellpadding="$stylevar[cellpadding]" cellspacing="$stylevar[cellspacing]" border="0" width="100%" align="center" style="border-bottom-width:0px">
<tr>
<td class="tcat" width="100%">$vbphrase[threads_in_forum]<span class="normal"> : $foruminfo[title]</span></td>
<td class="vbmenu_control" id="forumtools" nowrap="nowrap"><a href="$show[nojs_link]#goto_forumtools" rel="nofollow">$vbphrase[forum_tools]</a> <script type="text/javascript"> vbmenu_register("forumtools"); </script></td>
    <if condition="$show['forumsearch']">
<td class="vbmenu_control" id="forumsearch" nowrap="nowrap"><a href="$show[nojs_link]#goto_forumsearch" rel="nofollow">$vbphrase[search_this_forum]</a> <script type="text/javascript"> vbmenu_register("forumsearch"); </script></td>
    </if>
</tr>
</table>
And replace with:
HTML Code:
<table class="tborder" cellpadding="$stylevar[cellpadding]" cellspacing="$stylevar[cellspacing]" border="0" width="100%" align="center" style="border-bottom-width:0px">
<tr>
<td class="tcat" width="100%">$vbphrase[threads_in_forum]<span class="normal"> : $foruminfo[title]</span></td>
<td class="vbmenu_control" id="forumtools" nowrap="nowrap"><a href="$show[nojs_link]#goto_forumtools" rel="nofollow">$vbphrase[forum_tools]</a> <script type="text/javascript"> vbmenu_register("forumtools"); </script></td>
    <if condition="$show['forumsearch']">
<td class="vbmenu_control" id="forumsearch" nowrap="nowrap"><a href="$show[nojs_link]#goto_forumsearch" rel="nofollow">$vbphrase[search_this_forum]</a> <script type="text/javascript"> vbmenu_register("forumsearch"); </script></td>
    </if>
    <if condition="$show['rss']">
<td class="tcat"><a href="external.php?type=rss2&forumids=$foruminfo[forumid]"><img class="inlineimg" src="$stylevar[imgdir_misc]/feed_icon.png" height="14" width="14" alt="Feed Icon" title="Subscribe to $foruminfo[title]'s RSS Feed"></a></td>
    </if>
    </tr>
</table>
Finally the third step is to upload the attached image to represent your feed. If your site isn't set up to allow IE to view transparent backgrounds in PNG images, you will probably want to convert the image to a GIF format matted to your background.

Distibuted under the "Wayne License". You may modify to suit your needs, No Attribution Necessary, Redistribution allowed on sites which can verify legitimate vBulletin License Holders only.

Show Your Support

  • This modification may not be copied, reproduced or published elsewhere without author's permission.

Comments
  #22  
Old 01-12-2006, 01:29 PM
synwave synwave is offline
 
Join Date: Nov 2003
Posts: 15
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

Quote:
Go to your plugin manager and add the following code to the "forumdisplay_start" plugin
I dont have a plugin called "forumdisplay_start".
Reply With Quote
  #23  
Old 01-12-2006, 01:43 PM
Wayne Luke's Avatar
Wayne Luke Wayne Luke is offline
Senior Member
 
Join Date: Jan 2002
Location: Southern California
Posts: 1,694
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

Quote:
Originally Posted by croportal
no i dont have, just you rss feed
Hmm.. The template looks right. You have plugins enabled in the options?

I would have to look at your AdminCP to get it working at this point though.
Reply With Quote
  #24  
Old 01-12-2006, 01:45 PM
Wayne Luke's Avatar
Wayne Luke Wayne Luke is offline
Senior Member
 
Join Date: Jan 2002
Location: Southern California
Posts: 1,694
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

Quote:
Originally Posted by KW802
Wayne,

Would the condition "<if condition="$vboptions['externalrss']">{code}</if>" work instead of using the plugin?
I believe it would. I wanted variable consistency though. Makes it easier if my wife has to change something in the templates. She knows a little about HTML but nothing about PHP.
Reply With Quote
  #25  
Old 01-12-2006, 01:46 PM
Wayne Luke's Avatar
Wayne Luke Wayne Luke is offline
Senior Member
 
Join Date: Jan 2002
Location: Southern California
Posts: 1,694
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

Quote:
Originally Posted by michaelbenson
I personally just removed the conditional IF statement and bypassed the plugin, it didnt really seem neccessary to check whether or not RSS syndication was enabled since i had already done within the vBulletin Options area.
The conditional is there so if you have to turn off the feeds for some reason, the icon and link disappears as well
Reply With Quote
  #26  
Old 01-14-2006, 07:22 AM
shiva shiva is offline
 
Join Date: Apr 2002
Posts: 158
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

I dont have a plugin called "forumdisplay_start" either.

?????
Reply With Quote
  #27  
Old 01-14-2006, 11:16 AM
Darat Darat is offline
 
Join Date: Aug 2004
Posts: 329
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

You need to create a plugin called "forumdisplay_start", this is what I created and it seems to work:

Admincp>Plugin system> Add New Plugin

Product: vBulletin
Hook location: forumdisplay_start
Title: "Check for RSS on/off for RSS feed icon on each forum"
Plugin Php Code:
PHP Code:
if ($vbulletin->options['externalrss'])
{
   
$show['rss'] = true;

Active: Yes

And then click on save.
Reply With Quote
  #28  
Old 01-14-2006, 08:06 PM
shiva shiva is offline
 
Join Date: Apr 2002
Posts: 158
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

Thanks. Must have missed that in the instructions.
Reply With Quote
  #29  
Old 01-15-2006, 09:45 AM
synwave synwave is offline
 
Join Date: Nov 2003
Posts: 15
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

Works nicely - Thanks everyone!
Reply With Quote
  #30  
Old 01-17-2006, 12:45 PM
Marv Marv is offline
 
Join Date: Jun 2002
Location: Germany
Posts: 372
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

Wayne,

I?ve tried to put this in the forums tools menu but for some reason it creates only the basic information of my forums - but no threadinfo?s.
Code:
<rss version="2.0">
- <channel>
   <title>MySiteTitle - MyForumsTitle</title>
   <link>http://www.mysite.com/forums</link>
	- <description>MySiteDescription !</description>
	   <language>en</language>
	   <pubDate>Tue, 17 Jan 2006 14:47:11 GMT</pubDate>
	   <generator>vBulletin</generator>
     <ttl>60</ttl>
 </channel>
</rss>
I?m using this in the forums menu (extended to rss 0,91, 2.0 and rdf-feeds)
PHP Code:
<!-- forum tools menu -->
<
div class="vbmenu_popup" id="forumtools_menu" style="display:none">
<
form action="moderator.php" method="post" name="forumadminform">
    <
table cellpadding="4" cellspacing="1" border="0">
    <
tr><td class="thead">$vbphrase[forum_tools]<a name="goto_forumtools"></a></td></tr>
    <if 
condition="$show['newthreadlink']"><tr><td class="vbmenu_option"><a href="newthread.php?$session[sessionurl]do=newthread&amp;f=$foruminfo[forumid]rel="nofollow">$vbphrase[post_a_new_thread]</a></td></tr></if>
    <
tr><td class="vbmenu_option"><a href="forumdisplay.php?$session[sessionurl]do=markread&amp;f=$foruminfo[forumid]rel="nofollow">$vbphrase[mark_this_forum_read]</a></td></tr>
    <
tr><td class="vbmenu_option"><a href="subscription.php?$session[sessionurl]do=addsubscription&amp;f=$foruminfo[forumid]rel="nofollow">$vbphrase[subscribe_to_this_forum]</a></td></tr>
    <if 
condition="$show['rss']">
    <
tr><td class="vbmenu_option"><a href="external.php?type=rss2&forumids=$foruminfo[forumid]rel="nofollow">$vbphrase[subscribe_to_this_forum_rss]</a
    <
a href="external.php?type=rss&forumids=$foruminfo[forumid]rel="follow" target="_blank"><img class="inlineimg" img border="0" src="stylevar[imgdir_misc]/rss.png" lowsrc="RSS Feed 0.91" alt="RSS Feed 0.91"></a
    <
a href="external.php?type=rss2&forumids=$foruminfo[forumid]rel="follow" target="_blank"><img class="inlineimg" img border="0" src="stylevar[imgdir_misc]/rss.gif" lowsrc="RSS Feed 2.0" alt="RSS Feed 2.0"></a>
    <
a href="external.php?type=rdf&forumids=$foruminfo[forumid]rel="follow" target="_blank"><img class="inlineimg" img border="0" src="stylevar[imgdir_misc]/rdf.gif" lowsrc="RDF Feed" alt="RDF Feed"></a>
</
td></tr>
    </if>
    <
tr><td class="vbmenu_option"><a href="forumdisplay.php?$session[sessionurl]f=$foruminfo[parentid]rel="nofollow">$vbphrase[view_parent_forum]</a></td></tr
Do I have to place the initial plugin elsewhere as in forumsdisplay_start if I?ld like to place this in the forum menu?

Any idea ?
Reply With Quote
  #31  
Old 01-21-2006, 06:26 PM
Azhrialilu's Avatar
Azhrialilu Azhrialilu is offline
 
Join Date: Aug 2003
Location: Stretton, Derbyshire
Posts: 445
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

Nice addition, Wayne.... I especially like the "Wayne Licence" comment
Reply With Quote
Reply


Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off

Forum Jump


All times are GMT. The time now is 06:09 PM.


Powered by vBulletin® Version 3.8.12 by vBS
Copyright ©2000 - 2024, vBulletin Solutions Inc.
X vBulletin 3.8.12 by vBS Debug Information
  • Page Generation 0.06112 seconds
  • Memory Usage 2,355KB
  • Queries Executed 25 (?)
More Information
Template Usage:
  • (1)SHOWTHREAD
  • (1)ad_footer_end
  • (1)ad_footer_start
  • (1)ad_header_end
  • (1)ad_header_logo
  • (1)ad_navbar_below
  • (1)ad_showthread_beforeqr
  • (1)bbcode_code
  • (2)bbcode_html
  • (3)bbcode_php
  • (4)bbcode_quote
  • (1)footer
  • (1)forumjump
  • (1)forumrules
  • (1)gobutton
  • (1)header
  • (1)headinclude
  • (1)modsystem_post
  • (1)navbar
  • (6)navbar_link
  • (120)option
  • (1)pagenav
  • (1)pagenav_curpage
  • (4)pagenav_pagelink
  • (1)pagenav_pagelinkrel
  • (11)post_thanks_box
  • (11)post_thanks_button
  • (1)post_thanks_javascript
  • (1)post_thanks_navbar_search
  • (11)post_thanks_postbit_info
  • (10)postbit
  • (11)postbit_onlinestatus
  • (11)postbit_wrapper
  • (1)spacer_close
  • (1)spacer_open
  • (1)tagbit_wrapper 

Phrase Groups Available:
  • global
  • inlinemod
  • postbit
  • posting
  • reputationlevel
  • showthread
Included Files:
  • ./showthread.php
  • ./global.php
  • ./includes/init.php
  • ./includes/class_core.php
  • ./includes/config.php
  • ./includes/functions.php
  • ./includes/class_hook.php
  • ./includes/modsystem_functions.php
  • ./includes/functions_bigthree.php
  • ./includes/class_postbit.php
  • ./includes/class_bbcode.php
  • ./includes/functions_reputation.php
  • ./includes/functions_post_thanks.php 

Hooks Called:
  • init_startup
  • init_startup_session_setup_start
  • init_startup_session_setup_complete
  • cache_permissions
  • fetch_threadinfo_query
  • fetch_threadinfo
  • fetch_foruminfo
  • style_fetch
  • cache_templates
  • global_start
  • parse_templates
  • global_setup_complete
  • showthread_start
  • showthread_getinfo
  • forumjump
  • showthread_post_start
  • showthread_query_postids
  • showthread_query
  • bbcode_fetch_tags
  • bbcode_create
  • showthread_postbit_create
  • postbit_factory
  • postbit_display_start
  • post_thanks_function_post_thanks_off_start
  • post_thanks_function_post_thanks_off_end
  • post_thanks_function_fetch_thanks_start
  • post_thanks_function_fetch_thanks_end
  • post_thanks_function_thanked_already_start
  • post_thanks_function_thanked_already_end
  • fetch_musername
  • postbit_imicons
  • bbcode_parse_start
  • bbcode_parse_complete_precache
  • bbcode_parse_complete
  • postbit_display_complete
  • post_thanks_function_can_thank_this_post_start
  • pagenav_page
  • pagenav_complete
  • tag_fetchbit_complete
  • forumrules
  • navbits
  • navbits_complete
  • showthread_complete