Go to main content

Textpattern CMS support forum

You are not logged in. Register | Login | Help

#136 2007-12-18 14:47:04

the_ghost
Plugin Author
From: Minsk, The Republic of Belarus
Registered: 2007-07-26
Posts: 907
Website

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

Zanza
Plugin Author
Registered: 2005-08-18
Posts: 699
Website

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

Brun
New Member
From: Ukraine
Registered: 2008-08-19
Posts: 8
Website

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

the_ghost
Plugin Author
From: Minsk, The Republic of Belarus
Registered: 2007-07-26
Posts: 907
Website

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

mrdale
Member
From: Walla Walla
Registered: 2004-11-19
Posts: 2,215
Website

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

the_ghost
Plugin Author
From: Minsk, The Republic of Belarus
Registered: 2007-07-26
Posts: 907
Website

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

#145 2008-09-02 01:03:30

gomedia
Plugin Author
Registered: 2008-06-01
Posts: 1,373

Re: [plugin] [ORPHAN] mdp_calendar

A number of people have reported problems with the day heading being one out: #50, #107, #121

I hadn’t seen this problem until, as misfortune would have it, the site went live & my client reported it! The dates/articles were all correct but the day name headings were being displayed as Tue-Mon rather than Mon-Sun (I’m using firstday=“1”). At first I thought it was only occuring on certain days but the browser cache was masking the fact that it was happening every day between midnight and 10:00am. The time is significant because I’m in a GMT+10 timezone. Problem occurs both on the live site AND on my Mac.

The fix described in #117 & #118 didn’t do anything for me. And I must admit I haven’t noticed a problem where articles on the first day of month are not displayed or where article title rollovers are wrong.

I’m using a modified version 1.1 on TXP 4.0.6.

The code to generate the days of the week uses a magic number which is fed into PHP date functions and back out again to get the day names in the correct locale. Unfortunately the magic number is massaged according to some server offset which is either +10 hours or -14 hours, depending on the time of day.

To fix the problem, I took a different approach. I picked a date that is/was/will always be Sunday, i.e. 4th Jan 1970.

Find the dspDayNames function (it’s near the end of the plugin). After the block of code:

for($i=$start; $i<$end; $i++) {
    // Remove the tz_offset because safe_strftime adds it, but we get locale support
    $names[] = ucfirst(safe_strftime($this->dayNameFmt, 86400*$i - tz_offset() ));
    }

insert the following:

$names = array();
$sunday = strtotime("1970-01-04");
for($i=0; $i<7; $i++) $names[] = ucfirst(safe_strftime($this->dayNameFmt,$sunday + 86400 * $i));

You could probably delete the lines before but to be on the safe side, this way the mod simply resets the $names array.

Offline

#146 2008-09-02 04:49:29

net-carver
Archived Plugin Author
Registered: 2006-03-08
Posts: 1,648

Re: [plugin] [ORPHAN] mdp_calendar

gomedia wrote:

Hi net-carver, my change is a change of someone elses change … if that makes sense. See post #130.

Ok, now I see it. I’m merging all these changes together and will post the combined source on my GitHub account when it’s done.

Thank you!

Last edited by net-carver (2008-09-02 04:49:57)


Steve

Offline

#147 2008-09-02 06:14:24

net-carver
Archived Plugin Author
Registered: 2006-03-08
Posts: 1,648

Re: [plugin] [ORPHAN] mdp_calendar

All

I’ve merged all the recent changes posted here into the code. If you are interested, you can…

  • grab the latest php file and compile it yourselves or…
  • grab the compiled version from Gist.

This is based on Marshall’s v1.1 plugin and includes patches by Adi, Brun and LeonNet.

If you spot any mistakes in the merging of those patches — or if I’ve generally broken things — let me know.

Last edited by net-carver (2008-09-02 06:18:30)


Steve

Offline

#148 2008-09-09 12:22:32

richardjkeys
New Member
From: Barnsley/Halifax UK
Registered: 2008-09-09
Posts: 3
Website

Re: [plugin] [ORPHAN] mdp_calendar

First let me say excellent work to everyone who’s ever had anything to do with this plugin.

Now then, down to business.

My install is running in a Sub Dir for development on my machine. Because of this the calendar’s nav was broken, and it took me to the root of my server (which is where you’d be on a live site)

To “fix” this I removed the “/” from the return and $r variables of the navigation method in the PHP. (lines 266 and 269 on Github).

I imagine this will have consequences when my site is in the root of a server.

Now for another problem…

My calender correctly displays days with events on them, and past events can be viewed by clicking the date. Ace!

However, although the calendar identifies dates with future events, clicking on it gives me a blank page!

Anyone have any idea why?

To fix this I simply added time=“any” to the txp tag in my page template

<div class="hfeed"><txp:article limit="5" /></div>

so that it reads:

<div class="hfeed"><txp:article limit="5" time="any"/></div>

Daft of me really! Hopefully this will help someone out there!

Also my title attributes for these links are a day off…I think I read somewhere that there is a fix, so if anyone can point me in the right direction I’d be greatful :)

fixed this, ta jagorny

Sorry if any of this has been covered extensively already, but the forums surrounding textpattern calendars are getting a little difficult to follow!

Last edited by richardjkeys (2008-09-09 13:07:17)

Offline

#149 2008-09-14 13:31:48

Gallex
Member
Registered: 2006-10-08
Posts: 1,331

Re: [plugin] [ORPHAN] mdp_calendar

multiply sections not allowed, just one, am i right?

Offline

#150 2008-09-14 22:47:22

gomedia
Plugin Author
Registered: 2008-06-01
Posts: 1,373

Re: [plugin] [ORPHAN] mdp_calendar

Gallex wrote:

multiply sections not allowed, just one, am i right?

Yes, you’re right but it’s not compulsory – you can specify a category or author instead.

Offline

Board footer

Powered by FluxBB