forum.coppermine-gallery.net

Support => cpg1.5.x Support => cpg1.5 plugins => Topic started by: calvinite on July 17, 2012, 12:01:10 pm

Title: Advanced Guestbook integration for CPG 1.5.xx
Post by: calvinite on July 17, 2012, 12:01:10 pm
I've been using the Advanced Guestbook integration for CPG 1.4.x and when I upgraded to CPG 1.5.12 I lost the custom link I had created. I was able to restore the link but the "Leave a Message" link in the Advanced Guestbook no longer works.

Not realizing where I was, I posted in the Paid Help forum trying to find out if anyone had a solution. Αndré, informed me I was posting in the wrong place so I'm posting here and hope he finds it as he ported the integration to CPG 1.5.xx.

Αndré directed me to a link where I downloaded the current version, which he ported for altenae, who said it could be shared with the community. I uploaded it to my CPG installation, overwriting all files, and the "Leave a Message" link still does not work.

I checked a gallery that has a working integration, though I can't be certain of their CPG version, their guestbook version is Advanced Guestbook 2.4.4 - Coppermine integration 1.0.4. http://www.wildlife-photos.net/gallery/guestbook.php

After clicking the "Leave a Message" link, the url after the gallery level is /guestbook.php?file=addentry. In my installation, the url is the same, however, the page seems as if it is loading, but then stays on the guestbook entries. I am able to log in to the guestbook admin section with no problems.

I am using CPG 1.5.20 and Advanced Guestbook 2.4.4 - Coppermine integration 1.0.4 © 2010 E+GiElle. I created a custom link instead of using the custom link in the config section of CPG, as I was using that link for another page. The gallery is located at http://www.theprichardcollection.com/tpc_gallery/guestbook.php. The guest book is available to the public and registered users, but you can't leave a message regardless of being logged in or not.

I'm hoping Αndré, or someone can help me get the guestbook operating properly again.

Thanks...
Title: Re: Advanced Guestbook integration for CPG 1.5.xx
Post by: Αndré on July 25, 2012, 09:28:16 am
I can't be certain of their CPG version
It's cpg1.5.16. I just checked the guestbook in my local development gallery (cpg1.5.21), and the link also doesn't work there. Not sure if I use the latest guestbook version. Will perform some tests soon.
Title: Re: Advanced Guestbook integration for CPG 1.5.xx
Post by: Αndré on July 25, 2012, 09:40:25 am
Not sure if I use the latest guestbook version.
Seems that it wasn't the latest version. I just downloaded that package (http://forum.coppermine-gallery.net/index.php/topic,74793.msg360118.html#msg360118) and it works as expected in my gallery.
Title: Re: Advanced Guestbook integration for CPG 1.5.xx
Post by: calvinite on July 26, 2012, 01:32:08 am
I downloaded the package again, though I think it is the same one I downloaded before. I deleted the current installation and uploaded the new download and still, it displays past comments but won't allow new ones. I am using CPG 1.5.20 and Advanced Guestbook 2.4.4.

Perhaps I am doing something wrong. Is there anything other than uploading it that I need to do?

Thanks...
Title: Re: Advanced Guestbook integration for CPG 1.5.xx
Post by: Jeff Bailey on July 26, 2012, 04:39:17 am
Not too familiar with the Inspekt sanitization but after looking over the docs this
Code: [Select]
$_GET = $superCage->get->_source;
$_POST = $superCage->post->_source;
and this
Code: [Select]
if (isset($_GET['file'])) {
    include('guestbook/'.$_GET['file'].'.php');
} else {
    include('guestbook/index.php');
}   
in guestbook.php don't look right.
Title: Re: Advanced Guestbook integration for CPG 1.5.xx
Post by: Jeff Bailey on July 26, 2012, 04:43:35 am
Would this work?
Code: [Select]
if ($superCage->get->keyExists('file')) {
    $includepage = $superCage->get->keyExists('file');
    include('guestbook/'.$includepage.'.php');
} else {
    include('guestbook/index.php');
}
Title: Re: Advanced Guestbook integration for CPG 1.5.xx
Post by: calvinite on July 26, 2012, 06:20:38 am
Jeff,

