Please login or register.

Login with username, password and session length
Advanced search  

Author Topic: request: show (your comment has/not sent..) in the same place ....  (Read 822 times)

adminphp

  • Full Member
  • ***
  • Karma: 4
  • Posts: 150
  • you must be a great snewser .

Hi guys, i have a request about some mod which it can shows the message "your comment has/not sent wait approve" or  in the same place where usually put our comment , that means we dont need to refresh the page, in time we click "sent" the message it shows directly, in the same place as i mentioned. ;)
Logged
“Fifty years of programming language research, and we end up with C++?”

nukpana

  • Hero Member
  • *****
  • Karma: 71
  • Posts: 663
Logged

adminphp

  • Full Member
  • ***
  • Karma: 4
  • Posts: 150
  • you must be a great snewser .
Re: request: show (your comment has/not sent..) in the same place ....
« Reply #2 on: October 03, 2011, 08:28:29 PM »

thanks nukpana  ;), thats the exactly mod which i was talking about, thanks again.
Logged
“Fifty years of programming language research, and we end up with C++?”

adminphp

  • Full Member
  • ***
  • Karma: 4
  • Posts: 150
  • you must be a great snewser .
Re: request: show (your comment has/not sent..) in the same place ....
« Reply #3 on: October 05, 2011, 02:16:39 PM »

hi nukpana, i just want to know if we can use this with snews 1.6 ... i tried but it doesn't work could you explain how to use it with my version.  thanks alot :)
Logged
“Fifty years of programming language research, and we end up with C++?”

nukpana

  • Hero Member
  • *****
  • Karma: 71
  • Posts: 663
Re: request: show (your comment has/not sent..) in the same place ....
« Reply #4 on: October 06, 2011, 12:56:19 PM »

No, it doesn't work in 1.6, but I had hope you looked at what I did and made the correct changes.

Anyway, since I don't have 1.6 installed, I will base this on: http://code.google.com/p/snews/source/browse/tags/sNews16/snews.php
.. and it's off the top of my head... BE WARNED!!! I haven't had my coffee yet

0. Backup

1. Comment out line 475

2 Line 645, add before the closing bracket:
Code: [Select]
$fail = true;
3. Before Line 652, add:
Code: [Select]
if( $fail ) {
echo '<a href="'.$back_link.'">'.l('back').'</a>';
} else {
Then after the line, add:
Code: [Select]
}
4. Line 704 will look like:
Code: [Select]
echo html_input('form', '', 'post', '', '', '', '', '', '', '', '', '', 'post', db('website').clean(cleanXSS($_GET['category'])), '');
Logged

adminphp

  • Full Member
  • ***
  • Karma: 4
  • Posts: 150
  • you must be a great snewser .
Re: request: show (your comment has/not sent..) in the same place ....
« Reply #5 on: October 07, 2011, 12:36:10 AM »

its working .. but i liked to have some more addition for this mod .. can we sent a comment and show the message without refresh the page .. i mean when we click "sent" we still in the same postion, Contrary to what we have now in this code. i think we should change some thing in this
Code: [Select]
echo '<a href="'.$back_link.'">'.l('back').'</a>';what do you think about it
Logged
“Fifty years of programming language research, and we end up with C++?”

nukpana

  • Hero Member
  • *****
  • Karma: 71
  • Posts: 663
Re: request: show (your comment has/not sent..) in the same place ....
« Reply #6 on: October 07, 2011, 12:34:19 PM »

If you want any additions, you should code it in.  If you are having problems post it and someone will look it over and help.

Quote
can we sent a comment and show the message without refresh the page
If you don't want a page refresh, then you are looking at ajax.

Quote
i mean when we click "sent" we still in the same postion, Contrary to what we have now in this code.
Actually that's supposed to be whats happening...  It is just like the picture noted in the mod post I linked before.  If this implementation is wrong, I did note I was doing it off the top of my head....

Logged

adminphp

  • Full Member
  • ***
  • Karma: 4
  • Posts: 150
  • you must be a great snewser .
Re: request: show (your comment has/not sent..) in the same place ....
« Reply #7 on: October 07, 2011, 02:22:59 PM »

when i click on the botton (sent) .. the visitors get Difficulties to display the message  the have to go down to the bottom of the article to find the message.
so could someone please, exaplain how to put this addition using ajax.    thanks ;)
Logged
“Fifty years of programming language research, and we end up with C++?”

adminphp

  • Full Member
  • ***
  • Karma: 4
  • Posts: 150
  • you must be a great snewser .
Re: request: show (your comment has/not sent..) in the same place ....
« Reply #8 on: October 08, 2011, 01:02:39 AM »

 ??? ???
« Last Edit: April 15, 2012, 04:29:28 PM by adminphp »
Logged
“Fifty years of programming language research, and we end up with C++?”