New Release v6 of BBCode Hack for even more BBCode features

Dragonfly issues as they relate to modules discussed here
Reply to topicReply to topic
Go to page  1, 2  Next 

  
29 Mar '13 Fri Mar 29, 2013 22:34    
layingback
Site Admin  
  •  

Post New Release v6 of BBCode Hack for even more BBCode features

If you have been following this thread for the past 11 months, you'll have seen slow progress. Well here's the result: an even more complete BBCode replacement pack for DF.

Here's a screen shot of the latest BBCode table. The screenshot is of reDesign3+ version, but the full functionality is still there for reDesign3 and for other themes. Both types of buttons are included in the pack. And a list of the functions now supported. Those with an asterisk are enabled via this hack.

  • Bold
  • Italic
  • Underline
  • Strike*
  • Spoiler with CSS unhide*
  • Title for custom sub headings*
  • Text left to right
  • Text right to left
  • URL link - with follow option for Admin only*
  • Email
  • PDF link with PDF icon*
  • Justify full
  • Justify left
  • Center
  • Justify right
  • Text colour
  • Image float left with resize and/or title/alt*
  • Image - with resize and/or title/alt options*
  • Image float right with resize and/or title/alt*
  • Youtube embed*
  • Vimeo embed*
  • Flash
  • Flv
  • Quote
  • Code
  • PHP
  • HR line
  • Marquee down
  • Marquee up
  • Marquee left
  • Marquee right
  • Font size
  • Search*
  • List*
  • Numbered list*
  • Lettered list*
  • Roman numeral list*
  • List symbol*
  • Table*
  • Table row*
  • Table heading*
  • Table cell*
  • Flags*

A complete up-to-date BBCode user help file with examples is included.

Get it here.

  • screenshot.png
  • screenshot.png
  • Latest BBCode table (reDesign3+ version)


layingback's server specs (Server OS / Apache / MySQL / PHP / DragonflyCMS)

2.6.32 / 1.3 - 2.4 / 5.5 - 5.6 / 5.4 - 5.5 / 9.4

 
 
 
 
  
29 Mar '13 Fri Mar 29, 2013 23:24    
rosbif
BetaTester  BetaTester
  •  

Post Re: New Release v6 of BBCode Hack for even more BBCode features

Brilliant, thank you! Will test it out this weekend (some of us have to work!)



rosbif's server specs (Server OS / Apache / MySQL / PHP / DragonflyCMS)

Linux/2.2.11/4.1.22/5.2.17/9.3.4.1

 
 
 
 
  
6 Apr '13 Sat Apr 06, 2013 17:26    
layingback
Site Admin  
  •  

Post Re: New Release v6 of BBCode Hack for even more BBCode features

Have been requested to provide support for ForumsPro. Well ... modifying my hack to support ForumsPro as it is in FPro v2 and later seems to be a long ride to nowhere! After 70+ edits to just the main bbcode file, with 3 more modules still to go, plus all the language files ... I just gave up. Too much chance of missing a single entry, plus it'll all have to be done again for the next release of my hack!

But ForumsPro v1 used nbbcode.php happily. (It switched to a unigue BBCode because of a GPL licensing misunderstanding - since resolved.) And the whole point of the nbbcode is to ensure uniformity across the site. So ... I investigated fixing ForumsPro to use nbbcode.php instead. It was a bit more work than I had hoped - as ForumsPro has a habit of using internal class routines externally - but it is finite, and the edits are nearly all deletes.

Using a suitable editor (notedpad2, notepad++ or, best IMHO, geany as it has multi-file global search built in) make the following changes listed below:

Code:
fpbbcode.php --> nbbcode.php
./modules/ForumsPro/posting.php:28:require_once(BASEDIR.'includes/fpbbcode.php');
./modules/ForumsPro/viewtopic.php:28:require_once(BASEDIR."includes/fpbbcode.php");
./modules/ForumsPro/viewpost_reports.php:31:require_once(BASEDIR.'includes/fpbbcode.php');
./modules/ForumsPro/report_post.php:30:require_once(BASEDIR.'includes/fpbbcode.php');
./modules/ForumsPro/admin/index.inc:17:	require_once(BASEDIR.'includes/fpbbcode.php');
./modules/ForumsPro/search.inc:37:		require_once(BASEDIR.'includes/fpbbcode.php');
./modules/ForumsPro/search.inc:82:		require_once(BASEDIR.'includes/fpbbcode.php');
./modules/ForumsPro/search.php:28:require_once(BASEDIR.'includes/fpbbcode.php');
./includes/ForumsPro/display_posts.php:209:	require_once(BASEDIR.'includes/fpbbcode.php');
./rss/forumspro.php:39:require_once(BASEDIR.'includes/fpbbcode.php');
Search completed with 10 matches.

