Help with categories

Help each other out

Help with categories

Postby kevl on Sat Jan 27, 2007 2:07 pm

Hi

Am trying to make a screen to display weather maps.

I have made a database called WeatherMaps and have a list of items called

Satellite Map
Rain
Min Temperature
UV index

etc

I have added two fields to each item (called map and Key) and have the addresses of map and key for each item entered into the database.
The map field has link to map and the key field has link to the key showing what the colours on the map represent.

I can put a category on a screen and then get a list of items in the category which I have assigned button to (to form a menu).

Question:. How do I make the two pictures appear on the screen when a button in the category display menu is pressed?

The images are gif files and have entries in the database xml file like
<key>http://vortex.accuweather.com/adc2004/common/images/keys/400x40/uvi.gif</key>
<map>http://sirocco.accuweather.com/adc_images2/english/forecast/uvi/640x480/uk_toduvi.gif</map>

Hopefully the answer to this does not require me to write a plugin :-)

When I get this working I'll upload the screen for general consumption.

Kev
kevl
 
Posts: 33
Joined: Thu Jun 01, 2006 10:39 pm
Location: Cambridge UK

Postby tswhite70 on Mon Jan 29, 2007 4:22 pm

I think you can just create the two images on the current screen, in their Text value field put:

category>CategoryName>key
and
category>CategoryName>map

Since they are web images you'll need to run an web image refresh to get the images.

Or you can create an infoscreen or overlay with the same images and when you click on the item in the category, it would do a web image refresh and then open the infoscreen.

good luck,
tsw
tswhite70
 
Posts: 318
Joined: Tue Jan 06, 2004 3:44 pm
Location: Houston, Tx

Postby kevl on Mon Jan 29, 2007 10:31 pm

TSW

Many thanks for your kind help. I'll give your suggestions a try.

Kev
kevl
 
Posts: 33
Joined: Thu Jun 01, 2006 10:39 pm
Location: Cambridge UK

Postby kevl on Mon Jan 29, 2007 10:52 pm

I tried your fine suggestion but no luck I'm affraid.


I have a category box on my screen and have set it up to display the weather category. I get the display name of the 3 items in the database as buttons.


Following your suggestion I added two text boxes on the screen.

I set the text in the text boxes to:

category>weather>map

and

category>weather>key

(I was careful to avoid spaces in the textboxes and the database containing the info is called weather).

I then tried adding another button on the screen called refresh image which I tied to the event "refresh image library" - to see if that helped.

No go.

