which lets you change any textarea field to a WYSIWYG editor field by adding a few bits of code to the page.
I'm trying to mod the Add Field page to include an extra Input type of WYSIWYG, which will then include the necessary code to the Add Events page to bring up the htmlarea field.However, it's a bit more tricky than I thought, so I wondered if anyone has any pointers to which file(s) I should be looking in - I guess its somewhere in the admin templates, or should I be looking in calendar_admin itself?
Ben.
Unfortunately I have discovered that the WYSIWYG bit chokes on underscores in a TEXTAREA name - and the format in calendarscript is FIELD_<fieldname>.
Hmm, well when I've figured out a way round it I'll post back with the modified files so everyone can have funky field editing in their calendars!
------------------
First of all you should download V1.05 from: http://www.interactivetools.com/products/htmlarea/
and install in the document root of your site (if you put it somewhere else you'll have to make a couple of mods to the scripts in my zip file).
Then download the three modified Calendarscript files from: http://www.willcoxonline.com/cs-htmlarea/cs-htmlarea.zip
and copy these into your calendarscript directory, overwriting the existing ones(after backing them up of course!) I have preserved the directory structure in the zip so you know where they go.
And thats it! In the Customise Event Fields screen the Input Type box now has WYSIWYG as an option. If you set a field with this option and go to the Add/Modify Event page you will get a graphical HTML editor so you can bold, underline, justify etc etc. Note: it will only work with IE 5.5 and above (see the htmlarea docs). Oh, and make sure you've allowed HTML in in the Admin/Calendar Settings screen.
Have fun,
One of my prospective customers is managing about 25 bands right now. He'd like to be able to not only update a calendar, but also add/delete pages, change page content (text+images, maybe link to soundfiles later on). And all that w/o knowing or wanting to know html. He also can't afford to have all updating and editing done by me, so he's looking for a sollution that would allow him to do just that, log in, and change/add/delete pages and their content.
Would this be the right program? Or their page publisher?
Anybody got any other ideas/links? Anything pointing me in a good direction is very appreciated!
Thanks!Oliver
Invalid input type: 'wysiwyg'!
Any thoughts?
thanksryan
Ben, great work! I'll definitely be patching a few calendars this evening.
Kriis, is it doing anything, giving an error message at all, or just acting like nothing ever happened?
Ryan, I'll look into the search issues when I install it tonight if ben hasn't figured it out by then.
------------------David Whittaker http://www.uabcm.com http://bama.ua.edu/~whitt013
Go to the modified DBFileUtil.inc used for the 'wysiwyg' display and change one line towards the end of it. In the sub GetSearchFieldInput find the line following # Define input field based on typewhich is:
if (($type =~ /^text(?!area)/) | | ($type =~ /^password/) | | ($type =~ /^textarea/)) {
and change it to:
code:if (($type =~ /^text(?!area)/) | | ($type =~ /^password/) | | ($type =~ /^textarea/) | | ($type =~ /^wysiwyg/)) {
if (($type =~ /^text(?!area)/) | | ($type =~ /^password/) | | ($type =~ /^textarea/) | | ($type =~ /^wysiwyg/)) {
See if that makes any difference. Be sure to make a backup of the original!
Dan O.
BTW. This forum adds spaces between the | | which will have to be removed before pasting into the script file.
[This message has been edited by DanO (edited January 19, 2003).]
but has anyone figured out how to add the:
margin-top: 0; margin-bottom: 0
properties to the textarea to prevent the enter key doublespacing between lines? I tried putting in the javscript on the page itself, and also in the editor.js.
I can change colors, and fonts, etc..., but i cant change that. Any thoughts?
[This message has been edited by beneath_the_ashes (edited January 20, 2003).]
Can anyone confirm that the mod works with the latest version of HTMLArea? I have only tested it myself with version 1.5.
Thanks,Ben
I am not getting any errors, the WYSYWIG editor just isn't showing up in the description box and for the life of my I can't figure out why!
I will greatly appreciate any help you offer.
What browser are you using? Any popup ad killer software running? Do you have JavaScript turned on in the browser you're using?
/htmlarea http://206.159.167.123/htmlarea/example.html proves that it does function...
I installed the three modified files into the proper locations within Calendarscript.
When I go to add event, no html shows up... Wait a minute, I bet I have html turned 'off'.
I'll be right back....
Still no dice. I switched 'allow html' to 'on' and tried to 'add event'. The page took 10 times longer to load, but it finally did. However, no WYSWYG options...
What shall I try?
Thanks
Dave
properties to the textarea to prevent doublespacing between lines when you hit enter? I tried putting in the javscript on the page itself, and also in the editor.js.
I can change colors, and fonts, etc..., but i cant change that.
If you don't set that, it won't do anything!
Ben