1391
trabis
Re: Module developmant - Documentation or Info
  • 2008/9/8 11:15

  • trabis

  • Core Developer

  • Posts: 2269

  • Since: 2006/9/1 1


Quote:

arlindo wrote:

If i needed to show the actual loged user email or name or ID? , is there any already active variavel or function that i can use instead of havind to make sql independent querys??



You can use the 'online' handler to ger all logged users
Example:
$online_handler =& xoops_gethandler('online');
$onlines =& $online_handler->getAll();
foreach (
$onlines as $online) {
   echo 
$online['online_uid'].' - '.$online['online_uname'].' <br />';
}


Or get info about the current user
echo $xoopsUser->getVar('uid').' - '.$xoopsUser->getVar('uname');



1392
trabis
Re: Ajax autocompletion feeded with isearch module
  • 2008/9/8 8:26

  • trabis

  • Core Developer

  • Posts: 2269

  • Since: 2006/9/1 1


You can use mysearch module. It is a mix of isearch, autocompleter and other hacks submited in xoops.org forums.

http://code.google.com/p/xuups/



1393
trabis
Re: Liaise 1.27 and Xoops 2.3.0 RC2
  • 2008/9/7 21:57

  • trabis

  • Core Developer

  • Posts: 2269

  • Since: 2006/9/1 1


I guess this would be a better fix for xoopsmailer.php

function getTemplatePath()
    {
        if (!
$path $this->templatedir) {
            
$path XOOPS_ROOT_PATH "/language/";
        } elseif ( 
false === strpos($path'/') ) {
            
$path XOOPS_ROOT_PATH "/modules/" $path "/language/";
        } elseif ( 
substr($path, -11) != "/" ) {
            
$path .= "/";
        }
        
        if (
file_exists($path $GLOBALS['xoopsConfig']['language'] . "/mail_template/" $this->template) ) {
            return 
$path $GLOBALS['xoopsConfig']['language'] . "/mail_template/" $this->template;
        } elseif (
file_exists($path "english/mail_template/" $this->template) ) {
            return 
$path "english/mail_template/" $this->template;
        } elseif (
file_exists($path $this->template) ) {
            return 
$path $this->template;
        } else {
            return 
false;
        }
    }



1394
trabis
Re: Liaise 1.27 and Xoops 2.3.0 RC2
  • 2008/9/7 21:51

  • trabis

  • Core Developer

  • Posts: 2269

  • Since: 2006/9/1 1


I agree. xoopsmailer needs to be reviewed to maintain compatibility. As it is, you do not even need to set a template dir and as you are forced to use mail_template.

// private
    
function getTemplatePath()
    {
        if (!
$path $this->templatedir) {
            
$path XOOPS_ROOT_PATH "/language/";
        } elseif ( 
false === strpos($path'/') ) {
            
$path XOOPS "/modules/" $path "/languages/";
        } elseif ( 
substr($path, -11) != "/" ) {
            
$path .= "/";
        }
        if (
file_exists($path $GLOBALS['xoopsConfig']['language'] . "/" $this->template) ) {
            return 
$path $GLOBALS['xoopsConfig']['language'] . "/mail_template/" $this->template;
        } else {
            return 
$path "english/mail_template/" $this->template;
        }
    }


// public
    
