Fun with Photo of the Day

In this forum you can share tips and tricks on how to use Cinemar products with some program or a task that you want it to do. So no one has to reinvent the wheel if you already did! (No questions in this forum only solutions, questions will be deleted without hesitation.)

User avatar
mcascio
Founder
Founder
Posts: 8270
Joined: Tue Jan 28, 2003 4:03 pm
Location: Kenosha, Wi
Contact:

Fun with Photo of the Day

Postby mcascio » Fri May 09, 2008 9:40 am

Here's a quick way to have a new photo show up on your homepage daily using MLServer's variable: currentdayofmonth

* Create a folder in MLServer's Images folder called myPhotos
* Copy some images to that folder - all should be the same size
* Rename them to myPhoto1.jpg, myPhoto2.jpg, etc. until you reach myPhoto31.jpg
* From MainLobby, select IMAGE from the Main Menu bar then browse to any one of the images you've used as a placeholder.
* Edit the button by selecting EDIT from the main menu and selecting the image
* Copy/Paste the following into the JPG Image line:
http://{{server_servername}}:6246/getImage?Images/myPhotos/myPhoto{{currentdayofmonth}}.jpg|width=320|height=240
* You can modify the width and height dimensions to fit your needs.
* Now you've got a new photo appearing every day on your home page

You can do the same thing using other date type variables as well.
Last edited by mcascio on Mon Jan 12, 2009 10:15 am, edited 1 time in total.
Mario Cascio
Cinemar, Inc.
http://www.cinemaronline.com

User avatar
ronsatter
Is there life beyond Cinemar?
Is there life beyond Cinemar?
Posts: 1304
Joined: Mon Dec 04, 2006 1:40 am
Location: San Leandro, CA
Contact:

Variable Name Incorrect

Postby ronsatter » Sun Jan 11, 2009 10:17 pm

Hi Mario,

Just discovered this post. The procedure as outlined doesn't work. I believe there is a syntax error.

Code: Select all

http://{{server_servername}}:6246/getImage?Images/myPhotos/myPhoto{{currentdayofthemonth}}.jpg|width=320|height=240


I noticed the variable in MLServer is {{currentdayofmonth}}. But even with that correction, I still can't get the images to appear.

Some questions:

1. Do you have to include the suffix ".jpg" in the name?
Rename them to myPhoto1.jpg, myPhoto2.jpg, etc. until you reach myPhoto31.jpg


2. I don't understand what you mean by "placeholder".
From MainLobby, select IMAGE from the Main Menu bar then browse to any one of the images you've used as a placeholder.

Do you mean the images in the "myPhotos" folder?

3. Using this file path:
http://{{server_servername}}:6246/getImage?Images/myPhotos/myPhoto{{currentdayofmonth}}.jpg|width=320|height=240


Allowing for the corrected variable {{currentdayofmonth}}, if I have followed your instructions for naming the photos, ie. myPhoto1.jpg, etc. and placed them in the folder structure you instructed ... why can't I see them?

4. Does this have anything to do with my "Content" folder filepath?

Your original post is from May 2008. Have there been some changes since then, or am I the only one to try out this tip? :shock:

Ron
If it ain't broke ... don't fix it!

User avatar
mcascio
Founder
Founder
Posts: 8270
Joined: Tue Jan 28, 2003 4:03 pm
Location: Kenosha, Wi
Contact:

Postby mcascio » Sun Jan 11, 2009 10:25 pm

I'll have to double check that variable.

But everything appears to be right, my guess is that you have the images stored on the client. The GetImage is pulling the file from the MLServer PC.

So Make sure you have the file in: C:\Program Files\MLServer\Images/myPhotos/myPhoto1.jpg

A placeholder can be any image - even myPhoto1.jpg - it will dynamically get replaced when the date changes daily.
Mario Cascio

Cinemar, Inc.

http://www.cinemaronline.com

User avatar
ronsatter
Is there life beyond Cinemar?
Is there life beyond Cinemar?
Posts: 1304
Joined: Mon Dec 04, 2006 1:40 am
Location: San Leandro, CA
Contact:

Postby ronsatter » Sun Jan 11, 2009 10:44 pm

Hi Mario,

my guess is that you have the images stored on the client


My MLServer and MLClient are on the same PC.

So Make sure you have the file in: C:\Program Files\MLServer\Images/myPhotos/myPhoto1.jpg


That's where they are.

it will dynamically get replaced when the date changes daily.


Shouldn't I be able to see the current day's image? I double checked my image names and they are correct.

Ron
If it ain't broke ... don't fix it!

User avatar
mcascio
Founder
Founder
Posts: 8270
Joined: Tue Jan 28, 2003 4:03 pm
Location: Kenosha, Wi
Contact:

Postby mcascio » Sun Jan 11, 2009 11:19 pm

it looks like there may be an extra space after getImage.
Mario Cascio

Cinemar, Inc.

http://www.cinemaronline.com

User avatar
mcascio
Founder
Founder
Posts: 8270
Joined: Tue Jan 28, 2003 4:03 pm
Location: Kenosha, Wi
Contact:

Postby mcascio » Mon Jan 12, 2009 10:16 am

You might try doing something from a web browser first:
http://mlserver:6246/getImage?Images\MLWeather\na.png|width=320|height=240

Assuming you have weatherrlobby installed and just replace mlserver above with your mlserver PC name. Also, perhaps you need to user the server IP Address instead of the name.
Mario Cascio

Cinemar, Inc.

http://www.cinemaronline.com

User avatar
ronsatter
Is there life beyond Cinemar?
Is there life beyond Cinemar?
Posts: 1304
Joined: Mon Dec 04, 2006 1:40 am
Location: San Leandro, CA
Contact:

Postby ronsatter » Wed Jan 14, 2009 2:26 am

Mario,

I finally found the problem after an hour of head scratching:

A space in the folder name ](*,)

PS. The correct variable is {{current dayofmonth}}. Perhaps you should edit your original post.

Thanks for your help.

Ron
If it ain't broke ... don't fix it!

User avatar
Krumpy
Developer
Developer
Posts: 1228
Joined: Thu Sep 04, 2003 10:17 pm
Location: Minneapolis, Mn
Contact:

Postby Krumpy » Wed Jan 14, 2009 8:31 pm

That'll do it.... We have all been there.


Return to “Tips, Tricks and Tutorials”

Who is online

Users browsing this forum: No registered users and 1 guest