vb.org Archive

vb.org Archive (https://vborg.vbsupport.ru/index.php)
-   vBulletin 3.7 Template Modifications (https://vborg.vbsupport.ru/forumdisplay.php?f=229)
-   -   Show Thread Enhancements - Only show Social Bookmarking links in certain forums. (https://vborg.vbsupport.ru/showthread.php?t=170661)

02-15-2008 10:00 PM

Only show Social Bookmarking links in certain forums.
 
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:

Code:

<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:

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.

Code:

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

DiverTree 05-12-2008 01:44 PM

first one here? whoohoo!!! clicks install

DiverTree 05-12-2008 02:03 PM

i had to use this template edit to get it to work for me ...

Code:


<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 05-17-2008 06:20 AM

thanks alot. works fine with me.


All times are GMT. The time now is 12:29 PM.

Powered by vBulletin® Version 3.8.12 by vBS
Copyright ©2000 - 2025, vBulletin Solutions Inc.

X vBulletin 3.8.12 by vBS Debug Information
  • Page Generation 0.00997 seconds
  • Memory Usage 1,721KB
  • Queries Executed 10 (?)
More Information
Template Usage:
  • (1)ad_footer_end
  • (1)ad_footer_start
  • (1)ad_header_end
  • (1)ad_header_logo
  • (1)ad_navbar_below
  • (4)bbcode_code_printable
  • (1)footer
  • (1)gobutton
  • (1)header
  • (1)headinclude
  • (6)option
  • (1)post_thanks_navbar_search
  • (1)printthread
  • (4)printthreadbit
  • (1)spacer_close
  • (1)spacer_open 

Phrase Groups Available:
  • global
  • postbit
  • showthread
Included Files:
  • ./printthread.php
  • ./global.php
  • ./includes/init.php
  • ./includes/class_core.php
  • ./includes/config.php
  • ./includes/functions.php
  • ./includes/class_hook.php
  • ./includes/modsystem_functions.php
  • ./includes/class_bbcode_alt.php
  • ./includes/class_bbcode.php
  • ./includes/functions_bigthree.php 

Hooks Called:
  • init_startup
  • init_startup_session_setup_start
  • init_startup_session_setup_complete
  • cache_permissions
  • fetch_threadinfo_query
  • fetch_threadinfo
  • fetch_foruminfo
  • style_fetch
  • cache_templates
  • global_start
  • parse_templates
  • global_setup_complete
  • printthread_start
  • bbcode_fetch_tags
  • bbcode_create
  • bbcode_parse_start
  • bbcode_parse_complete_precache
  • bbcode_parse_complete
  • printthread_post
  • printthread_complete