Storing data in a session
#1
I'm creating my third plugin, but I don't know how I'm able to update a session variable. I'm using $_SESSION and it doesn't want to work. Is there a function that doe what I'm wanting to do?

I'm also wanting to create a new page on the administration panel. Something like the new points plugin, which has its own tab and sub-menu.

Any help will be awesome. Thanks.
[Image: banner_728.png]
Reply
#2
You have to first start the session using session_start() before you may use the $_SESSION variables.
Reply
#3
(02-08-2012, 12:08 PM)Mr Josh Wrote: I'm creating my third plugin, but I don't know how I'm able to update a session variable. I'm using $_SESSION and it doesn't want to work. Is there a function that doe what I'm wanting to do?

There's session data inside the mybb class, which can be accessed through $mybb->session. Not sure if that's what you wanted.

(02-08-2012, 12:08 PM)Mr Josh Wrote: I'm also wanting to create a new page on the administration panel. Something like the new points plugin, which has its own tab and sub-menu.

You'll need to create a new folder under admin/modules, and add a file called module_meta.php.

Browse through some of the other module folders for examples of what you'll need to do to add your own sub-menu's.
The home module seems the most straight-forward and easy to read.

Reply


Forum Jump:


Users browsing this thread: 1 Guest(s)