General Question

lilikoi's avatar

PHP/MySQL question.... (please read on)

Asked by lilikoi (10079points) February 6th, 2010

I want to program a calendar like this where the layout is the same (only applies to calendar, not links in the left column or other stuff), the “mini” calendar looks the same, but I am able to have different levels of access and approved users can post events, and I can “tag” the events to enable filtering by categories.

Questions:
1. How do I do this? Can someone give me a step by step list of what I need to know to do this so I can find the appropriate reference material?
2. Can this be done within Drupal?

Observing members: 0 Composing members: 0

16 Answers

Vincentt's avatar

The “Follow this question”-button doesn’t work, so I’m just answering here… :)

lilikoi's avatar

@phoenyx Yes. I’ve played w/ various modules in Drupal, but haven’t figured out a clean way to get exactly what I want. At this point I’m kinda thinking it would be cleaner to code it from scratch (although that would put me at the bottom of a steep learning curve…). Admittedly, it is frustrating that what I want already very nearly exists, but I have to recreate it.

It would help to have someone tell me exactly what I need to do to get it to work (like do x, y, and z with modules a, b, and c). I was having a hard time getting the views module to work with the calendar modules, etc.

ETpro's avatar

Have you googled PHP MySQL calendar to check out prewritten scripts you might just customize? There should be a ton of them around. There’s certainly no need to reinvent the part that calculates what day each successive month starts on, how many days it has and creates the table to display it.

HungryGuy's avatar

If you just want your calendar to be a table of links, it would be better to do that in Javascript than in PHP. You want to push as much processing off your server onto the client as possible.

Vincentt's avatar

@HungryGuy Why is that? Care to elaborate?

HungryGuy's avatar

Because the less work your server has to do, the better for you becuse your server can serve more requests in a set timeframe. When you’re serving hundreds, even thousands, of pages each minute, processing like that adds up.

Vincentt's avatar

@HungryGuy Yes, but if it takes your visitors longer to load your page, less might visit, and those who do might stick around less long. In the end it all depends on your specific stiuation; if your server is perfectly capable of handling your traffic, then you might as well spare your users.

HungryGuy's avatar

@Vincentt – Okay. That’s a good point :-) Though the Javascript to, essentially, draw a 5×7 table with links in each of the elements is less than 1 Kb of code, if that—negligible to download and for the client to run. Just make sure it’s tested before going live! I’ve lost count of all the sites I go to that I get Javascript error windows on many of the pages—yes it even happens on Fluther periodically.

Vincentt's avatar

@HungryGuy Of course :) Then again, you also have to take into account whether you have a significant amount of visitors with Javascript disabled…

HungryGuy's avatar

@Vincentt – I suppose there are people who do. Though in-browser Javascript is severly constrained. It can’t access files or affect anything above the top-level “self” document in the browser. The most “dangerous” thing a Javascript can do is read/write cookies..and then only those cookies belonging to the domain that the page was served from. So there’s no rationale for disabling Javascript in a browser that I’m aware of. But I concede your point since there are people who disable Javascript for whatever reasons…

phoenyx's avatar

@HungryGuy
How about this: your pages load faster and you don’t have DoubleClick and the like tracking you. I think it’s perfectly rational.

(I disable javascript sometimes.)

Vincentt's avatar

Yes, what @phoenyx said. The NoScript Firefox extensions is hugely popular so obviously there are people who do. Perhaps not a lot, but depending on your target audience this might be a very large part of it.

HungryGuy's avatar

Point taken. But if DoubleClick and its ilk is the concern, then it’s cookies you want to disable, not Javascript.

And I’m surprised to read that DoubleClick is owned by Google. Didn’t their motto used to be “Don’t Be Evil?”

phoenyx's avatar

iirc, their javascript is setting the cookie.

TogoldorMandar's avatar

In short google it

Answer this question

Login

or

Join

to answer.

This question is in the General Section. Responses must be helpful and on-topic.

Your answer will be saved while you login or join.

Have a question? Ask Fluther!

What do you know more about?
or
Knowledge Networking @ Fluther