Go Back   Webmaster Forum > Development > Forum Administration & Management
REMOVE the ads below !
Reply
 
LinkBack Thread Tools
  # 1 (permalink)
Old
Junior Geek
Posts: 86
Join Date: Sep 2007
iTrader: (0)
[hide] [/hide] Bbcode - 12-24-2007

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


Freelance CMS - Where Design Meets Development

Web Design and Development Forums | Portfolio
Reply With Quote
  # 2 (permalink)
Old
A Lazy Freelance Web Developer
Posts: 2,111
Join Date: Feb 2007
iTrader: (0)
Location: Bhopal (MP, India)
Re: [hide][/hide] Bbcode - 12-24-2007

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 ?
Reply With Quote
  # 3 (permalink)
Old
Junior Geek
Posts: 86
Join Date: Sep 2007
iTrader: (0)
Re: [hide][/hide] Bbcode - 12-24-2007

anyway would be fine mate...i would just like to know how to do it.

Thanks for replying quickly


Freelance CMS - Where Design Meets Development

Web Design and Development Forums | Portfolio
Reply With Quote
  # 4 (permalink)
Old
A Lazy Freelance Web Developer
Posts: 2,111
Join Date: Feb 2007
iTrader: (0)
Location: Bhopal (MP, India)
Re: [hide][/hide] Bbcode - 12-24-2007

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>
Reply With Quote
  # 5 (permalink)
Old
Junior Geek
Posts: 86
Join Date: Sep 2007
iTrader: (0)
Re: [hide][/hide] Bbcode - 12-24-2007

awesome cheers mate....


Freelance CMS - Where Design Meets Development

Web Design and Development Forums | Portfolio
Reply With Quote
  # 6 (permalink)
Old
A Lazy Freelance Web Developer
Posts: 2,111
Join Date: Feb 2007
iTrader: (0)
Location: Bhopal (MP, India)
Re: [hide][/hide] Bbcode - 12-24-2007

Welcome buddy !

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

Reply With Quote
  # 7 (permalink)
Old
Junior Geek
Posts: 86
Join Date: Sep 2007
iTrader: (0)
Re: [hide][/hide] Bbcode - 12-24-2007

arrrghhh it didnt work mate, it still displays the code inside the tags..


Freelance CMS - Where Design Meets Development

Web Design and Development Forums | Portfolio

Last edited by MuscleManiac : 12-24-2007 at 10:23 AM.
Reply With Quote
  # 8 (permalink)
Old
A Lazy Freelance Web Developer
Posts: 2,111
Join Date: Feb 2007
iTrader: (0)
Location: Bhopal (MP, India)
Re: [hide][/hide] Bbcode - 12-24-2007

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.
Reply With Quote
  # 9 (permalink)
Old
A Lazy Freelance Web Developer
Posts: 2,111
Join Date: Feb 2007
iTrader: (0)
Location: Bhopal (MP, India)
Re: [hide][/hide] Bbcode - 12-24-2007

Do you have multiple styles installed ?

If yes, then you have to perform these 2 template edits in each and every skin installed.
Reply With Quote
  # 10 (permalink)
Old
Junior Geek
Posts: 86
Join Date: Sep 2007
iTrader: (0)
Re: [hide][/hide] Bbcode - 12-24-2007

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


Freelance CMS - Where Design Meets Development

Web Design and Development Forums | Portfolio
Reply With Quote
Reply


Thread Tools



PSD to HTML

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