Back to vBulletin 4.x Template Modifications

Hide Printable View Link in threads and Printable View Page for certain usergroups
Mod Version: 1.00, by yin9

vB Version: 4.x.x Rating: (1 vote - 5.00 average) Installs: 5
Released: 01 May 2011 Last Update: Never Downloads: 0
Not Supported Template Edits  

Hi all, it's a simple template mod, i was searching for that and don't find for VB4, if it existed, would appreciate a mod that eliminated, sorry for my English.

This simple mod allow you hide print link of Threads tools and hide print page for guests or certain groups.

AdminCP -> Styles & Templates -> Search in Template -> Search for Text -> printthread

SHOWTHREAD Template

Search for:

Code:
<li><a href="printthread.php?{vb:raw session.sessionurl}t={vb:raw threadid}<vb:if condition="$perpage">&amp;pp={vb:raw perpage}</vb:if><vb:if condition="$pagenumber">&amp;page={vb:raw pagenumber}</vb:if>" accesskey="3" 
						rel="nofollow">{vb:rawphrase show_printable_version}</a></li>


Replace to:

Code:
<li><vb:if condition="is_member_of($bbuserinfo, 2,5,6,7)"><a href="printthread.php?{vb:raw session.sessionurl}t={vb:raw threadid}<vb:if condition="$perpage">&amp;pp={vb:raw perpage}</vb:if><vb:if condition="$pagenumber">&amp;page={vb:raw pagenumber}</vb:if>" accesskey="3" 
						rel="nofollow">{vb:rawphrase show_printable_version}</a></vb:if></li>


printthread Template

Search for:

Code:
</vb:if>
<ul id="postlist">
	{vb:raw postbits}
</ul>
<vb:if condition="$show['pagenav']">
	<div class="floatcontainer">
		<a class="maxperpage" href="printthread.php?{vb:raw session.sessionurl}t={vb:raw threadid}&amp;pp={vb:raw maxperpage}">{vb:rawphrase show_x_posts_on_one_page, {vb:raw maxperpage}}</a>
		<div id="pagination_bottom">
			{vb:raw pagenav}
		</div>
	</div>
</vb:if>


Replace to:

Code:
</vb:if>
<vb:if condition="is_member_of($bbuserinfo, 2,5,6,7)"><ul id="postlist">
	{vb:raw postbits}
</ul>
<vb:if condition="$show['pagenav']">
	<div class="floatcontainer">
		<a class="maxperpage" href="printthread.php?{vb:raw session.sessionurl}t={vb:raw threadid}&amp;pp={vb:raw maxperpage}">{vb:rawphrase show_x_posts_on_one_page, {vb:raw maxperpage}}</a>
		<div id="pagination_bottom">
			{vb:raw pagenav}
		</div>
	</div>
</vb:if></vb:if>


If you want more usergroups can see print link in thread and print page, add usergroup id in conditional code:

Code:
is_member_of($bbuserinfo, 2,5,6,7,25,26,29)

If you want some usergroup can't see print link and print page, don't put his id or remove his id at this condicional code.

Download

No files for download.


vblts.ru supports vBulletin®, 2022-2024