[cpg1.4.x]: Advanced Guestbook integrated with Coppermine [cpg1.4.x]: Advanced Guestbook integrated with Coppermine
 

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

[cpg1.4.x]: Advanced Guestbook integrated with Coppermine

Started by Ludo, November 14, 2008, 12:32:09 PM

Previous topic - Next topic

0 Members and 5 Guests are viewing this topic.

Ludo

I started using Advanced Guestbook in my gallery a few months ago, thanks to this post from TranzNDance, but soon I got unsatisfied with that raw integration with my CPG theme.
So, I modified guestbook core and template files to achieve a full visual integration (actual CPG theme applies to guestbook too, without specifying styles in guestbook admin panel), and an easier installation (no more need to manually create an integration file, enter DB settings etc.): actually, only admin panel runs still "stand-alone" (but opening in a separate window).
Tested with all default themes plus Connections and Greenflower

Demo: http://vanrokken.altervista.org/guestbook.php?theme=paesaggi

Installation:

  • Extract attached archive to your CPG root directory
  • Give write permissions (at least 775) to these directories:
    • /guestbook/public
    • /guestbook/tmp
  • Run /guestbook/install.php in your browser and follow configuration instructions
  • Open /lang/your_language.php and add this code at the end of file (before ?> ):
// ------------------------------------------------------------------------- //
// File guestbook.php  
// ------------------------------------------------------------------------- //

if (defined('GUESTBOOK_PHP')) {

$lang_guestbook_php = array(
 'guestbook' => 'Guestbook', // "Guestbook" in your language
 'contact' => 'Contact us', // "Contact us" in your language
);
}


  • Now you can access guestbook from /guestbook.php (i.e. http://www.yourcpg.tld/guestbook.php) and admin panel - if logged in as Gallery admin - from the link on right top corner of guestbook area.
  • Either custom link option in CPG configuration or mod suggested by calvinite are good ways to place a link in the Gallery submenu ;)
  • Since v. 1.0.3, you can have your guestbook act like a contact form, by placing in your sys or sub menu a "Contact us" link to
    /guestbook.php?file=addentry&private=1
    "Private message" flag in the "add entry" page will be automatically selected, so that message sent by user will appear only in admin panel "Private messages" section and in your mailbox (if private messages notification by email is enabled). A convenient header is displayed on top of the form (English and Italian only, other languages need adapting translation).

Upgrade: extract attached archive to your CPG root directory, replacing existing (old version) files

Changelog:

  • 1.0.4 (11/5/2010)

    • fixed bug in opening full size images attached to messages (thanks to Forty2)
    • fixed admin panel footer

  • 1.0.3 (27/5/2009)

    • added check for "Private message" flag automatic selection (so Guestbook can act like a contact form)

  • 1.0.2 (27/3/2009)

    • fixed credits text in admin footer
    • now guestbook language follows selection (or default one) in Coppermine
    • fixed a bug with admin login (thanks to calvinite)

  • 1.0.1 (26/3/2009)

    • fixed a typo in readme file (thanks to calvinite)
    • guestbook code updated to v. 2.4.4

  • 1.0.0 (14/11/2008)

    • first public release

Feel free to post support requests, comments and suggestions in this thread  :) :-[

Joachim Müller

Thanks for your contribution. I split it from the thread that you replied to initially, as your mod deserves a thread of it's own imo. I renamed this thread as well.

Regards

Joachim

Ludo

#2
Quote from: Joachim Müller on November 16, 2008, 01:34:26 PM
Thanks for your contribution. I split it from the thread that you replied to initially, as your mod deserves a thread of it's own imo.
Thank you, I'm going to update support link in the readme file included in the archive.

QuoteI renamed this thread as well.
IMHO this new title doesn't match exactly with the mod, which doesn't simply apply Coppermine themes to stand-alone guestbook, but accomplishes a full integration of Advanced Guestbook in Coppermine (except for admin panel): can I rename it to "Advanced Guestbook integrated with Coppermine"? :)

Joachim Müller


Ludo


Cath22

I have installed per instruction, but upon entering the admin no matter what I click on it keeps repeating me for login name and password. So I cannot setup the admin??????
qui custodiet ipsos custodes

Ludo

Did you enter guestbook admin ID and password chosen during guestbook installation, when prompted to?

Cath22

Quote from: Ludo on January 11, 2009, 03:50:40 PM
Did you enter admin ID and password chosen during installation, when prompted to?

Yes I did.
qui custodiet ipsos custodes

Ludo

Do you get a warning of invalid username/password? If not, try cleaning your browser's cache

Cath22

Quote from: Ludo on January 11, 2009, 03:56:37 PM
Do you get a warning of invalid username/password? If not, try cleaning your browser's cache

installation is done succesfully, and no warning at all. Cleared cache, removed the tables and reinstalled, but same thing. If I click for instance general settings, i get the login screen again. It accepts my name and pass, since when I use another it says invalid username...
qui custodiet ipsos custodes

Cath22

I see the problem already, my database uses a separate prefix like iqpq_ while the install creates like guestbook_auth
I can change the table into iqpq_guestbook_auth but then I get other error like 1146 Table 'guestbook_config' doesn't exist. So I gather I have to add the prefix in the program, where can I best do this?
qui custodiet ipsos custodes

Ludo

#11
Guestbook tables prefix shall be different than CPG one, there's no bug.
Mouse over the links to guestbook admin sections and check if the session number in the link matches with the one in guestbook_auth table.
Maybe your PHP installation doesn't support sessions?

Cath22

