Chris M
07-15-2005, 06:45 PM
I looked at an [expand] tag for vB 3.0.7 and decided that I could do it without any code modifications whatsoever!
However I have become stuck :p
After adding the tag and the replacement code to create a collapsable / expandable box, using vB's expand/contract js functions, I realised something...
If the [expand] tag is used more than once per page there will be conflict, as both boxes will have the same id :ermm:
So I fixed this by adding the {option} variable to the id of the box...
Then I thought "Well if someone uses the same box name elsewhere in the post and/or page of that thread, it will break again"...
I've been trying to add a "randomnumber" function, but I'm stuck - I need to generate (and use) a random number in the id part of the table so that it never becomes a duplicate...
Any tips/ideas/pointers? :)
Satan
However I have become stuck :p
After adding the tag and the replacement code to create a collapsable / expandable box, using vB's expand/contract js functions, I realised something...
If the [expand] tag is used more than once per page there will be conflict, as both boxes will have the same id :ermm:
So I fixed this by adding the {option} variable to the id of the box...
Then I thought "Well if someone uses the same box name elsewhere in the post and/or page of that thread, it will break again"...
I've been trying to add a "randomnumber" function, but I'm stuck - I need to generate (and use) a random number in the id part of the table so that it never becomes a duplicate...
Any tips/ideas/pointers? :)
Satan