Create an account

Very important

  • To access the important data of the forums, you must be active in each forum and especially in the leaks and database leaks section, send data and after sending the data and activity, data and important content will be opened and visible for you.
  • You will only see chat messages from people who are at or below your level.
  • More than 500,000 database leaks and millions of account leaks are waiting for you, so access and view with more activity.
  • Many important data are inactive and inaccessible for you, so open them with activity. (This will be done automatically)


Thread Rating:
  • 369 Vote(s) - 3.47 Average
  • 1
  • 2
  • 3
  • 4
  • 5
WHMCS Addon Module with Multiple Pages

#1
I am currently working on developing my first WHMCS Addon Module, and so far everything has gone very well. However, I need to make multiple content pages, and the only way to display output according to the Wiki Article is to echo it in the output function. How can I create individual pages when the only way to display content is via a single PHP function?

I am assuming using divs, and hiding the relevant divs, although not exactly the best method. It says you can use the "modulelink" variable to link back to the module, but I have no idea how to use this, or if it can be used for making multiple content pages.

[To see links please register here]

Reply

#2
After some tinkering, it was much more simple than I realized, and the "modulelink" variable was just so you could link back to the page. To create additional pages, you can basically just do something along the lines of...

<a href="addonmodules.php?module=device_portal&catid=1">Datacenters</a>

Then in the output function have...

$category = $_GET['catid'];

if ($category == "1" || $category == "")
{
//page 1 content here
}
else if ($category == "2")
{
//page 2 content here
}

and so on.
Reply



Forum Jump:


Users browsing this thread:
1 Guest(s)

©0Day  2016 - 2023 | All Rights Reserved.  Made with    for the community. Connected through