Welcome to Geeklog, Anonymous Monday, April 29 2024 @ 06:01 am EDT

Geeklog Forums

Calendar with links only on days with stories?


Status: offline

rv8

Forum User
Regular Poster
Registered: 10/10/02
Posts: 105
Location:Ottawa, Canada

I'm looking for a calendar block that allows me to only have links on days with stories. All the ones I've seen on GL sites have a link on every day, and you can waste your time by clicking on days when nothing happened on the site. I imported a lot of old content when I set up the GL version of Kevin Horton's RV-8 Page, and there are long periods where there is only content every week or so.

I want a calendar that works like the one on this non-GL site. Is there any calendar like this available that I don't know about?

Thanks,


Kevin Horton
 Quote

Status: offline

Creator

Forum User
Full Member
Registered: 07/11/02
Posts: 181
Location:Austin, TX
There is a mycal block available on Blaine's or Squatty's that will set you a calendar block like the one seen on this site .

While all the dates are, unfortunately, linked, you can tweak in in style.css so that all dates that have events will be hightlighted (as well as the current day) in any manner you choose.

OR you can hack the mycal block so that it won't link the uneventful days, but why you would want to do this, I have no idea as this great block will search for all STORIES and stuff posted on a particular date regardless of whether or not an event is posted for that day.

It's a great block, and you could make it work for you.

---
L. Whitworth
www.finiserv.com


L. Whitworth
 Quote

Status: offline

rv8

Forum User
Regular Poster
Registered: 10/10/02
Posts: 105
Location:Ottawa, Canada
I am hoping to use the calendar as a means to select days with stories, not events. I'll take a look at the mycal code and see if I can figure out how to hack it to do what I want. But I'm no more than a newbie PHP hack, so I'm not up to anything that isn't pretty simple to code.---Kevin
Kevin Horton
 Quote

Status: offline

Creator

Forum User
Full Member
Registered: 07/11/02
Posts: 181
Location:Austin, TX
The mycal block is only one file of code and a piece to put in lib- custom.php. Shouldn't be too hard to hack. Ask Blaine for help, as he's the one who originally created the code.

---
L. Whitworth
www.finiserv.com


L. Whitworth
 Quote

Status: offline

squatty

Forum User
Full Member
Registered: 01/21/02
Posts: 269
From what I recall, It should be fairly straight forward to modify the code to display links ONLY on days where stories were created. I'd ask Blaine for a quick "how-to". Keep in mind that you will need to make a db call for each day to determine if a story exists. This is probably why Blaine opted out of coding the block in the manor you suggest. It's much more reasonable to only make the db call if a user clicks the link on the calendar.
In a world without walls and fences, who needs Windows and Gates?
 Quote

Status: offline

rv8

Forum User
Regular Poster
Registered: 10/10/02
Posts: 105
Location:Ottawa, Canada
What about a query that pulls the whole Date column from the GL-Stories table. You could then throw out the dates that aren't in the month of interest, and create links for the other days. I don't know PHP and MySQL enough to understand how much overhead this would entail. Or, what about creating a new table to cache calendar data. One row for each month. All the code for the cells for all days in a column (the days would be either links, or just a number as appropriate for that day). If you wanted to be able to switch the calendar display to show one of stories, comments, events, links added, etc, you would have an additional column for each of these things. I'm not sure I'm describing this clearly. I'm thinking of a pull down menu where the viewer could select what data he wanted the calendar to show - days with stories, days with comments, days with events or days with links added, etc. The cached data for old months would probably only need to be updated manually, by the system admin. Cached data for the current or future months would be updated at a selectable interval. The time of the last cache update would be in a column in the table, so if a view by User A just triggered an update, a new view by User B wouldn't trigger a cache update. I'm thinking out loud here, so this whole thing may be a load of cow crud.---Kevin
Kevin Horton
 Quote

Anonymous

Anonymous
I wonder if you guys have this.. but I dont seem to have any links on the calendar block.. Any idea why? I'm using 0.7.2.3 of geeklog gerald gerald@meappy.com
 Quote

All times are EDT. The time is now 06:01 am.

  • Normal Topic
  • Sticky Topic
  • Locked Topic
  • New Post
  • Sticky Topic W/ New Post
  • Locked Topic W/ New Post
  •  View Anonymous Posts
  •  Able to post
  •  Filtered HTML Allowed
  •  Censored Content