Page 1 of 1

Adding PHP code to Content page

Posted: Sat Jul 25, 2009 12:43 pm
by dmaireroa
Hi there

I am using a photo gallery tool 'e2interactive' in my website.

My logo.php page is normally like this:
But when I use cmsms, I created a new page called logo. My code looks like this:
WORK >> Logo
{global_content name='Menu - Work'}
But for some reasons it's not displaying the php code, which suppose to be like this:
WORK >> Logo
{global_content name='Menu - Work'}
I have a feeling you can't add php to a cmsms content page, is this right?

I was thinking of maybe linking it to the actual php page and see if it works e.g. http://locahost/cmsms/logo.php
But I thought it might be better to have it in cmsms, what do you think?

I will do some more research and find out, however, if its too much of a hassle then I will have to link.

Many thanks in advance
CHEERS :)

Re: Adding PHP code to Content page

Posted: Sat Jul 25, 2009 3:02 pm
by Dr.CSS
Have you read any of the default content at all?...

http://dezertdesign.com/default/index.p ... fined-tags

Pay particular attention to the last sentence...

If you would have done a forum search you may have noticed this has been asked and answered about a hundred times...

Re: Adding PHP code to Content page

Posted: Sat Jul 25, 2009 11:22 pm
by dmaireroa
Oopps, your right, I didn't do a search forum. Cool, now I know what to do next time if I get stuck  ;).

Thanks for the link DR.

Re: Adding PHP code to Content page

Posted: Sun Jul 26, 2009 4:41 am
by dmaireroa
Dr.CSS

I followed the manual for 'User define Tag' and removed the
tags and only had this:
include("uploads/site/Logogallery/index.php");
but this error occurred:
Warning: require_once(Logogallery/config.php) [function.require-once]: failed to open stream: No such file or directory in C:\Program Files\xampp\htdocs\cmsms\uploads\site\Logogallery\index.php on line 3

Fatal error: require_once() [function.require]: Failed opening required 'Logogallery/config.php' (include_path='.;C:\Program Files\xampp\php\pear\') in C:\Program Files\xampp\htdocs\cmsms\uploads\site\Logogallery\index.php on line 3
Sorry to bug you gain but would you know what to do here?

Re: Adding PHP code to Content page

Posted: Sun Jul 26, 2009 7:13 am
by Coldman
Believe that a little reading about PHP would be perfect for you.
After that you can include config.php

Re: Adding PHP code to Content page

Posted: Thu Jul 30, 2009 9:02 am
by dmaireroa
This has cause nothing but headaches lol. I was so close on getting this working and now I will change my gallery page.
Sorry it has nothing to do with the PHP but getting the correct relative paths.

Thanks  :(.

Re: Adding PHP code to Content page

Posted: Thu Sep 16, 2010 3:11 pm
by dmaireroa
lol I know how to add php now  ;D