Go to main content

Textpattern CMS support forum

You are not logged in. Register | Login | Help

#709 2011-06-02 03:17:08

progre55
Member
Registered: 2006-05-02
Posts: 668

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

Bloke:

Yes, it made sense, but —

Unfortunately, I think I am chasing my tail I think —everytime I think I have a solution I come up snake eyes — let me know if you think this can be done to overcome my issues. Rather than having two columns, I will make the calendar fill the page. When an event is selected, I will trigger a lightbox script to open in front of the calendar and show the details. Although I have not doen this before, I am assuming I can have the article description “fill” the lightbox area. In the past, I have only used lightboxes on images using your great smd_gallery plug in. Sorry for all the back and forth and all has not gone for not because I was able to use the above for one of the projects where I needed to do the small calendar but did not have this isue of the calendar holding on proper month and only showing one article.

progre55

Last edited by progre55 (2011-06-02 03:19:22)

Offline

#710 2011-06-02 16:30:23

decoderltd
Member
From: London
Registered: 2006-06-20
Posts: 248
Website

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

Bloke wrote: Not necessarily, although rvm_counter / adi_calc save you the hassle of making your own counter using <txp:variable /> and <txp:if_variable>. I think there are some examples floating around either on the forum or at TXPTips #1 #2.

Hi Stef,

Thank you for pointing me towards adi_calc, it looks like it’s going to be very useful plug-in once I get my head around it. I’m trying to create an article counter but it’s not going too well:

      <txp:variable name="articleCount" value="0" >
         <txp:adi_calc name="articleCount" add="1">
            <txp:if_variable name="articleCount" value="3">
               <dt><txp:permlink><txp:title /></txp:permlink></dt>
               <dd><txp:smd_event_duration format="%A, %B %d, %Y" /></dd>
            </txp:if_variable>
         </txp:adi_calc>

Any advice welcome!

Offline

#711 2011-06-02 16:43:09

progre55
Member
Registered: 2006-05-02
Posts: 668

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

Stef:

Thanks for all your assistance with my issues. I figured out a work around solution. I am going with a large calendar that fills the space and a custom form to put the event/description inside of the day. This loioks sharp, cuts down a step for the end user & overcomes my issue (ok one of my many issues)

Thanks again for your asistance.

progre55

Offline

#712 2011-06-20 18:52:04

pafruu
Member
From: New Brunswick, Canada
Registered: 2010-01-14
Posts: 65

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

Hello, I’ve been using this plugin for a while now and I’ve stumbled upon a situation to which I do not know the answer.

I am currently using the calendar for a baseball team in the area, and they are asking me if it is possible to change the events background colors. Currently I only have one color and I am using two categories for the events: HomeGame and AwayGame.

Is there a way to assign a different event color for each event category?

Is it a CSS issue?

Please let me know

Last edited by pafruu (2011-06-20 20:29:29)


I try, and I try, and I try…. and sometimes I achieve

Offline

#713 2011-06-20 20:12:11

els
Moderator
From: The Netherlands
Registered: 2004-06-06
Posts: 7,458

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

Hi pafruu, if I’m not mistaken the plugin adds class="your-category-name" to the table cells by default. So you could add something like

td.homegame {background-color: blue;}
td.awaygame {background-color: red;}

to your stylesheet.

Offline

#714 2011-06-20 20:30:50

pafruu
Member
From: New Brunswick, Canada
Registered: 2010-01-14
Posts: 65

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

Just noticed That I didnt specify that I want to change the color of the event specifically.

If I am right, what you are suggesting, Els, changes the color of the cell right?


I try, and I try, and I try…. and sometimes I achieve

Offline

#715 2011-06-20 20:58:14

els
Moderator
From: The Netherlands
Registered: 2004-06-06
Posts: 7,458

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

Yes, that’s right, I assumed you needed the cell’s background colour. But I guess you can wrap your event tags in a <span class="<txp:category1 />"> and style td span.homegame and td span.awaygame?

Offline

#716 2011-06-20 21:03:08

Bloke
Developer
From: Leeds, UK
Registered: 2006-01-29
Posts: 11,446
Website GitHub

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

pafruu wrote:

I want to change the color of the event specifically.

Els is right that the category is added by default to each cell and event (see the classlevels ad eventclasses attributes). Except, I uhhh, can’t get them to work properly right now which is either me being:

a) completely stupid with using my own tags
b) completely stupid in the latest version of the plugin

Either way I’m testing a few things and will get back to you.


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

#717 2011-06-20 21:14:52

els
Moderator
From: The Netherlands
Registered: 2004-06-06
Posts: 7,458

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

Stef, I’m not getting an eventclass either. I assumed that is because I’m using an eventform, could that be it?

Offline

#718 2011-06-20 21:19:53

Bloke
Developer
From: Leeds, UK
Registered: 2006-01-29
Posts: 11,446
Website GitHub

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

Els wrote:

Stef, I’m not getting an eventclass either. I assumed that is because I’m using an eventform, could that be it?

I thought so too at first, but I’ve tried a vanilla tag (using the default output) and it’s still not showing any event classes. I’ve put some extra debug output into the plugin and it’s showing me that the event classes are being detected and catalogued correctly, but are being destroyed before they’re logged against the event itself. Can’t for the life of me see why.

Special retardo-coder-goggles *on*


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

#719 2011-06-20 22:08:10

Bloke
Developer
From: Leeds, UK
Registered: 2006-01-29
Posts: 11,446
Website GitHub

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

Well, I was being dim. I was unable to figure out why there were no category event classes showing up… when none of my events actually had a Category1 or Category2 set. *slap*

But nonetheless I’ve released a bugfix version 0.52 which addresses a minor annoyance whereby some classes had spurious spaces before them, e.g. class=" some_class">. That no longer happens.

Regardless of whether you use the stock output or a container (though cellforms will need building manually) you’ll get the category names — plus classprefix — assigned to each event in a large calendar for you to styles as you see fit, e.g:

span.homegame {background-color: blue;}
span.awaygame {background-color: red;}

(since each event is inside a span by default). fwiw, small calendars aren’t wired that way so you won’t get this functionality.

Please let me know if you don’t experience this and post your tag/container code so I can see if the plugin still needs tazing into shape or if I can help adjust your tags to accomplish what you want.


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

#720 2011-06-20 22:14:56

els
Moderator
From: The Netherlands
Registered: 2004-06-06
Posts: 7,458

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

Bloke wrote:

(though cellforms will need building manually)

Yes, that makes sense.

Yet another on-the-fly fix :) Thanks, I had noticed these spaces, but assumed it was something I did ;)

Offline

Board footer

Powered by FluxBB