TeamPhotoshop
Reviews, updates and in depth guides to your favourite mobile games - AppGamer.com
Forum Home Latest Posts Search Help Subscribe

a tall order... lol

Page: 1 2 Reply
Dec 18th 2003#134003 Report
Member since: Jun 3rd 2003
Posts: 1867
I know nothing about PHP.

That said, when i get my webcomic up and running, it will be annoying to continually update the html.

i was wondering if i could do this with PHP.

before i get inot what I want the php to do, lemme first explain what the pages are of.

each page contains 3 things: a comic and 2 updates (sort of like an article or whatever.)

also, each page consists of four links: "first" (takes you back to the first comic's page, obviously doesn't need to be updated), "most recent" (takes you to most recent comic's page), and back and next (takes you to the previous and next comic's page, respectively.)

the most recent comic will not have a functioning "next" button since there is nowhere else to go. the first comic doesnt have a functioning back button.

the problem is that every time a new comic is uploaded and a new page created for it, the most recent comic changes. also, the 2nd newest comic's "next" link needs to be updated.

so, i was wondering, if php, if i could achieve this:

a. have an update page where there's room for a directory and two spaces for the updates.
b. when it updates, it creates a new html with the new comic and new updates.
c. when it updates, it makes the 2nd most recent comic's "next" button active.
d. it adds the comic's url in a link in an "Archive" page or section, where all the comics can be viewed.


it seems pretty complicated to me. I dont know how it'd be done in php. Anything to clear it up for me would be greatly appreciated.

again i know relatively no php so rattling off a bunch of php tags or something won't help... or maybe it will, but anyway, i need to knwo if it's doable, and how long would it take me to learn/do it.. :D thanks :D
Reply with Quote Reply
Dec 18th 2003#134009 Report
Member since: Nov 26th 2001
Posts: 2586
Yes that is very possible and I think this sort of thing is already built 100x's over, but let me remember what it is called.... I'll try to remember in a bit.
Reply with Quote Reply
Dec 18th 2003#134024 Report
Member since: Nov 6th 2001
Posts: 240
first important question, do you have a mysql database?

tip: make a static html example of the page so we can see what it looks like.
Reply with Quote Reply
Dec 18th 2003#134027 Report
Member since: Mar 29th 2003
Posts: 1326
A sample html page would be a good idea.

And I dont think that he wants to use MySQL (I talked to him about this project on AIM).

The only thing that I can't really get my head around in flatfile php is the "previous" and "next" navigation buttons. The rest would be easy, though. Maybe you could just have a list of all comics on each page, too. Like quick links, you know? That would be easy - it could be the same comic_list.inc.php file as that the archive uses.

And for me - I'd have to figure out how to upload images and everything, but I'm sure its not hard. php.net and you've got it! I'm not really sure what you're asking here - maybe what I've said has helped, though.

tom
Reply with Quote Reply
Dec 18th 2003#134037 Report
Member since: Nov 6th 2001
Posts: 240
no MySQL :( too bad, it would make this project very easy ...
Reply with Quote Reply
Dec 18th 2003#134062 Report
Member since: Nov 26th 2001
Posts: 2586
I've done an image preview thing by just counting the number of images in a directory, then the link represents which image:
ie: image.php?id=23 obviously the next one is just one count up id=24 so all it needs is the variable that represents the current image number + 1. But I know comic fans have made these kinds of scripts and they don't use any db's .... There is a name for them and I can't remember what it is - lol....
Reply with Quote Reply
Dec 18th 2003#134066 Report
Member since: Nov 6th 2001
Posts: 240
http://qtone.sidez.net/flat/

is this the kind of thing you're looking for? it's a flat file script....
Reply with Quote Reply
Dec 18th 2003#134075 Report
Member since: Mar 29th 2003
Posts: 1326
Thas awesome. How do you do the navigation buttons? I'm guessing that they're not in the files. What all is in the files? Do you use explode or something and make an array, or just store all the html in the text files.

I don't understand how the switch-case navigation works with this. Don't you have to add more cases to it each time? Or are variables used...? Can I see that part of the code? I don't really want to see all of it - I'd like to try to code something like that - I think its about at my level now. :D

tom
Reply with Quote Reply
Dec 18th 2003#134079 Report
Member since: Nov 6th 2001
Posts: 240
it's a rather simple script, took me 30 mins to complete, the code is a bit raw and dirty but here it is .... feel free to play around with it:

http://qtone.sidez.net/flat/flat_file_imgs.zip

suggestions are always welcome ...
Reply with Quote Reply
Dec 18th 2003#134083 Report
Member since: Nov 26th 2001
Posts: 2586
Thats great QTone =)
Reply with Quote Reply
Page: 1 2 Back to top
Please login or register above to post in this forum