2 yabba May 18, 2009 19:39

Excellent, forever in your debt :D
Yes, I did get your email and I hope to get round to adding everything to bopit asap. Client deadlines have been against me working on my own stuff recently but there is light at the end of the tunnel.
Once again, thanks for the plugin :D
Lee
I look forward to seeing this plugin integrated in b2evo 3.x ;)
Can I also get a zip please
With a tad of luck this is the right zip ;) ( [url=http://innervisions.org.uk/am_subs.zip]am_subs.zip[/url] )
¥
Works like a charm. Great plugin
Cheers
Lee
Thanks
To run the plugin in 3.x you should change the send_mail() to
// For b2evo-2.5 and up
send_mail( $to, $to_name, $subject, $temp_message, $from, $from_name, $headers )
*edit*
Code correction
¥
I'm impressed it took you 29 minutes to find a fault in it :P
I should also pull my finger out and code the whole "subscribe to blog" bit as well ... and then there's daily/weekly/monthly summaries and .... I need longer days ;)
¥
It was interesting to sniff the unsubscribe code and compare it to my own :)
ffs, which of your plugins do I need to crack open to find yours? ... and whose did you prefer? :p
¥
It's for personal use only, pretty simple code.
function email_unsubscribe()
{
global $DB;
if( $uns_ID = param( 'unsub_ID', 'string' ) )
{
$SQL = 'DELETE FROM table_emails
WHERE MD5(email) = "'.$DB->escape( strtolower(trim($uns_ID)) ).'"';
if( $DB->query($SQL) )
{
$this->msg( 'Email successfully deleted.<br /><br />We apologise for any inconvenience caused.', 'success' );
}
else
{
$this->msg( 'Email not found', 'error' );
}
}
}
That's a pretty similar concept, I'm just a tad more paranoid ;)
¥
yabba your plugin is broken, fix it or I will destroy the human race.
Walter wrote:
yabba your plugin is broken, fix it or I will destroy the human race.
/me saves the human race by correcting sam2kb's post ;)
¥
Hi people, Ima havin' problems trying to install this in a 3.2x. Commenter gets this warning when clicking submit.
First intall was a version I grabbed a few weeks back.
Second install was the one Yabba linked to up there ^ .
Third intall was with Sam2kb 3.x edits also up there ^ .
Im assuming Sams edits fix the dodgy notification email the first install was sending out?
Would love to get this working. Ideas?
Warning: settype() [function.settype]: Invalid type in /home/pkendon/public_html/inc/_core/_param.funcs.php on line 256
Warning: Cannot modify header information - headers already sent by (output started at /home/pkendon/public_html/inc/_core/_param.funcs.php:256) in /home/pkendon/public_html/inc/_core/_template.funcs.php on line 192
Warning: Cannot modify header information - headers already sent by (output started at /home/pkendon/public_html/inc/_core/_param.funcs.php:256) in /home/pkendon/public_html/inc/_core/_template.funcs.php on line 193
Warning: Cannot modify header information - headers already sent by (output started at /home/pkendon/public_html/inc/_core/_param.funcs.php:256) in /home/pkendon/public_html/inc/_core/_template.funcs.php on line 194
Warning: Cannot modify header information - headers already sent by (output started at /home/pkendon/public_html/inc/_core/_param.funcs.php:256) in /home/pkendon/public_html/inc/_core/_template.funcs.php on line 195
Warning: Cannot modify header information - headers already sent by (output started at /home/pkendon/public_html/inc/_core/_param.funcs.php:256) in /home/pkendon/public_html/inc/_core/_template.funcs.php on line 174
Warning: Cannot modify header information - headers already sent by (output started at /home/pkendon/public_html/inc/_core/_param.funcs.php:256) in /home/pkendon/public_html/inc/_core/_template.funcs.php on line 182
That'd be the totally unsupported beta version of b2evo right? :roll:
Just for kicks, try changing "checkbox" for "boolean" in the plugins file ( approx 242 )
/**
* Check if the user has subscribed
* If they have then check if we have an email address ( for visitors )
*
* @param mixed $params
*/
function BeforeCommentFormInsert( & $params )
{
if( ( $this->subscribe = param( 'am_subs_comment', 'checkbox' ) ) && empty( $params[ 'Comment' ]->author_ID ) && empty( $params[ 'Comment' ]->author_email ) )
Sam2kb's hack has been corrected to not kick out the funky email ;)
¥
Yes, sorry, the totally unsupported version.
Ie.
if( ( $this->subscribe = param( 'am_subs_comment', 'boolean' ) ) && empty
?
yep ;)
¥
No luck. I got "bad request" message.
Ok, see if it works as expected now ;)
¥
Will do :)
Im re-downloading from here?:
With a tad of luck this is the right zip ( am_subs.zip )
This includes Sam2kb's fix?
Urm, no, I fixed it on your server ;)
¥
ok, try now ;)
¥
You uploaded, I install ?
If yes....
Notice: Undefined variable: to in /home/pkendon/public_html/plugins/am_subscriptions_plugin/_am_subscriptions.plugin.php on line 381
Notice: Undefined variable: to_name in /home/pkendon/public_html/plugins/am_subscriptions_plugin/_am_subscriptions.plugin.php on line 381
Notice: Undefined variable: from in /home/pkendon/public_html/plugins/am_subscriptions_plugin/_am_subscriptions.plugin.php on line 381
Notice: Undefined variable: from_name in /home/pkendon/public_html/plugins/am_subscriptions_plugin/_am_subscriptions.plugin.php on line 381
Notice: Undefined variable: headers in /home/pkendon/public_html/plugins/am_subscriptions_plugin/_am_subscriptions.plugin.php on line 381
Warning: Cannot modify header information - headers already sent by (output started at /home/pkendon/public_html/plugins/am_subscriptions_plugin/_am_subscriptions.plugin.php:381) in /home/pkendon/public_html/htsrv/comment_post.php on line 334
Warning: Cannot modify header information - headers already sent by (output started at /home/pkendon/public_html/plugins/am_subscriptions_plugin/_am_subscriptions.plugin.php:381) in /home/pkendon/public_html/htsrv/comment_post.php on line 335
Warning: Cannot modify header information - headers already sent by (output started at /home/pkendon/public_html/plugins/am_subscriptions_plugin/_am_subscriptions.plugin.php:381) in /home/pkendon/public_html/htsrv/comment_post.php on line 336
Warning: Cannot modify header information - headers already sent by (output started at /home/pkendon/public_html/plugins/am_subscriptions_plugin/_am_subscriptions.plugin.php:381) in /home/pkendon/public_html/inc/_core/_template.funcs.php on line 192
Warning: Cannot modify header information - headers already sent by (output started at /home/pkendon/public_html/plugins/am_subscriptions_plugin/_am_subscriptions.plugin.php:381) in /home/pkendon/public_html/inc/_core/_template.funcs.php on line 193
Warning: Cannot modify header information - headers already sent by (output started at /home/pkendon/public_html/plugins/am_subscriptions_plugin/_am_subscriptions.plugin.php:381) in /home/pkendon/public_html/inc/_core/_template.funcs.php on line 194
Warning: Cannot modify header information - headers already sent by (output started at /home/pkendon/public_html/plugins/am_subscriptions_plugin/_am_subscriptions.plugin.php:381) in /home/pkendon/public_html/inc/_core/_template.funcs.php on line 195
Warning: Cannot modify header information - headers already sent by (output started at /home/pkendon/public_html/plugins/am_subscriptions_plugin/_am_subscriptions.plugin.php:381) in /home/pkendon/public_html/inc/_core/_template.funcs.php on line 174
Warning: Cannot modify header information - headers already sent by (output started at /home/pkendon/public_html/plugins/am_subscriptions_plugin/_am_subscriptions.plugin.php:381) in /home/pkendon/public_html/inc/_core/_template.funcs.php on line 182
Try again ( no need to uninstall re-install )
¥
Bingo!
* boogey icon *
Thank you :)
No worries ;)
¥
I guess I am relieved to know that my blog gave the same basic error.
We are running 3.2 & gave this plug in it a try but, no luck.
I have been trying to do a mind meld with ¥åßßå so, I can figure this out. So far no code is coming to me but, I have had some really weird dreams. :lol:
Hi SLoch,
Whatever YaBBa did to mine is working but he had access to my server so made adjustments there. I don't know but, do you think I can zip it up for you?
there's some little hack for this plugin on 3.x, have you seen?
Ive just installed YaBBas edited Am-Subs on another 3.x Im working on and all good (so far).
Ive zipped it up for you (if this isnt a good idea then by all means dont use it ;) ).
Hopefully YaBBA doesnt mind? Readme and license is original.
http://www.gigabobhosting.com/Am_Subs3x.zip
Give it a go?
I am fairly new to b2evolution and there are certainly some things that I still dont understand. I downloaded the subscriptions plugin and installed it, but I get an error message very similar to GigaBob's. Would someone be able to help me. Thanks in advance.
Hello,
Is it possible obtain the code for the version that works correctly in 3.x?
GigaBob, the link you have posted is dead.
I downloaded the latest version which was linked on page 1, then applied the changes suggested by Sam2kb, but continued to receive the same errors as mentioned by others.
YaBBa's magic changes were not reflected here, so I am stuck.
Help will be greatly appreciated.
You'd need to hope that someone in this thread has the working code because I've stopped supporting the evocore from 2.x.7 onwards.
¥
I spent some time tinkering with it and after reviewing various threads on this forum, I succeeded.
Here is the result:
http://pastebin.ca/1884419 (I set the expiration to 'never', which probably means "you never know...") (-;
Or you can download a single ZIP from this address:
railean.net/files/temp/am_subscriptions_plugin-101.zip (not guaranteed to be valid for an eternity)
Changes that were made:
- the parameters for str_replace were written as $var$, while the message contained %var%
- inside BeforeCommentFormInsert, change 'checkbox' to 'string'
- the email sending function called near "// now lets delight them with our shiny personalised message" was not called properly
- added "// grab the rendered comment content", to capture the body of the comment itself
As far as I remember, these were the changes; except one more change (from 'boolean' to 'checkbox' somewhere in the code, but I don't remember where).
In case the files are not available anymore, you can use this pseudo-changelog to re-do the process.
I tested this on my setup of b2evo 3.3.3. If someone else is willing to give it a try, it would be great if you could provide feedback soon, such that I could tinker with it while it is still fresh in my mind.
Future bug alert :
$sql = 'select ping_id from '.$this->get_sql_table('pings').' where '.( $type = 'comment' ? 'comment' : 'post' ).'_id = '.intval( $which );
Should be $type == ;)
Good to see your code improvements, it's what OSS is all about ;)
¥
Thanks for pointing that out; it was like that before I got to it (-:
Does a trick that works in C work here too? I refer to "Yoda conditions", when you place the constant at the left of a comparison operation, such that if you accidentally type = instead of ==, the compiler says that you're trying to modify a constant.
if 'comment' == $type
Note: the change was applied, the ZIP on the site is up to date.
The new pastebin excerpt: http://pastebin.ca/1884504[/php]
gr8dude wrote:
Thanks for pointing that out; it was like that before I got to it (-:p
Pretty sure the person who created the bug was both cute and blonde .... and I have long hair :roll:
gr8dude wrote:
Does a trick that works in C work here too? I refer to "Yoda conditions", when you place the constant at the left of a comparison operation, such that if you accidentally type = instead of ==, the compiler says that you're trying to modify a constant.
I've never played with C+{,2} ( if I was gonna head along that path I'd go back to asm, nothing like *real* control ;) ), betting it doesn't work though, php is hardly a "strict" language
¥
I actually have a zip of (a) working version ... just buggered if I can remember the url to the zip :-S
I'll find it for you ;)
Btw, I assume you got my email with your bopit membership? ... kept meaning to ask :p
¥