Back to vBulletin 3.8 Template Modifications

RSS Feeds in profiles
Mod Version: 1.00, by euantor

vB Version: 3.8.4 Rating: (1 vote - 4.00 average) Installs: 5
Released: 11 Oct 2009 Last Update: Never Downloads: 0
Not Supported Template Edits Additional Files Re-usable Code External Content  

I created this after a few members asking for a system whereby they can display an RSS feed in the profiles. I searched around a bit for a mod, but found none so put together some template modifications of my own.

I must say, this wouldn't be possible without dynamicdrive.com who provided all the code I needed. Check out the page for the original system here: http://www.dynamicdrive.com/dynamicindex18/gajaxrssdisplayer.htm

Instructions

Okay, so the first thing that you need to do is access the template manager. Select the theme you wish to add the modification to and select "Edit Templates". Now, access the headerinclude template and add the following right at the bottom:

Code:
<!--RSS Feed In profile Stuff-->
<script type="text/javascript" src="http://www.google.com/jsapi?key=YOUR API HERE">
</script>
<script type="text/javascript" src="gfeedfetcher.js">
/***********************************************
* gAjax RSS Feeds Displayer- (c) Dynamic Drive (www.dynamicdrive.com)
* This notice MUST stay intact for legal use
* Visit http://www.dynamicdrive.com/ for full source code
***********************************************/
</script>
<style type="text/css">
.labelfield{ 
color: #ffffff;
font-weight: bold;
font-size: 90%;
}
.datefield{ 
color: #ffffff;
font-size: 90%;
}
#example2 div{ 
margin-bottom: 5px;
}
#example2 div a{ 
text-decoration: none;
}
code{ /*CSS for insructions*/
color: red;
}
</style>
Then, you need to grab a google API Code. Grab yours from here:

https://code.google.com/apis/ajaxfeeds/signup.html

Paste the code into the part that says "YOUR API HERE" in the stuff you just added to the headerinclude. Hit the "Save and reaload" button.

Ok, so you now need to add this file to the root directory of your forum. Just upload it via your favourite FTP client:

http://www.dynamicdrive.com/dynamicindex18/gfeedfetcher.js

The next step is to add 2 profile fields. Both should be single line textboxes. The rest is up to you ;D Just name them something like "RSS Title" and "RSS URL".

Almost done now You just need to edit the MEMBERINFO template Find:

Code:
$template_hook[profile_right_mini]
Add after:

Code:
        <!-- RSS Feed -->
<if condition="$userinfo[fieldX]">
<div id="$id" class="tborder content_block">
    <h4 class="thead block_title">
        <a href="#top" class="collapse_gadget" onclick="return toggle_collapse('$id')"><img id="collapseimg_$id" src="$stylevar[imgdir_button]/collapse_generic{$vbcollapse['collapseimg_'.$id]}.gif" alt="" border="0" /></a>
        <a name="$id"></a>
        <span class="block_name">RSS Feed</span>
    </h4>
    <div class="block_content" id="collapseobj_$id" style="{$vbcollapse['collapseobj_'.$id]}"><div class="alt1 smallfont block_row block_footer">
<p align="center">
<script type="text/javascript">
var cssfeed=new gfeedfetcher("example1", "example1class", "")
cssfeed.addFeed("$userinfo[fieldX1]", "$userinfo[fieldX]") //Specify "label" plus URL to RSS feed
cssfeed.displayoptions("label") //show the specified additional fields
cssfeed.setentrycontainer("div") //Display each entry as a list (li element)
cssfeed.filterfeed(5, "date") //Show 5 entries, sort by date
cssfeed.init() //Always call this last
</script>
<br />
</p>
</div></div>
</div>
</if>
        <!-- / RSS Feed -->
You need to change all the
Code:
$user[fieldX]
terms to
Code:
$user[WHATEVER THE FIELD ID OF YOUR RSS URL FIELD IS]
and all the
Code:
$user[fieldX1]
terms to
Code:
$user[WHATEVER THE FIELD ID OF YOUR RSS TITLE FIELD IS]
There. we should be done. Go to a profile and check if it works. If not, you've obviously gotten confused somewhere along the lines of my unclear explanation ;P

Demo

http://www.360elites.net/member.php?u=1

Screenshots

See attached :]

Download

No files for download.

Screenshots

Click image for larger version
Name:	RSS editing.jpg
Views:	266
Size:	98.2 KB
ID:	105243  

Similar Mods

Forum Display Enhancements Add Recent Blog/Site Feed under Postbit. Displays Recent Blog feeds or Site Feeds. vBulletin 3.6 Template Modifications

vblts.ru supports vBulletin®, 2022-2024