• This site uses cookies. By continuing to use this site, you are agreeing to our use of cookies. Learn more.

Page with php file included

Renada

Active member
#1
Hi,

I've created a page that includes a php file by following the instructions in this thread.

The php file is an html editable table that we use for a dkp system on our kin website. I have two questions if somebody is able to help.

1) Where/how do I protect the page from being edited by everyone? I just need two raid leaders to be able to edit it.

2) When you create a page that includes a php file does that file need to be in the root? I've tried adding a /home/sites/xxxxxx.com/public_html/dir/dir/example.php and it just throws up an error but works perfectly if it's in the root.

Thanks for any help :)

Regards,
Renada
 

Brogan

XenForo moderator
Staff member
#2
Pages are currently only able to be edited from within the ACP so only administrators with the ability to manage nodes will be able to edit.

Are you using the callback function for the php component?
 

Renada

Active member
#3
Pages are currently only able to be edited from within the ACP so only administrators with the ability to manage nodes will be able to edit.

Are you using the callback function for the php component?
Hi Brogan,

Yes I'm using the callback function. The page itself can only be edited via the ACP but the table that's being pulled can be (apparently) edited by anyone right now.

I can send you the link via conversation if you'd like to see what I mean?

Regards,
Renada
 

Brogan

XenForo moderator
Staff member
#4
Please do.
I'm curious to see how the editing is possible.

There is another way you can do it.
You can use the Google table/chart API and construct the table directly using a Google spreadsheet.

That way you can then control who has access to the spreadsheet and hence who can edit it.
 

Renada

Active member
#5
Thanks Brogan :)

I don't suppose you (or anyone) know how to create a bbcode for tables do you? There was a good start in this thread here but installing it now just gives a white page.

Regards,
Renada :)