PDA

View Full Version : Show Thread Enhancements - Only show Social Bookmarking links in certain forums.


Chris-777
16 Feb 2008, 14:35
This is just a simple conditional, but I found it useful and worth sharing. All it does is give you the option to only show the social bookmarking (Digg, Stumbleupon, etc) links in select forums where appropriate.

In the SHOWTHREAD template:

Find:


<if condition="$bookmarksites">
<!-- social bookmarking links -->
<br />
<table cellpadding="$stylevar[cellpadding]" cellspacing="$stylevar[cellspacing]" border="0" width="100%" class="tborder" align="center">

<tr>
<td class="thead" colspan="$bookmarkcolspan">$vbphrase[bookmarks]</td>
</tr>
<tr>$bookmarksites</tr>
</table>
<!-- / social bookmarking links -->
</if>

Add the colored code:


<if condition="$bookmarksites">
<if condition="in_array($forum[forumid], array(1,2,3))">
<!-- social bookmarking links -->
<br />
<table cellpadding="$stylevar[cellpadding]" cellspacing="$stylevar[cellspacing]" border="0" width="100%" class="tborder" align="center">

<tr>
<td class="thead" colspan="$bookmarkcolspan">$vbphrase[bookmarks]</td>
</tr>
<tr>$bookmarksites</tr>
</table>
<!-- / social bookmarking links -->
</if>
</if>


In this conditional, change 1,2,3 (etc) to the forumid's of the forums that you want to shot the bookmarking links in.


<if condition="in_array($forum[forumid], array(1,2,3))">

DiverTree
12 May 2008, 15:44
first one here? whoohoo!!! clicks install

DiverTree
12 May 2008, 16:03
i had to use this template edit to get it to work for me ...


<if condition="$bookmarksites">
<if condition="in_array($forum[forumid], array(x,x,x))">
<!-- social bookmarking links -->
<br />
<table cellpadding="$stylevar[cellpadding]" cellspacing="$stylevar[cellspacing]" border="0" width="100%" class="tborder" align="center">
<tr>
<td class="thead">$vbphrase[bookmarks]</td>
</tr>
<tr>
<td class="alt2" style="padding-top:0px"><div style="clear:both"></div><ul style="list-style-type:none; margin:0px; padding:0px">$bookmarksites</ul><div style="clear:both"></div></td>
</tr>
</table>
<!-- / social bookmarking links -->
</if>
</if>
the way you have it in your template edit, makes the bookmarks show up outside (on top of) the table on my board. :confused:

thanks :)

aisais
17 May 2008, 08:20
thanks alot. works fine with me.