Textpattern CMS support forum

You are not logged in. Register | Login | Help

#641 2011-03-28 01:36:54

lazlo
Member
Registered: 2004-02-24
Posts: 102

Re: smd_calendar: complete schedule / event / calendar / diary

Hi Stef

Where do you custom fields show up in the Write Tab? Or in the db table? Do I have to create them myself?
I am testing 4.30 textpattern just upgraded to .50 smd_calendar and also using glz_custom_fields 1.2.4 and have many existing custom fields but not smd_calendars?

[Edit] I just installed a base install of textpattern 4.4 and installed .50 smd_calendar and stil can’t see the custom fields you reference in the docs

“Custom field to specify event frequency (1 week / 10 days / 3 months / etc)”
“Custom fields for in/exclusions (a list of dates on which that event is (re)scheduled/cancelled/omitted)”

what am I missing?

Les

Last edited by lazlo (2011-03-28 04:31:09)

Offline

#642 2011-03-28 05:34:49

mrdale
Moderator
From: Walla Walla
Registered: 2004-11-19
Posts: 2,202
Website

Re: smd_calendar: complete schedule / event / calendar / diary

kick. it still doesn’t provide me with a pony. ;)

Big thanks bloker.

Offline

#643 2011-03-28 09:25:38

Bloke
Developer
From: Leeds, UK
Registered: 2006-01-29
Posts: 8,586
Website

Re: smd_calendar: complete schedule / event / calendar / diary

lazlo wrote:

can’t see the custom fields you reference in the docs

You create them as normal in the Advanced Prefs screen and then tell the plugin which numbers they are via stepfield="custom_2", for example. If you are using glz_cf then you’d define them in Extensions->Custom Fields instead.


The smd plugin menagerie — for when you need one more gribble of power from Textpattern. Bleeding-edge code available on GitHub.

Txp Builders – finely-crafted code, design and Txp

Offline

#644 2011-03-29 08:15:03

Algaris
Member
From: England
Registered: 2006-01-27
Posts: 435

Re: smd_calendar: complete schedule / event / calendar / diary

I just wanted to say thank you so much for all your help with this plugin. I’m glad you managed to get something out of tinkering around on my Windows server.

The senior management have approved the calendar I was working on and it should go live at the end of April in time for the summer school term. If you’ve logged in recently you’ll notice that it looks quite a bit different from what it did before.

When I have a spare moment I’ll give the latest version a spin in my development area. I have to admit to being a little nervous about upgrading given all the custom edits and variables we used to get the calendar working.

Offline

#645 2011-03-29 08:43:36

Bloke
Developer
From: Leeds, UK
Registered: 2006-01-29
Posts: 8,586
Website

Re: smd_calendar: complete schedule / event / calendar / diary

Algaris wrote:

I just wanted to say thank you so much for all your help with this plugin. I’m glad you managed to get something out of tinkering around on my Windows server.

No worries. The plugin’s much better as a result. I’m pleased with the improved Windows server support and the fact it actually offers more conversion modifiers in the plugin than PHP itself has under Windoze!

The senior management have approved the calendar I was working on and it should go live at the end of April in time for the summer school term.

Looking good. Though it doesn’t seem to remember the calendar month now as I move around the different parts of the school. Is that intentional?

I have to admit to being a little nervous about upgrading given all the custom edits and variables we used to get the calendar working.

The version on your server is identical to the released v0.50 as yours was the last site I was using to tweak the code. The only differences in the official version are a few documentation edits. In fact the docs might be completely overhauled at some point soon so, assuming no code fallout from this version, I’ll probably release 0.51 with just the new docs attached. You might as well wait.


The smd plugin menagerie — for when you need one more gribble of power from Textpattern. Bleeding-edge code available on GitHub.

Txp Builders – finely-crafted code, design and Txp

Offline

#646 2011-03-29 09:26:13

Algaris
Member
From: England
Registered: 2006-01-27
Posts: 435

Re: smd_calendar: complete schedule / event / calendar / diary

Bloke wrote:

Looking good. Though it doesn’t seem to remember the calendar month now as I move around the different parts of the school. Is that intentional?

