Textpattern CMS support forum
You are not logged in. Register | Login | Help
- Topics: Active | Unanswered
How would you build webcomic delivery & navigation in TXP?
In the past, I have dabbled in webcomic-ery. I am thinking I want to start again, and I am experimenting with TXP as the delivery source. I would love to use as much vanilla functionality as possibly, but I know that is not always possible. You can see what i have accomplished so far here.
This is the most basic form of navigation on display, but it could be improved and there are things I have yet to figure out how to do. Also, nevermind the partial comics. My initial way of displaying them had me cutting them up. Don’t ask why. I just did it. First, what I have so far.
This is the actual article form to display the comic:
<code><h2><txp:title /></h2>
<p class=“byline”>Comic for <txp:posted /> in the <a href=”<txp:site_url /><txp:section />/?c=<txp:category1 />”><txp:category1 title=“1” /></a> storyline.</p>
<div class=“comSum”>
<txp:body />
</div>
<img alt=”<txp:title />” class=“comic” src=”<txp:site_url />comics/<txp:section />/<txp:posted format=”%Y%m%d” />.png” />
<txp:if_article_list><txp:output_form form=“comments_display” /></txp:if_article_list></code>
<p>The thought behind this is to avoid using TXP’s image upload. I really didn’t want my files renamed, and if you can decipher the posted date format, you may be able to see why. I also wanted to have separate folders so that the images themselves would be easily archived for my purposes. It would be great to be able to do this from the admin interface, but FTP will work for now.</p>
You may also notice I actually am using a <txp:body />
tag in there. This is because I discovered something when I started the project: I can make the webcomics searchable and spiderable my posting a transcript of the comic in a hidden DIV. Minor, but I thought it would be fun and interesting to do.
I also have the commenting at the ready too. Since I am displaying each comic individually, I thought it would be rather silly to make them click to comment on the comic. I am not sure if i will even be using commenting, but it was a simple addition.
Now the current navigation code:
<code><p style=“text-align:center;”><a href=”<txp:site_url /><txp:section />/in-the-beginning”><< First Comic</a> <txp:chh_if_data><txp:link_to_prev>< Previous Comic</txp:link_to_prev><txp:else />< Previous Comic</txp:chh_if_data> <txp:chh_if_data><txp:link_to_next>Next Comic ></txp:link_to_next><txp:else />Next Comic ></txp:chh_if_data> <a href=”<txp:site_url /><txp:section />”>Latest Comic >></a></p></code>
<p>This is the part I am disliking the most. Here is my reasoning:</p>
- I do not like the fact that the fist comic is hard-coded in. I would like this to be a reusable form for multiple comic titles, but I could not think of a way to do it elegantly. Also, as a side effect, the link is always there whether it is on the first comic or not.
- I would like a simple way of handling storyline. Currently, I am using categories for story lines since it seemed most adaptable for archiving. Problem is, I cannot think of a good way of jumping to the beginning of a storyline without using a custom field, and that would require inputting the url for the storyline beginning every time I set up a comic. Not very sexy flexible if you ask me.
Also, because of number 1, I am using the <chh_if_data>
plugin to fix what would be funny looking navigation. I would prefer it to disappear like it is meant to when there are no more previous comics.
I am mainly posting this here to get some fresh thoughts and theory on what can be done. I am not going to claim to be an expert with Textpattern. I could very well be missing something. Also, I am not dead-set against using plugins, I just like milking everything I can out of the vanilla functionality before I resort to a plugin. Hell, if someone felt generous and coded up a whole webcomic plugin solution, I would jump right on it.
I now leave this for you to ponder and hopefully inject tidbits of wisdom. If anything, this may help some other aspiring webcomic author to get started.
—Al “Zarabadoo” Steffen
http://www.zarabadoo.com
Offline