81
karuna
Re: New layout
  • 2004/4/24 16:15

  • karuna

  • Not too shy to talk

  • Posts: 171

  • Since: 2002/5/29


Looks so nice

to catscity

i think the left blocks will also appears in the right but it will below(or above) the right block



82
karuna
Re: My site still cost too much resources :(
  • 2004/4/23 15:33

  • karuna

  • Not too shy to talk

  • Posts: 171

  • Since: 2002/5/29


Thanks

i will try it



83
karuna
Re: My site still cost too much resources :(
  • 2004/4/23 15:26

  • karuna

  • Not too shy to talk

  • Posts: 171

  • Since: 2002/5/29


Quote:

phppp wrote:
cache enabled?


only some html blocks

Because i don't know how to config the cache is proper



84
karuna
Re: My site still cost too much resources :(
  • 2004/4/23 15:24

  • karuna

  • Not too shy to talk

  • Posts: 171

  • Since: 2002/5/29


here is all these hacks to my site

1. show the rank img in the toposter
.#modife the modules/system/blocks/system_blocks.php

add this
$user_rank = $topposters[$i]->rank();
if ( $user_rank['image'] != '' ) {
$user_rank['image'] = '<img src="'.XOOPS_URL.'/uploads/'.$user_rank['image'].'" alt="" />';
$block['users'][$i]['rank_img']=$user_rank['image'];
$block['users'][$i]['rank']=$user_rank;

in function b_system_topposters_show($options)

2. let the images auto fit the table in newbb.

(1). add this function in /include/xoops.js

CODE
//Hack Begin==Add image-autoresizing feature===//
function CaricaFoto(img){
foto1= new Image();
foto1.src=(img);
Controlla(img);
}
function Controlla(img){
if((foto1.width!=0)&&(foto1.height!=0)){
viewFoto(img);
}else{
funzione="Controlla('\"+img+\"')";
intervallo=setTimeout(funzione,20);
}
}
function viewFoto(img){
largh=foto1.width;
altez=foto1.height;
stringa="width="+largh+",height="+altez;
finestra=window.open('','',stringa);
finestra.document.write ("<html><body leftmargin=0 topmargin=0>");
finestra.document.write ("<a href='javascript:this.close()'><img border=0 src=");
finestra.document.write (img);
finestra.document.write ("></a></body></html>");
finestra.document.close();
return false;
}
//Hack End/*/




(2).in /class/module.textsanitizer.php

##find:

CODE
$replacements[] = '<img src="\\3" align="\\2" alt="" />';
$replacements[] = '<img src="\\1" alt="" />';
$replacements[] = '<img src="'.XOOPS_URL.'/image.php?id=\\4" align="\\2" alt="\\4" />';
$replacements[] = '<img src="'.XOOPS_URL.'/image.php?id=\\2" alt="\\3" />';


##replace it with:

CODE

$replacements[] = "<a href='javascript:CaricaFoto(\"\\3\");'><img src='\\3' align='\\2' alt='点击查看大图' border=0 onload=\"JavaScript:if(this.width>screen.width-540)this.width=screen.width-500\" /></a><br>";
$replacements[] = "<a href='javascript:CaricaFoto(\"\\1\");'><img src='\\1' alt='点击查看大图' border=0 onload=\"JavaScript:if(this.width>screen.width-540)this.width=540\" /></a><br>";
$replacements[] = '<img src="'.XOOPS_URL.'/image.php?id=\\4" align="\\2" alt="\\4" />';
$replacements[] = '<img src="'.XOOPS_URL.'/image.php?id=\\2" alt="\\3" />';



##find :

CODE
$patterns[] = "/javascript:/si";
$replacements[] = "java script:";



##move it behand :

CODE

function &xoopsCodeDecode(&$text, $allowimage = 1)
{
$patterns = array();
$replacements = array();


##finish

3. let title show the topic in newbb

in modules\newbb\viewtopic

add

$xoopsTpl->assign('xoops_pagetitle', htmlspecialchars($xoopsModule->name() . ' - ' . $forumdata['topic_title']));

here is all.



85
karuna
My site still cost too much resources :(
  • 2004/4/23 14:47

  • karuna

  • Not too shy to talk

  • Posts: 171

  • Since: 2002/5/29


My site today has about 40 to 50 people on line.
And then got the

Quote:
This page cannot be displayed due to an internal error.

If you are the administrator of this site, please visit the XOOPS Troubleshooting Page for assistance.

Error [Xoops]: Unable to connect to database in file class/database/databasefactory.php line 34


and Bad Gateway (Error 502) frequently.

At last my site was colsed because it make the cpu usage to 100%..

But another forum on the same server once got 1000 people online only takes 10% cpu

i had little hacks to my site. such as let the image auto fit the table in the newbb, show newbb's topic in the title.

Is it due to these hacks?



86
karuna
Re: Possible problem in databasefactory.php ??
  • 2004/4/23 12:58

  • karuna

  • Not too shy to talk

  • Posts: 171

  • Since: 2002/5/29


Quote:

BoDGie wrote:
This error does infact mean there are currently too many connections to the database server. 100% the webhosts problem.


But my host does not limited the MySQL connections



87
karuna
Re: change partners default image size
  • 2004/4/21 3:35

  • karuna

  • Not too shy to talk

  • Posts: 171

  • Since: 2002/5/29


Hi

you can change this in template



88
karuna
Re: two Domains, one Xoops
  • 2004/4/20 14:20

  • karuna

  • Not too shy to talk

  • Posts: 171

  • Since: 2002/5/29


there was such a hack alow u to use one XOOPS with different mainfile.php via different domain.

you can config the same database in the mainfile.

you can find this hack inhttps://xoops.org/modules/news/



89
karuna
Each page have it's own title ~~
  • 2004/4/20 9:28

  • karuna

  • Not too shy to talk

  • Posts: 171

  • Since: 2002/5/29


Thanks JackJ and Koreus
Do as this post here i got this little hack works in news newbb mydownloads and weblog.

Here is how:

for News
as JackJ says:
Quote:
go to modules/news/article.php

add a line before

include XOOPS_ROOT_PATH.'/include/comment_view.php';

The line:

$xoopsTpl->assign('xoops_pagetitle', htmlentities($xoopsModule->name() . ' -' . $article->title()));

But since my site is a Chinese site
so i have to change
$xoopsTpl->assign('xoops_pagetitle', htmlentities($xoopsModule->name() . ' -' . $article->title()));
to
$xoopsTpl->assign('xoops_pagetitle', htmlspecialchars($xoopsModule->name() . '- ' . $article->title()));
to have is works fine

for newbb
in the file viewtopic.php
add this line:
$xoopsTpl->assign('xoops_pagetitle', htmlspecialchars($xoopsModule->name() . ' - ' . $forumdata['topic_title']));


for mydownload
add this line:
$xoopsTpl->assign('xoops_pagetitle', htmlspecialchars($xoopsModule->name() . ' - ' . $title));

for weblog
in the file details.php
add this line:
$xoopsTpl->assign('xoops_pagetitle', htmlspecialchars($xoopsModule->name() . ' - ' . $entryObject->getVar('title')));





90
karuna
Re: Each page have it's own title would be nice
  • 2004/4/19 16:30

  • karuna

  • Not too shy to talk

  • Posts: 171

  • Since: 2002/5/29


Hi i finaly got it works~~

$xoopsTpl->assign('xoops_pagetitle'htmlspecialchars($xoopsModule->name() . ' - ' $article->title()));


i have to change htmlentities to htmlspecialchars because my site is in Chinese.

Thanks




TopTop
« 1 ... 6 7 8 (9) 10 11 12 ... 16 »



Login

Who's Online

160 user(s) are online (94 user(s) are browsing Support Forums)


Members: 0


Guests: 160


more...

Donat-O-Meter

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

Latest GitHub Commits