291941
philou
Re: WebSlave Project - a project managment tool
  • 2003/9/14 14:17

  • philou

  • Quite a regular

  • Posts: 384

  • Since: 2002/5/6 8


I test this new release now !!!



291942
gronice
Re: WebSlave Project - a project managment tool
  • 2003/9/14 14:10

  • gronice

  • Just popping in

  • Posts: 30

  • Since: 2003/7/31


Next Version!

Download v.0.7.8

Change-Log:

v.0.7.8
- fixed a typo in sql -file
- fixed problem with ticks
- added a mytasks block

It's not tested very well, but I hope it run's properly.
If not, please report bugs. Thx.

Have fun
G'Ron



291943
GIJOE
Re: Auto login
  • 2003/9/14 8:31

  • GIJOE

  • Quite a regular

  • Posts: 265

  • Since: 2003/8/13


This is the best auto login hack, I think.

The older hacks I tried have troubles like "cannot logout", "must use custom block", "send wrong and long cookie in some environment".

This patch is only for XOOPS 2.0.3.
If you use XOOPS older than 2.0.2, you should upgrade to 2.0.3 or change the patch for common.php.

I prepared an archive includes 4 patched files.
download here

Just upload 4 files, and update system module in module manager.
If you use customized template, patch to the template manually.

You don't have to turn 'custom session' on.

You can set the life time of auto-login(=cookie) by "Session expiration" in General Setting of preferences.

If you use IPBM or phpBB, try Olorin's code.

*** user.php.orig    Tue Jun 17 03:20:41 2003
--- user.php    Mon Sep  8 19:06:27 2003
***************
*** 
70,75 ****
--- 
70,81 ----
      
$message '';
      
$HTTP_SESSION_VARS = array();
      
session_destroy();

//autologin code//
+     setcookie'uid' , -time() - 3600 '/' '' ) ;
+     
setcookie'pass' , -time() - 3600 '/' '' ) ;
//end autologin code//

      if (
$xoopsConfig['use_mysession'] && $xoopsConfig['session_name'] != '') {
          
setcookie($xoopsConfig['session_name'], ''time()- 3600'/',  ''0);
      }



*** include/checklogin.php.orig    Tue Jun 17 03:21:32 2003
--- include/checklogin.php    Mon Sep  8 19:05:05 2003
***************
*** 
66,71 ****
--- 
66,80 ----
      
$HTTP_SESSION_VARS = array();
      
$HTTP_SESSION_VARS['xoopsUserId'] = $user->getVar('uid');
      
$HTTP_SESSION_VARS['xoopsUserGroups'] = $user->getGroups();

//autologin code//
+     if( isset( $_POST['rememberme'] ) && $_POST['rememberme'] == 'On' ) {
+         
$expire time() + $xoopsConfig['session_expire'] * 60 ;
+         
setcookie'uid' $user->uid() , $expire '/' '' ) ;
+         
setcookie'pass' md5$pass ) , $expire '/' '' ) ;
+     }
//end autologin code//

      if (
$xoopsConfig['use_mysession'] && $xoopsConfig['session_name'] != '') {
          
setcookie($xoopsConfig['session_name'], session_id(), time()+$xoopsConfig['session_expire'], '/',  ''0);
      }



*** common.php.orig    Wed Jun 18 00:21:35 2003
--- common.php    Wed Sep 10 16:48:18 2003
***************
*** 
145,150 ****
--- 
145,174 ----
      }
      
session_set_save_handler(array(&$sess_handler'open'), array(&$sess_handler'close'), array(&$sess_handler'read'), array(&$sess_handler'write'), array(&$sess_handler'destroy'), array(&$sess_handler'gc'));
      
session_start();

