Posted on: 10/30/03 01:52pm
By: soydog
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!
Re:Hiding comment count in "Older Stories"
Posted on: 10/30/03 02:02pm
By: Dirk
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
Re:Hiding comment count in "Older Stories"
Posted on: 10/30/03 02:04pm
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'] . ')';
Change that to read
$oldnews[] = '<a href="' . $_CONF['site_url']
. '/article.php?story=' . $A['sid']
. '">' . $A['title'] . '</a>';
Re:Hiding comment count in "Older Stories"
Posted on: 10/30/03 02:23pm
By: soydog
[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.[/QUOTE]
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]';
Re:Hiding comment count in "Older Stories"
Posted on: 10/30/03 02:33pm
By: Turias
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.
Re:Hiding comment count in "Older Stories"
Posted on: 10/30/03 03:11pm
By: DTrumbower
Seems to be working fine for me.
and again
Re:Hiding comment count in "Older Stories"
Posted on: 10/30/03 03:23pm
By: Turias
Heh, Blaine must have just fixed it. See
this forum post[*1] for what I was talking about.
I have edited my previous response and added CODE blocks.
Re:Hiding comment count in "Older Stories"
Posted on: 10/30/03 06:25pm
By: soydog
[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[/QUOTE]
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?
Re:Hiding comment count in "Older Stories"
Posted on: 10/31/03 03:30am
By: Dirk
[QUOTE BY= soydog]Do you mean "open" a story as in edit an existing story and then just save it again?[/QUOTE]
Yep. That should do it. Or try editing the "Older Stories" block itself (e.g. removing the content).
bye, Dirk
Re:Hiding comment count in "Older Stories"
Posted on: 10/31/03 06:29am
By: soydog
[QUOTE BY= Dirk] [QUOTE BY= soydog]Do you mean "open" a story as in edit an existing story and then just save it again?[/QUOTE]
Yep. That should do it. Or try editing the "Older Stories" block itself (e.g. removing the content).
bye, Dirk[/QUOTE]
Hmm. I did that too, but it's still not doing it...
Re:Hiding comment count in "Older Stories"
Posted on: 10/31/03 07:00am
By: Dirk
[QUOTE BY= soydog]Hmm. I did that too, but it's still not doing it...[/QUOTE]
Then maybe your patch isn't working ...
bye, Dirk
Re:Hiding comment count in "Older Stories"
Posted on: 11/07/03 05:23am
By: soydog
Nope. It's not working at all. And I've done everything that was suggested. Has anyone got this working successfully before?
Re:Hiding comment count in "Older Stories"
Posted on: 11/07/03 09:46am
By: Turias
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.