Interesting script that works in CMS Made Simple

General project discussion. NOT for help questions.
Post Reply
Greg
Power Poster
Power Poster
Posts: 598
Joined: Sun Sep 26, 2004 6:15 pm

Interesting script that works in CMS Made Simple

Post by Greg »

Greg
chrisinoz
Forum Members
Forum Members
Posts: 67
Joined: Tue Nov 16, 2004 4:17 am

Interesting script that works in CMS Made Simple

Post by chrisinoz »

Hi Greg

Thanks for this reference. Have downloaded but no time yet to try it out.

I like the concept.

Usually one has to list each image that is to be rotated in a javascript and so adding an image means going to the source html and changing it. This way someone can just upload an image into a specified folder and it automatically slots into the rotation cycle.

Cheers

Chris
Humble web designer
Adelaide, South Australia
calguy1000
Support Guru
Support Guru
Posts: 8169
Joined: Tue Oct 19, 2004 6:44 pm

Interesting script that works in CMS Made Simple

Post by calguy1000 »

I also have a random image plugin..... I'll post it on the wiki... works well, just tell it what directory to look in

simply put the function.random_image.php into your plugins directory
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.
Hans
Forum Members
Forum Members
Posts: 61
Joined: Sun Oct 09, 2005 10:49 am

Re: Interesting script that works in CMS Made Simple

Post by Hans »

I downloaded the random image plugin but the only thing is shows is a text (the path to the image and the name of the image) : e.g. uploads/images/imagename.jpg instead of the image itself.

Tried it with and without defining a directory (so, only {insert_image} and {insert_image dir="imagedir"}
Could anyone please help?
Thanks
Hans

[EDIT] Although I'm a total n00b (as far as php concerned :-)) I managed to get the script working by replacing

Code: Select all

return $dirn . "/" . $myimage;
around line 47

by

Code: Select all

echo "<img src=\"$dirn/$myimage\" alt=\"$myimage\" />"; 
I can't believe it myself, but it works!
Last edited by Hans on Sun Oct 09, 2005 8:05 pm, edited 1 time in total.
calguy1000
Support Guru
Support Guru
Posts: 8169
Joined: Tue Oct 19, 2004 6:44 pm

Re: Interesting script that works in CMS Made Simple

Post by calguy1000 »

if this is the one I wrote a long time ago, it was designed to be embedded inside of an tag, sorry for the confusion.
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.
Post Reply

Return to “General Discussion”