Search Results for 'code'
-
Search Results
-
Topic: Custom BBCodes?
Hello, after importing from a phpBB forum where I had custom BBCodes I have the problem that they are not changed in actual html.
I would like to know how can I implement such custom bbcodes in my bbpress installation.I did some tries making a custom plugin with something like this inside (this is just an example):
function bb_table_replace( $text ) { $text = preg_replace('/\[tabella\](.*?)\[\/tabella\]/ie', "<table>$1</table>", $text); return $text; } add_filter('bbp_get_reply_content', 'bb_table_replace');But I had no luck. It seems however to find my regexp pattern but its replace is wrong, it’s made after the matched pattern (adding to it, instead of replacing).
Any help?
Hi,
In posts, my theme only has page-navigation at the bottom.
I added it also at the top of posts, no problemThe issue is that now there is also a (sort of) page-navigation at the top of every page in the bbpress plugin part, which I don’t want of course.
How do I exclude the added code from showing on the bbpress pages (the whole plugin pages for that matter)
Thanks, Ron
WP: 3.7.1
bbPress: 2.5Nevermind, solved it:
SOLVED:
Had to put it inbetween:<?php if ( is_singular('post') ) : ?> <?php endif; ?>Topic: CSS bug?
Re: http://powershell.org/wp/forums/users/dlwyatt/replies/
You’ll notice that the container for the page content is getting a 0px width and massive height calculated. The CSS style #bbp-forums has an “overflow: hidden;” style. Removing that style element fixes the display – but I’d like some confirmation that this is indeed a bug? The content in this specific case has a lot of PRE/CODE styling, so I’m not sure if there’s some weird interaction going on that I just can’t figure out.
The container in question is a ul#topic-0-replies, classed with .forums and .bbp-replies. The overflow attribute I’m referring to is coming right from the top of bbpress.css.
Note that I’m using the default styling/theming for BBP.
Topic: tags allowed in bbpress
I use a plugin to display pictures in lightbox (plugin name litebox).
I have modified bbpress post tool bar, to include the class tag to the url.
I also find the way to allow class tag for images and link in bbpress but i have to modify core files : \bbpress\includes\common\formatting.phpi already googled a way to override this function in my theme function.php
and what i did is :
function my_filter_bbpress_allowed_tags() { return array( // Links 'a' => array( 'class' => true, 'href' => array(), 'title' => array(), 'rel' => array() ), // Quotes 'blockquote' => array( 'cite' => array() ), // Code 'code' => array(), 'pre' => array(), // Formatting 'em' => array(), 'strong' => array(), 'del' => array( 'datetime' => true, ), // Lists 'ul' => array(), 'ol' => array( 'start' => true, ), 'li' => array(), // Images 'img' => array( 'class' => true, 'src' => true, 'border' => true, 'alt' => true, 'height' => true, 'width' => true, ) ); } add_filter( 'bbp_kses_allowed_tags', 'my_filter_bbpress_allowed_tags' );But today i updated to bbpress 2.5 and i saw that it didin’t work :/
What is the correct function to allow this without hacking the bbpress core ?
Could you in the future add a class tag allowed for link and images ?