<< | Blog Categories | >>
Blog Pages about Wikiblog
Blog Bundle Update
After long here is an update. Download Attach:blogsimple.zip Δ. This latest update fixes a few things:
- In BlogPages.GroupFooter the link to new BlogComments page is changed to use ?action=browse, so it does not appear with a questionmark pointing to edit the new page.
- In BlogComments.GroupFooter the form based on
(:input:)markup is replaced with(:commentboxchrono:). This will make it easier to use acces codes. - The README.txt has been revised.
- The bundle also contains the latest newpageboxplus.php and commentboxplus.php scripts.
The latest Cookbook:CommentBoxPlus script allows use of Access Codes. If you use a custom build form to enter comment, using (:input:) markup (as distributed up till now) and want to use Access Codes, then you need to modify your form, or replace it with (:commentboxchrono:) in BlogComments.GroupFooter. A modified version with Access Code may look like this:
[[<<]](:title {$BlogTitle}:)
>>left<<[[#commentbox]]
(:input form name=cboxform action={$PageUrl} method=post:)
(:input hidden n {$FullName}:)
(:input hidden action comment:)
(:input hidden accesscode {$AccessCode}:)
(:input hidden order chrono:)'''Add Comment:'''[[<<]]
(:input textarea text rows=7 cols=50 class=inputtext:)[[<<]]
Author: (:input text author {$Author} class='inputbox':)
Enter code %red%'''{$AccessCode}'''%%
(:input text access size='4' maxlength='3' class=inputbox:)\
(:input submit post Post class='inputbutton':)\
(:input reset reset Reset class='inputbutton':)(:input end:)
>><<
----
Back to [[BlogPages/{$Name}|{$BlogTitle}]]\
-- [[Blog.Blog| Blog Home Page]]
~Hans
Blog Bundle Update
The newest blogsimple.zipΔ is now updated with all the recent changes to the comments functionality: comments have numbered anchors (affects all new comments, not existing ones. Existing comments need to have anchors added manually if this is needed). The Add Comment link in the blog list opens the page at the comment box, and links to recent comments open the page at the comment. Comments are counted as well (see CommentsCounter).
Comments Counter
The comments on each page can be counted now. I added a page variable {$PostCount} to commentboxstyled.php. This will show the number of posts (comments, messages) on the page, by counting the number of occurences of the >>messagehead<< string in the page. Thanks to DaveG for the counting function! I used it also in the main blog list, adding it to the blog list template (Blog.BlogListTemplates#blog) using the extended version {BlogComments.{=$Name}$PostCount}. And I used it for the forum topic list to show the number of posts for each topic.
Blog Feeds
I did not realise it untill now, but apparently it is possible to add pagelist parmeters to ?action=rss, which will make for a nice blog rss or atom output. For instance like:
.../pmwiki.php?action=rss&group=BlogPages&list=blog&order=-ctime&count=50
To test use this link: rss blog feed
So now I added feed links to all blog pages, so visitors with browsers like Firefox can click the rss feed symbol and add the blog pages to their bookmarks easily.
Blog Groups
I changed the group structure for the blog by adding seperate groups for Blog Archive ? and Blog Categories?, taking these pages out from group Blog?. This looks better in the relevant page titles and should be better to administer. The change affected loads of pages, and i updated the blogsimple.zipΔ file.
I also simplified the installation from the zip file by bundling everything into one directory, instead of splitting it into a pagestore in pub/ and the cookbook script.
Anyone updating this way should be aware to make changes to various pages, or remove configuration pages in group Blog first, and let the blog load fresh config pages from the new pagestore in cookbook/blogsimple/wikilib.d/
Blog Bundle
I zipped all the bits and pieces of this blog setup into a bundle and uploaded it as blogsimple.zipΔ. It is meant to be an experimental release, and i am not sure how much it will be maintained, since pmwiki will deliver new blog tools, for a better blog bundle yet to come. See more at Cookbook:BlogSimple
~Hans
Blog Comments
As I said the blog comments are added using Cookbook:CommentBoxStyled. I decided to use a seperate BlogComments? group for them and use the blog page name for each comment page. But how tie it together?
Posting Blog Pages
This blog uses Cookbook:NewPageBoxPlus to create new pages in the Blogpages group with ease.
NewPageBoxPlus allows a default value already entered in the text box, uses BlogTemplate as a page template, and a custom page variable {$Today} which produces 2008-08-28 -- today's date inserted in the text box, so all blog pages will have today's date prefixed to their name. The BlogTemplate is just containing a title markup (:title {$BlogTitle} :) which sets the title of a new blog page using another custom page variable {$BlogTitle}, which strips away the date part of the page name.
The {$BlogTitle} of this page is: "Wikiblog".
The page name is "2006-01-11-PostingBlogPages?".
Further details about automatic date insertion etc. can be found at Cookbook:BlogWithPageList
Blog Categories
I decided to use the normal category markup to include a category link on a blog page. This way the blog pages are included (linked to) in the general category? pages. But I wanted specific blog categories to show the blog entries with that category. The answer was to use a page for each blog category with a pagelist markup to search for the category word in the blog pages. So the blog categories are a sort of subset of all categories, displaying only blog pages. And the blog BlogCategories? page is hand-crafted to include only specific blog categories, not the whole lot used on the wiki. Well this works, but a better way would be to have an actual trail page containing a list of links to the pages, and have each new blog page adding to the relevant list. This is not possible yet but may be soon.
What we need is a general method to allow a page to add itself as a link in a specified format to a number of trail pages. It should not be limited to one blogtrail page. For instance in this blog setup each blog page is listed on
- Recent Posts
- Categories, i.e a blog category page, if the blog page carries one (or more)
- Archive of the month (or some other time-interval specific page)
I used pagelist markup for each of these, but it would be much better if each list is populated over time when new pages are created, to serve as wiki trail pages. Then blog pages can carry trail markup to link from one to the next. so we can have a trail wandering through recent posts, a trail through a past month (archive), a trail through a blog category. The only existing mechanism to do something similar is used for RecentChanges pages. RecentChanges is populated over time with every page change. $RecentChangesFmt allows to output each page addition in a certain format.
It would be nifty if the method used for creating RecentChanges pages would become a specific case in a more general method of automatic addition to certain trail pages on demand. I will call these auto-trail pages. -- Questions arising:
- How would it be determined to what auto-trail page a page-link gets added?
- Can a page-link be added to a specific location on the trail page, at a specific marker?
- Can the trail page determine the format of each page-link addition to its growing list?
My comments to these:
- An array for auto-populating trail pages and their rule-to-add attributes would be nice. A page-link will be added according to
- a general rule to add it (like RecentChanges for all pages)
- a specific rule to add it if it matches a pattern (is part of a group, for instance)
- a specific markup in the page to instruct addition to a specific auto-trail page (like Pm' suggestion to use a
(:blog:)markup to add the page to a blog trail) - An attribute to add it according to time: at creation time or when the page gets modified.
- the auto-trail page can carry a markup which specifies the position of page additions, i.e. the top of the list it creates
- This markup can include any formatting instructions, ideally somehow similar to pagelist using templates for formatting.
Any comments?
New Simple Blog
Hi, this is my new and simple wiki blog, freshly installed.
This blog works basically using pmwiki's pagelist markup to generate the various lists you see:
- a list with recent posts on the left sidebar
- a list with monthly archives
- a list with blog categories
- a list with recent comments to blog posts
The blog entries are stored as wiki pages in the group BlogPages. The names can carry a date prefix for easy page handling, but this part of the name gets hidden in the page title. Any comments are stored in the group BlogComments on a page with the same name as the blog page. The various blog category and archive pages and all the template pages are in group Blog.
New blog entries are added with the newpagebox form using Cookbook:NewPageBoxPlus. Comments are added with a commentbox using Cookbook:CommentBoxStyled
A comment page is included in the blog page with (:include ..:) markup, as is the blog page on top in the comment page, i.e. they always appear together in both BlogPages and BlogComments group.
The blog has a Blog Configuration page from where all the various configuration pages can be accessed.
So much briefly for a start. ~Hans
