1
rob777
Re: http:// and http://www double login issues?
  • 2008/4/27 16:48

  • rob777

  • Just popping in

  • Posts: 45

  • Since: 2005/1/21


Ok I checked the paths in mainfile.php and here is what I have.

// XOOPS Physical Path
    // Physical path to your main XOOPS directory WITHOUT trailing slash
    // Example: define('XOOPS_ROOT_PATH', '/home/myaccountusername/public_html');
    
define('XOOPS_ROOT_PATH''/home/myaccountusername/public_html');

    
// XOOPS Virtual Path (URL)
    // Virtual path to your main XOOPS directory WITHOUT trailing slash
    // Example: define('XOOPS_URL', 'http://mysitename.com');
    
define('XOOPS_URL''http://mysitename.com');
        
define('XOOPS_TRUST_PATH''/home/myaccountusername/my_trusted_path');


My server info is...
Apache v. 1.3.41 (unix)
PHP V. 5.2.5
Mysql v. 5.0.45


Does the path look right?

Thanks.
Rob
Thanks for everything!
Later,
Rob



2
rob777
Re: http:// and http://www double login issues?
  • 2008/4/27 6:58

  • rob777

  • Just popping in

  • Posts: 45

  • Since: 2005/1/21


Update...

When using the htaccess mod to redirect to www I have found another issue.

Besides the module updating issue, new people can not register to the site when I have the redirect in htacess. They get the register screen and everything. But when you click "finish" it says " Could not register new user. "

I'm using a fantasico installed XOOPS v. 2.0.16 with no hacks. Modules I'm using are Protector v 3.16; Newbb v 2.02; My-Iframe v 1.6; Extcal v 2.0; News v 1.56; Smartsection v 2.16; Smart object v 1.0; Smart profile v 1.0

Could the problem possibly be with the Protector?


Using the htaccess Quote:
Options +FollowSymlinks
RewriteEngine on
rewritecond %{http_host} ^domain.com [nc]
rewriterule ^(.*)$ http://www .domain.com/$1 [r=301,nc]
is fine for viewing the website. But is causing issuess with the processes in the XOOPS system.
Thanks for everything!
Later,
Rob



3
rob777
Re: http:// and http://www double login issues?
  • 2008/4/27 6:48

  • rob777

  • Just popping in

  • Posts: 45

  • Since: 2005/1/21


Runeher,

The index.html file is there and still having issues.
Thanks for the suggestion, as I did orginally delete it when clearing the templates folder. lol


Tom,

OK, I checked my mainfile.php. The defined address has no index.php at end. The url in there is http: //www.sitename .com


Phppp,

I have no idea how to do, or even what a dynamic or RUNTIME XOOPS_URL is. I'm a noob. I can barely find my way around the php files to tweak littles things.
Thanks for everything!
Later,
Rob



4
rob777
Re: http:// and http://www double login issues?
  • 2008/4/25 23:44

  • rob777

  • Just popping in

  • Posts: 45

  • Since: 2005/1/21


Ok, I emptied the 'templates_c' folder. But when I try to update the system, (or any module) I get the message
Quote:
Could not update System

Back to Module Administration page
Back to Module Administration page
Thanks for everything!
Later,
Rob



5
rob777
Re: http:// and http://www double login issues?
  • 2008/4/23 17:50

  • rob777

  • Just popping in

  • Posts: 45

  • Since: 2005/1/21


Ok for #2 here is what I found.

Quote:
Redirect to www (htaccess redirect)

Create a .htaccess file with the below code, it will ensure that all requests coming in to domain.com will get redirected to www. domain.com
The .htaccess file needs to be placed in the root directory of your old website (i.e the same directory where your index file is placed)

Options +FollowSymlinks
RewriteEngine on
rewritecond %{http_host} ^domain.com [nc]
rewriterule ^(.*)$ http://www .domain.com/$1 [r=301,nc]

Please REPLACE domain.com and www .newdomain.com with your actual domain name.

Note* This .htaccess method of redirection works ONLY on Linux servers having the Apache Mod-Rewrite moduled enabled.


