vb.org Archive

vb.org Archive (https://vborg.vbsupport.ru/index.php)
-   Modification Graveyard (https://vborg.vbsupport.ru/forumdisplay.php?f=224)
-   -   Board Optimization - Plugin Based Template Cache (https://vborg.vbsupport.ru/showthread.php?t=121876)

mrcrx 10-12-2006 04:00 PM

Im very new at this so how do I chmod 777 a folder since my host said I have to do it. thanks.

orban 10-12-2006 04:04 PM

Do you have FTP or SSH access to your server?

FTP: Right click on the folder and select something like "Properties", "Options", "Permission" and set it to 777.

SSH: chmod 777 /path/to/the/folder

mrcrx 10-12-2006 04:22 PM

ok I did that and everything is working but the shoutbox. I did the mod to it but I dont understand where to put the shoutbox code within the forumhome templete. I would like it where it was on the top. thanks for the quick responce.

orban 10-12-2006 04:25 PM

Ask in the shoutbox thread I didn't make that mod :)

mrcrx 10-12-2006 04:28 PM

LOL thats not good. Whats the reason in post 34 to mod it? should I put it back or is this worth it to try and figure it out.

orban 10-12-2006 04:39 PM

Pardon?

mrcrx 10-12-2006 04:44 PM

Quote:

Originally Posted by orban
Glad to hear!

-----

vBShout:

https://vborg.vbsupport.ru/showthrea...hlight=vbshout

I assume you mean this vBShout version.

Edit the plugin "vBShout [Template Alteration]" and comment out this line:

Code:

$vbulletin->templatecache['FORUMHOME'] = str_replace($Position, $Position . ' $Shoutbox', $vbulletin->templatecache['FORUMHOME']);
Code:

/*$vbulletin->templatecache['FORUMHOME'] = str_replace($Position, $Position . ' $Shoutbox', $vbulletin->templatecache['FORUMHOME']);*/
Then modify the template "FORUMHOME" and add

Code:

$Shoutbox
where you want to have the shoutbox.

This of course disables the placement using the "vBShout Position" option in the admincp.


sorry my questions is, Is the above needed? Right now im running your code without it.

orban 10-12-2006 04:47 PM

If it works then you don't need it...?

Bulent Tekcan 10-16-2006 07:55 PM

Sometimes I received this error

Quote:

Warning: include(/home/xxxx/public_html/satforum/templates/8808.php) [function.include]: failed to open stream: No such file or directory in /includes/class_postbit.php(300) : eval()'d code(1) : eval()'d code on line 1

Warning: include() [function.include]: Failed opening '/home/xxxxx/public_html/satforum/templates/8808.php' for inclusion (include_path='.:/usr/lib/php:/usr/local/lib/php') in /includes/class_postbit.php(300) : eval()'d code(1) : eval()'d code on line 1
This error also create segfault in my system than after this error load goes high load.When this error occured manualy delete include /templates folder.

Normaly this error occured showthread pages...

Thanks

orban 10-16-2006 07:57 PM

Can you try to add a "slam protection"? Like a if (rand()<0.1) or something before locking and creating the file. Let me know if you want me to add it ;)

Might be too many users trying to create the file and/or users accessing parts of template cache when not all files are yet created.

This is of course not a real solution but will just lower the chance it will happen...

For a real solution...m..that's tough.

An option would be to limit the creating of template files to a certain userid, and then you just browse all the pages, so the cache gets created, and only then it will be available for all users....but it's kinda hard to browse all pages. I dunno :(

Line 51 to:

Code:

if (rand() < 0.1 && $vbulletin->options['pbtc_seperate'] && strlen($temp['template']) > intval($vbulletin->options['pbtc_limit']) && !in_array($temp['title'], $exclude)) {
Line 75-81:

Code:

                        if (rand() < 0.1)
                        {
                                $fp = fopen($templatefile, 'w+');
                                if ($fp && flock($fp, LOCK_EX))
                                {
                                        fwrite($fp, '<?php '.$cache_to_save.' ?>');
                                        flock($fp, LOCK_UN);
                                        fclose($fp);
                                }
                        }



All times are GMT. The time now is 11: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.01289 seconds
  • Memory Usage 1,745KB
  • Queries Executed 10 (?)
More Information
Template Usage:
  • (1)ad_footer_end
  • (1)ad_footer_start
  • (1)ad_header_end
  • (1)ad_header_logo
  • (1)ad_navbar_below
  • (5)bbcode_code_printable
  • (2)bbcode_quote_printable
  • (1)footer
  • (1)gobutton
  • (1)header
  • (1)headinclude
  • (6)option
  • (1)pagenav
  • (1)pagenav_curpage
  • (4)pagenav_pagelink
  • (2)pagenav_pagelinkrel
  • (1)post_thanks_navbar_search
  • (1)printthread
  • (10)printthreadbit
  • (1)spacer_close
  • (1)spacer_open 

Phrase Groups Available:
  • global
  • postbit
  • showthread
Included Files:
  • ./printthread.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/class_bbcode_alt.php
  • ./includes/class_bbcode.php
  • ./includes/functions_bigthree.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
  • printthread_start
  • pagenav_page
  • pagenav_complete
  • bbcode_fetch_tags
  • bbcode_create
  • bbcode_parse_start
  • bbcode_parse_complete_precache
  • bbcode_parse_complete
  • printthread_post
  • printthread_complete