1. 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

Discussion in 'XenForo Questions and Support' started by Renada, Mar 18, 2011.

  1. Renada

    Renada Active Member

    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
     
  2. Brogan

    Brogan XenForo Moderator Staff Member

    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?
     
  3. Renada

    Renada Active Member

    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
     
  4. Brogan

    Brogan XenForo Moderator Staff Member

    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.
     
  5. Renada

    Renada Active Member

    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 :)
     
  6. Brogan

    Brogan XenForo Moderator Staff Member

  7. Renada

    Renada Active Member

Share This Page