1
marijun
how to strip _shortdatestring delimiter?
  • 2005/2/5 13:18

  • marijun

  • Just popping in

  • Posts: 53

  • Since: 2004/6/4 1


i'm hacking agenda-x quite a bit and i was wondering if anyone could help me with this.

as it is, the module saves the date of a calendar event in YYYYMMDD format. all well and good for this purpose. but then, to display it, it does this:
$year intval (substr $row->date0));
$month intval (substr $row->date4));
$day intval (substr $row->date6));
  if (
_SHORTDATESTRING == "n/j/Y") {
    
$agendax['events'][$k]['date'] = _$day.$dateSuffix['ri']." ".($maand[$month])." ".$year.$dateSuffix['nian'];
  } elseif (
_SHORTDATESTRING == "j/n/Y") {
    
$agendax['events'][$k]['date'] = _($maand[$month])." ".$day.$dateSuffix['ri'].", ".$year.$dateSuffix['nian'];
  } else { 
// default to "j/n/Y"
    
$agendax['events'][$k]['date'] = $year.$dateSuffix['nian']." "._($maand[$month])." ".$day.$dateSuffix['ri'];
}


so, to use this module and have it at least show your proper date format, you have to have your _SHORTDATESTRING formatted in either n/j/Y or j/n/Y formats. not really ideal, though i'm sure those formats are most common.

what i'd like to do is make the script ignore the delimiters and be able to set the formats based solely on the values. or if anyone has a better idea, i'd be uber glad to hear it. i'm not very good at coding!

anybody have any links or code snippets that could help me figure this out?

2
m0nty
Re: how to strip _shortdatestring delimiter?
  • 2005/2/5 13:24

  • m0nty

  • XOOPS is my life!

  • Posts: 3337

  • Since: 2003/10/24


i thought agendax utilised datetime settings from XOOPS language/english/global.php?

have u tried editing that file? near the end you'll see the time & date strings..

3
marijun
Re: how to strip _shortdatestring delimiter?
  • 2005/2/5 13:57

  • marijun

  • Just popping in

  • Posts: 53

  • Since: 2004/6/4 1


it sure does, and that's the problem. not everyone has their date set to j/n/Y or n/j/Y. the script requires this or else you get stuck with n/j/Y. you shouldn't have to modify your XOOPS date format just to use this module.

4
DonXoop
Re: how to strip _shortdatestring delimiter?

Although I can't be much help on this one we're rooting for your success. Date strings is one of the more frequent issues with this module (now that we've figured out the apostrophe head banger). It happens that for my site and lazy users I haven't run into this as a big problem yet. However, a proper calendar is going to be much more important if my new site takes off as planned.

I'm trying to start a national site to give all the local and regional sites in our hobby (grassroots auto racing) a central place to meet and find info of all the other sites. Getting schedules entered in the first place is a big job if everything is duplicated and copied from the million ways the other sites put up data. Finding data that interests a user is the next step. Keeping it all in sync is almost a full time job if I want to get all the info I'd like.

It sounds like you now have a fork of the module and I for one am interested in how it turns out. An idea is to allow some kind of cross site sync (RSS like?) that makes keeping a calendar up to date an easier job. An offsite process like iCalendar is another way to keep it in check (web guis are a major pain when dealing with lots of data). That is a function of piCal that I'm looking into but that one has other issues.

5
m0nty
Re: how to strip _shortdatestring delimiter?
  • 2005/2/5 15:35

  • m0nty

  • XOOPS is my life!

  • Posts: 3337

  • Since: 2003/10/24


i'd just be happy for Agenda-X to be fully templatable and wrap html content better and for it to actual submit articles instead of randomly giving the article needs 'title' error even when a title is entered..

i think wjue said that error was due to character sets, but i dunno if he ever solved it or not..

i think it's 1 of the better events calendars and could be even better if all the pages to it were templated..

6
marijun
Re: how to strip _shortdatestring delimiter?
  • 2005/2/5 16:12

  • marijun

  • Just popping in

  • Posts: 53

  • Since: 2004/6/4 1


Quote:

m0nty wrote:
i'd just be happy for Agenda-X to be fully templatable and wrap html content better and for it to actual submit articles instead of randomly giving the article needs 'title' error even when a title is entered..

i think wjue said that error was due to character sets, but i dunno if he ever solved it or not..

i think it's 1 of the better events calendars and could be even better if all the pages to it were templated..


i'm working on that too, actually. this will be one fine module by the time i'm done with it. just need some help with some of the finer details.

Login

Who's Online

499 user(s) are online (64 user(s) are browsing Support Forums)


Members: 0


Guests: 499


more...

Donat-O-Meter

Stats
Goal: $100.00
Due Date: Oct 31
Gross Amount: $0.00
Net Balance: $0.00
Left to go: $100.00
Make donations with PayPal!

Latest GitHub Commits