guestbook 2.0 testers

Creating and modifying plugins.
carl_galloway
Regular
Posts: 1331
Joined: Sun Dec 04, 2005 5:43 pm
Location: Andalucia, Spain
Contact:

Post by carl_galloway »

so we need someone like mgroeninger or falk :wink: to come to our rescue and give you the extra info you need. Probably find its a no brainer once you know what to look for, which would be typical of Serendipity. Everything has already been done before but learning about it... :lol:
Timbalu
Regular
Posts: 4598
Joined: Sun May 02, 2004 3:04 pm

Post by Timbalu »

I'll look for the img dir problem tomorrow or next WE

The altering table issue is easy to do, if someone knows how to change several fields in just one query. What I did, does not seem to be right:

Code: Select all

		$q = "ALTER TABLE {$serendipity['dbPrefix']}guestbook ( CHANGE name name varchar(100) ) . 
			ALTER TABLE {$serendipity['dbPrefix']}guestbook ( CHANGE body text ) . 
			ALTER TABLE {$serendipity['dbPrefix']}guestbook ( CHANGE timestamp datestamp )";
Perhaps someone has an idea for this.
Ian
mgroeninger
Regular
Posts: 546
Joined: Mon Dec 20, 2004 11:57 pm
Contact:

Post by mgroeninger »

Ok, so this is long, poorly thought out, and I haven't really been following this thread, so if I take more away from the conversation than I offer, just let me know and I shut up... *grin*

Personally, I think I would prefer to run each of those seperately so that you can pull info (like errors) out after the query...

Something like this (though it doesn't test the results):

Code: Select all

$queries = array();
array_push($queries,"ALTER TABLE {$serendipity['dbPrefix']}guestbook ( CHANGE name name varchar(100) )");
array_push($queries,"ALTER TABLE {$serendipity['dbPrefix']}guestbook ( CHANGE body text )");
array_push($queries,"ALTER TABLE {$serendipity['dbPrefix']}guestbook ( CHANGE timestamp datestamp )");

foreach ($queries as $query) {
    $sql = serendipity_db_schema_import($query);
}
Ok, for images I did this in linklist:
I set up a configuration option. If this is true it uses the plugin folder, otherwise it uses the default template folder:

Code: Select all

            case 'imgdir':
                    $propbag->add('type', 'boolean');
                    $propbag->add('name', PLUGIN_LINKS_IMGDIR);
                    $propbag->add('description', PLUGIN_LINKS_IMGDIR_BLAHBLAH);
                    $propbag->add('default', 'true');
                break;
Then, somewhere before the output I set the folder based on the configuration

Code: Select all

$imgdir = $this->get_config('imgdir');
        if ($imgdir) {
            $imgdir = $serendipity['baseURL'].'plugins/'.$plugin_dir;
        } else {
            $imgdir = $serendipity['baseURL'].'templates/default';
        }
But I did this before we had smarty, so I really should change this to also test the current template using serendipity_getTemplateFile somehow.

(I'll have to think about that.)

The permalink thing is probably easiest to see in the contactform plugin... look for the permalink configuration setting, and the interaction with the "selected" function.
Timbalu
Regular
Posts: 4598
Joined: Sun May 02, 2004 3:04 pm

Post by Timbalu »

thanks for helping!
I have send guestbook 2.0b to the testers.

- Now serendipity_event_guestbook is nearly full template based (see plugin_guestbook_entries.tpl and plugin_guestbook_form.tpl in $this_plugin/tpl dir)
- You will find images shorttime.gif, button_background.png and delete.png in $this_plugin/img dir now.
- Change css file to your needs
- Please check other lang files - actualy only en, de and de-utf8 will work
- Permalink is a full path from http root eg. /serendipity/pages/guestbook.html
- Please try mgroeningers version of ALTERING TABLE which I build in, so please give it a try.

Ian
Timbalu
Regular
Posts: 4598
Joined: Sun May 02, 2004 3:04 pm

Post by Timbalu »

It took quite a while...

But hopefully it should be ready now.
If someone is (still) interested, please drop a PM.

Regards, Ian

Features:

Version 1.20 - 2006-09-26
--------------

- Target admin mail address should now be compatible to old guestbook version 1.38 - just one targetmail used

- Markup config var makes tpl based entries textfield output get parsed through S9y standard text formatting and converting standard smilies

- Change old guestbook table now works for mysql (only?)

- More cleanup / renaming and reconfigured wordwrap in config for 2.0 final

- Now the guestbook should work well with/without CAPTCHAS - this needed a new config variable so please check your Captchas settings in spamblock and! guestbook plugins

- Generell clean up and messages tweaks.

- Now serendipity_event_guestbook is nearly full template based (see plugin_guestbook_entries.tpl and plugin_guestbook_form.tpl)

- You will find images shorttime.gif, button_background.png and delete.png in $this_plugin/img dir now.

- Change css (style_guestbook_backend.css) and template files to your needs

- Please check other lang files - actualy only <en>, <de> and <de-utf8> will work!

- Permalink is a full path from http root eg. "/serendipity/pages/guestbook.html" !

- Please Note: This version is making use of plugin::spamblock features and captchas (disabled for admins),

- Please Note: timelock and sessionlock config vars will not be used anymore - removed by table update
garvinhicking
Core Developer
Posts: 30022
Joined: Tue Sep 16, 2003 9:45 pm
Location: Cologne, Germany
Contact:

Post by garvinhicking »

Hi!

Do you want me to commit your new code to CVS? :)

Best 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