Advanced search  

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]

Pages: [1]   Go Down

Author Topic: MOD: Comments in a popup window  (Read 23917 times)

0 Members and 1 Guest are viewing this topic.

isloera

  • Contributor
  • Coppermine novice
  • ***
  • Offline Offline
  • Gender: Male
  • Posts: 22
    • Calvilloweb.com
MOD: Comments in a popup window
« on: January 23, 2006, 04:54:09 am »

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>)

(http://img151.imageshack.us/img151/6445/ex15py.th.jpg)





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.

(http://img388.imageshack.us/img388/208/ex25xh.th.jpg)
 

##############################################################
## 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 ;)
« Last Edit: May 14, 2006, 10:15:09 am by GauGau »
Logged

Joachim Müller

  • Dev Team member
  • Coppermine addict
  • ****
  • Offline Offline
  • Gender: Male
  • Posts: 47843
  • aka "GauGau"
    • gaugau.de
Re: MOD: Comments in a popup window
« Reply #1 on: March 23, 2006, 08:48:08 am »

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

isloera

  • Contributor
  • Coppermine novice
  • ***
  • Offline Offline
  • Gender: Male
  • Posts: 22
    • Calvilloweb.com
Re: MOD: Comments in a popup window
« Reply #2 on: May 14, 2006, 04:47:01 am »

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.
Logged

isloera

  • Contributor
  • Coppermine novice
  • ***
  • Offline Offline
  • Gender: Male
  • Posts: 22
    • Calvilloweb.com
Re: MOD: Comments in a popup window
« Reply #3 on: September 10, 2006, 07:43:13 am »

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. :)
Logged

Gephri

  • Coppermine frequent poster
  • ***
  • Offline Offline
  • Posts: 235
Re: MOD: Comments in a popup window
« Reply #4 on: February 18, 2007, 07:24:22 am »

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!
Logged

hlabout

  • Coppermine frequent poster
  • ***
  • Offline Offline
  • Gender: Male
  • Posts: 118
    • Harald Labout Fotografie
Re: MOD: Comments in a popup window
« Reply #5 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
Logged

isloera

  • Contributor
  • Coppermine novice
  • ***
  • Offline Offline
  • Gender: Male
  • Posts: 22
    • Calvilloweb.com
Re: MOD: Comments in a popup window
« Reply #6 on: May 14, 2007, 12:54:47 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:
Code: [Select]
<link rel="stylesheet" href="themes/theme_name_here/style.css" type="text/css" />
This is your code:
Code: [Select]
<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
Code: [Select]
<link rel="stylesheet" href="{THEME}style.css" type="text/css" />
replace it with
Code: [Select]
<link href="style.css" rel="stylesheet" type="text/css">
<body bgcolor="#000000">

Let me know if that fixed the problem.
« Last Edit: May 14, 2007, 01:32:38 am by isloera »
Logged

jtothek3030

  • Coppermine novice
  • *
  • Offline Offline
  • Posts: 31
Re: MOD: Comments in a popup window
« Reply #7 on: June 02, 2007, 10:32:05 pm »

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. 
Logged

jtothek3030

  • Coppermine novice
  • *
  • Offline Offline
  • Posts: 31
Re: MOD: Comments in a popup window
« Reply #8 on: June 02, 2007, 10:35:26 pm »

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.
Logged

jtothek3030

  • Coppermine novice
  • *
  • Offline Offline
  • Posts: 31
Re: MOD: Comments in a popup window
« Reply #9 on: June 02, 2007, 11:07:53 pm »

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;
Logged

isloera

  • Contributor
  • Coppermine novice
  • ***
  • Offline Offline
  • Gender: Male
  • Posts: 22
    • Calvilloweb.com
Re: MOD: Comments in a popup window
« Reply #10 on: July 26, 2007, 07:06:09 am »

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! ;)
Logged
Pages: [1]   Go Up
 

Page created in 0.042 seconds with 20 queries.