Go Back   vb.org Archive > vBulletin Modifications > Archive > vB.org Archives > General > Member Archives
FAQ Community Calendar Today's Posts Search

Reply
 
Thread Tools
Details »»

Version: , by Fryzid (Guest)
Developer Last Online: Jan 1970 Show Printable Version Email this Page

Version: Unknown Rating:
Released: 05-01-2001 Last Update: Never Installs: 0
 
No support by the author.

To compare templates easily I'd like to have a script that will save each template of a style to a textfile named like the template or even something like styelid_templatename.txt.

I think its easier to update modified or translated templates when you can use a comparison tool like BeyondCompare for example.

Perhaps someone has got the time to make this script. I don't have it right now.

Thanks.

Show Your Support

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

Comments
  #12  
Old 05-13-2001, 01:55 PM
Fryzid
Guest
 
Posts: n/a
Default

this function is not in previous vb versions. so try this script
PHP Code:
<?php

require("./global.php");
$noheader=1;

cpheader();

//echo "Writing templates into Files:<br><br>";

   //set these vars
   
$templatesetid "-1"// -1 for master, any other number for the templateset you want to save
   
$pfad ""// leave empty or any name for the dir you want to save the templates to. don't forget to create the dir and chmod 777 it on *nix systems before running this script if php isn't allowed to create dirs


   
$tempsetid $templatesetid;
   
$templates $DB_site->query("SELECT templatesetid,templateid,template,title FROM template WHERE templatesetid=$tempsetid");
   if (
$pfad==""$pfad $tempsetid;
   if (
file_exists("$pfad")) {
      echo 
"Directory ./$pfad exists!";
   } else {
      echo 
"Directory ./$pfad doesn't exist! Being created...<br>";
      
mkdir("$pfad"0777);
      
//echo "Directory ./$pfad was created!<br>";
   
}

   while (
$template=$DB_site->fetch_array($templates)) {

      
//echo "Write ./$tempsetid/$template[title]<br>****************************<br>";
    
      
$templatefile=fopen("./$pfad/$template[title]","w");
      
fwrite($templatefile,$template[template]);
      
fclose($templatefile);
   }

   echo 
"<br>All Files have been successfully created in $pfad !";

cpfooter();
?>
i hope this will do it.
Reply With Quote
  #13  
Old 05-13-2001, 05:01 PM
Streicher Streicher is offline
 
Join Date: Oct 2001
Location: Reinbek, Germany
Posts: 62
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

Can a moderator move this thread to the Releases-Forum
Reply With Quote
  #14  
Old 05-27-2001, 08:50 AM
Streicher Streicher is offline
 
Join Date: Oct 2001
Location: Reinbek, Germany
Posts: 62
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

*bump* Can this hack be moved to the other releases please. This hack would be helpful for other members.
Reply With Quote
  #15  
Old 05-27-2001, 12:00 PM
wacnstac wacnstac is offline
 
Join Date: Nov 2001
Posts: 312
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

Yes indeed it would!
Reply With Quote
  #16  
Old 10-21-2001, 04:02 PM
wacnstac wacnstac is offline
 
Join Date: Nov 2001
Posts: 312
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

Does this hack work with 2.03 or is it incompatible? I need to compare the new 2.03 templates with my old 2.01 templates. The hack seems to wirte my old 2.01 templates out fine, but the 2.03 templates never seem to get written out....
Reply With Quote
  #17  
Old 10-21-2001, 07:42 PM
pogo's Avatar
pogo pogo is offline
 
Join Date: Oct 2001
Posts: 74
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

It works fine for me.
Reply With Quote
  #18  
Old 10-21-2001, 07:52 PM
wacnstac wacnstac is offline
 
Join Date: Nov 2001
Posts: 312
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

Ok, thanks.
Reply With Quote
  #19  
Old 11-02-2001, 10:03 PM
Thomas P's Avatar
Thomas P Thomas P is offline
 
Join Date: Oct 2001
Location: Munich, DE
Posts: 365
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

Works great with 2.2.0 and wayne's hint to create and chmod a dir before calling the script...
Veeery useful
-Tom
Reply With Quote
  #20  
Old 11-03-2001, 07:05 AM
Admin's Avatar
Admin Admin is offline
Coder
 
Join Date: Oct 2023
Location: Server
Posts: 1
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

I'm thinking about writing a piece of code that can:
a) Write all templates to text files (kinda like this)
and more important
b) Can read all templates from text files and update database accordingly.

Why?
This would be great for upgrading. You can make two folders, one of the new templates (let's say the original v2.2.0 template), and another one for your customized template (let's say your own v2.0.3 template).
Now you can use something like Araxis or Beyond Compare to compare the files, update, and save everything to the database with ease!
Reply With Quote
  #21  
Old 11-14-2002, 08:23 PM
Dynamic One's Avatar
Dynamic One Dynamic One is offline
 
Join Date: Nov 2001
Location: Somewhere on the net
Posts: 64
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

Thanks for this handy tool (hack) m8.
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 05:06 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.08508 seconds
  • Memory Usage 2,323KB
  • Queries Executed 26 (?)
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)bbcode_php
  • (1)footer
  • (1)forumjump
  • (1)forumrules
  • (1)gobutton
  • (1)header
  • (1)headinclude
  • (1)modsystem_post
  • (1)navbar
  • (6)navbar_link
  • (120)option
  • (1)pagenav
  • (1)pagenav_curpage
  • (2)pagenav_pagelink
  • (11)post_thanks_box
  • (11)post_thanks_button
  • (1)post_thanks_javascript
  • (1)post_thanks_navbar_search
  • (11)post_thanks_postbit_info
  • (10)postbit
  • (9)postbit_onlinestatus
  • (11)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
  • bbcode_parse_start
  • bbcode_parse_complete_precache
  • bbcode_parse_complete
  • postbit_display_complete
  • post_thanks_function_can_thank_this_post_start
  • postbit_imicons
  • pagenav_page
  • pagenav_complete
  • tag_fetchbit_complete
  • forumrules
  • navbits
  • navbits_complete
  • showthread_complete