MOD: Comments in a popup window MOD: Comments in a popup window
 

News:

cpg1.5.48 Security release - upgrade mandatory!
The Coppermine development team is releasing a security update for Coppermine in order to counter a recently discovered vulnerability. It is important that all users who run version cpg1.5.46 or older update to this latest version as soon as possible.
[more]

Main Menu

MOD: Comments in a popup window

Started by isloera, January 23, 2006, 04:54:09 AM

Previous topic - Next topic

0 Members and 1 Guest are viewing this topic.

isloera

My users always, for some reason, seem to think that the comments section of the gallery is a chat or even a forum. I remind them over and over again that the comments have to be  100% related to the pictures, but they don't understand, so I decided to modify Coppermine to show the comments in a popup window. It also helps so that when you just want to browse the Gallery you don't have to wait for the comments to load everytime. Now, if I want to read the comments for a speciif picture, I choose to do it when I want to ;).

There are two ways of installing this mod: the Pre Modded Files and  the Code Changes.
With the Pre Modded files the files  can just be replaced  that's about  it. Doing the Code Changes takes longer, but it is helpful if there are any other mods already installed in your CPG (The mod instructions follow, almost, the mod template for phpbb mods ;-) here you can find the guide to install this kind of mods, if you choose to do the code changes)

Here is  what it looks like after installing this mod:


As you can see, the comments section is gone. Only a link appears now in the form: Comments (<number of comments here>)

(https://coppermine-gallery.com/forum/proxy.php?request=http%3A%2F%2Fimg151.imageshack.us%2Fimg151%2F6445%2Fex15py.th.jpg&hash=5d5c4738cc0c09abb0bd9e85f31365668b853256)





When the link is clicked, the popup shows up with all the comments and a thumbnail of the picture. The template can be modified easily to show only what you want.

(https://coppermine-gallery.com/forum/proxy.php?request=http%3A%2F%2Fimg388.imageshack.us%2Fimg388%2F208%2Fex25xh.th.jpg&hash=b14e00932bcb693a4207b4821a46d532c0b83519)


##############################################################
## MOD Title: Comments in a popup window
## MOD Author: isloera < isloera AT sbcglobal DOT net > (Israel J. Sustaita)  www.calvilloweb.com
## MOD Description: This mod enables Coppermine to display the comments in a
## popup window. The number of comments available is shown as a link under the
## picture description, kind of like a blog does.
##
## MOD Version: 1.0.1
##
## Coppermine Version: CPG 1.4.3 (stable) and Up
##
## Installation Level: (easy)
## Installation Time: 1 Minute
## Included Files:
##      root/comments.php,
##      root/displayimage.php,
##      root/include/themes.inc.php,
##      root/delete.php,
##      root/db_input.php,
##      root/lang/english.php
##      root/lang/spanish.php
##
##     
## License: http://opensource.org/licenses/gpl-license.php GNU General Public License v2

##############################################################
## Author Notes: The popup generates valid HTML and CSS code.
## It works with all the themes available  in  CPG 1.4.3 (stable) version and Up                 
## Deleting, updating and posting  comments is done within the same popup window.
## It also respects group permissions and album settings.
##
##############################################################
## MOD History:
##
##   2006-01-22 - Version 1.0.1
##      - Fixed a bug that stopped the popup link from showing
##        when there was no title and image description
##
##   2006-01-22 - Version 1.0.0
##      - Initial release
##
##############################################################
## Before Adding This MOD To Your Gallery, You Should Back Up All Files Related To This MOD
##############################################################

Mod Is attached below ;)

Joachim Müller

an anonymous person has sent me this message:
QuoteSo maybe the author could give us a clue where this mod is ?
Answer: the mod is attached to isolera's posting.

isloera

I have included the Pre Modded Files for CPG 1.4.5 in the zip file.

Download is attached to the first post of this topic.

isloera

I have included the Pre Modded Files for the latest version CPG 1.4.9 here.   ;)

Also,  I would like to get some feedback about this mod from any users that have used it. I know is not very popular, but I'm curious to know if it is of any use at all, or if it works fine. :)

