* IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
 * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
 * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
 * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
 * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
 * THE SOFTWARE. 
 */
// Disallow direct access to this file for security reasons
if (!defined("IN_MYBB")) {
    die("Direct initialization of this file is not allowed.<br /><br />Please make sure IN_MYBB is defined.");
}
/* load template */
$plugins->add_hook("global_start", array(MyProfileBuddyList::get_instance(), "global_start"));
$plugins->add_hook("member_profile_end", array(MyProfileBuddyList::get_instance(), "member_profile_end"));
/* version 0.5 */
$plugins->add_hook("xmlhttp", array(MyProfileBuddyList::get_instance(), "xmlhttp"));
class MyProfileBuddyList
{
    private static $instance = null;
    public function install()
    {
        global $lang;
        MyProfileUtils::lang_load_config_myprofile();
        $settinggroups = array("name" => "myprofilebuddylist", "title" => $lang->mp_myprofile_buddylist, "description" => $lang->mp_myprofile_buddylist_desc, "isdefault" => 0);
        $gid = MyProfileUtils::insert_settinggroups($settinggroups);
        $settings[] = array("name" => "mpbuddylistenabled", "title" => $lang->mp_myprofile_buddylist_enabled, "description" => $lang->mp_myprofile_buddylist_enabled_desc, "optionscode" => "yesno", "value" => "1", "gid" => $gid);
        $settings[] = array("name" => "mpbuddylistrecord", "title" => $lang->mp_myprofile_buddylist_record, "description" => $lang->mp_myprofile_buddylist_record_desc, "optionscode" => "select\n4=4\n8=8\n12=12\n16=16\n20=20\n24=24\n40=40\n80=80\n100=100", "value" => "4", "gid" => $gid);
        $settings[] = array("name" => "mpbuddylistavatarmaxdimensions", "title" => $lang->mp_myprofile_buddylist_avatar_max_dimensions, "description" => $lang->mp_myprofile_buddylist_avatar_max_dimensions_desc, "optionscode" => "text", "value" => "100x100", "gid" => $gid);
        MyProfileUtils::insert_settings($settings);
    }
    /* no is_installed() routine, swag! */
Exemplo n.º 2
0
function myprofile_bundles()
{
    /* if you create a new bundle, register it in here, so it receives the plugin's routines */
    return array("essence" => MyProfileEssence::get_instance(), "comments" => MyProfileComments::get_instance(), "buddylist" => MyProfileBuddyList::get_instance(), "referredby" => MyProfileReferredBy::get_instance(), "visitors" => MyProfileVisitors::get_instance(), "permissions" => MyProfilePermissions::get_instance());
}