• This forum has been archived. New threads and replies may not be made. All add-ons/resources that are active should be migrated to the Resource Manager. See this thread for more information.

How I created my external pages.

What do you mean by "part of the forums"? Can you not set template conditionals to for example remove the sidebar, etc?

I've not played around much with pages yet so sorry if these are stupid questions :-)
 
One major limitation is: Xenforo pages always appear under the Forums Tab.
You can try to hack xenforo to trick the user that the page isn't a part of the forums ... but that's a hack.
 
This is exactly what I was attempting to accomplish before I was given a link to this. It's awesome. I have one suggestion though:
in route/prefix/en.php you could take out

=== CODE REMOVED IN ORDER TO ELIMINATE REDUNDANCY ===

Note: It would mess up the TOS case due to all three letters being capitalized. Just rename the Controller file/class to Tos instead.

Just an opinion, you could also then use your switch to specify situations like TOS and any others, and then if it doesn't match that case then it falls into the above code.

Great script!

@Daniel wow, great move, your modification to the ExternalPages_Route_Prefix_En code works great. thanx my friend. peace
 
No problem. I'm working on something that can sort of give your External Page the portal type feel where you can set one of those pages as the home page instead of your forum. Basically I'm using XenForo as a full site instead of just the forums and I'm trying to set a page with news, a quick about project section, etc.. as the home page, figure some others might find it useful.
 
That sound good. I'm trying to create an External Page with db access, can you tell me how can I use query and form?
 
What I especially like with external pages, is the ability to incorporate raw html, php and scripting into your pages. All this with a custom template and PHP file in the ExternalPages_ControllerPublic folder. Route_Prefix en.php file is pretty much set up to accomodate anything in the ControllerPublic folder thank to Daniel mods.

just gotta love it!
 
Looks good... if I had to remark about anything it would be upper and lower breadcrumb PLUS navbar offer five instances of 'Home' tab

Thanks, I'm still attempting to set it up. That's because of the portal I'm using that I do not like (no offense to the creator, it's good it just isn't good for what I'm trying to do). I'm working on setting up an external page as my home page instead of the portal.
 
What I especially like with external pages ....
  • is the ability to incorporate raw html, php and scripting into your pages.
  • All this with a custom template and PHP file in the ExternalPages_ControllerPublic folder.
  • Route_Prefix en.php file is pretty much set up to accomodate anything in the ControllerPublic folder

Put this testimonial in the first post ?
:)
 
Hi,
Is it possible to create multiple addon? Or is there an other way to create more route prefix, because i need /en, /en2, /en3
thanks in advance
 
I found myself the way to do it :D
just add multiple prefix route

Anyone knows how to output a variable in the php file in the template?
I got a variable $var in the controllerpublic's file and I need to echo it in the xenforo's template. How can I do it? {$var} doesn't work :(

*EDIT*

I guess I made some mistakes in the php file. Can you tell me how can I define a variable in the php file because $var = 'value'; doesn't work in the public function actionIndex
 
Code:
return $this->responseView('ExternalPages_ViewPublic_Advertise', 'EP_Advertise', $viewParams);

assigns $viewParams as a template variable.
$viewParams = array('test' => 'testing'); would make $test work in the template file.
 
I got a page 1 with a form and a page 2 with the output of the form
When I was logged in i'll got with error:
Security error occurred. Please press back, refresh the page, and try again

With guest access i got no error :S
Anyone know how to fix it?
 
I got a page 1 with a form and a page 2 with the output of the form
When I was logged in i'll got with error:
Security error occurred. Please press back, refresh the page, and try again

With guest access i got no error :S
Anyone know how to fix it?
Yes.

Add the security token to your form!
Code:
 <input type="hidden" name="_xfToken" value="{$visitor.csrf_token_page}" />
 
Minor suggestion for the first post. I believe the Add-on ID should be ExternalPages without a space between words.

I like the idea of having pages which are not tied to the Forum tab. Is there a way to not have /en/ or any prefix at all? If I create a page called Schedule I just want the URL to be mysite.com/schedule.
 
Top Bottom