Discover Habbo's history
Treat yourself with a Secret Santa gift.... of a random Wiki page for you to start exploring Habbo's history!
Happy holidays!
Celebrate with us at Habbox on the hotel, on our Forum and right here!
Join Habbox!
One of us! One of us! Click here to see the roles you could take as part of the Habbox community!


Results 1 to 6 of 6

Thread: RadiPanel help!

  1. #1
    Join Date
    Oct 2008
    Location
    The Milky Way
    Posts
    728
    Tokens
    0

    Latest Awards:

    Default RadiPanel help!

    I need some RadiPanel help, you see I want to only show 3 news articles in my headlines but I'm not sure how to, if anyone can help me then I'd absolutely love it!

    HTML Code:
    <?php
    	require_once( "../_inc/glob.php" );
    ?>
    <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN"
    	"http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
    <html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en">
    
    	<head>
    
    		<title>radiPanel News Archive</title>
    
    		<style type="text/css" media="screen">
    
    
    			#grey {
    	text-decoration:none;
    	color: #666;
    
    			body {
    
    				
    				padding: 0;
    				margin: 0;
    
    			}
    
    			body, a, input, select, textarea {
    
    				font-family: Verdana, Tahoma, Arial;
    				font-size: 11px;
    				color: #333;
    				text-decoration: none;
    
    			}
    
    			a:hover {
    			
    				text-decoration: underline;
    			
    			}
    
    			form {
    
    				padding: 0;
    				margin: 0;
    
    			}
    
    			.wrapper {
    
    				background-color: #fcfcfc;
    				width: 350px;
    				margin: auto;
    				padding: 5px;
    				margin-top: 15px;
    
    			}
    
    			.title {
    
    				padding: 5px;	
    				margin-bottom: 5px;
    				font-size: 14px;
    				font-weight: bold;
    				background-color: #eee;
    				color: #444;
    
    			}
    
    			.content {
    
    				padding: 5px;
    
    			}
    
    			.good, .bad {
    
    				padding: 5px;	
    				margin-bottom: 5px;
    
    			}
    
    			.good strong, .bad strong {
    
    				font-size: 12px;
    				font-weight: bold;
    
    			}
    
    			.good {
    
    				background-color: #d9ffcf;
    				border-color: #ade5a3;
    				color: #1b801b;
    
    			}
    
    			.bad {
    
    				background-color: #ffcfcf;
    				border-color: #e5a3a3;
    				color: #801b1b;
    
    			}
    
    			input, select, textarea {
    
    				border: 1px #e0e0e0 solid;
    				border-bottom-width: 2px;
    				padding: 3px;
    
    			}
    
    			input {
    
    				width: 170px;
    
    			}
    
    			input.button {
    
    				width: auto;
    				cursor: pointer;
    				background: #eee;
    
    			}
    
    			select {
    
    				width: 176px;
    
    			}
    
    			textarea {
    
    				width: 288px;
    
    			}
    
    			label {
    
    				display: block;
    				padding: 3px;
    
    			}
    
    		.good1 {
    				padding: 5px;	
    				margin-bottom: 5px;
    }
            #news {
    	font-weight: bold;
    }
            </style>
    
    	</head>
    
    	<body>
    	<?php
    					
    					if( $_GET['cat'] ) {
    						
    						$cat = " WHERE category = '" . $core->clean( $_GET['cat'] ) . "'";
    						
    					}
    					
    					$query = $db->query( "SELECT * FROM news{$cat} ORDER BY stamp DESC" );
    					$num   = $db->num( $query );
    					
    					while( $array = $db->assoc( $query ) ) {
    					
    						$time = date( "jS F Y", $array['stamp'] );
    					
    				?>
        <div id="news"><span id="news"><?php echo $time; ?> &raquo; <a id="grey" href="javascript:ajaxLoader('http://habbolido.net/staff/_frontend/news/<?php echo $array['id']; ?>','main');"><?php echo $array['title']; ?></a></span><a href="javascript:ajaxLoader('news/<?php echo $array['id']; ?>','main');"><br /><br /></a>...<?php echo $array['desc']; ?><br /><br />
        Posted at <strong><?php echo date( "H:i", $array['stamp'] ); ?></strong>.<br /><br />
        <br /><br /></div>
        <?php
    					
    					}
    				
    					if( $num == 0 ) {
    				
    				?>
        <div class="bad" style="margin-bottom: 0px;"> <strong>Sorry</strong> <br />
          There aren't any news items in this category! </div>
        <?php
    				
    					}
    				
    				?>
        </body>
    
    </html>
    Promise this
    If I die before I wake oh
    Promise this
    Take the time to say your grace
    On your knees you'll pray for me
    Promise this
    Be the last to kiss my lips...

  2. #2
    Join Date
    Jan 2008
    Location
    Wales
    Posts
    3,594
    Tokens
    1,387
    Habbo
    Skizzling

    Latest Awards:

    Default

    Make it:
    PHP Code:
    <?php
        
    require_once( "../_inc/glob.php" );
    ?>
    <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN"
        "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
    <html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en">

        <head>

            <title>radiPanel News Archive</title>

            <style type="text/css" media="screen">


                #grey {
        text-decoration:none;
        color: #666;

                body {

                    
                    padding: 0;
                    margin: 0;

                }

                body, a, input, select, textarea {

                    font-family: Verdana, Tahoma, Arial;
                    font-size: 11px;
                    color: #333;
                    text-decoration: none;

                }

                a:hover {
                
                    text-decoration: underline;
                
                }

                form {

                    padding: 0;
                    margin: 0;

                }

                .wrapper {

                    background-color: #fcfcfc;
                    width: 350px;
                    margin: auto;
                    padding: 5px;
                    margin-top: 15px;

                }

                .title {

                    padding: 5px;    
                    margin-bottom: 5px;
                    font-size: 14px;
                    font-weight: bold;
                    background-color: #eee;
                    color: #444;

                }

                .content {

                    padding: 5px;

                }

                .good, .bad {

                    padding: 5px;    
                    margin-bottom: 5px;

                }

                .good strong, .bad strong {

                    font-size: 12px;
                    font-weight: bold;

                }

                .good {

                    background-color: #d9ffcf;
                    border-color: #ade5a3;
                    color: #1b801b;

                }

                .bad {

                    background-color: #ffcfcf;
                    border-color: #e5a3a3;
                    color: #801b1b;

                }

                input, select, textarea {

                    border: 1px #e0e0e0 solid;
                    border-bottom-width: 2px;
                    padding: 3px;

                }

                input {

                    width: 170px;

                }

                input.button {

                    width: auto;
                    cursor: pointer;
                    background: #eee;

                }

                select {

                    width: 176px;

                }

                textarea {

                    width: 288px;

                }

                label {

                    display: block;
                    padding: 3px;

                }

            .good1 {
                    padding: 5px;    
                    margin-bottom: 5px;
    }
            #news {
        font-weight: bold;
    }
            </style>

        </head>

        <body>
        <?php
                        
                        
    if( $_GET['cat'] ) {
                            
                            
    $cat " WHERE category = '" $core->clean$_GET['cat'] ) . "'";
                            
                        }
                        
                        
    $query $db->query"SELECT * FROM news{$cat} ORDER BY stamp DESC LIMIT 3" );
                        
    $num   $db->num$query );
                        
                        while( 
    $array $db->assoc$query ) ) {
                        
                            
    $time date"jS F Y"$array['stamp'] );
                        
                    
    ?>
        <div id="news"><span id="news"><?php echo $time?> &raquo; <a id="grey" href="javascript:ajaxLoader('http://habbolido.net/staff/_frontend/news/<?php echo $array['id']; ?>','main');"><?php echo $array['title']; ?></a></span><a href="javascript:ajaxLoader('news/<?php echo $array['id']; ?>','main');"><br /><br /></a>...<?php echo $array['desc']; ?><br /><br />
        Posted at <strong><?php echo date"H:i"$array['stamp'] ); ?></strong>.<br /><br />
        <br /><br /></div>
        <?php
                        
                        
    }
                    
                        if( 
    $num == ) {
                    
                    
    ?>
        <div class="bad" style="margin-bottom: 0px;"> <strong>Sorry</strong> <br />
          There aren't any news items in this category! </div>
        <?php
                    
                        
    }
                    
                    
    ?>
        </body>

    </html>
    Or replace
    PHP Code:
    $query $db->query"SELECT * FROM news{$cat} ORDER BY stamp  DESC" ); 
    With
    PHP Code:
    $query $db->query"SELECT * FROM news{$cat} ORDER BY stamp DESC  LIMIT 3" ); 
    Last edited by Calvin; 01-07-2010 at 05:10 PM.

  3. #3
    Join Date
    Oct 2008
    Location
    The Milky Way
    Posts
    728
    Tokens
    0

    Latest Awards:

    Default

    Thanks but that hasn't worked D:
    Promise this
    If I die before I wake oh
    Promise this
    Take the time to say your grace
    On your knees you'll pray for me
    Promise this
    Be the last to kiss my lips...

  4. #4
    Join Date
    Oct 2007
    Posts
    824
    Tokens
    71

    Latest Awards:

    Default

    It should work after that fix. Try doing it again. Are you sure you changed the line?

  5. #5
    Join Date
    Oct 2008
    Location
    The Milky Way
    Posts
    728
    Tokens
    0

    Latest Awards:

    Default

    Sorry my mistake, was uploading wrong files thanks so much!
    Promise this
    If I die before I wake oh
    Promise this
    Take the time to say your grace
    On your knees you'll pray for me
    Promise this
    Be the last to kiss my lips...

  6. #6
    Join Date
    Jan 2008
    Location
    Wales
    Posts
    3,594
    Tokens
    1,387
    Habbo
    Skizzling

    Latest Awards:

    Default

    No problem, glad you fixed it.

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •