[pmwiki-users] Multiline variable Markup based on $AuthId

Helge Larsen hal at post4.tele.dk
Sat Oct 29 18:55:09 CDT 2005


Hello

I'm trying to build a projectlist for use in my SideBar. 

The list is multiple lines formed as a bulletlist of links to other
wikifields. The list should be based on$AuthId variable.

Here is a simplified example of what I have so far (farmconfig.php):

	global $hallist;
	$hallist = "";
	$authid = $Author;
	$hallist = 'Projectlist for '.$authid.':\n';
	for($i=1 ; $i <= 10 ; $i++)
	{
		$row = mysql_fetch_array($result);
		$hallist .= sprintf('* Project %d \n',$i);
	}
	Markup('{$HalList}', '>{$fmt}', '/\\{\\$HalList\\}/', 
		$hallist);

I have removed the part of code that makes the actual links as that
part works fine, but I have 2 problems left:

1. How do I get the content of the $AuthId variable ?
I have tried both $GLOBALS['AuthId'] and $_SESSION['authid'] but none
of them seems to work (both empty)

2. What do I put in my sprintf above to make multiple lines in the
markup ?
I have tried '\n' as you can see, but that does not work, as all ends
up on one line, and not a bulletlist as I want.

-- 
Regards
Helge Larsen




More information about the pmwiki-users mailing list