Seite 1 von 1

Slash News Mod - Älteste Beiträge zuerst anzeigen

Verfasst: 13.06.2007 18:41
von Tommy_65428
Hallo zusammen. Ich bräuchte mal jemanden der mir mal helfen kann, die News Beiträge im Portal "verkehrt" rum anzuzeigen. Also die ältesten zuerst und die neusten zuletzt.

Der News Abschnitt ist dieser hier:

Code: Alles auswählen

//\\ 
//\\ End - vgan's Portal Poll Mod V. 2.0
//\\ 

if ( ($plus_config['show_shoutbox'] == 1 || $plus_config['show_shoutbox'] == 3 ) || ( ($plus_config['show_shoutbox'] == 2 || $plus_config['show_shoutbox'] == 4 ) && ( $userdata['session_user_id'] != ANONYMOUS ) ) )
{
        $template->assign_block_vars('switch_show_shoutbox', array());
}

include($phpbb_root_path . 'mods/netclectic/mini_cal/mini_cal.'.$phpEx); 

$template->assign_vars(array( 
"TELL_LINK" => append_sid("http://".$HTTP_SERVER_VARS['HTTP_HOST'].$HTTP_SERVER_VARS['PHP_SELF']."?t=$topic_id", true)));

$content =& new NewsModule( $phpbb_root_path ); 

$content->setVariables( array( 
    'L_INDEX' => $lang['Index'], 
    'L_CATEGORIES' => $lang['Categories'], 
    'L_ARCHIVES' => $lang['Archives'] 
    ) ); 

if( (isset( $_GET['news']  ) && $_GET['news'] == 'categories')) 
{ 
	// View the news categories. 
	$data_access = new NewsDataAccess( $phpbb_root_path );
	$news_cats = $data_access->fetchCategories( );
	$template->assign_block_vars('news_categories', array());
	$cats = count($news_cats);
	
	if ($cats == 0)
	{
		$template->assign_block_vars('no_news', array());
	}
	
	for ($i = 0; $i < count($news_cats); $i += $plus_config['cols_per_page'])
	{
		if ($cats >0)
		{
			$template->assign_block_vars('newsrow', array());
		}
		for ($j = $i; $j < ($i + $plus_config['cols_per_page']); $j++)
		{
			if( $j >= count($news_cats) )
			{
				break;
			}
			$template->assign_block_vars('newsrow.newscol', array(
				'THUMBNAIL' => $N_this->root_path . 'templates/'.$theme['template_name'].'/images/news/' . $news_cats[$j]['news_image'],
				'ID' => $news_cats[$j]['news_id'],
				'DESC' => $news_cats[$j]['news_category'],
				)
			);	
			$template->assign_block_vars('newsrow.news_detail', array(
				'NEWSCAT' => $news_cats[$j]['news_category'],
				'CATEGORY' => $newsrow[$j]['news_category']
				)
			);
		}
	}			
} 
elseif( isset( $_GET['news']  ) && $_GET['news'] == 'archives' ) 
{ 
  // View the news Archives. 
  $year   = (isset( $_GET['year'] )) ? intval($_GET['year']) : 0; 
  $month  = (isset( $_GET['month'] )) ? intval($_GET['month']) : 0; 
  $day    = (isset( $_GET['day'] )) ? intval($_GET['day']) : 0; 
  $key    = (isset( $_GET['key'] )) ? $_GET['key'] : ''; 
  
  $template->assign_block_vars('news_archives', array());
  $content->setVariables( array( 'TITLE' => $lang['News'] . ' ' . $lang['Archives'] ) ); 
  $content->renderArchives( $year, $month, $day, $key ); 
  
} 
elseif (isset ($_GET['topic_id']) || $_GET['cat_id'])
{
	$topic_id = 0; 
  if( isset( $_GET['topic_id'] ) ) 
  { 
    $topic_id = intval($_GET['topic_id']); 
  } 
  elseif( isset( $_GET['news_id'] ) ) 
  { 
    $topic_id = intval($_GET['news_id']); 
  }
  
  $content->setVariables( array( 'TITLE' => $lang['News'] . ' ' . $lang['Articles'] ) ); 
  $content->renderArticles( $topic_id ); 
}
else 
{ 
  // View news articles. 
  $topic_id = 0; 
  if( isset( $_GET['topic_id'] ) ) 
  { 
    $topic_id = intval($_GET['topic_id']); 
  } 
  elseif( isset( $_GET['news_id'] ) ) 
  { 
    $topic_id = intval($_GET['news_id']); 
  } 
  $template->assign_block_vars('welcome_text', array());
  $content->setVariables( array( 'TITLE' => $lang['News'] . ' ' . $lang['Articles'] ) ); 
  $content->renderArticles( $topic_id ); 
} 

$content->renderPagination( ); 

$content->display( ); 
$content->clear( ); 

//
// Generate the page
//
Ich steh echt auf´m Schlauch :oops:

Verfasst: 14.06.2007 19:04
von Tommy_65428
*reinschleich*
*schieb*
*versteckel*