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

XF 1.0 Pages

Shamil

Well-known member
#61
It would be cool to use PHP on a per 'page' (content type) basis and for that page to be a node in the node tree - I may for instance want to use a page (and sub-nodes) as a sponsor profile and include in that their own RSS feed of news, jobs, whatever. Ok, I admit this could be a custom coded plugin but the ability to include PHP in a 'page' would allow more control.
Wouldn't the code have to be eval()'d?
 

Ashley

Business Guy
Staff member
#65
Oh, did that come across as detracting from what Kier and Mike do...not on your nelly ;) There is so much more that goes into ~everything~ than just writing it as Kier so modestly puts it :)
 

feldon30

Well-known member
#67
PHP would be very useful for creating something like a contact form, or a mini web app or tool, although I can see why you wouldn't want to allow it. :)
Kinda late to this party, but Contact Form 7 for Wordpress is an excellent implementation of a Contact Us form that is very powerful but requires no PHP in the template. It allows the site admin to define popup menus, radio buttons, checkboxes, input boxes, text areas, and file upload fields all with bbCode like tags.
 

Cezz

Well-known member
#68
Kinda late to this party, but Contact Form 7 for Wordpress is an excellent implementation of a Contact Us form that is very powerful but requires no PHP in the template. It allows the site admin to define popup menus, radio buttons, checkboxes, input boxes, text areas, and file upload fields all with bbCode like tags.
There is already a contact us form as standard on xenForo... it is at http://xenforo.com/community/misc/contact or if you click contact us in the footer it is Ajaxed :D
 

Rob

Well-known member
#71
Could you explain exactly what you want to achieve, Rob?
Sure
It would be cool to use PHP on a per 'page' (content type) basis and for that page to be a node in the node tree - I may for instance want to use a page (and sub-nodes) as a sponsor profile and include in that their own RSS feed of news, jobs, whatever. Ok, I admit this could be a custom coded plugin but the ability to include PHP in a 'page' would allow more control.
It will definitely enhance pages and give more control if people can use PHP. I'm sure a way could be implemented as we are in such an early stage of development.
 

Kier

XenForo Developer
Staff member
#72
Sure


It will definitely enhance pages and give more control if people can use PHP. I'm sure a way could be implemented as we are in such an early stage of development.
Mike and I are both strongly against being able to enter PHP code directly in the Admin CP, as that would (almost certainly) have to be stored in the database and then executed via evil(), but I'm formulating an idea in my head that would allow a page to make a callback to a PHP class (in an existing or uploaded file) that could be defined on a per-page basis...

*thinks*
 
#73
Kier you know like how some templating systems have some "whitelist" php functions that you can use in the templating system, maybe you can create a class called xF_Whitelist etc and any function that you want executed directly in the templating system should extend from that class that way it will allow an admin to use PHP in the templating system

/Just an idea
 

Mert

Well-known member
#74
What i saw within the initial presentation is creating custom pages for XenForo will be pretty easy and it can also have all abilities of internal pages.
 

feldon30

Well-known member
#76
There is already a contact us form as standard on xenForo... it is at http://xenforo.com/community/misc/contact or if you click contact us in the footer it is Ajaxed :D
That has 4 fields. Can you add radio buttons, checkboxes, popup menus, etc.? I was not talking about "the contact form on xenForo is limited". I was saying "One of the page types that can be created by xenForo should be a form" and then explaining how this functionality can be added without allowing PHP in page content.
 

Erik

Well-known member
#77
whether it is intentional or not this is EPIC Kier.
Pretty sure it was intentional. :D
That has 4 fields. Can you add radio buttons, checkboxes, popup menus, etc.? I was not talking about "the contact form on xenForo is limited". I was saying "One of the page types that can be created by xenForo should be a form" and then explaining how this functionality can be added without allowing PHP in page content.
But then wouldn't they have to write something to parse the 'bbcode' for the form? That could get somewhat complicated quickly... :)

Meh, I don't really know how I feel about the PHP in template thing... I guess just extending classes with your own functions would work. :)
 

Cezz

Well-known member
#78
Will the future include the ability to include a simple comment system for a page?
I would like to see this functionality definitely but I guess if not could either add an extention to do it or use external comment systems like Disqus.
 
#80
Kier,
I think this is looking fantastic - I like the wiki type layout page and think this overall system will be a great hit.
This is my first post here but I am going to browse around to see if this can do some of the things I have been hoping for about two years vBulletin would have and been neglected so will look around and see if this is going to be our new system :)