How to use BlogFace with ZWiki.

See also: BloggingDiscussion

Making BlogFace work with Zwiki 0.18.0

I have BlogFace running with my Zwiki (sounds weird when you say that aloud). Here's what I did:

  1. Ignored all other directions I had found.
  2. Added a BlogFace product to my current wiki
  3. Set the Date Index to last_edit_time
  4. Switched over to the BlogFace contents tab and opened up entries method
  5. Edited the dtml-if and dtml-var bits from document_source to 'text':
            <dtml-if text>
                    <dtml-var text fmt=structured-text size=500>
            </dtml-if>
    
  6. Went to my ZCatalog and added a "text" entry in the metadata (hoping there will be a summary metadata choice soon)
  7. Did some other mods to suit my needs (optional)
  8. Test the results at http://commonplacebook.org/blog

This is definitely not perfect, but works. I think this is a good way to blog a wiki, but Zwiki needs more ways to index and store content for this to work properly.

Previous Discsussion

Zope.org article: how to blog a wiki http://www.zope.org/Members/karl/BlogFace/BlogFace/wikiblog.txt


Simon Michael <simon@joyful.com>, 2002/05/04 21:05 GMT (via mail):
Here are some additional notes on setting up BlogFace 1.0 with ZWiki 0.9.9. Here's what I did here on zwiki.org:

  1. installed Calendar product
  2. installed BlogFace product; NB you need to rename BlogFace-1.0 directory to BlogFace
  3. fixed the product directory determination and cast DateTimes? to strings in a bunch of places to make it work with my zope. Patch: smBlogFace1.diff (in your BlogFace directory, do patch -p1 <smBlogFace1.diff)
  4. created a blogface in my wiki folder, id "blog", create Catalog unchecked. I already have a Catalog with all relevant indices & metadata (see HowToInstallAZwikiCatalog).
  5. in Main tab, set path to catalog to "Catalog" and date index to either "creation_time" or "bobobase_modification_time".
  6. in Contents tab, replace entries with something like blog/entries/view_source

I don't get the right search results when I use creation_time. Also the calendar is not doing anything. I stopped at this point, the result is at http://zwiki.org/blog .

Some smart excerpt methods for zwiki pages would be handy here. We should be able to get a chunk from the start and/or end of a page, either source or rendered, or the first or last n comments, and end up with a rendered excerpt with all loose/hanging html tags closed off.

Ok, creation_time searches weren't working like bobobase_modification_time because the former is a string while the latter is a real DateTime? object. I've hacked it on this site by adding a creationTimeAsDateTime method and indexing that.


2002/05/08 01:26 GMT (via web):
3: The diff that I downloaded was empty. Why do you need to patch BlogFace?

6: There's a few advantages to using the Script(python) that I sent to the mailing list (after following your suggestions). The text that you're blogging is rendered by the wiki page itself, so what the page author expected is what's in the blog. Also, you're getting the actual object and calling methods on it, which is expensive, whereas my way catalogs the rendered text and only has to retrieve that string, not even calling the STX renderer.

KarlAnderson


Simon Michael <simon@joyful.com>, 2002/05/10 18:37 GMT (via mail):
Karl -


> 3: The diff that I downloaded was empty. Why do you need to patch BlogFace?

Fixed the patchfile.

I needed to make it find my Product directory; and it seems that you instantiate DateTimes? from other DateTimes?, and that my zope 2.5.0's DateTime? doesn't support this ?


> 6: There's a few advantages to using the Script(python) that I sent to
> the mailing list (after following your suggestions). The text that
> you're blogging is rendered by the wiki page itself, so what the page
> author expected is what's in the blog. Also, you're getting the actual
> object and calling methods on it, which is expensive, whereas my way
> catalogs the rendered text and only has to retrieve that string, not
> even calling the STX renderer.

Yes, that's good. To keep a permanent archival blog, you'd need to prevent destructive edits on the original pages or never recatalog them.


2002/05/17 00:07 GMT (via web):
Okay, I looked at your patch, thanks. It isn't necessary, because you deviated a little from the docs - BlogFace requires a date attribute that is an ISO date formatted string. That's the reason that the for the Script(Python) that returns a string version of the date attribute. Your last step above was to add a method that returns a DateTime?, where it should have returned a string. That's also why your calendar isn't working. BlogFace works fine under Zope 2.5.1 with string date attributes.

Your patch doesn't break anything if the date attrs are strings already, but I'm not inclined to include it for a few reasons

Let me know if you're really against using strings, or if you try it using them and it still doesn't work.

KarlAnderson


Simon Michael <simon@joyful.com>, 2002/05/22 21:29 GMT (via mail):

> Let me know if you're really against using strings, or if you try it using
> them and it still doesn't work.

I'm not - I just tried to get it working using bobobase_modification_time, found that my catalog was giving me DateTime? objects, and assumed that was the standard for cataloging timestamps. I'll try again using all strings when I get time. Thanks.


2002/09/10 14:08 GMT (via web):
Hi! - I would love to use BlogFace. I tried a few things, but before i go further i decided to ask you some short questions, it will save me a lot of time i guess.

