Welcome to Geeklog, Anonymous Friday, March 29 2024 @ 01:47 am EDT

Geeklog Forums

GL 2.0.x theme development

Page navigation


Status: offline

Laugh

Site Admin
Admin
Registered: 09/27/05
Posts: 1468
Location:Canada
Yeah I just tested it and saw the problems.

I like your overwrite idea...
One of the Geeklog Core Developers.
 Quote

Status: offline

Laugh

Site Admin
Admin
Registered: 09/27/05
Posts: 1468
Location:Canada
If we could set the editor file url in config then I'd just swap mysite.com/fckeditor/fckeditor.js with mine in theme/functions.php ie.
$_CONF['adv_editor_path'] = /layout/foley/js/ckeditor/ckeditor.js;
$_CONF['adv_editor_js'] = /layout/foley/js/adv-editor.js;


Looking over things I wonder if this is the easier way to go since with the other way you are never sure when things get set (ie contribute form, story, comment, staticpage). Setting the paths at the begining would solve this problem.

Here is for the most part the following javascript that gets set when the advance editor is used:

Text Formatted Code
        // Add JavaScript
        $_SCRIPTS->setJavaScriptFile('fckeditor','/fckeditor/fckeditor.js');
        $js = 'geeklogEditorBasePath = "' . $_CONF['site_url'] . '/fckeditor/";';
        // Hide the Advanced Editor as Javascript is required. If JS is enabled then the JS below will un-hide it
        $js .= 'document.getElementById("advanced_editor").style.display="";';                
        $_SCRIPTS->setJavaScript($js, true);
        $_SCRIPTS->setJavaScriptFile('submitstory_fckeditor', '/javascript/submitstory_fckeditor.js');      



The story editor also sets this which is just used for archive along with showhideEditorDiv:
Text Formatted Code
 $_SCRIPTS->setJavaScriptFile('advanced_editor', '/javascript/advanced_editor.js');



The question is what can we do to make it easy to allow for other editors. The path idea will work for the 2 js files (I am asuming we can combine advanced_editor and storyeditor_fckeditor together).

What should we do for the non file stuff (that is fckeditor related)? I guess we could add a config option for that as well...

Thoughts

Tom

One of the Geeklog Core Developers.
 Quote

Status: offline

suprsidr

Forum User
Full Member
Registered: 12/29/04
Posts: 555
Location:Champaign, Illinois
I just added:
Text Formatted Code

$_SCRIPTS->setJavaScriptFile('my_javascript', $_CONF['layout_url'].'/js/my_javascript.js');
 

just above:
Text Formatted Code

    // Retrieve any JavaScript libraries, variables and functions  
    $footercode = $_SCRIPTS->getFooter();
 

in functions.php theme_site_footer and my_javascript.js is not included anywhere in the page.

-s
FlashYourWeb and Your Gallery with the E2 XML Media Player for Gallery2 - http://www.flashyourweb.com
 Quote

Status: offline

Laugh

Site Admin
Admin
Registered: 09/27/05
Posts: 1468
Location:Canada
It should have set it unless the file doesn't exist or something (if it returns false then it did not set it).

Do you see any problems with the previous solution?

Tom
One of the Geeklog Core Developers.
 Quote

Status: offline

suprsidr

Forum User
Full Member
Registered: 12/29/04
Posts: 555
Location:Champaign, Illinois
Being able to set $_CONF options for adv editor path and the specific 4 editors (submitstory_fckeditor.js, submitcomment_fckeditor.js, storyeditor_fckeditor.js, staticpages_fckeditor.js)
would be fine. We could set them in the functions.php theme_init_themename

I just finished rewriting the 4 for ckeditor. Let me combine them into one. Then we can combine in advanced_editor.js as well.

-s
FlashYourWeb and Your Gallery with the E2 XML Media Player for Gallery2 - http://www.flashyourweb.com
 Quote

Status: offline

Laugh

Site Admin
Admin
Registered: 09/27/05
Posts: 1468
Location:Canada
suprsidr did you every finish this work with the ckeditor?
One of the Geeklog Core Developers.
 Quote

Status: offline

suprsidr

Forum User
Full Member
Registered: 12/29/04
Posts: 555
Location:Champaign, Illinois
Tom, I cannot remember what I had to do, but I can say that it is indeed fully enabled in that 2.0b site I was working on.
I'll give you full ftp access so you can look.

My latest position is in .net development(yuk!) and the last time I peeked at some of my php projects I felt like it was a long lost best friend. So I do have ambitions to finish that theme. But I remember there were many stumbling blocks you and I had exchanged on. I need to try 2.0 and see where I'm at.

-s
FlashYourWeb and Your Gallery with the E2 XML Media Player for Gallery2 - http://www.flashyourweb.com
 Quote

Page navigation

All times are EDT. The time is now 01:47 am.

  • 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