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'] = '
';
$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 ("");
finestra.document.write ("
");
finestra.document.close();
return false;
}
//Hack End/*/
(2).in /class/module.textsanitizer.php
##find:
CODE
$replacements[] = '
';
$replacements[] = '
';
$replacements[] = '
';
$replacements[] = '
';
##replace it with:
CODE
$replacements[] = "
screen.width-540)this.width=screen.width-500\" />";
$replacements[] = "
screen.width-540)this.width=540\" />";
$replacements[] = '
';
$replacements[] = '
';
##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.