Resource icon

Call php file from a page node 1.2

No permission to download


Well-known member
EasyTarget submitted a new resource:

Call php file from a page node - Call .php file from a page node. Works in XenForo v 1.2 or 1.1.5

At some point you may want to call an external php file, and have the results show up in your forums. There are a bunch of different ways to do this, but I am going to show a simple example that helps you get the ball rolling.

The example is going to query the XenForo database for all users, and group them by their user group.

Here's what how I would do it.

Create your own directories in your XF library directory.
1. The directory structure should be like this

Read more about this resource...
@EasyTarget... Thanks for posting your great example. It was very useful.

I'm creating my first pagenode with callback. One thing I don't understand, is why don't you return a var called $templateHTML instead of $mugHTML? If you did, it seems that you could avoid having to modify the pagenode container.

Maybe I'm missing something here?
Read through the developer docs,
I already have but it doesn't help me. I think I'm lacking the basic knowledge.

I have an SQL Query which I host on a php file. It lists the forum members and some stats.
It is absolutely stand-alone but I want it to be integrated as a page node.

The dev docs didn't help me on how to create a php class that querries the users and outputs a table with my custom sql statement.

I really want to get into it but I'm struggling with the first steps.

PS: I'm coming from this thread:
Top Bottom