inherit
170651
0
Mar 3, 2021 8:41:24 GMT -8
portrush
85
August 2011
portrush
|
Post by portrush on Jun 1, 2013 18:04:34 GMT -8
The old version used to number the replies (posts) on a page. V5 doesn't have this as a default and I have members really saying they're missing that feature. I'm not a code writer, but if you could create a plug-in for this--that would be GREAT!
Thanks!
pr
|
|
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 Jun 1, 2013 20:49:37 GMT -8
|
|
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 Jun 1, 2013 21:43:46 GMT -8
But for folks with a lot of themes, a plug-in is easier to implement.
|
|
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 Jun 2, 2013 7:29:52 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. code (updated:14 Sep 2013):<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> If still using this old code then remove it, changes on Proboards end has made the code obsoletecode(old, no longer works):<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
- Sept 14, 2013 - added recognition of newer List Manager data structure
|
|
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 Jun 2, 2013 14:41:24 GMT -8
Chris You are a GENIUS!!!! Thank you. Thank you so much. You've solved a problem I've been griping about since v5. My members will be grateful. We're a sizable community with over a half million posts. Quoting post numbers is a daily thing. I am so very appreciative.
I wasn't going to post on this thread. I've posted about this before. I'm so glad I took the plunge, again, and this time I got an answer that works on 56 themes!!!!! And I agree about not wanting to waste plug-in space for a feature such as this. You saved me from adding to my storage allotted.
|
|
inherit
6871
0
Jun 10, 2024 2:25:35 GMT -8
bigballofyarn
"If you wish to make an apple pie from scratch, you must first invent the universe." -Carl Sagan
7,886
January 2003
bigballofyarn
|
Post by bigballofyarn on Jun 3, 2013 6:45:18 GMT -8
Chris You are a GENIUS!!!! Thank you. Thank you so much. You've solved a problem I've been griping about since v5. My members will be grateful. We're a sizable community with over a half million posts. Quoting post numbers is a daily thing. I am so very appreciative.
I wasn't going to post on this thread. I've posted about this before. I'm so glad I took the plunge, again, and this time I got an answer that works on 56 themes!!!!! And I agree about not wanting to waste plug-in space for a feature such as this. You saved me from adding to my storage allotted. Looks like we both found our answer!! Yay! Great code!
|
|
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 Jun 3, 2013 14:47:23 GMT -8
p.data.hash.page||p.page
is that changing on pagination for you eton? because when I was tracking it, it always stayed the same as when the page was loaded.
|
|
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 Jun 3, 2013 15:41:23 GMT -8
It's pretty much the hash of whichever page number was detected in the URL but I added the second which from my brief evaluation seemed less reliable so used as a fallback since there was a couple of instances where that hash value was an empty string. Now that you've brought it up however I have not actually tested it on a browser that has no pushstate support such as IE , so I will ...
--
The hash still tracks in IE but the page remains the same, you'll also notice that the page=x in the URL does not change during pagination like it does in other browsers that support pushstate, so the developers are obviously doing some Harry Potter magic in the background to keep the hash (p.data.hash.page) in sync with pagination while the p.page merely reflects what is in the url making the hash the hands down winner. As I said before though there were a few cases where the hash came up as an empty string ("") for me which is why the less reliable is there as a backup.
|
|
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 Jun 3, 2013 17:18:50 GMT -8
ok Im inside a thread looking at pages of posts.. that is the difference I guess. I was tracking THOSE variables and they werent changing.
|
|
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 Jun 3, 2013 17:55:20 GMT -8
ok Im inside a thread looking at pages of posts.. that is the difference I guess. I was tracking THOSE variables and they werent changing. Actually you're right, despite my previous observation p.page for some reason remains at 1 no matter how many page changes occur, it is only the value in the hash that tracks the value. I'll need to run it against a gamut of browsers to be sure but I was certain it was tracking page numbers when I inspected it before. In any event it is the hash value that gets used as I said with that page as a fallback but if it never changes then replacing it with a literal 1 would be just as good. Contrary to what I think you're saying however p.data.hash.page does in fact change with pagination (could also grab the page from the pagination widget with listMan.pagination.data("pagination").page)
|
|
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 Jun 3, 2013 18:11:59 GMT -8
ok weird, when *I* look at that variable, I see something different
|
|
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 Jun 4, 2013 0:39:45 GMT -8
In an url where no page is specified then there would be no page entry so the fallback would be "1". What I am however interested in is since there are total of 18 posts what happens when you go to page 2 and what browser are you using where you still see no page change?
|
|
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 Jun 4, 2013 8:00:50 GMT -8
that image was actually taken on page 2.
|
|
Former Member
inherit
guest@proboards.com
198088
0
Nov 23, 2024 0:29:41 GMT -8
Former Member
0
January 1970
Former Member
|
Post by Former Member on Aug 10, 2013 23:02:47 GMT -8
Chris You are a GENIUS!!!! Thank you. Thank you so much. You've solved a problem I've been griping about since v5. My members will be grateful. We're a sizable community with over a half million posts. Quoting post numbers is a daily thing. I am so very appreciative.
I wasn't going to post on this thread. I've posted about this before. I'm so glad I took the plunge, again, and this time I got an answer that works on 56 themes!!!!! And I agree about not wanting to waste plug-in space for a feature such as this. You saved me from adding to my storage allotted. Looks like we both found our answer!! Yay! Great code! found mine as well! thanks Chris!
|
|
inherit
6871
0
Jun 10, 2024 2:25:35 GMT -8
bigballofyarn
"If you wish to make an apple pie from scratch, you must first invent the universe." -Carl Sagan
7,886
January 2003
bigballofyarn
|
Post by bigballofyarn on Sept 14, 2013 3:23:16 GMT -8
This plugin doesn't seem to be working anymore.
|
|