Hide Printable View Link in threads and Printable View Page for certain usergroups
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">&pp={vb:raw perpage}</vb:if><vb:if condition="$pagenumber">&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">&pp={vb:raw perpage}</vb:if><vb:if condition="$pagenumber">&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}&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}&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. |