Author Topic: Coment posting problems  (Read 9037 times)

0 Members and 1 Guest are viewing this topic.

Offline Gulper

  • Newbie
  • *
  • Posts: 22
    • View Profile
Coment posting problems
« on: June 30, 2005, 11:09:40 PM »
When I've posted a comment and hit page-refresh after that again, my comment get's posted again.
Is there a way to preven this from happening?

Offline mstgokcen

  • Newbie
  • *
  • Posts: 44
    • View Profile
Re: Coment posting problems
« Reply #1 on: July 20, 2006, 01:35:01 PM »
+1 same problem

anyone

Offline dillo

  • Newbie
  • *
  • Posts: 11
    • View Profile
Re: Coment posting problems
« Reply #2 on: July 20, 2006, 02:04:14 PM »
same here.. AND after modifying text in the comment field there's no visual update first time. [version 1.7.2] afterwards it's ok.

Offline V@no

  • If you don't tell me what to do, I won't tell you where you should go :)
  • Global Moderator
  • 4images Guru
  • *****
  • Posts: 17.849
  • mmm PHP...
    • View Profile
    • 4images MODs Demo
Re: Coment posting problems
« Reply #3 on: July 20, 2006, 02:42:23 PM »
If you hit refresh, the browser warns you if you want post data again, or not...
Your first three "must do" before you ask a question:
Please do not PM me asking for help unless you've been specifically asked to do so. Such PMs will be deleted without answer. (forum rule #6)
Extension for Firefox/Thunderbird: Master Password+    Back/Forward History Tweaks (restartless)    Cookies Manager+    Fit Images (restartless for Thunderbird)

Offline mstgokcen

  • Newbie
  • *
  • Posts: 44
    • View Profile
Re: Coment posting problems
« Reply #4 on: July 20, 2006, 06:25:13 PM »
sorry  my mistake I forget to copy st lines of a MOD after I copied the right codes it is ok...


Offline dillo

  • Newbie
  • *
  • Posts: 11
    • View Profile
Re: Coment posting problems
« Reply #5 on: July 20, 2006, 07:18:15 PM »
If you hit refresh, the browser warns you if you want post data again, or not...

Negative..

Offline Joss

  • Jr. Member
  • **
  • Posts: 68
    • View Profile
    • All about digital photography
Re: Coment posting problems
« Reply #6 on: December 10, 2009, 08:56:34 PM »
If you hit refresh, the browser warns you if you want post data again, or not...

Vano, Opera doesn't ask for it, only FireFox and IE asks.
Is there any way to fix this?

Upd: probably there is a code for redirect to index page after form submitting? Is there some mods on forum like it?
Upd: I think, that redirect to index after comment post is not a good solution, because user can wants to read another comments or rate image.

Upd: May be the best way is redirect to the same page? How to do it? Thanks!
« Last Edit: December 10, 2009, 09:18:05 PM by Joss »
Digital Photo Gallery: http://gallery.imagemaster.ru

Offline V@no

  • If you don't tell me what to do, I won't tell you where you should go :)
  • Global Moderator
  • 4images Guru
  • *****
  • Posts: 17.849
  • mmm PHP...
    • View Profile
    • 4images MODs Demo
Re: Coment posting problems
« Reply #7 on: December 11, 2009, 01:37:04 AM »
There are two ways fix that, one is to install [MOD] AJAX Comments / Comments Rating

Second is simpler:
in details.php find:
      $msg $lang['comment_success'];

Insert below:
      $site_sess->set_session_var("msgdetails"$msg);
      
redirect(ROOT_PATH."details.php?".URL_IMAGE_ID."=".$image_id.((!empty($mode)) ? "&mode=".$mode "").(($page 1) ? "&page=".$page ""));



Find:
//-----------------------------------------------------
//--- Show Comments -----------------------------------
//-----------------------------------------------------


Insert above:
if ($msgdetails $site_sess->get_session_var("msgdetails"))
{
  
$msg .= ($msg !== "" "<br />" "").$msgdetails;
  unset(
$msgdetails);
  
$site_sess->drop_session_var("msgdetails");
}
« Last Edit: December 11, 2009, 02:02:01 AM by V@no »
Your first three "must do" before you ask a question:
Please do not PM me asking for help unless you've been specifically asked to do so. Such PMs will be deleted without answer. (forum rule #6)
Extension for Firefox/Thunderbird: Master Password+    Back/Forward History Tweaks (restartless)    Cookies Manager+    Fit Images (restartless for Thunderbird)

Offline mawenzi

  • 4images Moderator
  • 4images Guru
  • *****
  • Posts: 4.500
    • View Profile
Re: Coment posting problems
« Reply #8 on: December 11, 2009, 10:47:38 AM »
... thanks for your second solution V@no, it works perfect ...
Your first three "must do" before you ask a question ! ( © by V@no )
- please read the Forum Rules ...
- please study the FAQ ...
- please try to Search for your answer ...

You are on search for top 4images MOD's ?
- then please search here ... Mawenzi's Top 100+ MOD List (unsorted sorted) ...

Offline Joss

  • Jr. Member
  • **
  • Posts: 68
    • View Profile
    • All about digital photography
Re: Coment posting problems
« Reply #9 on: December 11, 2009, 11:29:27 AM »
V@no, thansk! The second solution works fine.

mawenzi, may be formulate this topic as MOD or Tips?
Digital Photo Gallery: http://gallery.imagemaster.ru