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
Getting date URLs and prev/next links working in Codeigniter [message #177688] Fri, 13 April 2012 15:08 Go to previous message
deuteros is currently offline  deuteros
Messages: 2
Registered: April 2012
Karma:
Junior Member
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));
}
[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 28 11:09:05 GMT 2024

Total time taken to generate the page: 0.04576 seconds