vb.org Archive

vb.org Archive (https://vborg.vbsupport.ru/index.php)
-   vB3 Programming Discussions (https://vborg.vbsupport.ru/forumdisplay.php?f=15)
-   -   newbie- edited templates, mods and upgrades (https://vborg.vbsupport.ru/showthread.php?t=248853)

doob 08-18-2010 03:54 AM

newbie- edited templates, mods and upgrades
 
1) If templates like FORUMHOME and navbar have been edited in a template do they revert when performing an upgrade? Or are template edits stored in a style, thus in the database? Basically, if half of the navbar code has been deleted, recoded and then an upgrade from say 3.8.1 to 3.8.6 is performed...will all the custom coding be reverted or broken?

2) Is there a preference in the VB programming community to perform template modifcations via a mod script, or just dive into the individual templates and start hacking? For changing basics like navigation, rearringing the default page layout for things like albums and posts, etc., if we aren't looking to distribute a package to the community, just work on our particular site, is there a preferred way of making changes?

Any input really appreciated!
doob

Lynne 08-18-2010 04:18 AM

1. If you edit a template in a style, it stays edited in an upgrade. It does not get reverted. It also may not get upgraded automatically depending on how much you edited it.

2. Users who aren't comfortable doing edits will want automatic template edits. Those aren't always easy to write or easy to keep valid version to version. Do what is easiest for yourself.

doob 08-18-2010 04:45 AM

We are removing or commenting out a fair amount of code as well.

I took a look at another thread relating to "Automatic Edits" and it looks like the 2 options are

1) just go ahead and make edits to the php and html directly in the templates

2) create plugins for every bit of code you want to insert and then place the plugin name (something like: $plugin) into the appropriate portion of the templates code to call on it.

I don't see how option 2 is universally usefull if the modifications include both adding as well as removing original code.

How would you use a plugin to delete or comment out a section of code in a template?

Also how would you define a "hook".

Thanks again Lynn.


All times are GMT. The time now is 04:59 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.01078 seconds
  • Memory Usage 1,708KB
  • 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
  • (1)footer
  • (1)gobutton
  • (1)header
  • (1)headinclude
  • (6)option
  • (1)post_thanks_navbar_search
  • (1)printthread
  • (3)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