vb.org Archive

vb.org Archive (https://vborg.vbsupport.ru/index.php)
-   vBulletin 3.5 Add-ons (https://vborg.vbsupport.ru/forumdisplay.php?f=113)
-   -   Easy Template Update (https://vborg.vbsupport.ru/showthread.php?t=102416)

Andreas 12-06-2005 10:00 PM

Easy Template Update
 
Easy Template Update

Description
This Hack helps you to update your templates, by allowing you to semi-automatically merge changes into your templates.

Details
1 Product XML (5 Phrases)

This Hack is unsupported! All support requests except proved Bugs will be ignored.

D|ver 12-07-2005 12:18 PM

sounds great, thanks :)

michaelbenson 12-07-2005 12:22 PM

So, this hack allows templates to merge into one another?
Sorry i dont quite understand the description.

AshokForums.com 12-07-2005 01:43 PM

Nice!! Thanks a lot.. I hope this solves my problem..

Jenta 12-07-2005 02:12 PM

Since your a developer now, I hope to see this as standard soon. ;)
I always thought to myself while using comparision utilities that vb should mimic the merging function. Great to see you pulled it off. My only dissappointment is that you would mainly use this when upgrading and that's when your php files are stock...no fault of yours ofcourse.
Good job!

Andreas 12-07-2005 02:31 PM

I could have done it as a separate file, but that would have required duplicated a bunch of code.

Princeton 12-07-2005 02:35 PM

great idea!

thank you

SuperFly 12-07-2005 03:27 PM

When i click save template it takes me to template.php with bg of admincp but blank.

Mastar 12-07-2005 04:09 PM

I'm glad I read this before I actually started cause I am about to update them. Hope this makes it easier because I have 49 templates to update.

1 Question, how do I use it?

Guest190829 12-07-2005 04:10 PM

I will definitely try this out, I still have 2 out of 5 upgrades to do...and this seems like the answer to all that tedious work. :)

Mastar 12-07-2005 04:27 PM

will I have to edit my templates for the hacks that are already installed on my forum?

do I click in the merge boxes to update?

:Judge: 12-07-2005 09:35 PM

Installed but I do not see any change? What exactly should I be looking for?

I can see that this is unsupported, however, if I install it and have no obvious change I have to ask. Could anyone maybe shed some light on this for me please.

ImportPassion 12-08-2005 01:43 AM

ok, i was starting to install this when I noticed the last step.

the last step would end up looking like this...

PHP Code:

