CodeExtinguisher 2.0 Release Candidate 14.2 |
[eluser]hyeteck[/eluser]
I saw a couple posts about people having issues with the editor not working so here is what i did to get mine to work. 1. Download the TinyMCE main package from http://tinymce.moxiecode.com/download.php. Unzip the contents into 'codex/assets/js'. The full directory to the TinyMCE javascript would be 'codex/assets/js/tiny_mce/tiny_mce.js'; 2. put the following code in your 'editor.php' plugin file located in the 'codex/application/plugins' folder. Code: <?php if (!defined('BASEPATH')) exit('No direct script access allowed'); the only reason i concatenated the open and close brackets for the javascript tags was because it was automatically being removed when i made the post. 3. Now just setup your yaml file and put it in the 'codex/application/definitions' folder. You can use any of the params available to TinyMCE in your yaml file. The available params can be found here: http://wiki.moxiecode.com/index.php/Tiny...figuration Below is an example of my yaml file. Code: form_setup:
[eluser]webberoo[/eluser]
[quote author="dbelanger" date="1218187188"]Hi Paul, Thanks for your input here. I've updated the editor plugin with the new code and tried the code you pasted but still can't get things going. I get a few errors: Code: A PHP Error was encountered and also a: Code: An Error Was Encountered The cause of this maybe in the way you have formatted your yaml file. Can you do a print_r() of your yaml file and post it here. That way we can see if all the right options are being passed into the correct array formats.
[eluser]Majd Taby[/eluser]
if you use tabs in your yaml file , try changing them to spaces ( a couple of spaces instead of a tab)
[eluser]dbelanger[/eluser]
Hi guys, Thanks so much for your continued help on this, honestly I'm feeling pretty dumb it's been an issue for me. My YAML file has this code in it and I've made sure there's no tabs and only spaces: Code: form_setup: Now the only error I'm getting is the plugin not found error and I think that's because my path is somehow not set right. In the editor.php file I have: Code: $CI->codextemplates->js('js-tinymce', base_url() . 'codex/assets/js/tiny_mce/tiny_mce.js'); Which tells me it can't find the file. My tinymce is in codex/assets/js/tiny_mce/ but I haven't seen anywhere to set the base_url and I'm wondering if that's it. Thanks again everybody, you guys rock.
[eluser]webberoo[/eluser]
dbelanger, I had the same problem as well. Heres the code I ended up using. Code: $CI = &get;_instance(); Insert this at the start of your getHTML() function in editor.php. Another thing I noticed is that the plugin wasn't inserting the tinyMCE config options in the head of the document. So I have passed the params[] array to the inlineJS() function. like this: Code: $tinyMce = ""; At the moment I'm am working on getting the extra options to show up. Once this is polished off I'll post it in the wiki hang in there buddy.
[eluser]webberoo[/eluser]
Here is my revised editor plugin. +adds a link to tinyMCE within the assets folder +adds tinyMCE config options in between the html tags +allows for custom tinyMCE options to be set using yaml files Code: <?php if (!defined('BASEPATH')) exit('No direct script access allowed'); Will add to the wiki as well
[eluser]Unknown[/eluser]
I need to upload files to an FTP site after or before adding or editing a record What is the best way to add my own functions to the postInsertHook call i am not sure if i should extend the codexevents.php file or add a new entry to the hooks.php file eg. Code: $hook['postInsertHook'] = array( I am editing the codexevents.php file, but it dosn't seem like the best way to do it Sorry for the dumb question, i am still new to CI.
[eluser]Majd Taby[/eluser]
have you thought about writing a plugin instead?
[eluser]Rob Stefanussen[/eluser]
CodeExtinguisher looks great, thanks for the hard work put into it. I was just skimming through this 30 page thread, it looks like a lot of code revisions have been discussed. The latest version seems to be the one on the first post. Also, SVN doesn't seem to really have any updates either. Is there any version that has some of these code revisions rolled in?
[eluser]dbelanger[/eluser]
webberoo, Thank you so much for the work you've put in here, looks good. Will try the new plugin later tonight. Cheers! |
Welcome Guest, Not a member yet? Register Sign In |