static page plugin

Creating and modifying plugins.
garvinhicking
Core Developer
Posts: 30022
Joined: Tue Sep 16, 2003 9:45 pm
Location: Cologne, Germany
Contact:

Post by garvinhicking »

No, there's no way to do that yet. And no way I can recommend.

The best way for you would be to create a plugin for your photo gallery which shows the gallery. You could use the serendipity_event_staticpage for a foundation of that.

Just modify the part where $this->get_config('content') is echod to include your photo gallery code.

Regars,
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/
Martin
Regular
Posts: 90
Joined: Mon Sep 27, 2004 1:30 am
Location: Oslo
Contact:

Post by Martin »

Hello peoples. :)

I am using the static page plug and it's pretty sweet, but as some of you may have understood by now I can never leave well enough alone. ;)

Would it be possible by modifying the code to affect the sidebars when viewing static pages? Let's say that I am usually displaying the random photo plugin on the blog, but when the user is viewing my "about"-page I'd like to have a HTML nugget there instead.

Another example would be to completely remove one of the sidebars completely when on a static page. For example you might need more space for displaying graphics.

Cheers
m
garvinhicking
Core Developer
Posts: 30022
Joined: Tue Sep 16, 2003 9:45 pm
Location: Cologne, Germany
Contact:

Post by garvinhicking »

Martin - sorry, that can't be done currently. It would be a hard task to do it - the staticpage would need to "kill" certain sidebar plugins upon execution, and creating a nice interface for that is a cumbersome task.

It's doable, though. So if you find a volunteer to implement that, I'd like it :)

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/
209dave

Code inserted at end of page source

Post by 209dave »

i've loaded the static page plugin, and everything appears to be working fine, EXCEPT the code that is inserted into the page is showing up at the bottom of the browser source code.

Code: Select all

<div class="serendipity_Entry_Date"><div class="serendipity_entry"><h4 class="serendipity_title">Other Links</h4>these are links i like.</div></div>

</body>
</html>
any ideas? i'm testing 0.8-alpha11
thanks.
garvinhicking
Core Developer
Posts: 30022
Joined: Tue Sep 16, 2003 9:45 pm
Location: Cologne, Germany
Contact:

Re: Code inserted at end of page source

Post by garvinhicking »

Dave, which template are you using? Default one? And which revision (CVS ID, top of the page) of the static page plugin?

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/
209dave

Code inserted at end of page source II

Post by 209dave »

i guess that would have been helpful information....

i'm actually creating a custom template, but it's based on
Name: Serendipity v2.3
Author: Tom Sommer
Date: 12/8-2004

and even when i swap over to that template, i still get the same result.

the plugin version for static page is
romulus_event_staticpage.php, v0.3 2004/10/16

thanks
garvinhicking
Core Developer
Posts: 30022
Joined: Tue Sep 16, 2003 9:45 pm
Location: Cologne, Germany
Contact:

Re: Code inserted at end of page source II

Post by garvinhicking »

Dave, please try the actual version from here: http://cvs.sourceforge.net/viewcvs.py/p ... staticpage

The version you'Re using is outdated for serendipity 0.8

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/
209dave

Code inserted at end of page source III

Post by 209dave »

worked like a dream :)

thanks.
Roaster
Regular
Posts: 121
Joined: Tue Feb 22, 2005 9:04 pm

Post by Roaster »

Hi,

using the latest version of this plugin I've configured this plugin like this:
Header: Imprint
Permalink: /serendipity/static/impressum.html
URL title: Imprint
Content: test

I wonder why I can/should add some content or the better question is: do I have to manually create this "impressum.html" and save it into the static subfolder?

For testing purposes I created this page manually and call it e.g. http://localhost/serendipity/static/impressum.html. The page displays in FF but not inside the blog but as a very simple page.

So the question still is: why should I edit the content in the plugin when I must manually create this static page.
And: where can I find the header and URL title.

Thx for any input
cu,
Roaster
Roaster
Regular
Posts: 121
Joined: Tue Feb 22, 2005 9:04 pm

Post by Roaster »

In reply to myself:

I've found out how it works just a minute later :P

I'm calling it now e.g. http://localhost/serendipity/index.php? ... =Impressum but I did not recognized that I wrote impressum instead Impressum (the capital 'I')

cu,
Roaster
Sturmkind
Regular
Posts: 35
Joined: Sun Nov 28, 2004 1:41 pm

Post by Sturmkind »

Are there no static page plugin available for the actual serendipity version? when i look for it at the automatic installation there it isn't ;-(

cheers
Sascha
REALITY.SYS corrupted! reboot universe [Y,n]?

» http://saschamorr.de
Oliver
Regular
Posts: 178
Joined: Mon Jan 10, 2005 7:43 pm
Location: Herne, Germany
Contact:

Post by Oliver »

Sturmkind wrote:Are there no static page plugin available for the actual serendipity version? when i look for it at the automatic installation there it isn't ;-(
How about this version:
Static Pages
Shows static pages inside your blog with your blogs design and all formattings. Adds a new menu item to the admin interface.
Author: Marco Rinck, Garvin Hicking, David Rolston, Falk Döring; version: 2.0; Upgrade to version 2.2
I installed it with SPARTACUS :)

- Oliver
Image
Sturmkind
Regular
Posts: 35
Joined: Sun Nov 28, 2004 1:41 pm

Post by Sturmkind »

My failure! ;-( Now it works O_o

cheers
Sascha
REALITY.SYS corrupted! reboot universe [Y,n]?

» http://saschamorr.de
bobdavis
Posts: 4
Joined: Sat Jun 11, 2005 12:14 am
Location: Berkeley, CA
Contact:

Error

Post by bobdavis »

I just tried installing the static page plugin(1.5), unzipped them into the folders, and then went to admin to configure plugins, and my site glitched.

I get this error:
Fatal error: Call to undefined function: serendipity_walkrecursive() in /home/content/..../html/serendipity/plugins/serendipity_plugin_staticpage/serendipity_plugin_staticpage.php on line 96

So I went and deleted the plugins, and then the site disappeared completely and I got this error:

Fatal error: Call to a member function on a non-object in /home/content/..../html/serendipity/serendipity_plugin_api.php on line 407

So I put it back and was back to the top error, but at least the site is there, sort of, with errors...

I'm probably too beginner to be trying to use user plugins, so I would be fine to just get rid of it, but it won't disappear nicely for me.

Does anyone have any ideas how to fix this?

Thanks...
garvinhicking
Core Developer
Posts: 30022
Joined: Tue Sep 16, 2003 9:45 pm
Location: Cologne, Germany
Contact:

Re: Error

Post by garvinhicking »

Bobdavis: You seem to be using a majorly outdated Serendipity.

The staticpage plugin needs Serendipity 0.8 at least.

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/
Post Reply