Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]


Groups > comp.lang.php > #5517 > unrolled thread

Getting date URLs and prev/next links working in Codeigniter

Started bydeuteros <deuteros@xrs.net>
First post2012-04-13 15:08 +0000
Last post2012-04-16 00:13 +0200
Articles 7 — 5 participants

Back to article view | Back to comp.lang.php


Contents

  Getting date URLs and prev/next links working in Codeigniter deuteros <deuteros@xrs.net> - 2012-04-13 15:08 +0000
    Re: Getting date URLs and prev/next links working in Codeigniter Captain Paralytic <paul_lautman@yahoo.com> - 2012-04-13 08:36 -0700
      Re: Getting date URLs and prev/next links working in Codeigniter deuteros <deuteros@xrs.net> - 2012-04-13 23:52 +0000
        Re: Getting date URLs and prev/next links working in Codeigniter Jerry Stuckle <jstucklex@attglobal.net> - 2012-04-15 09:06 -0400
    Re: Getting date URLs and prev/next links working in Codeigniter Thomas 'PointedEars' Lahn <PointedEars@web.de> - 2012-04-15 11:59 +0200
      Re: Getting date URLs and prev/next links working in Codeigniter Jerry Stuckle <jstucklex@attglobal.net> - 2012-04-15 08:52 -0400
        Re: Getting date URLs and prev/next links working in Codeigniter "M. Strobel" <sorry_no_mail_here@nowhere.dee> - 2012-04-16 00:13 +0200

#5517 — Getting date URLs and prev/next links working in Codeigniter

Fromdeuteros <deuteros@xrs.net>
Date2012-04-13 15:08 +0000
SubjectGetting date URLs and prev/next links working in Codeigniter
Message-ID<jm9fh0$f13$1@dont-email.me>
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));
	}

[toc] | [next] | [standalone]


#5518

FromCaptain Paralytic <paul_lautman@yahoo.com>
Date2012-04-13 08:36 -0700
Message-ID<96831057-e68e-4cc2-a53d-ac4e11540ac2@9g2000yqp.googlegroups.com>
In reply to#5517
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/

[toc] | [prev] | [next] | [standalone]


#5522

Fromdeuteros <deuteros@xrs.net>
Date2012-04-13 23:52 +0000
Message-ID<jmae76$8c0$1@dont-email.me>
In reply to#5518
On Fri 13 Apr 2012 11:36:34a, Captain Paralytic <paul_lautman@yahoo.com>
wrote in
news:96831057-e68e-4cc2-a53d-ac4e11540ac2@9g2000yqp.googlegroups.com: 

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

You would think so but no one answered.

[toc] | [prev] | [next] | [standalone]


#5529

FromJerry Stuckle <jstucklex@attglobal.net>
Date2012-04-15 09:06 -0400
Message-ID<jmeh3t$c2a$1@dont-email.me>
In reply to#5522
On 4/13/2012 7:52 PM, deuteros wrote:
> On Fri 13 Apr 2012 11:36:34a, Captain Paralytic<paul_lautman@yahoo.com>
> wrote in
> news:96831057-e68e-4cc2-a53d-ac4e11540ac2@9g2000yqp.googlegroups.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@attglobal.net
==================

[toc] | [prev] | [next] | [standalone]


#5526

FromThomas 'PointedEars' Lahn <PointedEars@web.de>
Date2012-04-15 11:59 +0200
Message-ID<1433757.fOWx4Ypy67@PointedEars.de>
In reply to#5517
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@94.75.214.39>

[toc] | [prev] | [next] | [standalone]


#5528

FromJerry Stuckle <jstucklex@attglobal.net>
Date2012-04-15 08:52 -0400
Message-ID<jmegb4$5pt$3@dont-email.me>
In reply to#5526
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@attglobal.net
==================

[toc] | [prev] | [next] | [standalone]


#5534

From"M. Strobel" <sorry_no_mail_here@nowhere.dee>
Date2012-04-16 00:13 +0200
Message-ID<9v0vfdF4m6U1@mid.uni-berlin.de>
In reply to#5528
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.

[toc] | [prev] | [standalone]


Back to top | Article view | comp.lang.php


csiph-web