I don't know what version you are looking at, but the version I downloaded from the link provided by Andre (Advanced Guestbook 2.4.4) doesn't have any superCage entries, anywhere in guestbook.php and the complete code, minus comments, is only 23 lines long. I wouldn't know where to insert the code you suggest, to try it, since there is no code to replace.
Title: Re: Advanced Guestbook integration for CPG 1.5.xx
Post by: calvinite on July 26, 2012, 06:40:19 am
Jeff,

I looked at guestbook.php with more scrutiny, and it has an include init.inc.php line. I looked inside that file and it has a require_once inspekt.php line. That got me thinking, since my file version didn't have the code
Code: [Select]
$_GET = $superCage->get->_source;
$_POST = $superCage->post->_source;
entries, that perhaps they were missing. I copied those lines from your first post, inserted them after the require init.inc.php line in guestbook.php and the 'Leave a Message' link now works. So, you did help after all. If you hadn't posted those lines of code, I probably would have never caught the difference. Thanks.

André, did I download the wrong version or should those lines be included in guestbook.php?
Seems that it wasn't the latest version. I just downloaded that package (http://forum.coppermine-gallery.net/index.php/topic,74793.msg360118.html#msg360118) and it works as expected in my gallery.

Thanks, you are both appreciated.

calvinite
Title: Re: Advanced Guestbook integration for CPG 1.5.xx
Post by: calvinite on July 26, 2012, 06:52:35 am
Meh, I must have uploaded the same version I had, or perhaps the server delayed updating the link provided by André as I downloaded as soon as I got the notification email.

I just downloaded it again and it has the Inspekt lines as it should.

So, I declare the issue resolved.

Many sincere thanks.

calvinite
Title: Re: Re: Advanced Guestbook integration for CPG 1.5.xx
Post by: Αndré on July 26, 2012, 09:25:31 am
Not too familiar with the Inspekt sanitization but after looking over the docs this
Code: [Select]
$_GET = $superCage->get->_source;
$_POST = $superCage->post->_source;
and this
Code: [Select]
if (isset($_GET['file'])) {
    include('guestbook/'.$_GET['file'].'.php');
} else {
    include('guestbook/index.php');
}   
in guestbook.php don't look right.

As you can see this is just a very lazy port, as I just repopulated the superglobals.



I declare the issue resolved.
If everything works as expected now, please
tag your answer as "solved" by clicking on the "Topic Solved" button on the bar at the left hand side at the bottom of your thread.
Title: Re: Advanced Guestbook integration for CPG 1.5.xx
Post by: calvinite on July 26, 2012, 09:48:12 am
Oop! Sorry about that. It's been a long day.

Tagged as solved.
Title: Re: Advanced Guestbook integration for CPG 1.5.xx
Post by: EndlessQuest on September 02, 2012, 07:50:07 pm
Hi all, I`m having some problems with the guestbook. (I believe this thread concerns the same guestbook as in this thread http://forum.coppermine-gallery.net/index.php/topic,73878.0.html)

I would like to have this guestbook on my page, but so far I`m not succesfull.

I understand the extracted content of the zip file goes into the root directory of my Coppermine Gallery.

But then what? Where am I supposed to see something in my gallery? How do I activate it?

