Welcome to Geeklog, Anonymous Wednesday, January 08 2025 @ 09:43 pm EST
Geeklog Forums
Staticpages and Stats
Status: offline
RickW
Forum User
Full Member
Registered: 01/28/04
Posts: 240
Location:United States
I have staticpages I'm using for some Intro blocks on my topic pages. I'm not linking to them by themselves, and I don't have it checked to add to menu. But they show up on my stats page and in my search results.
Is there any way I can hide them as results?
www.antisource.com
Is there any way I can hide them as results?
www.antisource.com
5
7
Quote
Status: offline
RickW
Forum User
Full Member
Registered: 01/28/04
Posts: 240
Location:United States
Ohhhh I'm not the brightest bulb in the pack today. Thanks.
edit:
Oops, that doesn't work. Well it does, but too good. If I remove permissions for Anonymous and Members, it does remove it from stats and search results, but also removes it from the top of my topic page I have it assigned to.
www.antisource.com
edit:
Oops, that doesn't work. Well it does, but too good. If I remove permissions for Anonymous and Members, it does remove it from stats and search results, but also removes it from the top of my topic page I have it assigned to.
www.antisource.com
6
6
Quote
Status: offline
Dirk
Site Admin
Admin
Registered: 01/12/02
Posts: 13073
Location:Stuttgart, Germany
So what you really want is an option for static pages not to show up in the stats when they're used as center blocks, correct?
Shouldn't be too hard to add a
bye, Dirk
Shouldn't be too hard to add a
AND (sp_centerblock = 0)
in the code for the static page's stats function somewhere ...bye, Dirk
6
6
Quote
Status: offline
drshakagee
Forum User
Full Member
Registered: 10/01/03
Posts: 231
Should work if you change line 122 of the staticpages functions.inc to look like this:
Yes I am mental.
Text Formatted Code
$result = DB_query ("SELECT sp_id,sp_title,sp_hits FROM {$_TABLES['staticpage']} WHERE sp_hits > 0 AND (sp_centerblock = 0)" . $perms . ' ORDER BY sp_hits DESC LIMIT 10');Yes I am mental.
8
5
Quote
Status: offline
drshakagee
Forum User
Full Member
Registered: 10/01/03
Posts: 231
I just did a little test and it looks like this will work for the searching (just did a little test so test it out yourself, all my staticpages are php which I don't think works well with the searching) change line 251 in the staticpages functions.inc
from this:
$sql .= " ORDER BY sp_date desc";
to this:
Yes I am mental.
from this:
Text Formatted Code
$sql .= " ORDER BY sp_date desc";
to this:
Text Formatted Code
$sql .= "AND (sp_centerblock = 0) ORDER BY sp_date desc";Yes I am mental.
7
6
Quote
All times are EST. The time is now 09:43 pm.
- Normal Topic
- Sticky Topic
- Locked Topic
- New Post
- Sticky Topic W/ New Post
- Locked Topic W/ New Post
- View Anonymous Posts
- Able to post
- Filtered HTML Allowed
- Censored Content