Hey, welcome to ZBCode, the premier coding forum for ZB. Here you fill find some of the best Invisionfree and Zetaboards Codes on the network! Unfortunately, you're sorta hovering around in guest mode at the moment; why not join in on the fun? Register an account and you can start accessing the wealth of resources we have available here. Enjoy your stay at ZBCode, and remember to tell all your friends about us; the more members, the more codes available. ![]() Interested in joining? Click here. If you are already a member of ZBCode, feel free to login right here: |
| [Completed] [ZB] Appeal Offense Form | |
|---|---|
| Tweet Topic Started: Sep 9 2009, 08:30 PM (1,498 Views) | |
| Gorgor | Sep 13 2009, 05:41 AM Post #21 |
|
Hello
![]()
|
Hmm... the code's just about done, but I'm not sure exactly where to send the data for it. Always gotta send the data some place different than the regular Could anyone who knows where to $.post it help please? Also, did desire just change the title to [Completed]... or did they some how mess up their auto-tool? ![]() Current code
Edited by Gorgor, Sep 13 2009, 05:42 AM.
|
![]() |
|
| stargazer | Sep 13 2009, 09:29 AM Post #22 |
![]()
|
questions, 1. Can you have different forms on different url, without them conflicting each other? 2. Can guest use the forms? 3. How can members/guest post with the form that goes to the staff viewable section of the board? Edited by stargazer, Sep 13 2009, 09:30 AM.
|
![]() |
|
| Firestrife2 | Sep 13 2009, 10:30 AM Post #23 |
![]()
|
I do believe you can. Anyone can use it, you would have to tell it otherwise if you didn't want guests to. This is the function I use:
With that you can make an IF statement to go around the code, such as this:
As for 3... Erm can you explain it any better? Edited by Firestrife2, Sep 13 2009, 10:30 AM.
|
![]()
| |
![]() |
|
| stargazer | Sep 13 2009, 10:44 AM Post #24 |
![]()
|
I am sorry, I do not fully understand. What does that code you provided do? Tells guest that you can't use the feature? How you you add that to the code? .. so guest can use the form as it is? The last question refer to the code in making, that is.. instead of sending it to admin user through PM, the form content is posted onto a forum that only staff have access to. That way all Staff can review the data and use it how they wish. My question was if you have such a code, members and guest can post it without having to give posting/replying access in the forum preferences (as you do with all forums). |
![]() |
|
| Firestrife2 | Sep 13 2009, 11:14 AM Post #25 |
![]()
|
Actually, guests will be able to see it but not use it as guests don't have PM permissions. The code basically makes a PM as that user without the whole "Compose Message" process. The code I provided is for anything that you want to be invisible to guests. If you wanted you could also display an error message such as "Guests can not use this feature." I have to do that with Internet Explorer users all the time(hate that browser :p). Here's an explanation of what I just provided:
Red - That is the name of the variable, obviously, so you can use it in multiple areas without having to rewrite the code. Blue - The actual code. document.getElementById('top_info') tells it to look in the area where "top_info" is, which on Zetaboards is where you are greeted your username, logout, or for guests, register and sign in. The getuser code I just made is specifically for guests, because I used strong. If you want to make another one for Members all you have to change is ('strong') to ('a') and that should work. The IF statement is really simple. (I just noticed, I forgot a parenthesis on the IF statement in my last post. There needs to be 2 at the end.)
Red - In javascript !(exclamation marks) means the opposite, or not. So whatever I put in the IF statement has opposite effect. Green - Remember the getuser variable we declared earlier? Well it's time to use it. This will have the value of "Guest" if you are logged out. Blue - This is the inner coding. It wants to know if the inner HTML(inside of the tags) equals Guest. Pink - This is where the code is going to go. All you simply have to do is put if(!getuser.innerHTML.match("Guest")){ at the very beginning of the code, and put } at the very end. To sum it all up, it is saying "If getuser has the value of Guest then show the following code". Now you see why the ! is there. If it wasn't, then the code would only be available for guests, and not members. So now the code should only show for members. Even though this form wouldn't work for guests, it would probably be nice to display a message letting them know that lol. Since guests don't have an inbox it will not work for them. EDIT: As long as the guest does not have posting/PM permissions, I think you would be fine. I do believe it is possible you just need to make the forum that is going to be posted into etc. If you want me to I'll make it, but otherwise I'll let gorgor. Edited by Firestrife2, Sep 13 2009, 11:19 AM.
|
![]()
| |
![]() |
|
| stargazer | Sep 14 2009, 01:39 AM Post #26 |
![]()
|
But if gorgor manage to arrange a code that goes to the forum instead, would guest be able to use the form? |
![]() |
|
| stargazer | Sep 14 2009, 04:37 AM Post #27 |
![]()
|
I can't make this work.. how should I implement it to the code above and where? |
![]() |
|
| Firestrife2 | Sep 14 2009, 03:20 PM Post #28 |
![]()
|
Like I said, guests won't have permission to post unless you give them posting permissions for that forum/section. If you want the page only viewable by members, just so you don't mislead guests or anything, you can restrict it from them with that code. Also make sure you have the getuser variable declared somewhere in your templates. Example: If I wanted every member to be alerted "Hello Member!" then it would look like this:
You could also use an else statement for the people who are guests...for example if I wanted members to see what they saw before, and guests to see a message saying "Log in please!" It would look like this:
:). Just replace alert("Hello Member!"); with your code, and add a curly brace( } ) to the end. I think this would work well: getuser=document.getElementById('top_info').getElementsByTagName('strong')[0];
I didn't test it but it should work fine.[/quote] Edited by Firestrife2, Sep 16 2009, 02:38 PM.
|
![]()
| |
![]() |
|
| stargazer | Sep 15 2009, 03:03 AM Post #29 |
![]()
|
I tried your code but it does not work for me. The button does not react and I do not get any message as guest when adding the code above, ... |
![]() |
|
| Firestrife2 | Sep 16 2009, 11:34 AM Post #30 |
![]()
|
That means it's my turn to work with this code on an actual board. I'll reply later with the best code I can get :D. |
![]()
| |
![]() |
|
| 1 user reading this topic (1 Guest and 0 Anonymous) | |
| Go to Next Page | |
| « Previous Topic · Completed Requests · Next Topic » |















questions, 

2:27 PM Jul 11