Community Forums › Forums › Archived Forums › Design Tips and Tricks › bbPress2 BBCode & Content Limiting
Tagged: content limiting
- This topic has 8 replies, 2 voices, and was last updated 11 years, 1 month ago by SoZo.
-
AuthorPosts
-
January 31, 2013 at 4:25 pm #16842alex2k5Participant
http://wordpress.org/extend/plugins/bbpress-bbcode/
I am using this plugin. Necessary because we get a lot of content from vbulletin formatted submissions. It allows us to post bbcode, shortcode like formatting in posts, and display as HTML.
Whenever I use a Genesis widget with content limiting, not only is the formatting stripped, but the text/info inside the tag is gone as well.
Example:
The [URL="http://www.facebook.com/"]Company Facebook Page[/URL] has been updated with the next piece of information.
Winds up looking like this when the content limiting is in effect:
The has been updated with the next piece of information.
We use the more tag, not excerpts, so I'd like to continue using the limiting functionality of the widgets if possible.
Any suggestions?
January 31, 2013 at 4:45 pm #16856SoZoMemberIf you're using the more tag then you can set the widget to the full content. Setting a content limit or excerpt strips out all HTML.
John “Nicolas Flamel” Wright | SoZo’s design| John Wright Photography
January 31, 2013 at 6:40 pm #16909alex2k5ParticipantIn a default situation, does it strip out the text between opening and closing HTML tags as well? Or just the HTML within brackets?
For many of the blocked layouts, using the more tag won't work. They only work well when every block is roughly the same dimensions. Our text content, even with the more tag, is different per post. That's why I wanted to use the limiter. I don't prefer, but can live with HTML being stripped. However, the inner text of the HTML tags need to show up or else the teaser text is unusable.
I am in the process of migrating to WordPress from another CMS system, so I have a lot of pre-existing content not created with these features in mind. Trying to make it work within the Genesis framework as much as I can.
Thanks for the reply.
January 31, 2013 at 6:56 pm #16913SoZoMemberit should just be removing the HTML tags only, nothing between them. Maybe it's what your using for the shortcode.
John “Nicolas Flamel” Wright | SoZo’s design| John Wright Photography
January 31, 2013 at 7:22 pm #16922alex2k5ParticipantAhh, so it's the plugin then. Is there a way using hooks to tell genesis or the genesis plugin to process the html using that bbcode plugin before running it's sanitizing process?
January 31, 2013 at 7:31 pm #16927SoZoMemberYou could try this and use a content limit
add_filter('get_the_content_limit_allowedtags', 'child_allowtags'); function child_allowtags() { return '<script>,<style>,<b>,<br>,<em>'; //add the tags you want here }
Or I found this for the excerpt
John “Nicolas Flamel” Wright | SoZo’s design| John Wright Photography
January 31, 2013 at 8:48 pm #16955alex2k5ParticipantI did find and try that option you posted earlier, adding [B] and [URL] and variants to the ones there, but it did not work.
I will look at the options in your link now.
Thanks a lot, appreciate the quick responses.
February 1, 2013 at 11:27 am #17103alex2k5ParticipantFigured it out. The excerpt, and even that custom code you linked to, strips out shortcode before processing. In that custom code you linked to, commenting out
//$text = strip_shortcodes( $text );
Gets the desired result. I may run into issues later if I start using shortcode early on in the post content, but for now, seems to do the trick.
Thanks for the help!
February 1, 2013 at 11:44 am #17107SoZoMember -
AuthorPosts
- The topic ‘bbPress2 BBCode & Content Limiting’ is closed to new replies.