This is the code I used and it seems to be working ok. Except, When I went to login using the login block, it brought up the login/register page. I had to use that login form to get logged in. As far as the pages redirecting to www, all seem to be working ok, even the admin side of site.

Thanks.
Thanks for everything!
Later,
Rob



6
rob777
Re: /index.php to regular homepage xxxxx.com question
  • 2008/4/23 16:04

  • rob777

  • Just popping in

  • Posts: 45

  • Since: 2005/1/21


Duuhh. Fixed #1.

I forgot to delete my index.html file from root directory.



Question #2 still open.
Thanks for everything!
Later,
Rob



7
rob777
http:// and http://www double login issues?
  • 2008/4/23 15:32

  • rob777

  • Just popping in

  • Posts: 45

  • Since: 2005/1/21


Hi all,

Its been a couple years since I played with XOOPS and I have forgot alot.

I recently been working on another XOOPS site and am having some issues.

I'm using XOOPS v. 2.0.16

1. I used fantastico to install xoops. During installation I set it to install into root directory. So it should have came out with the start page as http ://www. sitename.com. But it didnt install that way. My XOOPS homepage is only working as .com/index.php.

What do I have to do to make it so if someone types in address as sitename.com it puts them on the XOOPS homepage instead of my generic "site coming soon" index.html page?


2. Also what do I have to do to stop the double login issues, with http ://sitename and http ://www.sitename?

Thanks,
All

Rob
Thanks for everything!
Later,
Rob



8
rob777
Member pages module?
  • 2006/3/18 22:01

  • rob777

  • Just popping in

  • Posts: 45

  • Since: 2005/1/21


Hello all,

I was wondering if there is already such a module that I could use so people on my site can set up a members type section. So for say for an example I could login and add a few pictures of myself or my hobbies, a bio or my self. Then others could either click my user name and see my profile and my pictures bio etc. or they could go to say a "members" section of the site and browse the users and see their profile pages. To clarify, I'm not talking about a paid memebership or anything like that, just an expanded user profile feature so users could have their own little space of the site. Of course the admin would be able to manually aprove additions and changes.

Thanks,
Rob
Thanks for everything!
Later,
Rob



9
rob777
Re: Blank PM Pop-up window
  • 2006/3/18 21:54

  • rob777

  • Just popping in

  • Posts: 45

  • Since: 2005/1/21


Bump.

Can anyone please help point me in the right direction for figuring out why the "who's online" pop-up window and the "private message" pop-up window are both blank on my site?

Here's the misc.php file. I think this is what is needed for the who's online window.
// $Id: misc.php,v 1.17.2.1 2005/06/26 18:57:58 mithyt2 Exp $
//  ------------------------------------------------------------------------ //
//                XOOPS - PHP Content Management System                      //
//                    Copyright (c) 2000 XOOPS.org                           //
//                                                    //
//  ------------------------------------------------------------------------ //
//  This program is free software; you can redistribute it and/or modify     //
//  it under the terms of the GNU General Public License as published by     //
//  the Free Software Foundation; either version 2 of the License, or        //
//  (at your option) any later version.                                      //
//                                                                           //
//  You may not change or alter any portion of this comment or credits       //
//  of supporting developers from this source code or any supporting         //
//  source code which is considered copyrighted (c) material of the          //
//  original comment or credit authors.                                      //
//                                                                           //
//  This program is distributed in the hope that it will be useful,          //
//  but WITHOUT ANY WARRANTY; without even the implied warranty of           //
//  MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the            //
//  GNU General Public License for more details.                             //
//                                                                           //
//  You should have received a copy of the GNU General Public License        //
//  along with this program; if not, write to the Free Software              //
//  Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA  02111-1307 USA //
//  ------------------------------------------------------------------------ //

include "mainfile.php";
include_once 
XOOPS_ROOT_PATH.'/language/'.$xoopsConfig['language'].'/misc.php';
$action = isset($_GET['action']) ? trim($_GET['action']) : '';
$action = isset($_POST['action']) ? trim($_POST['action']) : $action;
$type = isset($_GET['type']) ? trim($_GET['type']) : '';
$type = isset($_POST['type']) ? trim($_POST['type']) : $type;

