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)

JakeC 03-16-2003 12:37 PM

Ok, thanks. Kind of a shame. This has to be the most clever hack to come out and I hate to see it gobbled up. I would be happy to see all my other hacks incorporated, but not this one. Thanks for your work getting this out to us logician!

JakeC

Mr. Brian 03-16-2003 04:01 PM

I encountered some problems here..

Code:

Parse error: parse error, unexpected T_CONSTANT_ENCAPSED_STRING in /home/soccerwi/public_html/forum/admin/functions.php on line 860

Fatal error: Call to undefined function: vbsetcookie() in /home/soccerwi/public_html/forum/admin/sessions.php on line 183

Hope someone can help..

Thanks in advance.

Mr. Brian 03-16-2003 06:24 PM

*Bump*

Quote:

Today at 02:01 AM Matthew Lam said this in Post #152
I encountered some problems here..

Code:

Parse error: parse error, unexpected T_CONSTANT_ENCAPSED_STRING in /home/xxxxx/public_html/forum/admin/functions.php on line 860

Fatal error: Call to undefined function: vbsetcookie() in /home/xxxxx/public_html/forum/admin/sessions.php on line 183

Hope someone can help..

Thanks in advance.


Logician 03-17-2003 06:16 AM

Quote:

Yesterday at 08:01 PM Matthew Lam said this in Post #152
I encountered some problems here..

Code:

Parse error: parse error, unexpected T_CONSTANT_ENCAPSED_STRING in /home/soccerwi/public_html/forum/admin/functions.php on line 860

Fatal error: Call to undefined function: vbsetcookie() in /home/soccerwi/public_html/forum/admin/sessions.php on line 183

Hope someone can help..

Thanks in advance.

https://vborg.vbsupport.ru/showthrea...036#post306036

Boofo 03-18-2003 12:10 PM

Sinan, I have to ask. I've seen some of what they say is the conditionals for 3.0 and to tell you the truth, I don't like them as much as I do yours for this hack. Will you, by chance, be updating this for 3.0 for those of us that are used to your conditionals and the way of doing them like we are now?

Logician 03-18-2003 06:18 PM

Quote:

Sinan, I have to ask. I've seen some of what they say is the conditionals for 3.0 and to tell you the truth, I don't like them as much as I do yours for this hack. Will you, by chance, be updating this for 3.0 for those of us that are used to your conditionals and the way of doing them like we are now?
I can't say anything at the moment as I don't know the structure of vb3 conditionals. Freddie told in this thread that they are more performance friendly so we might as well used them if this proves to be true. But frankly I didnt understood its logic from his explanation so will not know the algorithm till vb is released. After seeing the algorithm, I may consider replacing it with my conditionals if their performances are similiar or a syntax translation to make it competible with my syntax if its performance is better and a conversion will be possible without affecting the performance. We'll see..

Kaelon 03-18-2003 10:17 PM

Words cannot express the absolute amazement that I have in this extremely awesome hack. Congratulations, Logician - this is absolutely brilliant.

Kaelon

Boofo 03-18-2003 10:19 PM

Logician is a magician. ;)

Mr. Brian 03-19-2003 12:38 AM

Ya, I did replaced instead of add.

Quote:

03-17-03 at 04:24 AM Matthew Lam said this in Post #153
*Bump*


PHP Code:

        ob_start();
        $oldlevel=error_reporting(0);
        highlight_string($code);
        error_reporting($oldlevel);
        $buffer = ob_get_contents();
        ob_end_clean();
        if ($addedtags) {
          $openingpos = strpos($buffer,'<?');
          $closingpos = strrpos($buffer, '?');
          $buffer=substr($buffer, 0, $openingpos).substr($buffer, $openingpos+5, $closingpos-($openingpos+5)).substr($buffer, $closingpos+5);
        }
        $buffer = str_replace(""", "\"", $buffer);
  }

  return "</normalfont><blockquote><pre><smallfont>PHP:</smallfont><hr>$buffer<hr></pre></blockquote><normalfont>";
}

// ###################### Start stripbrsfromcode #######################
function stripbrsfromcode($foundcode) {
  $foundcode = str_replace("\\\"","\"",$foundcode);
  return "</normalfont><blockquote><pre><smallfont>code:</smallfont><hr>" . str_replace("<br>", "", str_replace("<br />", "", $foundcode) ) . "<hr></pre></blockquote><normalfont>";
}

// ###################### Start createlists #######################
function createlists($foundlist, $type="") {
  $type = iif(empty($type), $type,  " type=\"$type\"");
  $foundlist = str_replace("\\\"","\"",$foundlist);
  if ($type) {
    return "<ol$type>" . str_replace("[*]","<li>", $foundlist) . "</ol>";
  } else {
    return "<ul>" . str_replace("[*]","<li>", $foundlist) . "</ul>";
  }
}

functions.php lines between 810 - 850..

thanks.. :)

Logician 03-19-2003 06:05 AM

I say check step 1.. After you applied it, the line should look like this:

PHP Code:

//Logician Advanced Templates Hack
if (substr_count($template,'[[/(')>=1) {$template advanced_templates($template);}
//Logician Advanced Templates Hack
if ($gethtmlcomments and $addtemplatename) { 

Not like this:
PHP Code:

//Logician Advanced Templates Hack
if (substr_count($template,'[[/(')>=1) {$template advanced_templates($template);}
//Logician Advanced Templates Hack if ($gethtmlcomments and $addtemplatename) { 

More info here


All times are GMT. The time now is 09:34 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.01419 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
  • (3)bbcode_code_printable
  • (3)bbcode_php_printable
  • (4)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