Guest Book 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 »

So I guess the wisest thing to do is make the guestbox plugins configuration so that you can define a special email address where mail gets sent to?

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/
Wizard
Regular
Posts: 103
Joined: Sat Aug 13, 2005 7:18 am
Location: Southern California
Contact:

Post by Wizard »

No, you seem to be missing the point. The already is a configuration option to send an email to the admin.
Image
The guest book plugin is NOT using the configured admin account to send the email notification to. It is using the logged in users email address. In other words it is sending the notification to the same user that wrote the message. That is why it errored off with the user that was not logged in. No email address to send to! I suspect that the users that have it working are not using email notification like I am currently doing until this bug is fixed.
Wizard
My WeBlog
garvinhicking
Core Developer
Posts: 30022
Joined: Tue Sep 16, 2003 9:45 pm
Location: Cologne, Germany
Contact:

Post by garvinhicking »

I'm not really missing the point, I'm just thinking on the actual code of the plugin :)

What the plugin defines as "use admin email" in reality is a "use logged in users email address". In previous s9y versions the $serendipity['email'] address was always set, but when s9y got multiple users, the 'email' variable always containde the value of new users.

Thus it's hard to find the email address of an admin user, when in effect s9y can have multiple admins! Thus I think it's wiser to define the mail that recieves the guestbook entries, right? :)

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/
Wizard
Regular
Posts: 103
Joined: Sat Aug 13, 2005 7:18 am
Location: Southern California
Contact:

Post by Wizard »

Ah, I see. You are right. A specified email address would do the trick. Perhaps in the plugin you should take out the "Send e-mail to admin" option and add a definable email address to receive guest book entries.
Wizard
My WeBlog
garvinhicking
Core Developer
Posts: 30022
Joined: Tue Sep 16, 2003 9:45 pm
Location: Cologne, Germany
Contact:

Post by garvinhicking »

Okay, just committed as version 1.32 :)

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/
Wizard
Regular
Posts: 103
Joined: Sat Aug 13, 2005 7:18 am
Location: Southern California
Contact:

Post by Wizard »

Not sure what's happening, but I can't get the update. I see the upgrade red icon, the log says it's fetching the upgrade files, everthing looks good, no errors. Yet, when I look at my plugin it still states v 1.31 and when I save my Spartacus again (clearing the cache) I can see the upgrade icon again and still it does the same thing. No upgrade. What gives?
Wizard
My WeBlog
garvinhicking
Core Developer
Posts: 30022
Joined: Tue Sep 16, 2003 9:45 pm
Location: Cologne, Germany
Contact:

Post by garvinhicking »

Are you maybe using the 0.9 final release? It has a spartacus upgrade problem that is resolved in current nightlies and the 0.9.1 maintenance branch. The 0.9.1 version will be released as soon as I have more time to put a release online and watch some more bugreports.

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/
Wizard
Regular
Posts: 103
Joined: Sat Aug 13, 2005 7:18 am
Location: Southern California
Contact:

Post by Wizard »

Yeah, I'm using the released version of s9y, 0.9 with PHP 4.3.11. Should I wait? or can I get just the plugin from somewhere else?
Wizard
My WeBlog
garvinhicking
Core Developer
Posts: 30022
Joined: Tue Sep 16, 2003 9:45 pm
Location: Cologne, Germany
Contact:

Post by garvinhicking »

Upgrading the plugin only sadly does not help, you also need an upgraded core file. I'd suggest you to use our current nightlies, or fetch the "0.9" branch from SVN to get the upcoming 0.9.1 relase code?!

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/
Wizard
Regular
Posts: 103
Joined: Sat Aug 13, 2005 7:18 am
Location: Southern California
Contact:

Post by Wizard »

I finally upgraded to the 1.32 plugin, but I'm now getting an error.

Code: Select all

Warning: Missing argument 4 for serendipity_sendmail() in /home/content/html/serendipity/include/functions.inc.php on line 254
Is this what you are talking about where I will need an upgraded core file? Where do I get this file? From which nightly? Or should I get the entire 0.9.1? Perhaps I should wait for the official release of 0.9.1? I guess all I need is the updated functions.inc.php file, but sometimes one file calls another which calls another so an upgrade could be in order.
Wizard
My WeBlog
garvinhicking
Core Developer
Posts: 30022
Joined: Tue Sep 16, 2003 9:45 pm
Location: Cologne, Germany
Contact:

Post by garvinhicking »

Oh, that's right, it was a mistake in the guestbook plugin. Go and edit the file and locat ethe serendipity_sendmail() function, and modify it so that the last parameter is "null":

Code: Select all

serendipity_sendMail($target, TEXT_EMAILSUBJECT, sprintf(TEXT_EMAILTEXT,$serendipity['POST']['shoutname'],$serendipity['POST']['shouttext']), null);
The plugin file thing only applied to the new Spartacus version, not related to the guestbook plugin whatsoever :)

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/
Wizard
Regular
Posts: 103
Joined: Sat Aug 13, 2005 7:18 am
Location: Southern California
Contact:

Hooray!

Post by Wizard »

That did it! I guess you can finally call this problem closed! Thanks Garvin.
Wizard
My WeBlog
garvinhicking
Core Developer
Posts: 30022
Joined: Tue Sep 16, 2003 9:45 pm
Location: Cologne, Germany
Contact:

Re: Hooray!

Post by garvinhicking »

Glad to have been of help! :)

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