Blog

Description

This is a simply Blog macro that utilises a javascript calendar and the Include macro to hack together a pseudo bliki (blog/wiki). The calendar is used to choose the entries to show, the number of visible entries is controlled by the select control "max entries". The button to the left of "max entries" allows you to toggle between the two modes "Show All" and "Show Published".

Depedencies

Include - now part of the main distribution

Download & Release Notes

Download

Release Version

Moin Version

Release Notes

Blog_MoinMoin1.5.py

1.5

Installation

Usage


Discussion

A - You press the button "Show All" and then by clicking on one of the dates you will create a new wiki page that contains your blog entry.


114c114
<     window.location.href = "/"+global.page+"?date="+global.date+"&entries="+global.entries+"&showAll="+global.showAll
---
>     window.location.href = global.page+"?date="+global.date+"&entries="+global.entries+"&showAll="+global.showAll
381c381
<     thisPage = macro.formatter.page.page_name
---
>     thisPage = macro.formatter.page.url(macro.request)
396c396
<         date = macro.form['date'].value
---
>         date = macro.form['date'][0]
405c405
<         showAll = macro.form['showAll'].value
---
>         showAll = macro.form['showAll'][0]
413c413
<         entries = macro.form['entries'].value
---
>         entries = macro.form['entries'][0]
438,439c438,439
<             return ('<p><strong class="error">%s</strong></p>' %('Invalid entries "%s"!')) % (macro.form['beforeDate'].value)
<         entries = int(macro.form['entries'].value)
---
>             return ('<p><strong class="error">%s</strong></p>' %('Invalid entries "%s"!')) % (macro.form['beforeDate'][0])
>         entries = int(macro.form['entries'][0])
452c452
<             return ('<p><strong class="error">%s</strong></p>' %('Invalid date "%s"!')) % (macro.form['date'].value)
---
>             return ('<p><strong class="error">%s</strong></p>' %('Invalid date "%s"!')) % (macro.form['date'][0])
468c468
<         ret += getShowEntered(macro, thisPage, year, month, day, entries, maxEntries)
---
>         ret += getShowEntered(macro, macro.formatter.page.page_name, year, month, day, entries, maxEntries)
485c485
<         includeParams = '%s/BlogEntry-%d-%02d-%02d, "%d-%02d-%02d", 1' % (thisPage, year, month, day, year, month, day)
---
>         includeParams = '%s/BlogEntry-%d-%02d-%02d, "%d-%02d-%02d", 1' % (macro.formatter.page.page_name, year, month, day, year, month, day)


503c503,504
<     pages = wikiutil.getPageList(config.text_dir)
---
>     pages = macro.formatter.page.getPageList()
>     # pages = wikiutil.getPageList(config.text_dir)

MacroMarket/Blog.py




Greetings Carsten


Greeting Carsten



This plugin doesnt work. the help materials are not useful. I got the following error. Looks like several people reported errors. please fix these or pl. stop distributing this macro so that more people dont waste their time. Thanks. KeyError

'entries'

If you want to report a bug, please save this page and attach it to your bug report.

Traceback

A problem occurred in a Python script. Here is the sequence of function calls leading up to the error, in the order they occurred.

    • C:\Documents and Settings\pdharan.ST-USERS\My Documents\MoinMoinDesktopEdition\MoinMoin\formatter\base.pyo in macro (self=<MoinMoin.formatter.text_html.Formatter instance>, macro_obj=<MoinMoin.wikimacro.Macro instance>, name=u'Blog', args=u'2003-05-23, 0, 5, ,Sa')

    • C:\Documents and Settings\pdharan.ST-USERS\My Documents\MoinMoinDesktopEdition\MoinMoin\wikimacro.pyo in execute (self=<MoinMoin.wikimacro.Macro instance>, macro_name=u'Blog', args=u'2003-05-23, 0, 5, ,Sa')

    • C:\Documents and Settings\pdharan.ST-USERS\My Documents\MoinMoinDesktopEdition\wiki\data\plugin\macro\Blog.py in execute (macro=<MoinMoin.wikimacro.Macro instance>, text=u'2003-05-23, 0, 5, ,Sa')

      1. 437 # set default values
      2. 438 self.maxEntriesInOptionList = 20
      3. 439 self.startDay = "Mo"
      4. 440 self.showAll = "0"
      5. 441

KeyError

'entries'

System Details


Sorry I tossed this over the wall and left it, JBoss Rules http://markproctor.blogspot.com/ has really taken up all my time. I'm glad to see others have found this useful and continued to maintain it. I won't be coming back to this project, so if someone else wants to take 100% ownership, that's fine with me.

MoinMoin: MacroMarket/Blog (last edited 2008-01-28 23:08:08 by JordanCronin)