View Full Version : Category Display
dagaffer
11-22-2002, 08:41 PM
Hi, I'm not sure if what I want is quite possible.
I have a lot of wallpapers & more being added but theres to many to fit onto 1 page & I dont want to simply put like 10 - 15 preview pictures on each page.
I want them to have categorys (with like 10 - 15 previews on each page).
I've managed to confuse myself so I doubt you'll be able to help!
Lets see... Its southpark pictures so say there was some Cartman 1s & some Kyle ones, I want to have a link just to click on that will select the kyle ones & display them on a page of about 10 of them (with a link to the next 10).....
Is it possible or should I just do some hard labour & make seperate HTML pages?
Thanx, gaffer
whammy
11-22-2002, 11:52 PM
http://www.asp101.com/samples/db_paging.asp
:)
Mhtml
11-23-2002, 12:24 AM
Ok, this is do-able.
First of all it would be a good idea to have all the pictures in the format of lets say as an example Kyle01.gif , Kyle02.gif etc and for each character have the number incrementing for each picture of the character.
A good way to do this is with a batch file renamer.
I'm not sure how you can do it with different extensions so it is best that they are all the same. But you could use the fso to get the right extension but I'm not sure how to use fso to start getting all the files from a certain number, I can stop it from getting more at a specified number but picking up from a certain number I'm not sure how that can be done.
Possibly someone else can tell you how to it that way because it is really the best way...maybe you can just pass the last file name after 10 images to a querystring and somehow use it..to recall the position.
Please note that this isn't bullet proof so you should put some time into making it more user friendly..
The filename version would go like this:
Extension = ".gif"
strStartNo = 000
strEndNo = 010
strStartNo = Request.QueryString("s")
strEndNo = Request.QueryString("e")
strCategory = Request.QueryString("c")
strLinkNext = "<a href='?s="&strEndNo + 1 &"&e="&StrEndoNo + 10 &"&c="&strCategory&"'>Next 10</a>"
strLinkNext = replace(strLinkNext, "'", chr(34))
for i = strStartNo to strEndNo
LinkString = "<a href='"&strCategory & i &"'><img src='"&strCategory & i & "'></a>"
LinkString = replace(LinkString, "'", chr(34))
Response.Write(LinkString)
Next
Response.Write(strLinkNext)
Ok, going over this again I can see that this really isn't a good way to do it at all. You could use this but fso is really a better thing to use. I am going to have a fiddle around with getting it to start and resume from different places in a folder to get the desired results...if I get it working I'll post it.
whammy
11-23-2002, 12:32 AM
Actually, database paging is a much better way to go about it. ;)
dagaffer
11-25-2002, 08:43 PM
OK, I could do Mhtml's suggestion, but i'd preffer not renaming all the files... So I'll be tryin the database paging:thumbsup:
vBulletin® v3.8.2, Copyright ©2000-2012, Jelsoft Enterprises Ltd.