vb.org Archive

vb.org Archive (https://vborg.vbsupport.ru/index.php)
-   vB3 General Discussions (https://vborg.vbsupport.ru/forumdisplay.php?f=111)
-   -   GET variable from URL (plugin/conditional) !! (https://vborg.vbsupport.ru/showthread.php?t=114679)

DrHUS 05-03-2006 12:52 PM

GET variable from URL (plugin/conditional) !!
 
Hello,
i use postbit_legacy by default on my forums, for some purpose i need to show the postbit (classic one) JUST by using Var on link
some thing like
showthread.php?t=36397&postbitstyle=classic
so thru the link above the user will show the classic postbit
other than that it will show them postbit_legacy

i do this global_start plugin (as i thought may will work) but it doesn't

PHP Code:

if ($GLOBALS[postbitstyle] = 'classic')
{
$vbulletin->options['legacypostbit'] = 0;


also,
how can i make some conditional get the Var from URL

some thing like:

PHP Code:

<if conditional="$GLOBALS[theVar] = 'ok'">
blablabla
</if> 

so when some one call showthread.php?t=36397&theVar=ok
will show them the blablabla

can you help me !

antialiasis 05-03-2006 03:08 PM

You'd need to do something like

PHP Code:

$vbulletin->input->clean_gpc['postbitstyle'] = array('g''postbitstyle'TYPE_BOOL);

$vbulletin->options['legacypostbit'] = $vbulletin->GPC['postbitstyle']; 

And then you'd put &postbitstyle=0 in the URL if you wanted the normal postbit and &postbitstyle=1 if you wanted the legacy postbit. If you want it to be &postbitstyle=classic, you'd have do do this instead:

PHP Code:

$vbulletin->input->clean_gpc['postbitstyle'] = array('g''postbitstyle'TYPE_STR);

if (
$vbulletin->GPC['postbitstyle'] == 'classic')
{
   
$vbulletin->options['legacypostbit'] = 0;


I don't know if that will work, but that's the correct version of what you were trying to do.

DrHUS 05-03-2006 04:10 PM

Hiiiii
thank you very much for your help,

i do global_start plug-in with

PHP Code:

$vbulletin->input->clean_gpc['postbitstyle'] = array('g''postbitstyle'TYPE_BOOL);

$vbulletin->options['legacypostbit'] = $vbulletin->GPC['postbitstyle']; 

then i called showtheread?t=37345&postbitstyle=0

but still get the Legacy postbit :(

is there something els i have to do or i already miss?

Sorry for bumping this thread, but I really want to have this fixed. :)

i try to just plugin global_start

Quote:

$vbulletin->options['legacypostbit'] = 0;
but this dosnt do any change (my defult postbit is legacy ..)
i don;t know where the problem .. can some one help on this

i really need it :(

Sorry for bumping this thread again, but I really want to have this fixed please.


All times are GMT. The time now is 03:12 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.01831 seconds
  • Memory Usage 1,729KB
  • 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
  • (5)bbcode_php_printable
  • (1)bbcode_quote_printable
  • (1)footer
  • (1)gobutton
  • (1)header
  • (1)headinclude
  • (6)option
  • (1)post_thanks_navbar_search
  • (1)printthread
  • (3)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