|
removed
|
|
Topic Started: Feb 22 2014, 11:27 PM (5,553 Views)
|
|
Ferby
|
Feb 22 2014, 11:27 PM
Post #1
|
- Posts:
- 1,604
- Group:
- Members
- Member
- #391,527
- Joined:
- January 14, 2012
|
removed
Edited by Ferby, Sep 13 2017, 06:33 AM.
|
|
|
| |
|
Itachi69
|
Feb 23 2014, 11:31 AM
Post #2
|
Train insane or remain the same
- Posts:
- 496
- Group:
- Members
- Member
- #125,778
- Joined:
- August 26, 2006
- I'm Browsing With
- Chrome
|
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.
|
|
|
| |
|
Ferby
|
Feb 23 2014, 01:39 PM
Post #3
|
- Posts:
- 1,604
- Group:
- Members
- Member
- #391,527
- Joined:
- January 14, 2012
|
- 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
|
|
|
| |
|
Skyon Archer
|
Feb 24 2014, 03:07 PM
Post #4
|
- Posts:
- 821
- Group:
- Members
- Member
- #382,769
- Joined:
- November 21, 2009
|
Simple and sweet. I like it.
|
|
|
| |
|
Kankuro
|
Mar 6 2014, 12:24 AM
Post #5
|
- Posts:
- 1,092
- Group:
- Members
- Member
- #608,916
- Joined:
- May 25, 2013
- I'm Browsing With
- Chrome
- My Board URL
- http://gamesandanime.net/index/
- Latest Design
- http://if.invisionfree.com/topic/5195959/
|
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?
|
|
|
| |
|
Ferby
|
Mar 6 2014, 03:36 PM
Post #6
|
- Posts:
- 1,604
- Group:
- Members
- Member
- #391,527
- Joined:
- January 14, 2012
|
- 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
|
|
|
| |
|
Kankuro
|
Mar 6 2014, 03:42 PM
Post #7
|
- Posts:
- 1,092
- Group:
- Members
- Member
- #608,916
- Joined:
- May 25, 2013
- I'm Browsing With
- Chrome
- My Board URL
- http://gamesandanime.net/index/
- Latest Design
- http://if.invisionfree.com/topic/5195959/
|
- 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  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.
|
|
|
| |
|
Ferby
|
Mar 6 2014, 04:10 PM
Post #8
|
- Posts:
- 1,604
- Group:
- Members
- Member
- #391,527
- Joined:
- January 14, 2012
|
Figured out the issue, it was being stupid 
- 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>
|
|
|
| |
|
Kankuro
|
Mar 6 2014, 04:23 PM
Post #9
|
- Posts:
- 1,092
- Group:
- Members
- Member
- #608,916
- Joined:
- May 25, 2013
- I'm Browsing With
- Chrome
- My Board URL
- http://gamesandanime.net/index/
- Latest Design
- http://if.invisionfree.com/topic/5195959/
|
- Ferby
- Mar 6 2014, 04:10 PM
Figured out the issue, it was being stupid  - 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: 
20 Pixels:
Edited by Kankuro, Mar 6 2014, 04:25 PM.
|
|
|
| |
|
Ferby
|
Mar 6 2014, 05:07 PM
Post #10
|
- Posts:
- 1,604
- Group:
- Members
- Member
- #391,527
- Joined:
- January 14, 2012
|
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.
|
|
|
| |
|
Kankuro
|
Mar 6 2014, 05:53 PM
Post #11
|
- Posts:
- 1,092
- Group:
- Members
- Member
- #608,916
- Joined:
- May 25, 2013
- I'm Browsing With
- Chrome
- My Board URL
- http://gamesandanime.net/index/
- Latest Design
- http://if.invisionfree.com/topic/5195959/
|
- 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.

Edited by Kankuro, Mar 6 2014, 05:55 PM.
|
|
|
| |
|
Ferby
|
Mar 6 2014, 05:58 PM
Post #12
|
- Posts:
- 1,604
- Group:
- Members
- Member
- #391,527
- Joined:
- January 14, 2012
|
Replace overflow:hidden to overflow:auto instead.
|
|
|
| |
|
Kankuro
|
Mar 6 2014, 06:07 PM
Post #13
|
- Posts:
- 1,092
- Group:
- Members
- Member
- #608,916
- Joined:
- May 25, 2013
- I'm Browsing With
- Chrome
- My Board URL
- http://gamesandanime.net/index/
- Latest Design
- http://if.invisionfree.com/topic/5195959/
|
- 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.
|
|
|
| |
|
Ferby
|
Mar 6 2014, 06:11 PM
Post #14
|
- Posts:
- 1,604
- Group:
- Members
- Member
- #391,527
- Joined:
- January 14, 2012
|
Could you PM me a link to the board you have this on? I'm shooting in the dark here.
|
|
|
| |
|
Kankuro
|
Mar 6 2014, 06:19 PM
Post #15
|
- Posts:
- 1,092
- Group:
- Members
- Member
- #608,916
- Joined:
- May 25, 2013
- I'm Browsing With
- Chrome
- My Board URL
- http://gamesandanime.net/index/
- Latest Design
- http://if.invisionfree.com/topic/5195959/
|
- 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.
|
|
|
| |
| 1 user reading this topic (1 Guest and 0 Anonymous)
|