[pmwiki-users] $PageUrl not being parsed

Hans design at softflow.co.uk
Sat Jan 28 08:24:40 CST 2006


Saturday, January 28, 2006, 1:47:11 PM, Ryan wrote:
> 1. HOW TO DISPLAY NEW THREAD TITLES WITHOUT THE HYPERLINK?
> When a user enters the new topic, and they are brought to the next  
> page, the top of the page has "Describe TestTopic01A here" in the  
> same way that it would if you were creating a new page.  The words  
> are all squashed together in a single camel-case word.  Also, the  
> word is a hyperlink to edit the new page (default wiki behavior). Is
> there any way to display simple words here, such as "Test Topic 01 A"
> without a hyperlink?

In forumstyled.php the variable $DefaultPageTextFmt gets redefined for
the forum group(s). for this to work each forum group needs to be
added to the $ForumList array. Like

      $ForumList[] = 'Forum';
      
And you add more groups the same way.
Maybe this is not the right way to add to the array?

this is the code in forumstyled.php:
# default forum group:
$ForumList[] = 'Forum';

# defines text to be displayed when new topic page gets created
$fgrp = FmtPageName('$Group',$pagename);
foreach ($ForumList as $fl) {
    if($fgrp==$fl) {
    $DefaultPageTextFmt = 'Compose message, add author name, and click post';
    }
};

Anyone seeing a flaw here please advice!

> 2. HOW TO DISPLAY THE TITLE OF THE TOPIC TO RETURN VISITORS?
> When a user returns to the topic, they are presented with the  
> chronological listing of replies and the comment box.  Unfortunately,
> there is nothing at the top of the page to show them the topic.  I  
> THOUGHT there was a PmWiki variable that I could add here to display
> the topic name.  Could you point me in the right direction?  This may
> be similar to #1, so maybe I just need to display this variable and
> SUPRESS what is being displayed by default in #1?

The topic title is the page name. You can also use {$Title} in the
page i suppose.

> 3. HOW TO REMOVE 'HOME PAGE' FROM TOPIC LISTING?
> When someone visits the forum, they always see the Home Page as the  
> first topic.  This is confusing.  Is there any way to suppress this?   
> Maybe add text tot he page for "No topics in this forum yet" if that  
> is the only page?

you can add this to config.php:

# exclude current page
$SearchPatterns['normal'][] = FmtPageName('!^$Group\\.$Name$!', $pagename);

which should suppress the forum's HomePage being listed on itself.


Best, 
~Hans                           






More information about the pmwiki-users mailing list