Closed (fixed)
Project:
GCal Events
Version:
6.x-1.x-dev
Component:
Code
Priority:
Normal
Category:
Feature request
Assigned:
Unassigned
Reporter:
Created:
27 Jan 2009 at 22:26 UTC
Updated:
21 Nov 2014 at 19:58 UTC
Jump to comment: Most recent, Most recent file
Comments
Comment #1
Se7enLC commentedI like the sounds of that!
I just applied the patch to my local copy, and I don't see any output. Does something else need to be done to enable it or is a newer version of drupal required?
Comment #2
Se7enLC commenteddisabling/re-enabling the module was required to make it show up.
From the looks of it, the theme_gcal_events_contents() function does not properly handle multiple blocks (the $which_block variable). Can that be added in?
I'm also seeing list bullets in front of blank lines and in front of the tables - is that intentional? It looks strange
So far it looks like it has some potential.
Comment #3
Se7enLC commentedSolved the block number problem (had to add $which_block to the theme function)
The weird issue with tables was a non-standard configuration for a calendar block that I fixed.
The only remaining issue I have with using this patch is actually theming the block. I've added a custom css file, but I'm having issues actually overriding the styles of the block. Do you have an example css theme that you used? I was attempting to remove the list bullet display with "list-style: none;", but I can't get the right combination of nested classes to get it to take effect.
Comment #4
Se7enLC commentedApart from some minor issues with the theme css overriding the custom css settings for the block, the theme patch looks good. I just applied it to dev with a few small changes:
- added in the per-block support for footer and "no events" text
- added a checkbox into the admin panel to disable the new themes and go back to the old style
Comment #5
msonnabaum commentedChanges seem to work fine for me with one exception.
This bit introduces some unexpected behavior:
It's unnecessary to check if the logged in user has access to the input format, because that user is simply viewing the content, not submitting content. This is why we need the "FALSE" argument when check_markup() is called, so that it skips filter_access(). Since check_markup is right below this, it seems rather redundant anyhow. Taking it out completely seems to be best option here.
Also for the css, I believe this should do what you want:
For those of us who may want to bullets and padding, this is much simpler to override than what's currently there.
I also saw a bunch more entries with different class names (i.e. gcal_events_tomorrow), but I didn't see anywhere in the module where these classes would be used, so for now I took them out. If these classes do showup however, I'd suggest adding them in addition to the "gcal_events" class, so that you don't have to have a bunch of redundant CSS.
Patches for both attached!
Comment #6
Se7enLC commentedThat first section was something I added in to generate an error message when an input filter is not available (since normally it would just error out and cause a blank page). If changing that option to false will fix that, I like that solution better. I'll try out that patch.
You would not BELIEVE the number of iterations of CSS blocks I went through to find something that even worked. There are some issues with the Sky theme that prevented the normal override from working. That segment seems to work now, but I believe I made some changes to the default styles.css file for the theme to enable it.
The _tomorrow, _today, _thisweek, _thismonth, and _other are used when you enable "day grouping' in the main module settings. That groups the events into sections with headings. To prevent the headings themselves from becoming LI tags, I had to split up into multiple blocks. I could have named them all gcal_events, but I figured naming them differently would be more flexible. I could probably make that an option. Do you know if the theme() function will allow multiple class definitions, or would I need to put the entire section into a div tag?
Comment #7
Se7enLC commentedTry your css changes with the "Sky" module - I don't think they work.
Comment #8
jdwfly commentedThis either needs to be committed or scrapped.
Comment #9
jdwfly commentedThere is a theme function in the latest releases.