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,017
December 2005
horace
RedBassett's Mini-Profile
|
Post by Chris on Sept 14, 2013 6:18:27 GMT -8
This plugin doesn't seem to be working anymore. There have been a few changes to the matrix so where there used to be a staircase leading to a door there is now a brick wall. I am taking a look at it now to see if an alternate route presents itself before I get pinned down by user agents... Observations (for documentation): - List Manager's "effectiveType" property has been deprecated and apparently replaced with "item_type". This however is not a one-to-one correlation with plurals now singular, it does however seem to be a more logical and consistent system reflecting the type of item being presented in all tested cases so far.
- List Manager's "type" property now appears to serve a different purpose part of which was previously handled by the now deprecated "effectiveType" property. From what I can tell so far it merely reflects "item_type" but in the plural (e.g item_type="post" and type="posts") even if displaying a single post rather than the entire thread
- With route now reflecting the last AJAX call rather than anything specific to the route taken to get to the current page it becomes unreliable, for example liking a post on page 1 then going to page 2 has route still saying "post_like" if page 2 was cached not requiring an AJAX call. The fact that the values emitted by this Proboards data has undergone so many changes since inception is another reason to avoid it altogether: "past is prologue".
- Distinguishing between a list of posts from a search and a list of posts in a thread just became a bit more difficult especially during page changes. From my experience, the list manager search option indicators have been unreliable in the past but perhaps they have been improved in subsequent pushes, but in any event list manager is not accessible on thread view pages (only post view) so unreliable on the whole.
Edit:
I threw the kitchen sink at it and it made a hole in the wall that I could crawl through. The following modified code appears to operate as intended in the couple of situations I placed it in but I will not deem it an "update" just yet until I can verify a larger pool of scenarios it may conceivably encounter. [ Code has been updated in first reply of this thread] code:<script type="text/javascript">
$(function(){ if(window.listMan && listMan.item_type/*effectiveType*/ == "post" /*"posts"*/){ var p = listMan.options, r = proboards.data("route") $('.content-head .info .date', listMan.content).each(function(i,e){ var post = {element:$(e), index: i, id: $(e).closest('tr.item.post').attr('id').split("-").pop(), page: listMan.pagination.data("pagination").page}, search = /search/i.test(r.name /*listMan.type*/) || p.data.search || p.data.posts_search || p.data.post_query || p.data.hash.q || p.data.recent_page?1:0; post.element.before('<span class="post-method post-number" />').prev() .html( '<a href="/post/' + post.id + '/thread" title="Link to Post" >' + ((i+post.page+search) == 1 ? 'Thread ' : (search?'Result':'Reply') + ' #' + ((post.page - 1) * p.limit + i + search)) + '</a> ' + (i+post.page+search == 1 ?'started ' : 'posted ')) }) } if($.inArray(arguments.callee, proboards.events.afterSearch) == -1)proboards.on("afterSearch",arguments.callee); }) </script>
|
|
inherit
The Great Cinnamon Roll
191518
0
Oct 19, 2016 22:17:44 GMT -8
David Clark
Care for some tai chi with your chai tea?
17,602
March 2013
davidlinc1
|
Post by David Clark on Sept 14, 2013 10:38:31 GMT -8
There have been a few changes to the matrix so where there used to be a staircase leading to a door there is now a brick wall. I am taking a look at it now to see if an alternate route presents itself before I get pinned down by user agents... This block of text is amazing.
|
|
inherit
(?)?
188910
0
Jan 26, 2013 13:30:48 GMT -8
♥ ℒʊ√ ♥
Clouds float into my life no longer to carry rain or usher storm but to add color to my sunset sky.
10,458
January 2013
luv
|
Post by ♥ ℒʊ√ ♥ on Sept 14, 2013 10:44:56 GMT -8
Thanks for working on this, Chris. It's a staple for my board!
|
|
inherit
King Oligochaete
126470
0
Feb 24, 2021 12:23:15 GMT -8
Wormopolis
Stop rating plugins with 1 star that dont deserve it.
20,002
June 2008
tbserialkillers
Wormo's Mini-Profile
|
Post by Wormopolis on Sept 14, 2013 12:29:18 GMT -8
Edit:
I threw the kitchen sink at it and it made a hole in the wall that I could crawl through. The following modified code appears to operate as intended in the couple of situations I placed it in but I will not deem it an "update" just yet until I can verify a larger pool of scenarios it may conceivably encounter. good thing there have been all these kitchen unit spammers lately to provide your kitchen with a new look...
|
|
inherit
151012
0
Jun 27, 2018 8:35:42 GMT -8
jerrybluenose
332
January 2010
jerrybluenose
|
Post by jerrybluenose on Oct 9, 2013 9:44:17 GMT -8
But for folks with a lot of themes, a plug-in is easier to implement. In that case drop this in your global footer then kick the tires and give it a work over, it should affect all themes. The reason I am so reluctant to use plugins is because of the limited slots each forum is given. Forty might seem like a lot until you start adding plugins for things such as this which is just a trivial UI change. If you want it to be a plugin then it can be easily converted into one but I believe plugins slots are more wisely used when reserved for more complicated in-depth features. this code no longer works! DO NOT USE:<script type="text/javascript">
$(function(){ if(window.listMan && listMan.effectiveType == "posts"){ var p = listMan.options $('.content-head .info .date', listMan.content).each(function(i,e){ var post = {element:$(e), index: i, id: $(e).closest('tr.item.post').attr('id').split("-").pop(), page: listMan.pagination.data("pagination").page}, search = /search/i.test(listMan.type) || p.data.hash.q || p.data.recent_page?1:0; post.element.before('<span class="post-method post-number" />').prev() .html( '<a href="/post/' + post.id + '/thread" title="Link to Post" >' + ((i+post.page+search) == 1 ? 'Thread ' : (search?'Result':'Reply') + ' #' + ((post.page - 1) * p.limit + i + search)) + '</a> ' + (i+post.page+search == 1 ?'started ' : 'posted ')) }) } if($.inArray(arguments.callee, proboards.events.afterSearch) == -1)proboards.on("afterSearch",arguments.callee); }) </script> Updates:- June 2, 2013 - added recognition of recent posts as a search result
- June 9, 2013 - added newer pagination event handler
Hi Eton Bones I installed this code a few weeks ago and it was working fine but I accidentally deleted it. I've just added it to my global footer again but it's not working. Any idea what I'm doing wrong? Jerry
|
|
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,017
December 2005
horace
RedBassett's Mini-Profile
|
Post by Chris on Oct 9, 2013 13:46:27 GMT -8
jerrybluenose, there has been a few changes since that code was created, you should find an updated code posted by me on page 2 of this thread
|
|
inherit
151012
0
Jun 27, 2018 8:35:42 GMT -8
jerrybluenose
332
January 2010
jerrybluenose
|
Post by jerrybluenose on Oct 10, 2013 2:15:54 GMT -8
Thanks for that, it's working again now
Jerry
|
|
inherit
203622
0
Jul 15, 2014 6:38:17 GMT -8
bubaoshe
30
January 2014
bubaoshe
|
Post by bubaoshe on Jan 8, 2014 11:44:03 GMT -8
I'm sorry to bother you but I didn't get it while everyone here seems to using it happily:( I don't know much about javascript, neither do I know the variables that this software seems to maintain...maybe that's why I have problem understanding it. I have put the code in the global footer, and then what should I do (since nothing happens if I just do that)? I suppose I should add something in the template for post-list, but I have no clue. Could you explain a little bit...to a newbie? Thank you very much!
|
|
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,017
December 2005
horace
RedBassett's Mini-Profile
|
Post by Chris on Jan 8, 2014 14:18:34 GMT -8
I'm sorry to bother you but I didn't get it while everyone here seems to using it happily:( I don't know much about javascript, neither do I know the variables that this software seems to maintain...maybe that's why I have problem understanding it. I have put the code in the global footer, and then what should I do (since nothing happens if I just do that)? I suppose I should add something in the template for post-list, but I have no clue. Could you explain a little bit...to a newbie? Thank you very much! Hi bubaoshe, if you installed it and it's not working then the best thing you can do is give a forum url, without one there really isn't much anyone can tell or do for you.
|
|
inherit
136262
0
Jun 24, 2013 21:59:18 GMT -8
nowdocking
1,088
January 2009
nowdocking
|
Post by nowdocking on Jan 8, 2014 22:04:12 GMT -8
Eton Bones, I don't know how many times you saved the day for me in V4, and now you have done it again.
I'm one of the hold-outs, so just got upgraded and of course am pretty much at sea. Finding this thread & the code felt like getting thrown a life ring.
Thanks!
|
|
inherit
203622
0
Jul 15, 2014 6:38:17 GMT -8
bubaoshe
30
January 2014
bubaoshe
|
Post by bubaoshe on Jan 9, 2014 6:36:25 GMT -8
I'm sorry to bother you but I didn't get it while everyone here seems to using it happily:( I don't know much about javascript, neither do I know the variables that this software seems to maintain...maybe that's why I have problem understanding it. I have put the code in the global footer, and then what should I do (since nothing happens if I just do that)? I suppose I should add something in the template for post-list, but I have no clue. Could you explain a little bit...to a newbie? Thank you very much! Hi bubaoshe, if you installed it and it's not working then the best thing you can do is give a forum url, without one there really isn't much anyone can tell or do for you. Oh, I had thought there were some common sense steps that I did not take, so it's really as simple as pasting it to the global footer Tried again and now it works perfectly (but yesterday I did the same and didn't see any effect. weird!) Thank you very much for your time. This piece saves me and all my users
|
|
Rajiv
New Member
Posts: 143
inherit
149477
0
Jan 30, 2014 17:24:59 GMT -8
Rajiv
143
November 2009
rainjar
|
Post by Rajiv on Jan 30, 2014 17:28:36 GMT -8
David Clark referred me to this thread, and I have used the script - giffas.proboards.com/Can I get the post number larger and in bold? And a small point, but the post number is slightly misaligned from the datestamp. And how do I remove the link from the post number? PS. As this thread is no longer about a plug-in, might it work better to move it to one of the other boards?
|
|
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,017
December 2005
horace
RedBassett's Mini-Profile
|
Post by Chris on Jan 30, 2014 19:58:49 GMT -8
SizeThe code attaches a class of .post-number to the generated post number so a CSS rule similar to the one Dave gave you would allow you to change the size to whatever you like: .post.item .info .post-number { font-size: 50px; } AlignmentAs for the misalignment of which you speak, I'm really not seeing that but it could be due to changes that may have made to another theme that is currently active for you (guests [me] can only see your default theme) Remove Link and BoldYou can change the " a" to a " b" in the following line of the code and kill two birds with one stone .html( '<a href="/post/' + post.id + '/thread" title="Link to Post" >' + ((i+post.page+search) == 1 ? 'Thread ' : (search?'Result':'Reply') + ' #' + ((post.page - 1) * p.limit + i + search)) + '</a> ' + (i+post.page+search == 1 ?'started ' : 'posted '))
|
|
Rajiv
New Member
Posts: 143
inherit
149477
0
Jan 30, 2014 17:24:59 GMT -8
Rajiv
143
November 2009
rainjar
|
Post by Rajiv on Jan 30, 2014 21:11:33 GMT -8
All done, thanks. The slight misalignment wasn't very noticeable, and even less so now I am using different font sizes and styles. Is it possible to add the Display Name, so it appears as either: - "Thread started by [Display Name], [timestamp]"
- "Reply posted by [Display Name], [timestamp]"
I know how to add the "by", but is there a way to add the Display Name? If I can get the Display Name before the timestamp, then I will try to remove the mini-profile that appears to the left of each post.
|
|
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,017
December 2005
horace
RedBassett's Mini-Profile
|
Post by Chris on Jan 31, 2014 9:43:40 GMT -8
I just saw your edit regarding display name and although possible I'll have to say no. As this request is no longer about numbered replies, it might work better to move it to one of the other request boards or make a new request. My suggestion would be that you try Request a Template since that would be the easiest route to do what you're trying to accomplish. <span class="date">by $[post.created_by.link], $[post.date]</span>
|
|