I am beginning to wonder if my skin is somehow corrupted etc as I yesterday found that I am unable to add website browser objects to my screens. I put in a web address (e.g. http://www.bbc.co.uk) into the add website dialog in the screens tab of the skin editor and then hit add and nothing happens. No object is added and closing and reopening the skin does not make it appear.

Oh well thanks for the help anyway.


Kev
kevl
 
Posts: 33
Joined: Thu Jun 01, 2006 10:39 pm
Location: Cambridge UK

Postby Marbles_00 on Tue Jan 30, 2007 6:19 am

Please bear with me, and I apologize ahead of time for the long post.
It sounds like what you want is like something I'm doing in my Zoneskin2. I have a category of weather images based on a database called weatherimages. The database has the following:
Satellite Image
Radar Image
Current Temperature
Percipitation
Temperature Map
Humidex
Wind Temperature
Weather Systems
Current Wind Speed
Active Weather Patterns
Earth Rotation
Each image is pulled from the weather network which is filled into the Coverart window of the database. I take it here, you would put the location of the map gif for a particular weather pattern. Now the keys, in my eyes are legends that would never change, I mean, a legend is a legend, right? So download each legend. You may have to convert them to .png files so they become buttons. Now bring each legend into Xlobby and name each one with a specific ID in the Skin editor Default tab. Position each legend where you'd like it to show, then click on the "hide" checkbox. Now back in your database of weather images select each one, one at a time, and then select the advance tab. Then you can associate each database item with the appropriate key ID under the Show/Hide box by entering the ID name of the legend to show. This way every item passed over you will then see the key legend associated with that map.

Now for my particular setup, when selecting each image in the category, it will open up an overlay showing a blown up image. This is done by creating an event to open an overlay I called overlay weatherimages (yeah...real original), and is tied to an overlay screen. In the overlay screen is a text box with:
Code: Select all
category>weatherimages>cover

It is associated with a 'click' event to return to the weather images screen. You could do something like this and also utilize the 'Xlobby/button show' command to show the legend as well. And when you go and close the overlay, you also utilize the 'Xlobby/button hide' command to hide the legend.

My refresh button has an event with a "load http covers" command associated to it. The Category name for that command is the weatherimages category.

Anyways, I hope this helps.
Marbles_00
 
Posts: 1867
Joined: Wed Apr 06, 2005 12:44 pm
Location: Canada

Postby kevl on Tue Jan 30, 2007 12:50 pm

Marbles


Many thanks for you kind help. I will investigate further, follow your instructions and let you know how I get on.

It seems that .gif files cannot be displayed directly on the screen using textbox strings.

category>Catname>map

I put some dummy .png files in my database and it worked fine

So the rule must be textboxes only display .png files from my Map and key entries.


Anyway your method seems much better than mine and using the coverart field seems to do the job.


Many thanks again for taking the time to let me know how to sort this out.


Kev
kevl
 
Posts: 33
Joined: Thu Jun 01, 2006 10:39 pm
Location: Cambridge UK

Postby kevl on Wed Jan 31, 2007 11:36 pm

I gave your suggestions a try.

I cant get .gif files to show pictures no matter what I do.

They dont show as pictures when used as coverart and then viewed in a category and they don't show as pictures when referenced in text boxes using the "cover" variable.

I really think my skin/installation is messed up as I can no longer place webbrowser windows - which must surely be able to display gifs.

Even If I clone a screen with a webbrowser window in it I just get a red solid rectangle which I cant change.

I might try reinstalling etc. I'll have another look when XL3 comes out.


Regards

Kev
kevl
 
Posts: 33
Joined: Thu Jun 01, 2006 10:39 pm
Location: Cambridge UK

Postby Marbles_00 on Thu Feb 01, 2007 1:52 am

You must be doing something wrong. I just tried and was able to show .gif files. Here is the one you linked above:

Image

Image

The database:
Image

The refresh event:
Image
Marbles_00
 
Posts: 1867
Joined: Wed Apr 06, 2005 12:44 pm
Location: Canada

Postby Marbles_00 on Thu Feb 01, 2007 6:16 am

Now let’s continue with displaying the legend.

The first thing I did was to take your link and copy the image into Photoshop. Then save the .gif file as a .png file, and saved it to the skins/buttons directory.

Next I opened up the skin editor in Xlobby, and went to my overlay_weatherimages page. Select the Screen tab, then the Add Button tab. Click on refresh to update the button list to show the new .png file. Then add the UV index image to the overlay. Under the Default tab, I gave it a unique ID called ‘uvrating’.

Next I went to F2/Setup/Events and created two new events. One is to show the UV Index, and the other is to return to the main weather map page. Under the show UV index event, the button show command is used, and the ButtonID is uvrating (the ID I gave the .png). What this will do is that whatever image I click on in the category, it will open the overlay_weatherimage screen and display the hidden image tied to it.

Under the return to main weather map screen event I have two commands: button hide (again the ButtonID is uvrating) and close overlay.
Image

Next I will go to the Setup/Databases and select my weathermap database, and then select my new addition…test. Select the Advance tab and assign the Show UV Index.
Image

Once done, close down Setup and open the Skin Editor. Select the Goto tab and I went back to my overlay_weaterimages. Now the image I showed in my previous post is a simple text box that states:
Code: Select all
category>weatherimages>cover


I assigned the event to return to the weather page to this text box. So when you click on the image, the uvrating image will hide, and then go back to the main weather image screen.

All additional legend keys will have unique names. All will have a show and hide button events tied to them. All button hide commands will reside in that one event. Each button show command will have their own event, tied to their unique image in the database. Below is the resulting effect.
Image

And here I've attached the uv legend .png for you to use.
http://www.xlobby.com/files/Marbles_00/Images/uv_rating.png

Hope this all helps.

P.S. To be honest, I didn't have a clue if this would work. But figured I'd give it a shot just to verify that what I mentioned above can actually be done. If your still having problems with Xlobby displaying web images. Do the following. Load up Steven's default skin and verify that weather updates occur. There have been accounts of firewalls denying access to Xlobby (trust me, I've been through it when I had Winroute installed).
Marbles_00
 
