Topic: Portal help

I have this for my portal news:

<?php
 
define('PUN_ROOT', './');
define('PUN_QUIET_VISIT', 1);
require PUN_ROOT.'include/common.php';
 
$page_title = pun_htmlspecialchars($pun_config['o_board_title']);
define('PUN_ALLOW_INDEX', 1);
require PUN_ROOT.'header.php';
require PUN_ROOT.'include/parser.php';
 
function pun_news($fid='', $show=15, $truncate=1)
{
    global $lang_common, $db, $pun_config, $db_prefix;
    $max_subject_length = 30;
    $show_max_topics = 50;
    $fid = intval($fid);
    $order_by = 't.posted';
    $forum_sql = '';
    // Was a forum ID supplied?
    if ( $fid ) $forum_sql = 'f.id='.$fid.' AND ';
    $show = intval($show);
    if ($show < 1 || $show > $show_max_topics)
    $show = 15;
    $saveddate="";
    // Fetch $show topics
    $result = $db->query('SELECT t.id, t.poster, t.subject, t.posted, t.last_post, f.id AS fid, f.forum_name FROM '.$db_prefix.'topics AS t INNER JOIN '.$db_prefix.'forums AS f ON t.forum_id=f.id WHERE f.id='.$fid.' AND t.moved_to IS NULL ORDER BY '.$order_by.' DESC') or error('Unable to fetch topic list', __FILE__, __LINE__, $db->error());
    $show_count = 0;
    if ( !$db->num_rows($result) ) return $output;
    while ( ($show_count < $show) && ($cur_topic = $db->fetch_assoc($result)) ) {
        $temp = '';
        if ($pun_config['o_censoring'] == '1')
            $cur_topic['subject'] = censor_words($cur_topic['subject']);
        if (pun_strlen($cur_topic['subject']) > $max_subject_length)
            $subject_truncated = trim(substr($cur_topic['subject'], 0, ($max_subject_length-5))).' ...';
        else
            $subject_truncated = $cur_topic['subject'];
        $newsheading = '<a href="'.$pun_config['o_base_url'].'/viewtopic.php?id='.$cur_topic['id'].'&action=new" title="'.pun_htmlspecialchars($cur_topic['subject']).'">'.pun_htmlspecialchars($subject_truncated).'</a> - <em>Posted by '.$cur_topic['poster'].' at '.date('h:i A', $cur_topic['posted']).'</em><br>';
        // Group posts by date    
        $thisdate = date('l, d F Y', $cur_topic['posted']);
        if ($thisdate != $saveddate) 
 
        {
            if ($saveddate)
            {
                $temp .= "</div></div>";
            }
            $temp .= '<div class="block"><h2><span>'.$thisdate.'</span></h2><div class="box"><div class="inbox"><p>';
            $saveddate = $thisdate;
        }
        else {
            $temp .= '<div class="inbox"><p>';
        }
        $temp .= $newsheading.'</p><p>';
        $id = $cur_topic['id'];
        $msg = $db->query('SELECT id, poster, poster_id, poster_ip, poster_email, message, posted, edited, edited_by FROM '.$db_prefix.'posts WHERE topic_id='.$id.' LIMIT 1') or error('Unable to fetch post info', __FILE__, __LINE__, $db->error());
            if ( !$db->num_rows($msg) ) continue;
        $cur_post = $db->fetch_assoc($msg);
        // Display first paragraph only (comment out next four lines to turn off)
        if ($truncate == 1)
        {
        $paragraph = preg_split("/s*n+/", $cur_post['message']);
            if (isset($paragraph[1])) {
                $cur_post['message'] = $paragraph[0] . "...";
            }
        }
        $cur_post['message'] = parse_message($cur_post['message'], 0);
        $temp .= $cur_post['message'];
        $temp .= "</p></div>";
        if (isset($output)) {
            $output .= $temp;
        }
        else {
            $output = $temp;
        }
        ++$show_count;
    } // end of while
    $output .= "</div></div>";
    return $output;
}
?>
 
        <div class="block">
            <h2><span>Welcome</span></h2>
            <div class="box">
                <div class="inbox">
                    <p>
                    Lorem ipsum dolor sit amet, consectetuer adipiscing elit. Praesent augue. Nulla facilisi. Fusce bibendum accumsan erat. Quisque sollicitudin mattis neque. Sed dapibus. Integer a lectus eu sem consequat pellentesque. Morbi rhoncus nulla. Duis adipiscing interdum velit. Fusce ante. Ut vitae enim sit amet magna sodales hendrerit. In sed tortor at sapien convallis eleifend. Proin mauris. Pellentesque habitant morbi tristique senectus et netus et malesuada fames ac turpis egestas. Ut metus. Cras ac arcu et arcu porttitor blandit. Nam vitae lectus eget mauris sollicitudin placerat. Suspendisse vestibulum. Donec varius libero. Duis velit tellus, euismod vitae, consequat sed, consectetuer ut, purus.
                    </p>
                    <p>
                    Praesent viverra venenatis magna. Etiam in dolor. Ut in justo ac nibh malesuada cursus. Duis urna arcu, aliquam vitae, consequat nec, tincidunt non, mi. Nunc lobortis. Nunc pharetra. Sed porttitor. Maecenas turpis tortor, blandit nec, dignissim in, porttitor eu, odio. In hac habitasse platea dictumst. Suspendisse augue odio, ornare a, elementum ac, tincidunt varius, orci. Nulla libero ante, hendrerit ac, consectetuer eu, sollicitudin et, eros. Duis sapien. Suspendisse ornare enim sit amet dui. Donec ullamcorper diam.
                    </p>
                </div>
            </div>
        </div>
