Forum    Search    FAQ

Board index » Chat Forums » Suggestions and Comments




Post new topic  Reply to topic  [ 19 posts ] 
 
Author Message
 Post subject: Re: weekly mode.
 Post Posted: Tue Apr 27, 2010 1:23 pm 
Member of the Fraternal Order of the Emergency Pants
User avatar
Offline
Joined: Mon Dec 15, 2003 12:00 am
Posts: 2993
It doesn't remove the ads that are already on the page. However, as I had it thought out in my head, when the user navigates from one week to the next, the ads wouldn't be updated; you'd still be seeing the same ads no matter how many weeks you read. I can change that, though, no problem. I'll simply grab the new ads from the first page that I pull for each week and put them on the page.

What does it do so far? Well, it puts a "Weekly" button on the page. When you click it, it figures out what day you're looking at, calculates what the begin and end days are for that week, then loads all those pages in the background, extracts just the comic and slaps them into the content area. It doesn't attempt to load future days or days before the start of the comic. That's all so far.

Things I still need to do:
  • Obviously, make it so that you can navigate from week to week.
  • Grab the ads on the first loaded day in the week and put them on the page, so that the ads get updated as you navigate.
  • When the user first switches to weekly mode, refrain from loading the strip that's already on the page.
  • Try to load tomorrow's strip anyway (system clock might be off, strip might have been posted early).

Top 
   
 Post subject: Re: weekly mode.
 Post Posted: Tue Apr 27, 2010 7:13 pm 
Member of the Fraternal Order of the Emergency Pants
User avatar
Offline
Joined: Mon Dec 15, 2003 12:00 am
Posts: 2993
Okay, loading in new ads every time you move to a different week turned out to be more difficult than anticipated, mainly because the ads are inserted with the document.write() command, which is only allowed during first render, and which doesn't run under AJAX. So instead what I've done is made is so that when you navigate to a different week, it scrolls you back up to the Project Wonderful ad banner along to top so that you can see it again (which has the added bonus of making it so that you don't have to scroll back up yourself). I'm happy to accommodate any other changes that Sluggy Central wants.

I think it's pretty good at this point, so I'll go ahead and release it!

EDIT: The site has been updated to support weekly view natively, so this script is no longer needed.


Last edited by AlternateTorg on Thu May 20, 2010 11:57 pm, edited 1 time in total.
Top 
   
 Post subject: Re: weekly mode.
 Post Posted: Thu May 13, 2010 8:19 am 
Nifty Admin of Doom
Nifty Admin of Doom
User avatar
Offline
Joined: Thu Jun 13, 2002 12:00 am
Posts: 1699
Website: http://www.dabbledstudios.com
Location: Atlanta, GA
very cool, alt torg!

I'll mention it to rit, too...

Top 
   
 Post subject: Re: weekly mode.
 Post Posted: Thu May 20, 2010 1:10 pm 
the root of all evil
the root of all evil
User avatar
Offline
Joined: Thu Jan 01, 1970 7:00 pm
Posts: 257
Website: http://www.evilmonkeylabs.com
AOL: rit+0042
Location: New York, NY
Finally got around to throwing Weekly Mode in.

It's live on the main site - toggle button is with the VCR buttons.

Right now pulls Monday's headline as the "Headline" and doesn't display popups or compendiums until Pete and I determine the best way to do those.

First day of the week is Monday.

Have fun. :bert:

Top 
   
Display posts from previous:  Sort by  
 
Post new topic  Reply to topic  [ 19 posts ] 

Board index » Chat Forums » Suggestions and Comments


Who is online

Users browsing this forum: No registered users and 1 guest

 
 

 
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot post attachments in this forum

Search for:
Jump to: