[Block Code Request] Latest or Random Ticket in Simpledesk

Started by Daydreamer, October 09, 2010, 02:56:56 PM

Previous topic - Next topic

Daydreamer

I need that. I use the simple desk for a FAQ system. Do we have any block code ?


tfs

None that I'm aware of.  Though I think things will pick up around here in the following weeks.
A good tree cannot bring forth evil fruit, neither can an evil tree bring forth good fruit.

Gruffen

Well, block code to get what, exactly?

There are a few SSI routines, but nothing that's directly useful to you.

tfs

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
A good tree cannot bring forth evil fruit, neither can an evil tree bring forth good fruit.

Gruffen

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.

tfs

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.
A good tree cannot bring forth evil fruit, neither can an evil tree bring forth good fruit.

Gruffen

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.