Hmmm… Could you elaborate? I did move some variables into the sys_variables form, maybe that could have had an unforeseen side effect.

With my testing it appears to remember the date when I move between the Senior School and the Prep School sections and the Music & Drama and Sports categories. It also remembers the date when I switch between the week view and back again. Changing the month from the drop down menu also remembers the date.

So far the only bug I’ve encountered is when viewing the Music & Drama or Sports categories. If you select the week view it forgets the category being viewed and shows you all the events for the current week instead.

Last edited by Algaris (2011-03-29 09:35:16)

Offline

#647 2011-03-29 09:41:28

Bloke
Developer
From: Leeds, UK
Registered: 2006-01-29
Posts: 8,586
Website

Re: smd_calendar: complete schedule / event / calendar / diary

Algaris wrote:

With my testing it appears to remember the date when I move between the Senior School and the Prep School sections and the Music & Drama and Sports categories. Changing the month from the drop down menu also remembers the date.

Yes, the individual dates on the left are all remembered. I meant changing the calendar month itself to, say, February and then switching from Prep to Senior or something. The calendar flips back to the current month (March). Except I can now see what’s happening and it makes sense so sorry for the alarm.

I now see that each time you change section the calendar itself takes on the month of the most recently viewed individual article (or week). Since I wasn’t picking an actual date to view, the 29th March was still in the event list and thus when I flipped from Prep to Senior the calendar dutifully flipped back to March to stay in sync with the individual article view. If I switch to February, pick a day to view and then switch from Senior to Prep the calendar remains in February.

In short, nothing to worry: about I was being dim, sorry.

Last edited by Bloke (2011-03-29 09:42:13)


The smd plugin menagerie — for when you need one more gribble of power from Textpattern. Bleeding-edge code available on GitHub.

Txp Builders – finely-crafted code, design and Txp

Offline

#648 2011-03-29 10:14:44

Algaris
Member
From: England
Registered: 2006-01-27
Posts: 435

Re: smd_calendar: complete schedule / event / calendar / diary

That’s a relief to know. You dim? Ha, I think not.

Just one bug to fix before it goes live then. Since it’s not a huge one I’m not too worried if it stays in for the time being. Must be the fact that I’m at the end of a long project but it’s making my head spin trying to work out what’s wrong. Even setting up two new variables and trying to pass them via the URL isn’t working =(

One question is it possible using CSS to style the currently selected/viewed date in the calendar. I sometimes find myself looking to the calendar rather than the events list to check what date I’m viewing.

Offline

#649 2011-03-29 11:07:32

Bloke
Developer
From: Leeds, UK
Registered: 2006-01-29
Posts: 8,586
Website

Re: smd_calendar: complete schedule / event / calendar / diary

Algaris wrote:

is it possible using CSS to style the currently selected/viewed date in the calendar.

Yes but it needs more than CSS because you need to flag it up with a class, which requires a little bit of cunning. Assuming you’re using cellform to build your cells (although you can do this in your smd_calendar container if not) the general principle is:

  1. read the day/month/year from the URL. I believe you already have these in txp:variables, courtesy of the wonderful adi_gps
  2. in your cellform / container use <txp:smd_if_cal> to check if the day/month/year match the ones in the URL

So, in code terms:

<txp:smd_if_cal logic="and"
     day='<txp:variable name="the_day" />'
     week='<txp:variable name="the_week" />'
     year='<txp:variable name="the_year" />'>
   <txp:smd_cal_class name="selected_day" />
</txp:smd_if_cal>

Just substitute your txp:variable names in. That should then allow you to style the selected_day class differently.

Last edited by Bloke (2011-03-29 11:08:17)


The smd plugin menagerie — for when you need one more gribble of power from Textpattern. Bleeding-edge code available on GitHub.

Txp Builders – finely-crafted code, design and Txp

Offline

#650 2011-03-29 11:30:41

Algaris
Member
From: England
Registered: 2006-01-27
Posts: 435

Re: smd_calendar: complete schedule / event / calendar / diary

Thank you!!

Offline

Board footer

Powered by FluxBB