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
  • 2
  • 4
removed
Topic Started: Feb 22 2014, 11:27 PM (5,557 Views)
Ferby
Member Avatar
Developer
[ *  *  *  *  * ]
removed
Edited by Ferby, Sep 13 2017, 06:33 AM.
Offline Profile Quote Post Goto Top
 
Replies:
DaPizzaMan
Member Avatar
#TeamSupport

Note to Ferby, it would be easier for him if you simply modified the code to add the following to the `dd`:
Code:
 
overflow:scroll;
Offline Profile Quote Post Goto Top
 
Ferby
Member Avatar
Developer
[ *  *  *  *  * ]
DaPizzaMan
Mar 6 2014, 06:34 PM
Note to Ferby, it would be easier for him if you simply modified the code to add the following to the `dd`:
Code:
 
overflow:scroll;
That's what I was trying to avoid because it adds the scrollbar even if it doesn't need it, making it look uglier but yes that should work.
Offline Profile Quote Post Goto Top
 
Kankuro
Member Avatar
かんくろ
[ *  *  *  *  * ]
Ferby
Mar 6 2014, 07:02 PM
DaPizzaMan
Mar 6 2014, 06:34 PM
Note to Ferby, it would be easier for him if you simply modified the code to add the following to the `dd`:
Code:
 
overflow:scroll;
That's what I was trying to avoid because it adds the scrollbar even if it doesn't need it, making it look uglier but yes that should work.
I would highly prefer it not to show if it isn't needed.
However if it can be set to match the theme I wouldn't mind, but I doubt that is possible since the shoutbox's scroll bar doesn't match themes.
Also, could you make it display on the member's profile as well?
Edited by Kankuro, Mar 6 2014, 07:55 PM.
Offline Profile Quote Post Goto Top
 
Ferby
Member Avatar
Developer
[ *  *  *  *  * ]
As much as I would love to help kankuro865, I've got a lot on my plate to do so I'm not able to keep tailouring the script but any other coder is free to. Sorry I can't help :(
Offline Profile Quote Post Goto Top
 
Kankuro
Member Avatar
かんくろ
[ *  *  *  *  * ]
Ferby
Mar 7 2014, 06:50 AM
As much as I would love to help kankuro865, I've got a lot on my plate to do so I'm not able to keep tailouring the script but any other coder is free to. Sorry I can't help :(
No problem.
Offline Profile Quote Post Goto Top
 
DaPizzaMan
Member Avatar
#TeamSupport

kankuro865
Mar 6 2014, 07:04 PM
Ferby
Mar 6 2014, 07:02 PM
DaPizzaMan
Mar 6 2014, 06:34 PM
Note to Ferby, it would be easier for him if you simply modified the code to add the following to the `dd`:
Code:
 
overflow:scroll;
That's what I was trying to avoid because it adds the scrollbar even if it doesn't need it, making it look uglier but yes that should work.
I would highly prefer it not to show if it isn't needed.
However if it can be set to match the theme I wouldn't mind, but I doubt that is possible since the shoutbox's scroll bar doesn't match themes.
Also, could you make it display on the member's profile as well?
I don't think it does add a scrollbar unless necessary. But when it does add it, no it can't be modified unless you use some code from online.

Replace the code in the first <script> tag with the following (this is for adding the badges to the profile):
Code:
 
