Quote:
Originally Posted by Andreas
It is still present in 1.5 ...
On hook paidsub_build you are defininig two functions - slw_serial() and slw_unserial().
Now, if method build_user_subscription() is being called several times within one script run, this will cause a fatal error as you the functions are already defined when the plugin is called the second time - which will halt script execution.
Also, I don't understand why you are using custom serialize functions anyway
Instead of $db->fetch_array($db->query_read()), $db->query_first is easier.
I also suggest to use phrases instead of the datastore item - this is the standard way to do such things (PM;/E-Mail Notifications).
Finally, having hardcoded text in PHP scripts is deprecated.
|
I gotcha now. So running an if(!function_exists()) would probably get that fixed.
About $db->query_first(), never knew what it did but now I do, so thanks =]
As for phrases, we wanted to offer the user a more personal and seamless experience, where they only have to use our control panel to change their settings. I understand that this isn't the standard way of doing things, but it seems to offer a better experience, which is what we're all about. Maybe I could code it to use phrases, create my own phrase group, and have a link pointed to that phrase group. I'll look into this, unless you have some suggestions.
Thanks again for the help, I'm still getting the hang of vB's system, and you've helped a lot!
EDIT The reason I'm using these functions, is because a serialize() or unserialize() fails if there is an apostrophe in the data. I don't know why, it's weird, because in our vbMailer mod, this doesn't occur. I don't have any idea why.