Fae Posted January 11, 2011 Share Posted January 11, 2011 Hello, I've just begun learning PHP and I've gotten a bit into it, but I'm nowhere near a pro. Now, I've decided to start a project that will, in my opinion, help me learn a lot. I'm just having a bit of trouble understanding exactly how to do a few things. My goal is to take the PHP forum base found here and turn it into something similar to this. I've made changes of my own to this forum base and have already finished the news posting section of it on the front page. (almost, one issue with that, more on that in a sec). I've also removed this portion: if(!$action || !in_array($action,$actions_array)){ $sql1 = "SELECT * FROM `forum_cats` WHERE `admin` < ".$row['admin']."+1"; $res1 = mysql_query($sql1) or die(mysql_error()); $i=1; while($row2 = mysql_fetch_assoc($res1)){ echo "<div id=\"fcontent\">\n"; echo " <div class=\"header\" id=\"header_".$i."\" onMouseOver=\"this.className='headerb'\" onMouseOut=\"this.className='header'\">".$row2['name']."</div>\n"; $sql2 = "SELECT * FROM `forum_sub_cats` WHERE `cid`='".$row2['id']."' AND `admin` < ".$row['admin']."+1"; $res2 = mysql_query($sql2) or die(mysql_error()); while($row3 = mysql_fetch_assoc($res2)){ echo " <div id=\"content\">\n"; echo " <a href=\"./index.php?act=forum&id=".$row3['id']."\">".$row3['name']."</a><br>\n"; echo " " . $row3['desc'] . "\n"; echo " </div>\n"; } echo "</div>\n"; $i++; } }else { from index.php so that instead of the links displayed as they would be on a forum, they can be displayed in a navbar off to the side as on the example site (this). That point leads me to my next point: the navigation bar. I'm looking to create the same sort of look (in terms of layout, not the whole.. dark design harry potter thing) as the example site, but I don't really understand how to make navbars on the sides of the whole.. news section. I just need a basic explanation of how these things can be done, but please do not give things away. After all, it is a learning experience. All help is appreciated, though! Also, let me know if you need any more information or if I was unclear. Thanks, Fae Quote Link to comment https://forums.phpfreaks.com/topic/224029-bit-of-a-new-kid-need-help-getting-started/ Share on other sites More sharing options...
QuickOldCar Posted January 11, 2011 Share Posted January 11, 2011 Lets try to simplify this. css stylesheets can place items where you exactly want and the looks in named dividers. The first link uses this as an example http://phpsquad.net/style.css The second uses this http://www.enchantedhogwarts.net/css/header.css As for the links area, all you have to do is either write the code and wrap it in a divider based on the position and style determined in the stylesheet, or can even make a new .php file lets say, navigation.php and include it. http://php.net/manual/en/function.include.php for a beginners css try here http://www.w3schools.com/css/ Quote Link to comment https://forums.phpfreaks.com/topic/224029-bit-of-a-new-kid-need-help-getting-started/#findComment-1157721 Share on other sites More sharing options...
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.