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] ID card
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
[Completed] [ZB] ID card
Tweet Topic Started: Aug 19 2009, 03:05 PM (1,034 Views)
Namieko Aug 29 2009, 10:22 PM Post #11
Member Avatar
Mother hen

Posts:
159
Group:
Member
Member
#3,293
Joined:
Jul 7, 2009
Coding language
HTML/CSS
Iv tryed that but there still not working even when Im the one saving them to how people want them... its vary frustrating. Im just happy where still setign the site up as we find our flaws.
Posted Image
Offline Profile Goto Top
 
Namieko Sep 22 2009, 11:19 PM Post #12
Member Avatar
Mother hen

Posts:
159
Group:
Member
Member
#3,293
Joined:
Jul 7, 2009
Coding language
HTML/CSS
any thing new?
Posted Image
Offline Profile Goto Top
 
HolySavior Sep 23 2009, 02:05 PM Post #13
Member Avatar
Modifying The World Around You

Posts:
2,488
Group:
Distinguished Coder
Member
#7
Joined:
Jul 2, 2008
Coding language
Everything
are you still having trouble setting up the custom fields? if you are i suggest sending in a support ticket. if you are not and all are showing please provide me with ur URL and i will do my best to get this done when i can. im pretty busy right now but i do check in and write stuff every now and than.
Offline Profile Goto Top
 
Namieko Sep 27 2009, 07:40 PM Post #14
Member Avatar
Mother hen

Posts:
159
Group:
Member
Member
#3,293
Joined:
Jul 7, 2009
Coding language
HTML/CSS
Its fixed now and heres my site

http://s1.zetaboards.com/Kobushi/
Posted Image
Offline Profile Goto Top
 
Choco Oct 20 2009, 04:39 PM Post #15
Member Avatar
¡ʎɹoʇɔɐɟ ʎʇıʌɐɹƃ ɐ uı pǝddɐɹʇ ɯ,ı 'dןǝɥ

Posts:
589
Group:
Admins
Member
#3,272
Joined:
Jun 30, 2009
Coding language
Everything
So it worked for you?
Posted ImageIt's a magical world, Hobbes, ol'd buddy... ...let's go exploring!
In progress: Something Special ;)
Offline Profile Goto Top
 
Namieko Oct 22 2009, 11:19 PM Post #16
Member Avatar
Mother hen

Posts:
159
Group:
Member
Member
#3,293
Joined:
Jul 7, 2009
Coding language
HTML/CSS
yes i got that part of the site working again...
Posted Image
Offline Profile Goto Top
 
RedBldSandman Oct 23 2009, 08:41 AM Post #17
Member Avatar
ZIPPY!

Posts:
482
Group:
Coding Staff
Member
#2,122
Joined:
Jan 25, 2009
Make these Profile Fields:
Code:
 
Age
Village
Rank
Class
Clan
Mask
Make sure they're set to show in topics and are not admin-only editable. Then add this code to the Below the Board part in the board template:
Code:
 
<script type="text/javascript">
// ID Cards Code by RedBldSandman of ZBCode

var img_src = "http://i202.photobucket.com/albums/aa18/namiamaya/Edge/profile.png"
var id_fields = ["Age","Village","Rank","Class","Clan","Mask"]

// STOP EDITING!