if ( 
$action == "showpopups" ) {
    
xoops_header(false);
    
// show javascript close button?
    
$closebutton 1;
    switch ( 
$type ) {
    case 
"smilies":
        
$target = isset($_GET['target']) ? trim($_GET['target']) : '';
        if (
$target == '' || !preg_match('/^[0-9a-z_]*$/i'$target)) {
        } else {
            echo 
"text/javascript">
            
            "
;
            echo 
'
            
            '
._MSC_SMILIES.'
            '
._MSC_CODE.''._MSC_EMOTION.''._IMAGE.'';
            if (
$getsmiles $xoopsDB->query("SELECT * FROM ".$xoopsDB->prefix("smiles"))) {
                
$rcolor 'even';
                while ( 
$smile $xoopsDB->fetchArray($getsmiles) ) {
                    echo 
"$rcolor'>".$smile['code']."".$smile['emotion']."hand"' onclick='doSmilie(" ".$smile['code']." ");' src='".XOOPS_UPLOAD_URL."/".$smile['smile_url']."' alt='' />";
                    
$rcolor = ($rcolor == 'even') ? 'odd' 'even';
                }
            } else {
                echo 
"Could not retrieve data from the database.";
            }
            echo 
''._MSC_CLICKASMILIE;
        }
        break;
    case 
"avatars":
        
?>
        
        
        
        
        

echo _MSC_AVAVATARS;?>


        echo $_SERVER['REQUEST_URI'];?>'>
        
                $avatar_handler =& xoops_gethandler('avatar');
        
$avatarslist =& $avatar_handler->getList('S');
        
$cntavs 0;
        
$counter = isset($_GET['start']) ? intval($_GET['start']) : 0;
            foreach (
$avatarslist as $file => $name) {
            echo 
'.$file.'" alt="'.$name.'" style="padding:10px; vertical-align:top;"  />'.$name.'._SELECT.'" onclick="myimage_onclick('.$counter.')" />';
            
$counter++;
            
$cntavs++;
            if (
$cntavs 8) {
                echo 
'';
                
$cntavs=0;
            }
        }
        echo 
'
';
        break;
    case 
"friend":
        if ( !
$GLOBALS['xoopsSecurity']->check() || !isset($_POST['op']) || $_POST['op'] == "sendform") {
            if ( 
$xoopsUser ) {
                
$yname $xoopsUser->getVar("uname"'e');
                
$ymail $xoopsUser->getVar("email"'e');
                
$fname "";
                
$fmail "";
            } else {
                
$yname "";
                
$ymail "";
                
$fname "";
                
$fmail "";
            }
            
printCheckForm();
            echo 
'';
            echo 
"".implode(''$GLOBALS['xoopsSecurity']->getErrors())."
";
            echo 
'
            .XOOPS_URL.'/misc.php" method="post" onsubmit="return checkForm();">'._MSC_RECOMMENDSITE.'';
            echo 
"
                
                
                n"
;
            echo 
_MSC_YOURNAMEC."$yname' id='yname' />
                "
._MSC_YOUREMAILC.".$ymail."' id='ymail' />
                "
._MSC_FRIENDNAMEC."$fname' id='fname' />
                "
._MSC_FRIENDEMAILC."$fmail' id='fmail' />
                 ._SEND."' /> ._CLOSE."' type='button' onclick='javascript:window.close();' />".$GLOBALS['xoopsSecurity']->getTokenHTML()."
                n"
;
            
$closebutton 0;
        } elseif (
$_POST['op'] == "sendsite") {
            
$myts =& MyTextsanitizer::getInstance();
            if ( 
$xoopsUser ) {
                
$ymail $xoopsUser->getVar("email");
            } else {
                
$ymail = isset($_POST['ymail']) ? $myts->stripSlashesGPC(trim($_POST['ymail'])) : '';
            }
            if ( !isset(
$_POST['yname']) || trim($_POST['yname']) == "" || $ymail == '' || !isset($_POST['fname']) || trim($_POST['fname']) == ""  || !isset($_POST['fmail']) || trim($_POST['fmail']) == '' ) {
                
redirect_header(XOOPS_URL."/misc.php?action=showpopups&type=friend&op=sendform",2,_MSC_NEEDINFO);
                exit();
            }
            
$yname $myts->stripSlashesGPC(trim($_POST['yname']));
            
$fname $myts->stripSlashesGPC(trim($_POST['fname']));
            
$fmail $myts->stripSlashesGPC(trim($_POST['fmail']));
            if (!
checkEmail($fmail) || !checkEmail($ymail)) {
                
$errormessage _MSC_INVALIDEMAIL1.""._MSC_INVALIDEMAIL2."";
                
redirect_header(XOOPS_URL."/misc.php?action=showpopups&type=friend&op=sendform",2,$errormessage);
                exit();
            }
            
$xoopsMailer =& getMailer();
            
$xoopsMailer->setTemplate("tellfriend.tpl");
            
$xoopsMailer->assign("SITENAME"$xoopsConfig['sitename']);
            
$xoopsMailer->assign("ADMINMAIL"$xoopsConfig['adminmail']);
            
$xoopsMailer->assign("SITEURL"XOOPS_URL."/");
            
$xoopsMailer->assign("YOUR_NAME"$yname);
            
$xoopsMailer->assign("FRIEND_NAME"$fname);
            
$xoopsMailer->setToEmails($fmail);
            
$xoopsMailer->setFromEmail($ymail);
            
$xoopsMailer->setFromName($yname);
            
$xoopsMailer->setSubject(sprintf(_MSC_INTSITE,$xoopsConfig['sitename']));
            
//OpenTable();
            
if ( !$xoopsMailer->send() ) {
                echo 
$xoopsMailer->getErrors();
            } else {
                echo 
"

"._MSC_REFERENCESENT."

"
;
            }
            
//CloseTable();
        
}
        break;
    case 
'online':
        
$isadmin $xoopsUserIsAdmin;
        echo 
''._WHOSONLINE.'';
        
$start = isset($_GET['start']) ? intval($_GET['start']) : 0;
        
$online_handler =& xoops_gethandler('online');
        
$online_total =& $online_handler->getCount();
        
$limit = ($online_total 20) ? 20 $online_total;
        
$criteria = new CriteriaCompo();
        
$criteria->setLimit($limit);
        
$criteria->setStart($start);
        
$onlines =& $online_handler->getAll($criteria);
        
$count count($onlines);
        
$module_handler =& xoops_gethandler('module');
        
$modules =& $module_handler->getList(new Criteria('isactive'1));
        for (
$i 0$i $count$i++) {
            if (
$onlines[$i]['online_uid'] == 0) {
                
$onlineUsers[$i]['user'] = '';
            } else {
                
$onlineUsers[$i]['user'] =& new XoopsUser($onlines[$i]['online_uid']);
            }
            
$onlineUsers[$i]['ip'] = $onlines[$i]['online_ip'];
            
$onlineUsers[$i]['updated'] = $onlines[$i]['online_updated'];
            
$onlineUsers[$i]['module'] = ($onlines[$i]['online_module'] > 0) ? $modules[$onlines[$i]['online_module']] : '';
        }
        
$class 'even';
        for (
$i 0$i $count$i++) {
            
$class = ($class == 'odd') ? 'even' 'odd';
            echo 
'.$class.'">';
            if (
is_object($onlineUsers[$i]['user'])) {
                
$avatar $onlineUsers[$i]['user']->getVar('user_avatar') ? '.XOOPS_UPLOAD_URL.'/'.$onlineUsers[$i]['user']->getVar('user_avatar').'" alt="" />' ' ';
                echo 
''.$avatar."javascript:window.opener.location='".XOOPS_URL."/userinfo.php?uid=".$onlineUsers[$i]['user']->getVar('uid')."';window.close();">".$onlineUsers[$i]['user']->getVar('uname')."";
            } else {
                echo 
' '.$xoopsConfig['anonymous'];
            }
            if (
$isadmin == 1) {
                echo 
'('.$onlineUsers[$i]['ip'].')';
            }
            echo 
''.$onlineUsers[$i]['module'].'';
        }
        echo 
'';
        if (
$online_total 20) {
            include_once 
XOOPS_ROOT_PATH.'/class/pagenav.php';
            
$nav = new XoopsPageNav($online_total20$start'start''action=showpopups&type=online');
            echo 
''.$nav->renderNav().'
';
        }
        break;
    case 
'ssllogin':
        if (
$xoopsConfig['use_ssl'] && isset($_POST[$xoopsConfig['sslpost_name']]) && is_object($xoopsUser)) {
            include_once 
XOOPS_ROOT_PATH.'/language/'.$xoopsConfig['language'].'/user.php';
            echo 
sprintf(_US_LOGGINGU$xoopsUser->getVar('uname'));
            echo 
'._CLOSE.'" type="button" onclick="window.opener.location.reload();window.close();" />
';
            
$closebutton false;
        }
        break;
    default:
        break;
    }
    if (
$closebutton) {
        echo 
'._CLOSE.'" type="button" onclick="javascript:window.close();" />
';
    }
    
xoops_footer();
}

