MyBB-Plugins Forums
Adding links - 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)
+---- Thread: Adding links (/Thread-Adding-links)



Adding links - blake - 05-09-2011

Is there a way to add links into the left menu area of newpoints.php?


RE: Adding links - Diogo Parrinha - 05-10-2011

Yes, take a look at the /newpoints.php file, I believe that's where links are added. (can't remember right now)

Let me know if you can find it.


RE: Adding links - blake - 05-10-2011

(05-10-2011, 03:57 AM)Pirata Nervo Wrote: Yes, take a look at the /newpoints.php file, I believe that's where links are added. (can't remember right now)

Let me know if you can find it.
How do I add it?
I think this is the code?
PHP Code:
// default menu options
$menu[0] = '<a href="'.$mybb->settings['bburl'].'/newpoints.php">'.$lang->newpoints_home.'</a>';
if (
$mybb->settings['newpoints_main_statsvisible'] == 1)
    
$menu[1] = '<a href="'.$mybb->settings['bburl'].'/newpoints.php?action=stats">'.$lang->newpoints_statistics.'</a>';
if (
$mybb->settings['newpoints_main_donationsenabled'] == 1)
    
$menu[2] = '<a href="'.$mybb->settings['bburl'].'/newpoints.php?action=donate">'.$lang->newpoints_donate.'</a>';
    
if (
$mybb->input['action'] == '')
{
    
$menu[0] = "&raquo; ".$menu[0];
}
elseif (
$mybb->input['action'] == 'stats')
{
    
$menu[1] = "&raquo; ".$menu[1];
}
elseif (
$mybb->input['action'] == 'donate')
{
    
$menu[2] = "&raquo; ".$menu[2];






RE: Adding links - Diogo Parrinha - 05-11-2011

At the bottom of that code add:
PHP Code:
$menu[3] = '<a href="'.$mybb->settings['bburl'].'/newpoints.php?action=MYPAGE">This is my new page</a>'



RE: Adding links - blake - 05-11-2011

I got this error
Parse error: syntax error, unexpected T_IF in /home/gfxcafen/public_html/mcmines.com/inc/plugins/newpoints.php on line 57
Here is the code with MY edits.
PHP Code:
$menu = array();
// default menu options
$menu[0] = '<a href="'.$mybb->settings['bburl'].'/newpoints.php">'.$lang->newpoints_home.'</a>';
if (
$mybb->settings['newpoints_main_statsvisible'] == 1)
    
$menu[1] = '<a href="'.$mybb->settings['bburl'].'/newpoints.php?action=stats">'.$lang->newpoints_statistics.'</a>';
if (
$mybb->settings['newpoints_main_donationsenabled'] == 1)
    
$menu[2] = '<a href="'.$mybb->settings['bburl'].'/newpoints.php?action=donate">'.$lang->newpoints_donate.'</a>';
    
$menu[3] = '<a href="'.$mybb->settings['bburl'].'/buy.php">Buy Diamonds</a>'
    
if ($mybb->input['action'] == '')
{
    
$menu[0] = "&raquo; ".$menu[0];
}
elseif (
$mybb->input['action'] == 'stats')
{
    
$menu[1] = "&raquo; ".$menu[1];
}
elseif (
$mybb->input['action'] == 'donate')
{
    
$menu[2] = "&raquo; ".$menu[2];




RE: Adding links - Diogo Parrinha - 05-12-2011

You forgot the last ;