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

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 2 Guests are viewing this topic.

Ludo

#20
Yes, it seems.
But it happens to experience captcha issues even with GD2 installed and properly configurated, as you can see in captcha mod and plugin threads...
Do you have captcha mod or plugin installed and working?

Cath22

Quote from: Ludo on January 19, 2009, 02:55:36 PM
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

I find with debug two errors:
     * Notice line 35: Undefined variable: lang_guestbook_php
    * Notice line 37: Undefined variable: lang_guestbook_php

Maybe that is the cause of my problem, how to solve these?
qui custodiet ipsos custodes

Ludo

#22
They are just notices of lacking (optional) variable declaration, not errors.

But...oops, I forgot to include language files edits in the installations instructions: :-[ now they are in place in the first post.
For your convenience I write them here too : open lang/your_lang.php and add this code at the end of the file (just before ?> ):

// ------------------------------------------------------------------------- //
// File guestbook.php 
// ------------------------------------------------------------------------- //

$lang_guestbook_php = array(
  'title' => 'Guestbook', // "Guestbook" in your language
);

Notices above will get fixed, but this has nothing to do with your admin issues...

Cath22

Quote from: Ludo on January 20, 2009, 11:50:48 AM
They are just notices of lacking (optional) variable declaration, not errors.

But...oops, I forgot to include language files edits in the installations instructions: :-[ now they are in place in the first post.
For your convenience I write them here too : open lang/your_lang.php and add this code at the end of the file (just before ?> ):

// ------------------------------------------------------------------------- //
// File guestbook.php 
// ------------------------------------------------------------------------- //

$lang_guestbook_php = array(
  'title' => 'Guestbook', // "Guestbook" in your language
);

Notices above will get fixed, but this has nothing to do with your admin issues...

I have not yet entered above, BUT I had my settings set on English, now i changed them to Dutch and suddenly I can get into the admin............. :D ;D
The only problem i see now that although I changed the setting in Guestbook admin to Dutch, it still stays English, while there are dutch translations available, maybe above change can help that also.

Keep you posted.
Cath
qui custodiet ipsos custodes

Cath22

Hmm, after the change I get when I enter the admin:

Warning: Cannot modify header information - headers already sent by (output started at /usr/home/deb11675/domains/fotofantastic.nl/public_html/guestbook/lang/dutch.php:1) in /usr/home/deb11675/domains/fotofantastic.nl/public_html/guestbook/lib/admin.class.php on line 48

Warning: Cannot modify header information - headers already sent by (output started at /usr/home/deb11675/domains/fotofantastic.nl/public_html/guestbook/lang/dutch.php:1) in /usr/home/deb11675/domains/fotofantastic.nl/public_html/guestbook/lib/admin.class.php on line 49

Warning: Cannot modify header information - headers already sent by (output started at /usr/home/deb11675/domains/fotofantastic.nl/public_html/guestbook/lang/dutch.php:1) in /usr/home/deb11675/domains/fotofantastic.nl/public_html/guestbook/lib/admin.class.php on line 50

Warning: Cannot modify header information - headers already sent by (output started at /usr/home/deb11675/domains/fotofantastic.nl/public_html/guestbook/lang/dutch.php:1) in /usr/home/deb11675/domains/fotofantastic.nl/public_html/guestbook/lib/admin.class.php on line 51

and the admin stays english, but thats no problem. The Guestbook output is in dutch anyway.
qui custodiet ipsos custodes

Nibbler

Remove the blank line or whatever you have at the start of guestbook/lang/dutch.php

Cath22

Quote from: Nibbler on January 25, 2009, 04:26:51 PM
Remove the blank line or whatever you have at the start of guestbook/lang/dutch.php

Nibbler, there was a blank line, but it didnt do the trick, still the same errors.
Here is the code of dutch.php, maybe you can see what is wrong?
<?php
/*************************************************************************
Advanced Guestbook 2.4.3 (PHP/MySQL)
Copyright (c) Chi Kien Uong
URL: http://www.proxy2.de
Coppermine integration
Copyright (c) 2008 Gian Luigi Rocca
URL: http://vanrokken.altervista.org/
**************************************************************************
This program is free software; you can redistribute it and/or
modify it under the terms of the GNU General Public License
as published by the Free Software Foundation; either version 2
of the License, or (at your option) any later version.

This program is distributed in the hope that it will be useful,
but WITHOUT ANY WARRANTY; without even the implied warranty of
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
GNU General Public License for more details.

You should have received a copy of the GNU General Public License
along with this program; if not, write to the Free Software
Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA  02111-1307, USA.
**************************************************************************/

# General

$LANG["metatag"]   = "<meta http-equiv=\"Content-Type\" content=\"text/html; charset=utf-8\">";

$LANG["BookMess1"] = "HTML is niet actief";
$LANG["BookMess2"] = "HTML is actief";
$LANG["BookMess3"] = "Teken het gastenboek";
$LANG["BookMess4"] = "Terug naar het gastenboek";
$LANG["BookMess5"] = "Onderhoud";
$LANG["BookMess6"] = "Welkom op onze site. Hier kunt u het gastenboek tekenen (zie link rechts)";
$LANG["BookMess7"] = "Commentaar";
$LANG["BookMess8"] = "Terug naar het invoerscherm";
$LANG["BookMess9"] = "Geef commentaar op dit bericht";

$LANG["BookMess10"]  = "<br>Bedankt voor uw bijdrage.Uw bericht is met succes toegevoegd aan het gastenboek.<br>U gaat nu binnen 2 seconden automatisch terug naar het gastenboek.<br>";

$LANG["EmailAdminSubject"] = "Nieuw bericht";
$LANG["EmailGuestSubject"] = "Bedankt voor het tekenen van het gastenboek.";

$LANG["AltIP"]    = "IP-adres genoteerd";
$LANG["AltICQ"]   = "Verstuur ICQ Bericht";
$LANG["AltEmail"] = "Verstuur E-mail";
$LANG["AltUrl"]   = "Bekijk Webpagina";
$LANG["AltAim"]   = "Instant Messenger";
$LANG["AltCom"]   = "Geef commentaar";

# Form
$LANG["FormMess1"]   = "Vul onderstaande velden in om een bericht achter te laten. Velden met een (*) zijn verplicht, de andere zijn optioneel.<BR> Om spam te voorkomen moet er onderaan ter bevestiging een veiligheidscode ingevoerd worden.";
$LANG["FormMess2"]   = "Smilies staan AAN";
$LANG["FormMess3"]   = "AGCode is AAN";
$LANG["FormMess4"]   = "Toon legenda";
$LANG["FormMess5"]   = "Hieronder staat je bericht.";
$LANG["FormMess6"]   = "AG Code is UIT";
$LANG["FormMess7"]   = "Smilies staan UIT";
$LANG["FormName"]    = "Naam";
$LANG["FormEmail"]   = "Email adres";
$LANG["FormLoc"]     = "Plaats";
$LANG["FormPic"]     = "Plaatje";
$LANG["FormUrl"]     = "Homepage";
$LANG["FormGender"]  = "Geslacht";
$LANG["FormMale"]    = "Man";
$LANG["FormFemale"]  = "Vrouw";
$LANG["FormMessage"] = "Uw bericht";
$LANG["FormSelect"]  = "Gastenboek";
$LANG["FormUser"]    = "gebruikersnaam";
$LANG["FormPass"]    = "Wachtwoord";
$LANG["FormReset"]   = "Reset";
$LANG["FormSubmit"]  = "Verstuur";
$LANG["FormPreview"] = "Voorbeeld";
$LANG["FormBack"]    = "Ga terug";
$LANG["FormEnter"]   = "Gastenboek - Onderhoud<br>Voordat u verder kunt, dient u een geldige loginnaam en wachtwoord in te voeren!";
$LANG["FormButton"]  = "Ga naar";
$LANG["FormPriv"]    = "Priv&eacute; bericht";


# Navigation Bar
$LANG["NavTotal"]   = "Totaal aantal berichten:";
$LANG["NavRecords"] = "Berichten per pagina:";
$LANG["NavPrev"]    = "Vorige pagina";
$LANG["NavNext"]    = "Volgende pagina";

# Post Errors
$LANG["ErrorPost1"]  = "U hebt geen naam ingevuld. Ga terug en wijzig dit.";
$LANG["ErrorPost2"]  = "U bent vergeten het bericht in te vullen. Ga terug en wijzig dit.";
$LANG["ErrorPost3"]  = "Uw bericht is te kort of te lang. Ga terug en wijzig dit.";
$LANG["ErrorPost4"]  = "Een van de velden bevat een ongeldige waarde.";
$LANG["ErrorPost5"]  = "Forum - Fout";
$LANG["ErrorPost6"]  = "Bestand is te groot";
$LANG["ErrorPost7"]  = "Verkeerd bestandtype";
$LANG["ErrorPost8"]  = "Sorry! Er komen op het moment te veel berichten tegelijk binnen. Probeer het straks nog eens!";
$LANG["ErrorPost9"]  = "Uw IP-adres is verbannen!";
$LANG["ErrorPost10"] = "Uw bericht bevat woorden die we niet toelaten in dit forum. Ga terug en verander deze.";
$LANG["ErrorPost11"] = "U hebt geen commentaar ingevuld.";

$LANG["PassMess1"] = "Geef een geldige inlognaam en wachtwoord:";
$LANG["PassMess2"] = "Ongeldige inlognaam of wachtwoord. Probeer het nog eens.";
$LANG["PassMess3"] = "Sorry, maar het wachtwoord is niet correct.";

# Days
$weekday[0] = "Zondag";
$weekday[1] = "Maandag";
$weekday[2] = "Dinsdag";
$weekday[3] = "Woensdag";
$weekday[4] = "Donderdag";
$weekday[5] = "Vrijdag";
$weekday[6] = "Zaterdag";

# Months
$months[0]  = "Januari";
$months[1]  = "Februari";
$months[2]  = "Maart";
$months[3]  = "April";
$months[4]  = "Mei";
$months[5]  = "Juni";
$months[6]  = "Juli";
$months[7]  = "Augustus";
$months[8]  = "September";
$months[9]  = "October";
$months[10] = "November";
$months[11] = "December";

// ------------------------------------------------------------------------- 
// File guestbook.php  
// ------------------------------------------------------------------------- 
$lang_guestbook_php = array(
  
'title' => 'Guestbook'// "Guestbook" in your language
);
?>
qui custodiet ipsos custodes

Ludo

// ------------------------------------------------------------------------- //
// File guestbook.php 
// ------------------------------------------------------------------------- //

$lang_guestbook_php = array(
  'title' => 'Guestbook', // "Guestbook" in your language
);

This code is to be added to coppermine lang files, not to guestbook ones as you did!
See you tomorrow for more debug...

Cath22

Quote from: Ludo on January 25, 2009, 04:45:26 PM
// ------------------------------------------------------------------------- //
// File guestbook.php 
// ------------------------------------------------------------------------- //

$lang_guestbook_php = array(
  'title' => 'Guestbook', // "Guestbook" in your language
);

This code is to be added to coppermine lang files, not to guestbook ones as you did!
See you tomorrow for more debug...


Oops,  :o sorry, misunderstood. Thanks for the update. :-*
qui custodiet ipsos custodes

Cath22

Hmm, still strange, the errors remain, even when I have removed the lines to the coppermine lang files and change to english (which file I have not changed)
As can be seen by these messages;

Warning: Cannot modify header information - headers already sent by (output started at /usr/home/deb11675/domains/fotofantastic.nl/public_html/guestbook/lang/english.php:1) in /usr/home/deb11675/domains/fotofantastic.nl/public_html/guestbook/lib/admin.class.php on line 48

Warning: Cannot modify header information - headers already sent by (output started at /usr/home/deb11675/domains/fotofantastic.nl/public_html/guestbook/lang/english.php:1) in /usr/home/deb11675/domains/fotofantastic.nl/public_html/guestbook/lib/admin.class.php on line 49

Warning: Cannot modify header information - headers already sent by (output started at /usr/home/deb11675/domains/fotofantastic.nl/public_html/guestbook/lang/english.php:1) in /usr/home/deb11675/domains/fotofantastic.nl/public_html/guestbook/lib/admin.class.php on line 50

Warning: Cannot modify header information - headers already sent by (output started at /usr/home/deb11675/domains/fotofantastic.nl/public_html/guestbook/lang/english.php:1) in /usr/home/deb11675/domains/fotofantastic.nl/public_html/guestbook/lib/admin.class.php on line 51
qui custodiet ipsos custodes

Ludo

Quote from: Cath22 on January 25, 2009, 03:53:53 PMalthough I changed the setting in Guestbook admin to Dutch, it still stays English
No bug, guestbook administration isn't localized even in stand-alone package.

Ludo

#31
Quote from: Cath22 on January 25, 2009, 04:56:56 PM
Hmm, still strange, the errors remain, even when I have removed the lines to the coppermine lang files and change to english (which file I have not changed)
Check for blank lines before <?php and/or after ?> also in
/include/config.inc.php
/guestbook/admin/config.inc.php

calvinite

Hi, Ludo. I upgraded my CPG to your Advanced Guestbook integration and it looks great. Good job. However, I had a few bugs and solved those and narrowed it down to a single problem, but I can't figure it out. Everything looks great and works great, except getting into the admin panel. When I click on the Administration link, a new window opens with the Admin login and I can enter my username and password, but when I hit enter, it returns a 404 - Not Found error, and for some reason, it inserts the guestbook folder name a second time into the URL.

When the login form is showing, the URL in the address bar is mydomain.com/gallery/guestbook/admin.php. After entering my username and password and get the 404, the URL is mydomain.com/gallery/guestbook/guestbook/admin.php. The first URL is the way my directory structure actually exists. I've tried getting in from a new browser window and get the same thing. Login form, enter UN & PW and hit enter and get 404.

I've spent about four hours so far trying to find something in the code that would cause it to insert the second "guestbook" into the URL and I'm not having much luck. I'd appreciate some input as I seem to be heading in the wrong direction. It doesn't affect users, but obviously, I can't do admin things if need be.

Thanks,

Calvinite
I started with nothing, and have most of it left.

Ludo

#33
I tuned guestbook/admin/config.inc.php default settings for a CPG installed in the web root, try to play with $GB_PG["admin"] (i.e. inserting the absolute path) and/or $GB_PG["base_url"]...and let me know!

Anyway, over the web there is at least one Advanced Guestbook integrated with a CPG installed in a subdirectory, and its owner doesn't seem to have experienced troubles with admin panel: most likely yours are a matter of server settings.

calvinite

#34
Thanks for your quick reply. I truly appreciate it. I inserted the absolute path in $GB_PG["admin"] as you suggested and that corrected the issue. So now there are at least two Advanced Guestbooks integrated with CPG installed in a subdirectory. You have to register to see mine at The Prichard Collection, but there is no waiting period after registering. At least now, if someone else installs this way, the answer is readily available if they have any problems.

I also meant to tell you of an issue I had when I first installed. I was getting an error in the form of a line of text appeared at the top of the page. I can't recall the exact message but it was something to do with an unexpected character in the language file on a certain line number. I discovered there is a missing character in the code that is to be inserted in the language file from readme.txt.

This line of code from readme.txt has a missing single quotation mark after the first Guestbook.
  'title' => 'Guestbook, // "Guestbook" in your language

I inserted the missing character and that corrected the issue I was having.
  'title' => 'Guestbook', // "Guestbook" in your language

I downloaded again from the link in this thread to make sure I hadn't unintentionally deleted the character, as I've been known to do such things, and confirmed it is missing in the zip file.

Again, thanks for your help and kudos on the integration. It looks much better than the way I did it and it uses the CPG database.
I started with nothing, and have most of it left.

calvinite

Okay, I don't know what happened, but now I'm getting a MySQL connection error when I click on the Guestbook link.

MySQL Error: Connection Error
Error Number: 1045 Access denied for user 'user'@'localhost' (using password: NO)

Any ideas why it stopped passing the CPG info?
I started with nothing, and have most of it left.

Ludo

Quote from: calvinite on March 26, 2009, 04:36:01 PM
Thanks for your quick reply. I truly appreciate it. I inserted the absolute path in $GB_PG["admin"] as you suggested and that corrected the issue.
Uhm, I'd rather have changed to full web URL the path in $GB_PG["base url"]. Would you please try this way (reverting to /guestbook/admin.php the path in $GB_PG["admin"]) and check if this solves the issue too?

QuoteThis line of code from readme.txt has a missing single quotation mark after the first Guestbook.
Thanks for your notice, I've just released integration package v. 1.0.1, which fixes that typo and upgrades to v. 2.4.4 of Advanced Guestbook

Ludo

Quote from: calvinite on March 26, 2009, 05:29:53 PMAny ideas why it stopped passing the CPG info?
I don't really know, but it can't be due to the edit you made to guestbook/admin/config.inc.php!

calvinite

Well, I'm at a total loss. It worked beautifully the first few times I tried it, except for not being able to get into the admin section. But now, I can log in to the admin section directly via the URL to admin.php, but can't access index.php directly or through CPG.

I also reverted the $GB_PG["admin"] string back to /guestbook/admin.php and changed $GB_PG["base url"] to the full web URL; as you requested.  However, that didn't correct the problem with the database error so I can't get into the guestbook to see what difference it made, if any.

When I try to access the index page directly by typing the URL, it gives the same error that it does from inside CPG. Is the guestbook set up to see if it is in CPG and would that make a difference? Could it be "thinking" it is outside CPG and therefore won't grant access. I suppose it would give a custom message, as it does for the wrong password, if it were set up that way though.
I started with nothing, and have most of it left.

Ludo

#39
Is "user" the right username and "localhost" the right host name for your CPG database connection?
Also, try downloading again the package and replace guestbook/admin/config.inc.php with the original file.