Forum ID'ye göre işlem yapmak

phpBB 3.0.x sürümleri için MODlar hakkında ihtiyacınız olan desteği buradan sorarak alabilirsiniz.
Forum kuralları
- Yeni bir başlık açarken lütfen konu başlığına "Acil yardım", "Acele yardım" tarzlarında içerisinde "yardım" kelimesi geçen cümleler yazmayınız. Bu tip başlıklara kesinlikle cevap verilmeyecektir. Lütfen konu başlığına içeriği en iyi özetleyen anlaşılabilir bir cümle yazınız.

- Ayrıca yeni başlıklarınızı kesinlikle ilgili forumlara açınız. Örneğin, phpBB3 kurulum ve çalıştırması hakkında bir sorununuz varsa "3.0.x Destek Forumu" forumuna başlık açınız; phpBB3 temasından kaynaklı bir sorunuz varsa "3.0.x Stil/Tema Geliştirme & Tartışma & Yardım" forumuna başlık açınız; phpBB3 mod/eklentileriyle ilgili sorununuz varsa "3.0.x MOD Destek" forumuna başlık açınız. Bu kurala uymayan kullanıcıların başlıkları silinebilir ve kullanıcı uyarı alabilir ya da süresiz uzaklaştırılabilir.

- Site kurallarımızı okumadan kesinlikle forumlarımıza herhangi bir katılım yapmayınız.
Kilitli
tUQE
Kayıtlı Kullanıcı
Mesajlar: 151
Kayıt: 14.08.2011, 21:13

Forum ID'ye göre işlem yapmak

Mesaj gönderen tUQE »

Arkadaşlar merhaba,

Harici bir sayfada, phpbb modları ile son konular çektiriyorum.
İşte haberler, duyurular vs.
Forum resmi olarak eklediğim resimleri, php kodu aracılığıyla css kodlarını kullanarak harici sayfamda göstermek istiyorum.

functions_display.php sayfasından aşağıdaki forum resimleri için gerekli kodu aldım ama kendi php sayfama entegre etmeyi başaramadım.

Yardımcı olursanız sevinirim.
Forum Resminin kodu

Kod: Tümünü seç

'FORUM_IMAGE'			=> ($row['forum_image']) ? '<img src="' . $phpbb_root_path . $row['forum_image'] . '" alt="' . $user->lang[$folder_alt] . '" />' : '',
Sayfa kodlarımın tamamı:

Kod: Tümünü seç

<?php

if (!defined('IN_PHPBB') or !defined('IN_PORTAL'))
{
	die('Hacking attempt');
	exit;
}

/**
*/



//
// Fetch Posts for news from portal/includes/functions.php
//

