I'm not sure if the system allows for this and I can't seem to find anything that specifically says it does.
I want to add my own php directly in the content maker when I go to edit the source.
Also, is there a way to get myself inside the head tags on individual pages so I can add certain javascripts without editing the template?
-K
php and javascripts
Re: php and javascripts
Hey Kavin,
Not exactly sure the php aspect of your question but you can definitely get inside the head tags of individual pages. Login as admin, find the page you want to edit, click it as if you were going to edit the content then click the options tab and put your javascript in the Meta Data space, make sure you surrond your javascript with {literal} {/literal} smarty tags to avoid confusing smarty with your javascript curly braces.
Just added a page to the wiki for the future.
http://wiki.cmsmadesimple.org/index.php ... /Edit_Page
Not exactly sure the php aspect of your question but you can definitely get inside the head tags of individual pages. Login as admin, find the page you want to edit, click it as if you were going to edit the content then click the options tab and put your javascript in the Meta Data space, make sure you surrond your javascript with {literal} {/literal} smarty tags to avoid confusing smarty with your javascript curly braces.
Just added a page to the wiki for the future.
http://wiki.cmsmadesimple.org/index.php ... /Edit_Page
Re: php and javascripts
Thanks for the suggstion about the meta data, that does work.
I went through and tried to test the php and no such luck.
It seems I can't insert any php onto the page. I guess I'm reduced to external form handlers. Its not that big of deal, just makes things cleaner when I can stick them all together.
This is still an amazing CMS.
-K
I went through and tried to test the php and no such luck.
It seems I can't insert any php onto the page. I guess I'm reduced to external form handlers. Its not that big of deal, just makes things cleaner when I can stick them all together.
This is still an amazing CMS.
-K
-
calguy1000
- Support Guru

- Posts: 8169
- Joined: Tue Oct 19, 2004 6:44 pm
Re: php and javascripts
set 'use_smarty_php_tags' to true in the config.php
and then
{php}phpinfo();{/php} will work
and then
{php}phpinfo();{/php} will work
Follow me on twitter
Please post system information from "Extensions >> System Information" (there is a bbcode option) on all posts asking for assistance.
--------------------
If you can't bother explaining your problem well, you shouldn't expect much in the way of assistance.
Please post system information from "Extensions >> System Information" (there is a bbcode option) on all posts asking for assistance.
--------------------
If you can't bother explaining your problem well, you shouldn't expect much in the way of assistance.
Re: php and javascripts
awesome, I was hoping it was doable.
Thanks
Thanks
-
WebGirl
Re: php and javascripts
Hi, I'm looking for a solution to use JAVASCRIPT on my site - I've read the forum posts, and am still trolling through 
I found this above [thanks jeffunk!]:
- the script I want to use is as follows:
All I added to the META DATA field was:
The double-click doesn't work [for me].
Would anyone else be able to install and test, and see what I'm doing wrong?
PS - image attached.
Many thanks!
WebGirl
[gelöscht durch Administrator]
I found this above [thanks jeffunk!]:
so I did this - and it 'almost' worksjeffunk wrote:Login as admin, find the page you want to edit, click it as if you were going to edit the content then click the options tab and put your javascript in the Meta Data space, make sure you surrond your javascript with {literal} {/literal} smarty tags to avoid confusing smarty with your javascript curly braces.
Just added a page to the wiki for the future.
http://wiki.cmsmadesimple.org/index.php ... /Edit_Page
I got this script from http://javascript.internet.com/image-ef ... age-2.htmlThis one line script changes the image size and source on your thumbnail picture without reloading the page or using popups.
ONE click zooms image from 200px width to 400.
DOUBLE click should zoom out from 400 to 200px.
All I added to the META DATA field was:
Should I be adding something else in here, to get the double click / zoom back to normal, to work?{literal}{/literal}
The double-click doesn't work [for me].
Would anyone else be able to install and test, and see what I'm doing wrong?
PS - image attached.
Many thanks!
WebGirl
[gelöscht durch Administrator]
Last edited by WebGirl on Sat Oct 21, 2006 3:41 am, edited 1 time in total.
Re: php and javascripts
HI WebGirl, I don't think you need the...
as it doesn't do anything. Perhaps it's just for advertisement?
The code worked for me.. have you go JavaScript disabled?
Although I don't see the point? You are in fact going to load a big image, with all the overhead that involves and then display it as a small one. Plus it wouldn't work with JavaScript disabled. Perhaps I'm missing something here? I'd have a look at using Album if you have lots of images or if you want just a few, impliment the thickbox JavaScript (part of Album) as a class on a image link?
Click on the small sheep picture on our test site for an example of what I mean...
http://www.cms.shoesforindustry.net/
In the header I'm loading the JavaScript fro a directory called js in the root of the web site...
Code used in page...
(The 'imageright' class is just for floating and formatting.)
Hope this helps,
Russ
Code: Select all
{literal}<__script__ language="JavaScript" type="text/javascript"><!-- zoom image //--></__script>{/literal}The code worked for me.. have you go JavaScript disabled?
Although I don't see the point? You are in fact going to load a big image, with all the overhead that involves and then display it as a small one. Plus it wouldn't work with JavaScript disabled. Perhaps I'm missing something here? I'd have a look at using Album if you have lots of images or if you want just a few, impliment the thickbox JavaScript (part of Album) as a class on a image link?
Click on the small sheep picture on our test site for an example of what I mean...
http://www.cms.shoesforindustry.net/
In the header I'm loading the JavaScript fro a directory called js in the root of the web site...
Code used in page...
(The 'imageright' class is just for floating and formatting.)
Hope this helps,
Russ
-
WebGirl
Re: php and javascripts
Hey Russ,
I was just looking for the simplest way to display 3 images on one page - has to be easy for the client to use it.
If I put that little script in my page, don't I need to put something in to make the javascript work?
I haven't tried Album yet, but have just been cruising around your site - cool stuff
The site will have lots of pages, each one will have 3 images on it, which need to be able to zoom to a larger size.
Nice sheep btw
yes, that's pretty cool - not sure if the client will like the 'grey' which covers the page as the image is loading, but I can try it.
In your honest opinion, how easy will it be for a 'newbie' non-techie to add 3 images to each page of their site using cmsms / Album?
I guess I should just go find it, download & install it, and see what happens.
PS - where would Javascript be 'disabled' in CMSMS? The script works on my other websites which are non-CMSMS, and also just from files on the desktop. I have Mac OS X / Firefox.
Thanks Russ!
I was just looking for the simplest way to display 3 images on one page - has to be easy for the client to use it.
If I put that little script in my page, don't I need to put something in to make the javascript work?
I haven't tried Album yet, but have just been cruising around your site - cool stuff
The site will have lots of pages, each one will have 3 images on it, which need to be able to zoom to a larger size.
Nice sheep btw
yes, that's pretty cool - not sure if the client will like the 'grey' which covers the page as the image is loading, but I can try it.
In your honest opinion, how easy will it be for a 'newbie' non-techie to add 3 images to each page of their site using cmsms / Album?
I guess I should just go find it, download & install it, and see what happens.
PS - where would Javascript be 'disabled' in CMSMS? The script works on my other websites which are non-CMSMS, and also just from files on the desktop. I have Mac OS X / Firefox.
Thanks Russ!
Last edited by WebGirl on Sun Oct 22, 2006 2:08 am, edited 1 time in total.
Re: php and javascripts
Give ot a go, if not have a look at the FCKEditor and its' template system. You could create a template with three images for the user to add, or pre-set them if you know what they are going to be?
Russ
Russ