//autologin code//
+     if( empty( $HTTP_SESSION_VARS['xoopsUserId'] ) && isset( $_COOKIE['uid'] ) && isset( $_COOKIE['pass'] ) ) {
+         
$passSQL "SELECT COUNT(uid) FROM ".$xoopsDB->prefix("users")." WHERE pass='{$_COOKIE['pass']}' AND uid='{$_COOKIE['uid']}'" ;
+         @
$passRS $xoopsDB->query$passSQL ) ;
+         list( 
$numrows ) = $xoopsDB->fetchRow$passRS ) ;
+         if( 
$numrows == ) {
+             
$HTTP_SESSION_VARS['xoopsUserId'] = $_COOKIE['uid'] ;
+             
$xoopsUser =& $member_handler->getUser($_COOKIE['uid']);
+             
$HTTP_SESSION_VARS['xoopsUserGroups'] = $xoopsUser->getGroups();
+             
// update time at last login
+             $updateSQL "UPDATE ".$xoopsDB->prefix("users")." SET last_login='".time()."' WHERE uid='{$_COOKIE['uid']}'" ;
+             
$xoopsDB->queryF$updateSQL ) ;
+             
// extends autologin Cookies (if you need not, do comment out)
+             $expire time() + $xoopsConfig['session_expire'] * 60 ;
+             
setcookie'uid' $_COOKIE['uid'] , $expire '/' '' ) ;
+             
setcookie'pass' $_COOKIE['pass'] , $expire '/' '' ) ;
+         } else {
+             
setcookie'uid' , -time() - 3600 '/' '' ) ;
+             
setcookie'pass' , -time() - 3600 '/' '' ) ;
+         }
+     }
//end autologin code//

      if (!empty(
$HTTP_SESSION_VARS['xoopsUserId'])) {
          
$xoopsUser =& $member_handler->getUser($HTTP_SESSION_VARS['xoopsUserId']);
          if (!
is_object($xoopsUser)) {



*** modules/system/templates/blocks/system_block_login.html.orig    Tue Mar 18 18:31:20 2003
--- modules/system/templates/blocks/system_block_login.html    Mon Sep  8 19:32:28 2003
***************
*** 
1,****
! <
form style="margin-top: 0px;" action="<{$xoops_url}>/user.php" method="post"><{$block.lang_username}><br /><input type="text" name="uname" size="12" value="<{$block.unamevalue}>" /><br /><{$block.lang_password}><br /><input type="password" name="pass" size="12" /><br /><input type="hidden" name="xoops_redirect" value="<{$xoops_requesturi}>" /><input type="hidden" name="op" value="login" /><input type="submit" value="<{$block.lang_login}>" /><br /><{$block.sslloginlink}>
  form>
  <
a href="<{$xoops_url}>/user.php#lost"><{$block.lang_lostpass}>a>
  <
br /><br />
--- 
1,----
! <
form style="margin-top: 0px;" action="<{$xoops_url}>/user.php" method="post"><{$block.lang_username}><br /><input type="text" name="uname" size="12" value="<{$block.unamevalue}>" /><br /><{$block.lang_password}><br /><input type="password" name="pass" size="12" /><br /><input type="hidden" name="xoops_redirect" value="<{$xoops_requesturi}>" /><input type="hidden" name="op" value="login" /><input type="submit" value="<{$block.lang_login}>" /><br /><input type="checkbox" name="rememberme" value="On" class ="formButton" checked />Auto Login<br /><{$block.sslloginlink}>
  form>
  <
a href="<{$xoops_url}>/user.php#lost"><{$block.lang_lostpass}>a>
  <
br /><br />





291944
philroy
Donations to development?
  • 2003/9/14 8:07

  • philroy

  • Friend of XOOPS

  • Posts: 107

  • Since: 2003/8/23


Hi all,

I use both phpBB and phpAdsnew on a site I run. I'm about to set up XOOPS on a site that I'm developing. I know that Open Source is a superb concept, but I also like to say thanks for the work that others have done.

I've made donations to both phpBB and phpAdsnew, but I can't see anything here on donating to the XOOPS development team.

Are they just a very gracious group of people, or am I looking in the wrong place?

Phil



291945
GIJOE
Re: Myalbum on 1.3 > Myalbum-P on 2.0
  • 2003/9/14 7:59

  • GIJOE

  • Quite a regular

  • Posts: 265

  • Since: 2003/8/13


Quote:

Wingz wrote:
I'm assuming there'll well and truly be table differences between the two. So I was wondering if just a normal upgrade of XOOPS and its modules - substituting myalbum-P v2.0.0 instead of myablum v1.13 will result in a flawless upgrade, or will there be work beyond my poor PHP (and code generally) skills?

Yes. There is no differences among table structures of myalbum1.04, 1.13, and myalbum-P2.0.
But, while 1.04 store the comments into xoops_myalbum_comments, 1.13 and myAlbum-P2.0 store the comments into xoops_xoopscomments included in XOOPS core.

Only 1.13 has comment converter.
(I don't know the feature works fine.)

If you have many comments about photos, you should upgrade like this:

1. Backup 5 tables --- xoops_myalbum_photos, xoops_myalbum_cat, xoops_myalbum_text, xoops_myalbum_votes, xoops_myalbum_comments.
2. check the full paths of photos and thumbs.
3. upgrade XOOPS from 1.3.x to 2.0.x.
4. install myAlbum 1.13.
5. convert comments table in admin of myAlbum 1.13.
5. install myAlbum-P 2.0
6. set paths of photos and thumbs into preferences of myAlbum-P.





291946
GIJOE
Re: Myalbum on 1.3 > Myalbum-P on 2.0
  • 2003/9/14 7:48

  • GIJOE

  • Quite a regular

  • Posts: 265

  • Since: 2003/8/13


Quote:

ninja wrote:
i'm currently running myalbum 1.1.3 on XOOPS 2.0.3
to upgrade to myAlbum-P , can i just upload the files have have them over write myalbum 1.1.3 files?


After uploading the files, you should update module in module manager.
I recommend you 'check module' in myAlbum-P's admin menu.



291947
Herko
Re: Postnuke 0.726 to XOOPS 2.0.3 Converter Script (apha)
  • 2003/9/14 6:27

  • Herko

  • XOOPS is my life!

  • Posts: 4238

  • Since: 2002/2/4 1


Great work, thanks!

Hekro



291948
Mikhail
Postnuke 0.726 to XOOPS 2.0.3 Converter Script (alpha)
  • 2003/9/14 0:37

  • Mikhail

  • Just can't stay away

  • Posts: 412

  • Since: 2003/1/19


Postnuke 0.726 to XOOPS 2.0.3 Converter Script...
(alpha version, but works)

Download at:
http://www.xoops.net.br/download/converter/pn2x.zip

Live sample:
http://www.xoops.net.br/download/converter/

Please, report comments and stuff to this forum/thread...



291949
Draven
Re: another auto-login by GIJOE for newbb & ipbm xoopsers
  • 2003/9/14 0:30

  • Draven

  • Module Developer

  • Posts: 337

  • Since: 2003/5/28


Thanks.



291950
Olorin
another auto-login by GIJOE for newbb & ipbm xoopsers
  • 2003/9/13 23:51

  • Olorin

  • Just popping in

  • Posts: 50

  • Since: 2003/7/5 1


Hello,GIJOE. I copied your codes here so that xoopsers never carry out DOS attack to your site. lol
This auto-login doesn't require you to enable custom session on. Moreover this can be used for ipbm users.
Download GIJOE's autologin pack

IPBM's autologin has some problems. For instance, you will be logged in even if you've unchecked remember me as long as custom session is enabled. And security issue has been reported by xoopsers.

How does this hack work?
1.Stores your id & hashed password with cookie.
2.automatically postphone the expirelation date when a user come back and update "last_login".
(For ipbm users, I changed codes so that last_activity & last_visit also will be updated.)
3.you can configure session expirelation in admin menu.
4.there's no need to enable custom session.

Quote:

*** user.php.origTue Jun 17 03:20:41 2003
--- user.phpMon Sep 8 19:06:27 2003
***************
*** 70,75 ****
--- 70,81 ----

if ($op == 'logout') {
$message = '';
$HTTP_SESSION_VARS = array();
session_destroy();

//autologin code//
setcookie( 'uid' , -1 , time() - 3600 , '/' , '' , 0 ) ;
setcookie( 'pass' , -1 , time() - 3600 , '/' , '' , 0 ) ;
//end autologin code//

if ($xoopsConfig['use_mysession'] && $xoopsConfig['session_name'] != '') {
setcookie($xoopsConfig['session_name'], '', time()- 3600, '/', '', 0);
}
$message = _US_LOGGEDOUT.'
'._US_THANKYOUFORVISIT;


Quote:

*** include/checklogin.php.origTue Jun 17 03:21:32 2003
--- include/checklogin.phpMon Sep 8 19:05:05 2003
***************
*** 66,71 ****
--- 66,80 ----
$HTTP_SESSION_VARS = array();
$HTTP_SESSION_VARS['xoopsUserId'] = $user->getVar('uid');
$HTTP_SESSION_VARS['xoopsUserGroups'] = $user->getGroups();

//autologin code//
if( isset( $_POST['rememberme'] ) && $_POST['rememberme'] == 'On' ) {
$expire = time() + $xoopsConfig['session_expire'] * 60 ;
setcookie( 'uid' , $user->uid() , $expire , '/' , '' , 0 ) ;
setcookie( 'pass' , md5( $pass ) , $expire , '/' , '' , 0 ) ;
}
//end autologin code//

if ($xoopsConfig['use_mysession'] && $xoopsConfig['session_name'] != '') {
setcookie($xoopsConfig['session_name'], session_id(), time()+$xoopsConfig['session_expire'], '/', '', 0);
}



This common.php is Original one.
Thus this is for newbb users who haven't hacked the core.

Quote:

*** common.php.origWed Jun 18 00:21:35 2003
--- common.phpWed Sep 10 16:48:18 2003
***************
*** 145,150 ****
--- 145,174 ----
session_set_save_handler(array(&$sess_handler, 'open'), array(&$sess_handler, 'close'), array(&$sess_handler, 'read'), array(&$sess_handler, 'write'), array(&$sess_handler, 'destroy'), array(&$sess_handler, 'gc'));
session_start();

//autologin code//
if( empty( $HTTP_SESSION_VARS['xoopsUserId'] ) && isset( $_COOKIE['uid'] ) && isset( $_COOKIE['pass'] ) ) {
$passSQL = "SELECT COUNT(uid) FROM ".$xoopsDB->prefix("users")." WHERE pass='{$_COOKIE['pass']}' AND uid='{$_COOKIE['uid']}'" ;
@$passRS = $xoopsDB->query( $passSQL ) ;
list( $numrows ) = $xoopsDB->fetchRow( $passRS ) ;
if( $numrows == 1 ) {
$HTTP_SESSION_VARS['xoopsUserId'] = $_COOKIE['uid'] ;
$xoopsUser =& $member_handler->getUser($_COOKIE['uid']);
$HTTP_SESSION_VARS['xoopsUserGroups'] = $xoopsUser->getGroups();
// update time at last login
$updateSQL = "UPDATE ".$xoopsDB->prefix("users")." SET last_login='".time()."' WHERE uid='{$_COOKIE['uid']}'" ;
$xoopsDB->queryF( $updateSQL ) ;
// extends autologin Cookies (if you need not, do comment out)
$expire = time() + $xoopsConfig['session_expire'] * 60 ;
setcookie( 'uid' , $_COOKIE['uid'] , $expire , '/' , '' , 0 ) ;
setcookie( 'pass' , $_COOKIE['pass'] , $expire , '/' , '' , 0 ) ;
} else {
setcookie( 'uid' , -1 , time() - 3600 , '/' , '' , 0 ) ;
setcookie( 'pass' , -1 , time() - 3600 , '/' , '' , 0 ) ;
}
}
//end autologin code//

if (!empty($HTTP_SESSION_VARS['xoopsUserId'])) {
$xoopsUser =& $member_handler->getUser($HTTP_SESSION_VARS['xoopsUserId']);
if (!is_object($xoopsUser)) {
$xoopsUser = '';


}
?>



This common.php is NOT original. I changed some codes so that it would work with Invision Power Board Module made by koudanshi. Please bear in mind,if you upload this file you will loose "anonymous login" at VERY LEAST. So I cannot assure you that this code works collectly...

Quote:

*** common.php.origWed Jun 18 00:21:35 2003
--- common.phpWed Sep 10 16:48:18 2003
***************
*** 145,150 ****
--- 145,174 ----
session_set_save_handler(array(&$sess_handler, 'open'), array(&$sess_handler, 'close'), array(&$sess_handler, 'read'), array(&$sess_handler, 'write'), array(&$sess_handler, 'destroy'), array(&$sess_handler, 'gc'));
session_start();

//autologin code//
if( empty( $HTTP_SESSION_VARS['xoopsUserId'] ) && isset( $_COOKIE['uid'] ) && isset( $_COOKIE['pass'] ) ) {
$passSQL = "SELECT COUNT(uid) FROM ".$xoopsDB->prefix("users")." WHERE pass='{$_COOKIE['pass']}' AND uid='{$_COOKIE['uid']}'" ;
@$passRS = $xoopsDB->query( $passSQL ) ;
list( $numrows ) = $xoopsDB->fetchRow( $passRS ) ;
if( $numrows == 1 ) {
$HTTP_SESSION_VARS['xoopsUserId'] = $_COOKIE['uid'] ;
$xoopsUser =& $member_handler->getUser($_COOKIE['uid']);
$HTTP_SESSION_VARS['xoopsUserGroups'] = $xoopsUser->getGroups();
// update time at last login
$updateSQL = "UPDATE ".$xoopsDB->prefix("users")." SET last_login='".time()."', last_visit='".time()."', last_activity='".time()."' WHERE uid='{$_COOKIE['uid']}'" ;
$xoopsDB->queryF( $updateSQL ) ;
// extends autologin Cookies (if you need not, do comment out)
$expire = time() + $xoopsConfig['session_expire'] * 60 ;
setcookie( 'uid' , $_COOKIE['uid'] , $expire , '/' , '' , 0 ) ;
setcookie( 'pass' , $_COOKIE['pass'] , $expire , '/' , '' , 0 ) ;
} else {
setcookie( 'uid' , -1 , time() - 3600 , '/' , '' , 0 ) ;
setcookie( 'pass' , -1 , time() - 3600 , '/' , '' , 0 ) ;
}
}
//end autologin code//

if (!empty($HTTP_SESSION_VARS['xoopsUserId'])) {
$xoopsUser =& $member_handler->getUser($HTTP_SESSION_VARS['xoopsUserId']);
if (!is_object($xoopsUser)) {
$xoopsUser = '';

*****line 250*****

if ($xoopsModule->getVar('hasconfig') == 1 || $xoopsModule->getVar('hascomments') == 1 || $xoopsModule->getVar( 'hasnotification' ) == 1) {
$xoopsModuleConfig =& $config_handler->getConfigsByCat(0, $xoopsModule->getVar('mid'));
}
}
/*-------------------------------*/
// IPBM exists + session_id + uid /
/*-------------------------------*/
$sql = "SELECT mid FROM ".$xoopsDB->prefix('modules')." WHERE dirname='ipboard' AND isactive='1'";
$ismodule = $xoopsDB->fetchArray($xoopsDB->query($sql));
if ($ismodule['mid']){
$isbb = 1;
}else {
$isbb = 0;
}

if ($xoopsUser) {
$uid_bb = $xoopsUser->getVar('uid');
$xoopsDB->query("DELETE FROM ".$xoopsDB->prefix('ipb_validating')." WHERE member_id = $uid_bb AND lost_pass = 1");
}else {
$uid_bb = 0;
}
$meminfo = $xoopsDB->fetchArray($xoopsDB->query("SELECT * FROM ".$xoopsDB->prefix('users')." WHERE uid = $uid_bb"));
$sessinfo = $xoopsDB->fetchArray($xoopsDB->query("SELECT * FROM ".$xoopsDB->prefix('session')." WHERE member_id = $uid_bb"));
$sid_bb = session_id();
/*-------------------------------*/
}
?>



Quote:

*** modules/system/templates/blocks/system_block_login.html.origTue Mar 18 18:31:20 2003

--- modules/system/templates/blocks/system_block_login.htmlMon Sep 8 19:32:28 2003

***************

*** 1,4 ****
<{$block.lang_username}>

<{$block.lang_password}>


Auto Login
<{$block.sslloginlink}>

<{$block.lang_lostpass}>



<{$block.lang_registernow}>









Login

Who's Online

561 user(s) are online (333 user(s) are browsing Support Forums)


Members: 0


Guests: 561


more...

Donat-O-Meter

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

Latest GitHub Commits