inherit
yllaciledehcysP citsatkranS
161169
0
Nov 28, 2013 18:47:45 GMT -8
moonbeam
I have NO IDEA what "psychedelic insultment" is, but I'm clearly a victim of it!
7,230
December 2010
lmccull
|
Post by moonbeam on May 13, 2013 1:43:41 GMT -8
That shouldn't be the case, Rita, but I don't know why it would be doing it. My coding admin wrote an updated version of the code, which you're welcome to try if you like. The line that says "var index = (post.page-1)*30" - change the "30" to match however many posts you have per page. Simply put it where you have the existing code from page one.
Themes > Layout Templates > Thread > Post List tab
I understand from David Clark that the template has changed from when the original code was written, so for those that are just now trying it, it's going to go after the $[post.thread] line, which should be around line 12, give or take.
<div class="info"> $[post.thread] <span class="date">$[post.date]</span> {if $[post.how_posted]} <span class="post-method">via $[post.how_posted]</span> {/if} $[post.likes] </div>
Code to add:
<!-- Reply # --> <span id="post-text-$[post.id]" class="post-method"></span> <script type="text/javascript"> {if $[post.index] == 0} var post = { page: (location.href.match(/\/page\/(\d+)\//) || location.href.match(/\bpage=(\d+)\b/)) ? RegExp.$1-0 : 1, index: 0 }; {/if} var index = (post.page-1)*30 + post.index++; if( !location.href.match(/(\?|\&)q=/) && proboards.data("route").name == "thread" ) { $("#post-text-$[post.id]").html( index == 0 ? "Thread started " : "Reply #" + index + " posted "); } </script> <!-- End Reply # -->
|
|
Former Member
inherit
guest@proboards.com
134807
0
Dec 1, 2024 18:51:59 GMT -8
Former Member
0
January 1970
Former Member
|
Post by Former Member on May 13, 2013 2:09:25 GMT -8
Thanks for your reply moonbeam - I will wait for a comment from David Clark before I make any changes. In fact I probably won't make any changes - from now on members can refer to page number x, reply number x.
|
|
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 May 13, 2013 7:38:51 GMT -8
@ritab, quickly checking on Moonbeam's site, it does look like the code she's currently using is correctly displaying replies numbers and not resetting at the beginning of every page. I suppose it would work just fine if you were to refer your members by saying "check page 3 reply 4", but Moonbeam's code should work if you want to get those reply #'s up and running normally again. Just make sure you change the number 30 to however many posts per page your forum is set to, as Moonbeam said! That's a pretty important part.
|
|
Former Member
inherit
guest@proboards.com
134807
0
Dec 1, 2024 18:51:59 GMT -8
Former Member
0
January 1970
Former Member
|
Post by Former Member on May 13, 2013 8:23:36 GMT -8
This is what I have in my post list tab:
{foreach $[post]} <tr id="$[post.content_id]" class="$[post.content_class]{if $[post.even]} even{/if}{if $[viewing_recent_posts]} recent{/if}"> <td class="$[post.unblocked_class]"> <table role="grid"> <tr> <td class="left-panel" rowspan="2"> $[post.created_by_user.miniprofile] </td> <td class="content"> <div class="content-head ui-helper-clearfix"> <div class="info"> <span class="thread-link">$[post.thread]</span> <span id="post-text-$[post.id]" class="post-method"></span> <script type="text/Javascript"> {if $[post.index] == 0} var post = { page: location.href.match(/page=(\d+)/)?RegExp.$1-0:1, index: 0 }; {/if} var index = (post.page-1)*15 + post.index++; if(!location.href.match(/(\?|\&)q=/) && proboards.data("route").name == "thread"){ $("#post-text-$[post.id]").html(index == 0?"Thread started on ":"Reply #"+index+" on "); } </script> <span class="date">$[post.date]</span> {if $[post.how_posted]} <span class="post-method">via $[post.how_posted]</span> {/if} $[post.likes] </div> <div class="controls"> $[post.quote_button] $[post.edit_button] $[post.likes.button] $[post.select_options] </div> </div> <h3 class="title aria-hidden">Post by $[post.created_by_user.name] on $[post.date]</h3> <div class="message">$[post.message]</div> </td> </tr> <tr> <td class="foot"> {if $[post.created_by_user.signature]} <div class="signature">$[post.created_by_user.signature]</div> {/if} </td> </tr> </table> </td> {if $[post.is_blocked]} <td class="$[post.blocked_class] content center"> <div class="message note pad-bottom">This post is hidden</div> $[post.display_blocked_post_button] </td> {/if} </tr> {/foreach} {if !$[post]} <tr class="last"><td class="last center" colspan="1">No posts were found.</td></tr> {/if}[code]
|
|
Former Member
inherit
guest@proboards.com
134807
0
Dec 1, 2024 18:51:59 GMT -8
Former Member
0
January 1970
Former Member
|
Post by Former Member on May 13, 2013 8:45:56 GMT -8
@ritab, quickly checking on Moonbeam's site, it does look like the code she's currently using is correctly displaying replies numbers and not resetting at the beginning of every page. I suppose it would work just fine if you were to refer your members by saying "check page 3 reply 4", but Moonbeam's code should work if you want to get those reply #'s up and running normally again. Just make sure you change the number 30 to however many posts per page your forum is set to, as Moonbeam said! That's a pretty important part. On second thoughts it wouldn't be very successful if posts are deleted. Why isn't post numbering a feature of v5 as it was on v4.5?
|
|
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 May 13, 2013 9:04:14 GMT -8
I can't say exactly why because only the developers know - but I can say that I'm thankful that those developers gave us the option to customize our forums so thoroughly. I just popped in to check and it looks like the code is functioning properly, @ritab. The reply count is continuing on correctly to the subsequent pages.
|
|
Former Member
inherit
guest@proboards.com
134807
0
Dec 1, 2024 18:51:59 GMT -8
Former Member
0
January 1970
Former Member
|
Post by Former Member on May 13, 2013 9:04:53 GMT -8
I've resolved this, post numbering is now working ok - the code in the post list tab on my test forum is different to that on my main forum, so I copied it over, including moonbeam's extra bit of code.
|
|
Former Member
inherit
guest@proboards.com
134807
0
Dec 1, 2024 18:51:59 GMT -8
Former Member
0
January 1970
Former Member
|
Post by Former Member on May 13, 2013 9:06:13 GMT -8
|
|
inherit
118095
0
Feb 25, 2021 0:36:17 GMT -8
Rosefriend
Friendship is the Finest Rose in the Garden of Life
1,855
January 2008
rosefriend
|
Post by Rosefriend on May 13, 2013 10:09:02 GMT -8
Got a little confused, not difficult but could someone write down the exact code for me with moonbeam bit as well please?? RF
|
|
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 May 13, 2013 10:37:19 GMT -8
Rosefriend, you'll simply want to copy Moonbeam's code (ensuring the aforementioned instance of the number 30 in that code is changed to however many posts per page you have set in Admin Panel > Settings > Forum Settings) and go to your Layout Templates > Thread > Post list tab. Find the line that has $[post.thread] (should be line 13 if you haven't made changes?) and paste the code directly under that on its own line. Save the changes, then go check a thread. It wasn't taking effect for me when I tried to preview the changes, but worked when I saved it and went to look.
|
|
inherit
118095
0
Feb 25, 2021 0:36:17 GMT -8
Rosefriend
Friendship is the Finest Rose in the Garden of Life
1,855
January 2008
rosefriend
|
Post by Rosefriend on May 13, 2013 10:48:49 GMT -8
Thanks David Clark - I have put it on our test board at the moment and it seems to work well. Used 30 posts as our board is also set to that. First post isn't counted, then 1-29posts on Page 1, Page 2 is then #30-59 and so on - is that right?? RF
|
|
inherit
yllaciledehcysP citsatkranS
161169
0
Nov 28, 2013 18:47:45 GMT -8
moonbeam
I have NO IDEA what "psychedelic insultment" is, but I'm clearly a victim of it!
7,230
December 2010
lmccull
|
Post by moonbeam on May 13, 2013 10:53:02 GMT -8
Should be, because the original post doesn't count as a "reply" (as you mentioned).
|
|
inherit
118095
0
Feb 25, 2021 0:36:17 GMT -8
Rosefriend
Friendship is the Finest Rose in the Garden of Life
1,855
January 2008
rosefriend
|
Post by Rosefriend on May 13, 2013 10:56:14 GMT -8
Should be, because the original post doesn't count as a "reply" (as you mentioned). Then it's working as it should - many thanks to one and all!! RF
|
|
inherit
186770
0
Jan 19, 2013 3:22:38 GMT -8
user07
193
December 2012
user07
|
Post by user07 on May 30, 2013 13:05:47 GMT -8
it often happens that I have to re-load the page to have this code working any ideas or is that happening to anybody else?
|
|
inherit
149261
0
Sept 16, 2021 11:38:38 GMT -8
Chrissie
236
November 2009
isaacthered
|
Post by Chrissie on May 31, 2013 3:22:20 GMT -8
it often happens that I have to re-load the page to have this code working any ideas or is that happening to anybody else? It's happening to me as well user07
|
|