Important: Wikitravel is exploring a license upgrade to CC by-sa 3.0, please give your consent or refusal here.

Wikitravel:16 November 2005

From Wikitravel

Jump to: navigation, search

[edit] Tabs finally fixed

After a year of bugginess, the tabs across the top of the article now more reasonably reflect the user's security level. Thanks to User:Mark for fixing this. --Evan 15:33, 16 Nov 2005 (EST)

I hate to rain on the parade, but I can't get the "Watch" tab to show up anymore? And whenever I hit Edit, the top row looks as if I'm logged out, although I'm not. Jpatokal 21:07, 16 Nov 2005 (EST)
I'll take a look, thanks! --Evan 23:31, 16 Nov 2005 (EST)
I'll look at it too. I'm getting the same results as Jpatokal. -- Mark 02:14, 17 Nov 2005 (EST)
Oh, I forgot. The "watch" and "unwatch" tabs are disabled in the first version of the fix. The reason is that the Javascript doesn't know about the user's watchlist. I'm working on a solution using the XMLHttpRequest object, though I might wind up adding another special page to deliver an XML versioni of the watchlist. -- Mark 07:12, 17 Nov 2005 (EST)
On the other hand, if the point of Cache404 is to reduce server load, what's going to happen if I start hitting the site with XMLHttpRequests which require PHP to be executed once or twice per pageload? That sort of defeats the point of doing the caching in the first place.
I guess another way to do it would be to cache out a per-user .js file whenever the user changes, and load that per user file from the username.js? -- Mark 07:21, 17 Nov 2005 (EST)
Yeah, I'd rather not go the Ajax route. What about a watchlist tab labeled "Watch", and if you click on it it goes to a special page that says, "This page, Title, is on your watchlist. Do you want to remove it? OK Cancel", or "This page, Title, is not on your watchlist. Do you want to add it? OK Cancel"? That'd serve our dual purposes of a) having the same output for content pages and b) letting people add stuff to their watchlists. I'll try to get around to this in the next couple of days. --Evan 10:12, 17 Nov 2005 (EST)
Makes sense to me. Doesn't sound like too big of a job either. Still we could get the original functionality if people want it. There's still the problem of not knowing if the user's got an active session without going through php. Actually I was wondering if it might make sense to make Cache404 save the files as .php instead of .html, and just use PHP for the session stuff, and maybe the watchlist. What do you think of that? -- Mark 11:41, 17 Nov 2005 (EST)