VBsupport перешел с домена .ORG на родной .RU
Ура!
Пожалуйста, обновите свои закладки - VBsupport.ru
Блок РКН снят, форум доступен на всей территории России, включая новые терртории, без VPN
На форуме введена премодерация ВСЕХ новых пользователей
Почта с временных сервисов, типа mailinator.com, gawab.com и/или прочих, которые предоставляют временный почтовый ящик без регистрации и/или почтовый ящик для рассылки спама, отслеживается и блокируется, а так же заносится в спам-блок форума, аккаунты удаляются
Если вы хотите приобрести какой то скрипт/продукт/хак из каталогов перечисленных ниже: Каталог модулей/хаков
Ещё раз обращаем Ваше внимание: всё, что Вы скачиваете и устанавливаете на свой форум, Вы устанавливаете исключительно на свой страх и риск.
Сообщество vBSupport'а физически не в состоянии проверять все стили, хаки и нули, выкладываемые пользователями.
Помните: безопасность Вашего проекта - Ваша забота. Убедительная просьба: при обнаружении уязвимостей или сомнительных кодов обязательно отписывайтесь в теме хака/стиля
Спасибо за понимание
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).