Welcome to Geeklog, Anonymous Thursday, April 10 2025 @ 08:10 am EDT
Geeklog Forums
Hack to separate stories for each day.
auspexian
Anonymous

I am looking for a hack to separate stories of different days with a line or text in between.
EG..
Story 1
Story 2
---------------- Tuesday, September 1st, 2004 ------------
Story 3 (posted the day before)
Story 4 (posted the day before)
etc...
Or just a line would be good.
Tks
John
EG..
Story 1
Story 2
---------------- Tuesday, September 1st, 2004 ------------
Story 3 (posted the day before)
Story 4 (posted the day before)
etc...
Or just a line would be good.
Tks
John
12
23
Quote
Status: offline
Euan
Forum User
Full Member
Registered: 04/22/02
Posts: 292
This should be doable in index.php.... if you look around line 170, you'll see something like this:
if ($nrows > 0) {
for ($x = 1; $x <= $nrows; $x++) {
$A = DB_fetchArray($result);
if ($A['featured'] == 1) {
$feature = 'true';
} elseif (($x == 1) && ($_CONF['showfirstasfeatured'] == 1)) {
$feature = 'true';
$A['featured'] = 1;
}
$display .= COM_article($A,'y');
if ($A['featured'] == 1) {
$display .= PLG_showCenterblock (2, $page, $topic);
}
}
in this, you could add a check after the $A = DB_fetchArray($result) to see whether the date has changed, and if it has, add an extra line of text with the next date.
Cheers,
Euan.
-- Heather Engineering
-- No job too small
Text Formatted Code
if ($nrows > 0) {
for ($x = 1; $x <= $nrows; $x++) {
$A = DB_fetchArray($result);
if ($A['featured'] == 1) {
$feature = 'true';
} elseif (($x == 1) && ($_CONF['showfirstasfeatured'] == 1)) {
$feature = 'true';
$A['featured'] = 1;
}
$display .= COM_article($A,'y');
if ($A['featured'] == 1) {
$display .= PLG_showCenterblock (2, $page, $topic);
}
}
in this, you could add a check after the $A = DB_fetchArray($result) to see whether the date has changed, and if it has, add an extra line of text with the next date.
Cheers,
Euan.
-- Heather Engineering
-- No job too small
18
18
Quote
aupexian
Anonymous
Thank you. I'll have to wait for someone to come up with the code :-)
John
John
18
19
Quote
All times are EDT. The time is now 08:10 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