We hope you enjoy your visit.

You're currently viewing our forum as a guest. This means you are limited to certain areas of the board and there are some features you can't use. If you join our community, you'll be able to access member-only sections, and use many member-only features such as customizing your profile, sending personal messages, and voting in polls. Registration is simple, fast, and completely free.


Join our community!


If you're already a member please log in to your account to access all of our features:

Username:   Password:
Locked Topic
[ C ] League Redirecting..
Topic Started: Aug 11 2010, 06:44 PM (291 Views)
MasssseY
Member Avatar
Member
[ * ]
Board Address: www.3PLegacy.co.nr
Board Software: ZetaBoards
Description:

Hi, i would like this to be able to put to buttons at the top of my website below explains all. Any help will be appreciated.

Sorry its a bit confusing..

But a summary..

Posted Image
On that photo where the red boxes are could i have the buttons in either one of those.

At the top of my website (forum)

Could you create the coding so i can have a button that says, "Create a Team" which will redirect the user to sending me a private message with,

Team Name:
Player One:
Player Two:
Player Three:
Player Four:
Player Five:

Then all the person has to type in those details...

then another button with "Report Match" which will redirect the user once again, with a private message to me with,

Team One:
Team Two:
Winner:
Man of the Match:

That is all then i will manually update the ladder myself..

Any other ideas you wish to add, carry on..

Any help is appreciated thankk you..
Edited by MasssseY, Aug 11 2010, 07:03 PM.
Offline Profile Goto Top
 
RedBldSandman
Member Avatar
Asante sana Squash banana
[ *  *  *  * ]
Put this code in the Below the Board part of your Board Template:
Code:
 
