1
tomodea
extgallery - Problem getting link to a new photo in the notification message
  • 2009/5/22 3:37

  • tomodea

  • Just popping in

  • Posts: 47

  • Since: 2008/2/19


I have been using extgallery for some time and I'm very happy with it.

However, when a new photo is uploaded the notification message has a link to the Category/Album not the photo. This means that the user can click on the link then scroll through the photos within the Category/Album and try and figure out which photo is the new one.

It would be better to change the notification message so that it has a link to the photo instead of the Category/Album.

Please see my post at zoullou.net for details:
http://www.zoullou.net/modules/newbb/viewtopic.php?forum=2&post_id=2583#forumpost2583
Regards, Tom O'Dea
Melbourne, Australia

2
DarinAllan
Re: extgallery - Problem getting link to a new photo in the notification message

There is a "Last photo" block which you could display in extgallery, but apart from that fairly obvious thing to do, maybe the code used to create that block may help achieve what you want.

From the file extgallery/blocks/extgallery_blocks.php

The code for that particular block is below I think, I am just guessing ;o)

function extgalleryLastShow($options) {
    
    
$photoHandler xoops_getmodulehandler('publicphoto''extgallery');
    
    
$param = array('limit'=>$options[0]);
    
$direction $options[1];
    
$desc $options[2];
    
    
array_shift($options);
    
array_shift($options);
    
array_shift($options);
    
    
$categories = array();
    foreach(
$options as $cat) {
        if(
$cat == 0) {
            
$categories = array();
            break;
        }
        
$categories[] = $cat;
    }
    
$param['cat'] = $categories;
    
    
$photos $photoHandler->objectToArray($photoHandler->getLastPhoto($param));
    
    if(
count($photos) == 0) {
        return array();
    }
    
    
$ret =     array(
                
'photos'=>$photos
                
'direction'=>$direction
                
'desc'=>$desc
            
);
    return 
$ret;
}


Would anything in the above help?

3
tomodea
Re: extgallery - Problem getting link to a new photo in the notification message
  • 2009/5/27 3:15

  • tomodea

  • Just popping in

  • Posts: 47

  • Since: 2008/2/19


Quote:

DarinAllan wrote:
There is a "Last photo" block which you could display in extgallery, but apart from that fairly obvious thing to do, maybe the code used to create that block may help achieve what you want.

From the file extgallery/blocks/extgallery_blocks.php

The code for that particular block is below I think, I am just guessing ;o)

function extgalleryLastShow($options) {
    
    
$photoHandler xoops_getmodulehandler('publicphoto''extgallery');
    
    
$param = array('limit'=>$options[0]);
    
$direction $options[1];
    
$desc $options[2];
    
    
array_shift($options);
    
array_shift($options);
    
array_shift($options);
    
    
$categories = array();
    foreach(
$options as $cat) {
        if(
$cat == 0) {
            
$categories = array();
            break;
        }
        
$categories[] = $cat;
    }
    
$param['cat'] = $categories;
    
    
$photos $photoHandler->objectToArray($photoHandler->getLastPhoto($param));
    
    if(
count($photos) == 0) {
        return array();
    }
    
    
$ret =     array(
                
'photos'=>$photos
                
'direction'=>$direction
                
'desc'=>$desc
            
);
    return 
$ret;
}


Would anything in the above help?


Thanks for the suggestion.

I'll work on this and let you know.
Regards, Tom O'Dea
Melbourne, Australia

Login

Who's Online

315 user(s) are online (240 user(s) are browsing Support Forums)


Members: 0


Guests: 315


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