var id_l = id_fields.length
if (location.href.match("topic/")||location.href.match("profile/")) {
var id_loc = (location.href.match("topic/"))?1:0
if (id_loc==1) {
$(".c_postfoot td.c_footicons span.left").append(" <img src='"+img_src+"' class='id_card_img' style='cursor:pointer;' />")
}
else if (id_loc==0) {
$(".c_user").append("<div style='text-align:left;'><img src='"+img_src+"' class='id_card_img' style='cursor:pointer;' /></div>")
}

$(".user_profile").each(function() {
$(this).children("dt").each(function() {
for (i=0;i<id_l;i++) {
if ($(this).html().match(id_fields[i])) {
$(this).hide().attr("class","id_card_c").next().hide()
}
}
})
if (!$(this).find("dt").is(":visible")) {
$(this).hide()
}
})

$(".id_card_img").click(function() {
$("#id_card").stop(true,false)
if ($("#id_card").html()) {
card_close(id_loc,this)
}
else {
id_new(this)
}
})


function card_close(x,y) {
$("#id_card").stop(true,false)
if (x!=1) {
$("#id_card").animate({
height: "0px" },{queue: false, duration: 500}).animate({ width: "0px" },{queue: true, duration: 500, complete: function() { $(this).remove()}}).animate({ left: "50%" },{queue: false, duration: 500})
}
else {
$("#id_card").animate({
height: "0px" },{queue: false, duration: 500}).animate({ width: "0px" },{queue: true, duration: 500, complete: function() {
$("#id_card").remove()
id_new(y)
}
}).animate({ left: "50%" },{queue: false, duration: 500})
}
}

function id_new(z) {
if (id_loc==1) {
var id_card_html = "<div class='category'><table class='cat_head'><tbody><tr><td><h2><span class='right' style='margin:-2px;padding:0px;cursor:pointer;' onclick='card_close()'>[X]</span>"+$.trim($(z).parent().parent().parent().prev().prev().prev().children(".c_username").html())+"<small>'s Card</small></h2></td></tr></tbody></table><table cellspacing='0' border='0'><tbody>"
$(z).parent().parent().parent().prev().prev().children(".c_user").children(".user_profile").children("dt.id_card_c").each(function() {
id_card_html = id_card_html + "<tr><td style='text-align:center;'>" + $(this).html() + ":</td><td style='text-align:center;'>" + $(this).next("dd").html() + "</td></tr>"
})
}
else if (id_loc==0) {
var id_card_html = "<div class='category'><table class='cat_head'><tbody><tr><td><h2><span class='right' style='margin:-2px;padding:0px;cursor:pointer;' onclick='card_close()'>[X]</span>"+$.trim($('#profile_menuwrap').next().html())+"<small>'s Card</small></h2></td></tr></tbody></table><table cellspacing='0' border='0'><tbody>"
$(".user_profile").children("dt.id_card_c").each(function() {
id_card_html = id_card_html + "<tr><td style='text-align:center;'>" + $(this).html() + ":</td><td style='text-align:center;'>" + $(this).next("dd").html() + "</td></tr>"
})
}
id_card_html = id_card_html + "<td class='c_foot' colspan='2' /></tbody></table></div>"
$("#nav").after("<div style='position:fixed;left:50%;width:350px;top:300px;display:none;' id='id_card'>"+id_card_html+"</div>")
if ($("#id_card div.category table:not(.cat_head) tbody td").html()=="") {
$("#id_card div.category table:not(.cat_head) tbody").prepend("<tr><td style='text-align:center;' colspan='2'>No Information</td></tr>")
}
id_animate()
}

function id_animate() {
var id_w = $("#id_card").width()
var id_h = $("#id_card").height()

$("#id_card").css("left","50%")

$("#id_card").width("20px").height("10px").animate({
height: id_h },{queue: false, duration: 500}).animate({ width: id_w },{queue: true, duration: 500}).animate({ left: Math.round($("#id_card").position().left-id_w/2)+"px" },{queue: false, duration: 500})
}
}
</script>
The things you can change:
Code:
 
var img_src = "http://i202.photobucket.com/albums/aa18/namiamaya/Edge/profile.png"
var id_fields = ["Age","Village","Rank","Class","Clan","Mask"]
img_src is the source of the image that you click on to open up the id card. id_fields is the list of all the profile fields to be put in to the id card.

I had fun making the animation, I hope you like it :D If there's anything you want changed, just say! It's quite long, so you could host it somewhere if needed :D
Edited by RedBldSandman, Oct 23 2009, 08:47 AM.
Posted Image
"To iterate is human, to recurse divine."

Offline Profile Goto Top
 
Choco Oct 24 2009, 12:03 PM Post #18
Member Avatar
¡ʎɹoʇɔɐɟ ʎʇıʌɐɹƃ ɐ uı pǝddɐɹʇ ɯ,ı 'dןǝɥ

Posts:
589
Group:
Admins
Member
#3,272
Joined:
Jun 30, 2009
Coding language
Everything
Does that work for you, Namieko?
Posted ImageIt's a magical world, Hobbes, ol'd buddy... ...let's go exploring!
In progress: Something Special ;)
Offline Profile Goto Top
 
Namieko Oct 24 2009, 05:10 PM Post #19
Member Avatar
Mother hen

Posts:
159
Group:
Member
Member
#3,293
Joined:
Jul 7, 2009
Coding language
HTML/CSS
Yes this works perfectly

Note to everyone else though make sure your capitals in Clan and Clan are the same or they dont work. and that there in aphabeitcal order in the "", or they also wont work.

Thank you great job!!!
Posted Image
Offline Profile Goto Top
 
Dorith Oct 24 2009, 05:42 PM Post #20
Member Avatar
Has just entered the Matrix

Posts:
2,069
Group:
Former Staff
Member
#1,854
Joined:
Dec 23, 2008
You're welcome.
See? We can read thoughts too. ;)

Your request has been completed, and we're moving it to the correct forum. We hope it works for you; if it doesn't, feel free to post another request topic in the requests forum. Just remember: read the rules first!

Thanks,
The ZBCode Staff
Posted Image
Posted Image
(Made emoticon using Codes Rock's Smiley Generator)
Offline Profile Goto Top
 
1 user reading this topic (1 Guest and 0 Anonymous)
« Previous Topic · Completed Requests · Next Topic »
Locked Topic
  • Pages:
  • 1
  • 2

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