Welcome Guest
[Log In]
[Register]
| Welcome to Big Boards. Big Boards at one time offered the Zathyus network our long famous Resource Archives, our extensive search indexes, and our info-packed resource forums. Eventually, these were made redundant by upgrades to the documentations and expanded search features added to the ZetaBoards software, and this forum then lost relevancy and subsequently became inactive. Our team then embarked on a new project called Planet Nexus, where a bold new experiment in forum promotion is taking place. We call it nexworking. NexusTree offers social networking pages for forums in a fully automated format. Your NexusTree page is created instantly when your join the nexus. Find out more by visiting Planet Nexus, and become part of the nexworking revolution. ![]() If you're already a member please log in to your account for additional access: |
| Conditional Statments, if then else; Possible? | |
|---|---|
| Tweet Topic Started: Aug 25 2006, 03:12 AM (452 Views) | |
| Gabby Hayes | Aug 25 2006, 03:12 AM Post #1 |
|
BB Alpha
|
Wondering if it is possible to use some sort of conditional statements (IF THEN ELSE)? As a rough example: IF member = one group THEN GOTO this forum, or IF member = another group THEN GOTO this forum, ELSE GOTO this default forum. Is there any option for conditional statements anywhere within the board? This feature could make forums very configurable. Seems IF THEN ELSE statements are universal (in just about every programming or coding language) would imagine there is something here which is similar. Thanks in advance. |
|
Beta Testers, Technicians needed. Setting up complex board, any and all help, suggestions, visitors encouraged to leave any and all comments, good or bad. Tyrell Corporation Thanks. | |
|
|
|
| HelenaZF | Aug 25 2006, 01:48 PM Post #2 |
![]()
advanced techno-feeb
![]()
|
Well, I know that you can use conditional statements in javascript coding. Conditional statements are one way to do things in javascript, like in this script:
The same thing can be done with switch and type statements. different applications of how to do the same thing as in the code above are in this thread in the javascript discussion board: http://www.webdeveloper.com/forum/showthre...4818#post624818 There is a lot of coding help available on these forums: http://www.htmlgoodies.com If you are looking to learn about coding, it might be worth registering on the discussion boards there. There is a very lively javascript forum. I use the HTML forum a lot too. As for whether you can use them somehow in the actual board controls, I really have no idea, but maybe someone else will know what is possible. (Hopefully, I haven't totally missed the intent of your question. )
|
Visit the Planet Nexus page! Download some of my graphic sets HERE | |
|
|
|
| slaytanist | Sep 12 2006, 12:29 AM Post #3 |
|
Cool IF Coder
|
You could make your link a JS function.
You can set the href of an existing link in Javascript like so:
With that out of the way:
You could also happily use a switch statement as Helena said but I'm not aware of them being much if at all faster in Javascript... You will have to set up CSS classes in your member suffixes/prefixes for that to work, eg. <span class='admin'> </span> and in your CSS: .admin {color:red} (preferable to do it that way anyway, since it will work with skin selectors ; ) ) It will also only work on the index page. For any other page you will need iframes, AJAX, or storing the info in a cookie. If you need it to work on another page please ask. Finally this is not useful for hiding pages from membergroups, since anyone can just view the source and take the URLs. I can think of a couple of ways of doing it, one using PHP and one using PMs and cookies. Again if you require this just ask. Cheers. |
![]() Click here! | |
|
|
|
| 1 user reading this topic (1 Guest and 0 Anonymous) | |
| « Previous Topic · Global Support Archive · Next Topic » |
| Track Topic · E-mail Topic |
|
Hosted for free by ZetaBoards · Privacy Policy





)