<?php
echo pun_news(1, 5, 0);
 
require PUN_ROOT.'footer.php';

I'm really bad at coding so can anyone help me make it the news look like: http://punbb.ofingo.com

[img]http://img90.imageshack.us/img90/746/scripter8ko.png[/img]
http://openwings.co.cc

Re: Portal help

looks like he just centered the topic
so what do ya need help with?


Q

My stuff or my style might sux, but atleast I'm willing to help when I can.
Don't be stupid and help ! We are the stupid one's !!!

Re: Portal help

I'd like to be the way he organize it:

http://img404.imageshack.us/img404/8363/picture1bg5.png
Thats how I want my news to look like, like his.

[img]http://img90.imageshack.us/img90/746/scripter8ko.png[/img]
http://openwings.co.cc

4 (edited by quaker 2007-11-25 01:40)

Re: Portal help

is that not justify? in the td or tr of the script for that topic line?

err ill have to look at the css guide and the script.


looking at ur code u have striped alot of the css from it.
ummm....

ill look at my frontpage mod and see.

Q

My stuff or my style might sux, but atleast I'm willing to help when I can.
Don't be stupid and help ! We are the stupid one's !!!

5 (edited by Tubby 2007-11-25 02:01)

Re: Portal help

All you had to do was ask me wink.

Here is the source to my current news system.

index.php:

<?php
define('PUN_INDEX', 1);
define('PUN_ROOT', './');
require PUN_ROOT.'include/common.php';
 
// Set the page title here
$page_title = pun_htmlspecialchars($pun_config['o_board_title']) . ' / Index';
define('PUN_ALLOW_INDEX', 1);
require PUN_ROOT.'header.php';
require PUN_ROOT.'include/parser.php';

// Load the forums.php language file
require PUN_ROOT.'lang/'.$pun_user['language'].'/index.php';

if($pun_user['g_id'] == PUN_GUEST) {
    echo '<div class="block"><h2 class="welcome"><span>Welcome</span></h2><div class="box"><div class="inbox"><div class="welcome_message">Welcome to the forums. You are currently considered a guest. In order to gain full access to our forum features you must be logged in. Be sure to either <a href="login.php">Login</a>, or <a href="register.php">Register</a>.</div></div></div></div>';
}

