Go Back   vb.org Archive > vBulletin Modifications > Archive > vB.org Archives > vBulletin 2.x > vBulletin 2.x Beta Releases
FAQ Community Calendar Today's Posts Search

Reply
 
Thread Tools
Details »»

Version: , by Admin (Coder) Admin is offline
Developer Last Online: Nov 2024 Show Printable Version Email this Page

Version: 2.2.x Rating:
Released: 11-26-2001 Last Update: Never Installs: 0
Is in Beta Stage  
No support by the author.

I'm releasing this as beta because:
  • This has not been tested enough to prove it's working 100%.
  • Your templates aren't something that can be compromised.

In short, what does this hack do:
  • Can write all your templates into files, with any extension you'd like (.html is my favorite), having each template in its own file.
  • Can read from existing template files and save them back to your forum system.
  • Now with option to selectively choose what templates to import / export!

To install:
  • Download the attached ZIP file, extract it and upload do_template.php to your forum admin folder.
  • Go to the file in your browser.
  • If you are not on a Windows server, make sure PHP has permission to write (CHMOD 0777) in the folder you specify.
  • If the folder doesn't exist, PHP will attempt to create it, but you will need write permissions (CHMOD 0777) in the parent folder of it.

Please test this if you can.
If you're trying this out on your real board, it should be safe, but I highly recommend backing up your styles before using it.

This is the place to make suggestions, I expect some!

Show Your Support

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

Comments
  #2  
Old 11-27-2001, 06:40 PM
snyx's Avatar
snyx snyx is offline
 
Join Date: Oct 2001
Location: Vancouver (whistler.2010)
Posts: 556
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

whoa, me likes this concept man!
I will install it on a dummy system asap, and get back to ya!
Reply With Quote
  #3  
Old 11-27-2001, 06:47 PM
Parker Clack Parker Clack is offline
 
Join Date: Oct 2001
Posts: 351
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

Chen:

I just installed it on my server and it works like a champ at downloading them. I haven't try to upload any of them though. It would be cool if you could pick out which ones you would like to import instead of importing them all.

Parker
Reply With Quote
  #4  
Old 11-27-2001, 09:39 PM
SteveK SteveK is offline
 
Join Date: Oct 2001
Location: Seattle, WA USA
Posts: 41
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

I've just tried downloading once in text mode and it works great. Will try other file types and importing later.

How about the ability through the interface to delete previously saved directories of templates. Since the directory and files are written by www, you can't easily remove them via ftp.

Another idea would be the ability to save the templates in a user specified directory besides the forum/admin directory. Best would be below root but don't know if this is possible.

And one more idea would be a drop down box that would allow you to select just a few templates to download vs. a complete dump of all templates.

Okay, just one more idea.... how about being able to zip them up and send the downloaded templates out to us via email?? This is handy as many times I'm not on a system that I can FTP from (due to company proxy settings)

This is a great tool and will make template life much easier!

Steve
Reply With Quote
  #5  
Old 11-28-2001, 04:38 AM
Parker Clack Parker Clack is offline
 
Join Date: Oct 2001
Posts: 351
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

When you import a template do you have to delete the other template first before importing or does it just write over the top of the old one?

I agree that a file that is created that you could download as one big file would be great. What if you wrote it so that all of the information is written to one file, like the style file is, and then you could just import that one file back in.

This is a great idea and I know it will be utilized a lot around the sites with vB.

Thanks again,
Parker
Reply With Quote
  #6  
Old 11-28-2001, 09:37 AM
Admin's Avatar
Admin Admin is offline
Coder
 
Join Date: Oct 2023
Location: Server
Posts: 1
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

[QUOTE]Originally posted by Parker Clack
Chen:

I just installed it on my server and it works like a champ at downloading them. I haven't try to upload any of them though. It would be cool if you could pick out which ones you would like to import instead of importing them all.

Parker
Reply With Quote
  #7  
