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)

Logician 10-05-2002 07:25 AM

@mikey8270:
Quote:

Originally posted by mikey8270
is there any way to make it show like 'You have relied to this thread' or You have not replied to this thread' somewhere on the showthread page to everybody except guests?
Sorry this can't be done, because at the moment thread is displayed, vbulletin does not save the thread repliers info in a variable. If did, this would be possible.

You have to make an SQL query beforehand, to get if visitor is a thread replier and save the result in a variable. Then you can use this variable in your conditional in this hack to achieve what you wanted..

@g-force2k2:
Quote:

anways i get the infamous 6==6 as stated in the past posts...
I would say your conditional syntax may be wrong.

For example if you wrote it as:
PHP Code:

[[($bbuserinfo[userid]==1)]] TEXT GOES HERE [[($bbuserinfo[userid]==1)]] 

it looks good but it is not. Please notice the closing tag lacks / sign. So it should be:
PHP Code:

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

If this is not your problem, try to make this change:
find:

PHP Code:

 return "<!-- BEGIN TEMPLATE: $templatename -->\n$template\n<!-- END TEMPLATE: $templatename -->"

And replace it as:

PHP Code:

 return "<!-- BEGIN TEMPLATE: $templatename -->\n".advanced_templates($template)."\n<!-- END TEMPLATE: $templatename -->"

If this also not fixes it, can you please post here the conditional you used (please copy paste from the template) and also function gettemplate after you applied the hack.. Let me check..

zonegray 10-05-2002 11:26 AM

g-force2k2 - I had the same problem... template debug was turned off, but I still saw the 6==6 stuff, I even added the other hack that Logi mentioned, and that didn't work. Eventually I reviewed the installation with a gun to my head, and finally found the typo.

My mistake was that half the edits went to the wrong server, due to a peculiarity of ssh.com's Secure File Transfer that I used while editing.

Logician 10-05-2002 12:19 PM

Quote:

Originally posted by zonegray
My mistake was that half the edits went to the wrong server, due to a peculiarity of ssh.com's Secure File Transfer that I used while editing.
:)

Babylon 10-07-2002 09:26 AM

Hi Logician :)

Have to say that this hack is amazing! Finally gives me the full flexibility in my templates that I've been looking for! Great work :)

I was reading the previous posts in this thread (particularly the third page) and came up with a slightly different installation alternative which allows people to have the "Add template name in comments" option on, and makes the script slightly more optimised (using the info you said on the third page) and still makes installation only 2 steps :)

(I was very happy when reading through the hack installation details first time round to find there were only 2 installation steps as I was trying to install about 2 hacks at the time :/ )

Back to what I was talking about:

Instead of step one being:

Code:

1- Edit admin/functions.php, find
-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=
return $template;
-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=

Replace it AS:
-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=
return advanced_templates($template);
-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=


Change step one to:

Code:

1- Edit admin/functions.php, find
-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=
if ($gethtmlcomments and $addtemplatename) {
-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=

Replace it AS:
-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=
if (substr_count($template,'[[/(')>=1) {
        $template = advanced_templates($template);
  }
  if ($gethtmlcomments and $addtemplatename) {
-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=


Logician 10-07-2002 09:39 AM

Quote:

Originally posted by Babylon
I was reading the previous posts in this thread (particularly the third page) and came up with a slightly different installation alternative which allows people to have the "Add template name in comments" option on, and makes the script slightly more optimised (using the info you said on the third page) and still makes installation only 2 steps :)

Yes Babylon, your solution is quite good which solves 2 issues in 1 step. ;)

In fact I should have already updated the instructions but I have little time and too many hacks to support nowadays.. Fortunately, hack thread is not yet too long, modification is not so crucial and the users of this hack are usually power-users (like yourself) who can achieve things without my help. :)

Anyway, I will hopefully update them very soon..

Babylon 10-07-2002 06:06 PM

Very true :) Well, again, excellent hack! JUst trying to think of the best things to use it for, but there's just so much i wanna change in my forum now!

This is only my second post ya know! :)

Wildthinks 10-07-2002 06:22 PM

Hi Logician,

i have try insert "Hi $bbuserinfo[username],", but display is that one and not "Hi Wildthinks" or so on... any Hints or impossible?

Martin CX 10-08-2002 12:15 AM

Quote:

Originally posted by Wildthinks
i have try insert "Hi $bbuserinfo[username],", but display is that one and not "Hi Wildthinks" or so on... any Hints or impossible?
This hasn't really anything to do with the hack (or has it?) but use $username if you want to display the users username.

Logician 10-08-2002 10:15 AM

Quote:

Originally posted by Wildthinks
Hi Logician,

i have try insert "Hi $bbuserinfo[username],", but display is that one and not "Hi Wildthinks" or so on... any Hints or impossible?

It should and I tested it and it does here..

Can you give more info? What was your exact conditional and in which template did you use it?

Devil-GOD 10-08-2002 11:42 AM

great
***install***


All times are GMT. The time now is 05:44 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.01351 seconds
  • Memory Usage 1,755KB
  • 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
  • (4)bbcode_php_printable
  • (6)bbcode_quote_printable
  • (1)footer
  • (1)gobutton
  • (1)header
  • (1)headinclude
  • (6)option
  • (1)pagenav
  • (1)pagenav_curpage
  • (4)pagenav_pagelink
  • (1)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