// News Information
$news_limit = '3'; 
$forum_id = '1';
$order_by = 't.posted';
// Retrieve News From Database
$db_news = $db->query('SELECT t.id, t.subject, t.num_replies, t.num_views, t.forum_id, p.topic_id, p.poster, p.poster_id, p.message, p.hide_smilies, p.id AS pid, p.posted, g.g_id, g.g_title FROM '.$db->prefix.'topics AS t INNER JOIN '.$db->prefix.'posts AS p ON t.id=p.topic_id AND p.posted=t.posted INNER JOIN '.$db->prefix.'users AS u ON u.id=p.poster_id INNER JOIN '.$db->prefix.'forums AS f ON f.id=t.forum_id  LEFT JOIN '.$db->prefix.'groups AS g ON g.g_id=u.group_id WHERE t.forum_id='.$forum_id.' AND t.moved_to IS NULL AND f.redirect_url IS NULL ORDER BY '.$order_by.' DESC LIMIT '.$news_limit) or error('Unable to fetch the news', __FILE__, __LINE__, $db->error());



if($db->num_rows($db_news))
{
    while($news = $db->fetch_assoc($db_news))
    {
        // Set Some Variables
        $message = parse_message($news['message'], $news['hide_smilies']);
        $subject = $news['subject'];
        $poster = '<span class="'.$news['g_title'].'"><a href="profile.php?id='.$news['poster_id'].'">'.$news['poster'].'</a></span>';
        $date_posted = gmdate('F jS, Y', $news['posted']);
        $news_id = $news['id'];
        if($pun_user['g_id'] == PUN_ADMIN) {
            $news_options = '<a href="viewtopic.php?id='.$news_id.'">View Post</a> | <a href="edit.php?id='.$news['pid'].'">Edit Post</a> | <a href="delete.php?id='.$news['pid'].'">Delete Post</a>';
        }
        else  
            $news_options = '<a href="viewtopic.php?id='.$news['id'].'">View Post</a>';
            
        if($pun_user['g_id'] == PUN_ADMIN) {
            $global_news_options = '<div class="block"><div class="box"><div class="inbox" style="text-align: center;"><a href="viewforum.php?id='.$news['forum_id'].'">View All News</a> | <a href="moderate.php?fid='.$news['forum_id'].'">Moderate News</a> | <a href="post.php?fid='.$news['forum_id'].'">Post News Topic</a></div></div></div>';
        }
        else if($pun_user['g_id'] != PUN_GUEST) {
            $global_news_options = '<div class="block" id="news_global_options"><div class="box"><div class="inbox" style="text-align: center;"><a href="viewforum.php?id='.$news['forum_id'].'">View All News</a></div></div></div>';
        }
        else
            $global_news_options = '';
        
        if($pun_user['g_id'] != PUN_GUEST) {
            $news_output = '<div class="blocktable" style="margin-bottom: 12px;"><h2 class="news_subject"><span>'.$subject.'</span></h2><div class="box"><div class="inbox"><table cellspacing="0"><thead><tr><th class="tcl" id="news_header">Posted By: '.$poster.' | Date Posted: '.$date_posted.'</th></tr></thead><tbody><tr><td class="tcl"><div class="news_message">'.$message.'</div></td></tr></tbody><thead><tr><th class="tcl" id="news_footer">'.$news_options.'</th></tr></thead></table></div></div></div>';
        }
        else
            $news_output = '<div class="blocktable" style="margin-bottom: 12px;"><h2 class="news_subject"><span>'.$subject.'</span></h2><div class="box"><div class="inbox"><table cellspacing="0"><thead><tr><th class="tcl" style="text-align: center;">Posted By: '.$poster.' | Date Posted: '.$date_posted.'</th></tr></thead><tbody><tr><td class="tcl"><div class="news_message">'.$message.'</div></td></tr></tbody></table></div></div></div>';
        
        echo $news_output;
    }
    echo $global_news_options;
}

// Require the footer
require PUN_ROOT.'footer.php';

Here is the css that goes along with it.

h2.news_subject, h2.welcome, #news_header, #news_footer {
    text-align: center;
}
table div.news_message, div.welcome_message {
    padding: 4px 6px;
}
#news_global_options {
    margin-bottom: 12px;
}

Re: Portal help

Thanks a lot but where do I put the css? in base?

[img]http://img90.imageshack.us/img90/746/scripter8ko.png[/img]
http://openwings.co.cc

Re: Portal help

Place it in your style_cs.css file

