JD
Full Member
Posts: 771
inherit
180643
0
Aug 17, 2023 0:37:07 GMT -8
JD
771
June 2012
obsidian92
|
Post by JD on Jun 30, 2019 8:14:35 GMT -8
Hey there! I posted this in response to the library support thread for this plugin but got no response so I'm gonna try popping this here and see if anyone has had a similar issue that they might know how to fix it? <3 Hey there! I'm having an issue with this plugin where it's not showing the thread description on the thread page? It shows under the thread name in the board's thread listings but doesn't appear on the thread post list page itself. Any idea what I'm doing wrong? I'm testing it out here - aeipathy.forums.net/I've tried deactivating all my other plugins and setting a default theme in place so see if I have a conflicting code but it still doesn't show. Any suggestions? <3
|
|
JD
Full Member
Posts: 771
inherit
180643
0
Aug 17, 2023 0:37:07 GMT -8
JD
771
June 2012
obsidian92
|
Post by JD on Jul 3, 2019 1:32:56 GMT -8
anyone have any ideas on this one? >..<"
|
|
Kami
Forum Cat
Posts: 40,032
Mini-Profile Theme: Kami's Mini-Profile
#f35f71
156500
0
Offline
Jul 24, 2021 11:48:29 GMT -8
Kami
40,032
July 2010
kamiyakaoru
Kami's Mini-Profile
|
Post by Kami on Jul 3, 2019 7:28:47 GMT -8
Without being able to see a default theme, it's impossible to tell what your specific issue is, sorry!
Can you put the default theme up until your issue is resolved?
|
|
JD
Full Member
Posts: 771
inherit
180643
0
Aug 17, 2023 0:37:07 GMT -8
JD
771
June 2012
obsidian92
|
Post by JD on Jul 3, 2019 10:24:10 GMT -8
Without being able to see a default theme, it's impossible to tell what your specific issue is, sorry! Can you put the default theme up until your issue is resolved? Apologies Kami ! I have a default theme in place now <3
|
|
Kami
Forum Cat
Posts: 40,032
Mini-Profile Theme: Kami's Mini-Profile
#f35f71
156500
0
Offline
Jul 24, 2021 11:48:29 GMT -8
Kami
40,032
July 2010
kamiyakaoru
Kami's Mini-Profile
|
Post by Kami on Jul 3, 2019 10:39:49 GMT -8
So what I'm seeing in the plugin is that there should be a div with the class "thread_description_page" that gets inserted into your thread list above the container with the class "content cap-bottom" with this plugin active. However, upon viewing the HTML of your forum, it doesn't look as if the div is actually being inserted. I don't know what could have caused this, unfortunately, my js skills are not that extensive; it appears to have worked at one point, but as someone who has also used this plugin recently I didn't even realise that there was supposed to be a thread description inserted into the post listing, so I wouldn't be able to pinpoint exactly when this portion of the plugin stopped working. I don't think Shorty's been active for some time, so maybe Chris could have a look-see to see if my assessment is correct / be able to give a suggestion for how to fix it. Do you know if the plugin build is open? (You can find out by going to Plugins > Build and seeing if the plugin appears on the list).
|
|
JD
Full Member
Posts: 771
inherit
180643
0
Aug 17, 2023 0:37:07 GMT -8
JD
771
June 2012
obsidian92
|
Post by JD on Jul 3, 2019 12:08:06 GMT -8
So what I'm seeing in the plugin is that there should be a div with the class "thread_description_page" that gets inserted into your thread list above the container with the class "content cap-bottom" with this plugin active. However, upon viewing the HTML of your forum, it doesn't look as if the div is actually being inserted. I don't know what could have caused this, unfortunately, my js skills are not that extensive; it appears to have worked at one point, but as someone who has also used this plugin recently I didn't even realise that there was supposed to be a thread description inserted into the post listing, so I wouldn't be able to pinpoint exactly when this portion of the plugin stopped working. I don't think Shorty's been active for some time, so maybe Chris could have a look-see to see if my assessment is correct / be able to give a suggestion for how to fix it. Do you know if the plugin build is open? (You can find out by going to Plugins > Build and seeing if the plugin appears on the list). Hey Kami, No, it's not open in the build unfortunately >.<" and I tried to do the simple thing and put the div into the layout template myself and it did nothing so I'm not sure what my next move is on that one.... >..<" I need to put the main theme back temporarily for someone else working on a different code so bear with and I'll have it back to default for you or Chris asap !
|
|
Kami
Forum Cat
Posts: 40,032
Mini-Profile Theme: Kami's Mini-Profile
#f35f71
156500
0
Offline
Jul 24, 2021 11:48:29 GMT -8
Kami
40,032
July 2010
kamiyakaoru
Kami's Mini-Profile
|
Post by Kami on Jul 3, 2019 12:12:38 GMT -8
Adding the div manually wouldn't work, unfortunately, since the script is written in a way that makes the function that inserts the div also insert the actual content of your description (which is stored in the plugin). If the bit inserting the div isn't working, it won't insert the contents either.
|
|
inherit
Official Code Helper
65613
0
1
Apr 15, 2024 17:01:41 GMT -8
Chris
"'Oops' is the sound we make when we improve"
8,858
December 2005
horace
|
Post by Chris on Jul 3, 2019 22:23:02 GMT -8
This is a typo bug in the plugin most likely introduced in an update if we assume that insertion worked while viewing post at one time. I do not have that plugin installed to check but if you say it is locked then it might be difficult to fix that bug without the plugin author's participation. Basically the "this." prepended to the global proboards variable in the code below would fail during reference lookup and return an undefined because proboards is in fact a property of the window object not the shorty_thread_descriptions object. threadPlacement: function() { if(proboards.data('route').name =='thread' && (!this.boardss.length || (this.boardss.length && this.proboards.data('page').board.id == this.getBoards()))) { var threadId = proboards.data('route').params.thread_id; if(proboards.plugin.key('thread_description_key').get(threadId)) { $('div.container.posts div.content.cap-bottom').prepend('<div class="thread_description_page" style="padding: 5px !important; word-wrap:break-word !important;">'+proboards.plugin.key('thread_description_key').get(threadId)+'</div>'); } } }
There might be a slim chance there is a way to override that method add a reference to proboard prior to it being called since it looks like the plugin waits for document ready before initializing. Something like this in the GLOBAL HEADER GLOBAL FOOTER might be enough to intercept the code in that critical moment after it has been created by the plugin but before it is initialized on document ready and remove add a reference to proboards for that errant "this." <!-- Patch Shorty Thread Description v1.2.4 --> <script> window.shorty_thread_descriptions && (shorty_thread_descriptions.proboards = window.proboards); </script> In theory that should work but I haven't tried it to see
|
|
JD
Full Member
Posts: 771
inherit
180643
0
Aug 17, 2023 0:37:07 GMT -8
JD
771
June 2012
obsidian92
|
Post by JD on Jul 4, 2019 0:00:46 GMT -8
Adding the div manually wouldn't work, unfortunately, since the script is written in a way that makes the function that inserts the div also insert the actual content of your description (which is stored in the plugin). If the bit inserting the div isn't working, it won't insert the contents either. Lol sorry - I'm self taught at this stuff so there are giant holes in my knowledge >..<" And I have turned it back to default now if anyone can have a looksie on whether the above is fixable? If not, no worries. Just wanna make sure I've tried <3 Whoops: had this thread open while I slept and missed that last message *goes to read*
|
|
JD
Full Member
Posts: 771
inherit
180643
0
Aug 17, 2023 0:37:07 GMT -8
JD
771
June 2012
obsidian92
|
Post by JD on Jul 4, 2019 0:05:46 GMT -8
This is a typo bug in the plugin most likely introduced in an update if we assume that insertion worked while viewing post at one time. I do not have that plugin installed to check but if you say it is locked then it might be difficult to fix that bug without the plugin author's participation. Basically the "this." prepended to the global proboards variable in the code below would fail during reference lookup and return an undefined because it is in fact a property of the window object not the shorty_thread_descriptions object. threadPlacement: function() { if(proboards.data('route').name =='thread' && (!this.boardss.length || (this.boardss.length && this.proboards.data('page').board.id == this.getBoards()))) { var threadId = proboards.data('route').params.thread_id; if(proboards.plugin.key('thread_description_key').get(threadId)) { $('div.container.posts div.content.cap-bottom').prepend('<div class="thread_description_page" style="padding: 5px !important; word-wrap:break-word !important;">'+proboards.plugin.key('thread_description_key').get(threadId)+'</div>'); } } }
There might be a slim chance there is a way to override that method add a reference to proboard prior to it being called since it looks like the plugin waits for document ready before initializing. Something like this in the GLOBAL HEADER might be enough to intercept the code in that critical moment after it has been created by the plugin but before it is initialized on document ready and remove that errant "this." <!-- Patch Shorty Thread Description v1.2.4 --> <script> window.shorty_thread_descriptions && shorty_thread_descriptions.proboards = window.proboards; </script> In theory that should work but I haven't tried it to see Copied into the Global Header. But no I still get no description, even on the default theme. Was that our "last hope" or are there alternative work arounds? (I've left this code in the global header so you can see if I've done anything wrong with it >..<" )
|
|
inherit
Official Code Helper
65613
0
1
Apr 15, 2024 17:01:41 GMT -8
Chris
"'Oops' is the sound we make when we improve"
8,858
December 2005
horace
|
Post by Chris on Jul 4, 2019 0:29:43 GMT -8
I've edited the patch, please recopy and try again
|
|
JD
Full Member
Posts: 771
inherit
180643
0
Aug 17, 2023 0:37:07 GMT -8
JD
771
June 2012
obsidian92
|
Post by JD on Jul 4, 2019 2:26:04 GMT -8
I've edited the patch, please recopy and try again Still nothing, I'm afraid.... >.<" Wanna try for third time lucky?
|
|
inherit
Official Code Helper
65613
0
1
Apr 15, 2024 17:01:41 GMT -8
Chris
"'Oops' is the sound we make when we improve"
8,858
December 2005
horace
|
Post by Chris on Jul 4, 2019 8:17:51 GMT -8
Actually the global header is loading prior to the plugins scripts getting loaded, I thought it was the other way around. Try moving the patch to global footer.
|
|
JD
Full Member
Posts: 771
inherit
180643
0
Aug 17, 2023 0:37:07 GMT -8
JD
771
June 2012
obsidian92
|
Post by JD on Jul 4, 2019 15:14:17 GMT -8
Actually the global header is loading prior to the plugins scripts getting loaded, I thought it was the other way around. Try moving the patch to global footer. Ah! I have it! Many thanks Chris !! <3
|
|
Kami
Forum Cat
Posts: 40,032
Mini-Profile Theme: Kami's Mini-Profile
#f35f71
156500
0
Offline
Jul 24, 2021 11:48:29 GMT -8
Kami
40,032
July 2010
kamiyakaoru
Kami's Mini-Profile
|
Post by Kami on Jul 4, 2019 16:01:45 GMT -8
I helped! Thanks for answering the tag, Chris (:
|
|