Go Back   vb.org Archive > vBulletin 3 Discussion > vB3 General Discussions
FAQ Community Calendar Today's Posts Search

Reply
 
Thread Tools Display Modes
  #1  
Old 08-31-2008, 07:02 PM
vbboarder's Avatar
vbboarder vbboarder is offline
 
Join Date: Jun 2008
Location: Silicon Valley, CA
Posts: 417
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default How to update VB template using product xml file?

I'm writing a product xml file and want to update a default VB template with the one I've included in the xml file. If I just give my template the same name as the VB template, then my template will become the default and the VB template will be deleted. How do you prevent the VB template from being deleted?
Also, how do you prevent the new template from being the active one without the user's confirmation (similar to when you update VB and the updated templates are saved but not set to active if the old template has been modified)? Much appreciated for any help
Reply With Quote
  #2  
Old 08-31-2008, 07:58 PM
Opserty Opserty is offline
 
Join Date: Apr 2007
Posts: 4,103
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

Don't update a default template. Either include installation instructions with the changes or edit the template through a plugin when the page is executed.

Maybe helpful: [How-To] Using Plugins for Automatic Template Edits
Reply With Quote
  #3  
Old 08-31-2008, 08:25 PM
vbboarder's Avatar
vbboarder vbboarder is offline
 
Join Date: Jun 2008
Location: Silicon Valley, CA
Posts: 417
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

Quote:
Originally Posted by Opserty View Post
Don't update a default template. Either include installation instructions with the changes or edit the template through a plugin when the page is executed.

Maybe helpful: [How-To] Using Plugins for Automatic Template Edits
Thanks for the link. I'm aware of how to edit a template via a plugin, but was hoping to update a default template similar to how a new VB version updates its templates.
Reply With Quote
  #4  
Old 09-01-2008, 06:29 AM
Marco van Herwaarden Marco van Herwaarden is offline
 
Join Date: Jul 2004
Posts: 25,415
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

Distributing (modified version of) default vB templates with a modification is an absolute No-No.
Reply With Quote
  #5  
Old 09-01-2008, 03:46 PM
vbboarder's Avatar
vbboarder vbboarder is offline
 
Join Date: Jun 2008
Location: Silicon Valley, CA
Posts: 417
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

Quote:
Originally Posted by Marco van Herwaarden View Post
Distributing (modified version of) default vB templates with a modification is an absolute No-No.
Actually, I'm not looking to modify a default VB template, but replace it with another one and NOT have the default VB template deleted. Anyways, I know what you mean...., what I want to do is probably a legal no-no too..... I guess I'll just use the "edit template via a plugin" technique.
Reply With Quote
  #6  
Old 09-02-2008, 08:50 AM
Marco van Herwaarden Marco van Herwaarden is offline
 
Join Date: Jul 2004
Posts: 25,415
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

What i mean is that overwriting default templates with any version (modified/rewritten) is an absolute NoNo, as it will destroy the original template and it will be a lot of work to reinstall the original at a later stage (for example when uninstalling the modification).
Reply With Quote
  #7  
Old 09-02-2008, 11:28 PM
vbboarder's Avatar
vbboarder vbboarder is offline
 
Join Date: Jun 2008
Location: Silicon Valley, CA
Posts: 417
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

Quote:
Originally Posted by Marco van Herwaarden View Post
What i mean is that overwriting default templates with any version (modified/rewritten) is an absolute NoNo, as it will destroy the original template and it will be a lot of work to reinstall the original at a later stage (for example when uninstalling the modification).
I'm aware of that - that's why I asked this question in my first post:
Quote:
How do you prevent the VB template from being deleted?
Reply With Quote
  #8  
Old 09-02-2008, 11:45 PM
Opserty Opserty is offline
 
Join Date: Apr 2007
Posts: 4,103
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

The vB template won't be deleted. But the users customised template may lose its customisations, that is where the problem lies. I haven't seen it done before with a modification, hence why it is difficult to offer help. Just stick to the tried and tested method of telling the user or using Plugins.
Reply With Quote
  #9  
Old 09-03-2008, 01:33 PM
Marco van Herwaarden Marco van Herwaarden is offline
 
Join Date: Jul 2004
Posts: 25,415
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

Quote:
Originally Posted by vbboarder View Post
I'm aware of that - that's why I asked this question in my first post:
And my post was an (second) answer to that question.

To avoid confusion, i don't think Opserty's answer is correct on your question (if i understand correctly).

Bottomline is that you should never touch the default templates in the master style (and including it in a product will always place the templates included in the product into the master style). So don't ever distribute versions of default templates in your modifications.
Reply With Quote
Reply


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 09:08 PM.


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.04843 seconds
  • Memory Usage 2,243KB
  • Queries Executed 13 (?)
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
  • (1)ad_showthread_firstpost
  • (1)ad_showthread_firstpost_sig
  • (1)ad_showthread_firstpost_start
  • (5)bbcode_quote
  • (1)footer
  • (1)forumjump
  • (1)forumrules
  • (1)gobutton
  • (1)header
  • (1)headinclude
  • (1)navbar
  • (3)navbar_link
  • (120)option
  • (9)post_thanks_box
  • (9)post_thanks_button
  • (1)post_thanks_javascript
  • (1)post_thanks_navbar_search
  • (9)post_thanks_postbit_info
  • (9)postbit
  • (9)postbit_onlinestatus
  • (9)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_postinfo_query
  • fetch_postinfo
  • 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