vb.org Archive

vb.org Archive (https://vborg.vbsupport.ru/index.php)
-   vB3 General Discussions (https://vborg.vbsupport.ru/forumdisplay.php?f=111)
-   -   How to update VB template using product xml file? (https://vborg.vbsupport.ru/showthread.php?t=189661)

vbboarder 08-31-2008 07:02 PM

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 ;)

Opserty 08-31-2008 07:58 PM

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

vbboarder 08-31-2008 08:25 PM

Quote:

Originally Posted by Opserty (Post 1611419)
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.

Marco van Herwaarden 09-01-2008 06:29 AM

Distributing (modified version of) default vB templates with a modification is an absolute No-No.

vbboarder 09-01-2008 03:46 PM

Quote:

Originally Posted by Marco van Herwaarden (Post 1611766)
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.

Marco van Herwaarden 09-02-2008 08:50 AM

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).

vbboarder 09-02-2008 11:28 PM

Quote:

Originally Posted by Marco van Herwaarden (Post 1612631)
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?

Opserty 09-02-2008 11:45 PM

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. ;)

Marco van Herwaarden 09-03-2008 01:33 PM

Quote:

Originally Posted by vbboarder (Post 1613183)
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.


All times are GMT. The time now is 10:23 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.01028 seconds
  • Memory Usage 1,731KB
  • 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
  • (5)bbcode_quote_printable
  • (1)footer
  • (1)gobutton
  • (1)header
  • (1)headinclude
  • (6)option
  • (1)post_thanks_navbar_search
  • (1)printthread
  • (9)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