201
GIJOE
Re: Myalbum on 1.3 > Myalbum-P on 2.0
  • 2003/9/16 20:42

  • GIJOE

  • Quite a regular

  • Posts: 265

  • Since: 2003/8/13


Quote:

ninja wrote:
thank you so much bro. Is the updated version already available for download at this site ?

by the way, User can modify / change photos, but can not delete their own photos. i dont know if this is a bug or you intented to make it that way.

You can download from the link of this site.

I didn't implement user can delete.
This is the same to newbb, isn't it?



202
GIJOE
Re: another auto-login by GIJOE for newbb & ipbm xoopsers
  • 2003/9/16 8:43

  • GIJOE

  • Quite a regular

  • Posts: 265

  • Since: 2003/8/13


Of course, it becomes a security hole.
Did you read this article?
https://xoops.org/modules/newbb/viewto ... c_id=11986&forum=20#48456

I think it is slight problem in community site, as long as admin's cookie is not stolen.




203
GIJOE
Re: Myalbum on 1.3 > Myalbum-P on 2.0
  • 2003/9/16 7:55

  • GIJOE

  • Quite a regular

  • Posts: 265

  • Since: 2003/8/13


Quote:

ninja wrote:
hi GIJOE
i just upgraded my album 1.13 to myalbum -p and everything is working fine, but when i look under one of the members profile page, i dont see all the photos that user had uploaded anymore.

This is a bug because of my misunderstanding for the feature of searching.
I've already fixed and prepare 2.02 for downloading.
Try it.



204
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 />





205
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.





206
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.



207
GIJOE
Re: Myalbum on 1.3 > Myalbum-P on 2.0
  • 2003/9/10 1:05

  • GIJOE

  • Quite a regular

  • Posts: 265

  • Since: 2003/8/13


There is no differences between the structures of tables myAlbum 1.1.3 and myAlbum-P 2.0.0.

You can transfer like this:

1. Backup 4 tables --- xoops_myalbum_photos, xoops_myalbum_cat, xoops_myalbum_text, and xoops_myalbum_votes. (neednot with 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-P 2.0.0 cleanly.
5. restore 4 tables.
6. set paths of photos and thumbs into preferences of myAlbum-P.




TopTop
« 1 ... 18 19 20 (21)



Login

Username:
Password:

Lost Password? Register now!

Who's Online

70 user(s) are online (39 user(s) are browsing Support Forums)


Members: 0


Guests: 70


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