Welcome Guest, Not a member yet? Register   Sign In
CI Calendar...dont work[SOLVED]
#1

[eluser]Asinox[/eluser]
ok, i want to know what is bad here, but i cant see the links in the calendar...

im trying with the documentation and nothing happen...

Code:
$data = array(
               3  => 'http://example.com/news/article/2006/03/',
               7  => 'http://example.com/news/article/2006/07/',
               13 => 'http://example.com/news/article/2006/13/',
               26 => 'http://example.com/news/article/2006/26/'
             );

echo $this->calendar->generate(2006, 6, $data);
Quote:Using the above example, day numbers 3, 7, 13, and 26 will become links pointing to the URLs you've provided.
... but i cant see the links ....

some help please...
#2

[eluser]Colin Williams[/eluser]
Quote:ok, i want what is bad

Let's be civil here, please, and keep things on topic.
#3

[eluser]Asinox[/eluser]
[quote author="Colin Williams" date="1232447269"]
Quote:ok, i want what is bad

Let's be civil here, please, and keep things on topic.[/quote]

jaja sorry, with my english...jejeje
#4

[eluser]Colin Williams[/eluser]
haha.. just teasing. Not sure what problem you are having here. Maybe you could post a little more code?
#5

[eluser]Asinox[/eluser]
ejje

This is all my code in the view file... because im testing the calendar before using with my app....but i cant see the links... just i can see the month with the day ("today") in bold... Sad
#6

[eluser]Unknown[/eluser]
Accidentally you might have changed the calendar.php file inside libraries. Get the one that matches your CI version and replace it.
May be that would work.
#7

[eluser]Asinox[/eluser]
[quote author="Crusher" date="1232462269"]Accidentally you might have changed the calendar.php file inside libraries. Get the one that matches your CI version and replace it.
May be that would work.[/quote]

well i hav the last CI, and the Calendar.php library is the original one Sad
#8

[eluser]Ivan A. Zenteno[/eluser]
Do you make the Template for the calendar?
#9

[eluser]Asinox[/eluser]
yes, but know that i see i have a mistake, but i dontknow how apply the "data" with the "template" to the calendar...

here all my code:

Code:
$data = array(
               3  => 'http://example.com/news/article/2006/03/',
               7  => 'http://example.com/news/article/2006/07/',
               13 => 'http://example.com/news/article/2006/13/',
               26 => 'http://example.com/news/article/2006/26/'
             );


$prefs['template'] = '

   {table_open}<table border="1" cellpadding="0" cellspacing="0">{/table_open}

   {heading_row_start}<tr>{/heading_row_start}

   {heading_previous_cell}<th><a href="{previous_url}">&lt;&lt;</a></th>{/heading_previous_cell}
   {heading_title_cell}<th colspan="{colspan}">{heading}</th>{/heading_title_cell}
   {heading_next_cell}<th><a href="{next_url}">&gt;&gt;</a></th>{/heading_next_cell}

   {heading_row_end}</tr>{/heading_row_end}

   {week_row_start}<tr>{/week_row_start}
   {week_day_cell}<td>{week_day}</td>{/week_day_cell}
   {week_row_end}</tr>{/week_row_end}

   {cal_row_start}<tr>{/cal_row_start}
   {cal_cell_start}<td>{/cal_cell_start}

   {cal_cell_content}<a href="{content}">{day}</a>{/cal_cell_content}
   {cal_cell_content_today}<div class="highlight"><a href="{content}">{day}</a></div>{/cal_cell_content_today}

   {cal_cell_no_content}{day}{/cal_cell_no_content}
   {cal_cell_no_content_today}<div class="highlight">{day}</div>{/cal_cell_no_content_today}

   {cal_cell_blank}&nbsp;{/cal_cell_blank}

   {cal_cell_end}</td>{/cal_cell_end}
   {cal_row_end}</tr>{/cal_row_end}

   {table_close}</table>{/table_close}
';

$this->load->library('calendar', $prefs);

echo $this->calendar->generate('','',$data);

i know that i have problem there, because i dont know how apply the $prefs and the $data together with the year and month Sad

sorry
#10

[eluser]Asinox[/eluser]
the problem was that i was autoloading the calendar library, and loading the library again in the controller.

thanks guys.




Theme © iAndrew 2016 - Forum software by © MyBB