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)
-   -   vb 2.02 : View templates inline (great for upgrades) (https://vborg.vbsupport.ru/showthread.php?t=24081)

dwh 07-30-2001 10:00 PM

Updated 07/30/01 for vb2.02 plus added feature of Preview of "View Original" now in the same screen and side by side!

To make it easier to upgrade templates, as well as see what a template looks like, Set up a Preview by following these instructions:

1. Open template.php.

2. Look for line 78-79 (in the Start Add section)
Code:

  makehiddencode("group", "$group");
  doformfooter("Save");

3. DIRECTLY After that add
Code:

echo "<b>Preview Code Placement:</b>
<hr>$template<hr><b>Preview Page Layout:</b><hr>\n";
  eval("dooutput(\"".gettemplate("$title")."\");");

4.Look for line 114-115 (in the Start Edit section)
Code:

makehiddencode("group", "$group");
  doformfooter("Save Changes");

5. DIRECTLY After that add
Code:

$templatesetid=$template[templatesetid];
  echo "<b>Preview Code Placement:</b><hr>$template[template]<hr>
<b>Preview Page Layout:</b><hr>\n";
  eval("dooutput(\"".gettemplate("$template[title]")."\");");
 echo "<hr>Here's the original template";
 $action="view";
 $title="$template[title]";
 $custom_template="$template[template]";

6. Look for line 127 (in the Start View section)
Code:

echo "</table>\n</td></tr></table></form>";
7. DIRECTLY After that add
Code:

echo "<b>Preview Code Placement:</b>
<hr>$template[template]<hr><b>Preview Page Layout:</b><hr>\n";
  eval("dooutput(\"".gettemplate("$title")."\");");
  $original_template="$template[template]";
  echo "<hr>Here's the 2 side by side<form>
<table><tr><td width=50%><TEXTAREA COLS=60 ROWS=20>$custom_template</textarea></td>
<td width=50%><TEXTAREA COLS=60 ROWS=20>$original_template</textarea></td></tr>
<tr><td width=50%>$custom_template</td>
<td width=50%>$original_template</td></tr></table></form>";

I added a bunch of carriage returns as before this edit the screen got really wide, but if you have problems, remove the carriage returns.

PS It does look a bit weird with custom templates, but other than that it looks like it'll be a big help.

Partial Screenshot below:

\/ash 07-31-2001 02:28 AM

YES! I love this!

snyx 07-31-2001 03:51 AM

now THIS I like.

VirtueTech 07-31-2001 01:09 PM

Will this work on 2.0.1?

dwh 07-31-2001 01:15 PM

I'm 99% sure it'll work on 2.01, but if you have any problem, you can go to the version I wrote for 2.01.

ldydvr 08-01-2001 05:13 PM

Have you done this with your v2.0.3 yet too?

dwh 08-01-2001 05:33 PM

Yes..but I have to admit it's pretty kludgy. I'll have to revisit it when I get time to make it better.


All times are GMT. The time now is 10:07 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.01039 seconds
  • Memory Usage 1,722KB
  • 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
  • (6)bbcode_code_printable
  • (1)footer
  • (1)gobutton
  • (1)header
  • (1)headinclude
  • (6)option
  • (1)post_thanks_navbar_search
  • (1)printthread
  • (7)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
  • bbcode_fetch_tags
  • bbcode_create
  • bbcode_parse_start
  • bbcode_parse_complete_precache
  • bbcode_parse_complete
  • printthread_post
  • printthread_complete