ElkArte Community

Extending Elk => Addons => Addons ideas and questions => Topic started by: ahrasis on November 10, 2015, 12:46:30 am

Title: Ajax Inline Message Preview
Post by: ahrasis on November 10, 2015, 12:46:30 am
I was thinking of re-writing the said SMF mod to ElkArte with one problem, my javascript command including jquery is poor  :( . The key to this mod is that, other than java, it is using xml to pass from display to message index page. I will try play aroud and see what I can come out with. Hope to see some ideas and suppots on this too. ;)
Title: Re: Ajax Inline Message Preview
Post by: emanuele on November 10, 2015, 08:17:44 am
To be honest I haven't seen your other mod, so I can't propose so much... link? O:-)
Title: Re: Ajax Inline Message Preview
Post by: ahrasis on November 10, 2015, 06:12:37 pm
The mod is not mine but the link is here: http://custom.simplemachines.org/mods/index.php?mod=1152. It shows the topic and replies at the message index page.
Title: Re: Ajax Inline Message Preview
Post by: ahrasis on November 18, 2015, 05:13:24 am
I think I can make this work but I am not so sure of what cost.
Title: Re: Ajax Inline Message Preview
Post by: Jorin on November 18, 2015, 05:23:45 am
Hm, I don't like it. No need to work on it for me.  ;)
Title: Re: Ajax Inline Message Preview
Post by: emanuele on November 18, 2015, 02:38:23 pm
Sorry, I missed your reply... :-[

Judging by the look of it, I think you can use almost the same code used in the infinite scrolling addon, just a bit of javascript would change to let you 1) show the buttons to load the messages and 2) load the previews from the message index instead of the display page.
Title: Re: Ajax Inline Message Preview
Post by: radu81 on November 18, 2015, 06:57:17 pm
I used that mod on smf :)
Title: Re: Ajax Inline Message Preview
Post by: ahrasis on November 18, 2015, 11:28:31 pm
If anyone misunderstood, I don't mean its costs in the sense of $$$ though, I mean it in the sense of performance.

And thanks @emanuele as I was also thinking a long that line too. Anyway, would there be any "penalty" for using this kind of addon?
Title: Re: Ajax Inline Message Preview
Post by: emanuele on November 19, 2015, 02:05:43 am
I've a doubt if with "penalty" you are referring to performances or to google and alike, so I'll write about performances also because we can say no problem for google.

In general you have to worry about performances when the script does something automatically without need of user interaction, for example chats that probe the server every few seconds waiting for new messages, because in that case it means that each online user is doing something repeatedly even though if the page is open in a tab left around since "the old days" (so you open a tab and forgot about it).
On the contrary, if you are doing something that requires user interaction (i.e. click a link), th worst it can do is act like a person browsing very fast the website, but it cannot do much more than that. And a person that browses very fast the website is not really a source of problems unless 1) the server is under capacity already 2) the process is very slow or heavy (like a search).

In that case, you are loading messages, something that is done on a regular basis (display page), so you are not doing something exceptional, and you are doing it wating for user interaction (i.e. click on the button), so the operation classifies in the second category and you don't have to worry about performances. ;D
Title: Re: Ajax Inline Message Preview
Post by: ahrasis on July 27, 2016, 07:45:49 am
I have to note this as I am more forgetful now but I am thinking to proceed with this idea, soon.
Title: Re: Ajax Inline Message Preview
Post by: ahrasis on November 11, 2016, 07:42:09 pm
@inter can you add this into your FlarumStyle addon or create a new one?
Title: Re: Ajax Inline Message Preview
Post by: inter on December 23, 2016, 05:57:45 am
In FlarumStyle mod a list of Ajax is now stretched. (Click on "Load More" Button)