Welcome Guest [Log In] [Register]
Search Members Calendar | Rules ZB Code Index IF Code Index
ZBCode
  • Navigation
  • ZBCode
  • Coding Resources
  • Code Requests
  • Completed Requests
  • [Completed] [ZB] Code Request
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:

Username:   Password:
Locked Topic
  • Pages:
  • 1
  • 2
  • 3
  • 4
[Completed] [ZB] Code Request
Tweet Topic Started: Sep 15 2009, 08:59 AM (789 Views)
Salty Sep 17 2009, 11:37 PM Post #21


Posts:
29
Group:
Member
Member
#2,145
Joined:
Jan 27, 2009
Coding language
HTML/CSS
Yeah, under would be better. Just when you click the username or the plus sign.

Thanks for getting it done :)
Offline Profile Goto Top
 
Firestrife2 Sep 17 2009, 11:44 PM Post #22
Member Avatar


Posts:
159
Group:
Dedicated
Member
#2,094
Joined:
Jan 21, 2009
So you want me to add the plus sign, yes?

Ok, and should there be a "Close Menu" option or should it close when you click your username/+ again?
Posted Image

Posted Image
Offline Profile Goto Top
 
Salty Sep 18 2009, 12:16 AM Post #23


Posts:
29
Group:
Member
Member
#2,145
Joined:
Jan 27, 2009
Coding language
HTML/CSS
Yeah, the plus should be there. and yeah, it can close when you click on anything basically.
Offline Profile Goto Top
 
Firestrife2 Sep 18 2009, 12:40 AM Post #24
Member Avatar


Posts:
159
Group:
Dedicated
Member
#2,094
Joined:
Jan 21, 2009
Anything?!?!

xD. Alright I'll see what I can do.
Posted Image

Posted Image
Offline Profile Goto Top
 
Salty Sep 18 2009, 12:46 AM Post #25


Posts:
29
Group:
Member
Member
#2,145
Joined:
Jan 27, 2009
Coding language
HTML/CSS
Well i don't care. Clicking on the name is fine too.
Offline Profile Goto Top
 
Firestrife2 Sep 18 2009, 12:58 AM Post #26
Member Avatar


Posts:
159
Group:
Dedicated
Member
#2,094
Joined:
Jan 21, 2009
Alright, tell me what you think of this. It goes below the board:

code
 
<script type="text/javascript">
/* Quirks Mode Object Positioning */
function findPos(obj) {
var curleft = curtop = 0;
if(obj.offsetParent) {
curleft = obj.offsetLeft; curtop = obj.offsetTop
while (obj = obj.offsetParent) { curleft += obj.offsetLeft;curtop += obj.offsetTop; }
} return [curleft,curtop];
}

//Your home page
myhome="http://zbcode.com";
//Any additional menu options you would like to add. The format is <li>CONTENT HERE</li>
additionaldrops="<li><a href='http://google.com/'>Google</a></li>";


if(!document.getElementById('top_info').getElementsByTagName('strong')[0].innerHTML.match('Guest')){
document.getElementById('top_info').getElementsByTagName('a')[1].innerHTML = "";
topusername=document.getElementById('top_info').getElementsByTagName('a')[0];
topusername.innerHTML = topusername.innerHTML+" <span id='dropplus'>+</span>";
$("#top_info strong a").each(function() {
memID = this.href.split("/profile/")[1].split("/")[0];
$(this).attr("memberid", memID);
$(this).removeAttr("href");
});
document.getElementById('top_info').getElementsByTagName('a')[0].style.cursor= "pointer";
$("#top_info strong a").click(function() {
ID = $(this).attr("memberid");
thedrop=document.getElementById('top_info').getElementsByTagName('a')[0];
$("body").append("<div id='member_drop'><ul><li><a href='"+myhome+"'>Home</a><li><a href='"+main_url+"profile/"+ID+"'>My Profile</a></li>"+additionaldrops+"<li><a href=\"http://whatif.gaming-zc.com/login/logout/\" onClick=\""+$('#top_info small a').attr('onClick')+"\">Log Out</a></li><li><a id='closedropmenu' style='cursor:pointer'>Close Menu</a></li></ul></div>");
$("#member_drop").css("top",(findPos(thedrop)[1]+17) + "px").css("left",(findPos(thedrop)[0]) + "px");

if(document.getElementById('member_drop').style.display == "none"){
$("#member_drop").slideDown("slow");
document.getElementById('member_drop').style.display = "block";}else{
$("#member_drop").slideUp("slow");
document.getElementById('member_drop').style.display = "none";}

$('#closedropmenu').click(function ()
{
$("#member_drop").slideUp("slow");
document.getElementById('member_drop').style.display = "none";
});
});
}
</script>


Don't forget to edit the Home Page and extra menu values(I added Google just to show you how xD.)

And since for some reason this is pretty big, I can host it for you if you want.

Here is the CSS you can use for every theme, or you can even use it in your templates if you want it to look the same for each of them:

CSS
 
#member_drop { display: none; position: absolute; top:0px;left:0px; background-color: #ffffff; border: 1px solid #000000; padding: 4px; }
#member_drop ul { margin: 0; padding: 0; list-style: none; }
#member_drop ul li a { color:#d10039; }
#dropplus { font-size:13px; }


I highlighted some areas that you might want to mess around with.
Posted Image

Posted Image
Offline Profile Goto Top
 
Salty Sep 18 2009, 01:11 AM Post #27


Posts:
29
Group:
Member
Member
#2,145
Joined:
Jan 27, 2009
Coding language
HTML/CSS
That is amazing! Thank you so much.
Offline Profile Goto Top
 
Salty Sep 18 2009, 01:17 AM Post #28


Posts:
29
Group:
Member
Member
#2,145
Joined:
Jan 27, 2009
Coding language
HTML/CSS
Wait, is there anyway I can make this for a specific skin?
Offline Profile Goto Top
 
HolySavior Sep 18 2009, 01:17 AM Post #29
Member Avatar
Modifying The World Around You

Posts:
2,488
Group:
Distinguished Coder
Member
#7
Joined:
Jul 2, 2008
Coding language
Everything
overkill on the coding :P hehe. but nicely done.
Offline Profile Goto Top
 
Salty Sep 18 2009, 01:22 AM Post #30


Posts:
29
Group:
Member
Member
#2,145
Joined:
Jan 27, 2009
Coding language
HTML/CSS
Nevermind, I got it. Thanks again :D
Offline Profile Goto Top
 
1 user reading this topic (1 Guest and 0 Anonymous)
Go to Next Page
« Previous Topic · Completed Requests · Next Topic »
Locked Topic
  • Pages:
  • 1
  • 2
  • 3
  • 4

Track Topic · E-mail Topic Time: 2:27 PM Jul 11
Hosted for free by ZetaBoards · Privacy Policy