Adding PHP code to Content page

The place to talk about things that are related to CMS Made simple, but don't fit anywhere else.
Post Reply
dmaireroa
Forum Members
Forum Members
Posts: 110
Joined: Wed Jul 15, 2009 12:35 am

Adding PHP code to Content page

Post 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 :)
Last edited by Anonymous on Sat Jul 25, 2009 12:45 pm, edited 1 time in total.
User avatar
Dr.CSS
Moderator
Moderator
Posts: 12711
Joined: Thu Mar 09, 2006 5:32 am

Re: Adding PHP code to Content page

Post 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...
dmaireroa
Forum Members
Forum Members
Posts: 110
Joined: Wed Jul 15, 2009 12:35 am

Re: Adding PHP code to Content page

Post 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.
dmaireroa
Forum Members
Forum Members
Posts: 110
Joined: Wed Jul 15, 2009 12:35 am

Re: Adding PHP code to Content page

Post 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?
Coldman
Power Poster
Power Poster
Posts: 318
Joined: Sun Jun 22, 2008 5:33 am

Re: Adding PHP code to Content page

Post by Coldman »

Believe that a little reading about PHP would be perfect for you.
After that you can include config.php
Important Code of Conduct
Why don't use CMSMS Docs or search?
Do you read Help?
Admin for Swedish Translations Team
Moderator Swedish Forum
After your problem is solved, push the green button
dmaireroa
Forum Members
Forum Members
Posts: 110
Joined: Wed Jul 15, 2009 12:35 am

Re: Adding PHP code to Content page

Post 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  :(.
dmaireroa
Forum Members
Forum Members
Posts: 110
Joined: Wed Jul 15, 2009 12:35 am

Re: Adding PHP code to Content page

Post by dmaireroa »

lol I know how to add php now  ;D
Post Reply

Return to “The Lounge”