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
  #92  
Old 10-20-2006, 02:28 PM
perfphysio's Avatar
perfphysio perfphysio is offline
 
Join Date: Sep 2006
Location: London, UK
Posts: 212
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

Quote:
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.
I do not see this in my plugin manager (I am using 3.6.2) I see that some of my plugins are using this but I am now unclear about where to find the hook itself and therefore where to place the code. The only reference in my plugins are for products that are using the forumdisplay_start hook but not the actual plugin itself.

Can someone advise as I like this hack idea
Reply With Quote
  #93  
Old 10-21-2006, 02:40 PM
AMG021 AMG021 is offline
 
Join Date: Sep 2006
Location: Not From This Planet
Posts: 192
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

Quote:
Originally Posted by perfphysio
I do not see this in my plugin manager (I am using 3.6.2) I see that some of my plugins are using this but I am now unclear about where to find the hook itself and therefore where to place the code. The only reference in my plugins are for products that are using the forumdisplay_start hook but not the actual plugin itself.

Can someone advise as I like this hack idea
Dude just go to acp -> add new plugin > find in the hook forumdisplay_start -> tittle RSS -> PLugin active and then do the template
Reply With Quote
  #94  
Old 10-21-2006, 06:37 PM
perfphysio's Avatar
perfphysio perfphysio is offline
 
Join Date: Sep 2006
Location: London, UK
Posts: 212
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

ok I am using 3.6.2 and I think the layout is a bit different. e.g. the code shown below is now this on my forum:

Quote:
<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"><if condition="$show['quicksearch']"><a href="$show[nojs_link]#goto_forumsearch" rel="nofollow">$vbphrase[search_this_forum]</a> <script type="text/javascript"> vbmenu_register("forumsearch"); </script><else /><a href="search.php?$session[sessionurl]f=$foruminfo[forumid]" rel="nofollow">$vbphrase[search_this_forum]</a></if></td>
</if>
</tr>
</table>

Should your code be altered to take into consideration the changes between the one in your post here and also the one I have posted above?

Also the only way to add something to the forumdisplay_start in the plugin is to edit a product that uses this and add it to that plugin. I assume this is correct as there doesn't appear to be any plugin for this actual hack itself.

Any more comments or direction appreciated.
Reply With Quote
  #95  
Old 10-21-2006, 11:56 PM
Dexter_kcd Dexter_kcd is offline
 
Join Date: May 2005
Posts: 48
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

Great little hack, thanks. I have a question though...

RSS will only send feeds of forums that are publicly viewable. I have some forums which are visible only to registered guests, and a couple of private forums for certain usergroups, plus staff forums, etc. I don't want the icon showing up in those forums, but this hack will add the RSS icon to every forum. How would I go about adding a conditional to not display this icon if the can't be viewed through RSS? I'm guessing an if forumid <> x,y,z or something like that, but I'm not clear exactly where I should try this or what I should try.

Any advice? Thanks.

Dexter...

/Edit: never mind, found a good hack for this here at Vb.org
Reply With Quote
  #96  
Old 10-29-2006, 12:07 PM
hotwheels hotwheels is offline
 
Join Date: May 2005
Location: Cheyenne, wy
Posts: 1,380
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

I just installed this mod and i found an error on my site that i didn't know existed......I am not seeing any error's on my website, but when i use this mod, and open up the .xml, i see this error:
Quote:
<image>
<url>http://insanemustangs.com/forums//forums/images/misc/rss.jpg</url>
<title>Insane Forums - Insane Introductions</title>
<link>http://insanemustangs.com/forums</link>
</image>
........as you can see, forums comes up 2 time's in the image link. How can i fix that? I am not even sure where to begin looking to repair that........

Thanks..........I did ask at vbulletin.com but no answer of any sort.......hotwheels
Reply With Quote
  #97  
Old 10-30-2006, 06:44 AM
EvilHawk EvilHawk is offline
 
Join Date: Feb 2005
Location: Greece
Posts: 107
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

Quote:
Originally Posted by hotwheels
I just installed this mod and i found an error on my site that i didn't know existed......I am not seeing any error's on my website, but when i use this mod, and open up the .xml, i see this error: ........as you can see, forums comes up 2 time's in the image link. How can i fix that? I am not even sure where to begin looking to repair that........

Thanks..........I did ask at vbulletin.com but no answer of any sort.......hotwheels
This hack has nothing to do with this problem...

Xmmmmm let it me guess, you have vBadvanced installed and your $stylevar['imgdir_misc'] is /forums/images/misc

it's a "bug" at external.php

open external.php and find :

PHP Code:
$rssicon preg_match('#^http(s)?://#'$stylevar['imgdir_misc']) ?  $stylevar['imgdir_misc'] . '/rss.jpg' $vbulletin->options['bburl'] . "/$stylevar[imgdir_misc]/rss.jpg"
replace it with:

PHP Code:
$rssicon preg_match('#^http(s)?://#'$stylevar['imgdir_misc']) ?   . '/rss.jpg' $vbulletin->options['homeurl'] . "$stylevar[imgdir_misc]/rss.jpg"
Reply With Quote
  #98  
Old 11-01-2006, 03:38 PM
hnjco hnjco is offline
 
Join Date: Jul 2006
Posts: 97
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

Quote:
Originally Posted by EvilHawk
Well unlucky for you, as you didn't look further down at the tempalte code ...
Thanks i'm lucky now and it worked.
Reply With Quote
  #99  
Old 11-09-2006, 12:48 AM
hotwheels hotwheels is offline
 
Join Date: May 2005
Location: Cheyenne, wy
Posts: 1,380
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

No dice evilhawk, although i think that is the file that is causing the error.......

I am running phpportals instead of vbadvanced.......I tried the suggested changes, but it only brought me error's......thanks for the quick reply and the help.....

I still get the
Quote:
<image>
<url>http://insanemustangs.com/forums//forums/images/misc/rss.jpg</url>
<title>Insane Forums - Insane Introductions</title>
<link>http://insanemustangs.com/forums</link>
</image>
error and also found that i am getting it anywhere it tries to attach an image:
Quote:
<td><img class="inlineimg" src="http://insanemustangs.com/forums//forums/images/attach/jpg.gif"
Reply With Quote
  #100  
Old 11-11-2006, 03:16 PM
hotwheels hotwheels is offline
 
Join Date: May 2005
Location: Cheyenne, wy
Posts: 1,380
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

bump
Reply With Quote
  #101  
Old 11-12-2006, 09:02 AM
EvilHawk EvilHawk is offline
 
Join Date: Feb 2005
Location: Greece
Posts: 107
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

I can't see this error at your forums rss feed code ...
Anyway vB 3.6.3 solves this problem .
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 02:52 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.11309 seconds
  • Memory Usage 2,343KB
  • 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
  • (2)bbcode_html
  • (3)bbcode_php
  • (8)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
  • (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