• Welcome to Simple Machines Community Forum. Please login or sign up.

AJAX Instant Quick Reply

Started by SlammedDime, May 29, 2008, 06:59:11 PM

Previous topic - Next topic

SlammedDime

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...
                     

4Kstore

Quote from: Hoochie Coochie Man™ on May 29, 2008, 08:05:03 PM
Quote from: karlbenson on May 29, 2008, 07:38:38 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!!!

stanaca

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
...

Badboy

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.

[SiNaN]

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

Hoochie Coochie Man

Quote from: SlammedDime on May 29, 2008, 08:16:06 PM
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

SlammedDime

May 30, 2008, 03:43:25 AM #26 Last Edit: May 30, 2008, 03:46:17 AM by SlammedDime
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.
SlammedDime
Former Lead Customizer
BitBucket Projects
GeekStorage.com Hosting
                      My Mods
SimpleSEF
Ajax Quick Reply
Sitemap
more...
                     

stanaca

Quote from: SlammedDime on May 30, 2008, 03:43:25 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
...

Hoochie Coochie Man

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

stanaca

Quote from: Hoochie Coochie Man™ 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

I am also using pretty urls mod
...

уιℓмαz

Thanks great mod.

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

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

Hoochie Coochie Man

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

уιℓмαz

Quote from: уιℓмαz 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:

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.

jossanaijr

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:

<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
<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:

// 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?

SlammedDime

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...
                     

roberto174

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 <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

jossanaijr

Thanks.
I did not notice any problem with ad management mod but how can I check it your mod is working fine?...

Kevin Paquet

I need help.
I tried it.

SlammedDime

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...
                     

SlammedDime

May 30, 2008, 02:50:11 PM #39 Last Edit: May 30, 2008, 02:51:53 PM by SlammedDime
stanaca - Here is your file:
SlammedDime
Former Lead Customizer
BitBucket Projects
GeekStorage.com Hosting
                      My Mods
SimpleSEF
Ajax Quick Reply
Sitemap
more...
                     

Advertisement: