I had looked to the templates initially. I am not able to get what I want that way. Perhaps it is because I am just too unfamiliar with Serendipity's strucutre.
I want not just the full body, but everything - comments (if any) and comment form.
in genpage.inc.php I see this;
Code: Select all
case 'read':
if (isset($serendipity['GET']['id'])) {
serendipity_printEntries(array(serendipity_fetchEntry('id', $serendipity['GET']['id'])), 1);
}
great! so for the case of read I see what is happening. I can follow through on _printEntries and _fetchEntries and it seems to stand that it should work (and that does). Now, if I try to mimic that a little furtther down in the file;
Code: Select all
// Welcome screen or whatever
default:
if ($serendipity['fetchLimit'] == 1) {
$serendipity['GET']['id'] = 41;
serendipity_printEntries(array(serendipity_fetchEntry('id', $serendipity['GET']['id'])), 1);
}
else {
serendipity_printEntries(serendipity_fetchEntries(null, true, $serendipity['fetchLimit']));
}
break;
(added the catch for my situation of fetchLimit being 1) It simply does not work. In this case I'm assigning to ['GET']['id'] a constant. Entry 41 indeed does show up on my main page, but not with comments/comment-form/etc. In reality, I would do a select there or something to fetch the id of the latest non-draft entry.
I've tried a lot of things in this area, and nothing works! I'm really banging my head on my desk at this point as I cannot figure out why! I've put print statements in functions like serendipity_displayCommentForm and it is making it into there, just not displaying the comment form (or comments, or entry navigation).
Scrapping the above idea, I've tried things like this in the _PrintEntries function;
Code: Select all
/* IF WE ARE DISPLAYING A FULL ENTRY */
if (isset($serendipity['GET']['id']) || count($entries) == 1) {
Here I've added the condition of there being only 1 entry and to display the full thing. Same results as above, it goes into the functions - I've traced a couple of layers deep into them, but nothing is displayed!
I thought this would be a simple thing.. I'm beginning to wonder if the fight is worth it. Spent a lot of time on this so far. It seems I'm missing something, when I find it - I'm sure I'll slap myself.. but I just don't know what's going on.
Any help would be appreciated.