static page plugin
static page plugin
I have written a static page plugin which you can download from my site:
http://www.romulus23.de/uploads/romulus ... ge-0.3.zip
What does it do?
I'm still wondering why so many blogs only know "articles" with a fixed date which can be posted. This article gets older and older, maybe isn't displayed on the front page anymore, gets spammed and finally forgotten. But I always wanted to have some part of my blog/site that is static, most often used for a "about me" page, but not limited to that. And this page should be displayed in my blog design with normal formatting I have in all my other articles.
And basically, this is what this plugin does. I'm already using this plugin on my site (look into link "über mich" in upper right corner). You can add as many static pages as you want if you add this plugin in the desired number.
Who to thank?
Garvin. He has written almost all of this plugin in this post, though unkowingly
http://www.romulus23.de/uploads/romulus ... ge-0.3.zip
What does it do?
I'm still wondering why so many blogs only know "articles" with a fixed date which can be posted. This article gets older and older, maybe isn't displayed on the front page anymore, gets spammed and finally forgotten. But I always wanted to have some part of my blog/site that is static, most often used for a "about me" page, but not limited to that. And this page should be displayed in my blog design with normal formatting I have in all my other articles.
And basically, this is what this plugin does. I'm already using this plugin on my site (look into link "über mich" in upper right corner). You can add as many static pages as you want if you add this plugin in the desired number.
Who to thank?
Garvin. He has written almost all of this plugin in this post, though unkowingly
Last edited by romulus on Sat Oct 16, 2004 6:24 pm, edited 3 times in total.
-
- Core Developer
- Posts: 30022
- Joined: Tue Sep 16, 2003 9:45 pm
- Location: Cologne, Germany
- Contact:
Re: static page plugin
Hi romulus!
It's fairly easy to apply formatting. You just need to rename
to
Because the markup plugins operate on the array key 'body' (or 'extended') to find, where the text is stored in...
Thanks for the contribution, I think several people will find it useful
Regards,
Garvin.
It's fairly easy to apply formatting. You just need to rename
Code: Select all
$entry = array('staticpage' => $this->get_config('content'));
serendipity_plugin_api::hook_event('frontend_display', $entry);
echo $entry['staticpage'];
Code: Select all
$entry = array('body' => $this->get_config('content'));
serendipity_plugin_api::hook_event('frontend_display', $entry);
echo $entry['body'];
Thanks for the contribution, I think several people will find it useful
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/
# 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/
thanks its working now
Additionally I have added an option to automatically output the text with article formatting (colors, background, borders, and so on).
Maybe you guys should think about to add something like this to 0.8 release, as I really think that coulde be useful for a lot of people.
Hint: to make a nicer URL for a static page you can add the following line to your .htaccess:
So instead to open this ugly URL http://www.yourblog.com/index.php?seren ... =pagetitle you can now open this nice one: http://www.yourblog.com/pagetitle
Additionally I have added an option to automatically output the text with article formatting (colors, background, borders, and so on).
Maybe you guys should think about to add something like this to 0.8 release, as I really think that coulde be useful for a lot of people.
Hint: to make a nicer URL for a static page you can add the following line to your .htaccess:
Code: Select all
RewriteRule ^pagetitle index.php?serendipity[subpage]=pagetitle
-
- Core Developer
- Posts: 30022
- Joined: Tue Sep 16, 2003 9:45 pm
- Location: Cologne, Germany
- Contact:
You could also spawn an external hook and then call:
http://www.yourblog.com/plugin/static_aboutme.html
Regards,
Garvin.
http://www.yourblog.com/plugin/static_aboutme.html
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/
# 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/
-
- Core Developer
- Posts: 30022
- Joined: Tue Sep 16, 2003 9:45 pm
- Location: Cologne, Germany
- Contact:
Well, when there's one thing I am most proud of, it's Serendipity's Plugin Architecture. ))
About the coffee-stuff - I don't do coffee, so I suppose someone else needs to implement that
Regards,
Garvin.
About the coffee-stuff - I don't do coffee, so I suppose someone else needs to implement that
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/
# 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/
-
- Regular
- Posts: 62
- Joined: Thu Oct 07, 2004 3:16 pm
no problem
I have just released version 0.3 (look into first post) and made an englisch info page in my blog: http://www.romulus23.de/s9y-plugins/staticpage-en
I have just released version 0.3 (look into first post) and made an englisch info page in my blog: http://www.romulus23.de/s9y-plugins/staticpage-en
-
- Core Developer
- Posts: 30022
- Joined: Tue Sep 16, 2003 9:45 pm
- Location: Cologne, Germany
- Contact:
Sadly you need to upgrade that plugin. Please look here: http://cvs.sourceforge.net/viewcvs.py/p ... l_plugins/ for the latest version!
Regards,
Garvin
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/
# 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/
Hi!
I'm using s9y from the cvs branch and the static page plugin (also from cvs). The plugin works fine, but I want to use "fency" URIs like "http://www.mydomain.tld/static/[i]pagetitle[/i]. I followed the instructions from the plugin creator's homepage to rewrite the URI but at the bottom of the page, s9y places an error-message that the requested document doesn't exist.
TIA,
Rembrandt
I'm using s9y from the cvs branch and the static page plugin (also from cvs). The plugin works fine, but I want to use "fency" URIs like "http://www.mydomain.tld/static/[i]pagetitle[/i]. I followed the instructions from the plugin creator's homepage to rewrite the URI but at the bottom of the page, s9y places an error-message that the requested document doesn't exist.
TIA,
Rembrandt
-
- Core Developer
- Posts: 30022
- Joined: Tue Sep 16, 2003 9:45 pm
- Location: Cologne, Germany
- Contact:
The fancy URLs will only work when using mod_rewrite - do you use that?
Regards,
Garvin
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/
# 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/
Yes, I do.
And I put the following line in the .htaccess:
The correct page is displayed - but with an error-msg from s9y.
so long...
Rembrandt
PS: You can see the error-msg at the bottom of plugin creator's homepage (http://www.romulus23.de/s9y-plugins/staticpage-en)
And I put the following line in the .htaccess:
Code: Select all
RewriteRule ^static/(.*) /index.php?serendipity[subpage]=$1
so long...
Rembrandt
PS: You can see the error-msg at the bottom of plugin creator's homepage (http://www.romulus23.de/s9y-plugins/staticpage-en)
-
- Core Developer
- Posts: 30022
- Joined: Tue Sep 16, 2003 9:45 pm
- Location: Cologne, Germany
- Contact:
Ah, okay - I see. I have fixed this issue in CVS, the error is not really usefull there.
Regards,
Garvin.
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/
# 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/