Click here to register.
      
IRC banner


     Etcetera

Picture of the day feature

User bernd
Date 4/24/2008 12:26 am
Views 1433
Rating 0    Rate [
|
]
Previous · Next
User Message
bernd

I was wondering, whether it would be possible to show something like a picture of the day (or whatever wobject of the day) on the first page which is picked randomly from all over the site. I already found the RandomProxy macro which is, however, not quite what I want.

I assume the macro (or wobject) that I am looking for should check in temp space whether an up-to-date picture exists, if not pick one randomly, create a shortcut in tempspace and then proxy it to the location where the macro is used. Does such a macro exist?

Apart from that it should prepare coffee, pick up the newspaper and massage my back. But maybe that is asked for too much in the first release.

If such a macro does not exist. How difficult would it be to implement? I have never written a perl app in my life. But I know Java and C++ quite well. Do I have a chance to get this done within reasonable time?

--- (Edited on 24.04.2008 07:26 [GMT+0200] by bernd) ---



Back to Top
Rate [
|
]
 
 
JT

You can achieve this functionality using the Shortcut asset.

--- (Edited on April 24, 2008 5:58 pm [GMT-0500] by JT) ---



Back to Top
Rate [
|
]
 
 
bernd

Thanks for the hint! I got a bit further know. However, I am still not there. This is what I did:

  1. Defined boolean meta data property "Picture Pool" with default value 0.
  2. Enabled meta data in posts
  3. Created shortcut to one thread within an image gallery.
  4. Enabled shortcut by alternate criteria
  5. Set criteria to "Picture Pool" = 1
  6. Set property "Picture Pool" = 1 in a number of postings with pictures.

The main problem is that one needs to set the "Picture Pool" property manually to 1 in threads. But pictures are usually provided by users who are unaware of the shortcut.

I assume the default value field for meta data properties is evaluated as a perl expression? That means one could check whether the current wobject is a post with pictures attached and return 1 only then?

Alternatively, it would be nice to inherit meta data properties from the parent collaboration system (i.e. something like local default values). Can this be done somehow?

BTW, it was quite hard to find out how to create shortcuts. Why isn't the shortcut wobject part of the new content list?

--- (Edited on 25.04.2008 08:04 [GMT+0200] by bernd) ---



Back to Top
Rate [
|
]
 
 
bernd

I have another problem. I cannot find out how to override the layout template for threads. What I want to do is display only the first image attachment and the title of the thread. But when I look at shortcut overrides I cannot find an entry for the template. I assume this is because the template is defined in the collaboration system asset. Is there any way around this?

--- (Edited on 25.04.2008 20:47 [GMT+0200] by bernd) ---



Back to Top
Rate [
|
]
 
 
bernd

Yes, there is a way around. In order to get it to work one has to link to collaboration systems instead of threads. Afterwards, one needs to set the number of threads per page to one and override the template by a minimalistic one that only shows the thumb and maybe some text of the first thread.

However, two issues remain:

  • Currently, it does not seem to be possible to display threads in random order. That is, always the same picture will be displayed from collaboration systems.
  • I could not find out how to change the interval at which the shortcut alternates. Currently, it seems that the target of the shortcut changes every time the page is reloaded.

Any suggestions or solutions?

--- (Edited on 28.04.2008 07:20 [GMT+0200] by bernd) ---



Back to Top
Rate [
|
]
 
 
bernd

Hmm, no one else interested in the picture-of-the-day feature? This feels a bit like writing to my own blog. I submitted an RFE for the random sort order. Maybe, you want to support that request.

Concerning the frequency of shortcut target alternation I still do not have a solution.

--
Trying to build a non-profit community portal for free-climbers around Magdeburg/Germany. Check out http://kletterfreunde-md.kashyyyk.de (under construction).

--- (Edited on 29.04.2008 21:23 [GMT+0200] by bernd) ---



Back to Top
Rate [
|
]
 
 
JT

I take it back. Now that I've read the rest of your post and see what you want to do, there is no way using the current feature set of WebGUI to do what you want to do. My suggestion to you is to use the new Photo Gallery asset to have people upload photos, and then write a custom macro that will display a random photo from your galleries.

--- (Edited on April 29, 2008 3:33 pm [GMT-0500] by JT) ---



Back to Top
Rate [
|
]
 
 
     Etcetera



Recent Discussions Color Key

Design:

Development:

Et Cetera:

Install/Upgrade:  

Smoketest:

Template Group:


Re: Shortcut of a thread by knowmad - Thu @ 07:33am

Re: Synopsis search results by knowmad - Thu @ 07:21am

Re: Templates workspace site by rogier - Thu @ 04:24am

Re: Templates workspace site by rogier - Thu @ 02:59am

Re: Shortcut of a thread by perlDreamer - Wed @ 11:46pm

Re: Ubuntu Load on Startup by SteveD - Wed @ 04:37pm

Shortcut of a thread by arjan - Wed @ 04:11pm

Re: preventing email spam mailto by lrobinson - Wed @ 03:51pm

preventing email spam mailto by sandraqu - Wed @ 03:39pm

Re: Data Form and Form Controls by martink - Tue @ 11:05am

Re: Synopsis search results by marieken - Tue @ 06:10am

Re: Übersetzungen vor dem nächsten Treffen by koen - Tue @ 04:24am

Re: Übersetzungen vor dem nächsten Treffen - Translations to be done before the next meeting will take place. by bernd - Tue @ 01:15am