[pmwiki-users] Acronyms

Stirling Westrup sti at pooq.com
Thu Dec 14 05:20:56 CST 2006


Jan Hegewald wrote:

> I just found your QuickReplace recipe. From the description it looks  
> as if it is capable of the acronyms feature and so much more!
> I installed it but I am not sure where to put the acronyms. I have added
>
> 	include_once('cookbook/quickreplace.php');$QuickReplace['Acronyms']  
> = array
> 	  ( 'flags' => 'e'
> 	  , 'page'  => array
> 	      ( '{$SiteGroup}.Acronyms'
> 	      , '{$Group}.Acronyms'
> 	      , '{$FullName}-Acronyms'
> 	      )
> 	  , 'match' => '{$1}'
> 	  , 'output' => 'Keep(PSS("<abbr title=\"$2\">$1</abbr>"))'
> 	  );
> to the config page and now I wonder if the acronyms should go in  
> Site.QuickReplace or a special acronyms page?

Well, if you're using the above configuration, then its saying that the
Acronyms for a page called SomeGroup.SomePage should be looked for in the
pages called Site.Acronyms, SomeGroup.Acronyms and SomeGroup.SomePage-Acronyms
in that order.

You can change which pages it looks at, by changing the value of the 'page'
configuration entry. 'page' is documented fully at the bottom of the Cookbook
page. Let me know if it doesn't make sense.

Oh, and you need to do the include_once AFTER setting the value in the
QuickReplace array, not before, like it says on the cookbook page:

$QuickReplace['Acronyms'] = array
  ( 'flags' => 'e'
  , 'page'  => array
      ( '{$SiteGroup}.Acronyms'
      , '{$Group}.Acronyms'
      , '{$FullName}-Acronyms'
      )
  , 'match' => '{$1}'
  , 'output' => 'Keep(PSS("<abbr title=\"$2\">$1</abbr>"))'
  );

include_once('cookbook/quickreplace.php');

Let me know if you need any more help with it.






More information about the pmwiki-users mailing list