function send($debug false)
    {
        global 
$xoopsConfig;
        if ( 
$this->body == "" && $this->template == "" ) {
            if (
$debug) {
                
$this->errors[] = _MAIL_MSGBODY;
            }
            return 
false;
        } elseif ( 
$this->template != "" ) {
            
$path $this->getTemplatePath();
            if ( !(
$fd = @fopen($path'r')) ) {
                if (
$debug) {
                    
$this->errors[] = _MAIL_FAILOPTPL;
                }
                return 
false;
            }
            
$this->setBody(fread($fdfilesize($path)));
        }
...



1395
trabis
Re: Liaise 1.27 and Xoops 2.3.0 RC2
  • 2008/9/7 21:09

  • trabis

  • Core Developer

  • Posts: 2269

  • Since: 2006/9/1 1


For what I can see there is a bug in XOOPS 2.3 and you need to do some changes in liaise also.

in liaise include/form_execute (around line 184 for liaise 1.26)
you will find:
if( is_dir(LIAISE_ROOT_PATH."language/".$xoopsConfig['language']."/mail_template") ){
    
$template_dir LIAISE_ROOT_PATH."language/".$xoopsConfig['language']."/mail_template";
}else{
    
$template_dir LIAISE_ROOT_PATH."language/english/mail_template";
}

$xoopsMailer =& getMailer();
$xoopsMailer->setTemplateDir($template_dir);


relpace by this:
$xoopsMailer =& xoops_getMailer();
$xoopsMailer->setTemplateDir('liaise');


And thenyou need to fix the core bug in class/xoopsmailer.php line 180:
$path XOOPS "/modules/" $path "/languages/";

Replace by
$path XOOPS_ROOT_PATH "/modules/" $path "/language/";



1396
trabis
Re: Liaise 1.27 and Xoops 2.3.0 RC2
  • 2008/9/7 20:19

  • trabis

  • Core Developer

  • Posts: 2269

  • Since: 2006/9/1 1


If you look in liaise/admin/footer.php you will see that liaise is expecting to find XOOPS 2.0.9 (at least in liase 1.23)



1397
trabis
Re: trabis account has been hacked
  • 2008/9/5 10:02

  • trabis

  • Core Developer

  • Posts: 2269

  • Since: 2006/9/1 1


OKthat's definitly a browser problem and has nothing to do with the problem of the admin name in the interests field.


I would say that is a browser problem and has everything to do with the login name in the interest field.



1398
trabis
Re: xoops 2.0.18 and module catads 1.40 of thecat.
  • 2008/9/5 9:45

  • trabis

  • Core Developer

  • Posts: 2269

  • Since: 2006/9/1 1


catads/adslist.php line 87 (I guess)

replace by

//$pathstring = substr($pathstring, 0, -7);



1399
trabis
Re: trabis account has been hacked
  • 2008/9/5 8:58

  • trabis

  • Core Developer

  • Posts: 2269

  • Since: 2006/9/1 1


Quote:

ghia_ wrote:
Quote:
This is happening in preferences->mail to.
Could you specify what happens there?
Quote:
The only way I can partially solve this is using javascript as in this article:
Are you now saying that this is a browser problem? I find it hard to believe that. I could imagine that some nifty auto complete browser settings would fill in some fields, but not that fields (from different naming) get mixed.


In preference mail it replaces password and login, it will happen in all password fields (using google chrome).

I try to move fields upside down, removed all fields in admin user form.... whatever order or field I left in, as long as the password field is there, the browser will auto complete (does not have to be the interest field). I even try to rename name forms, name of fields, etc.

Strange is, the same form is used for edituser in front page where no problem occurs. Maybe some file that is loaded only in admin area is causing the problem. I though it was some admin javascript problem but I disable all javascript files and the problem persists.

I cannot find the problem, I gave up (spent 4 hours around this). Maybe this is a chrome bug, a firefox plugin bug, can´t tell.

More, I try this in all XOOPS versions since 2.0.13. Happens in all of them.

AHhh, one more thing. If you edit the source code you will see that no info is in the form. It is the browser or javascript that complete the fields. Is not a php problem.



1400
trabis
Re: trabis account has been hacked
  • 2008/9/4 14:24

  • trabis

  • Core Developer

  • Posts: 2269

  • Since: 2006/9/1 1


This is happening in preferences->mail to. The only way I can partially solve this is using javascript as in this article:

http://www.boutell.com/newfaq/creating/clearform.html




TopTop
« 1 ... 137 138 139 (140) 141 142 143 ... 190 »



Login

Who's Online

223 user(s) are online (134 user(s) are browsing Support Forums)


Members: 0


Guests: 223


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