vb.org Archive

vb.org Archive (https://vborg.vbsupport.ru/index.php)
-   vBulletin 2.x Full Releases (https://vborg.vbsupport.ru/forumdisplay.php?f=4)
-   -   Hide text from certain usergroups (https://vborg.vbsupport.ru/showthread.php?t=48819)

N!ck 02-11-2003 10:00 PM

Hide text from certain usergroups
 
Before I begin, I must stress that this is not a lockdown hack and is not even easily made into a lockdown hack. Don't try it - we don't support lockdown here.

What it does
I can think of several uses for this hack. It alters your bbcodeparse2() function so that you can hide certain text from certain usergroups and replace it with a message read from a text file.

Screenshot? Nope. Just trust that I know what I'm doing. :)

Instructions attached.

Slynderdale 02-12-2003 01:05 AM

Theres also always this hack:
https://vborg.vbsupport.ru/showthrea...threadid=48492

You could do [if($userinfo[usergroup]==6)]Hidden Text Here[/if]

Neo 02-12-2003 01:28 AM

Quote:

Originally posted by Slynderdale
Theres also always this hack:
https://vborg.vbsupport.ru/showthrea...threadid=48492

You could do [if($userinfo[usergroup]==6)]Hidden Text Here[/if]


Martin64 02-12-2003 01:43 AM

Quote:

Originally posted by Slynderdale
Theres also always this hack:
https://vborg.vbsupport.ru/showthrea...threadid=48492

You could do [if($userinfo[usergroup]==6)]Hidden Text Here[/if]

Yeah, that was the one. I was going to comment that there already was a similar hack to this one, but couldn't remember which one it was. Either way, good job both of you. :glasses:

empreur76 02-12-2003 09:23 AM

thanks !

empreur76 02-12-2003 10:01 AM

i'm install it but don't worg !! i have this message :

Parse error: parse error, unexpected '\"' in /home/forum/www/upload/admin/functions.php on line 829

N!ck 02-12-2003 01:54 PM

that's true (and i wasn't aware of that hack), but keep in mind that Slynderdale's hack requires some effort to use (and to replace the hidden text with something else, at that).

empreur76, please post line 829 of functions.php

N!ck 02-12-2003 02:20 PM

empreur76, try changing:

PHP Code:

      $bbcode eregi_replace("[ahide]","",$bbcode);
      
$bbcode eregi_replace("[/ahide],"",$bbcode); 

to

PHP Code:

      $bbcode str_replace("[ahide]","",$bbcode);
      
$bbcode str_replace("[/ahide]","",$bbcode); 

stupid error on my part, text file updated

Slynderdale 02-12-2003 02:41 PM

Quote:

Originally posted by nicksaunders
that's true (and i wasn't aware of that hack), but keep in mind that Slynderdale's hack requires some effort to use (and to replace the hidden text with something else, at that).

empreur76, please post line 829 of functions.php

The hack I made is easy to use, i even have it so you can do [if(bbusergroup==6)]Text[/if] and if there usergroup isnt 6 (admin) the text wont show.

N!ck 02-12-2003 08:32 PM

slynderdale, i don't mean to imply that your hack isn't way more versatile than mine; i'm only trying to say that i think mine may suit some people better. for example, i run articles off my vB database, and i want to hide parts of them from non-paying members. but in place of the hidden text, i want to have a standard html advertisement to entice them to become a pay member. for that purpose, this works better because i needn't go to the trouble of re-coding the html time and time again.

your hack certainly surpasses mine in such things as security and options, but i think that in many ways it is a completely different hack than this.

good job on that btw.

i'm sorry if you felt you needed to defend your work.

Slynderdale 02-12-2003 08:55 PM

Quote:

Originally posted by nicksaunders
slynderdale, i don't mean to imply that your hack isn't way more versatile than mine; i'm only trying to say that i think mine may suit some people better. for example, i run articles off my vB database, and i want to hide parts of them from non-paying members. but in place of the hidden text, i want to have a standard html advertisement to entice them to become a pay member. for that purpose, this works better because i needn't go to the trouble of re-coding the html time and time again.

your hack certainly surpasses mine in such things as security and options, but i think that in many ways it is a completely different hack than this.

good job on that btw.

i'm sorry if you felt you needed to defend your work.

Hmm, Yea your right, sorry for my post, Your hack is different, also I have an idea for it, instead of using a text file and so on, how about ir using a template instead?

N!ck 02-13-2003 08:29 PM

i wasn't sure whether it was possible to do that in a function of functions.php...how would i do it? only thing i could think of is:

PHP Code:

      $bbcode eregi_replace("\\[ahide\\]([^\\[]*)\\[/ahide\\]",gettemplate("templatename"),$bbcode); 


chipheodeptrai 05-23-2003 03:05 AM

it is working for vbb2.3.0?


All times are GMT. The time now is 01:23 AM.

Powered by vBulletin® Version 3.8.12 by vBS
Copyright ©2000 - 2025, vBulletin Solutions Inc.

X vBulletin 3.8.12 by vBS Debug Information
  • Page Generation 0.01134 seconds
  • Memory Usage 1,747KB
  • Queries Executed 10 (?)
More Information
Template Usage:
  • (1)ad_footer_end
  • (1)ad_footer_start
  • (1)ad_header_end
  • (1)ad_header_logo
  • (1)ad_navbar_below
  • (3)bbcode_php_printable
  • (4)bbcode_quote_printable
  • (1)footer
  • (1)gobutton
  • (1)header
  • (1)headinclude
  • (6)option
  • (1)post_thanks_navbar_search
  • (1)printthread
  • (13)printthreadbit
  • (1)spacer_close
  • (1)spacer_open 

Phrase Groups Available:
  • global
  • postbit
  • showthread
Included Files:
  • ./printthread.php
  • ./global.php
  • ./includes/init.php
  • ./includes/class_core.php
  • ./includes/config.php
  • ./includes/functions.php
  • ./includes/class_hook.php
  • ./includes/modsystem_functions.php
  • ./includes/class_bbcode_alt.php
  • ./includes/class_bbcode.php
  • ./includes/functions_bigthree.php 

Hooks Called:
  • init_startup
  • init_startup_session_setup_start
  • init_startup_session_setup_complete
  • cache_permissions
  • fetch_threadinfo_query
  • fetch_threadinfo
  • fetch_foruminfo
  • style_fetch
  • cache_templates
  • global_start
  • parse_templates
  • global_setup_complete
  • printthread_start
  • bbcode_fetch_tags
  • bbcode_create
  • bbcode_parse_start
  • bbcode_parse_complete_precache
  • bbcode_parse_complete
  • printthread_post
  • printthread_complete