Re: Portal help

I put it in base.css, seems to work fine.

[img]http://img90.imageshack.us/img90/746/scripter8ko.png[/img]
http://openwings.co.cc

Re: Portal help

Now to put sidelinks tongue

[img]http://img90.imageshack.us/img90/746/scripter8ko.png[/img]
http://openwings.co.cc

10

Re: Portal help

That shouldn't be too hard. Just create a seperate template file from main.tpl, and define it in your index.php file.

Two Coloums:
Place this code in base.css:

#left {
    width: 200px;
    overflow: hidden;
    float: left;
}
#main {
    margin-left: 212px;
}

Three Coloums:
Place this code in base.css:

#left {
    width: 200px;
    overflow: hidden;
    float: left;
}
#right {
    width: 200px;
    overflow: hidden;
    float: right;
}
#main {
    margin-left: 212px;
    margin-right: 212px;
}

Then, within your new template file you can use these classifications whenever you need them.

11 (edited by Scripter 2007-11-26 22:31)

Re: Portal help

so I would do for example:
define PUN_ROOT.'include/template/portal.tpl';

Then I would put that in

#left {
    width: 200px;
    overflow: hidden;
    float: left;
}
#right {
    width: 200px;
    overflow: hidden;
    float: right;
}
#main {
    margin-left: 212px;
    margin-right: 212px;
}

But how would I write in the tpl?

[img]http://img90.imageshack.us/img90/746/scripter8ko.png[/img]
http://openwings.co.cc

12

Re: Portal help

Just put that at the very top of your portal.tpl file, i.e:

<style type="text/css">
#main
{
margin-left: 190px;
margin-right: 190px;
}
#left
{
float: left;
width: 180px;
}
#right
{
float: right;
width: 180px;
}
</style>
<pun_head>
</head>
<body>
<div id="punwrap">

Re: Portal help

I'm doing something wrong cause I get a blank index.

[img]http://img90.imageshack.us/img90/746/scripter8ko.png[/img]
http://openwings.co.cc

14

Re: Portal help

Post your complete code.

Re: Portal help

Index:

<?php
define('PUN_INDEX', 1);
define('PUN_ROOT', './');
define PUN_ROOT.'include/template/portal.tpl';
require PUN_ROOT.'include/common.php';
 
// Set the page title here
$page_title = pun_htmlspecialchars($pun_config['o_board_title']) . ' / Index';
define('PUN_ALLOW_INDEX', 1);
require PUN_ROOT.'header.php';
require PUN_ROOT.'include/parser.php';

// Load the forums.php language file
require PUN_ROOT.'lang/'.$pun_user['language'].'/index.php';

if($pun_user['g_id'] == PUN_GUEST) {
    echo '<div class="block"><h2 class="welcome"><span>Welcome</span></h2><div class="box"><div class="inbox"><div class="welcome_message">Welcome to the forums. You are currently considered a guest. In order to gain full access to our forum features you must be logged in. Be sure to either <a href="login.php">Login</a>, or <a href="register.php">Register</a>.</div></div></div></div>';
}

// News Information
$news_limit = '3'; 
$forum_id = '1';
$order_by = 't.posted';
// Retrieve News From Database
$db_news = $db->query('SELECT t.id, t.subject, t.num_replies, t.num_views, t.forum_id, p.topic_id, p.poster, p.poster_id, p.message, p.hide_smilies, p.id AS pid, p.posted, g.g_id, g.g_title FROM '.$db->prefix.'topics AS t INNER JOIN '.$db->prefix.'posts AS p ON t.id=p.topic_id AND p.posted=t.posted INNER JOIN '.$db->prefix.'users AS u ON u.id=p.poster_id INNER JOIN '.$db->prefix.'forums AS f ON f.id=t.forum_id  LEFT JOIN '.$db->prefix.'groups AS g ON g.g_id=u.group_id WHERE t.forum_id='.$forum_id.' AND t.moved_to IS NULL AND f.redirect_url IS NULL ORDER BY '.$order_by.' DESC LIMIT '.$news_limit) or error('Unable to fetch the news', __FILE__, __LINE__, $db->error());