// #############################################################################
// insert queries and cache rebuilt for template insertion
if ($_POST['do'] == 'inserttemplate')
{

if (
$_POST['do'] == 'merge')
{  ...
more code here ... 

how can "do" be both of those at the same time? Or am I reading it wrong?

I believe it should say "ABOVE" not "BELOW"
D

DS MrSinister 12-08-2005 01:48 AM

sweet thanks m8!

ImportPassion 12-08-2005 01:53 AM

Quote:

Originally Posted by :Judge:
Installed but I do not see any change? What exactly should I be looking for?

I can see that this is unsupported, however, if I install it and have no obvious change I have to ask. Could anyone maybe shed some light on this for me please.

I agree. Are we supposed to upload the new changed style and compare with our current style templates? :ermm:

ImportPassion 12-08-2005 02:19 AM

Think i figured it out...

go to

Find Updated Templates > View History and compare the versions

C_P 12-08-2005 02:31 AM

Quote:

Originally Posted by 7thgenCivic.Com
Think i figured it out...

go to

Find Updated Templates > View History and compare the versions

I did this, I selected merge, each button disapeared after selecting. I then selected to save merged and it then went to a blank screen. I then went back and the same navbar in the style I was merging (because it still shows the same amount of styles to be reverted) was still there and showed I could merge again and again and again....
I am wondering if maybe after the merge, we need to copy the code, then revert the stlyle section then paste the merged code over the reverted section of style?

ImportPassion 12-08-2005 02:37 AM

Quote:

Originally Posted by C_P
I did this, I selected merge, each button disapeared after selecting. I then selected to save merged and it then went to a blank screen. I then went back and the same navbar in the style I was merging (because it still shows the same amount of styles to be reverted) was still there and showed I could merge again and again and again....
I am wondering if maybe after the merge, we need to copy the code, then revert the stlyle section then paste the merged code over the reverted section of style?

u need to do the fix in my post here https://vborg.vbsupport.ru/showpost....6&postcount=13

Mastar 12-08-2005 03:16 AM

Quote:

Originally Posted by 7thgenCivic.Com
ok, i was starting to install this when I noticed the last step.

the last step would end up looking like this...

PHP Code:

// #############################################################################
// insert queries and cache rebuilt for template insertion
if ($_POST['do'] == 'inserttemplate')
{

if (
$_POST['do'] == 'merge')
{  ...
more code here ... 

how can "do" be both of those at the same time? Or am I reading it wrong?

I believe it should say "ABOVE" not "BELOW"
D

1.Can you show how it suppose to look like? 7thgenCivic.

2. And will I have to edit my templates for the hacks to work or the merge will instert the coding for the hacks? I got 49 templates that it says to be updated.

ImportPassion 12-08-2005 03:22 AM

I don't want to post too much code, but it should say this..


Quote:


FIND
------------------------------------------------------------
// ################################################## ###########################
// insert queries and cache rebuilt for template insertion
if ($_POST['do'] == 'inserttemplate')
{
------------------------------------------------------------

ABOVE that ADD
------------------------------------------------------------
if ($_POST['do'] == 'merge')
{
--snip--

C_P 12-08-2005 01:19 PM

Quote:

Originally Posted by 7thgenCivic.Com
u need to do the fix in my post here https://vborg.vbsupport.ru/showpost....6&postcount=13

Thank you for reply! I did your edit but after selecting all the merge buttons and saving merge, it takes me to next page stating:
Please Complete All Required Fields
I have confirmed ALL buttons were checked so what am I missing?
Ooops wait... I may have missed something...

*Update, yup, I only pasted partial code you put rather than the entire code Andrea did and it works!!!!
Thank you!

C_P 12-08-2005 01:42 PM

Not sure why, but it looks like this is almost acting like a revert as I am losing template modifications that were done like thank you posts mod after doing the merge...

Mastar 12-08-2005 02:17 PM

Quote:

Originally Posted by C_P
Thank you for reply! I did your edit but after selecting all the merge buttons and saving merge, it takes me to next page stating:
Please Complete All Required Fields
I have confirmed ALL buttons were checked so what am I missing?
Ooops wait... I may have missed something...

*Update, yup, I only pasted partial code you put rather than the entire code Andrea did and it works!!!!
Thank you!

Same thing here!

Mastar 12-08-2005 02:18 PM

Quote:

Originally Posted by C_P
Not sure why, but it looks like this is almost acting like a revert as I am losing template modifications that were done like thank you posts mod after doing the merge...

That is exactly what I don't want happen. I got too many hack on my board.

Mastar 12-08-2005 06:05 PM

Quote:

Originally Posted by mini2
Are you checking the checkboxes to the right of the comparison/history page, and making sure the "new" templates looks right before you save merged?

I've used this now, and it's brilliant.

:D

Did you loose any of your hacks or had to edit the hacks back in your templates?

DID YOU DO THE EDIT ABOVE?

Mastar 12-08-2005 06:08 PM

Quote:

Originally Posted by mini2
Nope, I think you just have to be careful what you do and don't decide to "merge".

So how did you did your's?

C_P 12-08-2005 06:13 PM

Quote:

Originally Posted by mini2
Are you checking the checkboxes to the right of the comparison/history page, and making sure the "new" templates looks right before you save merged?

I've used this now, and it's brilliant.

:D

I did but I am not a coder to know what should or should not be merged. I was "assuming" the merge process would merge your sections of old code to the new so there was no need to re-add this code to new section of styles changed... obviously I was mistaken and will not use this now. Oh well.

Mastar 12-08-2005 06:26 PM

I found where I went wrong,

I placed:
Code:

  $_POST['do'] = 'merge';
}

above this:

Code:

// #############################################################################
// generate a diff between two templates (current or historical versions)
if ($_REQUEST['do'] == 'viewversion')

Instead of this:
Code:

// #############################################################################
// generate a diff between two templates (current or historical versions)
if ($_POST['do'] == 'docompare')
{

So now it looks like this:

Code:

if ($_POST['do'] == 'docompare' AND !empty($_POST['domerge']))
{
  $_POST['do'] = 'merge';
}
// #############################################################################
// generate a diff between two templates (current or historical versions)
if ($_POST['do'] == 'docompare')
{
  $vbulletin->input->clean_array_gpc('p', array(
    'left_template' => TYPE_STR,
    'right_template' => TYPE_STR,
    'wrap' => TYPE_BOOL
  ));



So it works!

Can someone verify what I wrote?

C_P 12-08-2005 06:35 PM

Quote:

and with the template merging I had to switch the radio buttons from my tempate being 'new to 'old' and then merge.
Now, that is an interesting statement. What you are saying is you should change the default new old option when you look at history making 3.5.2 the new and (in my case) 3.5.1 the old?

Mastar 12-09-2005 08:09 AM

Quote:

Originally Posted by C_P
Now, that is an interesting statement. What you are saying is you should change the default new old option when you look at history making 3.5.2 the new and (in my case) 3.5.1 the old?

Sorry don't change the radio buttons and basically merge the peach and yellow codes and leave the green.

It works and its easy!

k40tic 12-09-2005 02:02 PM

This worked great for me. No trouble at all and the skin updates were super fast.

divided_by_fear 12-10-2005 06:52 AM

i like the mod dont get me wrong but what would be nice to see is a check box next to each difference it found this way you can select which merges you want to install and which you dont... this way you can test each hack out as you merge it and so on... and it would also i think be more user friendly that way

ImportPassion 12-10-2005 12:55 PM

Quote:

Originally Posted by divided_by_fear
i like the mod dont get me wrong but what would be nice to see is a check box next to each difference it found


ummm....that's exactly what it does.

klaush 12-10-2005 01:48 PM

Thanks, a helpful tool!

divided_by_fear 12-10-2005 02:07 PM

opps i posted it under the wrong one... cause there is already a hack like this https://vborg.vbsupport.ru/showthread.php?t=91038 which has alot more options just missing that

Xplorer4x4 12-11-2005 01:19 AM

Quote:

Originally Posted by divided_by_fear
opps i posted it under the wrong one... cause there is already a hack like this https://vborg.vbsupport.ru/showthread.php?t=91038 which has alot more options just missing that

Actually its nothing like this. That bassicly just coppies all the indidual templates of one style to every or select styles. Using that means you would not be adding the apropriate template changes form the update.

This comapres the old template with the new template and merges the non-standard lines of code and html to the new templates that have the up date tmeplate fixes. ;)

divided_by_fear 12-11-2005 05:35 AM

nah you can compare the old to the new it just dont have the check box next to the changes... it really has alot more featurtes in that one... but i aint saying which is better im just saying i put it in the wrong spot

MrNase 12-12-2005 12:19 PM

I made the update from vB3.5.1 to 3.5.2 and I wanted to use this modification to ease my work a bit..

I have the old one to the left and the new template to the right and I want to copy the changes from left to right but the new template (updated to have my old changes) is still listed as 'old' :(

waza 12-12-2005 02:21 PM

Andreas, thx for this wonderful hack, it's not big, but it spares me big work!

@mrnase: You should be able to choose old/new template...

Mastar 12-12-2005 03:00 PM

Quote:

Originally Posted by MrNase
I made the update from vB3.5.1 to 3.5.2 and I wanted to use this modification to ease my work a bit..

I have the old one to the left and the new template to the right and I want to copy the changes from left to right but the new template (updated to have my old changes) is still listed as 'old' :(

Don't merge everything, not the ones in green!


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.01347 seconds
  • Memory Usage 1,838KB
  • 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
  • (4)bbcode_code_printable
  • (2)bbcode_php_printable
  • (16)bbcode_quote_printable
  • (1)footer
  • (1)gobutton
  • (1)header
  • (1)headinclude
  • (6)option
  • (1)pagenav
  • (1)pagenav_curpage
  • (1)pagenav_pagelink
  • (1)post_thanks_navbar_search
  • (1)printthread
  • (40)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
  • pagenav_page
  • pagenav_complete
  • bbcode_fetch_tags
  • bbcode_create
  • bbcode_parse_start
  • bbcode_parse_complete_precache
  • bbcode_parse_complete
  • printthread_post
  • printthread_complete