REGISTER or LOGIN to have the annoying ads removed.
Thread Rating:
  • 0 Vote(s) - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
alternate calendar text colour?
#11
Ok; hopefully this solution works for you too =P
I added a Order By clause in the events_query; so the events will be ordered by date;
In my first post i told you to do this;

Find
PHP Code:
$events = array();
    
// Load Events
    
$query $db->simple_select(TABLE_PREFIX."events""subject, private, date, eid""date LIKE '%-{$month}-{$year}' AND ((author='{$mybb->user['uid']}' AND private='yes') OR (private!='yes'))");
    while(
$event $db->fetch_array($query))
    { 

Add below
PHP Code:
$altcalcol alt_calcol(); 

Undo that change; (remove $altcalcol = alt_calcol(); ) and replace the whole thing with this
PHP Code:
    $events = array();
    
// Load Events
    
$query $db->simple_select(TABLE_PREFIX."events""subject, private, date, eid""date LIKE '%-{$month}-{$year}' AND ((author='{$mybb->user['uid']}' AND private='yes') OR (private!='yes'))", array('order_by' => 'date''order_dir' => 'ASC'));
    while(
$event $db->fetch_array($query))
    {
        if(
array_key_exists($eventdate[0], $events))
        {
            
$altcalcol alt_calcol();    
        }
        else
        {
            
$altcalcol alt_calcol(1);
        } 

Find (should be in while-clause)
PHP Code:
$eventdate explode("-"$event['date']); 

And move it above
PHP Code:
        if(array_key_exists($eventdate[0], $events))
        { 
#12
yes that has worked! Smile
thanks Smile
#13
I upgraded the forum to a 14.2 and Ive lost the alternate colours. Sad
Do you know how to achieve this on 1.4?
Also not all of my events show for each day now. If I have more than 4 events for a day it hides them all & puts '4 events' in its place.
Does anyone know how I make it show all events for each day?
Thanks
#14
Ive worked out how to get the eventsto all show up.
But still not how to get the events to show in alternate colours per event.
Does anyone know how to do this for 1.4?
Thanks


Forum Jump:


Users browsing this thread: 1 Guest(s)