How to make a plugin - Post a wire message from the mainpage

I altered my TheWire in a way you can post a message directly from the homepage. This will, most likely, increase the use of the wire dramaticly. Which is exactly what I need to jumpstart my community.

I made changes to only a few files of TheWire.

I think this very simple plugin could benefit alot of people, but now I need to know how to make this file a plugin ;-)


Here is what I did:

Add this code in:



//mod that adds the functionality to post on the wire directly from the homepage when logged in
if (!isloggedin() && (!function_exists("loginbox_enabled") || loginbox_enabled())){
                //if logged in show add form
                    echo elgg_view("thewire/forms/add_frontpage");

This basicly did the trick. I edited a two more files so the you would return to the same page after posting.

So once again, how do I make it a plugin so other people can benefit?