Usergroup: Member
Joined: Oct 17, 2004
Total Topics: 13
Total Posts: 44
Posted 11/03/04 - 11:39 AM:
#1
As I've said before, great script indeed, thanks to Paul..As I get along with it, it's impossible not to marvel at its functionality..Else than a script, it's more like a sub-programming language..Most of the things you dream of, is possible by editing only the templates. By the way, I'm making a new template set with some changes in the css, I'll need your idea about it when it's finished.If the template base looks good enough, it will be possible to change the overall look of the site with only minor changes to the css file.(I'll send a screenshot when it's done)
My question is; On the main page, I want to list the first 10 links (by hits in) under each category.So that it should look like: CATEGORY-1 CATEGORY-2 ---------- ---------- Link1 Link1 Link2 Link2 Link3 Link3 Link4... Link4..
and so on (I don't use subcategories). A live example of such listing can be seen here: http://arama.piskedi.com
What should be the code for this kind of listing? Thank you in advance.
Usergroup: Administrator
Joined: Dec 21, 2001
Location: Northern California
Total Topics: 55
Total Posts: 5703
Posted 11/04/04 - 12:31 AM:
#2
Sounds like you need a toplist, but to have a toplist for every category on the main page is going to make that page load very, very slow.
Make a toplist of links by hits in with the filtering condition catid={CATID}. To keep the toplist numbers unique for each category, use {CATNUMBER} as the toplist number.
Usergroup: Member
Joined: Oct 17, 2004
Total Topics: 13
Total Posts: 44
Posted 11/04/04 - 01:03 PM:
#3
Thank you Paul. You're right about the slow page loading, but what about using a static index.php page? In this case, the sql queries would only be done when the page is rebuilt at intervals, so in theory, this would give people a fast loading main page. Would this solve the issue?Please correct me if I'm mistaken.
(P.S.I know such a busy listing sounds weird, but people in my country prefer this kind of link indexes;several links listed under categories.I don't know why and never saw such link index sites in any other countries..So we all customize the main pages here )
Usergroup: Administrator
Joined: Dec 21, 2001
Location: Northern California
Total Topics: 55
Total Posts: 5703
Posted 11/04/04 - 08:53 PM:
#4
The static page still has to be loaded as a PHP page via PHP at the time it's being generated. Some user has to be there every 12 hours waiting 20 seconds for the page to load. If it takes too long, the odds of PHP timing out or the user not letting it run to completion increase and you might not get the static file generated properly. You can try it though.
Usergroup: Member
Joined: Oct 17, 2004
Total Topics: 13
Total Posts: 44
Posted 11/09/04 - 03:55 PM:
#5
I couldn't still get my site online, so I can't make a realistic test about it. I'll use the script as a toplist, and so the main page must be rebuilt at frequent intervals, like every 30 minutes.
What if I use a CRON job for this?
Never used CRON before, but if I'm not mistaken, it should rebuild the page all by itself at regular intervals, without being in need of any visitor.
What do you think? Any other suggestions for a half-an-hour rebuilding index page?