Guest dj4life Posted October 30, 2007 Share Posted October 30, 2007 Hi guys, Simple question, how do i include a php page in a site doc? I dont want to include it as an inline frame, id rather be able to enter some code into the site doc source that calls the page directly. Cheers, Darren p.s everytime i use <?php and ?> to embed php in a site doc (using the 'source' option) it changes it to <!--p and --> How can i stop this happening or overide it? Quote Link to comment Share on other sites More sharing options...
Guest ianleopard666 Posted October 30, 2007 Share Posted October 30, 2007 i dont think php will work in there, only html. you could always create a page and incorperate it in cc. what is the page you are trying to call? what does it do? Quote Link to comment Share on other sites More sharing options...
Guest dj4life Posted October 30, 2007 Share Posted October 30, 2007 i dont think php will work in there, only html. you could always create a page and incorperate it in cc. what is the page you are trying to call? what does it do? Hi there! Nice to meet you! The page im trying to call is in a domain sub folder, called awards.php ..... the page has been styled to fit the centre column of the classic skin (the one i use) 349 px width.... p.s i see your in cannock! small world, im just down the road in Pelsall! Thanks again, Darren Quote Link to comment Share on other sites More sharing options...
Guest ianleopard666 Posted October 30, 2007 Share Posted October 30, 2007 small world indeed, if you really dont want to use iframes the way i do things is to create a seperate page ie. awards.inc.php and awards.tpl, add the page to index.php in the root then add a link to it in sitedocs.tpl. of course this really depends how confident you are with php. if its a pretty simple page i can help convert it, u can pm me here or at cubecartforums for my email address so you can pass the file onto me. Quote Link to comment Share on other sites More sharing options...
Guest Posted October 30, 2007 Share Posted October 30, 2007 There's a mod listed on CubeCartForums.org that will allow you to use PHP in site docs. It also does a number of other cool things, like allow you to have multiple site doc categories (each with their own box) and allows you to order them however you'd like. Sorry, can't give a direct link as that is forbidden by the forum rules here. Quote Link to comment Share on other sites More sharing options...
Guest dj4life Posted October 30, 2007 Share Posted October 30, 2007 hi guys, ive nearly got it...... ive included a page in the 'includes' folder..... the file is called awards.inc.php ....... ive then included a file in the skins template folder called awards.tpl ......... i type in this URL........ http://mydomain.com/index.php?act=awards and the awards page i want to display shows up and works fine.... but its not wrapped to fit in the middle column to display as page content.... (classic skin) ive added this at the end of my awards.inc.php file...... -------------------- $awards->parse("awards"); $page_content = $awards->text("awards"); -------------------- but im getting the following error message....... -------------------- Fatal error: Call to a member function on a non-object in http://mydomain.com/includes/content/awards.inc.php on line 105 -------------------------------- Can anyone please advise me how to correct this? Cheers, Darren Quote Link to comment Share on other sites More sharing options...
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.