1
karuna
Re: Xoops overloading my Server
  • 2005/5/11 5:34

  • karuna

  • Not too shy to talk

  • Posts: 171

  • Since: 2002/5/29


turn on the mysql&block debug to see where these queries come from



2
karuna
Re: Xoops overloading my Server
  • 2005/4/22 7:17

  • karuna

  • Not too shy to talk

  • Posts: 171

  • Since: 2002/5/29


Quote:

Skythe wrote:
Thanks guys. Im gonna sit tight and wait till my hosts tells me what the situation is now before making any more changes. And loading speed of the pages is better than ever now anyway.

But looks like the caching has created a new problem.

Forum cache is set to 1 hour. Ive just posted 4 times in different threads and while I could see the first 3 posts after posting them, when I posted the 4th, it wouldnt appear at the bottom of the page. I reloaded the page, went back to the other threads, and all 4 posts are gone.

use phppp's update cache on change hack



3
karuna
Re: Xoops overloading my Server
  • 2005/4/20 19:27

  • karuna

  • Not too shy to talk

  • Posts: 171

  • Since: 2002/5/29


maybe u have also to cache newbb for 30 second.

newbb use a lot of query.

u can turn on mysql/block debug to see how many queries a page cost. cache these page which have too many queries.

however i think the XOOPS should cache some config or store some config in file (like XOOPS 1.x).

use phppp's update cache on change hack will have some help.

there's another hack will reduce query.

cache XOOPS and module config. but it's in Chinese

https://xoops.org.cn/modules/newbb/viewtopic.php?topic_id=2072&viewmode=flat&order=DESC&start=20 (config cache)

http://my.ppfans.com/module.php.txt (module config cache)



4
karuna
Re: User
  • 2005/3/26 23:14

  • karuna

  • Not too shy to talk

  • Posts: 171

  • Since: 2002/5/29


ask ur host admin to add the max_questions limit value.(or abolish this limit)

and cache the modules & blocks will also reduce the sql query.

or....change a host~~



5
karuna
let each censor word have it's own replace word
  • 2005/2/22 19:06

  • karuna

  • Not too shy to talk

  • Posts: 171

  • Since: 2002/5/29


run sql via phpmyadmin
UPDATE `xoops_config` SET `conf_formtype` = 'textarea', `conf_valuetype` = 'array' WHERE `conf_name` = 'censor_replace'


modife the file kenerl/config.php
about line 221
change
if (is_array($configs)) {
                foreach (
array_keys($configs) as $i) {
                    
$ret[$configs[$i]->getVar('conf_name')] = $configs[$i]->getConfValueForOutput();
                }
            }

to

if (is_array($configs)) {
               foreach (
array_keys($configs) as $i) {
                if(
$configs[$i]->getVar('conf_name') == 'censor_words'){
                    
$temp = array();
                    foreach(
$configs[$i]->getConfValueForOutput() as $j)
                        
$temp[] = "|$j|siU";
                    
$ret[$configs[$i]->getVar('conf_name')] = $temp;
                } else {
                       
$ret[$configs[$i]->getVar('conf_name')] = $configs[$i]->getConfValueForOutput();
                }
               }
        }


class/module.textsanitizer.php

about line 360
change function &censorString(&$text){....}
to
function &censorString(&$text)
    {
        if (!isset(
$this->censorConf)) {
            
$config_handler =& xoops_gethandler('config');
            
$this->censorConf =& $config_handler->getConfigsByCat(XOOPS_CONF_CENSOR);
        }
        if (
$this->censorConf['censor_enable'] == 1) {            
            
$replacements $this->censorConf['censor_replace'];
            
$patterns $this->censorConf['censor_words'];
            
$text preg_replace($patterns$replacements$text);
        }
           return 
$text;
    }




then u should enter the replace words also use the aaa|bbb format.



6
karuna
Re: passing database information to another config file??
  • 2005/2/18 7:38

  • karuna

  • Not too shy to talk

  • Posts: 171

  • Since: 2002/5/29


hi u should include "../../mainfile.php"



7
karuna
Re: Protecting text from being copied?
  • 2005/1/4 16:23

  • karuna

  • Not too shy to talk

  • Posts: 171

  • Since: 2002/5/29


some not regular words contain ur copyright having the same color as the bgcolor in the interline may help a little.

but be careful it maybe conside as cheating by search engine.



8
karuna
Re: Hide Blocks @ Forum
  • 2005/1/3 13:50

  • karuna

  • Not too shy to talk

  • Posts: 171

  • Since: 2002/5/29


oh sorry that variable is not valid in theme.html

i think some other smarty varialbe that will only appear in newbb. such like {$img_locked}.

however i haven't try it..



9
karuna
Re: Partners -> description
  • 2005/1/3 13:37

  • karuna

  • Not too shy to talk

  • Posts: 171

  • Since: 2002/5/29


$myts =& MyTextSanitizer::getInstance();
foreach ( $partners as $part_obj ) {
$array_partners[] = array(
"id" => $part_obj->getVar("id"),
"hits" => $part_obj->getVar("hits"),
"url" => $part_obj->getVar("url"),
"image" => $part_obj->getVar("image"),
"title" => $part_obj->getVar("title"),
"description" => $myts->makeTareaData4Show($part_obj->getVar("description"),0,1,1)
);
}



hi try this in index.php about line 58



10
karuna
Re: Hide Blocks @ Forum
  • 2005/1/3 13:22

  • karuna

  • Not too shy to talk

  • Posts: 171

  • Since: 2002/5/29


maybe u can modify the theme to achieve this.

just like this
<{if <{$xoopsModule}> == "newbb"}>
<!--left block begin -->
<tr>
<td>
...
</td>
</tr>
<!--end left block-->
<{/if}>

i forgot if the <{$xoopsModule}> variable exist or i spell it correctly.




TopTop
(1) 2 3 4 ... 16 »



Login

Who's Online

229 user(s) are online (140 user(s) are browsing Support Forums)


Members: 0


Guests: 229


more...

Donat-O-Meter

Stats
Goal: $100.00
Due Date: Apr 30
Gross Amount: $0.00
Net Balance: $0.00
Left to go: $100.00
Make donations with PayPal!

Latest GitHub Commits