MyBB Community Forums
Can someone tell me why my plugin doesn't work? - Printable Version

+- MyBB Community Forums (https://community.mybb.com)
+-- Forum: Extensions (https://community.mybb.com/forum-201.html)
+--- Forum: Plugins (https://community.mybb.com/forum-73.html)
+---- Forum: Plugin Development (https://community.mybb.com/forum-68.html)
+---- Thread: Can someone tell me why my plugin doesn't work? (/thread-201020.html)



Can someone tell me why my plugin doesn't work? - mrkiller2010 - 2016-09-12

I've had this plugin working before, the problem is that the API got changed few weeks ago.
I tried to fix it but now it's not working.

Plugin: Should check entered details in the custom registration field and check it through an api before letting the user registering.

Code: http://pastebin.com/mq9qpVKB

It doesn't show any error or anything at all, I don't think it's even running I think.

I've went to plugin cache and I can see the plugin there, I've even rebooted the server, restarted apache, php etc.

Anyone that can go through the code? 

thanks


RE: Can someone tell me why my plugin doesn't work? - Shade - 2016-09-13

I've had a quick look and you're not passing the data by reference; $data exists only in your function, when you do a set_error() you actually don't set anything.

function add_fields(&$data) {
    // your code here
}

This should work.


RE: Can someone tell me why my plugin doesn't work? - mrkiller2010 - 2016-09-13

(2016-09-13, 09:29 AM)Shade Wrote: I've had a quick look and you're not passing the data by reference; $data exists only in your function, when you do a set_error() you actually don't set anything.

function add_fields(&$data) {
    // your code here
}

This should work.

Hmm, Still doesn't work.


RE: Can someone tell me why my plugin doesn't work? - Shade - 2016-09-13

This is the only problem I could find. I can have a deeper look if you provide me (by PM) a temporary FTP account.


RE: Can someone tell me why my plugin doesn't work? - mrkiller2010 - 2016-09-13

(2016-09-13, 06:14 PM)Shade Wrote: This is the only problem I could find. I can have a deeper look if you provide me (by PM) a temporary FTP account.

Sent all details through PM, thanks for trying to help me out!


RE: Can someone tell me why my plugin doesn't work? - fizz - 2016-09-15

Says the paste is no longer available.


RE: Can someone tell me why my plugin doesn't work? - Shade - 2016-09-15

I solved the isse privately fyi.