forum.coppermine-gallery.net
No Support => Modifications/Add-Ons/Hacks => Mods: Searching => Topic started by: Makc666 on March 15, 2007, 11:56:53 am
-
##############################################################
## MOD Title: Keyword of album on displayimage page
## MOD Author: Makc666 < makc666 :P newmail :-\ ru > (Maxim) http://makc666.com
## MOD Description: If there is keyword for album it will be displayed on displayimage page as a separate line
## MOD Version: 1.0.0
##
## Installation Level: (Easy)
## Installation Time: 2 Minute
## Files To Edit:
## displayimage.php
## lang/english.php
## Included Files: (n/a)
##############################################################
-
Makc666, thanks for this beautiful work :)
##############################################################
## MOD Title: Keyword of album on displayimage page
## MOD Author: Makc666 < makc666 :P newmail :-\ ru > (Maxim) http://makc666.com
## MOD Description: If there is keyword for album it will be displayed on displayimage page as a separate line
## MOD Version: 1.0.0
##
## Installation Level: (Easy)
## Installation Time: 2 Minute
## Files To Edit:
## displayimage.php
## lang/english.php
## Included Files: (n/a)
##############################################################
-
I was asked how to add/display words from line "Keywords of Album:" to/in the line "Keywords:"?
1st, the mod must be installed.
2nd,
#
#-----[ OPEN ]------------------------------------------
#
displayimage.php
#
#-----[ FIND ]------------------------------------------
#
if ($CURRENT_PIC_DATA['keywords'] != "") {
$info[$lang_picinfo['Keywords']] = '<span class="alblink">' . preg_replace("/(\S+)/", "<a href=\"thumbnails.php?album=search&search=\\1\">\\1</a>" , $CURRENT_PIC_DATA['keywords']) . '</span>';
}
#
#-----[ AFTER, ADD ]------------------------------------------
#
if ($CURRENT_PIC_DATA['keywords'] && $CURRENT_ALBUM_DATA['keyword']) {
$info[$lang_picinfo['Keywords']] .= ', <span class="alblink">' . preg_replace("/(\S+)/", "<a href=\"thumbnails.php?album=search&search=\\1\">\\1</a>" , $CURRENT_ALBUM_DATA['keyword']) . '</span>';
}
if (!$CURRENT_PIC_DATA['keywords'] && $CURRENT_ALBUM_DATA['keyword']) {
$info[$lang_picinfo['Keywords']] = '<span class="alblink">' . preg_replace("/(\S+)/", "<a href=\"thumbnails.php?album=search&search=\\1\">\\1</a>" , $CURRENT_ALBUM_DATA['keyword']) . '</span>';
}
#
#-----[ FIND ]------------------------------------------
#
if ($CURRENT_ALBUM_DATA['keyword'] != "") {
$info[$lang_picinfo['Keywords album']] = '<span class="alblink">' . preg_replace("/(\S+)/", "<a href=\"thumbnails.php?album=search&search=\\1\">\\1</a>" , $CURRENT_ALBUM_DATA['keyword']) . '</span>';
}
#
#-----[ REPLACE WITH ]------------------------------------------
#
//code removed
#
#-----[ SAVE/CLOSE ALL FILES ]------------------------------------------
#
# EoM
-
I read out post thanks for sharing the information regarding the Keyword of album on display image page,its cools and keen to try out these.