@dunlix (and others)
Thanks, the disable plugins suggestion worked. Apparently it was the "sanitize html" plugging that was causing the problem.
Not even sure why we had that still installed.
Thanks all for the troubleshooting help!
We could add this in to the widgets... possibly
@julian that would be awesome!
Maybe this can help someone:
You can also use jquery:
This would go into the HTML widget:
<span class="offtopic_forbidden">Off-topic is strictly forbidden.</span>
<script>
if (ajaxify.currentPage != 'category/14/staff-recruitment') {
$('.offtopic_forbidden').hide()
}
</script>
And this would be the container:
<div class="alert ui-draggable-handle alert-danger offtopic_forbidden">{{body}}</div>
Adjust 'category/14/staff-recruitment' to your needs.
$('.offtopic_forbidden')
is a jquery selector, it selects the DOM element with the class .offtopic_forbidden
The function .hide() hides it.
Additional info:
You can use another type of container, but be sure to add the class to it.
You can also rename offtopic_forbidden
to your needs.
@julian have you added this feature on the ACP widgets page?
We want each category to have its own dedicated widget, we will put a short description on top of each widget to explain what each category is about. Please let me know its very imp for us.
@Ryozuki if they provide this in CORE it will be nice to have, as custom JS is usually not suitable for showing large content areas.
@faizanzahid This has been available for some time now.
@julian Thanks man, good catch. i was just ignorant
@baris is it possible to add a widget that is topic specific?
I want certain announcements to show up in each page of a topic (either at the top of the page or at the bottom). It is not category or sub-category specific announcement, rather it is topic specific...
would it be possible to implement such widget? (If it is, I can make a github issue)
(edit: Currently, I add topic related announcements as post to the topic... However, if topic has 30-40 pages, it is just disappearing after certain time, I am trying to solve this problem)
Widgets don't have support for restricting to a single topic in the ACP but you can achieve it by some css magic and using the body classes, here is one way to do it so the widget only shows up in a specific topic id.
@baris thanks , I will try this...