[Pmwiki-users] wikifarm - logo: / variable substitution - publish

Patrick Ogay lists
Wed May 26 21:46:15 CDT 2004


thanks a lot!

> Ah, but $ScriptUrl *does* change, so you have to set $PageLogoUrl
> before you include wikifarm-pre.php -- the 'SDV' means that if it's 
> already set, it won't be over-written.

Ah ok!
To place logo-init before wikifarm-pre is the best solution.

>> It's tricky this variable substitution in php.>
>Tell me about it!! [*]
in the case shown  
SDV($PageLogoFmt,"<div id='wikilogo'><a href='$ScriptUrl'><img
  src='\$PageLogoUrl' alt='\$WikiTitle' border='0' /></a></div>");
substitutes $PageLogoUrl not when calling, but when wiki-instance is called, which was the result I expected. 

It's coming to my mind: 
publish seem's to have a minor problem with the actual wiki-releases. 
Test with a "no wikifarm" 0.6.18. print-publish-0401.php

http://www.blug.ch/wiki/?action=publish  
Extract:
<link rel='stylesheet' **** href='$PmWikiDirUrl/styles/print.css' type='text/css' />  <meta name='robots' content='noindex,nofollow' />
  <title>PmWiki - Publish Blug.HomePage</title>
</head>

\$PmWikiDirUrl  (any variable isn't resoluted) 
deleting the \ value subsitutes to blank, when I remember correctly. 


[*]------ php variable subsitution] ---------------------
Recently I tried to add a feature to SPIP (CMS). 
A function looped a SQL result set and created a table-element for each record, which was copied to a string a the end (HTML-generation of an article list).
I liked to add a pointer to "record before" and " record after" to all records (so that the user can swap positons). 
Bevor assigning the table to the string all keys are known of course. So I built another table with the record key values. 
But I couldn't work out a solution to place my variables in a way that they substituted just before the table is assigned to the string (Eval led to other errors). 
(So I will probably try with repositions in the SQL result set) 

regards
pog




More information about the pmwiki-users mailing list