Welcome to Geeklog, Anonymous Monday, April 22 2024 @ 08:47 am EDT

Geeklog Forums

Hiding comment count in "Older Stories"


Status: offline

soydog

Forum User
Chatty
Registered: 08/18/03
Posts: 49
I would like to hide the number of comments shown in parantheses next to the story title in my "Older Stories" block.

Can someone tell me where on which file I have to edit to do that? I've looked in config.php but didn't see anything like it.
Thanks!
Big Grin
Anarchist Football Network - http://www.passionbomb.com/soccer
"If I can't play soccer, I want no part of your revolution."
 Quote

Status: offline

Dirk

Site Admin
Admin
Registered: 01/12/02
Posts: 13073
Location:Stuttgart, Germany
That's hard-coded in function COM_olderStuff in lib-common.php.

You will need to open and save a story (any story will do) after the change to force the block content to be updated.

bye, Dirk
 Quote

Status: offline

Turias

Forum User
Full Member
Registered: 10/20/03
Posts: 807
In lib_common.php, there is a line that looks like:

Text Formatted Code
$oldnews[] = '<a href="' . $_CONF['site_url']
    . '/article.php?story=' . $A['sid']
    . '">' . $A['title'] . '</a> ('
    . $A['comments'] . ')';

</pre />
<br />Change that to read<br />[code]$oldnews[] = '<a href="' . $_CONF['site_url']
    . '/article.php?story=' . $A['sid']
    . '">' . $A['title'] . '</a>';

 
 Quote

Status: offline

soydog

Forum User
Chatty
Registered: 08/18/03
Posts: 49
Quote by Turias: In lib_common.php, there is a line that looks like:

$oldnews[] = '[a href="' . $_CONF['site_url'] . '/article.php?story=' . $A['sid'] . '"]' . $A['title'] . '[/a] (' . $A['comments'] . ')';

Just remove the final ( comments ) part.

Cool. Thanks! So, just to make sure, it should look like this?

$oldnews[] = '[a href="' . $_CONF['site_url'] . '/article.php?story=' . $A['sid'] . '"]' . $A['title'] . '[/a]';
Anarchist Football Network - http://www.passionbomb.com/soccer
"If I can't play soccer, I want no part of your revolution."
 Quote

Status: offline

Turias

Forum User
Full Member
Registered: 10/20/03
Posts: 807
Right, but some of those '['s should be less-than and greater than signs (as are already in the code). The forum isn't accepting CODE blocks right now, so I had to improvise. Smile
 Quote

Status: offline

DTrumbower

Forum User
Moderator
Registered: 01/08/03
Posts: 507
Text Formatted Code
Seems to be working fine for me.
</pre />
<br />[code]and again
 
 Quote

Status: offline

Turias

Forum User
Full Member
Registered: 10/20/03
Posts: 807
Heh, Blaine must have just fixed it. See this forum post for what I was talking about.

I have edited my previous response and added CODE blocks.
 Quote

Status: offline

soydog

Forum User
Chatty
Registered: 08/18/03
Posts: 49
Quote by Dirk: You will need to open and save a story (any story will do) after the change to force the block content to be updated.

bye, Dirk

Do you mean "open" a story as in edit an existing story and then just save it again? I did that after editing the lib-common and it's still not doing it (even after I cleared my browser cache).
Any thoughts?

Anarchist Football Network - http://www.passionbomb.com/soccer
"If I can't play soccer, I want no part of your revolution."
 Quote

Status: offline

Dirk

Site Admin
Admin
Registered: 01/12/02
Posts: 13073
Location:Stuttgart, Germany
Quote by soydogBig Grino you mean "open" a story as in edit an existing story and then just save it again?

Yep. That should do it. Or try editing the "Older Stories" block itself (e.g. removing the content).

bye, Dirk
 Quote

Status: offline

soydog

Forum User
Chatty
Registered: 08/18/03
Posts: 49
Quote by Dirk:
Quote by soydogBig Grino you mean "open" a story as in edit an existing story and then just save it again?

Yep. That should do it. Or try editing the "Older Stories" block itself (e.g. removing the content).

bye, Dirk

Hmm. I did that too, but it's still not doing it...
Anarchist Football Network - http://www.passionbomb.com/soccer
"If I can't play soccer, I want no part of your revolution."
 Quote

Status: offline

Dirk

Site Admin
Admin
Registered: 01/12/02
Posts: 13073
Location:Stuttgart, Germany
Quote by soydog:Hmm. I did that too, but it's still not doing it...

Then maybe your patch isn't working ...

bye, Dirk
 Quote

Status: offline

soydog

Forum User
Chatty
Registered: 08/18/03
Posts: 49
Nope. It's not working at all. And I've done everything that was suggested. Has anyone got this working successfully before?
Anarchist Football Network - http://www.passionbomb.com/soccer
"If I can't play soccer, I want no part of your revolution."
 Quote

Status: offline

Turias

Forum User
Full Member
Registered: 10/20/03
Posts: 807
The change I posted should work...

Maybe delete the block and re-add it with the same function? You could also copy the entire COM_olderStuff function, rename it to COM_olderStuff2 or something like that, and make a new block based on the new function.
 Quote

All times are EDT. The time is now 08:47 am.

  • 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