Quote from: Ludo on January 12, 2009, 09:27:40 AM
Guestbook tables prefix shall be different than CPG one, there's no bug.
Mouse over the links to guestbook admin sections and check if the session number in the link matches with the one in guestbook_auth table.
Maybe your PHP installation doesn't support sessions?

I did a check :
http://www.fotofantastic.nl/guestbook/admin.php?action=settings&panel=general&session=749182e8b8f99b5ff29bbc654f23662b&uid=1

The session is the same as in the database so i guess the session is not supported.
Here is a list from coppermine
VERSION INFO :
------------------
PHP version: 5.2.6 - OK
------------------
mySQL version: 5.0.51a
------------------
Coppermine version: 1.4.19(stable)
==========================
Module: GD
------------------
GD Version: bundled (2.0.34 compatible)
FreeType Support: 1
FreeType Linkage: with freetype
T1Lib Support:
GIF Read Support: 1
GIF Create Support: 1
JPG Support: 1
PNG Support: 1
WBMP Support: 1
XPM Support:
XBM Support: 1
JIS-mapped Japanese Font Support:

==========================
Module: mysql
------------------
MySQL Supportenabled
Active Persistent Links 1
Active Links 3
Client API version 5.0.51a
MYSQL_MODULE_TYPE external
MYSQL_SOCKET /tmp/mysql.sock
MYSQL_INCLUDE -I/usr/local/mysql/include
MYSQL_LIBS -L/usr/local/mysql/lib -lmysqlclient 
==========================
Module: zlib
------------------
ZLib Support enabled
Stream Wrapper support compress.zlib://
Stream Filter support zlib.inflate, zlib.deflate
Compiled Version 1.2.3
Linked Version 1.2.3
==========================
Server restrictions (safe mode)?
------------------
Directive | Local Value | Master Value
safe_mode | Off | Off
safe_mode_exec_dir | no value | no value
safe_mode_gid | Off | Off
safe_mode_include_dir | no value | no value
safe_mode_exec_dir | no value | no value
sql.safe_mode | Off | Off
disable_functions | system,exec,shell_exec,passthru,proc_open,proc_get_status,proc_nice,proc_terminate,dl,popen,pcntl_exec | system,exec,shell_exec,passthru,proc_open,proc_get_status,proc_nice,proc_terminate,dl,popen,pcntl_exec
file_uploads | On | On
include_path | .:/usr/local/lib/php | .:/usr/local/lib/php
open_basedir | /home/deb11675/:/tmp:/usr/local/lib/php/ | no value
==========================
Size and Time
------------------
Directive | Local Value | Master Value
max_execution_time | 30 | 30
max_input_time | 60 | 60
upload_max_filesize | 8M | 8M
post_max_size | 8M | 8M
==========================
Page generated in 0.108 seconds - 19 queries in 0.022 seconds - Album set : ; Meta set: ;


qui custodiet ipsos custodes

Ludo

#13
Well, I've just discovered that guestbook sessions management doesn't relay on PHP sessions  :-[ ???
Apart from admin section, does your guestbook work?
Are all guestbook files stored in /guestbook/ directory under your CPG root?

Cath22

Quote from: Ludo on January 18, 2009, 02:54:32 PM
Well, I've just discovered that guestbook sessions management doesn't relay on PHP sessions  :-[ ???
Apart from admin section, does your guestbook work?
Are all guestbook files stored in /guestbook/ directory under your CPG root?

Yes, the guestbook works fine, except from the admin section, so i cant configure it the way i would like to.
And again yes  ;), the guestbook directory is placed in the cpg root. And cpg is in my webserver root, dont know if that makes a difference.

Cath
qui custodiet ipsos custodes

Ludo

#15
Sorry, but I really can't figure out the bug...I've just reinstalled guestbook from attached file and admin section works perfectly too!
Consider applying admin settings directly via database...  8)

P.S. Fixed a bug with guestbook admin email, now it is picked from CPG config table

rx-one

Hello, i've just installed w/o any problem this mod, seems to be cool ...

except a captcha issue, ( picture doesnt appear).

http://rx-photo.info/guestbook/

http://rx-photo.info/guestbook/image.php?id=5ec0848e7750c83f60ac93ddff2de805

I try 2 browsers, same pb, and i try direct link from others installations, it works fine. Is this a right pb, an hosting pb ?

Ty

Nibbler

Cause is probably this notice:


Notice:  Undefined index:  gallery_admin_email in /web/rxphoto/www/guestbook/admin/config.inc.php on line 88


Either get the notice fixed (probably related to the bug mentioned above) or disable display of errors.

Ludo

Quote from: rx-one on January 19, 2009, 07:45:02 PM
http://rx-photo.info/guestbook/
Not a valid url...

QuoteI try 2 browsers, same pb, and i try direct link from others installations, it works fine. Is this a right pb, an hosting pb ?
It looks like a "common" captcha issue: if you have GD2 libraries with Freetype support captcha will work, otherwise not. You can disable captcha by changing
define('USE_CAPTCHA', true);
to
define('USE_CAPTCHA', false);
in /guestbook/admin/config.inc.php

rx-one

hoops sorry, was : http://rx-photo.info/guestbook.php?file=addentry

I think all is ok :

QuoteGD Support    enabled
GD Version    bundled (2.0.28 compatible)
FreeType Support    enabled
FreeType Linkage    with freetype
FreeType Version    2.1.7
T1Lib Support    enabled
GIF Read Support    enabled
GIF Create Support    enabled
JPG Support    enabled
PNG Support    enabled
WBMP Support    enabled
XBM Support    enabled

seems not ?