MyBB Community Forums
Plugin Changes coming in 1.6.5 - Printable Version

+- MyBB Community Forums (https://community.mybb.com)
+-- Forum: Community Archive (https://community.mybb.com/forum-106.html)
+--- Forum: Archived Forums (https://community.mybb.com/forum-143.html)
+---- Forum: Archived Development and Support (https://community.mybb.com/forum-155.html)
+----- Forum: MyBB 1.6 (https://community.mybb.com/forum-138.html)
+------ Forum: 1.6 General Support (https://community.mybb.com/forum-127.html)
+------ Thread: Plugin Changes coming in 1.6.5 (/thread-106729.html)

Pages: 1 2 3 4 5 6 7


RE: Plugin Changes coming in 1.6.5 - Solidus - 2011-10-29

(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.


RE: Plugin Changes coming in 1.6.5 - pavemen - 2011-10-29

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);
}

?>



RE: Plugin Changes coming in 1.6.5 - Dylan M. - 2011-10-30

(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.


RE: Plugin Changes coming in 1.6.5 - Solidus - 2011-10-30

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.


RE: Plugin Changes coming in 1.6.5 - pdtrx - 2011-10-30

Damn. I hope there will be a noob-friendly guide for this. I'm confused now.


RE: Plugin Changes coming in 1.6.5 - pavemen - 2011-10-30

(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.


RE: Plugin Changes coming in 1.6.5 - FBI - 2011-10-30

dang... updating 1.6.5 will takes about 2-3 nights for newbie Wink


RE: Plugin Changes coming in 1.6.5 - Hay_Den - 2011-10-30

Could someone make a script that can determine the codes to fix ? Smile


RE: Plugin Changes coming in 1.6.5 - pavemen - 2011-10-30

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.


RE: Plugin Changes coming in 1.6.5 - Hay_Den - 2011-10-30

Thanks!
I will start, looking at it..