Hello There, Guest! › Register

MySubscriptions 2.2 released.
Looking for a custom plugin for your site? Ask here for a quote.

Editing NewPoints Menu
#1

I searched around and found some threads similar to what I was looking for, but they must be outdated or something because it's no way it's the same fix I'm looking for.

I'm just trying to add my own links to the Menu drop down on newpoints.php (where there's donation, bank, lottery and so on on the drop menu.) Like I said, looked around and it said to edit the newpoints.php which I opened and looked around and even tried editing.

I ended up messing up my newpoints page but I kept a fresh copy too so I just restored it. I messed around but I don't know what I have to edit specifically to add my own links. These links are custom php pages I made myself that already work. I just want to make it so a link in the menu of the newpoints.php directs there. Same with directing to the game center as well so I would like to get some help on this extra/custom menu links.

Thanks in advance. Can't stop loving this plugin either! Big Grin
#2

You must edit this part of the code:
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>';
    
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];

Do you understand it or not?
To download our paid plugins and receive support you must be a paid subscriber. Click here for more information.
#3

I think I may understand it, but what would I put for the second field? At the " .$lang->---. " part I mean. I'll mess around that part myself but do I need to fill out that area? I'm asking because that separate php page I'm making, I don't think there's going to be a lang-> file or whatever for it. Will get to experimenting, but yeah.
#4

$lang->blablabla is just a variable defined in the newpoints language file like:
$l['blablabla'] = 'string';
To download our paid plugins and receive support you must be a paid subscriber. Click here for more information.
#5

Agh, I'm having some real trouble here. I've been editing back and forth and there just has been errors and even times where the page doesn't load anymore. I have a safe newpoints file so I can replace it every time I mess up, but it's gotten a bit annoying now.

I have some custom pages I want to add in but right now I'm just trying to get the Game Section link to appear which is located at /games.php, but I can't get it to appear on the menu. I've tried so many different codes and even copying and editing but to no avail, it's just coming up with errors. I think I really do need an example as a helping hand. How would I go about with putting a game section link there on the left menu?

It's on my root/forums/games.php, that's the direct php file for the game section page. How would I get a menu link up saying "Game Section" and linking it to the games.php? Sorry for bugging you so much. ;_;
#6

Here's the code for a custom fourth entry:
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'].'/newpoints.php?action=custompage">Page Name</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];

elseif (
$mybb->input['action'] == 'custompage')
{
    
$menu[3] = "&raquo; ".$menu[3];

To download our paid plugins and receive support you must be a paid subscriber. Click here for more information.
#7

I had an error post earlier but I deleted it.

Everything is working fine now. Thanks a bunch and great plugin and work as usual.

Cheers.
#8

No problem Smile
To download our paid plugins and receive support you must be a paid subscriber. Click here for more information.
#9

which .php we must edit? I could not find the codes.
#10

(05-20-2013, 11:02 PM)z0mbie Wrote: which .php we must edit? I could not find the codes.

Inc -> Plugins -> NewPoints.php




Users browsing this thread: 1 Guest(s)