Adding an "About This Blog" section...

Random stuff about serendipity. Discussion, Questions, Paraphernalia.
E. Bess
Regular
Posts: 12
Joined: Mon Dec 20, 2004 10:41 pm
Location: Brooklyn, NY

Adding an "About This Blog" section...

Post 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/
Riken
Regular
Posts: 15
Joined: Sun Dec 26, 2004 9:28 am
Location: Australia
Contact:

Post 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.
E. Bess
Regular
Posts: 12
Joined: Mon Dec 20, 2004 10:41 pm
Location: Brooklyn, NY

Post 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?
E. Bess
Regular
Posts: 12
Joined: Mon Dec 20, 2004 10:41 pm
Location: Brooklyn, NY

Post 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!
Riken
Regular
Posts: 15
Joined: Sun Dec 26, 2004 9:28 am
Location: Australia
Contact:

Post 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.
garvinhicking
Core Developer
Posts: 30022
Joined: Tue Sep 16, 2003 9:45 pm
Location: Cologne, Germany
Contact:

Post 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?
# Garvin Hicking (s9y Developer)
# Did I help you? Consider making me happy: http://wishes.garv.in/
# or use my PayPal account "paypal {at} supergarv (dot) de"
# My "other" hobby: http://flickr.garv.in/
Little Hamster
Regular
Posts: 62
Joined: Thu Oct 07, 2004 3:16 pm

Post 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.
E. Bess
Regular
Posts: 12
Joined: Mon Dec 20, 2004 10:41 pm
Location: Brooklyn, NY

Post by E. Bess »

Ah, thank you kindly -- I'll try that!
Riken
Regular
Posts: 15
Joined: Sun Dec 26, 2004 9:28 am
Location: Australia
Contact:

Post 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.
Guest

Post 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 ?
garvinhicking
Core Developer
Posts: 30022
Joined: Tue Sep 16, 2003 9:45 pm
Location: Cologne, Germany
Contact:

Post 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?
# Garvin Hicking (s9y Developer)
# Did I help you? Consider making me happy: http://wishes.garv.in/
# or use my PayPal account "paypal {at} supergarv (dot) de"
# My "other" hobby: http://flickr.garv.in/
lyc1
Posts: 3
Joined: Thu Dec 30, 2004 11:31 pm
Location: Nantes, France

Post 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.
ckeck
Regular
Posts: 18
Joined: Sun Jan 02, 2005 8:00 am
Location: Texas
Contact:

Post 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
garvinhicking
Core Developer
Posts: 30022
Joined: Tue Sep 16, 2003 9:45 pm
Location: Cologne, Germany
Contact:

Post by garvinhicking »

I think the staticpage plugin only works for 0.8 versions, but you're using 0.7.1...

Regards,
Garvin
# Garvin Hicking (s9y Developer)
# Did I help you? Consider making me happy: http://wishes.garv.in/
# or use my PayPal account "paypal {at} supergarv (dot) de"
# My "other" hobby: http://flickr.garv.in/
ckeck
Regular
Posts: 18
Joined: Sun Jan 02, 2005 8:00 am
Location: Texas
Contact:

Post by ckeck »

Ah, that might be the case...I will try running the new version...

Thanks for your help.
Post Reply