Gephri

Anyone know how to add the comment popup button to the navigation menu for intermediate images on displayimage.php?
Should be a simple addition - but cant figure it out.
Thanks!

hlabout

I like this mod verry much.
Tried to ad it to my website but encountered a problem.
When the pop-up window opens the backgound colour is white instead of black, like my theme, so my comments cannot be read. (white text)
How can i change this background colour in to black?
Made the code changes myself.

www.haraldlabout.nl/fotografie

Disabled the mod at this moment.
Hoping for a solution for this great mod.

Harald

isloera

#6
Quote from: hlabout on May 05, 2007, 10:59:34 AM
I like this mod verry much.
Tried to ad it to my website but encountered a problem.
When the pop-up window opens the backgound colour is white instead of black, like my theme, so my comments cannot be read. (white text)
How can i change this background colour in to black?
Made the code changes myself.

www.haraldlabout.nl/fotografie

Disabled the mod at this moment.
Hoping for a solution for this great mod.

Harald

It seems that you  hard coded  the background and the stylesheet location into the html.


The original should have something like this:
<link rel="stylesheet" href="themes/theme_name_here/style.css" type="text/css" />

This is your code:
<link href="style.css" rel="stylesheet" type="text/css">
<body bgcolor="#000000">


The comment popup window has the original code which dynamically changes the theme according to the user's preferences. I suppose you can do the same to the popup to reflect the same look as the gallery.


Install  the comment popup mod

Open your includes/themes.inc.php    file and  go to line, or close, to 1197 and you'll see

<link rel="stylesheet" href="{THEME}style.css" type="text/css" />


replace it with
<link href="style.css" rel="stylesheet" type="text/css">
<body bgcolor="#000000">


Let me know if that fixed the problem.

jtothek3030

Hi, thanks for the great mod.  It works great for 2 of my 3 coppermine gallery sites.  However, the link for the popup commentary windows does not display in my third site.  the only difference is that this site uses a slightly modified Rainyday theme, whereas the other two use igames and classic theme.  So either the this mod doesnt work for the Rainyday theme as is, or one of the changes i made to it is somehow stopping the popup link from showing.  ive attached my theme, any help you can give me would be appreciated. 

jtothek3030

forgot to include link to my site http://eoraptor.com and also to note that if i change the theme in the configuration menu that the poplink shows up.

jtothek3030

ok, so i figured it out, rainyday theme works fine unmodified.  Not sure why but the bit of code i had added from sample/themes.php so that i could put google adsense start/end tags around the comments caused the problem.  So i removed the following code and everything works great now, thanks a lot for  saving my bandwidth.

Code removed from my theme.php:

// HTML template for intermediate image display
$template_display_media = <<<EOT
        <tr>
                <td align="center" class="display_media" nowrap="nowrap">
                        <table cellspacing="2" cellpadding="0" class="imageborder">
                                <tr>
                                        <td align="center">
                                                {IMAGE}

                                        </td>
                                </tr>
                        </table>
                </td></tr>
                <tr><td>
                                                <table width="100%" cellspacing="2" cellpadding="0" class="tableb">
                                <tr>
                                        <td align="center">

                                                {ADMIN_MENU}
                                        </td>
                                </tr>
                        </table>

<!-- BEGIN img_desc -->
                        <table cellpadding="0" cellspacing="0" class="tableb" width="100%">
<!-- BEGIN title --><!-- google_ad_section_start -->
                                <tr>
                                        <td class="tableb"><center><b>
                                                {TITLE}
                                        </b></center></td>
                                </tr>
<!-- END title -->
<!-- BEGIN caption -->
                                <tr>
                                        <td class="tableb"><center>
                                                {CAPTION}
                                        </center></td>
                                </tr>
<!-- END caption -->
                        </table>
<!-- END img_desc --><!-- google_ad_section_end -->
                </td>
        </tr>

EOT;

isloera

I'm sorry I wasn't able to answer your question before, but I see you figured it out. I'm glad this mod is useful to you. Enjoy! ;)