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)
-   -   Advanced Templates: Dynamic Templates Changing according to different conditions (https://vborg.vbsupport.ru/showthread.php?t=43325)

Slynderdale 05-13-2003 09:38 AM

This hack lets you use conditions like on vbulletin 3.0.

examples:

<if($bbuserinfo[userid]==0)>stuff</if>
<if($bbuserinfo[userid]==0)>stuff<else />else stuff</if>

<if($bbuserinfo[usergroupid]==0)>
stuff
</if>

<if($bbuserinfo[usergroupid]==0)>
stuff
<else />
else stuff
</if>

And so on.

Also I want to note, that at the moment, you cant use conditions inside a condition. It will mess up. I'll try to come up with a fix till then.

If you like this hack and plan to use it, please click install.
Now im off to school, if any one exspirences any problems, I'll get back to you asap.

Hope you like it.

Slynderdale 05-13-2003 09:40 AM

Also note that its <else /> not <else> or <else/>

Erwin 05-13-2003 10:25 AM

Very cool. :)

Mephisteus 05-13-2003 12:15 PM

very very nice :) Installed :)

wolfe 05-13-2003 12:47 PM

d00d i can't find any of the code in the functions.php file :(

Slynderdale 05-13-2003 12:51 PM

Quote:

Today at 09:47 AM wolfe said this in Post #5
d00d i can't find any of the code in the functions.php file :(

Find the gettemplates function and paste the first part of the code in it near the botton of it near the code that resembles the first part I told you to find.

Then under the function add the one I made and thats basicly it.

filburt1 05-13-2003 01:45 PM

Is my mind completely shot or isn't this virtually identical to the other conditionals hack?

Logician 05-13-2003 02:05 PM

threads merged..

Boofo 05-13-2003 02:19 PM

Quote:

Today at 05:38 AM Slynderdale said this in Post #201
This hack lets you use conditions like on vbulletin 3.0.

examples:

<if($bbuserinfo[userid]==0)>stuff</if>
<if($bbuserinfo[userid]==0)>stuff<else />else stuff</if>

<if($bbuserinfo[usergroupid]==0)>
stuff
</if>

<if($bbuserinfo[usergroupid]==0)>
stuff
<else />
else stuff
</if>

And so on.

Also I want to note, that at the moment, you cant use conditions inside a condition. It will mess up. I'll try to come up with a fix till then.

If you like this hack and plan to use it, please click install.
Now im off to school, if any one exspirences any problems, I'll get back to you asap.

Hope you like it.

Can this be used along with Logician's conditional hack?

EvilLS1 05-14-2003 05:48 AM

I can't believe I've overlooked this hack for so long! This is brilliant! Great hack Logician!

midnightz 05-17-2003 09:35 PM

Awesome Hack,

Is there away to have it work with a gallery image link in postbit that only shows up if you have a Photopost gallery upload. Such as the way Vbjournal shows up in postbit when you have a journal and not there if you dont.?

This is a great hack, I don't know if I can do the above easier with a fewlines of code or with the hack. But I'm alreday playing with this yummy hack...

Many Cheers and Whooo Hooos,

midnightz

Logician 05-19-2003 03:49 PM

Quote:

Is there away to have it work with a gallery image link in postbit that only shows up if you have a Photopost gallery upload.
It can not be done with templates because vb code can not know if a user has a gallery or not without querying the database (= hacking). :) You have to use a hack first so that vb code knows it while running. Then conditionals can depend on this info.

|oR|Greg 05-20-2003 05:54 PM

Great hack btw, I added it to vBHL on my site to control the main page visitors see, registered/logged in users see it differently with more options, layout.

NexDog 05-28-2003 03:10 AM

I have a sidebar on index and in it I want to display a table for registered users and a different table for guests. I guess I can use this for registered users:
PHP Code:

[[($bbuserinfo[userid])]] TEXT GOES HERE [[/($bbuserinfo[userid])]] 

But what is the variable used for guests?

Boofo 05-28-2003 03:42 AM

For registered users use:

Quote:

[[($bbuserinfo[userid]!=0)]] TEXT GOES HERE [[/($bbuserinfo[userid]!=0)]]
and for guests use:

Quote:

[[($bbuserinfo[userid]==0)]] TEXT GOES HERE [[/($bbuserinfo[userid]==0)]]

Logician 05-28-2003 07:03 AM

as Bob said.

NexDog 05-29-2003 03:41 AM

Thanks guys, you most definitely rock. :)

Now if I can just get stats to parse in the header template.....

NexDog 05-30-2003 10:08 PM

Will this work with html code as well as text. For example:

[[($bbuserinfo[userid]==0)]] HTML CODE HERE [[/($bbuserinfo[userid]==0)]]

Slynderdale 05-30-2003 10:34 PM

Quote:

Today at 07:08 PM NexDog said this in Post #218
Will this work with html code as well as text. For example:

[[($bbuserinfo[userid]==0)]] HTML CODE HERE [[/($bbuserinfo[userid]==0)]]


Yes, html will work there as well

Boofo 05-30-2003 11:03 PM

Like Slynderdale said.

NexDog 06-01-2003 02:44 PM

I love this hack! I have it working exactly as I want it. Thanks to all for your help and patience as always. :)

[high]* NexDog installs[/high]

