MyBB Community Forums

Full Version: Plugin Changes coming in 1.6.5
You're currently viewing a stripped down version of our content. View the full version with proper formatting.
Pages: 1 2 3 4 5 6 7
(2011-10-29, 02:42 PM)Dylan M. Wrote: [ -> ]
(2011-10-29, 10:54 AM)crazy4cs Wrote: [ -> ]Dang, gotta do long off changes. Oh boy, this is gonna pretty sum up my work.

I did all of my plugins in under 5 minutes. It isn't really that hard man.

It is? So what changes are needed to this file to make it work?

$plugins->add_hook('postbit', 'nfsigs_postbit');
$plugins->add_hook('member_profile_end', 'nfsigs_profile');

function nfsigs_info()
{
    return array(
        'name'          => 'Nofollow Signatures & Member Websites',
        'description'   => 'Makes signatures and members website link nofollow in both threads and member profiles.',
		'website'		=> 'http://petforums.biz',
		'author'		=> 'AJS',
		'authorsite'	=> 'http://petforums.biz',
		'version'		=> '1.1',
		'compatibility'	=> '16*',
		'guid'			=> '3d389cf01bb56abab0715c72b5a64aee'
	);
}

function nfsigs_postbit($post)
{
	$post['signature'] = str_replace('<a href="', '<a rel="nofollow" href="', $post['signature']);
	$post['button_www'] = str_replace('<a href="', '<a rel="nofollow" href="', $post['button_www']);
}

function nfsigs_profile()
{
	global $db, $mybb, $website, $signature;
	$website = str_replace('<a href="', '<a rel="nofollow" href="', $website);
	$signature = str_replace('<a href="', '<a rel="nofollow" href="', $signature);
}

?>

Issue Type: Return Code
Hook Name: postbit
Function Called: nfsigs_postbit

If I see one example, it may be easier to do the rest.
for the "Retuirn Code" type issue, just this

$plugins->add_hook('postbit', 'nfsigs_postbit');
$plugins->add_hook('member_profile_end', 'nfsigs_profile');

function nfsigs_info()
{
    return array(
        'name'          => 'Nofollow Signatures & Member Websites',
        'description'   => 'Makes signatures and members website link nofollow in both threads and member profiles.',
		'website'		=> 'http://petforums.biz',
		'author'		=> 'AJS',
		'authorsite'	=> 'http://petforums.biz',
		'version'		=> '1.1',
		'compatibility'	=> '16*',
		'guid'			=> '3d389cf01bb56abab0715c72b5a64aee'
	);
}

function nfsigs_postbit($post)
{
	$post['signature'] = str_replace('<a href="', '<a rel="nofollow" href="', $post['signature']);
	$post['button_www'] = str_replace('<a href="', '<a rel="nofollow" href="', $post['button_www']);

	return $post;
}

function nfsigs_profile()
{
	global $db, $mybb, $website, $signature;
	$website = str_replace('<a href="', '<a rel="nofollow" href="', $website);
	$signature = str_replace('<a href="', '<a rel="nofollow" href="', $signature);
}

?>
(2011-10-29, 04:56 PM)Hay_Den Wrote: [ -> ]I have 20+ plugins Undecided

That you've made, or are using? Its the plugin authors' responsibility to keep his/her plugins up to date. Including all the private plugins I've made I have around 30. As I've already stated, it took me 5 minutes to update them all.
The fix you provided didn't work, pavemen.

(2011-10-30, 04:05 AM)Dylan M. Wrote: [ -> ]That you've made, or are using? Its the plugin authors' responsibility to keep his/her plugins up to date. Including all the private plugins I've made I have around 30. As I've already stated, it took me 5 minutes to update them all.

I'll pay you (or anyone else) to update mine.
Damn. I hope there will be a noob-friendly guide for this. I'm confused now.
(2011-10-30, 02:13 PM)Solidus Wrote: [ -> ]The fix you provided didn't work, pavemen.

(2011-10-30, 04:05 AM)Dylan M. Wrote: [ -> ]That you've made, or are using? Its the plugin authors' responsibility to keep his/her plugins up to date. Including all the private plugins I've made I have around 30. As I've already stated, it took me 5 minutes to update them all.

I'll pay you (or anyone else) to update mine.

what do you mean it didn't work? the script i provided only tells you if you need to check for the fix, not if it actually has been fixed.
dang... updating 1.6.5 will takes about 2-3 nights for newbie Wink
Could someone make a script that can determine the codes to fix ? Smile
that is what my script that i posted earlier does. It tells you which files need to be updated and what functions in each of those files that needs to be updated and what type of update is needed.

it wont fix it for you, but it gives you the info you need to fix it yourself, or to look for updated plugins that have the fix already.
Thanks!
I will start, looking at it..
Pages: 1 2 3 4 5 6 7