[pmwiki-users] Discuss/talk link help

H. Fox haganfox at users.sourceforge.net
Thu Jul 26 00:40:58 CDT 2007


On 7/25/07, Ian MacGregor <lists at imacgregor.com> wrote:
> I need to set an
> array of pages/actions in which the "Discuss" links will not appear, pages
> like $group.(All|Recent)Changes, ?action=refcount. How do I do that?

Maybe try something like

$pagename = ResolvePageName($pagename);
if (preg_match('!^(PmWiki|Test|Profiles)\\.!', $pagename)
  || preg_match("!^$SiteGroup".'\\.!', $pagename)
  || preg_match('!\\.(GroupHeader|GroupFooter|GroupAttributes|WikiSandbox)$!',
$pagename)
  || preg_match('/^(print|refcount)$/', $action)) {
  $NoTalkPage = 1;
}

and then switch to

(:if name *-Draft :)(:else if enabled NoTalkPage:)
(:else if name *-Talk :)
* %item              class=browse    %[[{*$BaseName} |''Discuss'']]
(:else:)
* %item              class=browse    %[[{*$FullName}-Talk | Discuss ]]
(:if:)

If this is acceptable it should be refined and added to the recipe page.

Hagan



More information about the pmwiki-users mailing list