create new tag
, view all tags

BlogAddOnDev Archive

Archived discussions of BlogAddOnDev

Thanks for this nice add-on. I have tried to install it on my twiki site but have some problems with the "Comments" section. It does not give an editing box but just an error message:

No such template def TMPL:DEF{PROMPT:return}

Did I miss anything during the installation?

-- VivienChen - 29 Dec 2006

See answer in BlogAddOnCategories.

-- PeterThoeny - 29 Dec 2006

Hi Arthur. The BlogPostTemplate has your name as the default author in the form. How do we change this template to get the author field set to the current WIKIUSERNAME when the new post topic is created. I tried SteveJonesST, but of course this is not correct, as it displays the current username when the page is viewed, not when it's created.

-- SteveJonesST - 15 Feb 2007

Not good! I have updated the addon (1.0.5).

-- ArthurClemens - 15 Feb 2007

It's a pity that you did not join in on developing the BlogPlugin and decided to do another blog package.

-- MichaelDaum - 15 Feb 2007

Personally I welcome Arthurs contribution. Diversity is good. There are different blogging needs for different use cases. I think a simple blogging app complements the full blown BlogPlugin.

-- PeterThoeny - 15 Feb 2007

Peter, yes, sure.

Arthur, can you drop a few words and explain your motivation to start a new blogging package instead of using and enhancing the existing one?

-- MichaelDaum - 16 Feb 2007

Yes, I can give you the motivation of the company I work for, an internet design agency.

We have a need of tight integration between TWiki pages and blog posts - in fact there should not be that much of a difference between the two. The main benefits are listed in BlogAddOn.

These are our circumstances: - A number of members of the management write blog posts on the intranet TWiki. Each member "owns" a subject, but this is not strict. In fact anyone can write a blog post. - We try to keep all information in one Web. In time everything should be moved to Main. - Editing, searching, creating attachments, tagging should all have the same user interface.

I could not achieve this tight integration with BlogPlugin - it still feels like having a blog app with wiki functionality. And I cannot see how the simple setup I have can be done without overhauling the complete plugin.

So what I created instead is kind of a 'classic' TWiki app, using simple forms and templates. And instead of keeping it inhouse, I have offered it to the community in the hope it will be of use to someone.

-- ArthurClemens - 16 Feb 2007

Thanks for the update, Arthur. For info, the reason I chose BlogAddOn over BlogPlugin, is the simple setup - the number of dependencies for BlogPlugin are a barrier to quick installation and check for suitability.

Arthur, for info, there is a small issue when the FindElsewherePlugin is enabled - wikiwords found in other webs by this plugin don't render their titles correctly in the BlogPost summary page. I am not expecting you to fix this, but I wanted to let you know.

Thanks for the useful add on.

-- SteveJonesST - 16 Feb 2007

One more thing - if someone creates creates a new post with the same title as an existing post, the old post content is deleted (but is still available in the previous revision of the topic, of course). It may be an idea to check for existing topic names, and uniquify the new topic name if necessary. This doesn't block our use of the add on.

-- SteveJonesST - 16 Feb 2007

I cannot update the package at this moment. But if you want to make your hands dirty, add this line to BlogPostCreator, at line 35:

<input type="hidden" name="onlynewtopic" value="on" />

-- ArthurClemens - 16 Feb 2007

Arthur, I've been reading several times what you wrote on BlogAddOn. Most of it does not really make any sense describing the BlogAddOn per se. It only makes some sense for someone knowing the BlogPlugin. It reads like "I don't use BlogPlugin because ..." For the sake of your own work, you should describe the exact merits in a understandable way.

Let's see:

  • Integrates blog posts with TWiki topics ... what do you really want to say here?
  • Writing a post is like writing a topic ... what else?
  • A blog author is just any TWiki user ... what else?
  • Attachments work the usual way ... where don't they?
  • Topics can be searched using default WebSearch ... where can't they?
  • Relies just on one plugin (CommentPlugin) ... that's no merit in itself though it eases installation.
  • Uses (editable) categories to group posts - or to define blogs with separate 'owners' ... sure, categories are editable. what do you really want to say here?
  • Provides a handy interface with sorting and filtering options that can be INCLUDEd in any topic in the same Web ... and from other webs hopefully.

So whatever the specific merits of the BlogAddOn are: you should describe it to a user that probably knows nothing about TWiki. Show him that your package is solving his problems.

  • I will review the addon description, thank you. -- ArthurClemens - 25 Feb 2007
  • UPDATE: I did not intend to start a blog extension competition. I don't feel like answering your educating questions above, but I did change some of the phrases in the documentation that might have led to an impression of opposition. -- ArthurClemens - 25 Feb 2007

-- MichaelDaum - 19 Feb 2007

Arthur, forgive me but I can't get the parameters to pass into the include. Whichever parameters I pass, I get the same list of posts. For example :

%INCLUDE{"BlogPost" category="DSM" limit="10"}%
Gives me posts in all categories. If you have time, could you advise ?

-- SteveJonesST - 22 Feb 2007

Steve, it seems to work at my site. Try this test page to see what is different in your setup.

-- ArthurClemens - 25 Feb 2007

