Customizing SMF > Modifications and Packages

AJAX Instant Quick Reply

(1/177) > >>

SlammedDime:
Link to Mod

Very Very Very Important.  If you have Sleepy's View Single Post mod installed, you MUST uninstall it before installing this.  This incorporates that mod as well in order to work properly.

This mod allows for AJAX Quick Reply.  Quick reply must be enabled on your board for this to work, this does not replace the built in quick reply.  Normally, when a post is submitted, the page will reload and your new post will be displayed.  This eliminates the need to reload the page and your post shows up instantly.

Here is a video that demonstrates the functionality: http://www.mattzuba.com/_public/ajax.swf.html

Some quick notes about how it works (only (1) applies to SMF 1.1.5):
1) If a user is not on the last page of a topic or viewing all, the post will post as normal
2) If visual verification is enabled for posting, it will post as normal
3) If posts are moderated, it will post as normal.
4) If there are any errors during posting, it will post as normal

Note:
I will make the modification to anyone's custom Display.template.php, provided they have at least attempted it on their own.  Please post an unmodified copy, however.  I run it through the package parser and make manual adjustments as needed.

If anyone would like me to see why it isn't working on their site, they will need to provide a link to their site as well as a test account to be used.

Support Topic: http://www.simplemachines.org/community/index.php?topic=241917.0

Known Issues:
After posting, boardindex still shows board as unread (or, has new replies)

--- Quote from: SlammedDime on May 30, 2008, 07:19:10 PM ---Fix for 1.1.5 or B3.1:
Open xml_topic.js
--- Code: (Find) ---function ajax_reply()
{
   var i, x = new Array();
   x[x.length] = 'topic=' + parseInt(document.forms.postmodify.elements['topic'].value);
   x[x.length] = 'subject=' + escape(textToEntities(document.forms.postmodify['subject'].value.replace(/&#/g, "&#"))).replace(/\+/g, "%2B");

--- End code ---


--- Code: (Replace) ---function ajax_reply()
{
   var i, x = new Array();
   x[x.length] = 'topic=' + parseInt(document.forms.postmodify.elements['topic'].value);
   x[x.length] = 'goback=' + parseInt(document.forms.postmodify.elements['goback'].value);
   x[x.length] = 'subject=' + escape(textToEntities(document.forms.postmodify['subject'].value.replace(/&#/g, "&#"))).replace(/\+/g, "%2B");

--- End code ---

Sorry.

--- End quote ---


--- Quote ---If you install Pretty Urls AFTER installing this mod, you will have to manually make the changes in /Sources/Display.php.

--- Code: (Find) ---   if ((isset($context['pretty']['oldschoolquery']) || $context['pretty']['query_string']['board'] != $context['pretty']['board_urls'][$board]) && $modSettings['pretty_enable_filters'])
--- End code ---

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

--- End quote ---

Change Log:
Legend:
* = New feature
+ = Improved feature
! = Fixed bug
? = Other stuff

Version 1.0.1
-------------
! Invalid semantics in XMLtemplate.php
! Now works properly if javascript is disabled in user's browser
+ When Show Newest Posts first is enabled, new posts now go to top, rather than bottom.
? Install checks for pretty urls and makes changes if needed

Version 1.0.0
-------------
* Release


FAQ
Q: After installing the mod, I don't see quick reply on my topic pages.
A: This mod does not add quick reply to your board.  One of SMF's included features is quick reply.  This only changes it's functionality.  To enable quick reply, you have to go to your profile and change your Look and Layout Preferences to display it.

Q: I installed this mod, but don't see any settings for it.
A: That's because there are none.  It only changes existing functionality and there is nothing to configure.

Q: Will this work on my theme?
A: In short: It will work on just about any non-semantic theme on 1.1.x (any theme based on the Core theme).  It will work on just about any semantic theme for 2.0.  If your 2.0 theme uses tables to display posts, rather than div's, this will not work at this time.

Q: It doesn't work...
A: I don't like that phrase.  Be more detailed.  What exactly is happening?  What isn't happening?  I can't do much without a test account and link to your board either, so please post that

Hoochie Coochie Man:
Thanks for this great mod :)

karlbenson:
Indeed i think its going to be really popular.

ALEJO:
screenshots plz?

Hoochie Coochie Man:
Those .js files include mootools. for what? for AJAX Quick Reply?

Navigation

[0] Message Index

[#] Next page

Go to full version