Advertisement:

Author Topic: AJAX Instant Quick Reply  (Read 286105 times)

Offline SlammedDime

  • SMF Friend
  • SMF Super Hero
  • *
  • Posts: 10,280
  • School of Air Ride
    • matt.zuba on Facebook
    • @mattzuba on Twitter
    • ZubaFitness
Re: AJAX Quick Reply
« Reply #20 on: May 29, 2008, 11:00:44 PM »
I also did not implement if someone has 'show new replies first' enabled.  It would still 'ajax' them to the bottom of the list, but would be in the proper location upon refresh.  Again, not something that many people do anyway, so its something to keep in mind for the next release.

As for the conflict with that other mod, I'll adjust the search parameter on the next release as well.  Maybe in a few days (I really hate doing it so soon though).  I think the simple fix for the javascript issue is to just change the input type from button to submit and make sure that the javascript function for replying returns false.
SlammedDime
Former Lead Customizer
BitBucket Projects
GeekStorage.com Hosting
                      My Mods
SimpleSEF
Ajax Quick Reply
Sitemap
more...
                     

Offline 4Kstore

  • SMF Hero
  • ******
  • Posts: 4,314
  • Gender: Male
    • agustintari on Facebook
    • @agustintarifa on Twitter
    • SSIMPLE TEAM PAGE
Re: AJAX Quick Reply
« Reply #21 on: May 29, 2008, 11:40:26 PM »
No, its for the xml stylesheet viewer.  Not for the mod.

I see, anyway. it didn't work on me..

I wrote my message and press "send"button.  but nothings hapened.
Then when I fresh the page. my message appear.!!

if someone use this mode, please let me know..

in my forum too !!! when i refresh the page the message appear but before not

forum 1.1.5
template: default
¡¡NEW MOD: Sparkles User Names!!!

Offline stanaca

  • Jr. Member
  • **
  • Posts: 127
  • Gender: Male
    • Stanaca
Re: AJAX Quick Reply
« Reply #22 on: May 30, 2008, 01:25:37 AM »
I installed this mod in my smf 2.0 forum. When i clicked in apply mod it showed test failed in Display.template.php in one section so i edited it manually. The  mod installed corectly but the page still reload when posting.

I am  using default theme. i attached the Display.template.php.

help please
...

Offline Badboy

  • SMF Hero
  • ******
  • Posts: 1,456
  • Gender: Male
Re: AJAX Quick Reply
« Reply #23 on: May 30, 2008, 03:28:08 AM »
It is not working with ecardmax hot editor. Also i wrote message. It warned me that nothing written. Is it possible to make it work with ecardmax hoteditor?
 
Thx.
SMF 1.1.5
Nothing is true, everything is permitted.

Offline [SiNaN]

  • SMF Super Hero
  • *******
  • Posts: 11,526
  • Young and Foolish
    • SimplePortal
Re: AJAX Quick Reply
« Reply #24 on: May 30, 2008, 03:34:03 AM »
Great mod SlammedDime. It will be very popular probably, but also it will be really hard to give support. Good luck with it. ;)
Former SMF Core Developer | My Mods | SimplePortal

Offline Hoochie Coochie Man

  • SMF Hero
  • ******
  • Posts: 5,135
  • Gender: Male
    • İstanblues.org
Re: AJAX Quick Reply
« Reply #25 on: May 30, 2008, 03:36:50 AM »
Hoochie - This mod heavily depends on proper modification of Display.template.php if it exists in a custom theme.  The new function as well as the modification to the existing template function are crucial.

See the bottom of the first post of this topic.
Thanks @SlammedDime.. I tested it on Karl's testboard and it worked great..
I think problem is me. Let me explore this mode :)
By the way.. Before this mod...   When I edit a message that green backgroun "Loading" area isn't working on me.
Is there any relation of with why this mod didn't work on me?
İnadına SMF 1.1.X

Offline SlammedDime

  • SMF Friend
  • SMF Super Hero
  • *
  • Posts: 10,280
  • School of Air Ride
    • matt.zuba on Facebook
    • @mattzuba on Twitter
    • ZubaFitness
Re: AJAX Quick Reply
« Reply #26 on: May 30, 2008, 03:43:25 AM »
Yes.  AJAX has to be working in SMF's other functions.  If not, then this will most likely not work.  Some other AJAX functions: clicking quote in a topic should throw the post into the quick reply box; the stats page uses AJAX to expand the months to show detailed stats.  Quick modify on messages uses AJAX.

stanaca - I'm having trouble adding attachments right now, when i get to my other computer in a few hours, I'll post an updated template for you.

Badboy - Unfortunately, I cannot offer support for other editors at this time.  I would suggest taking a look at the modifications I've made to the quick reply editor and see if you can edit it to work.

[SiNaN] - Thanks.  I know its a great mod to have, and I'm hoping it goes off without a hitch.  We shall see.
« Last Edit: May 30, 2008, 03:46:17 AM by SlammedDime »
SlammedDime
Former Lead Customizer
BitBucket Projects
GeekStorage.com Hosting
                      My Mods
SimpleSEF
Ajax Quick Reply
Sitemap
more...
                     

Offline stanaca

  • Jr. Member
  • **
  • Posts: 127
  • Gender: Male
    • Stanaca
Re: AJAX Quick Reply
« Reply #27 on: May 30, 2008, 04:17:54 AM »


stanaca - I'm having trouble adding attachments right now, when i get to my other computer in a few hours, I'll post an updated template for you.


ok thanks, i am waiting
...

Offline Hoochie Coochie Man

  • SMF Hero
  • ******
  • Posts: 5,135
  • Gender: Male
    • İstanblues.org
Re: AJAX Quick Reply
« Reply #28 on: May 30, 2008, 05:00:37 AM »
It worked great on a default 1.1.5..

However, when I install Pretty URLs Mod.

It overlap with AJAX Quick Reply and didn't worked again.

http://www.omerkoroglu.net/115/index.php

username: test
password: test
İnadına SMF 1.1.X

Offline stanaca

  • Jr. Member
  • **
  • Posts: 127
  • Gender: Male
    • Stanaca
Re: AJAX Quick Reply
« Reply #29 on: May 30, 2008, 05:35:51 AM »
It worked great on a default 1.1.5..

However, when I install Pretty URLs Mod.

It overlap with AJAX Quick Reply and didn't worked again.

http://www.omerkoroglu.net/115/index.php

username: test
password: test

I am also using pretty urls mod
...

Offline уιℓмαz

  • Full Member
  • ***
  • Posts: 430
  • Gender: Male
    • TamForum.Net » Paylaşımın Tam Adresi
Re: AJAX Quick Reply
« Reply #30 on: May 30, 2008, 05:38:45 AM »
Thanks great mod.

I'm taking this error when i try to post a message with quick reply:

Code: [Select]
Warning - while you were typing a new reply has been posted. You may wish to review your post.

Offline Hoochie Coochie Man

  • SMF Hero
  • ******
  • Posts: 5,135
  • Gender: Male
    • İstanblues.org
Re: AJAX Quick Reply
« Reply #31 on: May 30, 2008, 07:57:16 AM »
Ok.. I change the display.template's codes calmly :) and it worked on me :)
Thanks again for this great mod @SlammedDime
İnadına SMF 1.1.X

Offline уιℓмαz

  • Full Member
  • ***
  • Posts: 430
  • Gender: Male
    • TamForum.Net » Paylaşımın Tam Adresi
Re: AJAX Quick Reply
« Reply #32 on: May 30, 2008, 08:38:26 AM »
Thanks great mod.

I'm taking this error when i try to post a message with quick reply:

Code: [Select]
Warning - while you were typing a new reply has been posted. You may wish to review your post.

I've solved this problem. But there is another one. I'm posting a quick message but new message doesn't seem without refreshing.

Offline jossanaijr

  • SMF Hero
  • ******
  • Posts: 2,131
  • Gender: Male
    • Netbook Forum
Re: AJAX Quick Reply
« Reply #33 on: May 30, 2008, 01:27:45 PM »
Hi,
thanks.
Installed manually.  Not sure if it is working because I really did not understand what it is supposed to modify... Ups...

Anyway in my display.template.php I have twice this code:

Code: [Select]
<div class="smalltext">« <b>', !empty($message['counter']) ? $txt[146] . ' #' . $message['counter'] : '', ' ', $txt[30], ':</b> ', $message['time'], ' »</div></td>
In the first it was replaced by
Code: [Select]
<div class="smalltext">« <b>', !empty($message['counter']) ? '<a href="'.$scripturl.'?topic=' . $context['current_topic'] . '.0;msg='.$message['id'].'">' . $txt[146] . ' #' . $message['counter'] . '</a>': '', ' ', $txt[30], ':</b> ', $message['time'], ' »</div></td>
Need I change the second too?  Because it is not repeated inSMF Package Parser.

Here the block code where the second time appears:
Code: [Select]
// Show the member's signature?
if (!empty($message['member']['signature']) && empty($options['show_no_signatures']) && $context['signature_enabled'])
echo '
<hr width="100%" size="1" class="hrcolor" />
<div class="signature">', $message['member']['signature'], '</div>';

