Go Back   vb.org Archive > vBulletin Modifications > Archive > Modification Graveyard
FAQ Community Calendar Today's Posts Search

Reply
 
Thread Tools
Plugin Based Template Cache Details »»
Plugin Based Template Cache
Version: 1.0.3, by orban orban is offline
Developer Last Online: Oct 2012 Show Printable Version Email this Page

Category: Board Optimization - Version: 3.5.4 Rating:
Released: 04-13-2006 Last Update: Never Installs: 55
Uses Plugins
Additional Files  
No support by the author.

3.6 Thread for Support

https://vborg.vbsupport.ru/showthread.php?t=121876

Show Your Support

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

Comments
  #132  
Old 04-28-2006, 11:16 PM
Boofo's Avatar
Boofo Boofo is offline
 
Join Date: Mar 2002
Location: Des Moines, IA (USA)
Posts: 15,776
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

Quote:
Originally Posted by orban
No you don't?
Ok, I think I see what you are saying. Instead of coming from the bottom up you go from the top down sort of thing. Yes, that would probably work for that one hack, unless, like you stated before, someone didn't have a navbar. But in the User CP Signature hack I just released yesterday, although it is in almost the same spot, you couldn't do it like you are saying.

vBShout is another one that wouldn't work like you mentioned. A lot of authors are doing the search and replace now so alot of the future hacks won't work. One way you could do it is check a hack and see what template needs to be excluded and add that in your hack as a default setting if they have that hack installed. But then, that would mean more work for you.
Reply With Quote
  #133  
Old 04-29-2006, 10:11 AM
orban orban is offline
 
Join Date: Jan 2005
Posts: 445
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

Okay you're right. But I don't see what's so bad about adding a $whatever_plugin_name to some template, you can even choose then where exactly you want to add the plugin.

