Go Back   vb.org Archive > vBulletin Modifications > Archive > vB.org Archives > vBulletin 3.0 > vBulletin 3.0 Full Releases
Admin Delete Template Link Details »»
Admin Delete Template Link
Version: 1.00, by Slynderdale Slynderdale is offline
Developer Last Online: Nov 2023 Show Printable Version Email this Page

Version: 3.0.3 Rating:
Released: 08-27-2004 Last Update: Never Installs: 4
 
No support by the author.

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.

Show Your Support

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

Comments
  #2  
Old 08-28-2004, 04:42 PM
MrNase MrNase is offline
 
Join Date: May 2003
Location: Germany
Posts: 670
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

Why don't just use the revert Template Link?! It does exactly the same
Reply With Quote
  #3  
Old 08-28-2004, 06:17 PM
nexialys
Guest
 
Posts: n/a
Default

because you may need to delete the original... when you're not in debug mode, you don't have access to the original..
Reply With Quote
  #4  
Old 08-28-2004, 06:35 PM
integra99's Avatar
integra99 integra99 is offline
 
Join Date: Jun 2003
Location: Indiana
Posts: 125
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

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.
Reply With Quote
  #5  
Old 08-28-2004, 10:08 PM
kall's Avatar
kall kall is offline
 
Join Date: Apr 2004
Location: New Zealand
Posts: 2,608
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

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.
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:41 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.03802 seconds
  • Memory Usage 2,249KB
  • Queries Executed 18 (?)
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
  • (2)bbcode_php
  • (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
  • (5)post_thanks_box
  • (5)post_thanks_button
  • (1)post_thanks_javascript
  • (1)post_thanks_navbar_search
  • (5)post_thanks_postbit_info
  • (4)postbit
  • (4)postbit_onlinestatus
  • (5)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
  • tag_fetchbit_complete
  • forumrules
  • navbits
  • navbits_complete
  • showthread_complete