MyBB Community Forums

Full Version: Need help with my first plugin
You're currently viewing a stripped down version of our content. View the full version with proper formatting.
Pages: 1 2 3
(2010-04-15, 12:26 AM)41shots Wrote: [ -> ]
(2010-04-14, 11:57 PM)RPicard Wrote: [ -> ]
(2010-04-14, 11:52 PM)frostschutz Wrote: [ -> ]add the missing ;?

Ha ha, thanks. Works like a charm now.

Do you have a demo of this up? looks interesting.

I'm working on the ACP settings now. I should have it finished tonight.
Okay, so here's my deactivation function:

function adfly_deactivate()
{
$db->query("DELETE FROM ".TABLE_PREFIX."settings WHERE name ='adflyID'");
$db->query("DELETE FROM ".TABLE_PREFIX."settinggroups WHERE name='adfly'");
}

I'm getting this error:

Call to a member function query() on a non-object in (...)

on the line of the first query. Any thoughts?
global $db;
(2010-04-15, 12:43 AM)frostschutz Wrote: [ -> ]global $db;

lmao, thanks. I keeping missing the little things.
preg_replace is really the only proper solution. With str_replace, you don't properly capture entities if required, and it will automatically convert links such as the quote links. And I'm sure you don't want internal links to go through that as well.

And it's not a good idea to hold peoples' hands like this. This is why we have so many sucky plugins - people make plugins just don't know how to code and don't understand WTF is really going on.
(2010-04-15, 02:21 AM)Yumi Wrote: [ -> ]preg_replace is really the only proper solution. With str_replace, you don't properly capture entities if required, and it will automatically convert links such as the quote links. And I'm sure you don't want internal links to go through that as well.

And it's not a good idea to hold peoples' hands like this. This is why we have so many sucky plugins - people make plugins just don't know how to code and don't understand WTF is really going on.

Get over yourself. I'm trying to learn.

To everyone else, thanks a lot! The plugin has been released here - http://betarelease.net/thread-adf-ly-links
(2010-04-15, 02:46 AM)RPicard Wrote: [ -> ]I'm trying to learn.
That's great, and I strongly support that.
However, you don't learn by copying and pasting stuff you don't even understand.

I, for one, strongly recommend anyone against using code that the author doesn't even fully understand.

Otherwise, I've said enough about your silly ideals and general lack of ability - do what you want, I personally don't care.
(2010-04-15, 05:36 AM)Yumi Wrote: [ -> ]do what you want, I personally don't care.

Then your posting here...why?
I somewhat agree with Yumi, that a line should be traced between professionnal software developpers and newbie beginners playing with plugins like in a sandbox.

The new average user coming to MyBBoard.net would not be able to distinguish the difference between the two and could put himself in trouble with broken plugins, unsecure plugins or non-convivial plugins.

This is why i am working with someone else on a new forum that will be dedicated for free advertising of all plugins/theme/MyCodes developpers and giving specific informations about their expertise and actual work.

This should have been done years ago, for the sake of all MyBB users... Wink
I completely disagree, if a line is drawn between the two, how is anyone supposed to cross it and become, what you think is 'professional'?

I do think your idea for a site with information on developers is good though.
(2010-04-15, 04:47 PM)RPicard Wrote: [ -> ]I completely disagree, if a line is drawn between the two, how is anyone supposed to cross it and become, what you think is 'professional'?

I do think your idea for a site with information on developers is good though.

@your first point. When you reach a certain level, you know it. When people beg you for stuff, when you are approached with paid jobs. etc. When you develop a system.
Pages: 1 2 3