Page 1 of 1

PHP Include as Custom Content

Posted: Tue May 01, 2007 3:10 pm
by okparrothead
Hello All,

Thanks in advance for any help you can give me.

I've created a login using the frontendusers and customcontent modules. Everything works great except.....

the custom content I want to show is a php include that I added using a smarty tag.

How can I get the page to refresh automatically to process the include?

It seemed to work at first, but now I have to refresh the page after I login to get the included content.

Or:

I would consider putting the login on one page and opening another on login as the custom content, but I don't know how to do that with customcontent.

Thanks for your help and thanks for a great CMS!

Re: PHP Include as Custom Content

Posted: Tue May 01, 2007 3:50 pm
by calguy1000
if you're using customcontent you have to make sure that the page is set to 'non-cachable'
(When editing pages, it's on the options tab, make sure the checkbox is cleared).

Re: PHP Include as Custom Content

Posted: Tue May 01, 2007 4:21 pm
by okparrothead
Thanks Calguy 1000,

I greatly appreciate your tips and help in this forum.

Yes, the page is set to non-cachaeable.

No,  my fix didn't work.

When I login, the login works, but the include is not processed. So I had to force a refresh of the page.

I tried adding javascript to a simple link to force a refresh but got server errors.

I tried adding a meta refresh tag, which worked, but because it wasn't cached, it refreshed forever without stopping.

I have a solution, however...

I did it by adding this code to the logout template:





This added a "Continue" button to the logout template so both the logout link and the button are visible together.

Now there's a way to refresh the page to process the php include, and a way to logout once the page isn't needed anymore.

If I clear my local cache, the include seems to process when the page loads on login -- the first time -- but not after.

If there's a way to process the include without the button, I'd love to know it.

Thanks for all your help

Re: PHP Include as Custom Content

Posted: Tue May 01, 2007 4:44 pm
by calguy1000
Which version of CustomContent and CMS Made simple are you using?

Re: PHP Include as Custom Content

Posted: Tue May 01, 2007 7:38 pm
by okparrothead
Newest.

Just installed new system.

CMSMS Molokai

Custom Content 1.4.4

FrontEndUsers 1.2.0-beta5