Simple Machines Community Forum

SMF Development => Feature Requests => Topic started by: Padre gremista on July 10, 2014, 10:44:27 PM

Title: Quick reply without loading pages
Post by: Padre gremista on July 10, 2014, 10:44:27 PM
Good, I think that quick reply without loading pages is much necessary in some foruns.

How this feature exists in other plataforms, how Vbullentin, I see that will be interesting have it in SMF.

I searching here in forum and seen that have a mod for this compatible with SMF 1.0 but none compatible with SMF 2.0.
Title: Re: Quick reply without loading pages
Post by: Kindred on July 10, 2014, 10:47:37 PM
.??

Hmmm?  You need to be more clear. Do you mean having  quick reply on the read a thread page?
If so, it can be there already....

Or do you mean, when you make a quick reply, it gets added to the thread without reloading the screen?

If the second one... No.
There are so many potential problems with that idea that I don't even know where to start...
Title: Re: Quick reply without loading pages
Post by: Deaks on July 10, 2014, 10:59:56 PM
Can you provide link to the mod?  May be easier to know what you mean ;-)

Really should get clarity before overall rejecting an idea Kindred :-P
Title: Re: Quick reply without loading pages
Post by: Padre gremista on July 10, 2014, 11:27:37 PM
This below mod I say:

http://www.simplemachines.org/community/index.php?topic=241917.0
Title: Re: Quick reply without loading pages
Post by: Kindred on July 10, 2014, 11:56:53 PM
I didn't reject it out of hand... I considered and then rejected it    the link to the mod does prove that it was the second option...     and, I still see potential issues with it -- and see no need to add it as a feature.

(however, the OP is wrong... that mod does work with 2.0RC4 - which means - it stands an even-odds chance that it may work with 2.0.8, if he wants to try.)
Title: Re: Quick reply without loading pages
Post by: ZerK on July 11, 2014, 03:52:28 AM
it does works with 2.0.8, im using it in one of my forums.
Title: Re: Quick reply without loading pages
Post by: Hj Ahmad Rasyid Hj Ismail on July 11, 2014, 06:21:45 PM
On the contrary to popular belief, supposedly, IMO SMF built-in quick reply is already capable of posting wittout a need for refreshing the page. You can set quick reply to be shown by default and return topic to make this work without ajax:
    a. Admin > Theme & Layout > Members Options
    b. Change current options for all members using this theme.
    c. Configure guest and new user options for this theme.

A custom mod, which I already submitted named Quick Reply Reposition Mod will soon be available upon its approval at http://custom.simplemachines.org/mods/index.php?mod=3891. Pending the approval, you may get it from https://github.com/ahrasis/Quick-Reply-Reposition-Mod.

It re-positions your default theme quick reply which is normally positioned below jump-to box. Quick reply should then be positioned under the last post in a page as shown in these pictures.
(https://www.simplemachines.org/community/index.php?action=dlattach;topic=486861.0;attach=233129;image)
(https://www.simplemachines.org/community/index.php?action=dlattach;topic=486861.0;attach=233131;image)
Title: Re: Quick reply without loading pages
Post by: Antechinus on July 11, 2014, 06:24:20 PM
Ok, but that only moves it up 100px or so. Doesn't do anything else. It's not a bad idea, but wont do the same thing as an AJAX mod.

ETA: Also, you could do that mod with far less code. There's no real need to replace the entire QR block. You could just add in the bit to change it to a function and leave most of it alone.
Title: Re: Quick reply without loading pages
Post by: Hj Ahmad Rasyid Hj Ismail on July 11, 2014, 06:32:25 PM
Indeed ajax is better. But I am not a man of coding. I just use a simple approach. ;) I leave those with better knowledge and expertise to improvise or better still rewrite as I can see contributors to SMF 2.1 and its fork (Elkarte) seems good in doing that. :)
Title: Re: Quick reply without loading pages
Post by: Antechinus on July 11, 2014, 06:40:18 PM
Fair enough, but why not just have your search xml do this?

Code (Search) Select
if ($context['can_reply'] && !empty($options['display_quick_reply']))
{


Code (Add after (which is really before, because xml is stupid)) Select
function template_quick_reply()
{
global $context, $settings, $options, $txt, $scripturl, $modSettings;


Then just needs a closing tag at the end, and you can leave most of the existing QR code alone. That means it will still work even if someone has customised QR a bit, so less problems. :)
Title: Re: Quick reply without loading pages
Post by: Hj Ahmad Rasyid Hj Ismail on July 11, 2014, 07:27:21 PM
It is there already, when I fixed it, I think. Or do you mean differently?
Title: Re: Quick reply without loading pages
Post by: Antechinus on July 11, 2014, 07:39:39 PM
I was just looking at what was on GitHub. I thought if you left most of the default code alone, and just wrapped it in the tags it needed, instead of searching for and replacing all of it, then the mod would be more versatile.
Title: Re: Quick reply without loading pages
Post by: Hj Ahmad Rasyid Hj Ismail on July 11, 2014, 07:48:44 PM
It still there in the github. As in making the mod, I have considered two things i.e. 1st, function in function and 2nd, form in form. That leads me to search, replace and move the original code outside the main function and its current form. Otherwise, it will be function in function and form in form which will not work. Or, am I still didn't get you?
Title: Re: Quick reply without loading pages
Post by: Antechinus on July 11, 2014, 08:16:26 PM
Oh nvm. I see now. It's the javascript at the end of the file that's the problem. Otherwise you could just juggle a couple of tags. Pity.
Title: Re: Quick reply without loading pages
Post by: Padre gremista on July 12, 2014, 06:12:30 PM
I install the mod in my forum (using the compatible mod SMF 2.0 RC4), but, the mod is not working (despite install normally). Anyone here managed make mod works corretly?
Title: Re: Quick reply without loading pages
Post by: ZerK on July 12, 2014, 08:53:47 PM
i did, but i cant remember how exactly.

open the console (ctrl+Mayus + K on firefox) and try to post something, there should pop a javascript error when you try to post
Title: Re: Quick reply without loading pages
Post by: Hj Ahmad Rasyid Hj Ismail on July 13, 2014, 02:24:38 PM
Sorry. Any question relating a mod should be asked in its particular support page. Even if any of us successfully make it compatible with the recent or any SMF version, none of us can share any of them here unless it is a complete rewrite or allowed by its author.
Title: Re: Quick reply without loading pages
Post by: Hj Ahmad Rasyid Hj Ismail on July 15, 2014, 03:40:03 AM
Quote from: ahrasis on July 11, 2014, 06:21:45 PM
On the contrary to popular belief, supposedly, IMO SMF built-in quick reply is already capable of posting wittout a need for refreshing the page. You can set quick reply to be shown by default and return topic to make this work without ajax:
    a. Admin > Theme & Layout > Members Options
    b. Change current options for all members using this theme.
    c. Configure guest and new user options for this theme.

A custom mod, which I already submitted named Quick Reply Reposition Mod will soon be available upon its approval at http://custom.simplemachines.org/mods/index.php?mod=3891. Pending the approval, you may get it from https://github.com/ahrasis/Quick-Reply-Reposition-Mod.

It re-positions your default theme quick reply which is normally positioned below jump-to box. Quick reply should then be positioned under the last post in a page as shown in these pictures.
As for the mod I mentioned before, you can have the WIP package here: http://www.simplemachines.org/community/index.php?topic=525169.0
Title: Re: Quick reply without loading pages
Post by: Aaron10 on August 04, 2014, 10:29:16 PM
Install it manually like I did, works fine.

@ahrasis that's a pretty good idea/mod that I've never seen a forum use before. Good job.