A blog from scratch?

Previous Topic Next Topic
 
classic Classic list List threaded Threaded
5 messages Options
Reply | Threaded
Open this post in threaded view
|

A blog from scratch?

LawsonEnglish
  I'm trying to start a blog from scratch, but I can't get it to use the
built-in functionality unless I subclass the PRDistribution code and add
a "first entry" post within the method "blog".

What am I missing, or am I missing anything?

Lawson


_______________________________________________
Magritte, Pier and Related Tools ...
https://www.iam.unibe.ch/mailman/listinfo/smallwiki
Reply | Threaded
Open this post in threaded view
|

Re: A blog from scratch?

Nick
Hi Lawson,

 I'm trying to start a blog from scratch, but I can't get it to use the built-in functionality unless I subclass the PRDistribution code and add a "first entry" post within the method "blog".

What am I missing, or am I missing anything?

Not sure I understand what you're asking. Is it how do I create a new blog entry? If so:

login using admin/pier (login link bottom left)
navigate to /pier/blog
click on commands:add (link bottom left)
click on the add button
on the next form fill in "source title" "contents" and press the "current" button for the "publication" field then press "save" button

If instead your question is how do I define my own site which incorporates a blog? Then look at PRDistribution>>root as a starting point for your site's structure. Experiment by removing and adding components until you end up with a structure that works for you. In particular you might find the following lines within PRDistribution>>root a useful starting place for understanding how to customise the look and feel of your site:

self rootPage localEnvironment: self mainEnvironmentPage.
self blog localEnvironment: self blogEnvironmentPage.

which will lead you into examining:

PRDistribution>> mainEnvironmentPage
PRDistribution>> blogEnvironmentPage

Hope that helps

Nick


   

_______________________________________________
Magritte, Pier and Related Tools ...
https://www.iam.unibe.ch/mailman/listinfo/smallwiki
Reply | Threaded
Open this post in threaded view
|

Re: A blog from scratch?

LawsonEnglish
OK, what I did was subclass PRDistribution with PRCodeWikiDistribution.

I created
PRCodeWikiDistribution>>blog
blog
    ^ blog ifNil: [
        blog := (PBBlog named: 'blog')

        yourself
    ].



Then from within the Blog  page, I added a new Blog post via the web interface and saved


However, the first post doesn't show up in the widget listing new blog posts. I found that if I manually created a new blog post from within >>blog...

blog
^ blog ifNil: [
        blog := (PBBlog named: 'blog')
        addChild: (
            (PBPost named: 'test')
            title: 'Down to test';
            contents: 'test';
            publication: TimeStamp now
                );
            yourself

    ].


It works. I just wasn't clear on all the stages required to start from scratch. As far as I can tell, the first PBPost has to be created from with the >>blog method.


Next up, creating a Pier sidebar that can display existing code, e.g. http://www.morphle.org:8502

as well as a login input pane so that my Second Life nano-client written in squeak can be used to log into  Second life and display incoming/outgoing packets, and eventually inject/modify those packets.


The idea is to create a combination journal/blog/wiki of coding, along with a way of annotating/commenting on the live code with UML-type diagrams for the SL client and for the SL client-server protocols, with an eye to letting people make suggestions on how to improve what is already working, while showing what is working.

None of the PRDistribution templates really does what I need, but the Blog template seems the closest to what I want to do. Part of the process will be getting suggestions from people on how to design the wiki/blog thingie.



Lawson

On 10/12/10 9:26 PM, Nick Ager wrote:
Hi Lawson,

 I'm trying to start a blog from scratch, but I can't get it to use the built-in functionality unless I subclass the PRDistribution code and add a "first entry" post within the method "blog".

What am I missing, or am I missing anything?

Not sure I understand what you're asking. Is it how do I create a new blog entry? If so:

login using admin/pier (login link bottom left)
navigate to /pier/blog
click on commands:add (link bottom left)
click on the add button
on the next form fill in "source title" "contents" and press the "current" button for the "publication" field then press "save" button

If instead your question is how do I define my own site which incorporates a blog? Then look at PRDistribution>>root as a starting point for your site's structure. Experiment by removing and adding components until you end up with a structure that works for you. In particular you might find the following lines within PRDistribution>>root a useful starting place for understanding how to customise the look and feel of your site:

self rootPage localEnvironment: self mainEnvironmentPage.
self blog localEnvironment: self blogEnvironmentPage.

which will lead you into examining:

PRDistribution>> mainEnvironmentPage
PRDistribution>> blogEnvironmentPage

Hope that helps

Nick



_______________________________________________
Magritte, Pier and Related Tools ...
https://www.iam.unibe.ch/mailman/listinfo/smallwiki
Reply | Threaded
Open this post in threaded view
|

Re: A blog from scratch?

Yanni Chiu
On 14/10/10 1:44 AM, Lawson English wrote:

> Then from within the Blog page, I added a new Blog post via the web
> interface and saved
>
>
> However, the first post doesn't show up in the widget listing new blog
> posts. I found that if I manually created a new blog post from within
>  >>blog...
>
> blog
> ^ blog ifNil: [
> blog := (PBBlog named: 'blog')
> addChild: (
> (PBPost named: 'test')
> title: 'Down to test';
> contents: 'test';
> publication: TimeStamp now
> );
> yourself
>
> ].

When you created the first post using code, you set the publication date
with "TimeStamp now". When you created your first post using the UI, did
you set a publication date? If you didn't, then you won't see the post.

_______________________________________________
Magritte, Pier and Related Tools ...
https://www.iam.unibe.ch/mailman/listinfo/smallwiki
Reply | Threaded
Open this post in threaded view
|

Re: A blog from scratch?

LawsonEnglish
  On 10/14/10 8:44 AM, Yanni Chiu wrote:

> On 14/10/10 1:44 AM, Lawson English wrote:
>> Then from within the Blog page, I added a new Blog post via the web
>> interface and saved
>>
>>
>> However, the first post doesn't show up in the widget listing new blog
>> posts. I found that if I manually created a new blog post from within
>> >>blog...
>>
>> blog
>> ^ blog ifNil: [
>> blog := (PBBlog named: 'blog')
>> addChild: (
>> (PBPost named: 'test')
>> title: 'Down to test';
>> contents: 'test';
>> publication: TimeStamp now
>> );
>> yourself
>>
>> ].
>
> When you created the first post using code, you set the publication
> date with "TimeStamp now". When you created your first post using the
> UI, did you set a publication date? If you didn't, then you won't see
> the post.
>
>

Oh.

Thanks.  ;-)

Lawson

_______________________________________________
Magritte, Pier and Related Tools ...
https://www.iam.unibe.ch/mailman/listinfo/smallwiki