[pmwiki-users] BlogSimple2 - for different users

Hans design5 at softflow.co.uk
Mon Mar 5 16:58:19 CST 2007


Monday, March 5, 2007, 7:53:29 PM, Siegfried wrote:

> I have successfully installed BlogSimple2beta with the extension
> commentboxplus and I am using Categories.

> Now I have special question:
> I want to create and maintain a blog for every user.

>....

Thinking a bit more about this, you could try the following
(but make sure to test commenting first).

On a blog page set a page text variable {$:Blogauthor}
Blogauthor: Fred   (for instance)
or hidden:
(:Blogauthor:Fred:)
This is instead of (:Blog:1:) from blogSimple2 recipe.
Now we have a page text variable blogauthor with the author name.

To list the blog pages for author Fred you can use
(:pagelist $:{$Blogauthor}=Fred list=blog order=-ctime fmt=#recentblog count=15:)

Now the commentbox code for Site.Groupfooter:
This makes sure to put  a comment box on pages which got a Blogauthor
page text variable. The conditional test checks if a page text
variable Blogauthor is present.

(:if !equal {$:Blogauthor} "":)
----
(:div2 class=blogpost-comments:)
(:if expr exists PostComments.{*$Group}-{*$Name} && !equal {$:Blogauthor} "":)
!!![[#comments]]{PostComments.{*$Group}-{*$Name}$PostCount}
Comments:(:if !equal {$:Blogauthor} "":)
(:include PostComments.{*$Group}-{*$Name}:)
!!! Add a Comment
(:div3 class=blogpost-commentbox:)
[[#commentbox]]
(:commentboxchrono PostComments.{*$Group}-{*$Name}:)
(:div3end:)
(:div2end:)
(:div1end:)
(:div0end:)
(:if:)

Caveat: I have not tested the commentbox code above, but I checked the
conditional test for the page text variable.


Hans




More information about the pmwiki-users mailing list