Welcome to Geeklog, Anonymous Friday, July 19 2024 @ 08:59 pm EDT

Geeklog Forums

Safari FCKeditor work around?


Status: offline

deek

Forum User
Junior
Registered: 06/03/05
Posts: 34
Is there a way that I can keep the advanced editor enabled and make it so that users using Safari use either a different editor or the normal posting method since FCKeditor does not work with Safari yet?
 Quote

kyngchaos

Anonymous
Here's what I came up with.

First, you need a browser detector. I didn't find any builtin GL functions for this, so I used one I've used in the past: go to App Creator and download the Visitor Sniffer. It's a little old, but it gets Safari just fine. Put sniffer.php into the GL system/classes folder, that makes it easy for GL to find.

Now, edit system/lib-custom.php and add this at the end, before the final "?>" line:

Text Formatted Code
/* Browser sniffer to disable advanced editor for Safari */

require_once( $_CONF['path_system'] . 'classes/sniffer.php' );
$theBrowser = new sniffer();

if( isset( $_CONF['advanced_editor'] ) && ( $_CONF['advanced_editor'] == 1 )
        && ($theBrowser->browser == "Safari"))
    { $_CONF['advanced_editor'] = false; }



 


This could be expanded, and maybe added to the GL distro. There would be a config option that goes along with enabling the advanced editor to set a list of browsers to disable the advanced editor in. Even when it works for Safari in the future, updates could cause problems for Safari, or any other browser, and this would be a quick config change to temporarily disable it in those browsers until it works again.
 Quote

All times are EDT. The time is now 08:59 pm.

  • Normal Topic
  • Sticky Topic
  • Locked Topic
  • New Post
  • Sticky Topic W/ New Post
  • Locked Topic W/ New Post
  •  View Anonymous Posts
  •  Able to post
  •  Filtered HTML Allowed
  •  Censored Content