-
-
Notifications
You must be signed in to change notification settings - Fork 214
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Add chatbox_menu_template.php and chatbox_menu_shortcodes.php for chatbox_menu plugin. #3631
Add chatbox_menu_template.php and chatbox_menu_shortcodes.php for chatbox_menu plugin. #3631
Conversation
Thanks @arunshekher Have you tested it with v1 theme templates that use the following code or similar?
|
Thanks @arunshekher . It appears to be ignoring the template though? |
Sure, I'll check that and amend the commit with the changes required. |
Please re-review, I removed the code block that fetched legacy chatbox_menu template to render chatbox_menu when legacy themes were used. |
Thanks @arunshekher . I don't have time to check, but just wanted to confirm that |
Okay @CaMer0n, I apologize if it's too obvious, but could you re-confirm if this is what you mean: In brief should the goal be that..
|
@CaMer0n, Is this acceptable: In chatbox_menu.php :
In chatbox_menu_shortcodes.php :
|
Thanks @arunshekher Looks good! |
@CaMer0n, I've amended PR after making the changes in chatbox_menu.php file alone as follows:
|
"user_id = {$userId}"); | ||
|
||
} | ||
|
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This has no cache, so it could lead to a lot of queries. Use return e107::user($userId);
instead.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@CaMer0n, thank you for the suggestion, I've updated the code in PR.
Introduce shortcode/template combination to render avatars in chat.php Changes: - Add chatbox_menu_template.php and chatbox_menu_shortcodes.php files. - Add bootstrap3 styling for some elements in chat.php list view markup. - Cleanup chat.php and chatbox_menu.php code generally and to replace legacy database calls with current standard. - Add logic to search and replace legacy chat icon source path with current icon path in $CHATBOXSTYLE - Refactor retrieveUserDataByNick() method to use e107::user() method to retireve extended user data. Succeeded Tests: - Load chatbox_menu_template.php in {e_PLUGIN}/chatbox_menu/templates/chatbox_menu_template.php - Load chatbox_menu_template.php in {THEME}/templates/chatbox_menu/chatbox_menu_template.php
Thank you @arunshekher ! |
@CaMer0n,
Please review and merge. If there are changes required please advice. Yet to remove old chat_template.php from plugin folder.
Add chatbox_menu_template.php and chatbox_menu_shortcodes.php, Introduce shortcode/template combination to render avatars in chat.php
Changes:
Succeeded Tests: