Recent Topics

1 Jul 12, 2007 04:37    

My b2evolution Version: 1.9.x

I'm trying to get a box (a border on each side) around each individual post. Instead, whatever I do just gives me a border around the whole group of posts. I tried messing with my coding, but the most I'm able to do is get a box around the first post, lol. It's a two column layout (posts and content on the left, side bar on the right). I was able to do this before, but that was on some outdated skin (I know, bad me!) and it's been a while since I started a skin or template from scratch. Here's the section for my posts, if you need the full code I'll post the rest. :D Thanks!

<div id="left" style="position:absolute; top:50px; left:10px; width: 100%; height: 80%; background: none; z-index:1;">
<img src="http://driven.purrmeow.net/images/ambitionscomingsoon.jpg" />

<div id="content" style="text-align: left;">

<div style="border-style: solid;
border-color: #000000;
border-top-width: 1px;
border-bottom-width: 1px;
border-left-width: 1px;
border-right-width: 1px;
padding-left: 3px;
padding-top: 2px;
padding-right: 2px;">
<?php // ----------------------------------- START OF POSTS ------------------------------------
if( isset($MainList) ) $MainList->display_if_empty(); // Display message if no post

if( isset($MainList) ) while( $Item = & $MainList->get_item() )
{
// Load Item's creator User:
$Item->get_creator_User();
locale_temp_switch( $Item->locale ); // Temporarily switch to post locale
?>
<p align="right" style="font-size: 8pt;"><a href="<?php $Item->permanent_url() ?>">Link</a></p>
<div class="storyTitle">
<?php $Item->anchor(); ?>
<?php $Item->title(); ?>
<br /><?php $Item->issue_date(); ?> @ <?php $Item->issue_time() ?>
<br />
</div>

<div class="storyContent">
<?php $Item->content(); ?>

<div class="rightFlush">
<?php link_pages() ?>
<br /><br />
<?php $Item->feedback_link( 'comments' ) // Link to comments ?>
<?php $Item->feedback_link( 'trackbacks', ' &bull; ' ) // Link to trackbacks ?>
<?php $Item->feedback_link( 'pingbacks', ' &bull; ' ) // Link to trackbacks ?>

<?php $Item->edit_link( ' &bull; ' ) // Link to backoffice for editing ?>

<?php $Item->trackback_rdf() // trackback autodiscovery information ?>

<?php
// THIS is an example of how to display unmixed comments, trackbacks and pingbacks.
// doing it old b2 style :>>

// this includes the comments and a form to add a new comment
$disp_comments = 1; // Display the comments if requested
$disp_comment_form = 1; // Display the comments form if comments requested
$disp_trackbacks = 0; // Display the trackbacks if requested
$disp_trackback_url = 0; // Display the trackbal URL if trackbacks requested
$disp_pingbacks = 0; // Don't Display the pingbacks if requested
$disp_title = "Comments:";
require( dirname(__FILE__).'/_feedback.php' );

// this includes the trackbacks
$disp_comments = 0; // Display the comments if requested
$disp_comment_form = 0; // Display the comments form if comments requested
$disp_trackbacks = 1; // Display the trackbacks if requested
$disp_trackback_url = 1; // Display the trackbal URL if trackbacks requested
$disp_pingbacks = 0; // Don't Display the pingbacks if requested
$disp_title = "Trackbacks:";
require( dirname(__FILE__).'/_feedback.php' );

// this includes the pingbacks
$disp_comments = 0; // Display the comments if requested
$disp_comment_form = 0; // Display the comments form if comments requested
$disp_trackbacks = 0; // Display the trackbacks if requested
$disp_trackback_url = 0; // Display the trackbal URL if trackbacks requested
$disp_pingbacks = 1; // Display the pingbacks if requested
$disp_title = "Pingbacks:";
require( dirname(__FILE__).'/_feedback.php' );
?>
<br />
<p align="right" style="font-size: 8pt;"> Categories: <?php $Item->categories() ?>
<br /><a href="<?php $Item->permanent_url() ?>">Link</a>
<br /><br /><?php
$Item->wordcount();
echo ' ', T_('words');
?></p>

</div>

</div>

<?php locale_restore_previous(); // Restore previous locale (Blog locale) ?>

<?php } // ---------------------------------- END OF POSTS ------------------------------------ ?>

<?php
// -------------- START OF INCLUDES FOR LAST COMMENTS, MY PROFILE, ETC. --------------
// Note: you can customize any of the sub templates included here by
// copying the matching php file into your skin directory.
$current_skin_includes_path = dirname(__FILE__).'/';
// Call the dispatcher:
require $skins_path.'_dispatch.inc.php';
// --------------- END OF INCLUDES FOR LAST COMMENTS, MY PROFILE, ETC. ---------------
?>

</div>
</div>
<div id="sidebar">

2 Jul 12, 2007 04:49

Nevermind, after three days I finally got it, lol. For future reference:

remove

<div style="border-style: solid;
border-color: #000000;
border-top-width: 1px;
border-bottom-width: 1px;
border-left-width: 1px;
border-right-width: 1px;
padding-left: 3px;
padding-top: 2px;
padding-right: 2px;">

And place it right after

$Item->get_creator_User();
locale_temp_switch( $Item->locale ); // Temporarily switch to post locale
?>

And insert two breaks right before

<?php locale_restore_previous(); // Restore previous locale (Blog locale) ?>

3 Jul 12, 2007 07:12

You can save yourself a little bit of space and combine your statements as so:

div {border:1px solid #000;padding:2px 2px 0 3px;}

jj.


Form is loading...