PDA

View Full Version : vBa CMPS "My Favorite Links" module


SVTOA
12-17-2004, 04:46 PM
I originally wrote this mod as an add-on for Vbadvanced Homepage. I have re-written the instructions for vBa CMPS. Since it's really only a template mod, forgive me if it's in the wrong place.

This add-on will create a block of custom links on the vBa CMPS homepage. This allows your members to setup their own "Favorites" within the portal page. It is an easy mod to install, you simply add 2 new profile fields for each link you wish to display, create 1 new template and create the module.

The version show here is written for 5 links, you can add as many or as few as you wish.

The screenshots attached show what your users will see. If an unregistered member views your portal, the block will prompt them to register. If they are already registered, the block will provide a link to the users cpanel to add the links.


INSTRUCTIONS:

Step one: Create 2 new user profile fields for each link choice you wish to add.
Name the first one "Favorite Link URL" and the Second "Favorite Link Name"
Make them user editable but hidden from the profile and do not include in searches.
In your setup of these new fields, be sure to include instructions so your members understand how to create new links. (See screenshots)
The code below is based on 5 custom user links, so this required 10 new profile fields.


Step two:
Create a new template called adv_portal_links and use this code for the template content:

NOTE!!! You must properly edit the [fieldXX] to reflect the field id numbers on your forum! I have left mine in place for examples.



<!-- Favorite Links Block BY SVTOA -->

<table align="center" border="0" cellpadding="$stylevar[cellpadding]" cellspacing="$stylevar[cellspacing]" class="tborder" width="100%">
<tr>
<td class="tcat"><span class="smallfont"><b>$vboptions[blockbullet] My Favorite Links </b></span></td>
</tr>
<tr>
<td class="$getbgrow"><span class="smallfont">

<if condition="!$bbuserinfo['userid']">
<span class="smallfont">Not a member yet?<br /><a href="$vboptions[bburl]/register.php">Register now</a> to show favorite Links Here!</span>
<else />
<if condition="$bbuserinfo[field67] !=''">
<a href="http://$bbuserinfo[field67]" target="_blank">$bbuserinfo[field68]</a>
<else />
<a href="$vboptions[bburl]/profile.php?do=editprofile">Add your favorite links</A> to display them here.
</if>
</if>
</span>
</td>
</tr>
<!-- second table links -->
<tr>
<td class="$getbgrow"><span class="smallfont">
<if condition="$bbuserinfo[field69] !=''">
<a href="http://$bbuserinfo[field69]" target="_blank">$bbuserinfo[field70]</a>
</if>
</span>
</td>
</tr>
<!-- third table links -->
<tr>
<td class="$getbgrow"><span class="smallfont">
<if condition="$bbuserinfo[field71] !=''">
<a href="http://$bbuserinfo[field71]" target="_blank">$bbuserinfo[field72]</a>
</if>
</span>
</td>
</tr>
<!-- fourth table links -->
<tr>
<td class="$getbgrow"><span class="smallfont">
<if condition="$bbuserinfo[field73] !=''">
<a href="http://$bbuserinfo[field73]" target="_blank">$bbuserinfo[field74]</a>
</if>
</span>
</td>
</tr>
<!-- fifth table links -->
<tr>
<td class="$getbgrow"><span class="smallfont">
<if condition="$bbuserinfo[field75] !=''">
<a href="http://$bbuserinfo[field75]" target="_blank">$bbuserinfo[field76]</a>
</if>
</span>
</td>
</tr>

</table>
<br/>


Step Three: Create a new module called "Favorite Links" (or whatever you wish to call it) and of course use the template 'adv_portal_links' (remember to just put "links" in the "template to include" box, not 'adv_portal_links' (see added screenshot)
Postion where you want it and save.

Done!

thejaxx
12-17-2004, 06:09 PM
Very nice. :)

*Installing*

Our Sponsors
 

KW802
12-17-2004, 06:12 PM
Very nice! I could see that being used as a subliminal marketing tool as well where the person might have 5 slots available and by default slots 1 & 2 would have a specifed link in there that they could either leave as is or change. :cool:

nyifan
12-17-2004, 11:33 PM
Thank you, this works great!

Our Sponsors
 

pgp2003
12-18-2004, 10:38 PM
can't get it to show in portal :(

tomshawk
12-18-2004, 11:35 PM
can't get it to show in portal :(

I'd be willing to bet it is step 3

Step Three: Create a new module called "Favorite Links" (or whatever you wish to call it) and of course use the template 'adv_portal_links'

Instead of "adv_portal_links"

Tell it to call "links"

Just the one word, "links"

That should do the trick ;)

pgp2003
12-19-2004, 12:29 AM
no sir.. didnt work :(

pgp2003
12-19-2004, 12:31 AM
disregard that.. it's working now.. all of a sudden.. as i renamed everything back adv_portal_links.. oh well... nice hack!!!

SVTOA
12-19-2004, 01:05 PM
I'd be willing to bet it is step 3



Instead of "adv_portal_links"

Tell it to call "links"

Just the one word, "links"

That should do the trick ;)


I guess sometimes we figure that people know how to create a basic module, so I didn't say to use template "links". But I realize from helping people that sometimes very basic things are easily overlooked. Thanks for the assist though. :D

pgp2003
12-19-2004, 06:45 PM
it was just kinda late.. after installing 8 9 hacks, i couldnt see or think straight anymore :D... thanks for the hack thu

SVTOA
12-19-2004, 08:33 PM
it was just kinda late.. after installing 8 9 hacks, i couldnt see or think straight anymore :D... thanks for the hack thu


I know how that is, don't sweat it...! I altered the instructions anyway, just to be more helpful.

hiscl
12-29-2004, 03:44 PM
instaled GREATS :)

trulylowcarb
02-11-2005, 03:34 AM
I guess sometimes we figure that people know how to create a basic module, so I didn't say to use template "links". But I realize from helping people that sometimes very basic things are easily overlooked. Thanks for the assist though. :D

SMACKS SELF ON FORHEAD and thanks SVTOA for solving my problem.... so easy, :rolleyes: I am a bit embarrased to admit it!! but know I can't be the only one, so I am agonna 'fess up here so others may have better luck finding this!!

buurman
02-16-2005, 10:08 AM
How do I get an URL and Name pre-installed on the first two entrys for example?

Thx, for the help, love tha module...

SuperGLS
02-22-2005, 08:38 PM
This was a great module. Well done.