guestbook 2.0 testers

Creating and modifying plugins.
Timbalu
Regular
Posts: 4598
Joined: Sun May 02, 2004 3:04 pm

guestbook 2.0 testers

Post by Timbalu »

Hi
Timbalu worked on smartifying the plugin (version 2.0) but it has some bugs that prevent its execution. I've yet had no time to look into that, but I still have planned to do that. But my server currently has no second ethernet card, so I can't get it online.
Since Garvin disregards having a deep look :wink: into guestbook version 2.0 and still has problems with his server, I tried to find the bugs by myself. Now I think I´ll need some testers. It works for my dev site. If you are willing to help, drop me a PM with your email and I will send it to you. (read readme first).

Regards,
Ian
carl_galloway
Regular
Posts: 1331
Joined: Sun Dec 04, 2005 5:43 pm
Location: Andalucia, Spain
Contact:

Post by carl_galloway »

yes please, I need this for the Hemingway template, I'll pm my email address
Timbalu
Regular
Posts: 4598
Joined: Sun May 02, 2004 3:04 pm

Post by Timbalu »

great! its on its way.

Ian
carl_galloway
Regular
Posts: 1331
Joined: Sun Dec 04, 2005 5:43 pm
Location: Andalucia, Spain
Contact:

Post by carl_galloway »

The form works, but it isn't producing any output for the posted entries on my test server. I've tested it with a variety of templates and I get the same result.

Also, the previous version is setting $staticpage_pagetitle whereas your version isn't, and your version seems to want to set $view startpage, which I would really like changed to plugin.

Garvin, is there any chance we could get a description of the $view variable and all its properties, and some explanation for plugin authors of which is the correct variable to set - newer templates are going to make a lot of use of that and it seems like a few of the plugins have this set incorrectly or not at all.
garvinhicking
Core Developer
Posts: 30022
Joined: Tue Sep 16, 2003 9:45 pm
Location: Cologne, Germany
Contact:

Post by garvinhicking »

Hi!

http://www.s9y.org/102.html holds the description of $view and all its possible variable contents?

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/
Timbalu
Regular
Posts: 4598
Joined: Sun May 02, 2004 3:04 pm

Post by Timbalu »

carl_galloway wrote:The form works, but it isn't producing any output for the posted entries on my test server. I've tested it with a variety of templates and I get the same result.
Hi Carl
Did you check the table changes?
carl_galloway wrote:Also, the previous version is setting $staticpage_pagetitle whereas your version isn't, and your version seems to want to set $view startpage, which I would really like changed to plugin.
is this bad? any ideas?

Ian
carl_galloway
Regular
Posts: 1331
Joined: Sun Dec 04, 2005 5:43 pm
Location: Andalucia, Spain
Contact:

Post by carl_galloway »

yeah, what I meant was more than that. What does each view actually mean, and how is it set. For example the guestbook plugin doesn't seem to set $view 'plugin' which you would expect since it actually takes control of rendering the entire content pane.

There is little point providing the $view variable if we don't also have some standards on how its applied so that template designers or users who want to modify a template know exactly what each view is supposed to do.

Timbalu's new guestbook seems to set $view as startpage but I can't find anything in the sourcecode that does this, and startpage is NOT the appropriate view for it to be setting.

Many of the other plugins (downloadmanager, faq, gallery) either set $view as entry, or they set $staticpage_pagetittle. Both would seem to be inappropriate to me but without an explanation of the $view variable I might be wrong. So some clarification would be awesome.

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

Post by garvinhicking »

Hi!

The 'plugin' view usually only is set when a plugin uses the "external_plugin" event hook. Seldom plugins use this to take over "page control"; typical external_plugins are the blogpdf plugin or the RSS aggregator or popfetcher.

I'd agree that creating a verbose list of that would be fine. I think everybody could create that list, since the index.php is virtually all you need to check where the view is set. I think this is also a great task for someone who wants to gain some insight into Serendipity, or a great task for someone looking to contribute to Serendipity?
There is little point providing the $view variable if we don't also have some standards on how its applied so that template designers or users who want to modify a template know exactly what each view is supposed to do.
I fully agree, standards need to be made. Serendipity only provides the basic facility, IMHO its up to template creators to deploy "best usage" scenarios that can then be documented? I'd really like for the people needing to work with standards to define those standards bottom-up, instead of dicating them top-to-bottom. Carl, you and Costa and Hippo and others already seem to get a good grasp of this, so maybe you'd all together like to create some kind of "task force"? I understand you are extremely busy, so I hope that others will join in on your efforts?

Surely results like Hemingway or Costas recent template show much much benefit there will be. :)
Timbalu's new guestbook seems to set $view as startpage but I can't find anything in the sourcecode that does this, and startpage is NOT the appropriate view for it to be setting.
I agree. Maybe since we also discussed this recently, a good view would be "plugin_content" or something like that? We can freely use that, as far as I know no plugin makes use of setting $view until now.

