Re: dynamic calendar in flux-cms

Christian Stocker <[email protected]>
Newsgroups gmane.comp.cms.bitflux.general
Organization Bitflux GmbH
Message-ID <[email protected]>
Hi

First, please hit reply-to-all in your mail client when answering :)



On 15.12.2005 13:38 Uhr, Adrian Nussbaum wrote:
>>>
>>> grreat. it works fine. the published events don't look that nice yet
>>> (imho), but it can become cool.
>>
>>
>> It's a draft work. just edit the event.xsl to make it look nice
> 
> that's what i'm doing at the moment. but how can i bring the date/
> time-format in a nicer format? i had a look into the events.php but i 
> didn't get it. looks like japanese to me as deeper as i go into the 
> system.... ;)

good question :)

Change the query


    $query="select * from ".$prefix."events order by von asc";

to

     $res = $GLOBALS['POOL']->db->query("select location, id,
description, uri, title,
        bis,
        date_format(von,'%Y%m%dT%H%i%SZ') as von,
        date_format(bis,'%Y%m%dT%H%i%SZ') as bis
        from ".$tablePrefix."events");

and adjust '%Y%m%dT%H%i%SZ' to what you want. how that format works is
explained in the mysql documentation.

>>> some more questions:
>>> - isn't there a link/possibilitiy to access directly out of the  admin?
>>
>>
>> Edit structure/quicklinks.php and you have it in the dropdown on  the top
>> right.
> 
> no problem, just edit it.... BUT HOW? ;) i tried serveral things but 
> nothing worked... :((

just add

'admin/dbforms2/events/' => 'Events',


>>> - how can i show the eg. netx 5 upcoming events on the home (root) 
>>> page?
>>
>>
>> something like
>>
>> <xsl:for-each
>> select="document('portlet://events/index.hml')/something/here">
>>
>> should work. I don't have the time to look the actual code up for you,
>> but that should help for a start. ( replace /events/ with the path to
>> the collection where your events plugin is)
> 
> 
> i can try some things... but i wonder what i have to write instead of 
> "/something/here"...??

domain.com/events/?XML=1

should give you the raw XML, with that you should be able to build your
xpath query.

chregu

> 
> 
> adrian

-- 
christian stocker | Bitflux GmbH | schoeneggstrasse 5 | ch-8004 zurich
phone +41 44 240 56 70 | mobile +41 76 561 88 60 | fax +41 1 240 56 71
http://www.bitflux.ch | [email protected] |  GPG 0x5CE1DECB
-- 
bitflux-cms mailing list
[email protected]
http://lists.bitflux.ch/cgi-bin/listinfo/bitflux-cms
lmpx.com only provides a reader for public news (NNTP) servers. It is not affiliated with the servers or forums shown here and is not responsible for the content of articles, which is written by their respective authors.