FUDforum
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 :: Polls :: Message Navigator
Switch to threaded view of this topic Create a new topic Submit Reply
Enhanced code blocks [message #161003] Tue, 10 November 2009 06:42 Go to next message
naudefj is currently offline  naudefj   South Africa
Messages: 3771
Registered: December 2004
Karma: 28
Senior Member
Administrator
Core Developer
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 08:57 Go to previous message
The Witcher is currently offline  The Witcher   United States
Messages: 675
Registered: May 2009
Location: USA
Karma: 3
Senior Member
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!"
  Switch to threaded view of this topic Create a new topic Submit Reply
Previous Topic: Enhanced quoting
Next Topic: Quick Reply Editor
Goto Forum:
  

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

Current Time: Sun Dec 01 09:06:09 GMT 2024

Total time taken to generate the page: 0.01997 seconds