XMB Forum Software
Not logged in [Login - Register]
Go To Bottom

Printable Version  
Author: Subject: Custom Page for XMB 1.10
miqrogroove
XMB 1.9.12 Lead Developer
*********


Avatar


Posts: 567
Registered: 10-1-2002
Member Is Offline

Mood: Past Three O'Clock

posted on 7-18-2025 at 07:38 PM
Custom Page for XMB 1.10


Because we are running the new beta software here, I wanted to restore the Download link we had in previous versions.

This is just a version update. XMB 1.10 uses file-based templates, so I've included our separate templates/download.php file as an example.

In the original download.php file for the root directory, the coding style has changed quite a bit. I've illustrated the use of a custom namespace, meaning none of the XMB variables or functions are directly accessible. In fact, this version of XMB doesn't expose any variables in the global namespace.

Two of the XMB shared services, core and template, are retrieved into custom global variables that I named $core and $template for simplicity. All of the logic that we need for the simple custom page is found in the methods of those two services. When we want to use a template file, we call
Code:
$template->process('filename.php');

We use two methods from the core service to display a navigation breadcrumb and to calculate the page footer statistics.

More info and a ZIP package below.

https://sourceforge.net/p/xmb-forum/code/HEAD/tree/hacks/tru...

https://docs.xmbforum2.com/index.php?title=Breaking_Changes_...

Attachment: custom-page.zip (2kB)
This file has been downloaded 0 times
View user's profile Visit user's homepage View All Posts By User

  Go To Top

Powered by XMB 1.10.00-beta-2 (Debug Mode)
XMB Forum Software © 2001-2025 The XMB Group
[Queries: 14] [PHP: 84.1% - SQL: 15.9%]