MyBB Community Forums

Full Version: While You Were Typing
You're currently viewing a stripped down version of our content. View the full version with proper formatting.
Pages: 1 2 3 4 5 6 7 8
(2011-01-10, 12:11 PM)gavpedz Wrote: [ -> ]I thought mybb did this anyway

No, it doesn't ... MyBB does check if there are new posts posted if you quick reply. MyBB refreshes the page then but doesn't inform the user of it. This plugin will inform you that new posts were posted while you were typing so can decide if your post is still valuable to the thread or not.
The plugin is available again on the mod site Smile
This is really well written but do you have concerns about performance and overhead? You're hooking into global start and global end.

I'm looking now and I have a suggestion.

Add {$whiletyping_js} to headerinclude template. Then when on the newreply page and using those hooks you can then make sure the JS is inserted. This will remove performance problems and load on all the other pages.

I'm a real hater of using global_end and global_start hooks if you're only hooking into one page of the forum.
thats very s3xy i would r4p3 it.
(2011-01-11, 01:19 AM)labrocca Wrote: [ -> ]Add {$whiletyping_js} to headerinclude template. Then when on the newreply page and using those hooks you can then make sure the JS is inserted. This will remove performance problems and load on all the other pages.

I will take that under consideration for the next version. Thanks for your feedback.


(2011-01-11, 02:56 AM)Dark Byte Wrote: [ -> ]thats very s3xy i would r4p3 it.

LOL Big Grin
(2011-01-11, 10:25 AM)Aries-Belgium Wrote: [ -> ]
(2011-01-11, 01:19 AM)labrocca Wrote: [ -> ]Add {$whiletyping_js} to headerinclude template. Then when on the newreply page and using those hooks you can then make sure the JS is inserted. This will remove performance problems and load on all the other pages.

I will take that under consideration for the next version. Thanks for your feedback.

Nice and great mod.
Please do what Labrocca said Wink
I will test it the performance on my big forum, right now
It that right? There isn´t a "?>" at the end of lang file?

<?php
$l['whiletyping_context_single'] = "Enquanto voce digita, foi postada %d nova resposta";
$l['whiletyping_context_more'] = "Enquanto voce digita, foram postadas %d novas respostas";
$l['whiletyping_your_post'] = "Sua resposta";
$l['whiletyping_show_posts_context_single'] = "Mostrar resposta";
$l['whiletyping_show_posts_context_more'] = "Mostrar respostas";

This is Brazilian portuguese language btw - Folder: portugues_brasileiro - Thanks Smile
@aglioeolio: Thanks for the translation! Really appreciated. This translation will be included in the next version. Doesn't it have to be "portugues_brasil"? I downloaded the official language pack from the MyBB download page to test your translation and they use "portugues_brasil" so the translation of the plugin needs to follow the same naming convention as MyBB. Smile Do have a custom language or something?

The "?>" at the end of the lang file isn't mandatory if you aren't mixing PHP and HTML. If you close your PHP tags and there is a newline or even a space behind it, it's possible it will produce errors. Especially when using header-redirects, cookies, sessions, ...

If there are people who want to translate this plugin in their own language feel free to do that Wink It's much appreciated. Please check the INSTALL file included in the zip file for instructions on translating.
Yeah, my mistake, it´s "portugues_brasil" the proper folder name translated by speeder. Now I remembered that I use a different name for custom strings since 1.4x

Quick Question: For ajax performance/compatibility is better to keep lang/js files inside 'plugins' folder?

Thanks Aries-Belgium.
(2011-01-13, 09:34 PM)aglioeolio Wrote: [ -> ]Quick Question: For ajax performance/compatibility is better to keep lang/js files inside 'plugins' folder?

It wouldn't affect performance as I use the same code as MyBB does for loading languages, only the folder is different. For JS it doesn't really matter if it's inside the plugins folder as it wouldn't load quicker or slower if it's in the mybb js folder. I personally like to keep all plugin files together but there is a discussion about it going on over here: http://community.mybb.com/thread-85878.html .
This plugin adds a little bug in the quick reply.
The ...loading window will load forever.
Pages: 1 2 3 4 5 6 7 8