FUDforum
Fast Uncompromising Discussions. FUDforum will get your users talking.

Home » Imported messages » comp.lang.php » Getting date URLs and prev/next links working in Codeigniter
Show: Today's Messages :: Polls :: Message Navigator
Return to the default flat view Create a new topic Submit Reply
Re: Getting date URLs and prev/next links working in Codeigniter [message #177689 is a reply to message #177688] Fri, 13 April 2012 15:36 Go to previous messageGo to previous message
Captain Paralytic is currently offline  Captain Paralytic
Messages: 204
Registered: September 2010
Karma:
Senior Member
On Apr 13, 4:08 pm, deuteros <deute...@xrs.net> wrote:
> I can get the prev/next links working and I can get make every date a
> clickable URL, but I can't seem to get both working at the same time. Can
> anyone help?
>
>         function generateCalendar()
>         {
>                 $date = (!isset($_GET['month']) && !isset($_GET['year'])) ? time() : strtotime($_GET['month'] . '/1/' . $_GET['year']);
>
>         $day = date('d', $date);
>         $month = date('m', $date);
>         $year = date('Y', $date);
>
>                 $this->load->helper('url');
>
>                 //$template['template'] = '{cal_cell_no_content}<div class="day_num"><a href="/'.$year.'/'.$month.'/{day}">{day}</a></div>{/cal_cell_no_content}';
>                 $this->conf['template'] = '{cal_cell_no_content}<div class="day_num"><a href="/'.$year.'/'.$month.'/{day}">{day}</a></div>{/cal_cell_no_content}';
>
>                 $prefs = array
>                          (
>                'show_next_prev'  => TRUE,
>                'next_prev_url'   => '/CodeIgniter/index.php/CalendarTest/generateCalendar'
>              );
>                 //$this->load->library('calendar', $template);
>                 $this->load->library('calendar', $prefs);
>                 echo $this->calendar->generate($this->uri->segment(3), $this->uri->segment(4));
>         }

Better luck to be found here:
http://codeigniter.com/forums/
[Message index]
 
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Previous Topic: Prep. Statements only in mysql-i?
Next Topic: Stats comp.lang.php (last 7 days)
Goto Forum:
  

-=] Back to Top [=-
[ Syndicate this forum (XML) ] [ RSS ]

Current Time: Thu Nov 07 19:23:36 GMT 2024

Total time taken to generate the page: 0.07134 seconds