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:
Add Reply
  • Pages:
  • 1
  • 3
  • 4
removed
Topic Started: Feb 22 2014, 11:27 PM (5,553 Views)
Ferby
Member Avatar
Developer
[ *  *  *  *  * ]
removed
Edited by Ferby, Sep 13 2017, 06:33 AM.
Offline Profile Quote Post Goto Top
 
Itachi69
Member Avatar
Train insane or remain the same
[ *  *  * ]
Weather there's a better way to write it or not,it's pretty nice imo.The popup effect is the nifty part I like.Awesome little mod Ferby,keep up the great work man. :)
Offline Profile Quote Post Goto Top
 
Ferby
Member Avatar
Developer
[ *  *  *  *  * ]
Itachi69
Feb 23 2014, 11:31 AM
Weather there's a better way to write it or not,it's pretty nice imo.The popup effect is the nifty part I like.Awesome little mod Ferby,keep up the great work man. :)
Thanks very much :)
Offline Profile Quote Post Goto Top
 
Skyon Archer
Member Avatar
Member
[ *  *  *  * ]
Simple and sweet. I like it.
Offline Profile Quote Post Goto Top
 
Kankuro
Member Avatar
かんくろ
[ *  *  *  *  * ]
I like this, and want to use it. However both boards I will be using it on will have members that earn quite a few awards.
Is there any way to tweak this so that after, say 6 awards they appear in a scroll box?

Also can you make is show the award name when you hover over the award?
Offline Profile Quote Post Goto Top
 
Ferby
Member Avatar
Developer
[ *  *  *  *  * ]
kankuro865
Mar 6 2014, 12:24 AM
I like this, and want to use it. However both boards I will be using it on will have members that earn quite a few awards.
Is there any way to tweak this so that after, say 6 awards they appear in a scroll box?

Also can you make is show the award name when you hover over the award?
Both are pretty simple enough. Use this code instead...
Code: HTML
 
<script type="text/javascript">
function addBadge(uid,name,desc,image,date) {
var sysName = "Badges";
var max-height = "50px"
if($("td.c_username a[href*=/"+uid+"/]").parent().parent().next().find($("dl.user_info dt + dd[name*=badge]")).length == 0) $("td.c_username a[href*=/"+uid+"/]").parent().parent().next().find('dl.user_info:nth-of-type(1)').append("<dt>"+sysName+":</dt><dd name='badge-"+uid+"' style='max-height:"+max-height+"'></dd>");
$("dl.user_info dd[name=badge-"+uid+"]").prepend("<a href='#' onmousedown=\"badgePopup('"+name+"','"+desc+"','"+image+"','"+date+"')\" title='"+name+"'><img src='"+image+"' alt='Badge' style='height:20px;width:20px' /></a>");
}
function badgePopup(n,d,img,da) {
$("body").append("<div class='FpopupBG'><div class='Fpopup'><table><tr><th colspan='2' style='text-align:center'>"+n+"</th></tr><tr><td colspan='2' style='text-align:center'><img src='"+img+"' style='max-height:200px;max-width:200px' /></td></tr><tr><td>Name:</td><td>"+n+"</td></tr><tr><td>Description:</td><td>"+d+"</td></tr><tr><td>Date:</td><td>"+da+"</td></tr><tr><td colspan='2' style='text-align:center;'><a href='#' onmousedown='closeBadgePopup()'>Close</a></td></tr></table></div></div>");
}
function closeBadgePopup() {
$(".FpopupBG, .Fpopup").remove();
}
</script>
<script type="text/javascript">
addBadge(USERID,"NAME","DESC","IMG","DATE");
</script>

There's a new option called `max-height` which, after a the box reaches a certain height, will cause it to use a scrollbar rather than continuing (just like you requested). Set it to the size you want (set it to 50px by default) and it should work. If it doesn't let me know, I haven't tested this :P
Offline Profile Quote Post Goto Top
 
Kankuro
Member Avatar
かんくろ
[ *  *  *  *  * ]
Ferby
Mar 6 2014, 03:36 PM
kankuro865
Mar 6 2014, 12:24 AM
I like this, and want to use it. However both boards I will be using it on will have members that earn quite a few awards.
Is there any way to tweak this so that after, say 6 awards they appear in a scroll box?

Also can you make is show the award name when you hover over the award?
Both are pretty simple enough. Use this code instead...
Code: HTML
 