I have made a couple of small changes and updated the addon to 1.0.6.

-- ArthurClemens - 25 Feb 2007

I have a problem regarding the BlogPostViewTemplate respectively the BlogPostTemplate. There's no comment section in none of my blog posts.

Do I have to manually add the coment section of the BlogPostViewTemplate to the BlogPostTemplate (at least it works this way)?

-- CarloSchulz - 09 May 2007

If you don't see the comment section (and no title) you probably have used Preview before saving. See BlogPostViewTemplate. The bug in the templates will be fixed in the next release of TWiki. Or you can make the change yourself if you don't want to wait for another month or so.

-- ArthurClemens - 09 May 2007

No, I didn't use preview but I have the same problems like in BlogPostViewTemplate anyway.

I'm using NatSkin and made the changes you mentioned in edit.nat.tmpl and preview.nat.tmpl but it had no effect at all.

-- CarloSchulz - 10 May 2007

hmm, when I switch the skin in one of the blog topics to pattern, BlogPostViewTemplate works like it should but unfortunately not with NatSkin. frown

-- CarloSchulz - 10 May 2007

Some templates are missing in the zip. Nonsense. In BlogPostViewTemplate, change %TMPL:DEF{"textcontent"}% to %TMPL:DEF{"content"}%.

-- ArthurClemens - 10 May 2007

Awesome, now everything works just fine smile Thanks a lot

-- CarloSchulz - 10 May 2007

Hi Arthur, your AddOn is by now the most used feature of our TWiki. Thanks for sharing it.

On the plugintopic you say "Display of the number of comments" is not provided.

I was wondering if it's possible to show the number of comments if you change the the output of the comment box.

If each comment would start with a bullet, wouldn't it be possible to use some reg-ex to count the number of bullets on the comment topic (if there's one) and display that in the BlogPostOverview?

Of course there's a rub in it if a user uses bullets in his comment but at least my users haven't done that in any comment so far...

-- CarloSchulz - 08 Jun 2007

Each comment gets a unique anchor link, so that could be used to count. But this is an add-on, so I cannot use any Perl functions.

-- ArthurClemens - 08 Jun 2007

So it's not possible to implement with some reg-ex and FormattedSearch like stuff?

-- CarloSchulz - 08 Jun 2007

