vb.org Archive

vb.org Archive (https://vborg.vbsupport.ru/index.php)
-   vBulletin 3.0 Full Releases (https://vborg.vbsupport.ru/forumdisplay.php?f=33)
-   -   Admin Delete Template Link (https://vborg.vbsupport.ru/showthread.php?t=68816)

Slynderdale 08-27-2004 10:00 PM

Admin Delete Template Link
 
I noticed one thing, that there was no delete link for the templates in the template list. This got annoying when I added templates and wanted to delete them later, so I made a fix.

Note:
When you click delete, it will ask you if you want to revert the template, if you choose yes, it will delete it and you can't get it back.

in includes/adminfunctions_templates.php find:
PHP Code:

             case $styleid// template is customized for this specific style
                 
return "$indent<li class=\"col-c\">$template[title].
                     
construct_link_code($vbphrase['edit'], "template.php?$session[sessionurl]do=edit&amp;templateid=$template[templateid]&amp;dostyleid=$template[styleid]$LINKEXTRA").
                     
construct_link_code($vbphrase['revert'], "template.php?$session[sessionurl]do=delete&amp;templateid=$template[templateid]&amp;dostyleid=$template[styleid]$LINKEXTRA").
                     
construct_link_code($vbphrase['view_original'], "template.php?$session[sessionurl]do=view&amp;title=" urlencode($template['title']), 1).
                 
"</li>\n"

and replace it with:
PHP Code:

             case $styleid// template is customized for this specific style
                 
return "$indent<li class=\"col-c\">$template[title].
                     
construct_link_code($vbphrase['edit'], "template.php?$session[sessionurl]do=edit&amp;templateid=$template[templateid]&amp;dostyleid=$template[styleid]$LINKEXTRA").
                     
construct_link_code($vbphrase['revert'], "template.php?$session[sessionurl]do=delete&amp;templateid=$template[templateid]&amp;dostyleid=$template[styleid]$LINKEXTRA").
                     
construct_link_code($vbphrase['delete'], "template.php?$session[sessionurl]do=delete&amp;templateid=$template[templateid]&amp;dostyleid=$template[styleid]$LINKEXTRA").
                     
construct_link_code($vbphrase['view_original'], "template.php?$session[sessionurl]do=view&amp;title=" urlencode($template['title']), 1).
                 
"</li>\n"


Thats all.

MrNase 08-28-2004 04:42 PM

Why don't just use the revert Template Link?! It does exactly the same :)

nexialys 08-28-2004 06:17 PM

because you may need to delete the original... when you're not in debug mode, you don't have access to the original..

integra99 08-28-2004 06:35 PM

Quote:

Originally Posted by nexialys
because you may need to delete the original... when you're not in debug mode, you don't have access to the original..

Uhh, the original? If you add a template, you click the revert button and it deleted the template... I'm confused.

kall 08-28-2004 10:08 PM

Quote:

Originally Posted by nexialys
because you may need to delete the original... when you're not in debug mode, you don't have access to the original..

If you have added a template, and you're not in debug mode...you don't add it to the Master Style.

This hack is a little superflouous.


All times are GMT. The time now is 12:20 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.00999 seconds
  • Memory Usage 1,741KB
  • 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
  • (2)bbcode_php_printable
  • (2)bbcode_quote_printable
  • (1)footer
  • (1)gobutton
  • (1)header
  • (1)headinclude
  • (6)option
  • (1)post_thanks_navbar_search
  • (1)printthread
  • (5)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