if($db->num_rows($db_news))
{
    while($news = $db->fetch_assoc($db_news))
    {
        // Set Some Variables
        $message = parse_message($news['message'], $news['hide_smilies']);
        $subject = $news['subject'];
        $poster = '<span class="'.$news['g_title'].'"><a href="profile.php?id='.$news['poster_id'].'">'.$news['poster'].'</a></span>';
        $date_posted = gmdate('F jS, Y', $news['posted']);
        $news_id = $news['id'];
        if($pun_user['g_id'] == PUN_ADMIN) {
            $news_options = '<a href="viewtopic.php?id='.$news_id.'">View Post</a> | <a href="edit.php?id='.$news['pid'].'">Edit Post</a> | <a href="delete.php?id='.$news['pid'].'">Delete Post</a>';
        }
        else  
            $news_options = '<a href="viewtopic.php?id='.$news['id'].'">View Post</a>';
            
        if($pun_user['g_id'] == PUN_ADMIN) {
            $global_news_options = '<div class="block"><div class="box"><div class="inbox" style="text-align: center;"><a href="viewforum.php?id='.$news['forum_id'].'">View All News</a> | <a href="moderate.php?fid='.$news['forum_id'].'">Moderate News</a> | <a href="post.php?fid='.$news['forum_id'].'">Post News Topic</a></div></div></div>';
        }
        else if($pun_user['g_id'] != PUN_GUEST) {
            $global_news_options = '<div class="block" id="news_global_options"><div class="box"><div class="inbox" style="text-align: center;"><a href="viewforum.php?id='.$news['forum_id'].'">View All News</a></div></div></div>';
        }
        else
            $global_news_options = '';
        
        if($pun_user['g_id'] != PUN_GUEST) {
            $news_output = '<div class="blocktable" style="margin-bottom: 12px;"><h2 class="news_subject"><span>'.$subject.'</span></h2><div class="box"><div class="inbox"><table cellspacing="0"><thead><tr><th class="tcl" id="news_header">Posted By: '.$poster.' | Date Posted: '.$date_posted.'</th></tr></thead><tbody><tr><td class="tcl"><div class="news_message">'.$message.'</div></td></tr></tbody><thead><tr><th class="tcl" id="news_footer">'.$news_options.'</th></tr></thead></table></div></div></div>';
        }
        else
            $news_output = '<div class="blocktable" style="margin-bottom: 12px;"><h2 class="news_subject"><span>'.$subject.'</span></h2><div class="box"><div class="inbox"><table cellspacing="0"><thead><tr><th class="tcl" style="text-align: center;">Posted By: '.$poster.' | Date Posted: '.$date_posted.'</th></tr></thead><tbody><tr><td class="tcl"><div class="news_message">'.$message.'</div></td></tr></tbody></table></div></div></div>';
        
        echo $news_output;
    }
    echo $global_news_options;
}

// Require the footer
require PUN_ROOT.'footer.php';

Base.css:

/****************************************************************/

/* 1. INITIAL SETTINGS */

/****************************************************************/



.pun TABLE, .pun DIV, .pun FORM, .pun P, .pun H1, .pun H2, .pun H3,

.pun H4, .pun PRE, .pun BLOCKQUOTE, .pun UL, .pun OL, .pun LI, .pun DL,

.pun DT, .pun DD, .pun TH, .pun TD, .pun FIELDSET, .pun IMG {

    MARGIN: 0px;

    PADDING: 0px;

    FONT-WEIGHT: normal;

    LIST-STYLE: none;

}



.pun IMG {BORDER: none}



.pun INPUT, .pun SELECT, .pun TEXTAREA, .pun OPTGROUP {MARGIN: 0}



/****************************************************************/

/* 2. STRUCTURAL SETTINGS - VERY IMPORTANT - DO NOT CHANGE */

/****************************************************************/



/* 2.1 Clearing floats and invisible items */

.pun .clearer, .pun .nosize {

    HEIGHT: 0;

    WIDTH: 0;

    LINE-HEIGHT: 0;

    FONT-SIZE: 0;

    OVERFLOW: hidden

}



.pun .clearer, .pun .clearb {CLEAR: both}

