Support ⇒ Explain Please ⇒ Change default editor style for News module ⇒ Community Forums ⇒ CPG Dragonfly™ CMS
Forum IndexExplain Please

Change default editor style for News module Reply to topic


Sorry, I thought this would be an eays fix/hack but I just can't see how to do it (although it's probably staring me in the face...)

The default option in the "Editor style" dropdown list for our News module is "none", with the other option being "BBcode". I need to swap those around (if possible) so that BBcode is the default, any hints?

Cheers!

Note: WWW Private Listing - Staff Only

Server specs (Server OS / Apache / MySQL / PHP / DragonflyCMS):
linux/Apache 2.4.27/MySQL 10.1.26-MariaDB/PHP 5.2.17/Dragonfly 9.2.1


Try by opening includes/wysiwyg/wysiwyg.inc and around line 70 change
function getEditors() { $editors = array('' => 'none'); $editors['bbcode'] = 'BBCode';
to
function getEditors() { $editors = array('bbcode' => 'BBCode'); $editors[''] = 'none';

.:: I met php the 03 December 2003 :: Unforgettable day! ::.

Server specs (Server OS / Apache / MySQL / PHP / DragonflyCMS):
CloudLinux / Apache 2.4 LSAPI / MySQLi 5.6 / PHP 5.6 / DCVS


Thanks Nano - that does indeed swap the order of the two items around in the drop down box but doesn't appear to impact 'none' still being used as the default option when the page is loaded. Is there anything else I can tweak so that the page loads with the BBCode editor active? Thanks in advance Smile

Note: WWW Private Listing - Staff Only

Server specs (Server OS / Apache / MySQL / PHP / DragonflyCMS):
linux/Apache 2.4.27/MySQL 10.1.26-MariaDB/PHP 5.2.17/Dragonfly 9.2.1


Change line 32 to
$type = isset($_SESSION['WYSIWYG']) ? $_SESSION['WYSIWYG'] : 'bbcode';

.:: I met php the 03 December 2003 :: Unforgettable day! ::.

Server specs (Server OS / Apache / MySQL / PHP / DragonflyCMS):
CloudLinux / Apache 2.4 LSAPI / MySQLi 5.6 / PHP 5.6 / DCVS


Brilliant, I believe that's done it, thanks very much Nano!

Note: WWW Private Listing - Staff Only

Server specs (Server OS / Apache / MySQL / PHP / DragonflyCMS):
linux/Apache 2.4.27/MySQL 10.1.26-MariaDB/PHP 5.2.17/Dragonfly 9.2.1

All times are UTC


Jump to: