Hi,
I am building an install profile based on Features and Strongarm. In the feature I would like to incorporate the path to the library, this is not possible via strongarm (which reads the variables table).
The path should become 'profiles/
/libraries/ckeditor/'. Right now I achieved this by copying and modifying ckeditor_admin_profile_form_submit() (after modifying the $settins array) and place it in my feature.install:
$settings = ckeditor_admin_values_to_settings($edit);
db_insert('ckeditor_settings')
->fields(array(
"name" => $edit['name'],
"settings" => $settings
))
->execute();
Could anyone comment on this solution? Is it ok, is there a better way?
The best solution would be if CKEditor became Strongarm compatible, but I guess that will take a while.
Thanks in advance
Comments
Comment #1
dczepierga commentedIf u want to change ckeditor path u should update in database "ckeditor_settings" table where name is "CKEditor Global Profile" and set your new ckeditor path to "ckeditor_path" in array (see ckeditor.install file - lines 134-140).
This is information which u except? Because i don't understand exactly what u need :)
In CKEditor module in version 7.x-2.x all settings will be moved to Drupal variable table. I work on it now, so it should be released in DEV version asap.
Greetings
Comment #2
avdp commentedThank you, that's the info I need, a lot easier!
The thing is that I want to change the path programmatically to 'profiles/profilename/libraries/ckeditor' instead of the standard 'sites/all/modules/ckeditor'.
When I do not change it, than the module can't find the library.
Now I can make my feature with
in the feature.install and it works automatically.
Comment #3
dczepierga commentedI'm really happy that i could help u.
Greetings
Comment #5
tenken commentedHi --
I too am making an Install Profile with D7 that is using this module. I'm not sure where you are setting ckeditor_path() to, but I use Drush Make to add it to my install profile so the module path becomes the following from the drupal root:
/profiles/YOURPROFILENAME/modules/ckeditor
Similarly I can tell Drush Make to install the ckeditor source to:
/profiles/YOURPROFILENAME/libraries/ckeditor
But, your requirements() check assumes that this module will install in sites/all/modules .... breaking being able to use this module upon simple install.
See this blog post for some clarification:
http://engineeredweb.com/blog/10/5/3-tips-using-external-libraries-drupal
I used the above example fix in a db_update() within my install profiles hook_install() to fix it ..... but I feel this module should be "looking everywhere it could" to test if ckeditor module is installed, not in some hard-coded location.
Comment #6
dczepierga commented@tenken, pls not reopen old issue but create new issue with your problem...
It is impossible to look everywhere for CKEditor plugin - other modules give u only one location to download and load any plugins. Autodetec is only on 2 base locations - module and libraries, if u want to have it in other place u can customize it - we cannnot do more with it.
Greetings
Comment #7
IRuslan commentedHi,
@tenken to achieve your goal you could use Libraries module.
That approach used in Drupal Commons distribution (Libraries included into distribution).