I want to use BlogFace primarily for a ZWikiBlog?. My current ZWiki is inside my CMF, which i haven't used yet very much, but i put it there cause i hoped i can use the power of CMF later for my whole site. I have Calendar installed.

Regards - FlorianKonnertz


Simon Michael, 2002/09/10 15:37 GMT (via mail):
zwiki@zwiki.org writes:
> Do i need STXDocumentEntry? ? What i dont understand: ZWiki can do stx yet.

No. Zwiki does stx. Good luck with BlogFace, but note few people have trodden this path as far as I know.


2002/09/10 22:49 GMT (via web):
Simon - thanks for your patience. - Please explain what do you mean by (6.) replace with /blog/entries/view_source? Instead of blah/manage_workspace? - How is this done? - FloK


Simon, 2002/09/11 00:48 GMT (via web):
Florian - based on what I remember Karl saying, I'd treat my notes above with suspicion. Better to start with his (latest) vanilla blogface and instructions and see how far you get. Sorry, it's self-help in this area..


2002/09/12 13:30 GMT (via web):

Hi Simon - as far as i know is vanilla a stand-alone software, right? It would not work together with Zwiki. Now am already used to ZWiki and i want to work with zope anyway, so i guess i have to go the hard BlogFace path. ;-) - I hope you and Karl will support me, as far as i will document everything and post it and contribute to the sources. So please have a look at the other two questions above, i think i edited them too late for the email sent to you last time.

-> 1. I don't know about patches yet. - Where can i get the one you mentioned above? - 2. I will try to use the ZCatalog in my ZWiki folder, ok?

In the meantime i gonna study the sources.

Have a nice day, - FloK


DeanGoodmanson, 2002/09/18 00:52 GMT (via web):
OK, got a dumb one...Which calander product? http://www.zope.org/Members/teyc/CalendarTag ?

Also, http://zwiki.org/blog doesn't work. :-(


DeanGoodmanson, 2002/09/18 02:29 GMT (via web):
Can you have multiple blogs on 1 Zwiki site? ( MultipleZWikiBlogs? )


Karl Anderson, 2002/09/18 03:47 GMT (via mail):
zwiki@zwiki.org (DeanGoodmanson) writes:


> Can you have multiple blogs on 1 Zwiki site? ( MultipleZWikiBlogs? )

sure, you can have multiple BlogFaces? for any catalog.

-- Karl Anderson kra@monkey.org http://monkey.org/~kra/

FlorianKonnertz, 2002/11/27 19:23 GMT (via web):
DateTime? error

Hi! - I joined the BlogFace trail again today... - Some questions: Is the Calendar product necessary? Are the instructions concerning the DateTime? changing scripts on Karls howto page still recommended? - As far by now i get a DateTime? related error. It would be very nice, if somebody could have a look at it on NooWiki:NooWikiBlogFace - Have a nice day :-) --FloK

subtopics:


comments:

wiki links -- Sun, 28 Sep 2003 11:07:05 -0700 reply
I have successfully implemented BlogFace with a Catalog at root level where the index is "creation_time", and the content is "text" or "document_src". Just like a few other people. It works, but...

Now I would like to solve the problem where the and the Wikilinks and dtml-var statements are resolved to the actual links. I have tried the script in Karl's instructions (in my case a root level python script called document_view), and I have set the name of the script as a metadata entry in the catalog.

When I reindex the catalog, it hangs for bit, and then come back with a __call__ error. Also, I assume the script described in both the readme, and the web page is missing only a single indentation after the "if" clause?

I'm running ZWiki 0.15 and Zope 2.6, Any advice?

wiki links update -- Sun, 28 Sep 2003 15:12:56 -0700 reply
I figured out what my problem with the script was. But I still have another problem. The problem with the catalog and the script was that the catalog had some files in it that couldn't support the script, namely files that were JPEGs?.

Now my problem is that the entire page include the standard_html_header, wiki_header,wiki_footer, and html_footer are ending up in the document_view entries of the database. This doesn't work, as I would prefer to have only the "content" of the page being formated, and not all the wrapping that goes with it. Any advice on how to modify the script page? Perhaps the request.set(bare,1) is wrong for ZWiki 0.15?

wiki links final -- Sun, 28 Sep 2003 15:49:35 -0700 reply
The second script specified in karl's instructions had two problems.

First, there should be one indent before request={}

Second, the line request.set(bare, 1) needed to be changed to request.set(' bare ', 1) - I needed single quotes around "bare".

The final script ended up being

    request = container.REQUEST 
    RESPONSE = request.RESPONSE 

if not request: request={} request.set(\bare\, 1) return context(REQUEST=request, RESPONSE=RESPONSE)

Comments and Subscribe -- Mon, 29 Sep 2003 16:28:05 -0700 reply
Most blogs I visit have a way for you to add your comments, and/or subscribe to the page. Has anyone added a "comments", or "subscribe" link to their BlogFace? If so how?

Comments and Subscribe -- Mon, 29 Sep 2003 19:18:21 -0700 reply
Answering my own questions, I added the following text to end of my "entries" file:

        <dtml-if id>
         <a href="/path_of_your_wiki/<dtml-var id>#bottom">  add comment </A>
        </dtml-if>