71
karuna
Re: Is there an image resizer hack for Newbb?
  • 2004/4/30 2:55

  • karuna

  • Not too shy to talk

  • Posts: 171

  • Since: 2002/5/29


a hack from www.bbchen.org

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='java script: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='java script:CaricaFoto(\"\\3\");'><img src='\\3' align='\\2' alt='点击查看大图' border=0 onload=\"java script:if(this.width>screen.width-540)this.width=screen.width-500\" /></a><br>";
$replacements[] = "<a href='java script:CaricaFoto(\"\\1\");'><img src='\\1' alt='点击查看大图' border=0 onload=\"java script: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[] = "/java script:/si";
$replacements[] = "java script:";



##move it behand :

CODE

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


##finish



72
karuna
Re: continuous blank will be ignored in the newbb??
  • 2004/4/28 3:50

  • karuna

  • Not too shy to talk

  • Posts: 171

  • Since: 2002/5/29


i mean

OOO




OOO

should look like this

&#65327;&#65327;&#65327;
       
&#65327;
    
&#65327;
    
&#65327;
       
&#65327;
&#65327;&#65327;&#65327;




73
karuna
Re: Google Indexing
  • 2004/4/28 3:38

  • karuna

  • Not too shy to talk

  • Posts: 171

  • Since: 2002/5/29


hi~~look these posts

https://xoops.org/modules/newbb/viewtopic.php?topic_id=19034&forum=15#forumpost81156

https://xoops.org/modules/newbb/viewtopic.php?topic_id=17666&forum=10




74
karuna
Re: Displaying the "Titles" of News at hompage
  • 2004/4/27 16:57

  • karuna

  • Not too shy to talk

  • Posts: 171

  • Since: 2002/5/29


Hi i have asked the same questiion and also got JackJ's help~~

see the 2 post

https://xoops.org/modules/newbb/viewtopic.php?topic_id=19034&forum=15#forumpost81156

https://xoops.org/modules/newbb/viewtopic.php?topic_id=17666&forum=10



75
karuna
Re: A new autologin hack for 2.0.6
  • 2004/4/27 16:17

  • karuna

  • Not too shy to talk

  • Posts: 171

  • Since: 2002/5/29


hmm
i upload these files downloaded from your site.

But it seems that it does not work. and the login form in my site has been integrated to the theme, so maybe is the problem of the theme.



76
karuna
Re: Delete user's messages
  • 2004/4/27 15:51

  • karuna

  • Not too shy to talk

  • Posts: 171

  • Since: 2002/5/29


Use phpmyadmin



77
karuna
Re: A new autologin hack for 2.0.6
  • 2004/4/27 11:11

  • karuna

  • Not too shy to talk

  • Posts: 171

  • Since: 2002/5/29


i'd like have a try



78
karuna
Re: How to show the pm icon besides the reply icon as well?
  • 2004/4/26 17:28

  • karuna

  • Not too shy to talk

  • Posts: 171

  • Since: 2002/5/29


and at first i tired assign a smarty variable like this

if (is_object($xoopsUser)) {
$xoopsTpl->assign('user_pmlink', "<a href=\"javascript:openWithSelfMain('".XOOPS_URL."/pmlite.php?send2=1&to_userid=".$topic_post[poster_uid]."', 'pmlite', 450, 380);\"><img src=\"".XOOPS_URL."/images/icons/pm.gif\" alt=\"".sprintf(_SENDPMTO,$topic_post[poster_uname])."\" /></a>");
} else {
$xoopsTpl->assign('user_pmlink', '');
}

but failed
Maybe after change $topic_post[poster_uid] to $eachposter->getVar('uid') and change $topic_post[poster_uname] to $eachposter->getVar('uname') as Predator has posted the code will work~~ just guess



79
karuna
Re: How to show the pm icon besides the reply icon as well?
  • 2004/4/26 17:04

  • karuna

  • Not too shy to talk

  • Posts: 171

  • Since: 2002/5/29


thanks for your's quick response

JackJ's code works well

Added it to the template file newbb_thread.html

after
<{if $viewer_is_admin == true}>
<td class="even" align="right">

and

<{elseif $xoops_isuser == true && $xoops_userid == $topic_post.poster_uid}>
<td class="even" align="right">
and

<{elseif $viewer_can_post == true}>
<td class="even" align="right">

Thanks again~~



80
karuna
How to show the pm icon besides the reply icon as well?
  • 2004/4/26 16:25

  • karuna

  • Not too shy to talk

  • Posts: 171

  • Since: 2002/5/29


I think now it's a bit difficult for a newbie to XOOPS to find the pm icon~~

is the any way to show the pm icon besides the reply icon as well?




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



Login

Who's Online

145 user(s) are online (82 user(s) are browsing Support Forums)


Members: 0


Guests: 145


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