inherit
142718
0
Aug 26, 2024 21:33:45 GMT -8
Tiffamu
187
July 2009
tiffamu
|
Post by Tiffamu on May 31, 2021 18:13:08 GMT -8
Forum URL: dragonridersofberk.boards.net/So I found this plugin that adds another row to the info center and shows users online in Discord under the "Online now" and "Online in the last 24 hours". However, I'm having an issue because I'm using the Sonorous theme which remodels the info center, so it's no longer a table. I've added in the space to put the plugin, but I don't know how to edit the plugin to make it show up where I want it. I found this support thread, but I don't think the same would work since we're using different themes with different CSS and layouts. Any help would be appreciated!
|
|
#e61919
Support Staff
224482
0
1
Nov 22, 2024 17:59:24 GMT -8
Scott
“Asking for help isn't giving up... it's refusing to give up.”
24,527
August 2015
socalso
|
Post by Scott on May 31, 2021 18:30:24 GMT -8
Tiffamu, I'm tagging Peter since this is his plugin.Update: this was moved from Support because from the linked example it would appear that both the theme home template and plugin would need some modifications for the plugin to work properly. Hopefully a member skilled in both templates and JavaScript will be able to help.
|
|
inherit
Official Code Helper
65613
0
1
Oct 22, 2024 1:56:19 GMT -8
Chris
"'Oops' is the sound we make when we improve"
9,018
December 2005
horace
RedBassett's Mini-Profile
|
Post by Chris on Jun 3, 2021 23:33:57 GMT -8
Easiest path would most likely be to embed an override method in the theme's home page layout instead of editing the plugin directly because it would no longer work on more traditional themes that may be installed now or in the future. Layout Templates::Home<!-- Override Discord Plugin "add_info_row" method for Sonorous theme (Top of Home template) --> <script> ProBoards_Discord["add_info_row"]=function add_info_row() { /* No unique class or id assigned so use class on 24hr section to locate discord section that follows it */ var $last_row = $("div.forum-stats").find(".online-24 + .online-stats"); if ($last_row.length) { var $online = $last_row.find(".text"); $online.empty().attr("id", "discord-online").html("No users online."); return true } return false } </script> *note: I do not currently have the the plugin or the theme installed so not tested
|
|
inherit
142718
0
Aug 26, 2024 21:33:45 GMT -8
Tiffamu
187
July 2009
tiffamu
|
Post by Tiffamu on Jun 4, 2021 8:37:13 GMT -8
Easiest path would most likely be to embed an override method in the theme's home page layout instead of editing the plugin directly because it would no longer work on more traditional themes that may be installed now or in the future. Layout Templates::Home<!-- Override Discord Plugin "add_info_row" method for Sonorous theme (Top of Home template) --> <script> ProBoards_Discord["add_info_row"]=function add_info_row() { /* No unique class or id assigned so use class on 24hr section to locate discord section that follows it */ var $last_row = $("div.forum-stats").find(".online-24 + .online-stats"); if ($last_row.length) { var $online = $last_row.find(".text"); $online.empty().attr("id", "discord-online").html("No users online."); return true } return false } </script> *note: I do not currently have the the plugin or the theme installed so not testedThat worked! Thank you so much Chris Also, this is unrelated but an annoyance I'm dealing with right now so I figure I'll ask. The theme didn't originally have the code to select multiple posts (the checkbox was gone) so you would have to go into each thread and moderate them instead of selecting a bunch at once. I added the default checkbox code into the theme, and it works and I can select multiple threads and moderate. However, once I moderate (move the threads, delete them, whatever) all of the other threads disappear and it says "No threads were found" until I refresh the page, then whatever threads were left over after I moved or deleted threads show up again. I believe this also happens with private messages. Did I enter something wrong?
{foreach $[thread]} <td class="thread-body"> <table style="width: 100%;"> <tr id="$[thread.content_id]" class="$[thread.content_class]"> <td class="checkbox clickable">$[thread.checkbox]</td> <td class="left-box{if $[thread.is_new]} new{/if}{if $[thread.is_announcement]} announce{/if}"> </td> <td class="author-avatar"><div data-item="created-by">$[thread.created_by.avatar]</div> </td> <td class="main override"> <span class="link target" title="$[thread.short_content]"> <div class="t-icons"> {if $[thread.is_announcement]} <div class="t-icon"> <i class="fa fa-bullhorn"></i> </div> {/if} {if $[thread.is_locked]} <div class="t-icon"> <i class="fas fa-lock"></i> </div> {/if} {if $[thread.is_poll]} <div class="t-icon"> <i class="far fa-chart-bar"></i> </div> {/if} {if $[thread.is_sticky]} <div class="t-icon"> <i class="fas fa-thumbtack"></i> </div> {/if} {if $[thread.is_bookmarked]} <div class="t-icon"> <i class="fas fa-bookmark"></i> </div> {/if} </div> $[thread]$[thread.labels]</span> <div class="t-timestamp"> <div class="ui-micro-pagination">{if $[thread.pagination]}$[thread.pagination]{/if}</div> created $[thread.created_on]</div> <div class="t-author">by <span data-item="created-by">$[thread.created_by]</span></div> </td> <td class="replies"> $[thread.replies_count]<span>{if $[thread.replies_count] != 1}replies{else}reply{/if}</span> </td> <td class="views"> $[thread.views]<span>view{if $[thread.views] != 1}s{/if}</span> </td> <td class="last-post"> <div class="ui-micro-pagination">{if $[thread.pagination]}$[thread.pagination]{/if}</div> last post $[thread.last_post.created_on]</div> <div class="t-author">by <span data-item="latest">$[thread.last_post.created_by]</span></div> </td> <td class="lp-avatar"> <div data-item="latest">$[thread.last_post.created_by.avatar]</div> </td> </tr> </table> </td> </tr> {/foreach} {if !$[thread]} <tr class="last"> <td class="last center" colspan="7">No threads were found.</td> </tr> {/if}
|
|
inherit
Official Code Helper
65613
0
1
Oct 22, 2024 1:56:19 GMT -8
Chris
"'Oops' is the sound we make when we improve"
9,018
December 2005
horace
RedBassett's Mini-Profile
|
Post by Chris on Jun 4, 2021 20:48:59 GMT -8
|
|