Is there any way to break the archives into seperate pages?

Discuss news styles, css code, and other Coranto customizations in here...the possibilities are endless, so have at it!

Moderator: Spunkmeyer

Is there any way to break the archives into seperate pages?

Postby Three Squares » Wed Oct 23, 2002 12:14 am

Right now we have archiving turned on, but that displays all news headline articles on one page. Since our site has been around for years and updates daily, needless to say this archive is quite large. Here it sits:

http://www.somethingawful.com/archives/archive.html

Is there any way to change this page into something which has links to monthly chunks? IE, instead of displaying all news headlines on that page, it simple would say:

October 2002 (links to the headlines that were posted in October)
September 2002 (links to September headlines)
etc.


Basically, I'm looking to keep the news archive headlines in the same fashion, but have a portal page which seperates them into monthly chunks and contains text links with the month that leads to a page with that month's archives.

Any help would be appreciated.

Thanks!
Three Squares
 
Posts: 7
Joined: Wed Oct 23, 2002 12:09 am

Postby Sumaleth » Wed Oct 23, 2002 4:12 am

Why not use the 'Monthly' archiving option in the Profile archiving settings? :)
Sumaleth
 
Posts: 1366
Joined: Thu Jul 11, 2002 4:31 pm

Postby Three Squares » Wed Oct 23, 2002 9:02 am

Sumaleth wrote:Why not use the 'Monthly' archiving option in the Profile archiving settings? :)

Becuase then it displays the first article from that month and when you click on it, it displays each and every article from that month, in its entirity, on the following page.

I need something that does this:

LIST OF MONTHS:
October 2002
(click on this)
LIST OF DAYS IN MONTH:
October 1
October 2
October 3
October 4
(click on October 4)
ARTICLE FOR THIS DAY IN THAT MONTH:
Shows October 4th article
Three Squares
 
Posts: 7
Joined: Wed Oct 23, 2002 12:09 am

Postby Sumaleth » Wed Oct 23, 2002 10:41 am

Okay, now Coranto isn't designed to do specifically what you're after, but depending on one thing you might be able to fake it:

Q. Is there only one news item per day?

You seemed to have implied this is the case, and if it's the case then yes you can fake it.

In the Archiving settings of the Profile, start by setting it to Monthly Archives.

Then change the 'News Style' to 'Default Headline Style' (or if that's already in use for something else, make up a new Style).

Now if you build news, you'll find the page with the MONTH links, and if you click on a month you'll get a list of all the news items in that month using the "headlines style".

Now edit the 'Default Headline Style'. You need to add a link to the Style, either using ViewNews.cgi, or Maginot Line static pages.

This is a primer on adding links to headlines using either of those two methods:

http://www.sumaleth.com/coranto/ct_headlines.html

I know your site has a high number of visitors, so you may be better off using the Maginot Line static page approach, but it really depends how often people would use the archiving. If you get a LOT of people using the archives, then using ViewNews to display news items will really bog the server down.

Anyway, back to the style. You can change the style code to only show the information you want. So if you only want the day, the style might be something like:

Code: Select all
<a href="...whichever link..."><b><Field: Day> <Field: Weekday></b</a>

So you're using the archiving stuff to essentially archive headlines, and the headlines (not necessarily with the Subject though), and the headlines then link to the items.

Or something.
Sumaleth
 
Posts: 1366
Joined: Thu Jul 11, 2002 4:31 pm

Postby Three Squares » Wed Oct 23, 2002 11:02 am

Sumaleth wrote:HELPFUL THINGS.
Oh my sweet Christ I love you as a god! Thank you very much!
Three Squares
 
Posts: 7
Joined: Wed Oct 23, 2002 12:09 am

Postby Three Squares » Wed Oct 23, 2002 11:16 am

Three Squares wrote:
Sumaleth wrote:HELPFUL THINGS.
Oh my sweet Christ I love you as a god! Thank you very much!

Oh wait, I just noticed a big problem:

http://www.somethingawful.com/archives/archive.html

The main archive page works fine, but when you click on the links, things start going wrong. For example, click on "June 2002":

It takes you to the correct page, but the links all go to the same URL as the page they are currently located on! What I mean is that all June 2002 links in the archive are located on page:

http://www.somethingawful.com/archives/ ... 6-2002.htm

But when you click the link to any news article on that page, it takes you to

http://www.somethingawful.com/archives/ ... 6-2002.htm

How on Earth did I screw this up now?

Thanks a million for your help!
Three Squares
 
Posts: 7
Joined: Wed Oct 23, 2002 12:09 am

Postby Three Squares » Wed Oct 23, 2002 11:27 am

Oh, additionally I noticed that on the monthly listing pages:

http://www.somethingawful.com/archives/ ... 0-2002.htm

It no longer displays the day of the post either, in addition to not linking to that post. Any other helpful hints?

Thanks!
Three Squares
 
Posts: 7
Joined: Wed Oct 23, 2002 12:09 am

Postby Sumaleth » Wed Oct 23, 2002 12:56 pm

You need to edit your Style. You understand what a Style is right? If you want the day to appear, you need to add <Field: Day> to the style for example. If the headline links are wrong, then there's a problem in the way you're doing the link in the Style.
Sumaleth
 
Posts: 1366
Joined: Thu Jul 11, 2002 4:31 pm

Postby Three Squares » Wed Oct 23, 2002 1:10 pm

Sumaleth wrote:You need to edit your Style. You understand what a Style is right? If you want the day to appear, you need to add <Field: Day> to the style for example. If the headline links are wrong, then there's a problem in the way you're doing the link in the Style.
Yes, but here's the problem:

http://www.somethingawful.com/archives/archive.html

This is the main index. Click on the October link:

http://www.somethingawful.com/archives/ ... 0-2002.htm

The problem is that none of the links on the archive page lead anywhere except to that page. Try clicking on a link here:

http://www.somethingawful.com/archives/ ... 0-2002.htm

They all lead back to the same page. Oh what I would pay to have a brain.
Three Squares
 
Posts: 7
Joined: Wed Oct 23, 2002 12:09 am

Postby Three Squares » Wed Oct 23, 2002 1:32 pm

Oh, and here are my styles (in case they can help anybody).

This is the style that lists all the months and can be found here:

http://www.somethingawful.com/archives/archive.html

<img src="/bluesquare.gif" width="10" height="10" align="absmiddle">
<font face="Arial, Helvetica, sans-serif" size="-1">
&nbsp;
<a class="regularmenu" href="<Field: FileName>"><Field: ArchiveDate></a>
<br>


Here is the style that lists the updates in each month, an example of which can be found here:

http://www.somethingawful.com/archives/ ... 7-2002.htm

<img src="/bluesquare.gif" width="10" height="10" align="absmiddle"><font face="Arial, Helvetica, sans-serif" size="-1">&nbsp;<b><a href="<Field: FileName>"><Field: Month_Name> <Field: Day>, <Field: Year>:</b> <Field: Subject></a>
<br>


Obviously, a lot of the code from that one was left out, but that's just because the <Field: FileName> is the one giving me trouble. I'm assuming that since Coranto is set to archive monthly, <Field: FileName> is set to the monthly date section. Is there any way to change it so that, on a daily link inside a monthly archive, it goes to the corresponding date's article?
Three Squares
 
Posts: 7
Joined: Wed Oct 23, 2002 12:09 am

Postby Sumaleth » Wed Oct 23, 2002 1:45 pm

Yes, <Field: FileName> is a special archiving tag, but what you've failed to realize is that we're only using the builtin "archiving" stuff to create the headlines. The headlines themselves need to link to something else.

Thats why I gave you this link:

http://www.sumaleth.com/coranto/ct_headlines.html

It details the two usual methods of links from headlines to a specific news item.
Sumaleth
 
Posts: 1366
Joined: Thu Jul 11, 2002 4:31 pm


Return to Customization

Who is online

Users browsing this forum: No registered users and 1 guest

cron