Announcement

Collapse
No announcement yet.

Printable View

Collapse
X
 
  • Filter
  • Time
  • Show
Clear All
new posts

  • Jose Amaral Rego
    replied
    This is what I did to make it not show for Guest :

    Find:
    Code:
    	<td class="vbmenu_control" id="threadtools">
    		<a href="#goto_threadtools"<if condition="is_browser('ie')"> accesskey="3"</if>>$vbphrase[thread_tools]</a>
    		<if condition="$show['popups']"><script type="text/javascript"> vbmenu_register("threadtools"); </script></if>
    	</td>
    Add this:

    Code:
            [COLOR="Green"]<if condition="$bbuserinfo['userid'] == 1">[/COLOR]
    	<td class="vbmenu_control" id="threadtools">
    		<a href="#goto_threadtools"<if condition="is_browser('ie')"> accesskey="3"</if>>$vbphrase[thread_tools]</a>
    		<if condition="$show['popups']"><script type="text/javascript"> vbmenu_register("threadtools"); </script></if>
    	</td>
           [COLOR="Green"] </if>[/COLOR]
    Or

    Find:
    Code:
    	<tr>
    		<td class="vbmenu_option"><img class="inlineimg" src="$stylevar[imgdir_button]/printer.gif" alt="$vbphrase[show_printable_version]" /> <a href="printthread.php?$session[sessionurl]t=$threadid" accesskey="3">$vbphrase[show_printable_version]</a></td>
    	</tr>
    	<tr>
    Add this:
    Code:
            [COLOR="Green"]<if condition="$bbuserinfo['userid'] == 1">[/COLOR]
    	<tr>
    		<td class="vbmenu_option"><img class="inlineimg" src="$stylevar[imgdir_button]/printer.gif" alt="$vbphrase[show_printable_version]" /> <a href="printthread.php?$session[sessionurl]t=$threadid" accesskey="3">$vbphrase[show_printable_version]</a></td>
    	</tr>
    	<tr>
            [COLOR="Green"]</if>[/COLOR]

    Leave a comment:


  • Jose Amaral Rego
    replied
    Originally posted by Floris
    Hi there Yeah, you can do this!

    You can modify the template SHOWTHREAD

    find:
    <tr>
    <td class="vbmenu_option"><img class="inlineimg" src="$stylevar[imgdir_button]/printer.gif" alt="$vbphrase[show_printable_version]" /> <a href="printthread.php?$session[sessionurl]t=$threadid" accesskey="p">$vbphrase[show_printable_version]</a></td>
    </tr>

    Replace with:
    <if condition="$bbuserinfo['userid'] == 0">
    <tr>
    <td class="vbmenu_option"><img class="inlineimg" src="$stylevar[imgdir_button]/printer.gif" alt="$vbphrase[show_printable_version]" /> <a href="printthread.php?$session[sessionurl]t=$threadid" accesskey="p">$vbphrase[show_printable_version]</a></td>
    </tr>
    </if>

    And save the template.

    Now the link to 'print thread' won't show to users with userid 0, which are users who are not logged in.

    I wonder where this code is? It is not like what I see in my template SHOWTHREAD
    This is in my default template
    Code:
    	<!-- thread tools -->
    	<div class="smallfont">
    		<div><img class="inlineimg" src="$stylevar[imgdir_button]/printer.gif" alt="$vbphrase[show_printable_version]" vspace="1" /> <a href="printthread.php?$session[sessionurl]t=$threadid" accesskey="p">$vbphrase[show_printable_version]</a></div>
    Last edited by Jose Amaral Rego; Thu 3 Nov '05, 4:04pm.

    Leave a comment:


  • gemmagy
    replied
    Thanks for your help. But what this edit is going on my forum is it shows the printer.gif for the guest only and not the registered members. The if condition is only now showing the printer for non members. Would I have to have this statement for all of the userid's except the guest? Sorry to sound so lame but I'm new to this and it's just not working for me.

    Thanks

    Leave a comment:


  • Jose Amaral Rego
    replied
    It works fine, it just you need to look at AdminCP => Usergroups => Usergroup Manager => Unregistered / Not Logged In --Edit Usergroup (id: 1)

    Mine shows as one [ 1 ], then I place one [ 1 ].

    See what #number is in the blue part and add to
    Code:
    <if condition="$bbuserinfo['userid'] == [COLOR="Blue"]1[/COLOR]">

    Leave a comment:


  • gemmagy
    replied
    bump, can someone help me with this??

    Leave a comment:


  • gemmagy
    replied
    I tried this fix and it didn't remove the printer.gif from the guest, it removed it off of the registered user. I would like to use this..... what am I doing wrong?

    Leave a comment:


  • Floris
    replied
    This is a template modification, not a source code modification - it won't be considered as file hacking -you will remain having support

    When you upgrade to vb3 gold you might need to revert the showthread template, but you can always re-apply this tweak.

    Leave a comment:


  • Hussain
    replied
    Hi Floris,

    Thanks. One silly question - if I were to change this code, would I have a problem when upgrading to VB3 Gold? I mean would this be considered hacking???

    Leave a comment:


  • Floris
    replied
    Hi there Yeah, you can do this!

    You can modify the template SHOWTHREAD

    find:
    <tr>
    <td class="vbmenu_option"><img class="inlineimg" src="$stylevar[imgdir_button]/printer.gif" alt="$vbphrase[show_printable_version]" /> <a href="printthread.php?$session[sessionurl]t=$threadid" accesskey="p">$vbphrase[show_printable_version]</a></td>
    </tr>

    Replace with:
    <if condition="$bbuserinfo['userid'] == 0">
    <tr>
    <td class="vbmenu_option"><img class="inlineimg" src="$stylevar[imgdir_button]/printer.gif" alt="$vbphrase[show_printable_version]" /> <a href="printthread.php?$session[sessionurl]t=$threadid" accesskey="p">$vbphrase[show_printable_version]</a></td>
    </tr>
    </if>

    And save the template.

    Now the link to 'print thread' won't show to users with userid 0, which are users who are not logged in.

    Leave a comment:


  • Hussain
    started a topic Printable View

    Printable View

    Is there any way by which one could allow only registered users from viewing a printable view version of a forum?
widgetinstance 262 (Related Topics) skipped due to lack of content & hide_module_if_empty option.
Working...
X