HTH,
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/
carl_galloway
Regular
Posts: 1331
Joined: Sun Dec 04, 2005 5:43 pm
Location: Andalucia, Spain
Contact:

Post by carl_galloway »

Ah ha, now I sort of see it, I've had a quick look in index.php and did a find for view, so now I can see where the variable is set but I have no idea how it is set. Seems like there is some sort of test going on to see if other variables are set or if the url matches something but I can't work it out.

Looking at start, it seems the test is very simple: is the request for the base url or baseurl + index.php, but what about the others?

Could you give me an exlanation of one of them? For example the entry view or maybe the archive view.
carl_galloway
Regular
Posts: 1331
Joined: Sun Dec 04, 2005 5:43 pm
Location: Andalucia, Spain
Contact:

Post by carl_galloway »

@timbalu, sorry if this thread seems to have been hijacked, as soon as we get this $view thing explained I think we should try to find some way of incorporating it back into the guestbook, your update could be the very first to make use of the new and improved plugin standards, so please stick around and watch this unfold.
garvinhicking
Core Developer
Posts: 30022
Joined: Tue Sep 16, 2003 9:45 pm
Location: Cologne, Germany
Contact:

Post by garvinhicking »

Hi!

The index.php file is the main controller of Serendipity.

It has severl IF/ELSEIF constructs. The all start from checking the currentl URL ($url) and then going through each permalink pattern to see if it matches the current request.

The is one if/else fork for each kind of page: Search, Plugins, Single Entry, Entry overview, Category overview, Author overview, RSS feeds etc. The central part is the "preg_match" which uses the permalink Regular Expression to determine which piece of the code to fork into.

HTH,
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/
carl_galloway
Regular
Posts: 1331
Joined: Sun Dec 04, 2005 5:43 pm
Location: Andalucia, Spain
Contact:

Post by carl_galloway »

@timbalu, sorry about all of this,

I don't have enough experience of mysql to know what to do with the tables, it appears that upgrading the guestbook hasn't altered the old tables. What I might do is uninstall the guestbook then reinstall it and test it with new entries.

Ok, by reinstalling the guestbook it works, loving that new look for displaying the guestbook entries. I'll go and test it more fully.

Having a problem with the url it generates, and not sure if this is on my end or a plugin issue but basically it doesn't seem to like the permalink /pages/guestbook.html but it does resolve to index.php?serendipity[subpage]=pages/guestbook.html

All other plugins work, is this a plugin bug, or is it a problem because I overwrote the files in the plugin folder then uninstalled/reinstalled to get it working?

Also, if you could set $staticpage_pagetitle for the moment that would be awesome, at least until we can come up with some sort of standard. BTW, I'm probably the only user making that request but I'm pushing the boundaries here and I just know that newer templates are going to demand something like what I'm asking for.
Timbalu
Regular
Posts: 4598
Joined: Sun May 02, 2004 3:04 pm

Post by Timbalu »

carl_galloway wrote: sorry if this thread seems to have been hijacked, ....
Well, it looks like improvement. I'm fine with that. Please go on!

I still don't really understand where you find $staticpage_pagetitle and a $view variable in the old and/or new version.
But I'll stay tuned and watch what happens... next. :wink:

cu
Ian
carl_galloway
Regular
Posts: 1331
Joined: Sun Dec 04, 2005 5:43 pm
Location: Andalucia, Spain
Contact:

Post by carl_galloway »

Is there any chance you could put the images into a sub-folder of the plugin like the linklist plugin does? This would save the user from having to put them into their own template image folder.
Timbalu
Regular
Posts: 4598
Joined: Sun May 02, 2004 3:04 pm

Post by Timbalu »

carl_galloway wrote:@timbalu, sorry about all of this,

I don't have enough experience of mysql to know what to do with the tables, it appears that upgrading the guestbook hasn't altered the old tables. What I might do is uninstall the guestbook then reinstall it and test it with new entries.
So at this point someone could give us a hint about altering the old table. I made it with phpmyadmin and it worked...
carl_galloway wrote:Ok, by reinstalling the guestbook it works, loving that new look for displaying the guestbook entries. I'll go and test it more fully.

Having a problem with the url it generates, and not sure if this is on my end or a plugin issue but basically it doesn't seem to like the permalink /pages/guestbook.html but it does resolve to index.php?serendipity[subpage]=pages/guestbook.html
Yes that is a problem I see too. The permalink needs a fully qualified path from domain root eg. /serendipity/pages/guestbook.html. Maybe we can improve this to something better.
carl_galloway wrote:Also, if you could set $staticpage_pagetitle for the moment that would be awesome, at least until we can come up with some sort of standard. BTW, I'm probably the only user making that request but I'm pushing the boundaries here and I just know that newer templates are going to demand something like what I'm asking for
see last post
Ian
Post Reply