inherit
223470
0
Feb 27, 2019 17:05:53 GMT -8
₪» ⅀ ƪ Ƒ «₪
Original registration date: 2007. DeviantART: http://deviantart.com/ruanly. Discord: Ruanly#7946.
1,281
July 2015
fajita
|
Post by ₪» ⅀ ƪ Ƒ «₪ on Aug 22, 2018 10:52:35 GMT -8
Years ago, I asked if there was an automatic way to count my site's total boards. There are a loooot so I didn't want to do it manually and was curious if there was a faster way. Someone (I want to say it was the long-lost David Clark) gave me a variable to throw into my templates that generated the number. It was quick and ugly but I put it in there, viewed the number, then removed it - it wasn't something meant to be incorporated in my site. It's possible it was header/footers instead of layout templates and also possible that I had to add it to each category instead of getting the entire site at once... I sadly don't recall. Attempted to find it but it was quite a fair few years ago.
Anyone know of this method or another that I could check real quick the board total? =3
|
|
#eb7100
33409
0
1
Nov 24, 2024 4:27:37 GMT -8
Brian
48,130
November 2004
smashmaster3
|
Post by Brian on Aug 22, 2018 11:06:55 GMT -8
Hi, ₪» ⅀ ƪ Ƒ «₪. No layout template variable exists for this. You would need to either keep count manually or utilize Javascript to look for boards on the page and acquire the count from the total it finds.
|
|
inherit
206056
0
Dec 3, 2024 6:57:43 GMT -8
adminabp
378
February 2014
adminabp
|
Post by adminabp on Aug 22, 2018 23:28:25 GMT -8
I think this thread should have what you need. support.proboards.com/thread/638018/add-number-boards-info-centerSpecifically : Hi bearsmummy Adding this script to your Main Footer will have the desired effect. <script type="text/javascript"> /* Adds number of boards to info center. */ var boardNum = $(".board-link").length; $("#boardNum").text(boardNum); </script> Then add the following to your Home template where you want the number of boards to show. Boards: <span id="boardNum"></span> and... To have sub-boards included in the total: If you want it on each theme you'll need to make the change on all of them. The code relies on the .board-link class which the boards on the index page have but their sub-boards do not, so this code will not include sub-boards in the count unless you modify the selector that determines which links it targets. That's done by changing this line: To this: Obviously, if you don't want the info displayed permanently, you can remove the codes after you are done.
|
|
inherit
223470
0
Feb 27, 2019 17:05:53 GMT -8
₪» ⅀ ƪ Ƒ «₪
Original registration date: 2007. DeviantART: http://deviantart.com/ruanly. Discord: Ruanly#7946.
1,281
July 2015
fajita
|
Post by ₪» ⅀ ƪ Ƒ «₪ on Aug 23, 2018 5:23:15 GMT -8
Oh thank you! You're very kind to help! Unfortunately my info center is so drastically altered that it appears to be unable to appear in it (also tried putting it in Home layout templates just in case) so I'm not sure it can do its job for me. But I really appreciate that you tried! =D
|
|
inherit
140147
0
Nov 19, 2024 5:07:22 GMT -8
Nscalerr
Throw me to the wolves and I'll return leading the pack!
3,043
May 2009
nscalerr
|
Post by Nscalerr on Aug 23, 2018 6:14:22 GMT -8
Placing Boards: <span id="boardNum"></span> where you want it to show up should make it appear, no matter what your info center looks like. You have added it to the theme you are currently using ?
|
|
inherit
223470
0
Feb 27, 2019 17:05:53 GMT -8
₪» ⅀ ƪ Ƒ «₪
Original registration date: 2007. DeviantART: http://deviantart.com/ruanly. Discord: Ruanly#7946.
1,281
July 2015
fajita
|
Post by ₪» ⅀ ƪ Ƒ «₪ on Aug 23, 2018 6:20:33 GMT -8
Ohh goodness, I am not a smart man. x.x That's my bad entirely. Now that I've added it, yep, it's working properly. Thank you! I really appreciate your assistance! =D
|
|