Hi! I was mucking about with the module, trying to get it to not show on any node's of type 'acidfree' and quickly realised that I would have to change the module code itself to do it (if it was gona be anything but the ugliest of ugly hacks).
Toying around I found that some of acidfree's theme_ functions get a $node argument, that contains a 'type' set to, you guessed it, 'acidfree'. In my sudden spout of glee I set about to pass a similar $node argument to tinymce's theme_tinymce_theme function. And then I could realy easily turn off tinymce from the theme by simply checking the 'type' in the $node.
Unfortunatly, I have no clue how to do this. Get and pass the $node, I mean. Checking if the 'type' is 'acidfree' I can handle. So pretty please, with sugar on top, could some kind hearted samaritan pass a $node to theme_tinymce_theme? Or just a $node['type'] that works too! :)
Comments
Comment #1
m3avrck commentedHi, unfort there is no easy way to do this since TinyMCE hooks onto the form elements, it doesn't look at the node.
However, a way to fix this is to use the Visibility settings, and select PHP and use something to this effect:
Comment #2
eliza411 commentedI tried this and it worked . . . tinymce didn't appear on pages of a particular type and id appear on all others , but then on node/add/page and admin pages with textareas, I started getting the following errors:
* warning: Invalid argument supplied for foreach() in /var/wallace/modules/node.module on line 359.
* warning: implode() [function.implode]: Bad arguments. in /var/wallace/modules/node.module on line 363.
* user warning: You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near '' at line 1 query: node_load SELECT n.nid, n.vid, n.type, n.status, n.created, n.changed, n.comment, n.promote, n.moderate, n.sticky, r.timestamp AS revision_timestamp, r.title, r.body, r.teaser, r.log, r.format, u.uid, u.name, u.picture, u.data FROM node n INNER JOIN users u ON u.uid = n.uid INNER JOIN node_revisions r ON r.vid = n.vid WHERE in /var/wallace/includes/database.mysql.inc on line 121.
* warning: Invalid argument supplied for foreach() in /var/wallace/modules/node.module on line 359.
* warning: implode() [function.implode]: Bad arguments. in /var/wallace/modules/node.module on line 363.
* user warning: You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near '' at line 1 query: node_load SELECT n.nid, n.vid, n.type, n.status, n.created, n.changed, n.comment, n.promote, n.moderate, n.sticky, r.timestamp AS revision_timestamp, r.title, r.body, r.teaser, r.log, r.format, u.uid, u.name, u.picture, u.data FROM node n INNER JOIN users u ON u.uid = n.uid INNER JOIN node_revisions r ON r.vid = n.vid WHERE in /var/wallace/includes/database.mysql.inc on line 121.
* warning: Invalid argument supplied for foreach() in /var/wallace/modules/node.module on line 359.
* warning: implode() [function.implode]: Bad arguments. in /var/wallace/modules/node.module on line 363.
* user warning: You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near '' at line 1 query: node_load SELECT n.nid, n.vid, n.type, n.status, n.created, n.changed, n.comment, n.promote, n.moderate, n.sticky, r.timestamp AS revision_timestamp, r.title, r.body, r.teaser, r.log, r.format, u.uid, u.name, u.picture, u.data FROM node n INNER JOIN users u ON u.uid = n.uid INNER JOIN node_revisions r ON r.vid = n.vid WHERE in /var/wallace/includes/database.mysql.inc on line 121.
Any suggestions on what I've done wrong would be greatly appreciated.
Here's the code I pasted in:
Comment #3
mupsi