Last comic not in index?

For requests for help from CG administrators, Wranglers, and experienced CG members. Please read the FAQ before posting. Also look at CG Wiki for tutorials and how-tos written by other CG webtoonists.
Post Reply
Stryker
Newbie
Posts: 13
Joined: Wed Jan 05, 2005 1:56 pm

Last comic not in index?

Post by Stryker »

Hi all. I finally managed to set up everything with my account, now I'm ready setting up the site. I've already posted a couple placeholder pages (an old two pages comic) and I'm doing some experiments with tags.
The problem is: I want my site to not show the last comic page on the index. On my index I just want the page with news and stuff, just like penny arcade (or a lot of non-keenspace webcomics) do. Sadly, only now I've noticed none (or at least non I've seen) of keenspace comics have an index without the last comic page. This means it can't be done?
I tried this little hack: pre-dating my last page and naming a 1x1 px image as it should be the today comic, so the 1x1 px appears on index, letting me set up the page as I want (see http://clavisveritatis.keenspace.com). The problem is that I should have a "last comic" button at the top of every page (both indextemplate and dailytemplate), and it will open the index page, not the real last page. Plus it will not be shown in the index (because the ***last_day*** doesn't show up in index), and that's a big problem. I should place a ***previous_day*** on the index in place of the ***last_day*** to make it work, but a previous_day.jpg image already exists, and the graphics are totally different. To make it all work it should be a set of tags like ***previous_day_url***, ***last_day_url*** and so on, it should be much more simplier and customizable, but those tags doesn't exist :(
Is there any other (maybe simplier?) way to do an index page without the last comic page in it? Has anyone a site like that?

thanks!

User avatar
Risky
69
Posts: 3833
Joined: Tue May 04, 2004 8:41 am
Location: San Francisco
Contact:

Post by Risky »

Well, quite simply if you have a page with the "todays_comics" tag on it, that page will show the most recent comic. Simply put a link to that page on your daily_tempate.html where you would normally put a link to the most recent comic. The only problem would then be that someone clicking "next" on the second-to-last page would get to your index, in that case, they'd need to find the link on your front page to the most recent comic (again, a regular HTML link, to whatever you call it... "today.html" or whatever). (Obviously, take "todays_comics" off of your indextemplate.html )

Or you could just have the latest comic unviewable until you upload its replacement, and keep your current setup. That'd replace the "1x1" issue.

If that solution isn't enough, if you need the "next" link to choose the correct page (ie the current comic page), there are some javascript possibilities.
Last edited by Risky on Sun Mar 27, 2005 5:16 pm, edited 1 time in total.

User avatar
Risky
69
Posts: 3833
Joined: Tue May 04, 2004 8:41 am
Location: San Francisco
Contact:

Post by Risky »

Such as in place of ***next_day*** putting

Code: Select all

<script language="javascript" type="text/javascript">
var a = '***next_day***'
if (a == '<a href="http://clavisveritatis.keenspace.com/"><img id="next_day" border="0" name="next_day" alt="Next comic" src="http://clavisveritatis.keenspace.com/images/next_day.jpg" width="48" height="14" /></a>')
{
     document.write('<a href="http://clavisveritatis.keenspace.com/today.html"><img id="next_day" border="0" name="next_day" alt="Next comic" src="http://clavisveritatis.keenspace.com/images/next_day.jpg" width="48" height="14" /></a>');
}
else
{
     document.write(a);
}
</script>
(fixed one == sign)
Last edited by Risky on Mon Mar 28, 2005 1:26 pm, edited 1 time in total.

Stryker
Newbie
Posts: 13
Joined: Wed Jan 05, 2005 1:56 pm

Post by Stryker »

Great idea! Yet, the problem is the one you told about. The reader must reach the last page by clicking "next" in the case he's reading the comic from the beginning.
Even being an html coder, I don't know much about javascript (in fact, in the comic page I wrote a little hack in css code to make image swap on buttons, avoiding the use of javascript). Which scripts can you tell me about?

edit: wrote before you post! thakyou for the advice, I'm going to try it tomorrow!

User avatar
Mercury Hat
Iron Lady (ForumAdmin)
Iron Lady (ForumAdmin)
Posts: 5608
Joined: Sat Jan 24, 2004 1:57 pm
Location: Hello city.
Contact:

Post by Mercury Hat »

Instead of bothering with a new html page, put in this

Code: Select all

<a href="http://clavisveritatis.keenspace.com/d/***raw_date***.html">
and it will link to the latest comic up.

Found here: http://gear.keenspace.com/ensign/Tagglo ... ml#rawdate

But wouldn't that need to be put in manually per update in a .txt file to accompany the comic?
ImageImage
<Legostar> merc is all knowing, all seeing, and not caring

User avatar
Risky
69
Posts: 3833
Joined: Tue May 04, 2004 8:41 am
Location: San Francisco
Contact:

Post by Risky »

I have to say, rawdate just really wouldn't help in this situation.

Stryker
Newbie
Posts: 13
Joined: Wed Jan 05, 2005 1:56 pm

Post by Stryker »

Risky, your system works greatly! Thanks
Just one problem, probably because I messed up something in the "next" script. Now I have three pages (ok the last one is a 10x10 bordeaux square, but it counts as a page for now: too much queue for update it). The problem is that even from the first page if I click "next" I'm transferred to the "today" (3rd) page, not to the second one.

Here's the code of all the navigation panel I insered:

Code: Select all

	<div class="control">
		***previous_day***
		<img src="../images/nav_space.jpg"/ alt=" ">
		<script language="javascript" type="text/javascript">
			var a = '***next_day***'
			if (a = '<a href="http://clavisveritatis.keenspace.com/"><img id="next_day" border="0" name="next_day" alt="Next comic" src="http://clavisveritatis.keenspace.com/images/next_day.jpg" width="48" height="14" /></a>')
			{ document.write('<a href="http://clavisveritatis.keenspace.com/today.html"><img id="next_day" border="0" name="next_day" alt="Next comic" src="http://clavisveritatis.keenspace.com/images/next_day.jpg" width="48" height="14" /></a>'); }
			else { document.write(a); }
			</script> 
		</div>
The code in the processed page is slight different, having some strings added just before the "script language" tag:

Code: Select all

<script language="JavaScript">
<!--

function SymError()
{
  return true;
}

window.onerror = SymError;

var SymRealWinOpen = window.open;

function SymWinOpen(url, name, attributes)
{
  return (new Object());
}

window.open = SymWinOpen;

//-->
</script>

User avatar
Risky
69
Posts: 3833
Joined: Tue May 04, 2004 8:41 am
Location: San Francisco
Contact:

Post by Risky »

My bad, the = after the "if" should be ==

Stryker
Newbie
Posts: 13
Joined: Wed Jan 05, 2005 1:56 pm

Post by Stryker »

It's alive!!! Thanks again!

Post Reply