forumspro_bbcode_table --> bbcode_table
./modules/ForumsPro/posting.php:668:	'S_BBCODE_TABLE' => bbcode_table('message', 'post', 1),
./modules/ForumsPro/viewtopic.php:150:		'S_QUICK_REPLY_BBCODE' => ($board_config['quick_reply_bbc'] ? bbcode_table('message', 'post', 1) : ''),
./modules/ForumsPro/viewpost_reports.php:83:		'BBCODE_TABLE' => ($board_config['allow_bbcode'] ? bbcode_table('comments', 'close_open', 1) : ''),
./modules/ForumsPro/report_post.php:99:	'BBCODE_TABLE' => ($board_config['allow_bbcode'] ? bbcode_table('comments', 'report_post', 1) : ''),
Search completed with 4 matches.

forumspro_smilies_table --> smilies_table
./modules/ForumsPro/posting.php:669:	'S_SMILIES_TABLE' => smilies_table('inline', 'message', 'post'),
Search completed with 1 match.

FproBBCode --> BBCode
./modules/ForumsPro/posting.php:451:				$user_sig = FproBBCode::encode_html($user_sig);
Search completed with 1 match.

forumspro_decode_bbcode --> decode_bbcode
./modules/ForumsPro/posting.php:455:			$user_sig = forumspro_decode_bbcode($user_sig, 1, false);
./modules/ForumsPro/posting.php:463:			$preview_message = forumspro_decode_bbcode($preview_message, 1, true);
./modules/ForumsPro/admin/index.inc:64:				'S_DESCRIPTION' => forumspro_decode_bbcode($item['desc']),
./includes/ForumsPro/functions_report.php:161:			'COMMENT' => ($board_config['allow_bbcode'] ? forumspro_decode_bbcode($report['comment'], 1, false) : $report['comment']),
./includes/ForumsPro/functions_report.php:278:			'COMMENT' => ($board_config['allow_bbcode'] ? forumspro_decode_bbcode($comments[$i]['comment'], 1, false) : $comments[$i]['comment']),
./includes/ForumsPro/display_posts.php:490:			$poster_signature = (($board_config['allow_bbcode'] && $post['enable_bbcode']) ? forumspro_decode_bbcode($poster_signature, 1, false) : nl2br($poster_signature));
./includes/ForumsPro/display_posts.php:503:		$post_message = (($board_config['allow_bbcode'] && $post['enable_bbcode']) ? forumspro_decode_bbcode($post_message, 1, false) : nl2br($post_message));
./includes/ForumsPro/display_search.php:637:						$post_message = forumspro_decode_bbcode($post_message, 1, false);
./rss/forumspro.php:94:  <description>'.htmlprepare(forumspro_decode_bbcode(forumspro_set_smilies($row['post_text']),1), false, ENT_QUOTES, true).'</description>
Search completed with 9 matches.

forumspro_make_clickable --> make_clickable
./modules/ForumsPro/posting.php:458:			$user_sig = forumspro_make_clickable($user_sig);
./modules/ForumsPro/posting.php:466:		$preview_message = forumspro_make_clickable($preview_message);
./includes/ForumsPro/display_posts.php:491:			$poster_signature = forumspro_make_clickable($poster_signature);
./includes/ForumsPro/display_posts.php:504:		$post_message = forumspro_make_clickable($post_message);
./includes/ForumsPro/display_search.php:640:					$post_message = forumspro_make_clickable($post_message);
Search completed with 5 matches.

forumspro_message_prepare --> message_prepare
./modules/ForumsPro/posting.php:461:		$preview_message = forumspro_message_prepare($message, $html_on, $bbcode_on);
./includes/ForumsPro/functions_post.php:75:		$message = Fix_Quotes(forumspro_message_prepare($message, $html_on, $bbcode_on));
Search completed with 2 matches.

forumspro_set_smilies --> set_smilies
./modules/ForumsPro/posting.php:470:				$user_sig = forumspro_set_smilies($user_sig);
./modules/ForumsPro/posting.php:472:			$preview_message = forumspro_set_smilies($preview_message);
./includes/ForumsPro/display_posts.php:493:				forumspro_set_smilies($poster_signature);
./includes/ForumsPro/display_posts.php:506:			$post_message = forumspro_set_smilies($post_message);
./includes/ForumsPro/display_search.php:706:					$post_message = forumspro_set_smilies($post_message);
./rss/forumspro.php:94:  <description>'.htmlprepare(decode_bbcode(forumspro_set_smilies($row['post_text']),1), false, ENT_QUOTES, true).'</description>
Search completed with 6 matches.


