41
Panos
Re: Autologin for Xoops 2.0.x
  • 2003/7/8 11:56

  • Panos

  • Friend of XOOPS

  • Posts: 87

  • Since: 2003/3/20


Logout won't work since the Autologin hack modifies your cookies, as long as you have checked the "Remember me" box. To log out completely you have to either not check that box or clear the respective cookies.

42
john47
Re: Autologin for Xoops 2.0.x
  • 2003/7/15 20:48

  • john47

  • Just popping in

  • Posts: 24

  • Since: 2003/4/24


i cant find Control Panel->Administration->Template Editor->Sytem->system_block_login.html can somone help?

43
patagon
Re: Autologin for Xoops 2.0.x
  • 2003/7/15 20:55

  • patagon

  • Quite a regular

  • Posts: 235

  • Since: 2002/1/8 0


Its actually in your control panel. System is usually the first item on the left menu and from there you have to choose templateset from the menu that appears when you mouse over. Then choose system on the template you are using, you will see the file in that list.

44
john47
Re: Autologin for Xoops 2.0.x
  • 2003/7/16 18:48

  • john47

  • Just popping in

  • Posts: 24

  • Since: 2003/4/24


lol ok i got to the spot but i cant save it i can only view..... god this is pissing me off look:

system_block_login.html

Shows login form 2003/6/1 18:04:05 [View] [Download]

when i click view it goes here..

Edit template file
File name system_block_login.html
Description Shows login form
Last modified 2003/6/1 18:04:05
[ Box with html ]
then it only has a view button.. do i have to download it or somthing?

45
destrux
Re: Autologin for Xoops 2.0.x
  • 2003/7/16 19:05

  • destrux

  • Moderator

  • Posts: 57

  • Since: 2002/6/3 1


Yeah templates can only be viewed, not edited from there. Don't ask me why, lol. I have the slightest clue. But regardless, I just downloaded system_block_login.html from system/modules/templates and modified the file manually and then reuploaded it. After that you can go to modules admin and update the system module and the change should take effect.

46
patagon
Re: Autologin for Xoops 2.0.x
  • 2003/7/16 19:11

  • patagon

  • Quite a regular

  • Posts: 235

  • Since: 2002/1/8 0


Thats strange...I always edit them from there (by changing the html in teh box). in fact I wouldnt even know how to do it if it wasnt for that Maybe we have diferent versions or we managed to get to a different place...

47
double1
Re: Autologin - does it update xoopsmembers "last login date"
  • 2003/7/16 19:13

  • double1

  • Just popping in

  • Posts: 8

  • Since: 2003/4/26


Hi AndreyRa,

What I would like to know is if your autologin also updates the "Last Login Date" that is shown when you list members through the XOOPSMEMBERS module?

I'm currenly using the autologin from Jan's site (http://www.jan304.org ) and while it works great to keep people logged in, it doesn't update the "last Login Date" on the xoopsmembers module

This is really too bad, because now I can't know anymore when users last visited my site

Can you tell me if your hack doesn't suffer from this problem? I'd really like to know before I change to your hack

Thanks and best regards,

Ross

48
destrux
Re: Autologin for Xoops 2.0.x
  • 2003/7/16 19:18

  • destrux

  • Moderator

  • Posts: 57

  • Since: 2002/6/3 1


yes, patagon, you're right, I apologize. In order to edit your templates you have to clone the existing set. Basically you cannot edit the default template set. So therefore if you just clone the template set you use you can edit the system_block_login.html file and then click submit and then set that template set as your new default.

As you can see I haven't much experience playing with the templating system . Guess I got some studying up to do,

49
patagon
Re: Autologin for Xoops 2.0.x
  • 2003/7/17 3:25

  • patagon

  • Quite a regular

  • Posts: 235

  • Since: 2002/1/8 0


Thanks destrux, I was a bit worried I was doing things wrong probably because it took me some time to figure the templates thing myself (I did everything wrong at first, sergio, the dev who managed the argentinian support site, leaded me to the right direction after my initial screw ups. BTW wonder where he is now..). I found XOOPS has many things like this IMO, they look hard at first but then you realize how powerful and actually easy they are (hard from a newbee point of view, so in a way its nice to know sometimes even experienced users feel it

50
beyond_
Re: Autologin - does it update xoopsmembers "last login date"
  • 2003/7/17 14:04

  • beyond_

  • Just popping in

  • Posts: 1

  • Since: 2003/6/8 1


Hi Double1,

I just installed this hack and it doesn't update the "last Login Date" on the xoopsmembers module either.

If you don't mind that 'last login date' actually shows 'last seen date' you can do the following:

Insert code after line 49 ($online_handler->write($uid, $uname, time(),...) in modules/system/blocks/system_blocks.php.

// Update last_login xoops_users-table
$sql "SELECT count(*) FROM ".$xoopsDB->prefix("users")." WHERE uid=".$uid."";
$result $xoopsDB->query($sql);
list(
$getRowsNum) = $xoopsDB->fetchRow($result);

if ( 
$getRowsNum 0) {
   
$sql "UPDATE ".$xoopsDB->prefix("users")." SET last_login = " time() . " WHERE uid=".$uid."";

   
$xoopsDB->queryF($sql);
}
// End update last_login xoops_users-table


Also add $xoopsDB to the globals in line 34 so it reads:
global $xoopsDB$xoopsConfig$xoopsUser$xoopsModule$HTTP_SERVER_VARS;


Good luck,
Inge

Login

Who's Online

120 user(s) are online (74 user(s) are browsing Support Forums)


Members: 0


Guests: 120


more...

Donat-O-Meter

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

Latest GitHub Commits