function 
printCheckForm()
{
    
?>
    
        
    
    }
?>


And here is the pmlite.php file I think is needed for the private message pop up window.

// $Id: pmlite.php,v 1.11.4.3 2005/03/29 15:58:11 mithyt2 Exp $
//  ------------------------------------------------------------------------ //
//                XOOPS - PHP Content Management System                      //
//                    Copyright (c) 2000 XOOPS.org                           //
//                                                    //
//  ------------------------------------------------------------------------ //
//  This program is free software; you can redistribute it and/or modify     //
//  it under the terms of the GNU General Public License as published by     //
//  the Free Software Foundation; either version 2 of the License, or        //
//  (at your option) any later version.                                      //
//                                                                           //
//  You may not change or alter any portion of this comment or credits       //
//  of supporting developers from this source code or any supporting         //
//  source code which is considered copyrighted (c) material of the          //
//  original comment or credit authors.                                      //
//                                                                           //
//  This program is distributed in the hope that it will be useful,          //
//  but WITHOUT ANY WARRANTY; without even the implied warranty of           //
//  MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the            //
//  GNU General Public License for more details.                             //
//                                                                           //
//  You should have received a copy of the GNU General Public License        //
//  along with this program; if not, write to the Free Software              //
//  Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA  02111-1307 USA //
//  ------------------------------------------------------------------------ //

