Graeme S. Posted May 15, 2009 Share Posted May 15, 2009 Would it be possible to get BBCodes parsed in comments? Basically I want people to be able to have emoticons in profile comments. :) Link to comment Share on other sites More sharing options...
Mark Posted May 15, 2009 Share Posted May 15, 2009 It's deliberately not done. The idea of profile comments was to be as simple as possible so as to not detract users from the actual forums. Link to comment Share on other sites More sharing options...
Graeme S. Posted May 15, 2009 Author Share Posted May 15, 2009 So we can't get them to parse emoticons only? Cheers for the response. Link to comment Share on other sites More sharing options...
Management Matt Posted May 15, 2009 Management Share Posted May 15, 2009 You could with a modification (hook, etc). Link to comment Share on other sites More sharing options...
realmaverickuk Posted April 26, 2010 Share Posted April 26, 2010 It's deliberately not done. The idea of profile comments was to be as simple as possible so as to not detract users from the actual forums. How would allowing smilies in the guestbook, detract from the forums? That answer really doesn't make any sense at all. You're basically saying, users will now use the forum more, because they can't post smilies in the guestbook. Urghhh OK. I think the answer is more likely due to the fact that while searching for inspiration for the comments system, you decided Facebook was the site to model but rather than just taking their best bits, you copied it almost exactly. Bad move IMO. Link to comment Share on other sites More sharing options...
Mark Posted April 26, 2010 Share Posted April 26, 2010 Well, while I didn't work here when the feature was added, the suggestion we got was probably "you should add profile comments, like Facebook!" so probably yes ;) It's a really simple change though, leave it with me and I'll post some instructions later :) Link to comment Share on other sites More sharing options...
Mark Posted April 26, 2010 Share Posted April 26, 2010 admin/applications/members/sources/classes/comments.php Find: $comment = IPSText::truncate( $comment, 400 ); $comment = preg_replace( "#(\r\n|\r|\n|<br />|<br>){1,}#s", "\n", $comment ); $comment = trim( IPSText::getTextClass('bbcode')->stripBadWords( $comment ) ); Replace with: IPSText::getTextClass('bbcode')->parse_html = 0; IPSText::getTextClass('bbcode')->parse_nl2br = 1; IPSText::getTextClass('bbcode')->parse_smilies = 1; IPSText::getTextClass('bbcode')->parse_bbcode = 1; $comment = IPSText::getTextClass('bbcode')->preDbParse( IPSText::truncate( $comment, 400 ) ); Find: $comments[] = $row; Add above: IPSText::getTextClass('bbcode')->parse_html = 0; IPSText::getTextClass('bbcode')->parse_nl2br = 1; IPSText::getTextClass('bbcode')->parse_bbcode = 1; IPSText::getTextClass('bbcode')->parse_smilies = 1; IPSText::getTextClass( 'bbcode' )->parsing_mgroup = $row['member_group_id']; IPSText::getTextClass( 'bbcode' )->parsing_mgroup_others = $row['mgroup_others']; $row['comment'] = IPSText::getTextClass('bbcode')->preDisplayParse( $row['comment'] ); Link to comment Share on other sites More sharing options...
Jaggi Posted April 26, 2010 Share Posted April 26, 2010 :o thats secret ipb code!!! /me puts a blanked over the post. Link to comment Share on other sites More sharing options...
bfarber Posted April 26, 2010 Share Posted April 26, 2010 Facebook wasn't quite as big and popular as it is now when that feature was added. I don't think Facebook provided any real inspiration for the profile comments feature. We simply wanted a "light weight" parser there instead of full-on parsing of every tag. In fact, at first, no parsing was done, but people requested we add at least b/i/u support, so we did. Link to comment Share on other sites More sharing options...
realmaverickuk Posted April 29, 2010 Share Posted April 29, 2010 admin/applications/members/sources/classes/comments.php Find: $comment = IPSText::truncate( $comment, 400 ); $comment = preg_replace( "#(\r\n|\r|\n|<br />|<br>){1,}#s", "\n", $comment ); $comment = trim( IPSText::getTextClass('bbcode')->stripBadWords( $comment ) ); Replace with: IPSText::getTextClass('bbcode')->parse_html = 0; IPSText::getTextClass('bbcode')->parse_nl2br = 1; IPSText::getTextClass('bbcode')->parse_smilies = 1; IPSText::getTextClass('bbcode')->parse_bbcode = 1; $comment = IPSText::getTextClass('bbcode')->preDbParse( IPSText::truncate( $comment, 400 ) ); Find: $comments[] = $row; Add above: IPSText::getTextClass('bbcode')->parse_html = 0; IPSText::getTextClass('bbcode')->parse_nl2br = 1; IPSText::getTextClass('bbcode')->parse_bbcode = 1; IPSText::getTextClass('bbcode')->parse_smilies = 1; IPSText::getTextClass( 'bbcode' )->parsing_mgroup = $row['member_group_id']; IPSText::getTextClass( 'bbcode' )->parsing_mgroup_others = $row['mgroup_others']; $row['comment'] = IPSText::getTextClass('bbcode')->preDisplayParse( $row['comment'] ); Thanks for this. I had already modded my IPB to do this - I was just pushing for a setting, so we don't have to modify the IPB source code in the future :P Link to comment Share on other sites More sharing options...
InvisionNutCase Posted April 29, 2010 Share Posted April 29, 2010 correct me wrong but isnt the correct path: admin/applications/members/sources/comments.php (er minus the classes) i asked mark why i coudln't find it in admin/applications/members/sources/classes/comments.php, ergo the new path...:thumbsup: Link to comment Share on other sites More sharing options...
realmaverickuk Posted May 5, 2010 Share Posted May 5, 2010 admin/applications/members/sources/classes/comments.php Find: $comment = IPSText::truncate( $comment, 400 ); $comment = preg_replace( "#(\r\n|\r|\n|<br />|<br>){1,}#s", "\n", $comment ); $comment = trim( IPSText::getTextClass('bbcode')->stripBadWords( $comment ) ); Replace with: IPSText::getTextClass('bbcode')->parse_html = 0; IPSText::getTextClass('bbcode')->parse_nl2br = 1; IPSText::getTextClass('bbcode')->parse_smilies = 1; IPSText::getTextClass('bbcode')->parse_bbcode = 1; $comment = IPSText::getTextClass('bbcode')->preDbParse( IPSText::truncate( $comment, 400 ) ); Find: $comments[] = $row; Add above: IPSText::getTextClass('bbcode')->parse_html = 0; IPSText::getTextClass('bbcode')->parse_nl2br = 1; IPSText::getTextClass('bbcode')->parse_bbcode = 1; IPSText::getTextClass('bbcode')->parse_smilies = 1; IPSText::getTextClass( 'bbcode' )->parsing_mgroup = $row['member_group_id']; IPSText::getTextClass( 'bbcode' )->parsing_mgroup_others = $row['mgroup_others']; $row['comment'] = IPSText::getTextClass('bbcode')->preDisplayParse( $row['comment'] ); I'm currently using this code, however BBCode parsing doesn't work (urls, images, etc). Even though parse_bbcode is set to 1, it has no effect. I double checked the DB and its definitely not getting parsed. it simply shows up as text, like: [/img] [img] and doesn't parse it at all. Turning off parse_smilies, however, stops smilies from parsing, as it should. I just can't get it to parse BBCode. Any suggestions? Link to comment Share on other sites More sharing options...
realmaverickuk Posted May 7, 2010 Share Posted May 7, 2010 Bump ^^ Link to comment Share on other sites More sharing options...
realmaverickuk Posted May 10, 2010 Share Posted May 10, 2010 Still not managed to figure this out. Opened a ticket to support and apparently they can't assist because it's a none standard feature. Members are complaining daily, as it was a massively used feature. Link to comment Share on other sites More sharing options...
Mark Posted May 10, 2010 Share Posted May 10, 2010 Sorry I missed this :) There is an error in the second edit I posted, it should be: IPSText::getTextClass('bbcode')->parse_html = 0; IPSText::getTextClass('bbcode')->parse_nl2br = 1; IPSText::getTextClass('bbcode')->parse_bbcode = 1; IPSText::getTextClass('bbcode')->parse_smilies = 1; IPSText::getTextClass( 'bbcode' )->parsing_mgroup = $row['member_group_id']; IPSText::getTextClass( 'bbcode' )->parsing_mgroup_others = $row['mgroup_others']; $row['comment_content'] = IPSText::getTextClass('bbcode')->preDisplayParse( $row['comment_content'] ); Link to comment Share on other sites More sharing options...
realmaverickuk Posted May 10, 2010 Share Posted May 10, 2010 Hi Mark, That worked perfectly. You've just made a lot of people very happy, including me, as I'll not have to deal with nagging members anymore :D Thanks very much, Paul Link to comment Share on other sites More sharing options...
Guest CallieJo Posted May 19, 2010 Share Posted May 19, 2010 Thanks for this. Not parsing images and smilies in the profile comments was a big dent in our move from vb. Especially when it left a mess of bbcode in the comments from the import. Now all is great thanks to the help in this thread. Thanks! Link to comment Share on other sites More sharing options...
Claudia999 Posted August 28, 2010 Share Posted August 28, 2010 It doesn't work for me. Is there a new code for 3.1.2? Link to comment Share on other sites More sharing options...
Jυra Posted August 29, 2010 Share Posted August 29, 2010 Some forums are pretty wild and likely would want an option for this. I would not use it myself and I understand why it is the way it is. Link to comment Share on other sites More sharing options...
TCWT Posted August 29, 2010 Share Posted August 29, 2010 A number of members asked for this. I don't think it will detract from the actual forums. If anything, the PM system already plays that role. :P Thanks Mark! Link to comment Share on other sites More sharing options...
Arun Kumar Posted August 30, 2010 Share Posted August 30, 2010 Would it be possible to make a similar modification to show emoticon images in Recent Status Updates bar? Link to comment Share on other sites More sharing options...
glorify Posted August 30, 2010 Share Posted August 30, 2010 THANK YOU! Link to comment Share on other sites More sharing options...
Claudia999 Posted November 24, 2010 Share Posted November 24, 2010 My users are so so so happy with their colored profiles ;) :blink: Now they asked about the possibility to delete their comments in other profiles. Is this technically feasible? Link to comment Share on other sites More sharing options...
TCWT Posted November 23, 2012 Share Posted November 23, 2012 Does this work with 3.3.4? Link to comment Share on other sites More sharing options...
Recommended Posts
Archived
This topic is now archived and is closed to further replies.