.pun .nosize {POSITION: absolute; LEFT: -10000px}



/* 2.2 Overflow settings for posts */



DIV.blockpost DIV.box, DIV.postleft, DIV.postsignature, DIV.postmsg {OVERFLOW: hidden}



/****************************************************************/

/* 3. BUG FIXES - VERY IMPORTANT - DO NOT CHANGE */

/****************************************************************/



/* 3.1 This attempts to eliminate rounding errors in Gecko browsers. */



DIV>DIV>DIV.postfootleft, DIV>DIV>DIV.postfootright {PADDING-TOP: 1px; MARGIN-TOP: -1px}



/* 3.2 This is only visible to IE6 Windows and cures various bugs. Do not alter comments */



/* Begin IE6Win Fix \*/

* HTML .inbox, * HTML .inform, * HTML .pun, * HTML .intd, * HTML .tclcon {HEIGHT: 1px}

* HTML .inbox DIV.postmsg {WIDTH: 98%}

/* End of IE6Win Fix */



/* 3.3 This is the equivelant of 3.2 but for IE7. It is visible to other browsers

but does no harm */



/*Begin IE7Win Fix */

.pun, .pun .inbox, .pun .inform, .pun .intd, .pun .tclcon {min-height: 1px}

/* End of IE7Win Fix */



/****************************************************************/

/* 4. HIDDEN ELEMENTS */

/****************************************************************/



/* These are hidden in normal display. Add comments to make them visible */



#brdfooter H2, #brdstats H2, #brdstats .conl DT, #brdstats .conr DT,

#modcontrols DT, #searchlinks DT, DIV.postright H3 {

    POSITION: absolute;

    DISPLAY: block;

    OVERFLOW: hidden;

    WIDTH: 1em;

    LEFT: -999em

}



/****************************************************************/

/* 5. BOX CONTAINERS AND FLOATS */

/****************************************************************/



/* 5.1. Setup all left and right content using floats. */  



.conr {

    FLOAT: right;

    TEXT-ALIGN: right;

    CLEAR: right;

    WIDTH: 40%

}



.conl {

    FLOAT: left;

    WIDTH: 55%;

    OVERFLOW: hidden;

    WHITE-SPACE: nowrap

}



LABEL.conl {

    WIDTH: auto;

    OVERFLOW: visible;

    MARGIN-RIGHT: 10px

}



/* 5.2 Set up page numbering and posts links */



DIV.linkst .conl, DIV.linksb .conl, DIV.postlinksb .conl {WIDTH:18em}



DIV.linkst .conr, DIV.linksb .conr, DIV.postlinksb .conr {WIDTH:16em}



FORM DIV.linksb .conr {WIDTH: 32em}



/* 5.3 Keep breadcrumbs from shifting to the right when wrapping */



.linkst UL, linksb UL, .postlinksb UL {MARGIN-LEFT: 18em}



/* 5.4 Settings for Profile and Admin interface.*/



DIV.block2col {PADDING-BOTTOM: 1px}



DIV.block2col DIV.blockform, DIV.block2col DIV.block, #viewprofile DD {MARGIN-LEFT: 14em}



DIV.blockmenu, #viewprofile DT {

    FLOAT:left;

    WIDTH: 13em

}



#profileavatar IMG {

    FLOAT: right;

    MARGIN-LEFT: 1em

}



#viewprofile DL {FLOAT: left; WIDTH: 100%; OVERFLOW: hidden}



/****************************************************************/

/* 6. TABLE SETUP */

/****************************************************************/



/* 6.1 Table Basic Setup */



.pun TABLE {WIDTH: 100%}



/* 6.2 Fixed Table Setup */



#punindex TABLE, #vf TABLE {TABLE-LAYOUT: fixed}



.tcl {TEXT-ALIGN: left; WIDTH: 50%}



.tc2, .tc3, .tcmod {WIDTH: 9%; TEXT-ALIGN: center}



.tcr {WIDTH: 32%; TEXT-ALIGN: left}



#punsearch #vf .tcl, #punmoderate #vf .tcl {WIDTH: 41%}



