[Solved]: Guest commets ask always the "name" [1.4.17] [Solved]: Guest commets ask always the "name" [1.4.17]
 

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

[Solved]: Guest commets ask always the "name" [1.4.17]

Started by pepemosca, May 12, 2008, 02:21:43 AM

Previous topic - Next topic

0 Members and 1 Guest are viewing this topic.

pepemosca

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

Joachim Müller

Post a link to your gallery for a start...

pepemosca


Joachim Müller

It's mandatory that you upgrade to cpg1.4.18 first for security reasons.

pepemosca

Quote from: Joachim Müller on May 13, 2008, 08:38:43 AM
It's mandatory that you upgrade to cpg1.4.18 first for security reasons.

I did the manual upgrade.

pepemosca


Nibbler

That's fine. Do you still get the problem if you disable the captcha plugin, at least for comments?

pepemosca

Quote from: Nibbler on May 13, 2008, 11:48:23 PM
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

Any ideas?

Nibbler

Captcha is still enabled.

The name is not being saved to the cookie, but I don't know why.

pepemosca


Nibbler

Can you re-upload the classic theme for testing please?

pepemosca

#11
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>&#193;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
[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?

pepemosca

yup, it's my mod to the db_input.php.
I'm stup*d :(

Now, different question: ideas why?

pepemosca


Nibbler

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.

pepemosca

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?

pepemosca

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

Thanks!

Crazy!