MyBB-Plugins Forums
Important info for developers - Printable Version

+- MyBB-Plugins Forums (http://forums.mybb-plugins.com)
+-- Forum: Archived Forums (http://forums.mybb-plugins.com/Forum-Archived-Forums)
+--- Forum: MyBB 1.6.x (http://forums.mybb-plugins.com/Forum-MyBB-1-6-x)
+---- Forum: NewPoints (http://forums.mybb-plugins.com/Forum-NewPoints)
+----- Forum: Development (http://forums.mybb-plugins.com/Forum-Development)
+----- Thread: Important info for developers (/Thread-Important-info-for-developers)



Important info for developers - Diogo Parrinha - 09-15-2009

Plugin files
Plugin files must go in inc/plugins/newpoints


Language files
Language files should go in inc/plugins/newpoints/languages/LANGUAGENAME/
(if it's an admin language file, should go under inc/plugins/newpoints/languages/LANGUAGENAME/admin)

To load a language file, run this function:
PHP Code:
newpoints_lang_load("plugincodename"); 


Add option to menu
If you want to add an option to the menu in the NewPoints page, make sure you hook to 'newpoints_default_menu' and use the function you want to be used, like this:
PHP Code:
function plugincodename_menu(&$menu)
{
    global 
$mybb$lang;
    
newpoints_lang_load("plugincodename");
    
    if (
$mybb->input['action'] == 'plugincodename')
        
$menu[] = "&raquo; <a href=\"{$mybb->settings['bburl']}/newpoints.php?action=plugincodename\">".$lang->plugincodename."</a>";
    else
        
$menu[] = "<a href=\"{$mybb->settings['bburl']}/newpoints.php?action=plugincodename\">".$lang->plugincodename."</a>";




RE: Important info for developers - 24khost - 08-18-2010

add setting for and item? what would i use for that?


RE: Important info for developers - Diogo Parrinha - 08-18-2010

(08-18-2010, 03:00 AM)24khost Wrote: add setting for and item? what would i use for that?

I guess the hello world plugin + development.html answers that


RE: Important info for developers - 24khost - 08-18-2010

not really, as there is no auto generation of the items setting page in the shop items.


RE: Important info for developers - Diogo Parrinha - 08-18-2010

Keep in mind that NewPoints is NOT the Shop plugin.
Settings are completely different from Item Options