function addBadge(uid, name, desc, image, date) {
var sysName = "Badges";
if ((location.href.indexOf('/topic/') || location.href.indexOf('/single/')) !== -1) {
$("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 + "'></dd>");
} else if (location.href.indexOf('/profile/' + uid) !== -1) {
$('dl.user_info:nth-of-type(1)').append("<dt>" + sysName + ":</dt><dd name='badge-" + uid + "'></dd>");
}

$("dl.user_info dd[name=badge-" + uid + "]").prepend("<a href='#' onmousedown=\"badgePopup('" + name + "','" + desc + "','" + image + "','" + date + "')\"><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();
}
Offline Profile Quote Post Goto Top
 
Kankuro
Member Avatar
かんくろ
[ *  *  *  *  * ]
DaPizzaMan
Mar 7 2014, 06:08 PM
kankuro865
Mar 6 2014, 07:04 PM
Ferby
Mar 6 2014, 07:02 PM
DaPizzaMan
Mar 6 2014, 06:34 PM
Note to Ferby, it would be easier for him if you simply modified the code to add the following to the `dd`:
Code:
 
overflow:scroll;
That's what I was trying to avoid because it adds the scrollbar even if it doesn't need it, making it look uglier but yes that should work.
I would highly prefer it not to show if it isn't needed.
However if it can be set to match the theme I wouldn't mind, but I doubt that is possible since the shoutbox's scroll bar doesn't match themes.
Also, could you make it display on the member's profile as well?
I don't think it does add a scrollbar unless necessary. But when it does add it, no it can't be modified unless you use some code from online.

Replace the code in the first <script> tag with the following (this is for adding the badges to the profile):
Code:
 
function addBadge(uid, name, desc, image, date) {
var sysName = "Badges";
if ((location.href.indexOf('/topic/') || location.href.indexOf('/single/')) !== -1) {
$("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 + "'></dd>");
} else if (location.href.indexOf('/profile/' + uid) !== -1) {
$('dl.user_info:nth-of-type(1)').append("<dt>" + sysName + ":</dt><dd name='badge-" + uid + "'></dd>");
}

$("dl.user_info dd[name=badge-" + uid + "]").prepend("<a href='#' onmousedown=\"badgePopup('" + name + "','" + desc + "','" + image + "','" + date + "')\"><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();
}
Holy crap lol
Posted Image


Code:
 

<script type="text/javascript">
function addBadge(uid, name, desc, image, date) {
var sysName = "Badges";
if ((location.href.indexOf('/topic/') || location.href.indexOf('/single/')) !== -1) {
$("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 + "'></dd>");
} else if (location.href.indexOf('/profile/' + uid) !== -1) {
$('dl.user_info:nth-of-type(1)').append("<dt>" + sysName + ":</dt><dd name='badge-" + uid + "'></dd>");
}

$("dl.user_info dd[name=badge-" + uid + "]").prepend("<a href='#' onmousedown=\"badgePopup('" + name + "','" + desc + "','" + image + "','" + date + "')\"><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","0/0/00");
addBadge(3793724,"Test","Testing","http://z5.ifrm.com/30294/18/0/f5260827/Nav.png","0/0/00");
addBadge(3793724,"Test","Testing","http://z5.ifrm.com/30294/18/0/f5260827/Nav.png","0/0/00");
addBadge(3793724,"Test","Testing","http://z5.ifrm.com/30294/18/0/f5260827/Nav.png","0/0/00");
addBadge(3793724,"Test","Testing","http://z5.ifrm.com/30294/18/0/f5260827/Nav.png","0/0/00");
addBadge(3793724,"Test","Testing","http://z5.ifrm.com/30294/18/0/f5260827/Nav.png","0/0/00");
addBadge(3793724,"Test","Testing","http://z5.ifrm.com/30294/18/0/f5260827/Nav.png","0/0/00");
addBadge(3793724,"Test","Testing","http://z5.ifrm.com/30294/18/0/f5260827/Nav.png","0/0/00");
addBadge(3793724,"Test","Testing","http://z5.ifrm.com/30294/18/0/f5260827/Nav.png","0/0/00");
addBadge(3793724,"Test","Testing","http://z5.ifrm.com/30294/18/0/f5260827/Nav.png","0/0/00");
addBadge(3793724,"Test","Testing","http://z5.ifrm.com/30294/18/0/f5260827/Nav.png","0/0/00");
addBadge(3793724,"Test","Testing","http://z5.ifrm.com/30294/18/0/f5260827/Nav.png","0/0/00");
addBadge(3793724,"Test","Testing","http://z5.ifrm.com/30294/18/0/f5260827/Nav.png","0/0/00");
addBadge(3793724,"Test","Testing","http://z5.ifrm.com/30294/18/0/f5260827/Nav.png","0/0/00");
addBadge(3793724,"Test","Testing","http://z5.ifrm.com/30294/18/0/f5260827/Nav.png","0/0/00");
addBadge(3793724,"Test","Testing","http://z5.ifrm.com/30294/18/0/f5260827/Nav.png","0/0/00");
addBadge(3793724,"Test","Testing","http://z5.ifrm.com/30294/18/0/f5260827/Nav.png","0/0/00");
addBadge(3793724,"Test","Testing","http://z5.ifrm.com/30294/18/0/f5260827/Nav.png","0/0/00");
addBadge(3793724,"Test","Testing","http://z5.ifrm.com/30294/18/0/f5260827/Nav.png","0/0/00");
addBadge(3793724,"Test","Testing","http://z5.ifrm.com/30294/18/0/f5260827/Nav.png","0/0/00");
</script>
Offline Profile Quote Post Goto Top
 
DaPizzaMan
Member Avatar
#TeamSupport

My mistake, I removed a check that Ferby made. Once again, replace the content of the first <script> tag:
Code:
 
function addBadge(uid, name, desc, image, date) {
var sysName = "Badges";
if ($('dl.user_info:nth-of-type(1) dd[name="badge-' + uid + '"]').length === 0) {
if ((location.href.indexOf('/topic/') || location.href.indexOf('/single/')) !== -1) {
$("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 + "'></dd>");
} else if (location.href.indexOf('/profile/' + uid) !== -1) {
$('dl.user_info:nth-of-type(1)').append("<dt>" + sysName + ":</dt><dd name='badge-" + uid + "'></dd>");
}
}
$("dl.user_info dd[name=badge-" + uid + "]").prepend("<a href='#' onmousedown=\"badgePopup('" + name + "','" + desc + "','" + image + "','" + date + "')\"><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();
}


And why exactly do you have the same award being given to the same user so many times? :glare:
Offline Profile Quote Post Goto Top
 
Kankuro
Member Avatar
かんくろ
[ *  *  *  *  * ]
DaPizzaMan
Mar 7 2014, 06:24 PM
My mistake, I removed a check that Ferby made. Once again, replace the content of the first <script> tag:
Code:
 
function addBadge(uid, name, desc, image, date) {
var sysName = "Badges";
if ($('dl.user_info:nth-of-type(1) dd[name="badge-' + uid + '"]').length === 0) {
if ((location.href.indexOf('/topic/') || location.href.indexOf('/single/')) !== -1) {
$("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 + "'></dd>");
} else if (location.href.indexOf('/profile/' + uid) !== -1) {
$('dl.user_info:nth-of-type(1)').append("<dt>" + sysName + ":</dt><dd name='badge-" + uid + "'></dd>");
}
}
$("dl.user_info dd[name=badge-" + uid + "]").prepend("<a href='#' onmousedown=\"badgePopup('" + name + "','" + desc + "','" + image + "','" + date + "')\"><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();
}


And why exactly do you have the same award being given to the same user so many times? :glare:
To test the scroll feature.

Also is the var maxheight = "40px"; not needed?[/i]
It doesn't produce a scroll box Posted Image
Edited by Kankuro, Mar 7 2014, 06:28 PM.
Offline Profile Quote Post Goto Top
 
DaPizzaMan
Member Avatar
#TeamSupport

kankuro865
Mar 7 2014, 06:26 PM
Also is the var maxheight = "40px"; not needed?[/i]
It doesn't produce a scroll box Posted Image
Yes, do add that in. I took the code from the opening post rather than the post later on. Do you have a Mac?
Offline Profile Quote Post Goto Top
 
Kankuro
Member Avatar
かんくろ
[ *  *  *  *  * ]
DaPizzaMan
Mar 7 2014, 06:29 PM
kankuro865
Mar 7 2014, 06:26 PM
Also is the var maxheight = "40px"; not needed?[/i]
It doesn't produce a scroll box Posted Image
Yes, do add that in. I took the code from the opening post rather than the post later on. Do you have a Mac?
Nope, PC.

And I added it but still no scroll box. Had the same result as the above screenshot.
Offline Profile Quote Post Goto Top
 
DaPizzaMan
Member Avatar
#TeamSupport

Code:
 
function addBadge(uid, name, desc, image, date) {
var sysName = "Badges",
maxHeight = "40px";
if ($('dl.user_info:nth-of-type(1) dd[name="badge-' + uid + '"]').length === 0) {
if ((location.href.indexOf('/topic/') || location.href.indexOf('/single/')) !== -1) {
$("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 + "; overflow:auto;'></dd>");
} else if (location.href.indexOf('/profile/' + uid) !== -1) {
$('dl.user_info:nth-of-type(1)').append("<dt>" + sysName + ":</dt><dd name='badge-" + uid + "' style='max-height:" + maxHeight + "; overflow:auto;'></dd>");
}
}
$("dl.user_info dd[name=badge-" + uid + "]").prepend("<a href='#' onmousedown=\"badgePopup('" + name + "','" + desc + "','" + image + "','" + date + "')\"><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();
}
There you go.
Edited by DaPizzaMan, Mar 8 2014, 04:13 PM.
Offline Profile Quote Post Goto Top
 
Kankuro
Member Avatar
かんくろ
[ *  *  *  *  * ]
DaPizzaMan
Mar 8 2014, 04:10 PM
Code:
 
function addBadge(uid, name, desc, image, date) {
var sysName = "Badges",
maxHeight = "40px";
if ($('dl.user_info:nth-of-type(1) dd[name="badge-' + uid + '"]').length === 0) {
if ((location.href.indexOf('/topic/') || location.href.indexOf('/single/')) !== -1) {
$("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 + "; overflow:auto;'></dd>");
} else if (location.href.indexOf('/profile/' + uid) !== -1) {
$('dl.user_info:nth-of-type(1)').append("<dt>" + sysName + ":</dt><dd name='badge-" + uid + "' style='max-height:" + maxHeight + "; overflow:auto;'></dd>");
}
}
$("dl.user_info dd[name=badge-" + uid + "]").prepend("<a href='#' onmousedown=\"badgePopup('" + name + "','" + desc + "','" + image + "','" + date + "')\"><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();
}
There you go.
This is exactly how I wanted it :D
Thank you so much <3


1 final question though, would it be possible to add css to style the scroll bar? I can easily make icons for it, just need to know if it's possible to style it or not. (Shoutbox scroll bar too)
Offline Profile Quote Post Goto Top
 
DaPizzaMan
Member Avatar
#TeamSupport

kankuro865
Mar 8 2014, 04:56 PM
1 final question though, would it be possible to add css to style the scroll bar? I can easily make icons for it, just need to know if it's possible to style it or not. (Shoutbox scroll bar too)
That's a bit off topic. PM me.
Offline Profile Quote Post Goto Top
 
Kankuro
Member Avatar
かんくろ
[ *  *  *  *  * ]
DaPizzaMan
Mar 8 2014, 04:57 PM
kankuro865
Mar 8 2014, 04:56 PM
1 final question though, would it be possible to add css to style the scroll bar? I can easily make icons for it, just need to know if it's possible to style it or not. (Shoutbox scroll bar too)
That's a bit off topic. PM me.
I should have tested it before I said it was complete.

The scroll box appears but now the name isn't displayed when you hover and the whole pop up feature isn't working at all.

If you wish to test it go here and go to any thread "Kankuro" posted in and I have an award there.

Code:
 

<script type="text/javascript">
function addBadge(uid, name, desc, image, date) {
var sysName = "Badges",
maxHeight = "40px";
if ($('dl.user_info:nth-of-type(1) dd[name="badge-' + uid + '"]').length === 0) {
if ((location.href.indexOf('/topic/') || location.href.indexOf('/single/')) !== -1) {
$("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 + "; overflow:auto;'></dd>");
} else if (location.href.indexOf('/profile/' + uid) !== -1) {
$('dl.user_info:nth-of-type(1)').append("<dt>" + sysName + ":</dt><dd name='badge-" + uid + "' style='max-height:" + maxHeight + "; overflow:auto;'></dd>");
}
}
$("dl.user_info dd[name=badge-" + uid + "]").prepend("<a href='#' onmousedown=\"badgePopup('" + name + "','" + desc + "','" + image + "','" + date + "')\"><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,"Award's Name Here","Description Goes Here","http://z5.ifrm.com/30294/18/0/f5260827/Nav.png","0/0/00");
</script>
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
  • 2
  • 4