vb.org Archive

vb.org Archive (https://vborg.vbsupport.ru/index.php)
-   vB3 General Discussions (https://vborg.vbsupport.ru/forumdisplay.php?f=111)
-   -   vbcode problem (https://vborg.vbsupport.ru/showthread.php?t=111594)

Pagandream 03-28-2006 06:43 PM

vbcode problem
 
Hi!

I really need help!

I have make a vbcode that shows guest a picture and members a text. But it doesn't work, it always show both the pic and the text.

Here is the code:

<if condition="$show['guest']">
<img src="images/sorry.gif" alt="Sorry" width="120" height="120" border="0" />
<else />
{param}
</if>

Is there anything wrong? Or is there a hack that make this?

Thanks!

Zachery 03-28-2006 07:24 PM

I'd guess $show[guest] isn't valid... you aren't trying to put this into the custom bbcode settings are you? By default conditionals don't work there, I believe Marco made a hack to change thiws.

Freesteyelz 03-28-2006 07:32 PM

Let's say you want the code to show up in Member's Info or Postbit replace:

Code:

<if condition="$show['guest']">
With

Code:

<if condition="is_member_of($bbuserinfo, 1)">
Change "1" to the Usergroup ID for unregistered (guests). There are different conditionals to achieve what you want and this is just one example.

Zachery 03-28-2006 07:44 PM

You are basicly doing the same coditional though, just checking a differnt way

the easiest way, is <if condition="$bbuserinfo[userid]"> If a users id is not valid, they are a guest. However, as I pointed out, if he is trying to do this in certain tempaltes, or the custom bbcode sertings, he doesn't have access to $bbuserinfo, or possibly any of the $show varibles.

Freesteyelz 03-28-2006 07:52 PM

You're right, Zachery. :) That was one of the other conditionals which would elimnate all but logged in users. I just have a habit of doing "array" because I add other Usergroups to it.

Pagandream 03-28-2006 07:57 PM

Quote:

Originally Posted by Zachery
you aren't trying to put this into the custom bbcode settings are you? By default conditionals don't work there, I believe Marco made a hack to change thiws.

Yep, I try to make custom bbcode. :(

Do you know where I can find the modification from marco?

Oh, <if condition="is_member_of($bbuserinfo, 1)"> and <if condition="$bbuserinfo[userid]"> dosen't work.

I searching now over 7 hours for a solutions of my problem....


All times are GMT. The time now is 07:15 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.01191 seconds
  • Memory Usage 1,720KB
  • 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
  • (2)bbcode_code_printable
  • (1)bbcode_quote_printable
  • (1)footer
  • (1)gobutton
  • (1)header
  • (1)headinclude
  • (6)option
  • (1)post_thanks_navbar_search
  • (1)printthread
  • (6)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