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)

Boofo 04-11-2003 06:29 PM

Quote:

Today at 02:18 PM Logician said this in Post #190
sorry not possible without hack because vb does not save your subscription status in a variable that you can use in a conditional. You need a hack for this and there is one for forum subscriptions too.


I tried to use the forum subscription hack that is out and it added an extra query for each forum on the forumhome. Is there a way to do it in one query for all forums or at least a few less queries?

Quote:

lol thx.. no it does not bother me at all. I hope you'll get pms about your own hacks too but I dont know if you'll like it when you start to get a lot of pms about that so that I don't wish. :knockedout:
My hacks really aren't worth pm-ing anyone about. At least with yours, I might get a pm or two. ;)

Logician 04-11-2003 06:41 PM

Quote:

I tried to use the forum subscription hack that is out and it added an extra query for each forum on the forumhome. Is there a way to do it in one query for all forums or at least a few less queries?
No easy way unless you are ready to hack more and have a new field in user table where you save user's subscribed forumids there. Then it would be automatically availability to your without querying the DB.

Boofo 04-11-2003 06:48 PM

Quote:

Today at 02:35 PM Logician said this in Post #192
No easy way unless you are ready to hack more and have a new field in user table where you save user's subscribed forumids there. Then it would be automatically availability to your without querying the DB.
That'll work. Would you help me with it, sir? ;)

irn-bru 04-21-2003 01:30 PM

I wonder if this can be done.

[[($bbuserinfo[usergroupid]==2 $bbuserinfo[usergroupid]==3 OR
$bbuserinfo[usergroupid]==4 OR $bbuserinfo[usergroupid]==5 OR $bbuserinfo[usergroupid]==6 OR $bbuserinfo[usergroupid]==7)]]

$forumbits

[[/($bbuserinfo[usergroupid]==2 $bbuserinfo[usergroupid]==3 OR
$bbuserinfo[usergroupid]==4 OR $bbuserinfo[usergroupid]==5 OR $bbuserinfo[usergroupid]==6 OR $bbuserinfo[usergroupid]==7)]]

In doing this I would like to show all members the $forumbits
and just visitors the rest of the forum home. I know I could just code the index.pho with.

if ($bbuserinfo[userid]==0) {
show_nopermission();
}

But I would like guest to see the shoutbox and whos online
and not just the nopermission please register template. Also
the show_nopermission I would like that to replace the $forumbits
for guests only.

Logician 04-21-2003 02:52 PM

yeah seems applicable, why dont you give a shot?

irn-bru 04-21-2003 02:54 PM

With a few changes it worked. :)

Just one more question can I do this.

[[($bbuserinfo[usergroupid]==1)]]

" I want to get a template from the database
and not put my html in here. How would I do that?"

[[/($bbuserinfo[usergroupid]==1)]]

Thanks for the help. I have attached my forumbits
html.

Logician 04-21-2003 05:32 PM

Quote:

Today at 05:54 PM irn-bru said this in Post #196
" I want to get a template from the database
and not put my html in here. How would I do that?"

no way without hacking. ;)

CRego3D 05-12-2003 02:16 AM

Let me ask you if this is possible

I have a custom profile entry "profilefieldid=5"

I want to have a different template based on what the user puts there, example

if the user puts: rabit or Rabit = template A / ckicken or Chicken = template b

(if they put something it's not defined, then shows nothing of course)

can it be ?

Logician 05-12-2003 07:06 AM

[[(strtolower($bbuserinfo[field5])=='rabit')]]
Template A
[[/(strtolower($bbuserinfo[field5])=='rabit')]]
[[(strtolower($bbuserinfo[field5])=='chicken')]]
Template B
[[/(strtolower($bbuserinfo[field5])=='chicken')]]

CRego3D 05-13-2003 04:44 AM

COOL :D


All times are GMT. The time now is 08:14 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.01583 seconds
  • Memory Usage 1,741KB
  • 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_quote_printable
  • (1)footer
  • (1)gobutton
  • (1)header
  • (1)headinclude
  • (6)option
  • (1)pagenav
  • (1)pagenav_curpage
  • (4)pagenav_pagelink
  • (2)pagenav_pagelinkrel
  • (1)post_thanks_navbar_search
  • (1)printthread
  • (10)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