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.
Dead Steam - Post Apocalyptic train building card game (8) by questccg |
Designing from a personal pool of mechanism (31) by questccg |
Why a SpaceGame (part 2) (10) by X3M |
New Auction: 1 Month of Advertising on FatherGeek.com (0) by The Game Crafter |
"Never Seven" - Playtest Rules - Suspended While the Game is Undergoing Modification (5) by questccg |
DuelBotz: Sample New Card (19) by questccg |
Comparing 2 new dice replace mechanics (2) by X3M |
Happy New Year!!! (1) by questccg |
How to design and balance a Rock-Paper-Scissor like mechanism (44) by X3M | |
Monster Keep — Retiring this Design (0) by questccg |
Build your own [insert game genre here] (13) by larienna | |
Finalists Selected for the VHS Case Challenge (5) by larienna |
2025 New Year Sale at The Game Crafter (0) by The Game Crafter |
Merry Christmas 2024! (0) by questccg |
Winner Announced for "That Cool Stock Part Challenge" (0) by The Game Crafter |
End of Year Playtest Event at The Game Crafter (0) by The Game Crafter |
New Board Game Pieces: 13mm Wood Cubes (0) by The Game Crafter |
Board Game Blueprint - New Episode Every Wednesday (24) by The Game Crafter |
Madison Game Design Cabal (0) by The Game Crafter | |
PoA — Major shift back closer to FCE (13) by questccg |
Voting Begins for "VHS Case Challenge" at The Game Crafter (0) by The Game Crafter |
New Product: Large Quad-Fold Game Boards (0) by The Game Crafter | |
2025 New Year Sale at The Game Crafter (0) by The Game Crafter |
New Board Game Design Contest: ZSA Cards Challenge (0) by The Game Crafter |
Black Friday Sale Ends Tonight (0) by The Game Crafter |
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