ElkArte Community

Extending Elk => Addons => Topic started by: ahrasis on August 07, 2014, 04:39:29 pm

Title: QRR: Quick Reply Reposition
Post by: ahrasis on August 07, 2014, 04:39:29 pm
QRR: Quick Reply Reposition

- For Elk 1.0x & 1.1x
- Fully Hook.

1. Please do your own backup though every installation is backed up automatically.
2. This mod will re-position your forum quickreply box from its current position to immediately after the last post.
3. Upon its successful installation, go to addons settings page to turn it off or on.
4. You will be redirected there automatically though. ;)
5. Thank you to emanuele for the template layer guide.


Thank you for using/testing it.


Yours friendly,
Abu Fahim Ismail.

BSD License. Feel free to modify accordingly but keep author's link if it is in there somewhere. ;)

(https://validator.w3.org/images/valid_icons/valid-xhtml10)  (https://jigsaw.w3.org/css-validator/images/vcss)

#Change Logs

@Version 1.0.7
- Restore addon to sources directory.
- Adjust display for both 1.0x and 1.1x.
- White background for quickreply box.
- Move warning to before buttons.
Spoiler (click to show/hide)
Title: Re: [ADDON] QRR - Quick Reply Reposition
Post by: emanuele on August 07, 2014, 05:23:07 pm
Your code wouldn't work, the comma is a valid way to concatenate only when you use echo.
In this case you'd have to use parenthesis:
Code: [Select]
	// Show a link to the member's profile.
$poster_div .= '
<a class="linklevel1 name"' . (empty($message['member']['id']) ? '' : ' href="' . $scripturl . '?action=profile;u=' . $message['member']['id'] . '"') . '>
' . $message['member']['name'] . '
</a>';

That said, I think it is done that way because it seems (at least to me) easier to read than the ternary operator ( xx ? yy : zz ).
It's a bit of repetition, yeah.
Title: Re: [ADDON] QRR - Quick Reply Reposition
Post by: ahrasis on August 07, 2014, 05:47:01 pm
So comma is replaced by dot (parenthesis) in this kinda case? Thanks for the tips. I'd better check the attached addon whether it is using comma or dot.

Yeah. It is not broken and need no fixing. Just a little bit longer code and that was it. :)

Edited: The addon correctly used comma following echo.
Title: Re: [ADDON] QRR - Quick Reply Reposition
Post by: ahrasis on November 05, 2014, 07:32:35 pm
Updated to fully hook version. Change Logs are as follow:


#Change Logs
@Version 1.0.2
- Fix minor css issues.

@Version 1.0.1
- Upgraded to fully hook version.

@Version 1.0.0
- Initial release with manual modifications.
Title: Re: [ADDON] QRR - Quick Reply Reposition
Post by: nhwood on February 23, 2015, 10:28:41 pm
After install, the avatar is broken in the quick reply area but everything else works fine.
Title: Re: [ADDON] QRR - Quick Reply Reposition
Post by: emanuele on February 24, 2015, 10:44:24 am
Looks good here.

Which file did you use? elk-QRR.hook.v.102.zip or the other? The other is an older version.

@ahrasis as a suggestion, I think you should keep only the most recent version of the addons attached to the messages, otherwise it may become confusing. ;)
Title: Re: [ADDON] QRR - Quick Reply Reposition
Post by: nhwood on February 24, 2015, 11:47:34 pm
I did use elk-QRR.hook.v.102.zip. I also changed some CSS in the poster bit area, do you think that could have affected it?
Title: Re: [ADDON] QRR - Quick Reply Reposition
Post by: nhwood on February 25, 2015, 12:28:33 am
Ok so it turns out it was broken because I had gravatar set as my avatar. I set my avatar to an image from the avatar gallery and it works fine now.
Title: Re: [ADDON] QRR - Quick Reply Reposition
Post by: ahrasis on February 26, 2015, 05:29:05 am
I use $context['user']['avatar']['image'] for displaying image in the repositioned quick reply. Somehow, that may not cover gravatar. Can you explain @emanuele ?
Title: Re: [ADDON] QRR - Quick Reply Reposition
Post by: emanuele on February 26, 2015, 10:27:50 am
Looks like a bug with the changes I recently did to the avatars (or maybe not, I didn't investigate much, yet).
I'll track it and try to solve for 1.0.3.

ETA: https://github.com/elkarte/Elkarte/issues/1972
Title: Re: [ADDON] QRR - Quick Reply Reposition
Post by: emanuele on March 06, 2015, 05:27:23 pm
Fix pushed: https://github.com/elkarte/Elkarte/pull/1977
Title: Re: [ADDON] QRR - Quick Reply Reposition
Post by: ahrasis on March 08, 2015, 01:33:41 am
Thank you for the fix @emanuele .
Title: Re: [ADDON] QRR - Quick Reply Reposition
Post by: ahrasis on November 03, 2015, 07:48:39 pm
Updated...

#Change Logs
@Version 1.0.3
- Improve css and reorganize files.
Title: Re: [ADDON] QRR - Quick Reply Reposition
Post by: ahrasis on July 14, 2016, 08:51:08 am
Updated...

#Change Logs

@Version 1.0.4
- Reorganize so that css can be minified together with other css.
Title: Re: [ADDON] QRR - Quick Reply Reposition
Post by: ahrasis on August 11, 2016, 10:36:44 am
#Change Logs

@Version 1.0.5
- Resruture addon's directories and locations.
Title: Re: QRR: Quick Reply Reposition
Post by: ahrasis on November 01, 2016, 02:45:29 pm
#Change Logs

@Version 1.0.6
- Create another template for 1.1 beta 3.
Title: Re: QRR: Quick Reply Reposition
Post by: ahrasis on September 17, 2017, 06:05:09 am
#Change Logs

@Version 1.0.7
- Restore addon to sources directory.
- Adjust display for both 1.0x and 1.1x.
- White background for quickreply box.
- Move warning to before buttons.
Title: Re: QRR: Quick Reply Reposition
Post by: ahrasis on January 04, 2021, 02:04:37 pm
I haven't visited this for 4 years. I think is time for an update.
Title: Re: QRR: Quick Reply Reposition
Post by: Spuds on January 04, 2021, 07:39:11 pm
Look out for php 7.4 / 8.0  :D