Hi!
I have created a game journal for my game Space Zoo. It doesn't seem to be linked to my user page. What have I done wrong?
Best regards, Erik
They can be "viewed" from top link "Game Journals"... They are not linked to your user account. Only BLOGS are linked...
That's why I blog rather than post "Game Journals".
FYI.
richdurham
He might be able to help - if it's a bug.
I'm looking in to it, and forwarding the request to our more drupal oriented admin. In the mean time, if anyone here knows PHP code and can see something wrong with this without knowing whether the references are right (eg. to the node.type of "gamejournal" which is correct) then let me know and I can implement:
```
<?php
/**
* Creates a quicklist of recent game journals and a link to their
* node.
*
* To increase the length of the list, change $listlength
*
*/
global $user;
global $node;
$listlength="20";
preg_match("/\/user\/([0-9]*).*$/", request_uri(), $matches);
$tempuid = $matches[1];
$sql = "SELECT node.nid, node.title, node.created, users.name, node.uid FROM node INNER JOIN users WHERE node.uid = $tempuid AND users.uid=$tempuid AND node.status = 1 AND (node.type='gamejournal') ORDER BY name DESC LIMIT 10";
$numrows = 0;
$result = db_query($sql);
$output .= "<table><tbody>";
while ($sqlnode = db_fetch_object($result)) {
$year = format_date($sqlnode->created, 'custom', 'Y');
$month_day = format_date($sqlnode->created, 'custom', 'M j');
if ($year != $prev_year) {
$output .= "</tbody></table><h3>$year</h3><table><tbody>";
$prev_year = $year;
}
$output .= "<tr><td>". $month_day . " " . "</td><td>" . l($sqlnode->title, "node/$sqlnode->nid") . " ";
$output .= "</td><td><em>Submitted by " . $sqlnode->name . "</em><br/></td>";
$numrows++;
}
$output .= "</tbody></table>";
if (0 == $numrows)
{
$output = "<table><tr><td>No game journals created.</td></tr></table>";
}
print $output;
?>
```
It's obvious the code returns NO RECORDS, because the while-loop would increment then $numrows by 1. So it's got to be something with the SQL.
Looking at the SQL, I can see nothing blatantly wrong, but some things that should be checked.
That's the two (2) places I would look first.
Cheers!
I am currently learning PHP for school. My only question would be why you have a curly braket after the first if has already been closed. Unless there is supposed to be an else statement? Not sure. My bet is that some how your $ numrows variable is getting past the loop and going straight to the last if statement.
Again I'm a sstudent so I could be talking complete nonsense. Lol.
***edit***
answered my own question. I forgot the while loop braces. Whoops.
Thanks for the look-through, guys. Questccg - the node.type being "gamejournal" all lowercase like that with one word is indeed the machine-readable name stored for that node. I'll try wiggling the node.status to see if that makes a difference.
Short is, this code is when a user looks at their personal profile, they see a block on the left about their game journals. The code retrieves the journals they've created and lists them. That's it.
If none were created, it says so ($numrows == 0)
But it doesn't seem to be working.
![]() | Kingdom of ... (7) by questccg |
![]() | PoA — Major shift back closer to FCE (17) by questccg |
![]() | Solo racing game: Stunt racing (5) by larienna |
![]() | Some thoughts about heavy euro games (22) by questccg |
![]() | Why a SpaceGame (part 2) (47) by X3M |
![]() | Selling Your Games on The Game Crafter (Hosted by Pam Walls) (0) by The Game Crafter |
![]() | Anyone have any marking recommendations? (2) by questccg |
![]() | Looking for some EURO abilities (2) by questccg |
![]() | Board Game Blueprint - New Episode Every Wednesday (34) by The Game Crafter |
![]() | Epic Metal Monster Coin Update (1) by questccg |
![]() | Blank Poker Card Sale - Only 3 Cents Each! (0) by The Game Crafter |
![]() | 2025 Unpub Mentorship Program (0) by The Game Crafter |
![]() | Prospector — I decided to have a dedicated BLOG for this "Expansion" (32) by questccg |
![]() | Dead Steam - Post Apocalyptic train building card game (38) by Tbone |
![]() | Tabletop Game Jobs (0) by The Game Crafter |
![]() | Protospiel Cleveland (0) by The Game Crafter |
![]() | "Never Seven" - Playtest Rules - Suspended While the Game is Undergoing Modification (7) by Steve |
![]() | New Board Game Pieces - Premium Mushroom & Premium Brown Mushroom (0) by The Game Crafter |
![]() | Weight of sorting (4) by X3M |
![]() | Placing cards (planets) in specific positions (orbits) (4) by Tbone |
![]() | Designing from a personal pool of mechanism (36) by larienna |
![]() | New Board Game Pieces - InFUNity Tiles (Hat Shape) (0) by The Game Crafter |
![]() | New Auction: 1 Month of Advertising on FatherGeek.com (0) by The Game Crafter |
![]() | DuelBotz: Sample New Card (19) by questccg |
![]() | Comparing 2 new dice replace mechanics (2) by X3M |
Thank you for answering!
On my user page to the left it is written that "No game journals created" (as is the same for your user page). This is not true. Is this a known feature of the site?
Best regards,
Erik