<script type="text/javascript">
(function() {
if (document.getElementById("top_info").getElementsByTagName("strong")[0].getElementsByTagName("a").length) {
var admin_profile = 3086566;
var buttons = [document.createElement("div")];
buttons[0].style.cssFloat = "right";
buttons[0].style.margin = "10px 2%";
buttons[1] = buttons[0].cloneNode(true);
buttons[0].innerHTML = "<button type='button' onclick='window.location=\""+main_url+"msg/?c=2&mid="+admin_profile+"&form=create\";return false;'>Create a Team</button>";
buttons[1].innerHTML = "<button type='button' onclick='window.location=\""+main_url+"msg/?c=2&mid="+admin_profile+"&form=report\";return false;'>Report Match</button>";
var pos = [document.getElementById("logo"),document.getElementById("wrap")];
pos[0].parentNode.insertBefore(buttons[0],pos[0]);
pos[1].parentNode.insertBefore(buttons[1],pos[1]);
if (location.href.match("c=2&mid="+admin_profile+"&form=create")) {
var form = document.posting;
form.title.value = "Team Creation";
form.post.value = "Team Name: \nPlayer One: \nPlayer Two: \nPlayer Three: \nPlayer Four: \nPlayer Five: ";
} else if (location.href.match("c=2&mid="+admin_profile+"&form=report")) {
var form = document.posting;
form.title.value = "Match Report";
form.post.value = "Team One: \nTeam Two: \nWinner: \nMan of the Match: ";
}
}
})();
</script>
I changed the admin_profile variable to your profile id on your forum but if you wish for the buttons to redirect to a page for another use, change this variable to their id (if that makes sense...it's almost 5am over here! XD )
Offline Profile Goto Top
 
MasssseY
Member Avatar
Member
[ * ]
Thankk You so much for the code, but it is not appearing on my board, i have copied and pasted each line one by one to make sure it goes in correct but nothing is appearing any thoughts?
Sorry for double post, i got it on there but one is above banner and one is below anyway i could change it so there next to each other.
Edited by MasssseY, Aug 13 2010, 09:03 AM.
Offline Profile Goto Top
 
RedBldSandman
Member Avatar
Asante sana Squash banana
[ *  *  *  * ]
Ah sorry, I misinderstood. I thought you wanted one above and one below :P
Replace that code with this:
Code:
 
<script type="text/javascript">
(function() {
if (document.getElementById("top_info").getElementsByTagName("strong")[0].getElementsByTagName("a").length) {
var admin_profile = 3086566;
var buttons = document.createElement("div");
buttons.style.cssFloat = "right";
buttons.style.margin = "10px 2%";
buttons.innerHTML = "<button type='button' onclick='window.location=\""+main_url+"msg/?c=2&mid="+admin_profile+"&form=create\";return false;'>Create a Team</button> <button type='button' onclick='window.location=\""+main_url+"msg/?c=2&mid="+admin_profile+"&form=report\";return false;'>Report Match</button>";
var pos = document.getElementById("logo");
pos.parentNode.insertBefore(buttons,pos);
if (location.href.match("c=2&mid="+admin_profile+"&form=create")) {
var form = document.posting;
form.title.value = "Team Creation";
form.post.value = "Team Name: \nPlayer One: \nPlayer Two: \nPlayer Three: \nPlayer Four: \nPlayer Five: ";
} else if (location.href.match("c=2&mid="+admin_profile+"&form=report")) {
var form = document.posting;
form.title.value = "Match Report";
form.post.value = "Team One: \nTeam Two: \nWinner: \nMan of the Match: ";
}
}
})();
</script>
Offline Profile Goto Top
 
MasssseY
Member Avatar
Member
[ * ]
Any chance you could highlight the changes? My Copy And Past means i have to space it all out line by line :/, and the other request is, when that person sends the message to Create A Team it doesn't have to send the message to me but automatically makes the Sub Forum under summer 2010, as you can see on my website if you could look and with the team name as the Forum Name, and the member who sends the message gets to manage that sub forum if you get me. :/ Thanks.
Offline Profile Goto Top
 
RedBldSandman
Member Avatar
Asante sana Squash banana
[ *  *  *  * ]
Changes:
Code:
 
var buttons = [document.createElement("div")];
buttons[0].style.cssFloat = "right";
buttons[0].style.margin = "10px 2%";
buttons[1] = buttons[0].cloneNode(true);
buttons[0].innerHTML = "<button type='button' onclick='window.location=\""+main_url+"msg/?c=2&mid="+admin_profile+"&form=create\";return false;'>Create a Team</button>";
buttons[1].innerHTML = "<button type='button' onclick='window.location=\""+main_url+"msg/?c=2&mid="+admin_profile+"&form=report\";return false;'>Report Match</button>";
var pos = [document.getElementById("logo"),document.getElementById("wrap")];
pos[0].parentNode.insertBefore(buttons[0],pos[0]);
pos[1].parentNode.insertBefore(buttons[1],pos[1]);
was changed to
Code:
 
var buttons = document.createElement("div");
buttons.style.cssFloat = "right";
buttons.style.margin = "10px 2%";
buttons.innerHTML = "<button type='button' onclick='window.location=\""+main_url+"msg/?c=2&mid="+admin_profile+"&form=create\";return false;'>Create a Team</button> <button type='button' onclick='window.location=\""+main_url+"msg/?c=2&mid="+admin_profile+"&form=report\";return false;'>Report Match</button>";
var pos = document.getElementById("logo");
pos.parentNode.insertBefore(buttons,pos);
Your other request (automatic subforum creation) is impossible I'm afraid since you can't use ajax to get to the acp anymore and it would be a huge security risk since it would have to log them in as an admin account (meaning people could access your acp!).
Offline Profile Goto Top
 
MasssseY
Member Avatar
Member
[ * ]
Hmm theyve dissapeared altogether?
Offline Profile Goto Top
 
RedBldSandman
Member Avatar
Asante sana Squash banana
[ *  *  *  * ]
Hmm, it works fine whenever I test it. Can you post up the exact code that you're using? :)
Also, you do have to be logged in to see them.
Edited by RedBldSandman, Aug 13 2010, 01:30 PM.
Offline Profile Goto Top
 
MasssseY
Member Avatar
Member
[ * ]
Code:
 
<script type="text/javascript">
(function() {
if (document.getElementById("top_info").getElementsByTagName("strong")[0].getElementsByTagName("a").length) {
var admin_profile = 3086566;
var buttons = document.createElement("div");
buttons.style.cssFloat = "right";
buttons.style.margin = "10px 2%";
\\buttons.innerHTML = "<button type='button' onclick='window.location=\""+main_url+"msg/?c=2&mid="+admin_profile+"&form=create\";return false;'>Create a Team</button> <button type='button' onclick='window.location=\""+main_url+"msg/?c=2&mid="+admin_profile+"&form=report\";return false;'>Report Match</button>";
var pos = document.getElementById("logo");
pos.parentNode.insertBefore(buttons,pos);
pos[1].parentNode.insertBefore(buttons[1],pos[1]);
if (location.href.match("c=2&mid="+admin_profile+"&form=create")) {
var form = document.posting;
form.title.value = "Team Creation";
form.post.value = "Team Name: \nPlayer One: \nPlayer Two: \nPlayer Three: \nPlayer Four: \nPlayer Five: ";
} else if (location.href.match("c=2&mid="+admin_profile+"&form=report")) {
var form = document.posting;
form.title.value = "Match Report";form.post.value = "Team One: \nTeam Two: \nWinner: \nMan of the Match: ";
}
}
})();
</script>

Theres the code
Edited by MasssseY, Aug 13 2010, 01:31 PM.
Offline Profile Goto Top
 
RedBldSandman
Member Avatar
Asante sana Squash banana
[ *  *  *  * ]
Ah, you must have accidently copied some parts incorrectly.
Change:
Code:
 
\\buttons.innerHTML = "<button type='button' onclick='window.location=\""+main_url+"msg/?c=2&mid="+admin_profile+"&form=create\";return false;'>Create a Team</button> <button type='button' onclick='window.location=\""+main_url+"msg/?c=2&mid="+admin_profile+"&form=report\";return false;'>Report Match</button>";
to
Code:
 
buttons.innerHTML = "<button type='button' onclick='window.location=\""+main_url+"msg/?c=2&mid="+admin_profile+"&form=create\";return false;'>Create a Team</button> <button type='button' onclick='window.location=\""+main_url+"msg/?c=2&mid="+admin_profile+"&form=report\";return false;'>Report Match</button>";

and remove
Code:
 
pos[1].parentNode.insertBefore(buttons[1],pos[1]);
Offline Profile Goto Top
 
RedBldSandman
Member Avatar
Asante sana Squash banana
[ *  *  *  * ]
Confirmed to work through PM :)
Offline Profile Goto Top
 
Roby-ZNR
Member Avatar
Efficacy
[ *  *  *  *  *  * ]
Completed!

Your request has been completed. If you have any questions or concerns regarding the state of your request, please feel free to contact me via PM.
Offline Profile Goto Top
 
1 user reading this topic (1 Guest and 0 Anonymous)
« Previous Topic · Closed Requests · Next Topic »
Locked Topic