1
ccrstudioweb
XCGAL scroll image caption

Hi all, I hope it help.
The case: The default caption for scroll images are the time and the submiter.

If you want to change it to the image title, do it as follow:

on xcgal/blocks/xcgal_blocks.php change about 317:
case '2'// Last uploads
                
$select_columns .= ', owner_id';

                
$result $xoopsDB->query("SELECT $select_columns FROM ".$xoopsDB->prefix("xcgal_pictures")." WHERE approved = 'YES' $ALBUM_SET_BLOCK ORDER BY pid DESC LIMIT $count");
                
$rowset fetch_rowset_block($result);
                
$xoopsDB->freeRecordSet($result);
                if (
$set_caption) foreach ($rowset as $key => $row){
                        
$user_handler =& xoops_gethandler('member');
                    
$pic_owner =& $user_handler->getUser($row['owner_id']);
            if (
is_object ($pic_owner)){
                            
$user_link '.XOOPS_URL.'/userinfo.php?uid='.$pic_owner->uid().'">'.$pic_owner->uname().'';
                        } else {
                                
$user_link '';
                        }
                        
$caption "font-weight boldfont-size10pxpadding2pxdisplay block;">".formatTimestamp($row['ctime'],'m').$user_link.'';
                        
$rowset[$key]['caption_text'] = $caption;
                }

                return 
$rowset;
                break;



chang it to:


case '2'// Last uploads
                
$select_columns .= ', title';

                
$result $xoopsDB->query("SELECT $select_columns FROM ".$xoopsDB->prefix("xcgal_pictures")." WHERE approved = 'YES' $ALBUM_SET_BLOCK ORDER BY pid DESC LIMIT $count");
                
$rowset fetch_rowset_block($result);
                
$xoopsDB->freeRecordSet($result);
                 if (
$set_caption) foreach ($rowset as $key => $row){
                        
$caption $rowset[$key]['title'] ? "thumb_title">".$rowset[$key]['title']."'';
                        if (
$xoopsModuleConfig['caption_in_thumbview']){
                           
$caption .= $rowset[$key]['caption'] ? "thumb_caption">".$myts->makeTareaData4Show($rowset[$key]['caption'],0)."'';
                        }
                        if (
$xoopsModuleConfig['display_comment_count']) {
                                
$comments_nr =  xoops_comment_count($xoopsModule->mid(),$row['pid'] );
                                if (
$comments_nr 0$caption .= "thumb_num_comments">".sprintf(_MD_FUNC_COM$comments_nr )."";
                        }
                        
$rowset[$key]['caption_text'] = $caption;
                }

                return 
$rowset;
                break;


If it help you, let me know!!
Thanks!
My Google Maps API3 and Xoops integration (Cool!):
http://www.esterecomendo.com.br/portal/

2
kaaji
Re: XCGAL scroll image caption
  • 2009/7/18 0:03

  • kaaji

  • Just popping in

  • Posts: 2

  • Since: 2006/8/15


If you want use this great idea, you have to change something.

ccrstudioweb code :
"thumb_num_comments">


addon unslash before "

Sorry if i'm wrong, I not try, just looking.

Login

Who's Online

337 user(s) are online (216 user(s) are browsing Support Forums)


Members: 0


Guests: 337


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