$xoopsOption['pagetype'] = "pmsg";

include 
"mainfile.php";
$reply = !empty($_GET['reply']) ? 0;
$send = !empty($_GET['send']) ? 0;
$send2 = !empty($_GET['send2']) ? 0;
$to_userid = !empty($_GET['to_userid']) ? intval($_GET['to_userid']) : 0;
$msg_id = !empty($_GET['msg_id']) ? intval($_GET['msg_id']) : 0;
if ( empty(
$_GET['refresh'] ) && isset($_POST['op']) && $_POST['op'] != "submit" ) {
    
$jump "pmlite.php?refresh=".time()."";
    if ( 
$send == ) {
        
$jump .= "&send=".$send."";
    } elseif ( 
$send2 == ) {
        
$jump .= "&send2=".$send2."&to_userid=".$to_userid."";
    } elseif ( 
$reply == ) {
        
$jump .= "&reply=".$reply."&msg_id=".$msg_id."";
    } else {
    }
    echo 
".$jump."' />";
    exit();
}
xoops_header();
if (
$xoopsUser) {
    
$myts =& MyTextSanitizer::getInstance();
    if (isset(
$_POST['op']) && $_POST['op'] == "submit") {
        if (!
$GLOBALS['xoopsSecurity']->check()) {
            
$security_error true;
        }
        
$res $xoopsDB->query("SELECT COUNT(*) FROM ".$xoopsDB->prefix("users")." WHERE uid=".intval($_POST['to_userid'])."");
        list(
$count) = $xoopsDB->fetchRow($res);
        if (
$count != 1) {
            echo 
"

"._PM_USERNOEXIST."";
            echo 
_PM_PLZTRYAGAIN."

";
            if (isset(
$security_error) && $security_error == true) {
                echo 
implode(''$GLOBALS['xoopsSecurity']->getErrors());
            }
            echo 
"[ "._PM_GOBACK." ]
"
;
        } else {
            
$pm_handler =& xoops_gethandler('privmessage');
            
$pm =& $pm_handler->create();
            
$pm->setVar("subject"$_POST['subject']);
            
$pm->setVar("msg_text"$_POST['message']);
            
$pm->setVar("to_userid"$_POST['to_userid']);
            
$pm->setVar("from_userid"$xoopsUser->getVar("uid"));
            if (!
$pm_handler->insert($pm)) {
                echo 
$pm->getHtmlErrors();
                echo 
""._PM_GOBACK."";
            } else {
                echo 
"

"._PM_MESSAGEPOSTED."

javascript:window.opener.location='".XOOPS_URL."/viewpmsg.php';window.close();">"._PM_CLICKHERE."javascript:window.close();">"._PM_ORCLOSEWINDOW."
";
            }
        }
    } elseif (
$reply == || $send == || $send2 == 1) {
        include_once 
XOOPS_ROOT_PATH."/include/xoopscodes.php";
        if (
$reply == 1) {
            
$pm_handler =& xoops_gethandler('privmessage');
            
$pm =& $pm_handler->get($msg_id);
            if (
$pm->getVar("to_userid") == $xoopsUser->getVar('uid')) {
                
$pm_uname XoopsUser::getUnameFromId($pm->getVar("from_userid"));
                
$message  "[quote]n";
                
$message .= sprintf(_PM_USERWROTE,$pm_uname);
                
$message .= "n".$pm->getVar("msg_text""E")."n[/quote]";
            } else {
                unset(
$pm);
                
$reply $send2 0;
            }
        }
        echo 
"n";
            echo 
""._PM_TO."";
        if ( 
$reply == ) {
            echo 
".$pm->getVar("from_userid")."' />".$pm_uname."";
        } elseif ( 
$send2 == ) {
            
$to_username XoopsUser::getUnameFromId($to_userid);
            echo 
".$to_userid."' />".$to_username."";
        } else {
            echo 
"";
            
$result $xoopsDB->query("SELECT uid, uname FROM ".$xoopsDB->prefix("users")." WHERE level > 0 ORDER BY uname");
            while ( list(
$ftouid$ftouname) = $xoopsDB->fetchRow($result) ) {
                echo 
".$ftouid."'>".$myts->makeTboxData4Show($ftouname)."";
            }
            echo 
"";
        }
        echo 
"";
        echo 
""._PM_SUBJECTC."";
        if ( 
$reply == ) {
            
$subject $pm->getVar('subject''E');
            if (!
preg_match("/^Re:/i",$subject)) {
                
$subject 'Re: '.$subject;
            }
            echo 
".$subject."' size='30' maxlength='100' />";
        } else {
            echo 
"";
        }
        echo 
"";
        echo 
""._PM_MESSAGEC."";
        echo 
"";
        
xoopsCodeTarea("message",37,8);
        
xoopsSmilies("message");
        echo 
"";
        echo 
"";
        echo 
" 
        "
.$GLOBALS['xoopsSecurity']->getTokenHTML()."
        ._PM_SUBMIT."' /> 
        ._PM_CLEAR."' />
         ._PM_CANCELSEND."' onclick='javascript:window.close();' />
        n"
;
        echo 
"n";
    }
} else {
    echo 
_PM_SORRY.".XOOPS_URL."/register.php'>"._PM_REGISTERNOW.".";
}

xoops_footer();

?>



Thanks,
Rob
Thanks for everything!
Later,
Rob



10
rob777
Re: Blank PM Pop-up window
  • 2006/3/4 0:45

  • rob777

  • Just popping in

  • Posts: 45

  • Since: 2005/1/21


7 months later...I still haven't been able to figure out how to fix it. Any ideas?

Thanks,
Rob
Thanks for everything!
Later,
Rob




TopTop
(1) 2 3 4 5 »



Login

Who's Online

187 user(s) are online (109 user(s) are browsing Support Forums)


Members: 0


Guests: 187


more...

Donat-O-Meter

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

Latest GitHub Commits