1 papzadsl Dec 14, 2005 18:53
3 papzadsl Dec 14, 2005 19:15
Hail Yabba The Omnipresent,
here it is the code you requested (or you have requested?):
<?php
/**
* This is the template that displays the linkblog
*
* This file is not meant to be called directly.
* It is meant to be called by an include in the _main.php template.
*
* b2evolution - {@link http://b2evolution.net/}
* Released under GNU GPL License - {@link http://b2evolution.net/about/license.html}
* @copyright (c)2003-2005 by Francois PLANQUE - {@link http://fplanque.net/}
*
* @package evoskins
* @subpackage custom
*/
if( !defined('EVO_MAIN_INIT') ) die( 'Please, do not access this page directly.' );
# maximum number of linkblog entries to display:
if(!isset($linkblog_limit)) $linkblog_limit = 20;
# global linkblog delimiters:
if(!isset($linkblog_main_start)) $linkblog_main_start = '<div class="postBox"><div class="boxTop">'.T_('Linkblog').'</div>';
if(!isset($linkblog_main_end)) $linkblog_main_end = '</div>';
# Category delimiters:
if(!isset($linkblog_catname_before)) $linkblog_catname_before = '<h4>';
if(!isset($linkblog_catname_after)) $linkblog_catname_after = '</h4><ul>';
if(!isset($linkblog_catlist_end)) $linkblog_catlist_end = '</ul>';
# Item delimiters:
if(!isset($linkblog_item_before)) $linkblog_item_before = '<li>';
if(!isset($linkblog_item_after)) $linkblog_item_after = '</li>';
/**
* This skin has no special formatting for the linkblog, so...
* However you can replace this file with the full handler (in /blogs) and customize it!
* all we want to do here, is call the default linkblog handler.
*/
require get_path('skins').'_linkblog.php';
?>
I pasted the original one, without the modify I wrote about in the former post.
*UPDATE*
I almost solved my problem by modifying the code this way:
<?php
/**
* This is the template that displays the linkblog
*
* This file is not meant to be called directly.
* It is meant to be called by an include in the _main.php template.
*
* b2evolution - {@link http://b2evolution.net/}
* Released under GNU GPL License - {@link http://b2evolution.net/about/license.html}
* @copyright (c)2003-2005 by Francois PLANQUE - {@link http://fplanque.net/}
*
* @package evoskins
*/
if( !defined('EVO_MAIN_INIT') ) die( 'Please, do not access this page directly.' );
if( !isset( $linkblog ) )
{ // No link blog explicitely specified, we use default:
$linkblog = $Blog->get('links_blog_ID');
}
if( ! $linkblog )
{ // No linkblog blog requested for this blog
return;
}
# maximum number of linkblog entries to display:
if(!isset($linkblog_limit)) $linkblog_limit = 20;
# global linkblog delimiters:
if(!isset($linkblog_main_start)) $linkblog_main_start = '<div class="postBox"><div class="boxTop">'.T_('Linkblog').'</div><p>';
if(!isset($linkblog_main_end)) $linkblog_main_end = '</p></div>';
# Category delimiters:
if(!isset($linkblog_catlist_start)) $linkblog_catlist_start = '<ul>';
if(!isset($linkblog_catlist_end)) $linkblog_catlist_end = '</ul><br />';
# Item delimiters:
if(!isset($linkblog_item_before)) $linkblog_item_before = '<li>';
if(!isset($linkblog_item_after)) $linkblog_item_after = '</li>';
// --- //
// Load the linkblog blog:
$LinkblogList = & new ItemList( $linkblog, array(), '', '', '', $linkblog_cat, $linkblog_catsel, '', 'ASC',
'main_cat_ID title', $linkblog_limit, '', '', '', '', '', '', '',
'posts', $timestamp_min, $timestamp_max );
// Dirty trick until we get everything into objects:
$saved_blog = $blog;
$blog = $linkblog;
// Open the global list
echo $linkblog_main_start;
$previous_cat = '';
$linkblog_cat = '';
while( $Item = $LinkblogList->get_category_group() )
{
while( $Item = $LinkblogList->get_item() )
{
echo $linkblog_item_before;
$Item->title();
?>
<?php
echo $linkblog_item_after;
}
// Close cat
echo $linkblog_catlist_end;
}
// Close the global list
echo $linkblog_main_end;
// Restore after dirty trick:
$blog = $saved_blog;
?>
This returns a perfect layout on firefox, and some little spacing problem on IE. Since I use firefox and invite my visitors to do the same, it isn't a major problem. Anyway, any help will be (obviously) appreciated.
Francesco
4 yabba Dec 15, 2005 13:10
Hi Francesco,
If you copy linkblog.php from your leaf skin it will work the same way ;)
¥
lol, hi Francesco, post the code from your linkblog.php ?
¥