echo '
</td>
</tr>
</table>
</td></tr>
</table>
</td></tr>';
if (function_exists("show_posts"))
{
if ($adpost = show_posts($adcounter))
{
if($modSettings['ads_lookLikePosts'])
{
echo '

<tr><td style="padding: 1px 1px 0 1px;">
<table width="100%" cellpadding="3" cellspacing="0" border="0">
<tr><td class="windowbg3">
<table width="100%" cellpadding="5" cellspacing="0" style="table-layout: fixed;">
<tr>
<td valign="top" width="16%" rowspan="2" style="overflow: hidden;">
<b>', $context['forum_name'], '</b>
<div class="smalltext">
</div>
</td>
<td valign="top" width="85%" height="100%">
<table width="100%" border="0"><tr>
<td valign="middle"><img src="', $message['icon_url'] . '" alt="" border="0" /></td>
<td valign="middle">
<div style="font-weight: bold;" id="subject_', $message['id'], '">
<a href="', $message['href'], '">', $message['subject'], '</a>
</div>
<div class="smalltext">« <b>', !empty($message['counter']) ? $txt[146] . ' #' . $message['counter'] : '', ' ', $txt[30], ':</b> ', $message['time'], ' »</div></td>
<td align="', !$context['right_to_left'] ? 'right' : 'left', '" valign="bottom" height="20" style="font-size: smaller;">';
if ($context['can_reply'] && !empty($options['display_quick_reply']))
echo '
', $reply_button, '';

// So... quick reply is off, but they *can* reply?

Offline SlammedDime

  • SMF Friend
  • SMF Super Hero
  • *
  • Posts: 10,280
  • School of Air Ride
    • matt.zuba on Facebook
    • @mattzuba on Twitter
    • ZubaFitness
Re: AJAX Quick Reply
« Reply #34 on: May 30, 2008, 01:58:39 PM »
No, you only need to change the first.  But I see you have the ad management mod as well.  Oye.  I'm going to have to re do the search strings for the installer to find a different piece of code to insert some of my code at.

For those having issues with pretty urls, you'll need to open up Display.php
Code: (find) [Select]
if ((isset($context['pretty']['oldschoolquery']) || $context['pretty']['query_string']['board'] != $context['pretty']['board_urls'][$board]) && $modSettings['pretty_enable_filters'])

and

Code: (Replace) [Select]
if (!isset($_REQUEST['xml']) && (isset($context['pretty']['oldschoolquery']) || $context['pretty']['query_string']['board'] != $context['pretty']['board_urls'][$board]) && $modSettings['pretty_enable_filters'])

stanaca - I have no clue what is wrong my my Firefox or IE, but both freeze up my computer when I try to post attachments.  PM me your email address and I'll email you the modified template.
SlammedDime
Former Lead Customizer
BitBucket Projects
GeekStorage.com Hosting
                      My Mods
SimpleSEF
Ajax Quick Reply
Sitemap
more...
                     

Offline roberto174

  • Semi-Newbie
  • *
  • Posts: 17
Re: AJAX Quick Reply
« Reply #35 on: May 30, 2008, 01:59:16 PM »
hy, can someone take a look at my display.template, i have manually modiffied the lines until i have reached display.template, there is a line i cannot find, it doesnt exists.
this line i cannot find in my file
Code: [Select]
<div class="smalltext">« <b>', !empty($message['counter']) ? $txt[146] . ' #' . $message['counter'] : '', ' ', $txt[30], ':</b> ', $message['time'], ' »</div></td>[code]
I am using a custom theme with some mods also, and smf 1.1.4.
i am putting my display.template here

Offline jossanaijr

  • SMF Hero
  • ******
  • Posts: 2,131
  • Gender: Male
    • Netbook Forum
Re: AJAX Quick Reply
« Reply #36 on: May 30, 2008, 02:01:18 PM »
Thanks.
I did not notice any problem with ad management mod but how can I check it your mod is working fine?...

Offline Kevin Paquet

  • Jr. Member
  • **
  • Posts: 148
  • Gender: Male
  • Proudly Pinoy!
    • Pinoy Teens
Re: AJAX Quick Reply
« Reply #37 on: May 30, 2008, 02:26:04 PM »
I need help.
I tried it.

Offline SlammedDime

  • SMF Friend
  • SMF Super Hero
  • *
  • Posts: 10,280
  • School of Air Ride
    • matt.zuba on Facebook
    • @mattzuba on Twitter
    • ZubaFitness
Re: AJAX Quick Reply
« Reply #38 on: May 30, 2008, 02:28:13 PM »
roberto: that line is on Line 407 of the file you posted.

jossanaijr - when you reply, it should be an instant reply that shows up on the screen, the page should not reload.

I'll be posting a new version here shortly that fixes a javascript issue if a user doesn't have javascript enabled, as well as allowing some support for pretty urls (you must have pretty urls installed first).
SlammedDime
Former Lead Customizer
BitBucket Projects
GeekStorage.com Hosting
                      My Mods
SimpleSEF
Ajax Quick Reply
Sitemap
more...
                     

Offline SlammedDime

  • SMF Friend
  • SMF Super Hero
  • *
  • Posts: 10,280
  • School of Air Ride
    • matt.zuba on Facebook
    • @mattzuba on Twitter
    • ZubaFitness
Re: AJAX Quick Reply
« Reply #39 on: May 30, 2008, 02:50:11 PM »
stanaca - Here is your file:
« Last Edit: May 30, 2008, 02:51:53 PM by SlammedDime »
SlammedDime
Former Lead Customizer
BitBucket Projects
GeekStorage.com Hosting
                      My Mods
SimpleSEF
Ajax Quick Reply
Sitemap
more...