forum.coppermine-gallery.net

No Support => Modifications/Add-Ons/Hacks => Mods: Searching => Topic started by: Makc666 on March 15, 2007, 11:56:53 am

Title: [MOD] Keyword of album on displayimage page
Post 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)
##############################################################
Title: Re: Keyword of album on displayimage page
Post by: mywedding on February 03, 2008, 04:39:16 am
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)
##############################################################
Title: Re: [MOD] Keyword of album on displayimage page
Post by: Makc666 on July 03, 2008, 10:55:17 am
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,
Code: [Select]
#
#-----[ 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&amp;search=\\1\">\\1</a>" , $CURRENT_PIC_DATA['keywords']) . '</span>';
    }
#
#-----[ AFTER, ADD ]------------------------------------------
#

    if ($CURRENT_PIC_DATA['keywords'] && $CURRENT_ALBUM_DATA['keyword']) {
        $info[$lang_picinfo['Keywords']] .= ',&nbsp;<span class="alblink">' . preg_replace("/(\S+)/", "<a href=\"thumbnails.php?album=search&amp;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&amp;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&amp;search=\\1\">\\1</a>" , $CURRENT_ALBUM_DATA['keyword']) . '</span>';
    }

#
#-----[ REPLACE WITH ]------------------------------------------
#
//code removed
#
#-----[ SAVE/CLOSE ALL FILES ]------------------------------------------
#
# EoM
Title: Re: [MOD] Keyword of album on displayimage page
Post by: lahmanwokard on February 15, 2010, 02:02:20 pm
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.