sonic3d 06-21-2003 10:49 PM

how do i make it so in some1's profile a piece of code does not show up for that user. which means no1 can view it.

l8er
sonic

sonic3d 06-24-2003 06:04 PM

ne1?

scri 06-27-2003 02:32 PM

i was wondering if anyone knew what the condition was to allow images in sigs in a particular forum?

Logician 06-27-2003 06:15 PM

Quote:

Today at 06:32 PM scri said this in Post #224
i was wondering if anyone knew what the condition was to allow images in sigs in a particular forum?
This can't be done with template conditionals..

allfather 07-13-2003 07:41 PM

i read a few pages (not understanding exactly how) but i couldnt see anyone who had forced "themes" for different usergroups.

could anyone explain how to me pritty please?
(the hack itself was simple anough to install,just silly me who thought i could just go into admin section now and choose different themes for usergroups :p )

allfather 07-13-2003 07:52 PM

[[(2==6)]]
Advanced Templates Hack has been successfully installed! By the way this remark is visible to Site Admins only.. ;) Enjoy..
Logician \\=^))

[[/(2==6)]]

^^^^ i still get that thoght eventhough i opened up mozilla and used a test account with normal acceess :(

Logician 07-13-2003 08:58 PM

Quote:

Yesterday at 11:52 PM allfather said this in Post #227
[[(2==6)]]
Advanced Templates Hack has been successfully installed! By the way this remark is visible to Site Admins only.. ;) Enjoy..
Logician \\=^))

[[/(2==6)]]

^^^^ i still get that thoght eventhough i opened up mozilla and used a test account with normal acceess :(

I dont think you installed the hack correctly.

1- Make sure you applied instructions correctly
2- Make sure you uploaded functions.php to your server.
3- Make sure you uploaded functions.php to the correct directory.

Either one is your problem..

allfather 07-13-2003 09:51 PM

yes i i accidentaly deleted a line :)
but can you help me with the usergroup and forced STYLE thing?

regards

thomas


(ps,exelent hack:) )

Logician 07-13-2003 10:40 PM

I don't understand what you mean by "theme"?!?

allfather 07-13-2003 10:54 PM

style then ffs :p

Logician 07-13-2003 11:04 PM

this hack can not help you to change style according to usergroup. Try searching in hack requests forum with keywords "$styleid*" "$style*". You can find a solution there.

allfather 07-13-2003 11:09 PM

bollox, i got told this was what i needed for that :(

sweet22 08-18-2003 04:47 AM

how do you know user group ids?

Dolby 08-25-2003 08:22 PM

Quote:

08-18-03 at 12:47 AM sweet22 said this in Post #234
how do you know user group ids?
Go to the Admin Control Panel and go to User Groups menu heading and click [Manage]. Hover your mouse over the [edit] link for each usergroup and you will find the group id in the URL.

The standard group ID's are:

Unregistered / Not Logged In = 1
Registered = 2
Users Awaiting Email Confirmation = 3
(COPPA) Users Awaiting Moderation = 4
Super Moderators = 5
Administrators = 6
Moderators = 7
Banned by Moderators = (custom to forum must look up your self)

99SIVTEC 08-26-2003 10:17 PM

I've got a forum that is a network of sites using vbulletin and phpportals. I would like the header to change depending on which sub forum you are in. This would allow me to have a unique look for each "club". Is this possible with this hack?

Logician 08-27-2003 06:51 AM

Quote:

Today at 02:17 AM 99SIVTEC said this in Post #236
I've got a forum that is a network of sites using vbulletin and phpportals. I would like the header to change depending on which sub forum you are in. This would allow me to have a unique look for each "club". Is this possible with this hack?
I would say use an external hack for your request. I guess it is already provided in hacks requests forum. Check with keyword "$header" or "forumdisplay.php". Also check in this forum as a hack might already exist.

ImportPassion 08-29-2003 06:55 PM

how can i use this to only show something if the user is Online?
I have tried several things, none have worked.

THanks,
Derek

memobug 08-29-2003 08:44 PM

Who is the user are you talking about? The one looking at the forum or the one whose user information might appear in the context of one of the other other templates?

There is an $onlinestatus in the postbit template. If you mean the person looking at the pages, that's different.

Maybe you could suggest what you are trying to do for more help.

Regards,

Matt

ImportPassion 08-29-2003 11:43 PM

ya, i should have explained it better.

I want to use it for any user in the postbit. I tried using the $onlinestatus=='Online' and it doesn't work. I tried several variations of it in fact.
I want to show a graphic if the user is in x usergroup and currently online.

Derek


All times are GMT. The time now is 12:43 PM.

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.01514 seconds
  • Memory Usage 1,820KB
  • 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
  • (1)bbcode_php_printable
  • (10)bbcode_quote_printable
  • (1)footer
  • (1)gobutton
  • (1)header
  • (1)headinclude
  • (6)option
  • (1)pagenav
  • (1)pagenav_curpage
  • (4)pagenav_pagelink
  • (1)post_thanks_navbar_search
  • (1)printthread
  • (40)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
  • pagenav_page
  • pagenav_complete
  • bbcode_fetch_tags
  • bbcode_create
  • bbcode_parse_start
  • bbcode_parse_complete_precache
  • bbcode_parse_complete
  • printthread_post
  • printthread_complete