Helpful Information
 
 
Category: vBulletin 2.x
vb 2.02 : View templates inline (great for upgrades)

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)
makehiddencode("group", "$group");
doformfooter("Save");

3. DIRECTLY After that add 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)
makehiddencode("group", "$group");
doformfooter("Save Changes");

5. DIRECTLY After that add $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)
echo "</table>\n</td></tr></table></form>";

7. DIRECTLY After that add 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:

YES! I love this!

now THIS I like.

Will this work on 2.0.1?

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.

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

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










privacy (GDPR)