Posts: 1867
Joined: Wed Apr 06, 2005 12:44 pm
Location: Canada

Postby Marbles_00 on Thu Feb 01, 2007 8:19 pm

If you want kevl, I can email you this version of skin. It is about 4 megs in size. I don't want to upload it to the Xlobby server, just so it doesn't get mixed up with my current Zoneskin2.

You can use it to fully understand what I have done, then incorporate it over to your skin. Not to mention, that I know that getting the images off the net all work, so if you encounter a problem then at least we will know that it is not Xlobby that is the problem, but something in your setup (whether it be in the skin, OS or hardware related).

Also, then we are working for a common goal with the same tools (skin), so if you need help, it is easier to work at it.

If your interested, my email is:
mayhem'DOT'por'AT'gmail'DOT'com
Marbles_00
 
Posts: 1867
Joined: Wed Apr 06, 2005 12:44 pm
Location: Canada

Postby kevl on Thu Feb 01, 2007 10:49 pm

Hi Marbles.


Many thanks for persevering with me on this.

I had made the .png images as you described and placed them in my buttons directory.

My database (weather) has the path and filename of these in a field called Key.

Each item has the web path of the .gif file for the map (as coverart).

I have a category selector which gets its data from the waether database and gives me a list of buttons. This category is called WeatherMapSelect.

I place two text boxes on my screen.

The top has the string

category>SelectWeatherMap>cover

and the second

category>SelectWeatherMap>key


The bottom text box correctly displays the legend. The legend graphic changes as I click on the select menu. The top "cover" text box remains empty though. I have a button on the screen linked to the refresh HTTP covers (exactly as you have done) but it does not seem to help.

In my database editor I get no pictures displayed (whereas I can see your database displays the green UK map (UV index) in the small box next to the coverart path.

I suspect this is my problem. Though I dont know what to do about it.

I'd attch pictures showing the issue but I cant seem to work out how to attach files in this forum.

Kev

[/img]
kevl
 
Posts: 33
Joined: Thu Jun 01, 2006 10:39 pm
Location: Cambridge UK

Postby kevl on Thu Feb 01, 2007 10:57 pm

I would be grateful if you would send me a copy of your skin so that I can look at your settings.

Kev
Last edited by kevl on Wed Feb 07, 2007 11:16 pm, edited 1 time in total.
kevl
 
Posts: 33
Joined: Thu Jun 01, 2006 10:39 pm
Location: Cambridge UK

Postby Marbles_00 on Thu Feb 01, 2007 11:04 pm

No probs, I'll forward it later on tonight when I get a chance.
Marbles_00
 
Posts: 1867
Joined: Wed Apr 06, 2005 12:44 pm
Location: Canada

Postby kevl on Sun Feb 04, 2007 12:06 am

Hi Marbles.

I loaded your skin and it worked perfectly. I looked at how it worked and realised what I had been doing wrong.

When refreshing HTTP images, I had put in the name of the database I wanted to refresh. Of course I should have been refreshing the category named on my screen.

Once I sorted that out it all worked fine.

Many thanks again for your kind help and patience in helping me sort this out.


Best Regards

Kev
kevl
 
Posts: 33
Joined: Thu Jun 01, 2006 10:39 pm
Location: Cambridge UK