Current time: 02-10-2012, 07:16 AM Hello There, Guest! (LoginRegister)




MySubscriptions, Donation Bar, MyDownloads, MyAchievements and support for our free and paid plugins. All that for $7!

Advertise Here!
Are you looking to advertise on this forum? Please read this announcement thread.


Post Reply 
 
Thread Rating:
  • 0 Votes - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
Important info for developers
09-15-2009, 01:20 AM (This post was last modified: 08-18-2010 03:16 AM by Pirata Nervo.)
Post: #1
Important info for developers
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>";


[Image: s.png]
Find all posts by this user
Quote this message in a reply

08-18-2010, 03:00 AM
Post: #2
RE: Important info for developers
add setting for and item? what would i use for that?
Find all posts by this user
Quote this message in a reply
08-18-2010, 03:17 AM
Post: #3
RE: Important info for developers
(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

[Image: s.png]
Find all posts by this user
Quote this message in a reply
08-18-2010, 03:24 AM
Post: #4
RE: Important info for developers
not really, as there is no auto generation of the items setting page in the shop items.
Find all posts by this user
Quote this message in a reply

08-18-2010, 03:31 AM
Post: #5
RE: Important info for developers
Keep in mind that NewPoints is NOT the Shop plugin.
Settings are completely different from Item Options

[Image: s.png]
Find all posts by this user
Quote this message in a reply
Post Reply 


Forum Jump:


User(s) browsing this thread: 1 Guest(s)