<script type="text/javascript">
function addBadge(uid,name,desc,image,date) {
var sysName = "Badges";
var max-height = "50px"
if($("td.c_username a[href*=/"+uid+"/]").parent().parent().next().find($("dl.user_info dt + dd[name*=badge]")).length == 0) $("td.c_username a[href*=/"+uid+"/]").parent().parent().next().find('dl.user_info:nth-of-type(1)').append("<dt>"+sysName+":</dt><dd name='badge-"+uid+"' style='max-height:"+max-height+"'></dd>");
$("dl.user_info dd[name=badge-"+uid+"]").prepend("<a href='#' onmousedown=\"badgePopup('"+name+"','"+desc+"','"+image+"','"+date+"')\" title='"+name+"'><img src='"+image+"' alt='Badge' style='height:20px;width:20px' /></a>");
}
function badgePopup(n,d,img,da) {
$("body").append("<div class='FpopupBG'><div class='Fpopup'><table><tr><th colspan='2' style='text-align:center'>"+n+"</th></tr><tr><td colspan='2' style='text-align:center'><img src='"+img+"' style='max-height:200px;max-width:200px' /></td></tr><tr><td>Name:</td><td>"+n+"</td></tr><tr><td>Description:</td><td>"+d+"</td></tr><tr><td>Date:</td><td>"+da+"</td></tr><tr><td colspan='2' style='text-align:center;'><a href='#' onmousedown='closeBadgePopup()'>Close</a></td></tr></table></div></div>");
}
function closeBadgePopup() {
$(".FpopupBG, .Fpopup").remove();
}
</script>
<script type="text/javascript">
addBadge(USERID,"NAME","DESC","IMG","DATE");
</script>

There's a new option called `max-height` which, after a the box reaches a certain height, will cause it to use a scrollbar rather than continuing (just like you requested). Set it to the size you want (set it to 50px by default) and it should work. If it doesn't let me know, I haven't tested this :P
Seems to have broken the code. There is no award box anywhere on the board. It looks like I didn't add anything lol.

Note: I did try moving it to the top of Below Board to see if that made a difference, which it didn't.

Javascripts
Code:
 

<style type="text/css">
.FpopupBG {
position:fixed;
left:0px;
top:0px;
bottom:0px;
right:0px;
width:100%;
height:100%;
z-index:99;
background:rgba(0,0,0,0.5);
}
.Fpopup {
position:fixed;
left:25%;
top:15%;
width:600px;
z-index:100;
background:grey;
}
</style>



Below Board:
Code:
 

<script type="text/javascript">
function addBadge(uid,name,desc,image,date) {
var sysName = "Badges";
var max-height = "50px"
if($("td.c_username a[href*=/"+uid+"/]").parent().parent().next().find($("dl.user_info dt + dd[name*=badge]")).length == 0) $("td.c_username a[href*=/"+uid+"/]").parent().parent().next().find('dl.user_info:nth-of-type(1)').append("<dt>"+sysName+":</dt><dd name='badge-"+uid+"' style='max-height:"+max-height+"'></dd>");
$("dl.user_info dd[name=badge-"+uid+"]").prepend("<a href='#' onmousedown=\"badgePopup('"+name+"','"+desc+"','"+image+"','"+date+"')\" title='"+name+"'><img src='"+image+"' alt='Badge' style='height:20px;width:20px' /></a>");
}
function badgePopup(n,d,img,da) {
$("body").append("<div class='FpopupBG'><div class='Fpopup'><table><tr><th colspan='2' style='text-align:center'>"+n+"</th></tr><tr><td colspan='2' style='text-align:center'><img src='"+img+"' style='max-height:200px;max-width:200px' /></td></tr><tr><td>Name:</td><td>"+n+"</td></tr><tr><td>Description:</td><td>"+d+"</td></tr><tr><td>Date:</td><td>"+da+"</td></tr><tr><td colspan='2' style='text-align:center;'><a href='#' onmousedown='closeBadgePopup()'>Close</a></td></tr></table></div></div>");
}
function closeBadgePopup() {
$(".FpopupBG, .Fpopup").remove();
}
</script>
<script type="text/javascript">
addBadge(3793724,"test","testing","http://z5.ifrm.com/30294/18/0/f5260827/Nav.png","3/6/14");
</script>
Edited by Kankuro, Mar 6 2014, 03:44 PM.
Offline Profile Quote Post Goto Top
 
Ferby
Member Avatar
Developer
[ *  *  *  *  * ]
Figured out the issue, it was being stupid :P
Code: HTML
 
<script type="text/javascript">
function addBadge(uid,name,desc,image,date) {
var sysName = "Badges";
var maxheight = "50px";
if($("td.c_username a[href*=/"+uid+"/]").parent().parent().next().find($("dl.user_info dt + dd[name*=badge]")).length == 0) $("td.c_username a[href*=/"+uid+"/]").parent().parent().next().find('dl.user_info:nth-of-type(1)').append("<dt>"+sysName+":</dt><dd name='badge-"+uid+"' style='max-height:"+maxheight+"'></dd>");
$("dl.user_info dd[name=badge-"+uid+"]").prepend("<a href='#' onmousedown=\"badgePopup('"+name+"','"+desc+"','"+image+"','"+date+"')\" title='"+name+"'><img src='"+image+"' alt='Badge' style='height:20px;width:20px' /></a>");
}
function badgePopup(n,d,img,da) {
$("body").append("<div class='FpopupBG'><div class='Fpopup'><table><tr><th colspan='2' style='text-align:center'>"+n+"</th></tr><tr><td colspan='2' style='text-align:center'><img src='"+img+"' style='max-height:200px;max-width:200px' /></td></tr><tr><td>Name:</td><td>"+n+"</td></tr><tr><td>Description:</td><td>"+d+"</td></tr><tr><td>Date:</td><td>"+da+"</td></tr><tr><td colspan='2' style='text-align:center;'><a href='#' onmousedown='closeBadgePopup()'>Close</a></td></tr></table></div></div>");
}
function closeBadgePopup() {
$(".FpopupBG, .Fpopup").remove();
}
</script>
Offline Profile Quote Post Goto Top
 
