CCK module + custom emoticon field
scarer - December 3, 2008 - 04:33
Hi,
I'm looking for a way to an emoticon field to a blog post in Drupal 6.
Please help!
Hi,
I'm looking for a way to an emoticon field to a blog post in Drupal 6.
Please help!
Using Views and CCK?
I am assuming your using views and you mentioned cck, so this is how I would go about it(may not be the best).
I would first create a Content Type: Emoticon, have three simple fields: Title, ImageField, and Plain-Text. This would allow you to add as many emoticons as you want.
Then create view that displays all emoticons, i would name it something like EmoteCity. I would include in it the Title, ImageField, and Plain-Text fields. Be sure to add filter for type and published also. Then go in and build a template file, should be named something like views-EmoteCity.tpl.php or similar forgive me for the name convention violations.
The next step would be to make a javascript function that when clicked would paste the image into the current cursor position. Once your script is complete, jot down the page location for this. Then build a template file for the blog post page(devel module helps with this a lot) and add a iFrame set to the location of that node. I think there is also a way to reference just the node inside of another node(panes maybe could be the way I am thinking).
This would basically accomplished what you have described. I just did a basic overview, but let me know if you need additional help.
Even better!
http://drupal.org/project/smileys
smileys is still not working so well for drupal 6
:(
i still can't seem to get it working like i want it to
i can't seem to get the smilies appearing in the option list for selecting a mood or in the actual node display. i tried using a custom content type and creating a view and then used node reference as a field for the blog and selected a view i created that only displays the icons. i also tried creating custom php code to return an array of values for the select options. i also tried typing in :), :( etc for the options for the field with the smilies module installed.
none of these solutions worked. i am now looking at either writing a custom module that allows this type of drop-down or using the rules module to display the options - don't know whether this is possible yet though...
if anyone has any ideas please let me know.