[TYPO3] About bahag_photogallery
Tapio Markula
tapio.markula at dnainternet.net
Wed Apr 26 09:26:01 CEST 2006
Chetan Thapliyal wrote:
> Hi Tapio
>
> The display image comments functionality in gallery is working properly.
Sorry - you are right. I have missed the name of the image - I put it
into the field 'source'. I had misunderstood fields.
When I put the name after the the folder path comments working.
Word 'path' was for me misleading word.
Work ok in single view and pop-up windows (doesn't however show title
and alt texts in 'overview.
>Also, it would be great if you could send the code you are trying to implement in the gallery.
Here is the code, which I modified and which should add two new items to
###PAGING### using ###PAGING2###
'###PAGING###' => $this->getNavigation(1),
'###PAGING2###' => $this->getNavigation(2),
...
# I adde a parameter for the function
function getNavigation($mode=1) {
$content = '';
$itemCount = $this->getGalleryImgCount( $this->currentGalleryID);
$pageSize = $this->imageRows * $this->imageColumns;
$objPaging = new tx_bahagphotogallery_paging( $this->resultPage,
$itemCount, $pageSize);
$nav = $objPaging->getPageNav();
if (is_array($nav) && !empty($nav)) {
if($mode==2 && $itemCount >0 && !empty($nav['prev']['resultPage']) &&
!($nav[2]['resultPage'] == $nav['curr']['resultPage']))
{
$urlParameters = array('resultPage' => 1,
'gallery' => $this->currentGalleryID
);
$content .= ' <a href = '.$this->getUrl($GLOBALS["TSFE"]->id,
$urlParameters).'>'.$this->pi_getLL('first_page').'</a> ';
}
if (!empty($nav['prev']['resultPage'])) {
$urlParameters = array(
'resultPage' => $nav['prev']['resultPage'],
'gallery' => $this->currentGalleryID
);
$content .= '<a href = '.$this->getUrl($GLOBALS["TSFE"]->id,
$urlParameters).'>'.$this->pi_getLL('previous_page').'</a> | ';
}
for ($i = 1; $i <= count($nav); $i++) {
if (!empty($nav[$i]['resultPage'])) {
if ($nav[$i]['resultPage'] == $nav['curr']['resultPage']) {
$content .= ' '.$i.' ';
}
else {
$urlParameters = array('resultPage' => $i,
'gallery' => $this->currentGalleryID
);
$content .= ' <a href = '.$this->getUrl($GLOBALS["TSFE"]->id,
$urlParameters).'>'.$i.'</a> ';
}
}
}
if (!empty($nav['next']['resultPage'])) {
$urlParameters = array(
'resultPage' => $nav['next']['resultPage'],
'gallery' => $this->currentGalleryID
);
$content .= ' | <a href = '.$this->getUrl($GLOBALS["TSFE"]->id,
$urlParameters).'>'.$this->pi_getLL('next_page').'</a>';
}
if($mode==2 && count($nav)>0 && !empty($nav['next']['resultPage']) &&
!($nav[$itemCount-1]['resultPage'] == $nav['curr']['resultPage']))
{
$urlParameters = array('resultPage' => $itemCount,
'gallery' => $this->currentGalleryID
);
$content .= ' <a href = '.$this->getUrl($GLOBALS["TSFE"]->id,
$urlParameters).'>'.$this->pi_getLL('last_page').'</a> ';
}
}
return $content;
}
that doesn't render 'First' to the second image and 'Last' for the
image before the last image because 'Previous/Next' do the same task.
I srijan_photogallery was a table for EXIF-data, which is not in
bahag_photogallery - maybe not needed at all? I don't fully understand
what means EXIF and IPTC because the meaning is not explained. They are
just unknow acronyms, which purpose I must just quess.
I could send Finnish translations of bahag_photogallery.
Endeed - as I have told - /pi1/locallang.php doesn't work as expected
because just 'default' language labels work (really weird; I compared
pi1-classe of 'mininews' and 'bahag_photogallery' and I didn't find
remarkable differencies using language functions).
More information about the TYPO3-english
mailing list