Click here to register.
      
PBWG Banner


     Discuss > Etcetera

Picture of the day feature

User bernd
Date 4/24/2008 12:26 am
Views 1086
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 [
|
]
 
 
     Discuss > Etcetera




Glad to be here by patspam - Fri @ 01:59am

Re: WRE install on Ubuntu by SteveD - Fri @ 01:56am

Smoketest For nightly_2008-09-05 by Visitor - Fri @ 01:46am

Re: WRE install on Ubuntu by knowmad - Thu @ 07:37pm

Re: New Default Templates: community input by patspam - Thu @ 06:22pm

Re: WebGUI Resending mails by JT - Thu @ 05:27pm

WebGUI Resending mails by arjan - Thu @ 04:55pm

Re: Config File Changes by JT - Thu @ 03:40pm

Re: RSVP function in WebGUI? by knowmad - Thu @ 03:25pm

Re: Config File Changes by knowmad - Thu @ 03:11pm

Re: Config File Changes by JT - Thu @ 02:30pm

RSVP function in WebGUI? by pvanthony - Thu @ 02:13pm

Re: Config File Changes by JT - Thu @ 02:05pm

Re: Config File Changes by JT - Thu @ 01:56pm