I must be missing something here 
Title: Re: Advanced Guestbook integration for CPG 1.5.xx
Post by: Αndré on September 03, 2012, 01:18:33 pm
Open guestbook.php in your browser and you should see the guestbook.
Title: Re: Advanced Guestbook integration for CPG 1.5.xx
Post by: EndlessQuest on September 04, 2012, 11:13:22 pm
No I`m sorry, nothing there when I do that.

Could someone please describe what steps to take? Like;
:-[
Title: Re: Advanced Guestbook integration for CPG 1.5.xx
Post by: Αndré on September 05, 2012, 09:06:17 am
Could someone please describe what steps to take? Like;
  • Download zipfile from this forum
  • Unpack on local drive
  • Upload to root gallery
There's nothing more to do. If we're talking about that gallery (http://www.richards-fotos.nl/coppermine/), it seems that you forgot to upload the file guestbook.php (http://www.richards-fotos.nl/coppermine/guestbook.php), as the corresponding folder (http://www.richards-fotos.nl/coppermine/guestbook/) exists.
Title: Re: Advanced Guestbook integration for CPG 1.5.xx
Post by: EndlessQuest on September 05, 2012, 10:36:20 am
If everything was as simple as that.... You`re right. Many thanks!
Title: Re: Advanced Guestbook integration for CPG 1.5.xx
Post by: EndlessQuest on September 05, 2012, 10:07:39 pm
One step further.

When I go to the guestbook.php in my browser. I get the following error message

Query Error
MySQL Error : Query Error
Error Number: 1146 Table 'qid00002_copp1.guestbook_config' doesn't exist
Date        : Wed, September 5, 2012 15:05:58
IP          : 83.119.69.170
Browser     : Mozilla/5.0 (Windows NT 5.1) AppleWebKit/537.1 (KHTML, like Gecko) Chrome/21.0.1180.89 Safari/537.1
Referer     :
PHP Version : 5.3.15
OS          : Linux
Server      : Apache/2
Server Name : www.richards-fotos.nl

(www.richards-fotos.nl/coppermine.index.php
Title: Re: Advanced Guestbook integration for CPG 1.5.xx
Post by: EndlessQuest on September 05, 2012, 10:13:34 pm
Please disregard my previous post. Figured it out already. (Try first, then ask :-[)
Title: Re: Advanced Guestbook integration for CPG 1.5.xx
Post by: Αndré on September 05, 2012, 11:16:35 pm
Please
Resolve your threads
If you have found an answer to your question, resolve your thread. Don't just post "I have found the answer", but tell others what you actually did to solve your issues. Posting a link to the page where you found the answer might help. Describing what you did might help as well.
Title: Re: Advanced Guestbook integration for CPG 1.5.xx
Post by: EndlessQuest on September 06, 2012, 10:10:22 pm
It`s not entirely solved yet.

If I want to sign the guestbook, there`s no captcha image http://www.richards-fotos.nl/coppermine/guestbook.php?file=addentry

Tested it on IE10 and Chrome 21 and both show no image.

What could be causing this?

Title: Re: Advanced Guestbook integration for CPG 1.5.xx
Post by: EndlessQuest on September 06, 2012, 10:33:53 pm
Oh, my solution; I  ran install.php in my browser, but there were insufficient rights on two folders. I changed the rights, ran install.php again and it was ok.
Title: Re: Advanced Guestbook integration for CPG 1.5.xx
Post by: Αndré on September 27, 2012, 12:48:51 pm
If I want to sign the guestbook, there`s no captcha image http://www.richards-fotos.nl/coppermine/guestbook.php?file=addentry
While accessing the captcha image directly (http://www.richards-fotos.nl/coppermine/guestbook/image.php?id=e96692c6caccaaeaef0ca40d651c9c9a) I get something like this:
Quote
Deprecated: Function ereg() is deprecated in /home/qid00002/domains/richards-fotos.nl/public_html/coppermine/guestbook/lib/mysql.class.php on line 36

Deprecated: Function eregi() is deprecated in /home/qid00002/domains/richards-fotos.nl/public_html/coppermine/guestbook/lib/captcha.class.php on line 388

A quick solution would be to set your server not to display deprecated warning messages. The best solution would be to replace that function with something like preg_match (I haven't looked at the code so you maybe have to use a different function).