Author Topic: Updating Comic  (Read 21643 times)

0 Members and 1 Guest are viewing this topic.

golden-crystals

  • Newbie
  • *
  • Posts: 42
    • View Profile
    • http://golden-crystals.xepher.net
Updating Comic
« on: June 09, 2006, 08:53:35 pm »
I'm just starting my website and I've been searching and reading through all the topic on this page, help pages, etc. Anyway, I was just a little confused on how the comic is updated?

Im sorry if this question has already been stated, or been answered. Is there any other 'tutorial' or help thing besides this forum and the 'Help and Info' page?
'In case of stupid, throw a brick'

Golden Crystals - Your journey is before you.

Chow

  • Newbie
  • *
  • Posts: 37
    • View Profile
    • http://student.fgcu.edu/rachinqu/website
Updating Comic
« Reply #1 on: June 09, 2006, 09:16:27 pm »
Update your comic index page to point to your current newest comic, then use the navigation buttons with PHP to minus or plus the current comic's number for the page refresh

(ie: the "next" button will generate the same webpage but the comic variable will be "[comicvariable]+1" so comic #7 would become comic #8 if you hit "next")

if you need code examples let me know.
[some kid]: :cool: "wei long....clever..."
[me]: :/
[Ian]: :mad: "Actually....that's his name, JERK!"
[me]: :lol:

golden-crystals

  • Newbie
  • *
  • Posts: 42
    • View Profile
    • http://golden-crystals.xepher.net
Updating Comic
« Reply #2 on: June 09, 2006, 10:51:07 pm »
Yes Please!

I have my site up, but I didn't use PHP, but it still looks ok. I know that my index page should be PHP, I'll have to work on that, but everything else seems to be in working order.

The codes for updating the comics would be great, and maybe a brief brief explaination? Thank you, Chow! ^^
'In case of stupid, throw a brick'

Golden Crystals - Your journey is before you.

Chow

  • Newbie
  • *
  • Posts: 37
    • View Profile
    • http://student.fgcu.edu/rachinqu/website
Updating Comic
« Reply #3 on: June 10, 2006, 04:59:51 am »
so tired, can't post code now, but I will get into why you need PHP and not just HTML for those comic pages and not just the index (which technically only needs the Xepher box as far as PHP goes)

if you only use HTML, 10 comics means each comic must have it's own page, and the links to those 10 comics point to the 10 different pages. This is a problem when you get around comic #100 or #1000, then you'll have a thousand pages, each with just one comic on it. Imagine if you change your background or banner, you'd have to do it a hundred times!

A PHP page is one page that can change to display different content, like different comics. One page, no fuss...ok some fuss, but more on that in the morning, I'll be back.......
[some kid]: :cool: "wei long....clever..."
[me]: :/
[Ian]: :mad: "Actually....that's his name, JERK!"
[me]: :lol:

Databits

  • Global Moderator
  • *****
  • Posts: 1,607
  • Programming's not just a science, it's an art.
    • View Profile
Updating Comic
« Reply #4 on: June 10, 2006, 05:51:41 am »
However, php has it's downsides as well. Using standard GET request links isn't all too search engine friendly. Granted, it's probably better to be set up with some sort of templating system, you can technically still change sections of code in multiple documents (html files) very quickly if you know what you're doing on a *nix box.

As for search engine friendly, I find that setting up a php script to parse the REQUEST_URI out from a generated htm or html page within a script is pretty damn good for that. For example:

Using an .htaccess file you can specify a file as an executable PHP file, even if it has no php extension. Now, say you have a script that's used to generate the pages of your comic (for this lets call it comic.php). What you'd do is have the another file that uses an include or require of comic.php called just comic.

Now you can go to http://www.mysite.com/comic and apache will execute comic.php (as the include suggests). But this is just the start. The comic.php script would first parse the REQUEST_URI from the $_SERVER global and pull some unique url from it to generate the page. Because of the way this works, going to the url http://www.mysite.com/comic/comic1page1.html would STILL execute comic.php. So when comic.php executes and parses the url, it would be able to tell that it needs to render comic #1's first page (you can have the URL setup and parse however you like).

Aside from the parsing, the url http://www.mysite.com/comic/comic1page1.html is being handled the same as you would normally handle a GET request like this: http://www.mysite.com/comic.php?comic=1&page=1. The only difference is that a search engine will actually pick this up much easier.


NOTE: Sorry if this seems a bit confusing at the moment it's almost 2:00am and it's been a rough day.
(\_/)    ~Relakuyae D'Selemae
(o.O)    
(")_(")  [Libre Office] [Chrome]

Chow

  • Newbie
  • *
  • Posts: 37
    • View Profile
    • http://student.fgcu.edu/rachinqu/website
Updating Comic
« Reply #5 on: June 10, 2006, 03:44:54 pm »
Good point data, I had not thought about the search engine aspect. I guess I just get an uneasy feeling thinking about a folder with that many HTML pages.

But once a site is big enough, the need to draw people from search engines WOULD be an issue, so I think you've got something there. Google's and Yahoo's should always be kept in mind.
[some kid]: :cool: "wei long....clever..."
[me]: :/
[Ian]: :mad: "Actually....that's his name, JERK!"
[me]: :lol:

Databits

  • Global Moderator
  • *****
  • Posts: 1,607
  • Programming's not just a science, it's an art.
    • View Profile
Updating Comic
« Reply #6 on: June 10, 2006, 05:18:34 pm »
Yeah, I just got finished with a contract that uses a similar system. They're an online bronco parts supplier, so they wanted things to pop up in search engines for their site if say someone searched for a specific part.
(\_/)    ~Relakuyae D'Selemae
(o.O)    
(")_(")  [Libre Office] [Chrome]

golden-crystals

  • Newbie
  • *
  • Posts: 42
    • View Profile
    • http://golden-crystals.xepher.net
Updating Comic
« Reply #7 on: June 10, 2006, 05:40:17 pm »
Quote from: Databits
Now you can go to http://www.mysite.com/comic and apache will execute comic.php (as the include suggests). But this is just the start. The comic.php script would first parse the REQUEST_URI from the $_SERVER global and pull some unique url from it to generate the page. Because of the way this works, going to the url http://www.mysite.com/comic/comic1page1.html would STILL execute comic.php. So when comic.php executes and parses the url, it would be able to tell that it needs to render comic #1's first page (you can have the URL setup and parse however you like).
I used a simular system like this on Comic Genesis, only it wasn't explained as PHP. Pages were updated by date, like if I were to want to post a comic today and tomorrow I would name my files 20060610.jpg and 20060611.jpg, put them in the comic file and it would be done for me.

As for the Next, Back, First, and Last buttons, they were set up in a way that they automatically did what they were coded for. I never had to relink them to every single comic page.

Does Xepher have a similar system? As far as PHP and Apache go, I have been downloading several things, reading countless 'Readme's and 'Installs' and I can't even fathom the concept. Is there a PHP/Apache/Xepher for Dummies?
'In case of stupid, throw a brick'

Golden Crystals - Your journey is before you.

Databits

  • Global Moderator
  • *****
  • Posts: 1,607
  • Programming's not just a science, it's an art.
    • View Profile
Updating Comic
« Reply #8 on: June 10, 2006, 07:20:48 pm »
Ok, now I'm not allowed to disclose exact code due to an NDA (Non-Disclosure Agreement), but here's a VERY basic example of the idea:

.htaccess
Code: [Select]

  ForceType application/x-httpd-php
comic
Code: [Select]
  require_once('comic.php');
?>
comic.php
Code: [Select]
  // URL PARSE CODE HERE

  // PAGE GENERATION, ETC...
?>
In the parse code I suggest using something (URL valid) as a unique method to break up the url. Something like http://www.mysite.com/comic/c1_p5.html.

With that you can use something like the following (note this is a VERY simple model with no error checking or anything):

Code: [Select]
  // Gets everything after the last "/" in the URL or "c1_p5.html" for this example.
  $url = substr(strrchr($_SERVER['REQUEST_URI'], '/'), 1);  

  // Remove the ".html", ".htm", whatever from the URL by exploding
  // the string into an array and using the first index.
  $url = explode('.', $url);

  // Explode the string into another array to seperate comic and page.
  $url = explode('_', $url[0]);
  $comic = $url[0];
  $page = $url[1];

  // Do whatever you want with the data that's been parsed.
?>
(\_/)    ~Relakuyae D'Selemae
(o.O)    
(")_(")  [Libre Office] [Chrome]

Xepher

  • Techsmith
  • Administrator
  • *****
  • Posts: 4,326
  • Illegitimis non carborundum!
    • View Profile
    • Xepher.net
Updating Comic
« Reply #9 on: June 11, 2006, 12:53:23 am »
Golden-Crystals... I get the impression that you're not actually a programmer. You're looking for some sort of wizard or automagical site generator. There isn't one. ( http://xepher.net/index.php?page=faq ) You have to find/install/write your own scripts for things like this. Xepher.net doesn't provide anything. Take a look at some scripts like http://walrus.newbsoft.com/ or http://atp.cx/?a=downloads if you need to automate a comic.

golden-crystals

  • Newbie
  • *
  • Posts: 42
    • View Profile
    • http://golden-crystals.xepher.net
Updating Comic
« Reply #10 on: June 11, 2006, 04:29:33 am »
lol, no, I'm not a programmer wizard. I was just wondering if Xepher had anything like that,  but if I have to link everything manually, I will.Thank you all for the links and the codes, I really appreciate it.
'In case of stupid, throw a brick'

Golden Crystals - Your journey is before you.

fesworks

  • Administrator
  • *****
  • Posts: 923
    • View Profile
    • http://www.fesworks.com
Updating Comic
« Reply #11 on: October 22, 2006, 05:17:43 am »
ah, i've been looking for something like that! Learning full php is just not in the cards for me right now, so hopefully these will help me from updating 3 pages each time I have a new comic :P

Databits

  • Global Moderator
  • *****
  • Posts: 1,607
  • Programming's not just a science, it's an art.
    • View Profile
Updating Comic
« Reply #12 on: October 25, 2006, 06:46:04 pm »
Which is all the more reason for you to finish your comic system Xeph. :P
(\_/)    ~Relakuyae D'Selemae
(o.O)    
(")_(")  [Libre Office] [Chrome]

Xepher

  • Techsmith
  • Administrator
  • *****
  • Posts: 4,326
  • Illegitimis non carborundum!
    • View Profile
    • Xepher.net
Updating Comic
« Reply #13 on: October 25, 2006, 09:50:29 pm »
Yeah yeah... I'm slow, I know it. :-)

jekkal

  • Newbie
  • *
  • Posts: 38
  • Last Resort Volunteer
    • View Profile
    • Last Res0rt - The Cyberpunk Furry Webcomic
Updating Comic
« Reply #14 on: April 07, 2007, 12:38:39 am »
I think I get what's going on here, but still a little flustered . . .

So, in theory I can just post my strip, update the ID # on comic php (or whatever I use) and use that on the front page rather than actually updating the index, yes?

Sorry, crawling here. @_@ I'm still trying to wrap my head around how to do the layout with this behemoth of a page.