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:
Locked Topic
[ C ] Hide image or button from specific forum?
Topic Started: Dec 2 2013, 09:34 PM (327 Views)
JayPetey
Member Avatar
Member
[ * ]
Board Address: http://http://forums.port-haven.com/
Board Software: ZetaBoards
Description:

So we have a "Like" button system coded into the boards. What we're trying to do is remove that option from one specific board. For clarity, we don't want to be able to "like" comments on one board, but let it totally work on the rest of the forums.

I don't know if it's possible to make it so that code doesn't work on one board. From my research, it would seem not.

But is it possible to hide/remove/disable the actual "Like Button" image from a board? That'd work enough, wouldn't it, if it's possible? Just not having the button show up?

For added clarity, this is the "like button" code we use:

Like Button Code
Offline Profile Goto Top
 
Ferby
Member Avatar
Developer
[ *  *  *  *  * ]
JayPetey
Dec 2 2013, 09:34 PM
I don't know if it's possible to make it so that code doesn't work on one board. From my research, it would seem not.
In fact you're completely the opposite side of the corridor - It's extremely simple. But some coders have restrictions on their creations. IE: They don't like people editing them or sharing them. I personally don't have any restrictions on any of my codes. So for that reason, I'll post the edited version below.

Post this code below the like code. I've tested this and it works but if you find any issues then feel free to PM me.
Code:
 
<script type="text/javascript">
function removeLikeButton(fid) {
if($("div.foot_center a[href="+main_url+"forum/"+fid+"/]")) {
$("img[alt='Like This Post']").parent().remove();
}
}
removeLikeButton(FORUM_ID);
</script>


To use it, repeat this line with the forum ID of which you want no Like buttons.
Code:
 
removeLikeButton(FORUM_ID);


The forum ID is the numbers at the end of the URL when viewing a forum. Such as...
Code:
 
http://forum.ferby.tk/forum/54615454/


Replace FORUM_ID with those digits and you'll be set.
Offline Profile Goto Top
 
JayPetey
Member Avatar
Member
[ * ]
Thanks so much for helping.

Unfortunately for me it seems that this code simply removes the like button all together, regardless of forum ID...

Any thoughts?
Offline Profile Goto Top
 
Ferby
Member Avatar
Developer
[ *  *  *  *  * ]
Okay I think this might help but I'm a little clueless on the issue. Please PM me if it doesn't work.
Code:
 
<script type="text/javascript">
function removeLikeButton(fid) {
if($("div.foot_center a[href="+main_url+"forum/"+fid+"/]").length()) {
$("img[alt='Like This Post']").parent().remove();
}
}
removeLikeButton(FORUM_ID);
</script>
You know how to edit/use it.
Offline Profile Goto Top
 
Moonface
Member Avatar


Completed!

Your request has been completed. If you have any questions or concerns regarding the state of your request, please feel free to contact me via PM.
Offline Profile Goto Top
 
1 user reading this topic (1 Guest and 0 Anonymous)
« Previous Topic · Closed Requests · Next Topic »
Locked Topic