To explain the format:
fpbbcode.php --> nbbcode.php
./modules/ForumsPro/posting.php:28:require_once(BASEDIR.'includes/fpbbcode.php');
means:
Change each listed occurrence of fpbbcode.php to nbbcode.php, the first of which is in modules/ForumsPro/posting.php at line 28 and should contain the line: require_once(BASEDIR.'includes/fpbbcode.php')

It looks a lot of work, but it's very straightforward and you only need to do it once.

Please make a backup copy of these files before you start!



layingback's server specs (Server OS / Apache / MySQL / PHP / DragonflyCMS)

2.6.32 / 1.3 - 2.4 / 5.5 - 5.6 / 5.4 - 5.5 / 9.4

 
 
 
 
  
7 Apr '13 Sun Apr 07, 2013 15:43    
Gamekeeper
Sponsor  Sponsor
  •  

Post Re: New Release v6 of BBCode Hack for even more BBCode featu

Thank you! I now have your new BBCode buttons and videos in my forums. Much appreciated.



Gamekeeper's server specs (Server OS / Apache / MySQL / PHP / DragonflyCMS)

Linux, Apache 2.0, SQL 5.0.86, PHP 5.2.11,DF 9.2.

 
 
 
 
  
7 Apr '13 Sun Apr 07, 2013 15:55    
layingback
Site Admin  
  •  

Post Re: New Release v6 of BBCode Hack for even more BBCode features

You're most welcome. And thanks for the donation. (The latter will also give you access to Pro_News priority support, and Series 3 improved templates, Social Network link for Forums - which ought to work fine with ForumPro - plus numerous new tricks and features.)

Would appreciate it if you could also post an acknowledgement on the DF thread that this method works - for the benefit of others.

Thanks again!

PS. Fellow user of Lunarpages I see Wink



layingback's server specs (Server OS / Apache / MySQL / PHP / DragonflyCMS)

2.6.32 / 1.3 - 2.4 / 5.5 - 5.6 / 5.4 - 5.5 / 9.4

 
 
 
 
  
7 Apr '13 Sun Apr 07, 2013 16:50    
Gamekeeper
Sponsor  Sponsor
  •  

Post Re: New Release v6 of BBCode Hack for even more BBCode features

Yes,been with Lunarpages for many years, from basic - VPS to dedicated great value and good support.

I'll have a look at updating ProNews and have a browse around here, it's good to see DF receiving such great support



Gamekeeper's server specs (Server OS / Apache / MySQL / PHP / DragonflyCMS)

Linux, Apache 2.0, SQL 5.0.86, PHP 5.2.11,DF 9.2.

 
 
 
 
  
7 Apr '13 Sun Apr 07, 2013 18:35    
Gamekeeper
Sponsor  Sponsor
  •  

Post Re: New Release v6 of BBCode Hack for even more BBCode features

I've been looking at image resizing, would it be possible to resize by percentage (75%,50%) or only require width with height being automatically calculated to maintain aspect ratio in a future version?



Gamekeeper's server specs (Server OS / Apache / MySQL / PHP / DragonflyCMS)

Linux, Apache 2.0, SQL 5.0.86, PHP 5.2.11,DF 9.2.

 
 
 
 
  
7 Apr '13 Sun Apr 07, 2013 18:50    
layingback
Site Admin  
  •  

Post Re: New Release v6 of BBCode Hack for even more BBCode features

Never thought about percentages, as I rarely use them myself. ( With reDesign theme I tend to do everything in pixel by pixel precision Wink ) But you can maintain the aspect ratio, just use something like width=auto height=100. Image on right was displayed with:

Code:
[imgr w=50 h=auto]http://layingback.net/images/logo.png[/imgr]


Check out the BBCode Help link if you haven't already. It's fully updated with all the new commands.



layingback's server specs (Server OS / Apache / MySQL / PHP / DragonflyCMS)

2.6.32 / 1.3 - 2.4 / 5.5 - 5.6 / 5.4 - 5.5 / 9.4

 
 
 
 
  
8 Apr '13 Mon Apr 08, 2013 22:32    
layingback
Site Admin  
  •  

Post Re: New Release v6 of BBCode Hack for even more BBCode features

BTW, it look as if you can just omit either the height or the width parameter entirely - the one of the left has just h=150, the one on the right has just width=150 specified.



layingback's server specs (Server OS / Apache / MySQL / PHP / DragonflyCMS)

