1
FreddyH
Myabum error with 2.5.6
  • 2013/7/1 17:02

  • FreddyH

  • Just popping in

  • Posts: 18

  • Since: 2013/7/1 1


Hi, I got an error in myalbum with 2.5.6. The submit.php file goes blank. Works well with 2.5.5 so i'm sticking to it for so long I guess. :)

2
Mamba
Re: Myabum error with 2.5.6
  • 2013/7/1 20:26

  • Mamba

  • Moderator

  • Posts: 11409

  • Since: 2004/4/23


As always, please provide:

- module's version
- PHP version

Please also turn the Debug on, and provide the errors generated, if any.
Support XOOPS => DONATE
Use 2.5.11 | Docs | Modules | Bugs

3
Almik
Re: Myabum error with 2.5.6
  • 2013/7/2 20:18

  • Almik

  • Just popping in

  • Posts: 4

  • Since: 2011/2/28


The question of the same module.
Wrong generated pagination in categories (list or table views).
XoopsPageNav function is not takes as $extra_arg current number of the category (cid). Due does not work navigate pages in current section. It is unclear where $get_append can get cid. Please help to correct pagination in categories. Thanks!

Xoops 2.5.6
MyAlbum 3.0.7 (last version from module repository on sourceforge)
(GIJoe, Updated by Wishcraft=Simon Roberts
Corrected by montuy337513 alias black_beard)

on screen viewcat.php in root of myalbum module
----
Resized Image

4
Mamba
Re: Myabum error with 2.5.6
  • 2013/7/2 21:11

  • Mamba

  • Moderator

  • Posts: 11409

  • Since: 2004/4/23


What PHP version?

And is the environment the same on both installations, i.e. the same PHP version?
Support XOOPS => DONATE
Use 2.5.11 | Docs | Modules | Bugs

5
Mamba
Re: Myabum error with 2.5.6
  • 2013/7/2 22:13

  • Mamba

  • Moderator

  • Posts: 11409

  • Since: 2004/4/23


I did install it and submission worked OK:

XOOPS 2.5.6
PHP 5.4.16

The only problem so far I've discovered is inconsistency in upload directories, so you might check on this in your Preferences:

Path to photos is /uploads/photos
Path to thumbnails is /uploads/thumbs

But it says that it should be the same. If so, why is it then listed separately in Preferences? I'll look into it some more...
Support XOOPS => DONATE
Use 2.5.11 | Docs | Modules | Bugs

6
Almik
Re: Myabum error with 2.5.6
  • 2013/7/2 23:00

  • Almik

  • Just popping in

  • Posts: 4

  • Since: 2011/2/28


Module work good. This I agree. You created categories and posted several photos for have pagination of pages? That's only in this case does not correct work links to navigation in pagination.

Forgot about environment:
PHP 5.4.7
XOOPS 2.5.6

Unfortunately, I have not found where it came this variable - $get_append .
Used existing variable $cid and offered it as query. Maybe this is wrong, but the navigation is now working.
Quote:
Deleted:

if (!isset($get_append)) $get_append = 0;
$nav = new XoopsPageNav( $photo_small_sum , $num , $pos , 'pos' , "$get_append&num=$num&orderby=$orderby" ) ;

Quote:
Added:

$nav = new XoopsPageNav( $photo_small_sum , $num , $pos , 'pos' , "&cid=$cid&num=$num&orderby=$orderby" ) ;

7
Mamba
Re: Myabum error with 2.5.6
  • 2013/7/3 0:19

  • Mamba

  • Moderator

  • Posts: 11409

  • Since: 2004/4/23


Quote:
Unfortunately, I have not found where it came this variable - $get_append
I checked in the older version 2.91, and GIJoe was setting the value like this: Quote:
$get_append = "cid=$cid"; ... $get_append = "uid=-1" ; ... $get_append = "uid=$uid" ; ... $get_append = "cid=0";
depending on other values:
if( $cid ) {

    
// GIJ TODO  append error check!
    
$rs $xoopsDB->query"SELECT title FROM $table_cat WHERE cid='$cid'" ) ;
    list( 
$cat_title ) = $xoopsDB->fetchRow$rs ) ;
    
$xoopsTpl->assign'xoops_pagetitle' $myts->makeTboxData4show$cat_title ) ) ;

    
// Category Specified
    
$xoopsTpl->assign'category_id' $cid ) ;
    
$xoopsTpl->assign'subcategories' myalbum_get_sub_categories$cid $cattree ) ) ;    $xoopsTpl->assign'category_options' myalbum_get_cat_options() ) ;

    
$cids $cattree->getAllChildId$cid ) ;
    
array_push$cids $cid ) ;
    
$photo_total_sum myalbum_get_photo_total_sum_from_cats$cids "status>0" ) ;
    
$sub_title preg_replace"/'>/" "'>$mod_url/images/folder16.gif' alt='' />" $cattree->getNicePathFromId$cid 'title' "viewcat.php?num=$num) ) ;
    
$sub_title preg_replace"/^(.+)folder16/" '$1folder_open' $sub_title ) ;
    
$xoopsTpl->assign'album_sub_title' $sub_title ) ;

    
$where "cid=$cid";
    
$get_append "cid=$cid";
    
$join_append '' ;
    
$select_append '' ;

} else if( 
$uid != ) {

    
// This means 'my photo'
    
if( $uid ) {
        
$xoopsModule->getInfo() ;
        
$where "submitter=$my_uid;
        
$get_append "uid=-1" ;
        
$xoopsTpl->assign'uid' , -) ;
        
$xoopsTpl->assign'album_sub_title' _ALBM_TEXT_SMNAME4 ) ;
        
$xoopsTpl->assign'xoops_pagetitle' _ALBM_TEXT_SMNAME4 ) ;
    
// uid Specified
    
} else {
        
$where "submitter=$uid;
        
$get_append "uid=$uid;
        
$xoopsTpl->assign'uid' $uid ) ;
        
$xoopsTpl->assign'album_sub_title' "$mod_url/images/myphotos.gif' alt='' />" myalbum_get_name_from_uid$uid ) ) ;
        
$xoopsTpl->assign'xoops_pagetitle' myalbum_get_name_from_uid$uid ) ) ;
    }
    
$join_append "LEFT JOIN $table_cat c ON l.cid=c.cid" ;
    
$select_append ', c.title AS cat_title' ;

} else {

    
$where "cid=0";
    
$get_append "cid=0";
    
$join_append '' ;
    
$select_append '' ;
    
$xoopsTpl->assign'album_sub_title' 'error: category id not specified' ) ;

}
It looks like in version 3.0, Wishcraft converted parts of the code to use Criteria, which was good, but unfortunately he left the "$get_append" variable in the code:
if (!isset($get_append)) $get_append 0;
$nav = new XoopsPageNav$photo_small_sum $num $pos 'pos' "$get_append&num=$num&orderby=$orderby) ;
even if it didn't exist anymore. Check the logic of the original code, and see if your change follows that... It seems like $get_append = "cid=$cid"; was only for the case when $cid > 0
Support XOOPS => DONATE
Use 2.5.11 | Docs | Modules | Bugs

Login

Who's Online

466 user(s) are online (329 user(s) are browsing Support Forums)


Members: 0


Guests: 466


more...

Donat-O-Meter

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

Latest GitHub Commits