Page 1 of 2

Adding an "About This Blog" section...

Posted: Wed Dec 29, 2004 11:47 pm
by E. Bess
This may have been covered before, but I poked around a bit and couldn't find anything. Admittedly, my search-fu ain't great. My apologies if this is covered ground.

I am more or less a newbie to things like stylesheets and PHP. BUT! I'm a Unix sysadmin who has done some programming in her day, so I'm not completely lost.

Anyhoo, here's my question.

One of the things that chaps my keister about blogs is when I come across a blog and there's no reference to who's writing it, or what it's about. Whenever I come to a new site, the first thing I look for is the "About this" section, if there is one. If there's not, I seldom read much further. SO! I'd like to add such a thing to the sidebar of my Serendipity blog.

I'm guessing that I'd have to write a plugin. It would prolly look a lot like the HTML Nugget plugin that's already available. I could just copy it, essentially, and then in my nugget 'o HTML, I'd have a couple of links to the bios of the site or whatever.

The tricky thing for me will be the HTML of those linked biographical pages. Essentially, I'd want them to look EXACTLY like my Serendipity blog, with all the sidebars 'n everything. The only difference would be that they'd have some of my own HTML in the middle of them, instead of code that produces the entries.

How would I set something like that up? What file would I have to copy to create a bio page that keeps the Serendip look and feel, but has bios in the middle instead of the blog entries?

Any pointers would be appreciated. Hope this makes sense.

PS: Serendipity RAWKS! \m/

Posted: Thu Dec 30, 2004 1:22 am
by Riken
The quickest way to get an about page is to use an existing plugin.

1. Install the static page plugin found here: http://www.romulus23.de/s9y-plugins/staticpage-en
2. Set up the HTML nugget plugin to include a link to the new static about page.

Check out http://photoblog.distantwisdom.net/ to see how I set it up.

Posted: Thu Dec 30, 2004 2:03 am
by E. Bess
Thanks! That looks like exactly what I need.

Quick follow-up question: are these plugins, like, re-usable? What if I wanted two static pages, not just one? Could I make a copy of the plugin and call it something else?

Posted: Thu Dec 30, 2004 2:15 am
by E. Bess
Hrm. Running into a little bit of trouble over here. I inflated the plugin into my plugins folder, and it's not showing up on the event plugin dropdown list. I took a look at the API documentation which indicates that plugins have to be named "serendipity_" and this is "romulus_" so I renamed it, but that didn't work either.

What am I missing?

Thanks!

Posted: Thu Dec 30, 2004 6:39 am
by Riken
Yeah I had some problems with the plugin with version 0.8 of Serendipity. I got the plugin to work first time with version 0.71 so you could try that.

Posted: Thu Dec 30, 2004 11:04 am
by garvinhicking
The plugin is in an updated version contained in our additional_plugins CVS module found here: http://cvs.sourceforge.net/viewcvs.py/p ... taticpage/

Maybe this one works correctly?

Posted: Thu Dec 30, 2004 12:12 pm
by Little Hamster
Quick follow-up question: are these plugins, like, re-usable? What if I wanted two static pages, not just one? Could I make a copy of the plugin and call it something else?
Yes, you can have as many static pages as you want. They're just blog entries without dates.

You can re-name the plugins by changing the name of the file, the directory it is in, and the function name inside the php file.

Posted: Thu Dec 30, 2004 1:55 pm
by E. Bess
Ah, thank you kindly -- I'll try that!

Posted: Thu Dec 30, 2004 2:44 pm
by Riken
I think you can also add the same plugin more than once, so you can have multiple static pages. You should be able to do this without modifying the plugin.

Posted: Thu Dec 30, 2004 11:39 pm
by Guest
garvinhicking wrote:The plugin is in an updated version contained in our additional_plugins CVS module found here: http://cvs.sourceforge.net/viewcvs.py/p ... taticpage/

Maybe this one works correctly?
When I try this plugin (rev 0.3), I get this error :

Code: Select all

Warning: Cannot use a scalar value as an array in /data/www/htdocs/web/plugins/serendipity_event_staticpage/serendipity_event_staticpage.php on line 143
Can you fix that ?

Posted: Fri Dec 31, 2004 10:37 am
by garvinhicking
Anonymous wrote:
garvinhicking wrote:The plugin is in an updated version contained in our additional_plugins CVS module found here: http://cvs.sourceforge.net/viewcvs.py/p ... taticpage/

Maybe this one works correctly?
When I try this plugin (rev 0.3), I get this error :

Code: Select all

Warning: Cannot use a scalar value as an array in /data/www/htdocs/web/plugins/serendipity_event_staticpage/serendipity_event_staticpage.php on line 143
Can you fix that ?
Hm, that's strange - line 143 of that file on my CVS checkout is "return true" which doesn't have anything in common with your error. Can you tell me what your line 143 reads like?

Posted: Fri Dec 31, 2004 11:11 am
by lyc1
garvinhicking wrote:Hm, that's strange - line 143 of that file on my CVS checkout is "return true" which doesn't have anything in common with your error. Can you tell me what your line 143 reads like?
Yes, you're right.
I added french translation yesterday, but the error had appeared before.

The correct line number problem is 131.
This line :

Code: Select all

$eventData['clean_page'] = true; // This is important to not display an entry list!
in event_hook function.

Posted: Sun Jan 02, 2005 8:59 am
by ckeck
I just installed the static page plug-in for my blog and made a page and everything, but whenever I pull up the link for the new static page, none of my text is listed...any thoughts?

My website is at www.chadkeck.com and you can click on the "About This Blog" link yourself and see...

Thanks

Posted: Sun Jan 02, 2005 8:10 pm
by garvinhicking
I think the staticpage plugin only works for 0.8 versions, but you're using 0.7.1...

Regards,
Garvin

Posted: Sun Jan 02, 2005 9:08 pm
by ckeck
Ah, that might be the case...I will try running the new version...

Thanks for your help.