2.6.32 / 1.3 - 2.4 / 5.5 - 5.6 / 5.4 - 5.5 / 9.4

 
 
 
 
  
12 Apr '13 Fri Apr 12, 2013 00:57    
Gamekeeper
Sponsor  Sponsor
  •  

Post Re: New Release v6 of BBCode Hack for even more BBCode featu

I've found a small problem with linked images, the DF logo below should link to DF but only displays the logo on new page.



Code:
[url=http://www.dragonflyCMS.org/][img]http://www.dragonflyCMS.org/images/logo.png[/img][/url]



Gamekeeper's server specs (Server OS / Apache / MySQL / PHP / DragonflyCMS)

Linux, Apache 2.0, SQL 5.0.86, PHP 5.2.11,DF 9.2.

 
 
 
 
  
12 Apr '13 Fri Apr 12, 2013 03:19    
layingback
Site Admin  
  •  

Post Re: New Release v6 of BBCode Hack for even more BBCode features

Not surprised Sad Was resolving another bug this morning (that only affects my new version of reDesign3+) and thought that linked image might not be working. Suspect it's due to my tweak to img to display the jpg/png/gif directly in browser via click through.

Will need to see if there is a way to make both work ... May be a few days before I can get to it though.

Thanks for the report.



layingback's server specs (Server OS / Apache / MySQL / PHP / DragonflyCMS)

2.6.32 / 1.3 - 2.4 / 5.5 - 5.6 / 5.4 - 5.5 / 9.4

 
 
 
 
  
13 Apr '13 Sat Apr 13, 2013 17:39    
layingback
Site Admin  
  •  

Post Re: New Release v6 of BBCode Hack for even more BBCode features

Sorry, misread your post. (I thought initially that you meant imgurl command failed.)

Yes, linking an img will fail for the reason stated.

Please use the imgurl command/button supplied as this will work correctly (and will not attempt to display teh jpg within the browser's own image display function).

Here's the same thing as a imgurl:

Code:
[imgurl=http://www.dragonflyCMS.org/]http://www.dragonflyCMS.org/images/logo.png[/imgurl]





layingback's server specs (Server OS / Apache / MySQL / PHP / DragonflyCMS)

2.6.32 / 1.3 - 2.4 / 5.5 - 5.6 / 5.4 - 5.5 / 9.4

 
 
 
 
  
13 Apr '13 Sat Apr 13, 2013 17:54    
rosbif
BetaTester  BetaTester
  •  

Post Re: New Release v6 of BBCode Hack for even more BBCode features

Then we just need imgurll and imgurlr! Wink



rosbif's server specs (Server OS / Apache / MySQL / PHP / DragonflyCMS)

Linux/2.2.11/4.1.22/5.2.17/9.3.4.1

 
 
 
 
  
13 Apr '13 Sat Apr 13, 2013 17:59    
layingback
Site Admin  
  •  

Post Re: New Release v6 of BBCode Hack for even more BBCode features

BTW, if you don't care for this behaviour, and want your original:

Code:
[url=http://www.dragonflyCMS.org/][img]http://www.dragonflyCMS.org/images/logo.png[/img][/url]


command to work as before, simply look for the comments around lines 650 of includes/nbbcode.php and switch to the alternate version of img (and iml and imgr - 3 edits in all).

Then click-to-display on img will only be enabled if the resize parameters (w,= h= or both) have been used. As the sample that you posted didn't use resize, then click will take you to DF.org.



layingback's server specs (Server OS / Apache / MySQL / PHP / DragonflyCMS)

2.6.32 / 1.3 - 2.4 / 5.5 - 5.6 / 5.4 - 5.5 / 9.4

 
 
 
 
  
13 Apr '13 Sat Apr 13, 2013 18:04    
layingback
Site Admin  
  •  

Post Re: New Release v6 of BBCode Hack for even more BBCode features

- rosbif

Then we just need imgurll and imgurlr! Wink

Not sure about that! Wink

I don't know if I should set the default to be as it is, or as it was ... For an image centric site (like my PENTAXdslr.eu) it makes sense the way I released it. But maybe not for the general case?

I should probably also add a selector near the top of the module to switch all 3.

And separately, the next version will move the imgurl button up with the url and pdfurl on the 1st line. So I can put the half breaks back in place between image - video - code and marquee buttons.



layingback's server specs (Server OS / Apache / MySQL / PHP / DragonflyCMS)

2.6.32 / 1.3 - 2.4 / 5.5 - 5.6 / 5.4 - 5.5 / 9.4

 
 
 
 
Link  QR 
Share this Printer Friendly Page  facebook   google+   linkedin   twitthis  
Show more ...
Go to page  1, 2  Next


Go to page  2  Next