laga
Forum Replies Created
-
Use a plugin to clone the instances: https://www.ads-software.com/plugins/oomph-clone-widgets/
edit: except this doesn’t work very well.
Other plugins can apparently create live clones, but I never tested that.
Forum: Plugins
In reply to: [bbPress New Topics] "New" does not go away after viewThe fix should not depend on the browser. Try logging out and clearing cache and cookies, something might be stuck.
Forum: Plugins
In reply to: [bbPress New Topics] "New" does not go away after viewHey,
I might have figured this out. The problem (obviously) is that the ‘new’ topic flag does not get cleared when you actually visit a new topic. I believe this happens because the ‘clear new topic’ function is hooked up to the wrong action.
In bbpress-new-topics.php, I added the following code after line 51:
add_action( 'bbp_template_before_single_topic', array( $this, 'bbp_theme_before_topic_title' ) );
Full diff:
diff -Nur bbpress-new-topics-old/bbpress-new-topics.php bbpress-new-topics/bbpress-new-topics.php --- bbpress-new-topics-old/bbpress-new-topics.php 2014-04-09 10:52:05.254186487 +0200 +++ bbpress-new-topics/bbpress-new-topics.php 2014-04-09 10:51:24.464813058 +0200 @@ -49,6 +49,11 @@ add_filter( 'bbp_get_topic_class', array( $this, 'bbp_get_topic_class' ), 10, 2 ); add_action( 'bbp_theme_before_topic_title', array( $this, 'bbp_theme_before_topic_title' ) ); + /* bbp_theme_before_topic_title does not fire on topic view (anymore?) + But we need it to fire so we can set the topic to seen and clear + the new flag + */ + add_action( 'bbp_template_before_single_topic', array( $this, 'bbp_theme_before_topic_title' ) ); } public function admin_init() {
Thanks for the heads-up. I suggest you disclose the exploit – it took me five minutes to find it and I’m not the smartest guy around.
It’s so obvious, it actually hurt.
I’ve cooked up the following patch to send the form content as plaintext. Be warned, though, that it might not work for all configurations as I’ve not fixed all occurences of the HTML-only content. Search for “$body” in the source and patch accordingly.