Plugin dev Q's: requirements, new hook_event
Posted: Tue Jun 21, 2005 6:27 pm
Greetings,
I am working on a spellchecker plugin, but need to resolve a couple issues before it will be ready for release.
1. Is there any way to do more advanced PHP requirements. PSPELL is required for the spell checker functions. My only idea at this point is to put a test on the spellcheck configuration screen that will tell you if you don't meet the reqs.
2. I need to add some javascript events to the textareas on the backend_entry screen. Would this be a reasonable way of going about it?
functions_entries.inc.php
3. Unrelated, but I notice that I have a lot of records in my suppress table that never made it into my referrers table. [edit: Nevermind, I found mention of the way s9y suppresses referrer spam by requiring 2 hits to count.]
I am working on a spellchecker plugin, but need to resolve a couple issues before it will be ready for release.
1. Is there any way to do more advanced PHP requirements. PSPELL is required for the spell checker functions. My only idea at this point is to put a test on the spellcheck configuration screen that will tell you if you don't meet the reqs.
2. I need to add some javascript events to the textareas on the backend_entry screen. Would this be a reasonable way of going about it?
functions_entries.inc.php
Code: Select all
From:
<textarea style="width: 100%" name="serendipity[body]" id="serendipity[body]" cols="80" rows="20"><?php echo isset($entry['body']) ? htmlspecialchars($entry['body']) : ''; ?></textarea>
To:
<?php
$textareaBody = '<textarea style="width: 100%" name="serendipity[body]" id="serendipity[body]" cols="80" rows="20">'.
(isset($entry['body']) ? htmlspecialchars($entry['body']) : '').'</textarea>';
serendipity_plugin_api::hook_event('backend_entry_textarea_body', $textareaBody);
echo $textareaBody;
?>