The Arcive of vBulletin Modifications Site. |
|
Details »»
|
|||||||||||||||||||||||||
Updated 06/30/01 for v2.01 plus added feature for Preview of "View Original"
To make it easier to see what a template looks like, Set up a Preview by following these instructions: 1. Open template.php. 2. Look for (around line 79) Code:
makeinputcode("Template name","title",$title);
makechoosercode("Template set","templatesetid","templateset",iif(isset($templatesetid),$templatesetid,-1),iif($debug,"All - global to all template sets",""));
maketextareacode("Template<br><br><font size='1'>".iif(isset($title),makelinkcode("view default template","template.php?s=$session[sessionhash]&action=view&title=$title",1)."</font>",""),"template",$template,25,80);
makehiddencode("group", "$group");
doformfooter("Save");
Code:
echo "<b>Preview Code Placement:</b><hr>$template<hr><b>Preview Page Layout:</b><hr>\n";
eval("dooutput(\"".gettemplate("$title")."\");");
Code:
makeinputcode("Template name","title",$template[title]);
makechoosercode("Template set","templatesetid","templateset",$template[templatesetid],iif($debug,"All - global to all template sets",""));
maketextareacode("Template<br><br><font size='1'>".makelinkcode("view default template","template.php?s=$session[sessionhash]&action=view&title=$template[title]",1)."</font>","template",$template[template],25,80);
makehiddencode("group", "$group");
doformfooter("Save Changes");
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]")."\");");
Code:
doformheader("","");
maketableheader("View Default template");
maketextareacode($template[title],"",$template[template],20,80);
echo "</table>\n</td></tr></table></form>";
Code:
echo "<b>Preview Code Placement:</b><hr>$template[template]<hr><b>Preview Page Layout:</b><hr>\n";
eval("dooutput(\"".gettemplate("$title")."\");");
Show Your Support
|
|||||||||||||||||||||||||
| Comments |
|
#2
|
|||
|
|||
|
Suggestion: run it through the replacement variables before displaying.
|
|
#3
|
|||
|
|||
|
Sounds like a great idea, but I have no idea how to do that...not familiar enuf w/ the code...but if u give me a clue or 2 I'll work on it...
|
|
#4
|
|||
|
|||
|
check how templates are normally parsed, it should be there somewhere.
|
|
#5
|
|||
|
|||
|
A quick look in misc.php should give you the answers you seek.
|
|
#6
|
|||
|
|||
|
OK, now that I put it through templates, sometimes it looks a bit funny. So I output it both ways.
Since you actually need these variables to make it look good, this hack is not for everyone, but I find it very useful when working on the templates. I've updated the hack instructions above...[thanks to menno and wluke] |
|
#7
|
|||
|
|||
|
You need to change point 5 to
Code:
$templatesetid=$template[templatesetid];
echo "<hr>$template[template]<hr>\n";
eval("dooutput(\"".gettemplate("$template[title]")."\");");
|
|
#8
|
|||
|
|||
|
Quote:
Code:
$templatesetid=$template[templatesetid] Code:
eval("dooutput(\"".gettemplate("$template[title]")."\");")
|
|
#9
|
|||
|
|||
|
Nice help, especially while translating
Thx...But you shoukld prevent one thing: Ever tried to edit standardredirect ????
|
|
#10
|
|||
|
|||
|
Quote:
|
![]() |
|
|