bile
Full Member
Warning: Listen to the Staff Expires: 02/02/06
FINAL WARNING: Cursing at Staff Expires: May 8, 2006
Posts: 539
inherit
Warning: Listen to the Staff Expires: 02/02/06
FINAL WARNING: Cursing at Staff Expires: May 8, 2006
33541
0
Dec 5, 2006 23:17:32 GMT -8
bile
539
November 2004
bile
|
Post by bile on Jul 17, 2005 18:50:29 GMT -8
How do I tell a script to get the number of threads in a certain board?
|
|
inherit
Proboards Legend
212
0
May 11, 2006 12:32:55 GMT -8
california
21,035
December 1999
california
|
Post by california on Jul 18, 2005 12:32:57 GMT -8
From which page?
|
|
bile
Full Member
Warning: Listen to the Staff Expires: 02/02/06
FINAL WARNING: Cursing at Staff Expires: May 8, 2006
Posts: 539
inherit
Warning: Listen to the Staff Expires: 02/02/06
FINAL WARNING: Cursing at Staff Expires: May 8, 2006
33541
0
Dec 5, 2006 23:17:32 GMT -8
bile
539
November 2004
bile
|
Post by bile on Jul 18, 2005 12:37:16 GMT -8
from the main page
|
|
bile
Full Member
Warning: Listen to the Staff Expires: 02/02/06
FINAL WARNING: Cursing at Staff Expires: May 8, 2006
Posts: 539
inherit
Warning: Listen to the Staff Expires: 02/02/06
FINAL WARNING: Cursing at Staff Expires: May 8, 2006
33541
0
Dec 5, 2006 23:17:32 GMT -8
bile
539
November 2004
bile
|
Post by bile on Jul 18, 2005 12:40:16 GMT -8
I was thinking of putting a message on the top of the page showing how many tutorials there were in my forum, but i don't know how to get the code for the amount of threads there are in a ceartain board.
|
|
inherit
Proboards Legend
212
0
May 11, 2006 12:32:55 GMT -8
california
21,035
December 1999
california
|
Post by california on Jul 18, 2005 13:01:43 GMT -8
Well you'd basically need to scan through all table cells and find the board cell you want.
if(td.width=="66%" && td.innerHTML.match(/board=tutorials/)){ document.getElementById("something").innerHTML=td[i+1].innerHTML; }
that's part of the main footer script, and in the header, you'd need like a span tag with that ID:
There are <span id="something">...</span> tutorials.
|
|
bile
Full Member
Warning: Listen to the Staff Expires: 02/02/06
FINAL WARNING: Cursing at Staff Expires: May 8, 2006
Posts: 539
inherit
Warning: Listen to the Staff Expires: 02/02/06
FINAL WARNING: Cursing at Staff Expires: May 8, 2006
33541
0
Dec 5, 2006 23:17:32 GMT -8
bile
539
November 2004
bile
|
Post by bile on Jul 18, 2005 20:27:52 GMT -8
you have lost me
|
|
inherit
Proboards Legend
212
0
May 11, 2006 12:32:55 GMT -8
california
21,035
December 1999
california
|
Post by california on Jul 18, 2005 20:36:31 GMT -8
If you're wanting someone to code the entire thing for you, this is not the board to ask.
|
|
bile
Full Member
Warning: Listen to the Staff Expires: 02/02/06
FINAL WARNING: Cursing at Staff Expires: May 8, 2006
Posts: 539
inherit
Warning: Listen to the Staff Expires: 02/02/06
FINAL WARNING: Cursing at Staff Expires: May 8, 2006
33541
0
Dec 5, 2006 23:17:32 GMT -8
bile
539
November 2004
bile
|
Post by bile on Jul 19, 2005 8:11:30 GMT -8
No I would like to code it myself, I just would like to know how to get the number of threads there are in one board, I can do the rest myself.
|
|
inherit
Beware the ever changing head
33588
0
Nov 18, 2023 0:32:44 GMT -8
Ross
19,039
November 2004
elindir
|
Post by Ross on Jul 19, 2005 8:28:54 GMT -8
No I would like to code it myself, I just would like to know how to get the number of threads there are in one board, I can do the rest myself. At what particular bit of Calis explanation did you get lost at?
|
|
bile
Full Member
Warning: Listen to the Staff Expires: 02/02/06
FINAL WARNING: Cursing at Staff Expires: May 8, 2006
Posts: 539
inherit
Warning: Listen to the Staff Expires: 02/02/06
FINAL WARNING: Cursing at Staff Expires: May 8, 2006
33541
0
Dec 5, 2006 23:17:32 GMT -8
bile
539
November 2004
bile
|
Post by bile on Jul 19, 2005 12:27:58 GMT -8
the span section. and what I scan my source for.
Would I just use The id that i gave the board?
|
|
inherit
Beware the ever changing head
33588
0
Nov 18, 2023 0:32:44 GMT -8
Ross
19,039
November 2004
elindir
|
Post by Ross on Jul 19, 2005 12:34:56 GMT -8
The span would be where you want the number of threads to appear. Say in a Welcome box: We currently have <span id="something"></span> Tutorials The reason you have to do this is beacuse the code to get number of threads needs to be in the footer; and you want the number in the Header. So you have to target that span in order to get the number where you want it. As for scanning through the source, what Cali posted is part of the code which will loop through all the table cells and find the one you want. Do you know any javascript? If not, I would recommend reading through a few tutorials abouts loops, if and things like that
|
|
bile
Full Member
Warning: Listen to the Staff Expires: 02/02/06
FINAL WARNING: Cursing at Staff Expires: May 8, 2006
Posts: 539
inherit
Warning: Listen to the Staff Expires: 02/02/06
FINAL WARNING: Cursing at Staff Expires: May 8, 2006
33541
0
Dec 5, 2006 23:17:32 GMT -8
bile
539
November 2004
bile
|
Post by bile on Jul 19, 2005 13:07:56 GMT -8
What is that code that goes in the footer?
|
|
inherit
Beware the ever changing head
33588
0
Nov 18, 2023 0:32:44 GMT -8
Ross
19,039
November 2004
elindir
|
Post by Ross on Jul 19, 2005 13:28:05 GMT -8
What is that code that goes in the footer? Would you like someone to write it out for you?
|
|
bile
Full Member
Warning: Listen to the Staff Expires: 02/02/06
FINAL WARNING: Cursing at Staff Expires: May 8, 2006
Posts: 539
inherit
Warning: Listen to the Staff Expires: 02/02/06
FINAL WARNING: Cursing at Staff Expires: May 8, 2006
33541
0
Dec 5, 2006 23:17:32 GMT -8
bile
539
November 2004
bile
|
Post by bile on Jul 19, 2005 13:29:48 GMT -8
sure
|
|
bile
Full Member
Warning: Listen to the Staff Expires: 02/02/06
FINAL WARNING: Cursing at Staff Expires: May 8, 2006
Posts: 539
inherit
Warning: Listen to the Staff Expires: 02/02/06
FINAL WARNING: Cursing at Staff Expires: May 8, 2006
33541
0
Dec 5, 2006 23:17:32 GMT -8
bile
539
November 2004
bile
|
Post by bile on Jul 19, 2005 13:30:59 GMT -8
I have the tutorials section set up if you could take a look at it (image link in sig)
|
|