Click here to register.
      
irc://irc.freenode.net#webgui

iPhoneGuy: WebGUI is a pile of crap.
rizen: If WebGUI is such a pile of crap, why do you use it?
iPhoneGuy: Because it's the best pile of crap out there.

If this is what people who hate us are saying, imagine what people who love us will say. Come join us on IRC.


     Discuss > WebGUI Dev Goto page «Previous Page   1 2    Next Page»

Re: Extending the RandomAssetProxy by a templateID argument

User colink
Date 5/1/2008 3:15 pm
Views 1086
Rating 0    Rate [
|
]
Previous · Next
User Message
colink
I would suggest looking at the Shortcut Asset.  It already allows for overriding, and may have a random picker as well.                  


Back to Top
Rate [
|
]
 
 
bernd
Right. In fact, I am using the shortcut asset as well. The idea is to
pick a Collaboration system (CS) randomly from all over the site and
then have a random thread displayed. The first is achieved by an
alternating shortcut. For the second, I need the RandomAssetProxy that
is used within the override template of randomly picked CSs. Since I do
not want to use the default template of threads, however, I need to
extend the RandomAssetProxy.

Am Donnerstag, den 01.05.2008, 15:15 -0500 schrieb ckuskie@sterlink.net:
> colink wrote:
>
> I would suggest looking at the Shortcut Asset.  It already allows for
> overriding, and may have a random picker as well.                  
>
>
> http://www.plainblack.com/webgui/dev/discuss/re-extending-the-randomassetproxy-by-a-templateid-argument
>



Back to Top
Rate [
|
]
 
 
martink
Then why not use the RandomThread macro, which comes with the default
WebGUI distribution? See
http://www.webgui.org/community-wiki/random-thread-macro

Martin

spunky@kashyyyk.de wrote:
> bernd wrote:
>
> Right. In fact, I am using the shortcut asset as well. The idea is to
> pick a Collaboration system (CS) randomly from all over the site and
> then have a random thread displayed. The first is achieved by an
> alternating shortcut. For the second, I need the RandomAssetProxy that
> is used within the override template of randomly picked CSs. Since I do
> not want to use the default template of threads, however, I need to
> extend the RandomAssetProxy.
>
> Am Donnerstag, den 01.05.2008, 15:15 -0500 schrieb ckuskie@sterlink.net:
> > colink wrote:
> >
> > I would suggest looking at the Shortcut Asset.  It already allows for
> > overriding, and may have a random picker as well.                  
> >
> >
> >
> http://www.plainblack.com/webgui/dev/discuss/re-extending-the-randomassetproxy-by-a-templateid-argument
>
> >
>
>
>
> http://www.plainblack.com/webgui/dev/discuss/re-extending-the-randomassetproxy-by-a-templateid-argument/1
>
> ------------------------------------------------------------------------
>
>
>
>  



Back to Top
Rate [
|
]
 
 
bernd

Then why not use the RandomThread macro, which comes with the default
WebGUI distribution? See
http://www.webgui.org/community-wiki/random-thread-macro

Martin

Well, as I said: it needs to be a extended for accepting a template ID as the second argument...



Back to Top
Rate [
|
]
 
 
martink
spunky@kashyyyk.de wrote:
> bernd wrote:
>
>     /Then why not use the RandomThread macro, which comes with the
>     default
>     WebGUI distribution? See
>     http://www.webgui.org/community-wiki/random-thread-macro
>     /
>
>     /Martin/
>
> Well, as I said: it needs to be a extended for accepting a template ID
> as the second argument...
>

Did you read the stuff in the url I sent you? I sais right there:

   /templateURL/ URL of the template to use to display the random thread

Martin
>
>
>
> http://www.plainblack.com/webgui/dev/discuss/re-extending-the-randomassetproxy-by-a-templateid-argument/5
>
> ------------------------------------------------------------------------
>
>
>
>  



Back to Top
Rate [
|
]
 
 
bernd


Did you read the stuff in the url I sent you? I sais right there:

   /templateURL/ URL of the template to use to display the random thread

Martin


Now I did. I had not read your answer carefully enough. I think this is exactly what I need. Thank you very much!



Back to Top
Rate [
|
]
 
 
bartjol

Skip my remark, the RandomThread macro seems the way to go

Just trying to help:
isn't it another way to use a SQL report to pick the thread. Then you can template the SQL report according to your likings?



Back to Top
Rate [
|
]
 
 
bernd

Skip my remark, the RandomThread macro seems the way to go

Just trying to help:
isn't it another way to use a SQL report to pick the thread. Then you can template the SQL report according to your likings?

I have never used SQL-Reports before. How would that work? I assume you suggest to query the table containing threads directly and then pick an entry randomly? Is that really "clean" coding? What if the structure of tables change in future releases?

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



Back to Top
Rate [
|
]
 
 
martink
spunky@kashyyyk.de wrote:
> bernd wrote:
>
> I have never used SQL-Reports before. How would that work? I assume
> you suggest to query the table containing threads directly and then
> pick an entry randomly? Is that really "clean" coding? What if the
> structure of tables change in future releases?
>

That is correct. Whether you can cosider it 'clean' coding depends on if
you view no using the API as clean. If the db schema changes your
SQLReport will indeed break, and you'll have to fix it manually. However
in many cases this is not that big a problem. Obviously creating a Macro
or Asset that uses the API to fetch the data you want is the most
bestedest solution, but it requires you to add plugins to your site,
which is something a lot of people cannot do because they don't host
themselves. In that case a SQLReport is your only choice.

Martin
>
> --
> Trying to build a non-profit community portal for free-climbers around
> Magdeburg/Germany. Check out http://kletterfreunde-md.kashyyyk.de
> (under construction).
>
>
>
> http://www.plainblack.com/webgui/dev/discuss/re-extending-the-randomassetproxy-by-a-templateid-argument/4
>
> ------------------------------------------------------------------------
>
>
>
>  



Back to Top
Rate [
|
]
 
 
bartjol

but the random-thread macro takes a templateurl as 3rd parameter, ok it's not an id, but good enough it seem



Back to Top
Rate [
|
]
 
 
     Discuss > WebGUI Dev Goto page «Previous Page   1 2    Next Page»




Smoketest For nightly_2008-07-05 by Visitor - Sat @ 01:46am

Smoketest For nightly_2008-07-04 by Visitor - Fri @ 01:37am

Re: News Addon? by knowmad - Thu @ 06:04pm

Re: News Addon? by bepo - Thu @ 08:54am

Re: News Addon? by bepo - Thu @ 03:35am

Smoketest For nightly_2008-07-03 by Visitor - Thu @ 01:37am

Thingy Reporting (pt 2) by knowmad - Wed @ 05:37pm

Re: News Addon? by knowmad - Wed @ 05:12pm

spell checker and tinymce by elnino - Wed @ 04:50pm

Re: WebGUI works on perl 5.10 by knowmad - Wed @ 04:41pm

Re: how the cost installing WebGUI ?? by baylink - Wed @ 12:19pm

Re: News Addon? by bepo - Wed @ 07:38am

Re: News Addon? by bepo - Wed @ 03:38am