Kankuro
Member Avatar
かんくろ
[ *  *  *  *  * ]
Ferby
Mar 6 2014, 04:10 PM
Figured out the issue, it was being stupid :P
Code: HTML
 
<script type="text/javascript">
function addBadge(uid,name,desc,image,date) {
var sysName = "Badges";
var maxheight = "50px";
if($("td.c_username a[href*=/"+uid+"/]").parent().parent().next().find($("dl.user_info dt + dd[name*=badge]")).length == 0) $("td.c_username a[href*=/"+uid+"/]").parent().parent().next().find('dl.user_info:nth-of-type(1)').append("<dt>"+sysName+":</dt><dd name='badge-"+uid+"' style='max-height:"+maxheight+"'></dd>");
$("dl.user_info dd[name=badge-"+uid+"]").prepend("<a href='#' onmousedown=\"badgePopup('"+name+"','"+desc+"','"+image+"','"+date+"')\" title='"+name+"'><img src='"+image+"' alt='Badge' style='height:20px;width:20px' /></a>");
}
function badgePopup(n,d,img,da) {
$("body").append("<div class='FpopupBG'><div class='Fpopup'><table><tr><th colspan='2' style='text-align:center'>"+n+"</th></tr><tr><td colspan='2' style='text-align:center'><img src='"+img+"' style='max-height:200px;max-width:200px' /></td></tr><tr><td>Name:</td><td>"+n+"</td></tr><tr><td>Description:</td><td>"+d+"</td></tr><tr><td>Date:</td><td>"+da+"</td></tr><tr><td colspan='2' style='text-align:center;'><a href='#' onmousedown='closeBadgePopup()'>Close</a></td></tr></table></div></div>");
}
function closeBadgePopup() {
$(".FpopupBG, .Fpopup").remove();
}
</script>
Works, Hover name works. But Scroll box doesn't seem to activate..
50 pixels: Posted Image

20 Pixels: Posted Image
Edited by Kankuro, Mar 6 2014, 04:25 PM.
Offline Profile Quote Post Goto Top
 
Ferby
Member Avatar
Developer
[ *  *  *  *  * ]
That's actually a theme issue, go to your theme's appearance, type CTRL + F and type in dl.user_profile {. You should see this...
Code:
 
dl.user_profile {
overflow:hidden;
word-wrap:break-word;
}

Replace overflow:hidden with x-overflow:hidden.
Offline Profile Quote Post Goto Top
 
Kankuro
Member Avatar
かんくろ
[ *  *  *  *  * ]
Ferby
Mar 6 2014, 05:07 PM
That's actually a theme issue, go to your theme's appearance, type CTRL + F and type in dl.user_profile {. You should see this...
Code:
 
dl.user_profile {
overflow:hidden;
word-wrap:break-word;
}

Replace overflow:hidden with x-overflow:hidden.
Nope, didn't help.
Posted Image

Posted Image
Edited by Kankuro, Mar 6 2014, 05:55 PM.
Offline Profile Quote Post Goto Top
 
Ferby
Member Avatar
Developer
[ *  *  *  *  * ]
Replace overflow:hidden to overflow:auto instead.
Offline Profile Quote Post Goto Top
 
Kankuro
Member Avatar
かんくろ
[ *  *  *  *  * ]
Ferby
Mar 6 2014, 05:58 PM
Replace overflow:hidden to overflow:auto instead.
tried x-overflow:auto as well as overflow:auto both resulting in no change. :/
Offline Profile Quote Post Goto Top
 
Ferby
Member Avatar
Developer
[ *  *  *  *  * ]
Could you PM me a link to the board you have this on? I'm shooting in the dark here. :)
Offline Profile Quote Post Goto Top
 
Kankuro
Member Avatar
かんくろ
[ *  *  *  *  * ]
Ferby
Mar 6 2014, 06:11 PM
Could you PM me a link to the board you have this on? I'm shooting in the dark here. :)
http://w11.zetaboards.com/Guardians_of_the_Orb/index/

I'm the only one with the awards, This is the thread I've been using to test how it looks.
Offline Profile Quote Post Goto Top
 
1 user reading this topic (1 Guest and 0 Anonymous)
Go to Next Page
« Previous Topic · ZetaBoards Codes & Modifications · Next Topic »
Add Reply
  • Pages:
  • 1
  • 3
  • 4