Cathbad wrote:And it appears to work quite well. Extremely useful. Great job, GP
![Smile :)](./images/smilies/icon_smile.gif)
Yeah, David Peterson has also tried it out on his Kamakawi WotD blog yesterday. Nice to see it basically works
EDIT: just one thing: is there any way to add your own formatting inside the 'glossed' area? I want to be able to emphasize the relevant words in the sentences for my WOTD posts, but currently it just seems to bold everything no matter what I do.
TBH I haven't tried using HTML tags in the [gloss] block
(though it should work because /\<\/?(.*?)\>/ doesn't get filtered out), but if you do e.g. [gloss blah1 blah2 blah3] it'll apply the CSS classes .blah1…3 to lines 1-3. You need to define them, though, which is why I included the style.css file in the plugin folder, where you can do exactly that. The script automatically adds a "class=''" to every <dt> and <dd> element. Look into the code of the plugin if you want to see how it works, the mapping stuff happens towards the bottom of the cb_gloss.php file. If you need a CSS reference, look at
this reference by the Mozilla developers. If you want the layout to be permanently different, I'd suggest adding some definitions for
.cb-gloss dt and
.cb-gloss dd to styles.css. Otherwise your browser's default will be used.
EDIT: HTML tags somehow get filtered out
![Confused :?](./images/smilies/icon_confused.gif)
I'll try seeing to that.
EDIT: Ah yes, on line 57 it currently says
$content = strip_tags($content);. Shouldn't have done that. It was supposed to strip off superfluous
<br />s.