Last active
January 4, 2016 20:19
-
-
Save shrink/8673013 to your computer and use it in GitHub Desktop.
A BBCode thing for IPB, take a list of comma separated values as the option and only show the content in those topics. For example "[showin=123,456]Hello![/showin]" would only show in topics of the ID 123 and 456.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<div class="showintopic"> | |
{content} | |
</div> | |
<script type="text/javascript"> | |
var showintopics = "{option}"; | |
var topic = String(ipb.topic.topic_id); | |
var topics = showintopics.split(","); | |
if (jQuery.inArray(topic, topics) != '-1') { | |
jQuery('script:last').prev('.showintopic').show(); | |
} | |
</script> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
.showintopic { | |
display: none; | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment