SimpleDesk

SimpleDesk! => SimpleDesk Support => Topic started by: Daydreamer on October 09, 2010, 02:56:56 PM

Title: [Block Code Request] Latest or Random Ticket in Simpledesk
Post by: Daydreamer on October 09, 2010, 02:56:56 PM
I need that. I use the simple desk for a FAQ system. Do we have any block code ?
Title: Re: [Block Code Request] Latest or Random Ticket in Simpledesk
Post by: Daydreamer on October 14, 2010, 12:34:19 PM
Bump!?
Title: Re: [Block Code Request] Latest or Random Ticket in Simpledesk
Post by: tfs on October 14, 2010, 02:17:45 PM
None that I'm aware of.  Though I think things will pick up around here in the following weeks.
Title: Re: [Block Code Request] Latest or Random Ticket in Simpledesk
Post by: Gruffen on April 11, 2011, 06:32:13 AM
Well, block code to get what, exactly?

There are a few SSI routines, but nothing that's directly useful to you.
Title: Re: [Block Code Request] Latest or Random Ticket in Simpledesk
Post by: tfs on April 24, 2011, 10:24:06 PM
Quote from: Gruffen on April 11, 2011, 06:32:13 AM
Well, block code to get what, exactly?

I can't speak for the original poster, but if I were to hazard a guess it would be... anything that sets an example of how write the "Hello World" version of block code.  Something to get the ball rolling.  For instance, the x most recent tickets.  Or something like...

Total Open Tickets: x
Opened Last 24 Hrs: x
Closed Last 24 Hrs: x
Title: Re: [Block Code Request] Latest or Random Ticket in Simpledesk
Post by: Gruffen on April 24, 2011, 11:13:25 PM
Well, the hello world of block code is simply:

<?php

echo 'Hello world!';

?>


A block is just a snatch of PHP that's run at the right time.

There's no magic block code that can just give you those things, something has to be written to support it, like an SSI function. I wrote a few of them way way back just after 1.0 was finished, but no-one ever told me what they wanted to be able to put in a portal so I never did too much with them. Probably don't even work properly with departments support, come to think of it.
Title: Re: [Block Code Request] Latest or Random Ticket in Simpledesk
Post by: tfs on April 24, 2011, 11:32:27 PM
Quote from: Gruffen on April 24, 2011, 11:13:25 PM
Well, the hello world of block code is simply:

<?php

echo 'Hello world!';

?>


:)  I meant Hello World from the standpoint of pulling data from SD.  Like some ticket totals.  Though the original poster hasn't been back in a looong time, so I wouldn't waste any time on it at the moment, particularly since he would be using 1.0 anyway.
Title: Re: [Block Code Request] Latest or Random Ticket in Simpledesk
Post by: Gruffen on April 25, 2011, 04:40:29 AM
From the standpoint of pulling data from SD, the exact same - character for character - block code applies. Can't just pull data from SD without knowing what data is desired, just like every other SSI function which exists for the same purpose.