#punsearch #vf .tc2 {WIDTH: 18%; TEXT-ALIGN: left}



.tcl, .tcr {OVERFLOW: HIDDEN}



/* 6.3 Other Table Setup */



#users1 .tcl {WIDTH: 40%}



#users1 .tcr {WIDTH: 25%}



#users1 .tc2 {WIDTH: 25%; TEXT-ALIGN: left}



#users1 .tc3 {WIDTH: 10%; TEXT-ALIGN: center}



#debug .tcr {WIDTH: 85%; WHITE-SPACE: normal}



#punindex TD.tcr SPAN.byuser {DISPLAY: block}



/****************************************************************/

/* 7. VIEWTOPIC SETUP */

/****************************************************************/



/* 7.1 This is the basic structure. */



DIV.postleft, DIV.postfootleft {

    FLOAT:left;

    WIDTH: 18em;

    OVERFLOW: hidden;

    POSITION: relative;

}

    

DIV.postright, DIV.postfootright {

    BORDER-LEFT-WIDTH: 18em;

    BORDER-LEFT-STYLE: solid

}



DIV.postfootright, P.multidelete {TEXT-ALIGN: right}



DIV.blockpost>DIV>DIV.inbox {PADDING-BOTTOM: 1px}



/* 7.3 This is the div which actually contains the post and is inside .postright */



DIV.postmsg {WIDTH:100%}



/* 7.4 These items control overflow and scrolling within posts. */



DIV.incqbox {WIDTH: 100%; OVERFLOW: hidden}

DIV.scrollbox {WIDTH: 100%; OVERFLOW: auto}

IMG.postimg {max-width: 100%}

A .postimg {max-width: 100%}



/* 7.5 Turn off the poster information column for preview */



#postpreview DIV.postright {BORDER-LEFT: none}



/* 7.6 Create the horizontal line above signatures */



DIV.postsignature HR {

    MARGIN-LEFT: 0px;

    WIDTH: 200px;

    TEXT-ALIGN: left;

    HEIGHT: 1px;

    BORDER:none

}



/* 7.7 Maximum height for search results as posts. Position go to post link */



DIV.searchposts DIV.postmsg {HEIGHT: 8em}

DIV.searchposts DD P {PADDING-TOP: 3em}



/* 7.8 Class for bbcode [u] */



SPAN.bbu {TEXT-DECORATION: underline}



/****************************************************************/

/* 8. LISTS SPECIAL SETTINGS */

/****************************************************************/



/* 8.1 Horizontal display of online list, main navigation menu and breadcrumbs */



#onlinelist DD, #onlinelist DT, #brdmenu LI, DIV.linkst LI, DIV.linksb LI, DIV.postlinksb LI,

DIV.postfootright LI, UL.bblinks LI {

    DISPLAY: inline;

    HEIGHT: 0

}



/* 8.2 Turn on square icon for posterror list */



#posterror UL LI {LIST-STYLE: square inside}



/* 8.3 Right alignment of descriptions in ordinary member view of other members profiles */



#viewprofile DT {TEXT-ALIGN: right}



/****************************************************************/

/* 9. FORM SETTINGS */

/****************************************************************/



/* 9.1 Makes textareas and long text inputs shrink with page */



DIV.txtarea {WIDTH: 75%}



DIV.txtarea TEXTAREA, INPUT.longinput {WIDTH: 100%}



.pun LABEL {DISPLAY: block}



#qjump SELECT {WIDTH: 50%}



/****************************************************************/

/* 10. HELP FILES AND MISC. */

/****************************************************************/



/* 10.1 Put some space between sections of the help file */



#helpfile H2 {MARGIN-TOP: 12px}



/* 10.2 Internal padding */



#helpfile DIV.box {PADDING: 10px}



/* 10.3 Other templates */



#punredirect DIV.block, #punmaint DIV.block {MARGIN: 50px 20% 12px 20%}



/****************************************************************/

/* 11. ARCADE STYLING. */

/****************************************************************/



#a-stats #in-a-stats {padding: 10px 5px;}

#a-stats ul li {margin-top: 2px;}

#a-stats #a-left, #a-stats #a-right {width: 20%;}

#a-stats #a-center {width: 60%;}

