форум vBSupport.ru > vBulletin > Old vB versions (3.0.x & 2.x.x) > vBulletin 3.6.x > Hacks, mods and scripts [3.6.x]
Register Меню vBsupport Изображения Files Manager О рекламе Today's Posts Search
  • Родная гавань
  • Блок РКН снят
  • Premoderation
  • For English speaking users
  • Каталог Фрилансеров
  • If you want to buy some product or script
  • Администраторам
VBsupport перешел с домена .ORG на родной .RU Ура! Пожалуйста, обновите свои закладки - VBsupport.ru
Блок РКН снят, форум доступен на всей территории России, включая новые терртории, без VPN
На форуме введена премодерация ВСЕХ новых пользователей

Почта с временных сервисов, типа mailinator.com, gawab.com и/или прочих, которые предоставляют временный почтовый ящик без регистрации и/или почтовый ящик для рассылки спама, отслеживается и блокируется, а так же заносится в спам-блок форума, аккаунты удаляются
for English speaking users:
You may be surprised with restriction of access to the attachments of the forum. The reason is the recent change in vbsupport.org strategy:

- users with reputation < 10 belong to "simple_users" users' group
- if your reputation > 10 then administrator (kerk, Luvilla) can decide to move you into an "improved" group, but only manually

Main idea is to increase motivation of community members to share their ideas and willingness to support to each other. You may write an article for the subject where you are good enough, you may answer questions, you may share vbulletin.com/org content with vbsupport.org users, receiving "thanks" equal your reputation points. We should not only consume, we should produce something.

- you may:
* increase your reputation (doing something useful for another members of community) and being improved
* purchase temporary access to the improved category:
10 $ for 3 months. - this group can download attachments, reputation/posts do not matter.
20 $ for 3 months. - this group can download attachments, reputation/posts do not matter + adds eliminated + Inbox capacity increased + files manager increased permissions.

Please contact kerk or Luvilla regarding payments.

Important!:
- if your reputation will become less then 0, you will be moved into "simple_users" users' group automatically.*
*for temporary groups (pre-paid for 3 months) reputation/posts do not matter.
Уважаемые пользователи!

На форуме открыт новый раздел "Каталог фрилансеров"

и отдельный раздел для платных заказов "Куплю/Закажу"

Если вы хотите приобрести какой то скрипт/продукт/хак из каталогов перечисленных ниже:
Каталог модулей/хаков
Ещё раз обращаем Ваше внимание: всё, что Вы скачиваете и устанавливаете на свой форум, Вы устанавливаете исключительно на свой страх и риск.
Сообщество vBSupport'а физически не в состоянии проверять все стили, хаки и нули, выкладываемые пользователями.
Помните: безопасность Вашего проекта - Ваша забота.
Убедительная просьба: при обнаружении уязвимостей или сомнительных кодов обязательно отписывайтесь в теме хака/стиля
Спасибо за понимание
 
 
 
 
ssmol
Специалист
 
ssmol's Avatar
Default Plugin Based Template Cache
1

The use of the code modification "Vbulletin Plugin Accelerator" is not recommended when using this plugin (and I recommend not using it AT ALL)!

UPGRADE

1. DISABLE THE PRODUCT (Plugin System -> Manage Products -> Plugin Based Template Cache -> Disable)
2. CLEAR THE templates/ folder. Double check there aren't any new files created.
3. UPLOAD the new template_cache.php
4. IMPORT the new product.xml (Allow Overwrite: YES)
5. ENABLE the product

INFO

Installation:

1. Create a directory templates in your forum directory then chmod 777 it. This is there were the cache files are going to be created so it needs to be writeable by PHP. You can skip the "chmod 777" step if your host is running SuEXEC or a smiliar product (ask your host when in doubt).
2. Upload template_cache.php to your forum directory.
3. Upload index.txt to the templates directory and rename to index.html (can't upload .html files here, it's just an empty file too)
4. Install the product.xml

So you should end up with:
-/home/.../forums/templates/
-/home/.../forums/templates/index.html
-/home/.../forums/template_cache.php
-Installed Products: Plugin Based Template Cache 1.0.2

5. vBulletin Options -> vBulletin Options -> Plugin Based Template Cache -> Modify the settings (especially enabling it).

Deinstallation

1. Remove the product
2. Check the 4 plugins of this product are gone
3. Clear the templates/ folder and make sure no new files are created
4. Delete the templates/ folder
5. Delete template_cache.php
6. Clear your PHP cache if you are using any.

What it does:

1. Replace the function cache_templates() (global.php:337) with a new function. Instead of fetching the templates from the database it checks first if there is a file containing all the needed templates first, if not, it grabs them and saves them to a new file. The file name is md5([all the template ids]). Done using the hook "cache_templates".

2. There is an option to have certain templates saved seperatly to its own .php file. With a big of PHP magic we avoid the eval() call for those, and when you're using a PHP cache like APC/eAccelerator this can lead to a huge performance improvement because you save both the eval() call and the parsing.

3. Automatically clears the cache when modifying or inserting templates, done using the hook admin_global and a check of $_GET, and also clearing when modifying the options.

EEK my folder keeps growing as people browse my board

Yes, this is intentional. The cache files only get created when they are needed the first time. My folder get a new file after two days, that is not unusual. The folder can get several megabytes in size, mine is 4mb (default installation, no plugins/hacks). If you have new templates/styles and several plugins it can get 10-20mb no problem.

APC/PHP caches

Especially good with APC, the cached template files are picked up by APC, so you save 1 database call on every site (without getting a file access). It is recommended to use a PHP cache with this plugin. This plugin is also aimed at larger vB installations.

"Beta"

I have only tried it on my installation, so I'd like to get some feedback. I don't guarantee it to work, but there is no source file modification involved, or special database queries, so it won't affect your installation in ANY way. Remove the product (or disable the four plugins) and there will be no traces left in your vB installation.

Support

I'm trying to read this thread and reply to problems. But I'm not going to even look at your problem if you're not running 3.5.latest without source modifications, and I'm not going to fix problems with this product that occur when using other products/addons/source modifications. (Well I still might, but that's my decision.)

Modification

You are free to use any part of this code for your own use or create a new addon/hack/extension out of it.

UPDATES

29th May: Fixed a typo in template_cache.php that might prevent the clearing of the templates/ folder when using a custom path for the templates folder.
10th May: 1.0.3, Added an option to set the path to the templates/ folder in the admincp. No need to upgrade if you don't need this.
21th April: 1.0.2, I hope this version actually works, I have to fix my PHP error reporting and why didn't vbulletin.org send me notification emails!?
20th April: 1.0.1, I added several admins settings, so you can change the settings without having to edit PHP files.
18th April: Added a new beta, template_cache.beta.php, if you want to try it rename it to template_cache.php and follow the steps to update (at the beginning of this post).
14th April: Updated template_cache.php (exluding index.html from being deleted), added index.txt (.html).
Attached Files
File Type: rar template_cache.rar (2.5 KB, 21 views)
Bot
Yandex Bot Yandex Bot is online now
 
Join Date: 05.05.2005
Реклама на форуме А что у нас тут интересного? =)
 


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




All times are GMT +4. The time now is 10:12 AM.


Powered by vBulletin® Version 3.6.9
Copyright ©2000 - 2024, Jelsoft Enterprises Ltd.