Got it smile

  1. Change BlogPostViewTemplate so that comments are added to the blog topic and not to comments topic
    • I was always wondering why comments have been saved to a different topic.
  2. add Comments: $count(.*?(--) .*) to the format="..." part of %SEARCH{"[T]opicType.*... in BlogPost and the number of comments will show up in your BlogPost.
    • BlogPostWithComments.png

-- CarloSchulz - 08 Jun 2007

Thanks, I will bring this into the next release.

-- ArthurClemens - 10 Jun 2007

To reduce the chance of false positives, i'd search for signatures that start at a line, such as $count(.*?([\r\n]-- Main.) .*) (this is untested.)

-- PeterThoeny - 10 Jun 2007

I was always wondering why comments have been saved to a different topic. These are my motivations:

  • To have a clean interface for blog authors - of they want to change the text they don't need to wade through comments
  • Do not make it appear that the blog topic has changed when only a comment has been added, to prevent it appearing in the WebChanges
  • (future) To close comments on a topic
  • (future) To hide or disable comments

-- ArthurClemens - 11 Jun 2007

Hi Arthur, I've fixed a rendering issue that Opera has with the BlogPost topic (view BlogPost with Opera 9 to see). The problem was quite simple to fix as it was only a closing <div> tag in the wrong place (below </form> where it should be above it). I've made a patch of BlogPost.txt below for demonstration purposes only (the comments were for tracking down the </div>). I can attach the formatted html that I used to trace down the closing <div> if you would like to verify this patch. And if you need anything else, please let me know.

--- BlogPost.txt        2007-04-19 18:39:43.000000000 -0500
+++ BlogPost.txt_fixed  2007-06-18 11:50:38.942285428 -0500
@@ -38,8 +38,8 @@
 </div><!--/twikiLeft /blogPostViewOptionsFilter-->
 <br class="twikiClear" />
 <br class="twikiClear" />
 <div class="blogPostAddOnViewOptionsDivider"></div>

Could you please add this simple fix to the next release of BlogAddOn? Thanks!

-- MichaelBryant - 18 Jun 2007

I will. Thanks.

-- ArthurClemens - 18 Jun 2007

I have uploaded version 1.0.9: Fixed html bug in BlogPost; added comment count to BlogPost; improved styling of form elements.

-- ArthurClemens - 26 Jun 2007

Hi Arthur,

Using the latest BlogAddOn with the latest CommentPlugin on TWiki 4.0.5, I get the following error message for the blogpost comment template:

No such template def TMPL:DEF{PROMPT:blogpost}

Is it possible that this version of BlogAddOn only works with TWiki 4.1 and later ?

-- SteveJonesST - 27 Jun 2007

Type blogpost is provided in file BlogPostCommentTemplate.

-- ArthurClemens - 27 Jun 2007

This was working OK. The problem was that the default template 'promptbox' was not understood when the comment template was passed in from BlogPostCommentTemplate. My workaround is to redefine the promptbox template inside BlogPostCommentTemplate.

This was a surprise, as the template includes CommentPlugin, and I even added another include for CommentPluginTemplate, but the only way to get it to work was to copy/paste the promptbox template into BlogPostCommentTemplate.

Just wanted to let you know. Thanks again for the very useful plugin.


-- SteveJonesST - 28 Jun 2007

I have a problem when a post is submitted with a title containing a '.' or '/' character. Javascript is on in the browser, so the function replaceSpacesAndPunctuation is being called (I checked, and other characters are removed), but if the post title contains '.' or '/', these seem to still exist in the new topic name, so TWiki tries to create a new hierarchical web.

For example, if the post titles is 'application v4.0 released', TWiki gives the message:

The "applicationv4" web does not exist

I've not modified my twiki.js, and I can confirm that the variable ALLOWED_URL_CHARS has not changed from its default value.

Any assistance appreciated.

-- SteveJonesST - 06 Jul 2007

I don't see this problem anymore, so it may be solved by newer javascript. What version are you using?

-- ArthurClemens - 06 Jul 2007

TWiki 4.0.5, apache 1.3.9 on RH 7.2, Firefox 2.0. I guess I need to move to TWiki 4.1 to get the new twiki.js.

-- SteveJonesST - 09 Jul 2007

I keep getting the error No such template def TMPL:DEF{PROMPT:blogpost} on all of my blog pages when I click reply. I'm unsure of how to apply the fix steve mentioned above.

-- BrianMahoney - 01 Aug 2007

I will look at it after my holidays.

-- ArthurClemens - 01 Aug 2007

Thanks so much - I am going to attach the error image below.


-- BrianMahoney - 01 Aug 2007

You need the latest version of CommentPlugin.

-- ArthurClemens - 01 Aug 2007

Thanks Arthur! That worked like a charm. I was wondering if you know how I can delete a blog. When I click on one - all my options in patternskin to manage a page are not available.

Thanks again!

-Brian Mahoney

-- BrianMahoney - 03 Aug 2007

Hi Brian. I added the following line to the BlogPostViewTemplate, to put the topic actions at the bottom of of the post:


I added this line immediately after the line:


Our need was to be able to add attachments to a blog post. Hope this helps. Arthur, feel free to correct/comment.

-- SteveJonesST - 06 Aug 2007

Thank you Steve! That worked great!

-- BrianMahoney - 08 Aug 2007

I was also wondering about the time comments the blog plugin makes, for example:

 latest comment by BrianMahoney - 03 Aug 2007 - 18:33 
is completely wrong - anyone know how I can adjust the TWiki clock so that this will display correctly? I remember reading that it is based off of GMT and cannot be changed since it is designed with the standard of "global collaboration in mind." Steve, did you also find a way to add the header into the individual blog pages as well so users can navigate back to the main page more easily, without having to go to the "Webs" link?

Thank you again guys for the great help! I know I ask a ton of questions - thanks for putting up with me smile

-- BrianMahoney - 08 Aug 2007

Brian, to add the navigation breadcrumbs to the posts, add the following line to BlogPostViewTemplate:

<div class="twikiSmallish"> %TMPL:P{"breadcrumb"}% </div>
Just below the line:
<div class="patternTopic">%BROADCASTMESSAGE%

You'll find all the elements from the regular pattern skin view in the file /twiki/templates/view.pattern.tmpl you should be able to cut and paste from here to BlogPostViewTemplate to add more content.

-- SteveJonesST - 09 Aug 2007

I added a new BLOG web but how do I make it so when you click on the link on the leftbar it goes right to blogpost.txt?

-- StephenGarriques - 10 Aug 2007

Steve! Thank you again!

-- BrianMahoney - 10 Aug 2007

How can you make it so you an EDIT what you have posted?

-- StephenGarriques - 31 Aug 2007

In BlogPostViewTemplate you could add a link [[%TOPIC%Comments][Edit comments]].

-- ArthurClemens - 14 Sep 2007

How do I 1) make the datestamp include hour: minute and 2) cause most recent comments to append to the top of the list instead of bottom?

-- DaveAtkins - 27 Dec 2007

  1. Edit BlogPostCommentTemplate. You will find a line with %WIKIUSERNAME% - %DATE%:. Look at VarDATE to see how to change the format.
  2. Again in that template topic, have a look at %TMPL:DEF{OUTPUT:blogpost}%%POS:BEFORE%. I think you just can change it to =%POS:AFTER% (untested). See CommentPlugin for more information.

-- ArthurClemens - 27 Dec 2007

Edit | Attach | Watch | Print version | History: r2 < r1 | Backlinks | Raw View | Raw edit | More topic actions
Topic revision: r2 - 2008-04-07 - PeterThoeny
  • Learn about TWiki  
  • Download TWiki
This site is powered by the TWiki collaboration platform Powered by Perl Hosted by OICcam.com Ideas, requests, problems regarding TWiki? Send feedback. Ask community in the support forum.
Copyright © 1999-2017 by the contributing authors. All material on this collaboration platform is the property of the contributing authors.