But to be honest, this plugin is actually for bigger boards (you probably won't notice any different on smaller ones anyway) and on bigger boards you aren't going to install those hack that add several new queries to every page. And a lot of plugins I see here are awful for bigger boards. And if you own a bigger board you most likely know PHP and then it's no problem to fix it or rewrite it. I am more concerned about optimization that a new feature X that slows down my board.

In your new plugin there, why is the signature between new PMs and new subscribed posts? If you added a variable $plugin_signature, a user could choose where to add it, at the top, at end, after new subscribed posts...well, that's my opinion. It will for sure not break anything after a vB upgrade, there is a new feature to compare updated templates to old ones, so you can see what you added, in the worst case you have to add it again.

vBShout uses comments to for its str_replace. Ouch. What about all those template optimizers (they're all usesless anyway if you use gzip, by the way, but that's not the point here ) that remove comments? The comments might be renamed, or removed, or there might be a second one named "<!-- main -->" from your own templates...I just don't think that's too smart. I don't understand why not just add to the installation a template edit where you can add $vbshoutbox wherever you want it to have.
Reply With Quote
  #134  
Old 04-29-2006, 02:07 PM
TECK's Avatar
TECK TECK is offline
 
Join Date: Nov 2001
Location: Canada
Posts: 4,182
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

I installed this mod, looks good. Thanks.
However, I renamed the template_cache file to functions_template_cache.php and made it to be used in /includes folder.
That's where it should be... I could post the changes here, if you want.

I'm new with VB3, kind of old school VB2.
Can you post a Cron Job to delete the eval templates? Or they are supposed to stay there.
Thanks for explaining...

Thanks for this great hack. eAccelerator loves it...
Reply With Quote
  #135  
Old 04-29-2006, 03:38 PM
orban orban is offline
 
Join Date: Jan 2005
Posts: 445
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

Quote:
Originally Posted by TECK
I installed this mod, looks good. Thanks.
However, I renamed the template_cache file to functions_template_cache.php and made it to be used in /includes folder.
That's where it should be... I could post the changes here, if you want.

I'm new with VB3, kind of old school VB2.
Can you post a Cron Job to delete the eval templates? Or they are supposed to stay there.
Thanks for explaining...

Thanks for this great hack. eAccelerator loves it...
Because it saves several templates in one file, and on some pages it might exceed the 255/230 filename lenght.
Reply With Quote
  #136  
Old 04-29-2006, 04:42 PM
Boofo's Avatar
Boofo Boofo is offline
 
Join Date: Mar 2002
Location: Des Moines, IA (USA)
Posts: 15,776
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

Quote:
Originally Posted by orban
Okay you're right. But I don't see what's so bad about adding a $whatever_plugin_name to some template, you can even choose then where exactly you want to add the plugin.

But to be honest, this plugin is actually for bigger boards (you probably won't notice any different on smaller ones anyway) and on bigger boards you aren't going to install those hack that add several new queries to every page. And a lot of plugins I see here are awful for bigger boards. And if you own a bigger board you most likely know PHP and then it's no problem to fix it or rewrite it. I am more concerned about optimization that a new feature X that slows down my board.

In your new plugin there, why is the signature between new PMs and new subscribed posts? If you added a variable $plugin_signature, a user could choose where to add it, at the top, at end, after new subscribed posts...well, that's my opinion. It will for sure not break anything after a vB upgrade, there is a new feature to compare updated templates to old ones, so you can see what you added, in the worst case you have to add it again.

vBShout uses comments to for its str_replace. Ouch. What about all those template optimizers (they're all usesless anyway if you use gzip, by the way, but that's not the point here ) that remove comments? The comments might be renamed, or removed, or there might be a second one named "<!-- main -->" from your own templates...I just don't think that's too smart. I don't understand why not just add to the installation a template edit where you can add $vbshoutbox wherever you want it to have.
Well, it's the same thing with the plug-ins, before they came along. You had to hack a file for the smallest change on your site. Upgrades took forever, especially on bigger boards. Now, upgrades are a breeze for the most part, and even better for larger boards.

Myself, I agree with you on the versatility of adding a line to the template for all of the reasons you stated above and more. But we are getting more and more members here that don't know coding and don't really care to learn. And we are all spoiled now by the plug-in system and we want to do even less to our sites manually. Everything is going automatic, my friend. LOL

Doing the search and replace is more of a learning tool for me than anything else. I'm still new at it and have a lot to learn. But I think it's great when you can install a product in about 2 seconds that used to take you anywhere up to an hour to do the files and template edits, if it was a major hack. Remember Lesane's Store hack?

Sooner or later I expect the template system to get a overhaul just like vb did when we got the plug-in capability added to it. And you have to admit, it does make life a lot easier and less complicated in adding things to your site and upgrading.
Reply With Quote
  #137  
Old 04-29-2006, 05:14 PM
orban orban is offline
 
Join Date: Jan 2005
Posts: 445
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

Upgrades are mainly a breeze because you don't have to edit files anymore, we still have about 10 templates that are edited from the default, even if I moved as much of it to plugins (attaching stuff to existing variables). About 2 of those change after an update but with the new template history things it's easy to update.

I agree that lots of users come here who don't have a clue, but I still don't think that just the "click and forget about it" mentality is good. You should at least check every link in the admincp and try to understand what's going on, and that includes the template system, when you get yourself a copy of vB. Just read the help forums of vb.com, I mean...uh.

If you don't have a clue about anything vB then you shouldn't come here on vB.org because the attitude of certain members is really awful, they except everything they click on to work without any extra work. And then if it breaks you get pages of awful error reports and whines (this is not aimed towards this thread at all, but check some of the more popular addons).

And also I don't care how easy it if for my addon to install or how many users install it, I want to share something I wrote for my own board that was useful for myself. (I'm still using my first version of this plugin by the way, without the admincp options and all that clutter, I just don't need it.)

Yeah I agree, a few "hooks" in the templates would be nice, like $template_hook_GLOBAL_1 or something under the menu, etc, would be awesome and solve this problem. I also honestly thought that vB seperated all different sections into different templates, eg. one for new PMs, one for new threads, one for subs. forums, and so on. Didn't know it was all stuffed in one template.

Well that's my opinion, not saying anybody else must have it.
Reply With Quote
  #138  
Old 04-29-2006, 05:38 PM
Boofo's Avatar
Boofo Boofo is offline
 
Join Date: Mar 2002
Location: Des Moines, IA (USA)
Posts: 15,776
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

Quote:
If you don't have a clue about anything vB then you shouldn't come here on vB.org because the attitude of certain members is really awful, they except everything they click on to work without any extra work. And then if it breaks you get pages of awful error reports and whines (this is not aimed towards this thread at all, but check some of the more popular addons).
That's my point. You are going to get the whining and error reports no matter what you do, if they have to edit one single template even. By doing it for them, that cuts out at least part of the problem. If you'll notice, a lot of the error reports in hacks that search and replace template code is for php coding problems, not install and template problems as much anymore. I'm a firm believer that getting rid of part of the problem is better than not getting rid of any of it at all.

Quote:
I agree that lots of users come here who don't have a clue, but I still don't think that just the "click and forget about it" mentality is good. You should at least check every link in the admincp and try to understand what's going on, and that includes the template system, when you get yourself a copy of vB. Just read the help forums of vb.com, I mean...uh.
And no matter how much you say it to them, they're not going to change. We have spoiled them along the way and now we have to deal with it, I guess.
Reply With Quote
  #139  
Old 04-29-2006, 05:40 PM
orban orban is offline
 
Join Date: Jan 2005
Posts: 445
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

Okay I guess I understand what you mean and I have to agree with you there. This was a nice thread hijack
Reply With Quote
  #140  
Old 04-29-2006, 05:53 PM
Boofo's Avatar
Boofo Boofo is offline
 
Join Date: Mar 2002
Location: Des Moines, IA (USA)
Posts: 15,776
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

Quote:
Originally Posted by orban
Okay I guess I understand what you mean and I have to agree with you there. This was a nice thread hijack
Didn't mean to hijack it, sorry.
Reply With Quote
  #141  
Old 04-29-2006, 05:56 PM
orban orban is offline
 
Join Date: Jan 2005
Posts: 445
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

Haha it's fine, at least it looks now as if this plugin was very popular with 10 pages of comments! And I made the comment about the plugin authors here too, so it's your right
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 01:35 AM.


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.04730 seconds
  • Memory Usage 2,325KB
  • Queries Executed 25 (?)
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
  • (6)bbcode_quote
  • (1)footer
  • (1)forumjump
  • (1)forumrules
  • (1)gobutton
  • (1)header
  • (1)headinclude
  • (1)modsystem_post
  • (1)navbar
  • (4)navbar_link
  • (120)option
  • (1)pagenav
  • (1)pagenav_curpage
  • (4)pagenav_pagelink
  • (2)pagenav_pagelinkrel
  • (11)post_thanks_box
  • (11)post_thanks_button
  • (1)post_thanks_javascript
  • (1)post_thanks_navbar_search
  • (11)post_thanks_postbit_info
  • (10)postbit
  • (11)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
  • 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