Old 11-28-2001, 09:44 AM
Admin's Avatar
Admin Admin is offline
Coder
 
Join Date: Oct 2023
Location: Server
Posts: 1
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

[QUOTE]Originally posted by SteveK
I've just tried downloading once in text mode and it works great. Will try other file types and importing later.
To clarify, selecting .zip as the extension won't actually make the files zipped! They will still be in text mode.

How about the ability through the interface to delete previously saved directories of templates. Since the directory and files are written by www, you can't easily remove them via ftp.
That would require either saving all templates folders to the database in a special table, or having a script to go through the server and letting you do stuff with folders.

Another idea would be the ability to save the templates in a user specified directory besides the forum/admin directory. Best would be below root but don't know if this is possible.
AFAIK, you can't CHMOD folders below your public folder. Because of that, PHP won't be able to write to these folders.
TBH I don't really see the need for specifying folders that deep. :stupid:


And one more idea would be a drop down box that would allow you to select just a few templates to download vs. a complete dump of all templates.
Ok, I think I will add some kind of select box you can select templates from. Altough it would be very hard for the user to select all templates he wants, if there are a lot of them.

Okay, just one more idea.... how about being able to zip them up and send the downloaded templates out to us via email?? This is handy as many times I'm not on a system that I can FTP from (due to company proxy settings)
I actually thought of that, and I was sure it's a great idea.
The problem is, not all servers can zip files/folders on the server, because a special module is needed. And most servers don't have this.


This is a great tool and will make template life much easier!

Steve [/B]
Reply With Quote
  #8  
Old 11-28-2001, 09:47 AM
Admin's Avatar
Admin Admin is offline
Coder
 
Join Date: Oct 2023
Location: Server
Posts: 1
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

[QUOTE]Originally posted by Parker Clack
When you import a template do you have to delete the other template first before importing or does it just write over the top of the old one?

I agree that a file that is created that you could download as one big file would be great. What if you wrote it so that all of the information is written to one file, like the style file is, and then you could just import that one file back in.

This is a great idea and I know it will be utilized a lot around the sites with vB.

Thanks again,
Parker
Reply With Quote
  #9  
Old 11-28-2001, 09:49 AM
Admin's Avatar
Admin Admin is offline
Coder
 
Join Date: Oct 2023
Location: Server
Posts: 1
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

To demonstrate what the main intention of this hack is:
Let's say you upgrade from v2 to v3.
So you download your current (modified) v2 templates, and to another folder you download the original v3 templates.
Then you can use something like Beyond Compare or Araxis Merge to compare the two folders, on a file to file basis.
Then when you're done, you just upload the templates back to a folder, and import them back using this script.
Reply With Quote
  #10  
Old 11-28-2001, 12:17 PM
Admin's Avatar
Admin Admin is offline
Coder
 
Join Date: Oct 2023
Location: Server
Posts: 1
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

Ok, so I worked this afternoon about this, and now you have an option to selectively choose which templates to import. (see screen shot)

I'm not working on the same thing for the export process. (which is a bit more complicated than I thought!)

Heh, it took me 20 minutes (and a Google search ) to realize I need to put [] next to the input name when doing:
<select name="blbla[]" multiple>
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 04:02 AM.


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.04975 seconds
  • Memory Usage 2,296KB
  • Queries Executed 23 (?)
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)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
  • (10)post_thanks_box
  • (10)post_thanks_button
  • (1)post_thanks_javascript
  • (1)post_thanks_navbar_search
  • (10)post_thanks_postbit_info
  • (9)postbit
  • (10)postbit_onlinestatus
  • (10)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
  • postbit_imicons
  • bbcode_parse_start
  • bbcode_parse_complete_precache
  • bbcode_parse_complete
  • postbit_display_complete
  • post_thanks_function_can_thank_this_post_start
  • pagenav_page
  • pagenav_complete
  • tag_fetchbit_complete
  • forumrules
  • navbits
  • navbits_complete
  • showthread_complete