58sniper
09-23-2004, 11:38 PM
This module will contain a link that, when clicked, will add the RSS feed to the users' MyYahoo page.
The module checks for a couple of things via some conditionals. First, it checks to make sure you have the external feeds enabled (AdminCP>vBulletin Options>External Data Provider>Enable RSS Syndication). Then, it checks to see if the current user has @yahoo in their email address. If both conditions pass, it displays the module.
However, in order for this to work, we need to tweak one file first.
Open $vboptions[bburl]/includes/adminfunctions_template.php
find:
'is_member_of', // function to check if $user is member of $usergroupid
under that, paste
'strpos', // for checking
Then, create a new module, 'adv_portal_add2yahoo', that contains
<if condition="$vboptions[externalrss]">
<if condition="strpos($bbuserinfo['email'], '@yahoo')">
<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>$vba_options[portal_blockbullet] $mods[title]</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">
If you use the MyYahoo page, and would like to have the latest $vboptions[bbtitle] news appear there, you can<br /><center><a href="http://add.my.yahoo.com/rss?url=$vboptions[bburl]/external.php?type=RSS2"><img src="$stylevar[imgdir_misc]/addtomyyahoo2.gif" width="100" height="14" border="0" alt="" /></a></center>
</td>
</tr>
</tbody>
</table>
<br />
</if>
</if>
Toss the attached addtomyyahoo.gif file in your $vboptions[bburl]/images/misc folder.
Add the module to CMPS
Title: Add To My Yahoo
File: none
OR Template: addtomyyahoo
Active: yes
Column: right or left
That's it. The site I've got this on is still under development, so I can't show you a live demo. The screen shot will have to do.
Keep in mind that this is for a collapsible module. If you need a standard module, let me know.
Incidentally, you could put this anywhere, not just in a standalone module. Adapt to your own needs. I'd be interested to see some variations.
The module checks for a couple of things via some conditionals. First, it checks to make sure you have the external feeds enabled (AdminCP>vBulletin Options>External Data Provider>Enable RSS Syndication). Then, it checks to see if the current user has @yahoo in their email address. If both conditions pass, it displays the module.
However, in order for this to work, we need to tweak one file first.
Open $vboptions[bburl]/includes/adminfunctions_template.php
find:
'is_member_of', // function to check if $user is member of $usergroupid
under that, paste
'strpos', // for checking
Then, create a new module, 'adv_portal_add2yahoo', that contains
<if condition="$vboptions[externalrss]">
<if condition="strpos($bbuserinfo['email'], '@yahoo')">
<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>$vba_options[portal_blockbullet] $mods[title]</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">
If you use the MyYahoo page, and would like to have the latest $vboptions[bbtitle] news appear there, you can<br /><center><a href="http://add.my.yahoo.com/rss?url=$vboptions[bburl]/external.php?type=RSS2"><img src="$stylevar[imgdir_misc]/addtomyyahoo2.gif" width="100" height="14" border="0" alt="" /></a></center>
</td>
</tr>
</tbody>
</table>
<br />
</if>
</if>
Toss the attached addtomyyahoo.gif file in your $vboptions[bburl]/images/misc folder.
Add the module to CMPS
Title: Add To My Yahoo
File: none
OR Template: addtomyyahoo
Active: yes
Column: right or left
That's it. The site I've got this on is still under development, so I can't show you a live demo. The screen shot will have to do.
Keep in mind that this is for a collapsible module. If you need a standard module, let me know.
Incidentally, you could put this anywhere, not just in a standalone module. Adapt to your own needs. I'd be interested to see some variations.