Go Back   vb.org Archive > vBulletin Modifications > Archive > vB.org Archives > vBulletin 2.x > vBulletin 2.x Full Releases

Reply
 
Thread Tools
Details »»

Version: , by dwh dwh is offline
Developer Last Online: Nov 2023 Show Printable Version Email this Page

Version: Unknown Rating:
Released: 02-18-2001 Last Update: Never Installs: 0
 
No support by the author.

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");
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 (around line 99)
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");
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]")."\");");
6. Look for (around line 125)
Code:
  doformheader("","");
  maketableheader("View Default template");
  maketextareacode($template[title],"",$template[template],20,80);
  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")."\");");
Screenshot below:

Show Your Support

  • This modification may not be copied, reproduced or published elsewhere without author's permission.

Comments
  #2  
Old 02-19-2001, 05:10 AM
Guest
 
Posts: n/a
Default

Suggestion: run it through the replacement variables before displaying.
Reply With Quote
  #3  
Old 02-19-2001, 05:20 AM
Guest
 
Posts: n/a
Default

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...
Reply With Quote
  #4  
Old 02-19-2001, 01:41 PM
Guest
 
Posts: n/a
Default

check how templates are normally parsed, it should be there somewhere.
Reply With Quote
  #5  
Old 02-19-2001, 02:34 PM
Guest
 
Posts: n/a
Default

A quick look in misc.php should give you the answers you seek.
Reply With Quote
  #6  
Old 02-21-2001, 08:36 AM
Guest
 
Posts: n/a
Default

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]
Reply With Quote
  #7  
Old 02-22-2001, 12:51 PM
Guest
 
Posts: n/a
Default

You need to change point 5 to
Code:
$templatesetid=$template[templatesetid];
echo "<hr>$template[template]<hr>\n";
eval("dooutput(\"".gettemplate("$template[title]")."\");");
Otherwise gettemplate will always get the default template and not the one you are going to edit.
Reply With Quote
  #8  
Old 02-22-2001, 04:41 PM
Guest
 
Posts: n/a
Default

Quote:
Originally posted by Fryzid
You need to change point 5 to
Code:
$templatesetid=$template[templatesetid];
echo "<hr>$template[template]<hr>\n";
eval("dooutput(\"".gettemplate("$template[title]")."\");");
Otherwise gettemplate will always get the default template and not the one you are going to edit.
Thanks, I'll try that, maybe that's why it was coming out weird. But I'm wondering how
Code:
$templatesetid=$template[templatesetid]
can change the value of
Code:
eval("dooutput(\"".gettemplate("$template[title]")."\");")
later?
Reply With Quote
  #9  
Old 02-23-2001, 08:38 PM
Guest
 
Posts: n/a
Default

Nice help, especially while translating Thx...

But you shoukld prevent one thing:

Ever tried to edit standardredirect ????
Reply With Quote
  #10  
Old 02-24-2001, 12:00 AM
Guest
 
Posts: n/a
Default

Quote:
Originally posted by Sven
Nice help, especially while translating Thx...

But you shoukld prevent one thing:

Ever tried to edit standardredirect ????
heh heh, no idea how to help this but I see your point
Reply With Quote
Reply

Thread Tools

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off

Forum Jump


All times are GMT. The time now is 08:13 PM.


Powered by vBulletin® Version 3.8.12 by vBS
Copyright ©2000 - 2024, vBulletin Solutions Inc.
X vBulletin 3.8.12 by vBS Debug Information
  • Page Generation 0.04493 seconds
  • Memory Usage 2,269KB
  • Queries Executed 23 (?)
More Information
Template Usage:
  • (1)SHOWTHREAD
  • (1)ad_footer_end
  • (1)ad_footer_start
  • (1)ad_header_end
  • (1)ad_header_logo
  • (1)ad_navbar_below
  • (1)ad_showthread_beforeqr
  • (10)bbcode_code
  • (2)bbcode_quote
  • (1)footer
  • (1)forumjump
  • (1)forumrules
  • (1)gobutton
  • (1)header
  • (1)headinclude
  • (1)modsystem_post
  • (1)navbar
  • (6)navbar_link
  • (120)option
  • (1)pagenav
  • (1)pagenav_curpage
  • (2)pagenav_pagelink
  • (10)post_thanks_box
  • (10)post_thanks_button
  • (1)post_thanks_javascript
  • (1)post_thanks_navbar_search
  • (10)post_thanks_postbit_info
  • (9)postbit
  • (1)postbit_onlinestatus
  • (10)postbit_wrapper
  • (1)spacer_close
  • (1)spacer_open
  • (1)tagbit_wrapper 

Phrase Groups Available:
  • global
  • inlinemod
  • postbit
  • posting
  • reputationlevel
  • showthread
Included Files:
  • ./showthread.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/functions_bigthree.php
  • ./includes/class_postbit.php
  • ./includes/class_bbcode.php
  • ./includes/functions_reputation.php
  • ./includes/functions_post_thanks.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
  • showthread_start
  • showthread_getinfo
  • forumjump
  • showthread_post_start
  • showthread_query_postids
  • showthread_query
  • bbcode_fetch_tags
  • bbcode_create
  • showthread_postbit_create
  • postbit_factory
  • postbit_display_start
  • post_thanks_function_post_thanks_off_start
  • post_thanks_function_post_thanks_off_end
  • post_thanks_function_fetch_thanks_start
  • post_thanks_function_fetch_thanks_end
  • post_thanks_function_thanked_already_start
  • post_thanks_function_thanked_already_end
  • fetch_musername
  • postbit_imicons
  • bbcode_parse_start
  • bbcode_parse_complete_precache
  • bbcode_parse_complete
  • postbit_display_complete
  • post_thanks_function_can_thank_this_post_start
  • pagenav_page
  • pagenav_complete
  • tag_fetchbit_complete
  • forumrules
  • navbits
  • navbits_complete
  • showthread_complete