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
Switch to threaded view of this topic 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 next message
deuteros is currently offline  deuteros
Messages: 2
Registered: April 2012
Karma: 0
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));
}
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 next message
Captain Paralytic is currently offline  Captain Paralytic
Messages: 204
Registered: September 2010
Karma: 0
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/
Re: Getting date URLs and prev/next links working in Codeigniter [message #177693 is a reply to message #177689] Fri, 13 April 2012 23:52 Go to previous messageGo to next message
deuteros is currently offline  deuteros
Messages: 2
Registered: April 2012
Karma: 0
Junior Member
On Fri 13 Apr 2012 11:36:34a, Captain Paralytic <paul_lautman(at)yahoo(dot)com>
wrote in
news:96831057-e68e-4cc2-a53d-ac4e11540ac2(at)9g2000yqp(dot)googlegroups(dot)com:

> Better luck to be found here:
> http://codeigniter.com/forums/

You would think so but no one answered.
Re: Getting date URLs and prev/next links working in Codeigniter [message #177697 is a reply to message #177688] Sun, 15 April 2012 09:59 Go to previous messageGo to next message
Thomas 'PointedEars'  is currently offline  Thomas 'PointedEars'
Messages: 701
Registered: October 2010
Karma: 0
Senior Member
deuteros 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?

Yes.

> [uncommented code]

<http://www.catb.org/~esr/faqs/smart-questions.html>


PointedEars
--
Sometimes, what you learn is wrong. If those wrong ideas are close to the
root of the knowledge tree you build on a particular subject, pruning the
bad branches can sometimes cause the whole tree to collapse.
-- Mike Duffy in cljs, <news:Xns9FB6521286DB8invalidcom(at)94(dot)75(dot)214(dot)39>
Re: Getting date URLs and prev/next links working in Codeigniter [message #177699 is a reply to message #177697] Sun, 15 April 2012 12:52 Go to previous messageGo to next message
Jerry Stuckle is currently offline  Jerry Stuckle
Messages: 2598
Registered: September 2010
Karma: 0
Senior Member
On 4/15/2012 5:59 AM, Thomas 'PointedEars' Lahn wrote:
> deuteros 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?
>
> Yes.
>
>> [uncommented code]
>
> <http://www.catb.org/~esr/faqs/smart-questions.html>
>
>
> PointedEars

Trolling again, Pointed Head? Obviously you can't help. But you have
to show your ignorance anyway.

--
==================
Remove the "x" from my email address
Jerry Stuckle
JDS Computer Training Corp.
jstucklex(at)attglobal(dot)net
==================
Re: Getting date URLs and prev/next links working in Codeigniter [message #177700 is a reply to message #177693] Sun, 15 April 2012 13:06 Go to previous messageGo to next message
Jerry Stuckle is currently offline  Jerry Stuckle
Messages: 2598
Registered: September 2010
Karma: 0
Senior Member
On 4/13/2012 7:52 PM, deuteros wrote:
> On Fri 13 Apr 2012 11:36:34a, Captain Paralytic<paul_lautman(at)yahoo(dot)com>
> wrote in
> news:96831057-e68e-4cc2-a53d-ac4e11540ac2(at)9g2000yqp(dot)googlegroups(dot)com:
>
>> Better luck to be found here:
>> http://codeigniter.com/forums/
>
> You would think so but no one answered.

You need to give them some time. Like usenet, people there are
volunteers, also. And if you don't get an answer in 2-3 business days,
you should try reframing your question.

The people in the codeigniter forum are pretty good at helping each
other and have a lot more knowledge about the framework than anyone here.

--
==================
Remove the "x" from my email address
Jerry Stuckle
JDS Computer Training Corp.
jstucklex(at)attglobal(dot)net
==================
Re: Getting date URLs and prev/next links working in Codeigniter [message #177705 is a reply to message #177699] Sun, 15 April 2012 22:13 Go to previous message
M. Strobel is currently offline  M. Strobel
Messages: 386
Registered: December 2011
Karma: 0
Senior Member
Am 15.04.2012 14:52, schrieb Jerry Stuckle:
> On 4/15/2012 5:59 AM, Thomas 'PointedEars' Lahn wrote:
>> deuteros 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?
>>
>> Yes.
>>
>>> [uncommented code]
>>
>> <http://www.catb.org/~esr/faqs/smart-questions.html>
>>
>>
>> PointedEars
>
> Trolling again, Pointed Head? Obviously you can't help. But you have to show your
> ignorance anyway.
>

Many people here are avid to help. But so far the OP has not even shown this is a PHP
question.

/Str.
  Switch to threaded view of this topic Create a new topic Submit Reply
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: Fri Nov 22 08:22:35 GMT 2024

Total time taken to generate the page: 0.02631 seconds