[Pmwiki-users] Documenting conversations/messages (was: wikistyles and blocks

chr@home.se chr
Wed Nov 3 16:54:23 CST 2004


On Wed, 3 Nov 2004, Jonathan Scott Duff wrote:

> On Wed, Nov 03, 2004 at 11:32:24PM +0100, chr at home.se wrote:
> > But I'm sure there are better solutions. Any ideas?
> 
> Here's an idea.  A customization in config.php like so:

Before I forget. 

> 
> function CreateActors($str) {
>    global $BlockMarkups,$HTMLStylesFmt;
>    $colors = array("red","blue","purple");
>    $actors = preg_split('/[\s,]+/', $str, -1, PREG_SPLIT_NO_EMPTY);
>    $BlockMarkups["actor_NULL"] = array('</div>','',"<div>");
>    $i = 0;
>    foreach ($actors as $a) {
        $HTMLStylesFmt[] = ".actor_$a { color:$colors[$i]; padding-left:4em; }\n";

I used this modified line to add indentation:              ^^^^^^^^^^^^^

It might be interesting with an extension where multiple '=' increases the 
indentation or something, so

	=fred
	Hi, how are you doing?
	=other
	I'm fine, up?
	==fred
	Oh, it's better now
	==other
	really?

would render with different indentations. That wouldn't be so interesting
for a real conversation, but might be useful for a discussion that splits
up into several topics:

	Fred: Has anyone seen Bush?
	Other: No, have you seen Kerry?
	   Fred: Yeah, he was here a while ago.
	   Other: What's he doing now?
	   Fred: Sulking?
	Fred: There's Bush... what's he doing?
	Other: You don't want to know...

Ok, that example sucks... but at least there was an indentation...

/Christian

PS. Btw, congratulations for selecting a president without having to 
go to court this time ;-)

-- 
Christian Ridderstr?m, +46-8-768 39 44               http://www.md.kth.se/~chr




More information about the pmwiki-users mailing list