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)
-   -   Template Control Panel for 2.0 (https://vborg.vbsupport.ru/showthread.php?t=8752)

02-28-2001 04:06 AM

absolutely beautiful, thank you Kier!

02-28-2001 11:43 AM

does this work for beta2?

02-28-2001 11:58 AM

Yes.

02-28-2001 12:10 PM

I had to be sleeping I missed this one. :D

What a hack! Thanks.

02-28-2001 12:26 PM

Ok, I got it working but for some reason I get a parse error in template.php3 (had to rename to .php3 and edit all links in ktemplate to relfect this).

Parse error: parse error in template.php3 on line 487

Line 487 reads:
--------------
?>
--------------

Any ideas?

BTW, I also got an setcookie error, so I turned that option off in the ktemplate file. Is it ok to do that?

rgds,

02-28-2001 02:26 PM

Not sure about your parse error... are you sure you commented out all the right code?

As for the cookie thing, yes, just set the $usecookies variable to "no".

02-28-2001 06:44 PM

This hack makes it so much easier to edit the templates. Thanks a million Kier :)

02-28-2001 10:03 PM

I get lost here. I don't understand why you put ..... instead of the whole bit of code to look for and replace. :D

can you help me out?


Next, find the section of text within the template.php code that looks like this:
PHP Code:

// ###################### Start insert #######################
if ($action=="insert") {

  if (!
$preexists=$DB_site->query_first("SELECT templateid .....
    
$DB_site->query("INSERT INTO template (templateid,tem ...... 

and replace it with this:
PHP Code:

// ###################### Start insert #######################
if ($action=="insert") {

  if (!
$preexists=$DB_site->query_first("SELECT templateid ......
    
$result = $DB_site->query("INSERT INTO template ......
        
$templateid $DB_site->insert_id($result); 


02-28-2001 10:51 PM

But here's what you do.
Find this:
Code:

$DB_site->query("INSERT INTO template (templateid,templatesetid,title,template) VALUES (NULL,'$templatesetid','".addslashes("$title")."','".addslashes("$template")."')");
and replace it with this:
Code:

$result = $DB_site->query("INSERT INTO template (templateid,templatesetid,title,template) VALUES (NULL,'$templatesetid','".addslashes("$title")."','".addslashes("$template")."')");
Then, right below the line that begins $result, add this:
Code:

$templateid = $DB_site->insert_id($result);
(this should go between the $result line and the } else { line)

Hope this helps :)

03-01-2001 10:49 AM

I really like the rightclick view template function.

But I find it more useful if the original template would open in a new window.

To achieve this do the following

In ktemplate.php search for:
Code:

oncontextmenu=\"window.location=('template.php?s=$session[sessionhash]&action=view&title='+this.options[this.selectedIndex].text)\">
and replace it with
Code:

oncontextmenu=\"javascript:window.open('template.php?s=$session[sessionhash]&action=view&title='+this.options[this.selectedIndex].text,'_popit','resizeable=yes,toolbar=no,location=no,menubar=no,scrollbars=no,status=no,width=460, height=320')\">
That's it!


All times are GMT. The time now is 08:29 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.01635 seconds
  • Memory Usage 1,739KB
  • 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_code_printable
  • (2)bbcode_php_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
  • (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