#a-stats table td {border: none;vertical-align: top;}

#a-stats fieldset, #a-stats #highscorechamps, #a-stats #lastesthighscore {padding: 10px;margin-bottom: 10px;} 

#a-stats #lastesthighscore {margin-bottom: 0;}

#a-stats #highscorechamps td {width: 33%;text-align: center;}

#a-stats #random {text-align: center;}

#a-stats #random img, .gameimg img {border: 1px solid #555;}

#a-stats #lastscore {padding: 10px;text-align: center;}

#gamelist table .gameimg td {border: none;}

/****************************************************************/

/* 12. PORTAL STYLING. */

/****************************************************************/

h2.news_subject, h2.welcome, #news_header, #news_footer {
    text-align: center;
}
table div.news_message, div.welcome_message {
    padding: 4px 6px;
}
#news_global_options {
    margin-bottom: 12px;
}
#left {
    width: 200px;
    overflow: hidden;
    float: left;
}
#right {
    width: 200px;
    overflow: hidden;
    float: right;
}
#main {
    margin-left: 212px;
    margin-right: 212px;
}

portal.tpl is what you told me to write.

[img]http://img90.imageshack.us/img90/746/scripter8ko.png[/img]
http://openwings.co.cc

Re: Portal help

Ugh. Change your alias.
Or at least attempt to learn HTML, CSS and PHP so you won't have to make a topic on the most trival of problems.

17

Re: Portal help

Have a read of this section of the Wiki regarding the miniportal. It should give you a good idea of all that you need to do to get it up and running. smile

http://wiki.punres.org/Miniportal

Re: Portal help

I did read http://openwings.co.nr the portal is on the bottom and I also got to know how to define the port.tpl correctly on the index.

[img]http://img90.imageshack.us/img90/746/scripter8ko.png[/img]
http://openwings.co.cc

19

Re: Portal help

Alright, take a look at your header.php file. The name of the new tpl file is supposed to be index.tpl. Be sure to rename it, and make these modificatons to your header.

In header.php

Find:

if (defined('PUN_ADMIN_CONSOLE'))
    $tpl_main = file_get_contents(PUN_ROOT.'include/template/admin.tpl');

After, add:

else if (defined('PUN_INDEX'))
    $tpl_main = file_get_contents(PUN_ROOT.'include/template/index.tpl');

Now it should call for the template file within your index.php file ( The one that has been posted ). If you run in to any problems, let me know.

20 (edited by Scripter 2007-11-29 21:06)

Re: Portal help

my navigation and More Links is on the bottom of the page.

Example: http://openwings.freeweb7.com/index.php

[img]http://img90.imageshack.us/img90/746/scripter8ko.png[/img]
http://openwings.co.cc

21

Re: Portal help

Are you surrounding the main content with the proper div tag? Inside of your index.tpl, check to make sure that you are surrounding <pun_main> with:

<div id="main">
    <pun_main>
</div>

Here is what my template file looks like ( To give you an example. )

<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">

<html xmlns="http://www.w3.org/1999/xhtml" dir="<pun_content_direction>">
<head>
<meta http-equiv="Content-Type" content="text/html; charset=<pun_char_encoding>" />
<pun_head>
</head>
<body>

<div id="punwrap">
<div id="pun<pun_page>" class="pun">

<div id="brdheader" class="block">
    <div class="box">
        <div id="brdtitle" class="inbox">
            <pun_title>
            <pun_desc>
        </div>
        <pun_navlinks>
        <pun_status>
    </div>
</div>

<div id="left">
    <pun_forum_stats>
    <pun_topics>
</div>

<div id="right">
    <pun_login>
    <pun_users>
</div>

<div id="main">
    <pun_main>
</div>

<div class="clearer"></div>

<pun_users_online>

<pun_footer>

</div>
</div>

</body>
</html>

22 (edited by Scripter 2007-11-29 21:46)

Re: Portal help

Oh I see where i went wrong, but still having trouble lol but I'll get it to work soon.
Fixed it Thanks alot.

[img]http://img90.imageshack.us/img90/746/scripter8ko.png[/img]
http://openwings.co.cc