By J-K@www.drupalcenter.de on
I use the http://drupal.org/project/creativecommons_lite module, which allows to add a Creative Commons-license to nodes. These info is then stored in database table creativecommons_lite.
How can I use these informations – or a CCK-textfield I added to my image-node –
in Image Assist?
That CCK-field e.g. should displayed when inserting an image and then displayed in / under the image caption on the node, I added the image.
Where I have to modify the code of img_assist?
I hope, you have any suggestions - please post them. I'm not a professional module coder. THANKS!
J-K
Comments
Additional info: img_assist: use a CCK-field and display
Additional info:
The content of the cck-field e.g. shall not be dynamically loaded from database every time the node that contains the image is loaded.
The content of the cck-field e.g. shall be loaded from database when inserting the image and then stored as text in the node content field.
Thanks for your help!
J-K
Solution
Ok, I studied the code until I understand it.
In file img_assist.module the functions img_assist_properties_form() and theme_img_assist_inline() are needed. The first function builds the fields in Image-Assist-popup.
The second function handles the added fields.
Here is an example:
http://Die-Alternative-Zeitschrift.de/jk/drupal/img_assist.module.patch
Modification of img_assist_textarea.js that the correct Filter Tags are added: http://Die-Alternative-Zeitschrift.de/jk/drupal/img_assist.js.patch
Example for an Filter Tag:
[img_assist|nid=77|title=Mont-Pèlerin: 1080m über der Realität|desc=|link=node|autor=Nora Naggy|creativecommons=by-nc-nd|align=center|width=490|height=412]Preview in Image Assist-Popup:
http://Die-Alternative-Zeitschrift.de/jk/drupal/img_assist_textarea.js.p...
Here is a screenshot.
And the image in a node.
No more screenshots - the site is now online: see the image in a node.
J-K