Fast Uncompromising Discussions. FUDforum will get your users talking.

Home » FUDforum Development » FUDforum 3.0+ » Enhanced code blocks (FUDforum 3 new feature of the day)
Show: Today's Messages :: Unread Messages :: Show Polls :: Message Navigator
| Subscribe to topic | Bookmark topic 
Switch to threaded view of this topic Create a new topic Submit Reply
Enhanced code blocks [message #161003] Tue, 10 November 2009 01:42 Go to next message
naudefj is currently offline  naudefj   South Africa
Messages: 3687
Registered: December 2004
Karma: 19
Senior Member
Core Developer
add to buddy list
ignore all messages by this user
Starting with FUDforum 3.0.0, code blocks are rendered with Select all and Show/ hide controls. These controls are injected with JavaScript. As a result, users with JavaScript disabled will not see them.

Here is an example:

// Initialize plugin
plugin_add_hook('BBCODE2HTML', 'plugin_wikilinks_tag_to_html');
plugin_add_hook('HTML2BBCODE', 'plugin_wikilinks_html_to_tag');

* Click "Select all" and Control-C to quickly copy the code into the buffer, ready to be pasted wherever you need it.

* Hit "Show/ hide" to hide massive code hunks or bring them back into focus.
icon6.gif  Re: Enhanced code blocks [message #161008 is a reply to message #161003] Tue, 10 November 2009 03:57 Go to previous message
The Witcher is currently offline  The Witcher   United States
Messages: 662
Registered: May 2009
Location: USA
Karma: 2
Senior Member
add to buddy list
ignore all messages by this user
Did not know about the Control-C option to copy so thanks.

Show/Hide though is one of the newer features I really like and I am hoping there are plans to upgrade it and the spoiler so they can be "Closed up" from the bottom.

Being able to reduce the screen footprint of codes and some longer posts is a blessing but it can be distracting to expand a page or two of code or text, and read through it only to have to scroll back up to the top to close it again.

There is probably a way to do that with FUDforum already I'm just not fully aware of it if there is.

"I'm a Witcher, I solve human problems; not always using a sword!"
Quick Reply
Formatting Tools:   
  Switch to threaded view of this topic Create a new topic
Previous Topic: Enhanced quoting
Next Topic: Quick Reply Editor
Goto Forum:

-=] Back to Top [=-
[ Syndicate this forum (XML) ] [ RSS ]

Current Time: Sat Dec 15 20:39:58 EST 2018

Total time taken to generate the page: 0.00635 seconds