Textpattern CMS support forum
You are not logged in. Register | Login | Help
- Topics: Active | Unanswered
#133 2007-12-17 10:35:58
- gerhard01
- Plugin Author
- Registered: 2006-12-07
- Posts: 108
Re: [plugin] [ORPHAN] mdp_calendar
greenrift wrote:
v1.1 2007-12-16
Using the updated version I get this displayed on top of my pages (TXP 4.0.4):
r($j = 0; $j<=6; $j++, $i++) { if($i 7) { $i = 0; } $c[] = ''.$names[$i].""; } $c[] = ''; return join('',$c); } // == end dspDayNames ============================================ /** * Displays all day cells for the month * *
return string * private */ function dspDayCells ( ) { $i = 0; // cell counter $c[] = ''; // first display empty cells based on what weekday the month starts in for( $j=0; $j<$this->startOffset; $j++ ) { $i++; $c[] = ' '; } // end offset cells // write out the rest of the days, at each sunday, start a new row. for( $d=1; $d<=$this->endDay; $d++ ) { $i++; $c[] = $this->dspDayCell( $d ); if ( $i%7 0 ) { $c[] = ''; } if ( $d<$this->endDay && $i%7 0 ) { $c[] = ''; } } // fill in the final row $left = 7 - ( $i%7 ); if ( $left < 7) { for ( $j=0; $j<$left; $j++ ) { $c[] = ' '; } $c[] = "\n\t"; } return join('',$c); } function dspDayCell ( $day ) { return ''.$day.''; } function is_today($day, $ts) { if( $this->month safe_strftime('%m' ,time()) and $day safe_strftime('%d',time()) and $this->year == safe_strftime('%Y', time()) ) return 1; else return 0; } } // end class
version 1.0 just worked fine. Would i have to downgrade again?
Offline
#134 2007-12-17 23:48:06
Re: [plugin] [ORPHAN] mdp_calendar
No, something strange happened in the build process. I think copy and pasting went haywire or something. The version on my website is now fixed.
Offline
#135 2007-12-18 07:52:07
- gerhard01
- Plugin Author
- Registered: 2006-12-07
- Posts: 108
Re: [plugin] [ORPHAN] mdp_calendar
greenrift wrote:
The version on my website is now fixed.
Thanks a bunch – 1.1. works again smoothly.
Offline
#136 2007-12-18 14:47:04
Re: [plugin] [ORPHAN] mdp_calendar
Is it necessarн to use article_custom to display list of articles for selected day? Becaus i have only <txp:article />
on my page template and no articles are displayed when i’m viewing url like http://uromax.ru/?date=2007-12-1
Can somebody explain how they view list of articles?
Providing help in hacking ATM! Come to courses and don’t forget to bring us notebook and hammer! What for notebook? What a kind of hacker you are without notebok?
Offline
#137 2008-06-17 05:34:09
- gomedia
- Plugin Author
- Registered: 2008-06-01
- Posts: 1,373
Re: [plugin] [ORPHAN] mdp_calendar
LeonNet wrote:
Hello Forum,
i have a little change to make the mdp_calendar more valid to WAI.
The table has no “summary” attribute.
return doTag(join('',$c),'table',$this->tableClass,$summary,$id);
Note that the code above should read:
return doTag(join('',$c),'table',$this->tableClass,$summary.$id);
The comma between $summary and $id needs to be a dot.
And also I had to add a line:
$calendar->setTableSummary($atts['summary']);
after
$calendar->setTableClass($atts['class']);
Regards,
Adi
Offline
#138 2008-06-17 10:49:33
Re: [plugin] [ORPHAN] mdp_calendar
Thanks for sharing. I’m using it on a live site, I’ll give it a check!
Z-
Offline
#139 2008-08-20 10:38:31
Re: [plugin] [ORPHAN] mdp_calendar
I use MLP. If you don`t select category plugin set not correct url.
Fix it :
Find
[qoute]return “?m=$month”.a.“y=$year”.$id;[/qoute]
Replace
[qoute]return “/?m=$month”.a.“y=$year”.$id;[/qoute]
Last edited by Brun (2008-08-20 10:39:06)
Offline
#140 2008-08-31 16:53:56
Re: [plugin] [ORPHAN] mdp_calendar
How should template look like to handle date, produced by mdp_calendar in URL? I meen what tag i should use, to list articles what suite to selected date?
Providing help in hacking ATM! Come to courses and don’t forget to bring us notebook and hammer! What for notebook? What a kind of hacker you are without notebok?
Offline
#141 2008-08-31 17:14:19
Re: [plugin] [ORPHAN] mdp_calendar
the_ghost wrote:
How should template look like to handle date, produced by mdp_calendar in URL? I meen what tag i should use, to list articles what suite to selected date?
So all mdp is really doing is sending an article (large calendar) or article list (small_calendar) to a section. All of the regular article behaviour applies in that section. Unfortunately you have to get tricky with urlvars to get it to know how to handle a single article from a small calendar.
hope this helps
Offline
#142 2008-08-31 18:07:11
Re: [plugin] [ORPHAN] mdp_calendar
Not really. So, if i have url like this http://www.ru/?date=2008-08-29
and <txp:article />
at Page i will not see articles by 29th of august 2008? How do you display articles for selected by url date?
Providing help in hacking ATM! Come to courses and don’t forget to bring us notebook and hammer! What for notebook? What a kind of hacker you are without notebok?
Offline
#143 2008-09-01 16:34:54
- net-carver
- Archived Plugin Author
- Registered: 2006-03-08
- Posts: 1,648
Re: [plugin] [ORPHAN] mdp_calendar
gomedia
Hello Adi, I’ve been trying to find the first line you mentioned here in my download of v1.1 but I can’t find the line!
You suggested changing this line…
return doTag(join('',$c),'table',$this->tableClass,$summary,$id);
… but it isn’t there. The closest match I can see is…
return doTag(join('',$c),'table',$this->tableClass,$id);
Was the insertion of the summary in your first line a change you made to your download — or am I missing something?
— Steve
Offline
#144 2008-09-01 23:01:00
- gomedia
- Plugin Author
- Registered: 2008-06-01
- Posts: 1,373
Re: [plugin] [ORPHAN] mdp_calendar
net-carver wrote:
Hello Adi, I’ve been trying to find the first line you mentioned here in my download of v1.1 but I can’t find the line!
Hi net-carver, my change is a change of someone elses change … if that makes sense. See post #130.
Cheers.
Offline