if (!isset($HTTP_GET_VARS['article']))
{
	$fetch_news = phpbb_fetch_posts($config['portal_news_forum'], $config['portal_number_of_news'], $config['portal_news_length'], 0, ($config['portal_show_all_news']) ? 'news_all' : 'news');
	
	if (count($fetch_news) == 0)
	{
		$template->assign_block_vars('news_row', array(
			'S_NO_TOPICS'	=> true,
			'S_NOT_LAST'	=> false
		));
	}
	else
	{
		for ($i = 0; $i < count($fetch_news); $i++)
		{
	      	if( isset($fetch_news[$i]['striped']) && $fetch_news[$i]['striped'] == true )
	      	{
				$open_bracket = '[ ';
				$close_bracket = ' ]';
				$read_full = $user->lang['READ_FULL'];
			}
			else
			{
	      	      $open_bracket = '';
	      	      $close_bracket = '';
	      	      $read_full = '';
			}
			
			$template->assign_block_vars('news_row', array(
				'ATTACH_ICON_IMG'	=> ($fetch_news[$i]['attachment']) ? $user->img('icon_attach', $user->lang['TOTAL_ATTACHMENTS']) : '',
				'TITLE'				=> $fetch_news[$i]['topic_title'],
				'POSTER'			=> $fetch_news[$i]['username'],
				'U_USER_PROFILE'	=> (($fetch_news[$i]['user_type'] == USER_NORMAL || $fetch_news[$i]['user_type'] == USER_FOUNDER) && $fetch_news[$i]['user_id'] != ANONYMOUS) ? append_sid("{$phpbb_root_path}memberlist.$phpEx", 'mode=viewprofile&u=' . $fetch_news[$i]['user_id']) : '',
				'TIME'				=> $fetch_news[$i]['topic_time'],
				'TEXT'				=> $fetch_news[$i]['post_text'],
				'REPLIES'			=> $fetch_news[$i]['topic_replies'],
				'TOPIC_VIEWS'		=> $fetch_news[$i]['topic_views'],
				'U_LAST_COMMENTS'	=> $phpbb_root_path . 'viewtopic.' . $phpEx . '?t=' . $fetch_news[$i]['topic_id'] . '&p=' . $fetch_news[$i]['topic_last_post_id'] . '#p' . $fetch_news[$i]['topic_last_post_id'],
				'U_VIEW_COMMENTS'	=> append_sid($phpbb_root_path . 'viewtopic.' . $phpEx . '?t=' . $fetch_news[$i]['topic_id'] . '&f=' . $fetch_news[$i]['forum_id']),
				'U_POST_COMMENT'	=> append_sid($phpbb_root_path . 'posting.' . $phpEx . '?mode=reply&t=' . $fetch_news[$i]['topic_id'] . '&f=' . $fetch_news[$i]['forum_id']),
				'U_READ_FULL'		=> append_sid($_SERVER['PHP_SELF'] . '?article=' . $i),
				'L_READ_FULL'		=> $read_full,
				'OPEN'				=> $open_bracket,
				'CLOSE'				=> $close_bracket,
				'S_NOT_LAST'		=> ($i < count($fetch_news) - 1) ? true : false,
				'S_POLL'			=> $fetch_news[$i]['poll'],
				'MINI_POST_IMG'		=> $user->img('icon_post_target', 'POST'),
			));
		}
	}
}
else
{
	$fetch_news = phpbb_fetch_posts($config['portal_news_forum'], $config['portal_number_of_news'], 0, 0, ($config['portal_show_all_news']) ? 'news_all' : 'news');

	$i = intval($HTTP_GET_VARS['article']);

	$template->assign_block_vars('news_row', array(
		'ATTACH_ICON_IMG'	=> ($fetch_news[$i]['attachment']) ? $user->img('icon_attach', $user->lang['TOTAL_ATTACHMENTS']) : '',
		'TITLE'				=> $fetch_news[$i]['topic_title'],
		'POSTER'			=> $fetch_news[$i]['username'],
		'TIME'				=> $fetch_news[$i]['topic_time'],
		'TEXT'				=> $fetch_news[$i]['post_text'],
		'REPLIES'			=> $fetch_news[$i]['topic_replies'],
		'TOPIC_VIEWS'		=> $fetch_news[$i]['topic_views'],
		'U_LAST_COMMENTS'	=> $phpbb_root_path . 'viewtopic.' . $phpEx . '?t=' . $fetch_news[$i]['topic_id'] . '&p=' . $fetch_news[$i]['topic_last_post_id'] . '#p' . $fetch_news[$i]['topic_last_post_id'],
		'U_VIEW_COMMENTS'	=> append_sid($phpbb_root_path . 'viewtopic.' . $phpEx . '?t=' . $fetch_news[$i]['topic_id'] . '&f=' . $fetch_news[$i]['forum_id']),
		'U_POST_COMMENT'	=> append_sid($phpbb_root_path . 'posting.' . $phpEx . '?mode=reply&t=' . $fetch_news[$i]['topic_id'] . '&f=' . $fetch_news[$i]['forum_id']),
		'S_POLL'			=> $fetch_news[$i]['poll']
	));
}

// Assign specific vars
$template->assign_vars(array(
	'S_DISPLAY_NEWS' => true,
));

?>
Kilitli

“3.0.x MOD Destek” sayfasına dön

Kimler çevrimiçi

Bu forumu görüntüleyen kullanıcılar: Hiç bir kayıtlı kullanıcı yok ve 6 misafir