Menu
Forums
All threads
Latest threads
New posts
Trending threads
New posts
Search forums
Trending
What's new
New posts
New profile posts
Latest activity
Members
Current visitors
New profile posts
Search profile posts
Upgrades
Log in
Register
What's new
Search
Search
Search titles only
By:
All threads
Latest threads
New posts
Trending threads
New posts
Search forums
Menu
Log in
Register
Navigation
Install the app
Install
More options
Contact us
Close Menu
Forums
Server Development
Habbo Retros
Habbo Q&A
News Title not Selected
JavaScript is disabled. For a better experience, please enable JavaScript in your browser before proceeding.
You are using an out of date browser. It may not display this or other websites correctly.
You should upgrade or use an
alternative browser
.
Reply to thread
Message
<blockquote data-quote="Detox" data-source="post: 388309" data-attributes="member: 596"><p>That doesn't fix it. I know selected is in my CSS fine because when I used this code.</p><p></p><p>[SPOILER][PHP]</p><p><?php</p><p> {</p><p> for ($i = 0; $i < 6; $i++)</p><p> {</p><p> $sectionName = "";</p><p> $sectionCutoffMax = 0;</p><p> $sectionCutoffMin = 0;</p><p> </p><p> switch ($i)</p><p> {</p><p> case 0:</p><p> </p><p> $sectionName = 'Today';</p><p> $sectionCutoffMax = time();</p><p> $sectionCutoffMin = time() - 86400;</p><p> break;</p><p> </p><p> case 1:</p><p> </p><p> $sectionName = 'Yesterday';</p><p> $sectionCutoffMax = time() - 86400;</p><p> $sectionCutoffMin = time() - 172800;</p><p> break;</p><p> </p><p> case 2:</p><p> </p><p> $sectionName = 'This week';</p><p> $sectionCutoffMax = time() - 172800;</p><p> $sectionCutoffMin = time() - 604800;</p><p> break;</p><p> </p><p> case 3:</p><p> </p><p> $sectionName = 'Last week';</p><p> $sectionCutoffMax = time() - 604800;</p><p> $sectionCutoffMin = time() - 1209600;</p><p> break;</p><p> </p><p> case 4:</p><p> </p><p> $sectionName = 'This month';</p><p> $sectionCutoffMax = time() - 1209600;</p><p> $sectionCutoffMin = time() - 2592000;</p><p> break;</p><p> </p><p> case 5:</p><p> </p><p> $sectionName = 'Last month';</p><p> $sectionCutoffMax = time() - 2592000;</p><p> $sectionCutoffMin = time() - 5184000;</p><p> break;</p><p> }</p><p> </p><p> $q = "SELECT * FROM cms_news WHERE published >= " . $sectionCutoffMin . " AND published <= " . $sectionCutoffMax . " ORDER BY published DESC";</p><p> $getArticles = mysql_query($q);</p><p> if (mysql_num_rows($getArticles) > 0)</p><p> {</p><p> echo '<h2>' . $sectionName . '</h2>';</p><p> </p><p> while ($a = mysql_fetch_assoc($getArticles))</p><p> {</p><p> if($a['id'] == $_GET['id'])</p><p> {</p><p> echo '' . $a['title'] . '&nbsp;&raquo;';</p><p> }</p><p> else</p><p> {</p><p> echo '<li><a href="/index.php?url=news&id=' . $a['id'] . '">' . $a['title'] . '&nbsp;&raquo;</a></li>';</p><p> }</p><p> }</p><p> }</p><p> }</p><p> }</p><p>?></p><p>[/PHP][/SPOILER]</p><p></p><p>I get this</p><p></p><p><img src="http://i66.tinypic.com/288mheb.png" alt="" class="fr-fic fr-dii fr-draggable " style="" /></p><p></p><p>With the spacing all messed up a little compare to my other images</p><p></p><p>But when I used this code (original)</p><p></p><p>[SPOILER][PHP]</p><p></p><p><?php</p><p></p><p>$subNavigatorID = 2;</p><p>require_once ('includes/subnavi.php');</p><p></p><p>?></p><p> </ul></p><p> </div></p><p> </div></p><p> <div id="container"></p><p> <div id="content" style="position: relative" class="clearfix"></p><p> <div id="column1" class="column"></p><p> <div class="habblet-container "></p><p> <div class="cbb clearfix default "></p><p> <h2 class="title">News</h2></p><p> <div id="article-archive"></p><p> </ul> </p><p></p><p><?php</p><p> for ($i = 0; $i < 6; $i++)</p><p> {</p><p> $sectionName = '';</p><p> $sectionCutoffMax = 0;</p><p> $sectionCutoffMin = 0;</p><p> </p><p> switch ($i)</p><p> {</p><p> case 0:</p><p> </p><p> $sectionName = 'Today';</p><p> $sectionCutoffMax = time();</p><p> $sectionCutoffMin = time() - 86400;</p><p> break;</p><p> </p><p> case 1:</p><p> </p><p> $sectionName = 'Yesterday';</p><p> $sectionCutoffMax = time() - 86400;</p><p> $sectionCutoffMin = time() - 172800;</p><p> break;</p><p> </p><p> case 2:</p><p> </p><p> $sectionName = 'This week';</p><p> $sectionCutoffMax = time() - 172800;</p><p> $sectionCutoffMin = time() - 604800;</p><p> break;</p><p> </p><p> case 3:</p><p> </p><p> $sectionName = 'Last week';</p><p> $sectionCutoffMax = time() - 604800;</p><p> $sectionCutoffMin = time() - 1209600;</p><p> break;</p><p> </p><p> case 4:</p><p> </p><p> $sectionName = 'This month';</p><p> $sectionCutoffMax = time() - 1209600;</p><p> $sectionCutoffMin = time() - 2592000;</p><p> break;</p><p> </p><p> case 5:</p><p> </p><p> $sectionName = 'Last month';</p><p> $sectionCutoffMax = time() - 2592000;</p><p> $sectionCutoffMin = time() - (60 * 60 * 24 * 365);</p><p> break;</p><p> }</p><p> </p><p> $q = "SELECT * FROM cms_news WHERE published >= " . $sectionCutoffMin . " AND published <= " . $sectionCutoffMax . " ORDER BY published DESC LIMIT 50";</p><p> $getArticles = mysql_query($q);</p><p></p><p> if (mysql_num_rows($getArticles) > 0)</p><p> {</p><p> echo '<h2>' . $sectionName . '</h2></p><p> <ul>';</p><p></p><p> while ($a = mysql_fetch_assoc($getArticles))</p><p> {</p><p>?></p><p> <li></p><p> <?php</p><p>if($news_id !== $a['id'])</p><p>{</p><p> echo "<a href='".$path."/news/".$a['id']."' class='article-".$a['id']." select'>";</p><p>}</p><p>?></p><p> <?php echo $a['title'];?>&nbsp;&raquo;</a></p><p> <?php if($news_id !== $a['id']){ echo"</a>"; } ?></li></p><p> <?php }</p><p>echo '</p><p></ul></p><p>';</p><p> }</p><p> }</p><p></p><p>?></p><p>[/PHP][/SPOILER]</p><p></p><p>I get this cleaner look without the selected</p><p></p><p><img src="http://i68.tinypic.com/xnwzuv.jpg" alt="" class="fr-fic fr-dii fr-draggable " style="" /></p><p></p><p>I hope all of this is making sense.</p></blockquote><p></p>
[QUOTE="Detox, post: 388309, member: 596"] That doesn't fix it. I know selected is in my CSS fine because when I used this code. [SPOILER][PHP] <?php { for ($i = 0; $i < 6; $i++) { $sectionName = ""; $sectionCutoffMax = 0; $sectionCutoffMin = 0; switch ($i) { case 0: $sectionName = 'Today'; $sectionCutoffMax = time(); $sectionCutoffMin = time() - 86400; break; case 1: $sectionName = 'Yesterday'; $sectionCutoffMax = time() - 86400; $sectionCutoffMin = time() - 172800; break; case 2: $sectionName = 'This week'; $sectionCutoffMax = time() - 172800; $sectionCutoffMin = time() - 604800; break; case 3: $sectionName = 'Last week'; $sectionCutoffMax = time() - 604800; $sectionCutoffMin = time() - 1209600; break; case 4: $sectionName = 'This month'; $sectionCutoffMax = time() - 1209600; $sectionCutoffMin = time() - 2592000; break; case 5: $sectionName = 'Last month'; $sectionCutoffMax = time() - 2592000; $sectionCutoffMin = time() - 5184000; break; } $q = "SELECT * FROM cms_news WHERE published >= " . $sectionCutoffMin . " AND published <= " . $sectionCutoffMax . " ORDER BY published DESC"; $getArticles = mysql_query($q); if (mysql_num_rows($getArticles) > 0) { echo '<h2>' . $sectionName . '</h2>'; while ($a = mysql_fetch_assoc($getArticles)) { if($a['id'] == $_GET['id']) { echo '' . $a['title'] . ' »'; } else { echo '<li><a href="/index.php?url=news&id=' . $a['id'] . '">' . $a['title'] . ' »</a></li>'; } } } } } ?> [/PHP][/SPOILER] I get this [IMG]http://i66.tinypic.com/288mheb.png[/IMG] With the spacing all messed up a little compare to my other images But when I used this code (original) [SPOILER][PHP] <?php $subNavigatorID = 2; require_once ('includes/subnavi.php'); ?> </ul> </div> </div> <div id="container"> <div id="content" style="position: relative" class="clearfix"> <div id="column1" class="column"> <div class="habblet-container "> <div class="cbb clearfix default "> <h2 class="title">News</h2> <div id="article-archive"> </ul> <?php for ($i = 0; $i < 6; $i++) { $sectionName = ''; $sectionCutoffMax = 0; $sectionCutoffMin = 0; switch ($i) { case 0: $sectionName = 'Today'; $sectionCutoffMax = time(); $sectionCutoffMin = time() - 86400; break; case 1: $sectionName = 'Yesterday'; $sectionCutoffMax = time() - 86400; $sectionCutoffMin = time() - 172800; break; case 2: $sectionName = 'This week'; $sectionCutoffMax = time() - 172800; $sectionCutoffMin = time() - 604800; break; case 3: $sectionName = 'Last week'; $sectionCutoffMax = time() - 604800; $sectionCutoffMin = time() - 1209600; break; case 4: $sectionName = 'This month'; $sectionCutoffMax = time() - 1209600; $sectionCutoffMin = time() - 2592000; break; case 5: $sectionName = 'Last month'; $sectionCutoffMax = time() - 2592000; $sectionCutoffMin = time() - (60 * 60 * 24 * 365); break; } $q = "SELECT * FROM cms_news WHERE published >= " . $sectionCutoffMin . " AND published <= " . $sectionCutoffMax . " ORDER BY published DESC LIMIT 50"; $getArticles = mysql_query($q); if (mysql_num_rows($getArticles) > 0) { echo '<h2>' . $sectionName . '</h2> <ul>'; while ($a = mysql_fetch_assoc($getArticles)) { ?> <li> <?php if($news_id !== $a['id']) { echo "<a href='".$path."/news/".$a['id']."' class='article-".$a['id']." select'>"; } ?> <?php echo $a['title'];?> »</a> <?php if($news_id !== $a['id']){ echo"</a>"; } ?></li> <?php } echo ' </ul> '; } } ?> [/PHP][/SPOILER] I get this cleaner look without the selected [IMG]http://i68.tinypic.com/xnwzuv.jpg[/IMG] I hope all of this is making sense. [/QUOTE]
Insert quotes…
Verification
Post reply
Forums
Server Development
Habbo Retros
Habbo Q&A
News Title not Selected
Top