forum.coppermine-gallery.net
Support => cpg1.4.x Support => Older/other versions => cpg1.4 miscellaneous => Topic started by: pepemosca on May 12, 2008, 02:21:43 am
-
Hello,
I have installed the 1.4.17 (upgraded to 1.4.18).
My issue is this: why always ask the guest to write their name in the comments area?
Some versions ago, the gallery only ask once and remembers (via Cookie, I think) the "name" the guest has written and automatically set it on for a new comment on the gallery
Any ideas why is this?
Is it possible to make the gallery remember the guest "name" just for new comments in the 1.4.17 like a few versions ago?
Thank you in advance for your help.
Saludos,
pepemosca
-
Post a link to your gallery for a start...
-
Ok, here is the link http://www.juanylu.com.ar/images/ (http://www.juanylu.com.ar/images/)
Thank you for your reply :)
-
It's mandatory that you upgrade to cpg1.4.18 first for security reasons.
-
It's mandatory that you upgrade to cpg1.4.18 first for security reasons.
I did the manual upgrade.
-
Is not the same doing the manual replace of the mentioned file?
As saids here http://forum.coppermine-gallery.net/index.php/topic,51882.0.html (http://forum.coppermine-gallery.net/index.php/topic,51882.0.html)
-
That's fine. Do you still get the problem if you disable the captcha plugin, at least for comments?
-
That's fine. Do you still get the problem if you disable the captcha plugin, at least for comments?
Yes, still have the problem:
http://www.juanylu.com.ar/images/displayimage.php?pos=-10716 (http://www.juanylu.com.ar/images/displayimage.php?pos=-10716)
Any ideas?
-
Captcha is still enabled.
The name is not being saved to the cookie, but I don't know why.
-
Sorry: I'd turned back on when I saw it wasn't working without it.
Now is off.
http://www.juanylu.com.ar/images/displayimage.php?pos=-10716 (http://www.juanylu.com.ar/images/displayimage.php?pos=-10716)
-
Can you re-upload the classic theme for testing please?
-
Is what I'm doing.
But -is embarrassing but...- I had reupload the db_input.php and now works.
Check out my mod:
//** Modificado por Juan Pedro 11:08 15/10/2007
$result_comment = mysql_query("SELECT aid,filepath,filename FROM cpg_pictures WHERE pid = '$pid'");
list($aid,$filepath,$filename) = mysql_fetch_row($result_comment);
$result = mysql_query("SELECT title FROM cpg_albums WHERE aid = '$aid'");
list($title) = mysql_fetch_row($result);
$base = rtrim($CONFIG['ecards_more_pic_target'], '/');
// Para la tabla de historial (hay que incluirlo en $mail_body)
$mail_body_historial = " ";
$result4 = mysql_fetch_row(mysql_query("SELECT COUNT(*) FROM cpg_comments WHERE pid = '$pid'"));
if($result4[0]>1)
{
$mail_body_historial = $mail_body_historial." <br/><br/><b>Historial de comentarios:</b><br/>";
$mail_body_historial = $mail_body_historial." <table border=0 cellpadding=2><tr><td><b>Autor</b></td><td><b>Comentario</b></td><td><b>Fecha</b></td><td><b>IP</b></td></tr>";
$result5 = mysql_query("SELECT msg_author,msg_body,msg_date,msg_raw_ip FROM cpg_comments WHERE pid = '$pid' ORDER BY msg_id ASC");
while(list($r_msg_author_c,$r_msg_body_c,$r_msg_date_c,$r_msg_raw_ip_c) = mysql_fetch_row($result5))
{
$mail_body_historial = $mail_body_historial." <tr><td>$r_msg_author_c</td><td>".bb_decode(process_smilies($r_msg_body_c, $CONFIG['ecards_more_pic_target']))."</td><td>$r_msg_date_c</td><td>$r_msg_raw_ip_c</td></tr>";
}
$mail_body_historial = $mail_body_historial." </table>";
}
// Fin de la tabla de historial
$mail_subject= 'Comentario en el album "'.$title.'"'; //por '.$msg_author; //Notar como se hace el acento en la A (buscar en el SQL)
$mail_body = "<a href=\"$base/displayimage.php?pos=-$pid\"><img src=\"$base/albums/$filepath" . "thumb_$filename\" alt=\"\" border=\"0px\" /></a> <br/> <br/> <b>Álbum:</b> " . $title . "<br/><b>Autor:</b> " . $msg_author . "<br/><b>Comentario:</b> " . bb_decode(process_smilies($msg_body, $CONFIG['ecards_more_pic_target'])) . "<br/><b>IP:</b> " . $raw_ip . "\n\r" . $mail_body_historial . "<br/>\n\r<br/>\n\r" . $lang_db_input_php['email_comment_body'] . " " . $CONFIG['ecards_more_pic_target'].(substr($CONFIG["ecards_more_pic_target"], -1) == '/' ? '' : '/').$redirect;
//cpg_mail('admin', $lang_db_input_php['email_comment_subject'], make_clickable($mail_body));
cpg_mail('admin', $mail_subject, make_clickable($mail_body));
//** Modificado por Juan Pedro 11:08 15/10/2007
Is for sending a better mail notification about a new comment.
Here is how:
[Edit GauGau] Replaced hotlinked image with attachment [/Edit]
Also, here is the db_input.php modded:
http://rapidshare.com/files/114715769/db_input.php.html (http://rapidshare.com/files/114715769/db_input.php.html)
[Edit GauGau] Downloaded that file, renamed it from db_input.php to db_input.php.txt and attached it to this thread. Don't use external hotlinks in the future [/Edit]
Sorry! It was me :)
But any ideas what is wrong?
-
yup, it's my mod to the db_input.php.
I'm stup*d :(
Now, different question: ideas why?
-
In a terrible way, you can see the modding over the code at page 4:
http://rapidshare.com/files/114718865/db_input.php_-_db_input.mdi.html (http://rapidshare.com/files/114718865/db_input.php_-_db_input.mdi.html)
-
I don't know what an .mdi file is. I'd suggest you add back in parts of your mod until you find the line of code that breaks the functionality.
-
Sorry, an mdi is a Microsoft Office Document Image Writer.
I don't have a PDF printer.
I'll try to check the code in order to see what's happening.
But when does it make the Cookie?
-
Ok, this is crazy!
I just copy and pasted back the "modification over the original code" in the original db_input.php... and now works right!?
Can you check from your computers if it works?
http://www.juanylu.com.ar/images/displayimage.php?pos=-10716 (http://www.juanylu.com.ar/images/displayimage.php?pos=-10716)
Thanks!
Crazy!
-
Works fine now.