How i define('Xibo') in my customise php form

Dear Dan hi

how i can define(‘XIBO’)
defined(‘XIBO’) or die(“Sorry, you are not allowed to directly access this page.
Please press the back button in your browser.”);

where i keep my php form so that define(‘XIBO’) is automatically included in my php form.

now it give error in my php form at the time of running
Error is as follows
Sorry, you are not allowed to directly access this page.
Please press the back button in your browser.

If you’re developing a module that Xibo itself will execute as part of the CMS then that will be defined for you. If you’re loading your PHP page directly (by calling it’s URL rather than going though index.php and hence Xibo’s authentication/authorisation mechanism) then it’s no longer part of the Xibo system and hence it’s correctly denying you access.

You either need to make your code standalone, or have it called properly through the main Xibo codebase.

i want to use login page repeat but saved this login_page again as otp.php now i have two php form in my html directory 1)login_page.php 2) otp.php. after click on Login button on Login_page form how i can call that OTP.php form guide me

So when you access the login page inside Xibo, your browser points to index.php?p=login_page

You’d need to define your otp.php file as a page in the Xibo database, and then you’d access it at index.php?p=otp

I say “I think” here because CMS development isn’t something I do regularly, but that’s the general idea. index.php is a controller than handles authentication/authorisation so you would need to run your page via that controller if you want it to be part of the CMS.

in which table in xibo database you saved all form name? and in xibo folder where i keep my this OTP.php form so that it work as part of CMS

The pages table I believe.

Dear Alex Lot of Thanks for Guidance

in Pagegroup Table i have inserted one row as follows

PagegroupID =15 and PageGroup=otp

in Pages Table

i have inserted one row is as follows

Pageid =36 Name =otp_page PageGroupid=15

now in login_page.php

action=“theme/default/html/otp_page.php”

but it shows following error

Sorry, you are not allowed to directly access this page.
Please press the back button in your browser.

when in login page action="index.php?p=otp_page

it again give same error

Sorry, you are not allowed to directly access this page.
Please press the back button in your browser.

plz what is wrong? plz tell me steps

Sachin

Guide me Alex Sir

in Pagegroup Table i have inserted one row as follows

PagegroupID =15 and PageGroup=otp

in Pages Table

i have inserted one row is as follows

Pageid =36 Name =otp_page PageGroupid=15

now in login_page.php

action=“theme/default/html/otp_page.php”

but it shows following error

Sorry, you are not allowed to directly access this page.
Please press the back button in your browser.

when in login page action="index.php?p=otp_page

it again give same error

Sorry, you are not allowed to directly access this page.
Please press the back button in your browser.

plz what is wrong? plz tell me steps

Sachin

Plz Read My issue and Give Solution

i followed your all steps but why my otp.php page occurred error

I don’t know the answer to your question. It seems to me like you probably have the page in the wrong place, and that you haven’t assigned permissions for your users to access that page in the first place, but as I said before CMS development isn’t my function within the Xibo project.

Please keep in mind we’re not obliged to answer your questions here. If you would prefer to work with a Xibo developer on a paid basis then we can arrange that via Spring Signage, otherwise you will need to dig in to the CMS codebase yourself to work out how that page display mechanism works.

Dear Alex

Just tell me where i Keep my OTP.php for (Folder Location). so that it become a part of CMS

You can’t just throw a page in and have it work, unless you have written the page to be entirely separate from Xibo.

All pages in Xibo are served through index.php and called up through the p= parameter. p should match the name of your php page in lib/pages/ and your page should contain a class called <name>DAO which has a method called displayPage().

You really need to look through the other controllers in pages to see what is happening for those pages too.

Disclaimer - this has completely changed in 1.8

A lot of Thanks for Valuable Guidance. i will try