Webmaster Forum

Webmaster Forum (http://www.geekpoint.net/forums.php)
-   Forum Administration & Management (http://www.geekpoint.net/forum-administration-management/)
-   -   [hide] [/hide] Bbcode (http://www.geekpoint.net/forum-administration-management/3559-hide-hide-bbcode.html)

MuscleManiac 12-24-2007 10:36 AM

[hide] [/hide] Bbcode
 
I am using vBulletin v3.6.8 and i have some content on my forums/portal that has been developed by myself. So to prevent the likelihood of the code escaping easily and being duplicated i'd like to place a peice of BBCODE, so that users have to be either registered or signed in to view the content of the post.

If anyone can post the code here that'd be awesome

Regards,
Nick

Shadab 12-24-2007 10:46 AM

Re: [hide][/hide] Bbcode
 
Instead of creating a new [ hide ] ... [/ hide ] bbcode,

would it be fine for you if the existing [ code ] ... [/ code ] tags are modified
to hide the content from unregistered members ?

MuscleManiac 12-24-2007 10:51 AM

Re: [hide][/hide] Bbcode
 
anyway would be fine mate...i would just like to know how to do it.

Thanks for replying quickly ;)

Shadab 12-24-2007 11:10 AM

Re: [hide][/hide] Bbcode
 
okay. i got it.

Open the bbcode_code template of the appropriate skin.
Delete everything it it, place code given below and save.
HTML Code:

<div style="margin:20px; margin-top:5px">
  <div class="smallfont" style="margin-bottom:2px">
      $vbphrase[code]:
  </div>
  <pre class="alt2" dir="ltr" style="margin: 0px;
      padding: $stylevar[cellpadding]px; border: 1px inset;
      width: $stylevar[codeblockwidth]; text-align: left;
      height: {$blockheight}px; overflow: auto"
>

<if condition="$show['member']">$code
<else />Only registered members can see this code.
<a href="$vboptions[bburl]/register.php">Click here to Register.</a>
</if>
</pre>
</div>

Now do the same for bbcode_code_printable template.
The code is :
HTML Code:

<div style="margin:20px; margin-top:5px">
  <div class="smallfont" style="margin-bottom:2px">
      $vbphrase[code]:
  </div>
  <hr />
  <if condition="$show['member']">
      <code style="margin:0px" dir="ltr" style="text-align:left">
        $code
      </code>
  <else />
      Only registered members can see this code.
      <a href="$vboptions[bburl]/register.php">
        Click here to Register.
      </a>
  </if>
  <hr />
</div>


MuscleManiac 12-24-2007 11:15 AM

Re: [hide][/hide] Bbcode
 
awesome cheers mate....

Shadab 12-24-2007 11:21 AM

Re: [hide][/hide] Bbcode
 
Welcome buddy !

Report here asap if you encounter any problems
regarding the implementation of the code.

:)

MuscleManiac 12-24-2007 11:21 AM

Re: [hide][/hide] Bbcode
 
arrrghhh it didnt work mate, it still displays the code inside the tags..

Shadab 12-24-2007 11:23 AM

Re: [hide][/hide] Bbcode
 
What error did you encounter ?

I tried it here in GeekPoint forums just before posting it for you.
And it worked for me when i tried viewing the code unlogged-in.

Shadab 12-24-2007 11:29 AM

Re: [hide][/hide] Bbcode
 
Do you have multiple styles installed ?

If yes, then you have to perform these 2 template edits in each and every skin installed.

MuscleManiac 12-24-2007 11:31 AM

Re: [hide][/hide] Bbcode
 
i have multiple styles installed...should i install this code on both the default template [silver template when vBulletin is first installed] and the template i am currently using [which is the one i have already done the above with]?

Regards


All times are GMT +1. The time now is 11:03 PM.

vBulletin®, Copyright ©2000 - 2008, Jelsoft Enterprises Ltd. | SEO by vBSEO