Version: 1.00, by euantor
Developer Last Online: Jul 2011
Category: Profile Enhancements -
Version: 3.8.4
Rating:
Released: 10-10-2009
Last Update: Never
Installs: 5
Template Edits
Re-useable Code Additional Files
No support by the author.
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.
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:
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