Новини

themes , модове , проблеми , инсталация
Post Reply
User avatar
nanov_91
Нов
Нов
Posts: 192
Joined: Sun Apr 30, 2006 6:58 am
Location: Мездра - Правец

Новини

Post by nanov_91 » Sun May 20, 2007 9:45 am

Как да махна новините от началната страница?

User avatar
svilkaa
Много Редовен
Много Редовен
Posts: 1601
Joined: Wed Mar 21, 2007 6:43 pm
Answers: 260
Location: Русе
Contact:

Post by svilkaa » Sun May 20, 2007 9:46 am

Админ панел -> Новини :lol:

User avatar
nanov_91
Нов
Нов
Posts: 192
Joined: Sun Apr 30, 2006 6:58 am
Location: Мездра - Правец

Post by nanov_91 » Sun May 20, 2007 9:52 am

Май не ме разбра!Искам да маха целия панел от началната страница!

User avatar
svilkaa
Много Редовен
Много Редовен
Posts: 1601
Joined: Wed Mar 21, 2007 6:43 pm
Answers: 260
Location: Русе
Contact:

Post by svilkaa » Sun May 20, 2007 10:03 am

Админ панел -> Управление на системата -> Панели :lol:

User avatar
nanov_91
Нов
Нов
Posts: 192
Joined: Sun Apr 30, 2006 6:58 am
Location: Мездра - Правец

Post by nanov_91 » Sun May 20, 2007 10:13 am

И там ги няма! :(

User avatar
svilkaa
Много Редовен
Много Редовен
Posts: 1601
Joined: Wed Mar 21, 2007 6:43 pm
Answers: 260
Location: Русе
Contact:

Post by svilkaa » Sun May 20, 2007 10:18 am

Аааа новините се махат от файла news.php ;) Там трябва да се махнат няколко реда :)

User avatar
nanov_91
Нов
Нов
Posts: 192
Joined: Sun Apr 30, 2006 6:58 am
Location: Мездра - Правец

Post by nanov_91 » Sun May 20, 2007 10:20 am

Кой???

User avatar
svilkaa
Много Редовен
Много Редовен
Posts: 1601
Joined: Wed Mar 21, 2007 6:43 pm
Answers: 260
Location: Русе
Contact:

Post by svilkaa » Sun May 20, 2007 10:27 am

Code: Select all

if (isset($readmore) && !isNum($readmore)) fallback(FUSION_SELF);

// Predefined variables, do not edit these values
if ($settings['news_style'] == "1") { $i = 0; $rc = 0; $ncount = 1; $ncolumn = 1; $news_[0] = ""; $news_[1] = ""; $news_[2] = ""; } else { $i = 1; }

// This number should be an odd number to keep layout tidy
$items_per_page = 11;

if (!isset($readmore)) {
	$rows = dbcount&#40;"&#40;news_id&#41;", "news", groupaccess&#40;'news_visibility'&#41;." AND &#40;news_start='0'||news_start<=".time&#40;&#41;."&#41; AND &#40;news_end='0'||news_end>=".time&#40;&#41;."&#41;"&#41;;
	if &#40;!isset&#40;$rowstart&#41; || !isNum&#40;$rowstart&#41;&#41; $rowstart = 0;
	if &#40;$rows != 0&#41; &#123;
		$result = dbquery&#40;
			"SELECT tn.*, tc.*, user_id, user_name FROM ".$db_prefix."news tn
			LEFT JOIN ".$db_prefix."users tu ON tn.news_name=tu.user_id
			LEFT JOIN ".$db_prefix."news_cats tc ON tn.news_cat=tc.news_cat_id
			WHERE ".groupaccess&#40;'news_visibility'&#41;." AND &#40;news_start='0'||news_start<=".time&#40;&#41;."&#41; AND &#40;news_end='0'||news_end>=".time&#40;&#41;."&#41;
			ORDER BY news_sticky DESC, news_datestamp DESC LIMIT $rowstart,$items_per_page"
		&#41;;		
		$numrows = dbrows&#40;$result&#41;;
		if &#40;$settings&#91;'news_style'&#93; == "1"&#41; $nrows = round&#40;&#40;dbrows&#40;$result&#41; - 1&#41; / 2&#41;;
		while &#40;$data = dbarray&#40;$result&#41;&#41; &#123;
			$news_cat_image = "";
			$news_subject = "<a name='news_".$data&#91;'news_id'&#93;."' id='news_".$data&#91;'news_id'&#93;."'></a>".stripslashes&#40;$data&#91;'news_subject'&#93;&#41;;
			if &#40;$data&#91;'news_cat_image'&#93;&#41; &#123;
				$news_cat_image = "<a href='news_cats.php?cat_id=".$data&#91;'news_cat_id'&#93;."'><img src='".IMAGES_NC.$data&#91;'news_cat_image'&#93;."' alt='".$data&#91;'news_cat_name'&#93;."' align='left' style='border&#58;0px;margin-top&#58;3px;margin-right&#58;5px'></a>";
			&#125; else &#123;
				$news_cat_image = "";
			&#125;
			$news_news = $data&#91;'news_breaks'&#93; == "y" ? nl2br&#40;stripslashes&#40;$data&#91;'news_news'&#93;&#41;&#41; &#58; stripslashes&#40;$data&#91;'news_news'&#93;&#41;;
			if &#40;$news_cat_image != ""&#41; $news_news = $news_cat_image.$news_news;
			$news_info = array&#40;
				"news_id" => $data&#91;'news_id'&#93;,
				"user_id" => $data&#91;'user_id'&#93;,
				"user_name" => $data&#91;'user_name'&#93;,
				"news_date" => $data&#91;'news_datestamp'&#93;, 
				"news_ext" => $data&#91;'news_extended'&#93; ? "y" &#58; "n",
				"news_reads" => $data&#91;'news_reads'&#93;,
				"news_comments" => dbcount&#40;"&#40;comment_id&#41;", "comments", "comment_type='N' AND comment_item_id='".$data&#91;'news_id'&#93;."'"&#41;,
				"news_allow_comments" => $data&#91;'news_allow_comments'&#93;
			&#41;;
			if &#40;$settings&#91;'news_style'&#93; == "1"&#41; &#123;
				if &#40;$rows <= 2 || $ncount == 1&#41; &#123;
					$news_&#91;0&#93; .= "<table width='100%' cellpadding='0' cellspacing='0'>\n";
					$news_&#91;0&#93; .= "<tr>\n<td class='tbl2'><b>$news_subject</b></td>\n</tr>\n";
					$news_&#91;0&#93; .= "<tr>\n<td class='tbl1' style='text-align&#58;justify'>$news_news</td>\n</tr>\n";
					$news_&#91;0&#93; .= "<tr>\n<td align='center' class='tbl2'>\n";
					if &#40;iSUPERADMIN && checkrights&#40;"N"&#41;&#41; $news_&#91;0&#93; .= "<form name='editnews".$news_info&#91;'news_id'&#93;."' method='post' action='".ADMIN."news.php".$aidlink."&amp;news_id=".$news_info&#91;'news_id'&#93;."'>\n";
					$news_&#91;0&#93; .= "<span class='small2'><img src='".THEME."images/bullet.gif' alt=''> <a href='profile.php?lookup=".$news_info&#91;'user_id'&#93;."'>".$news_info&#91;'user_name'&#93;."</a> ".$locale&#91;'041'&#93;.showdate&#40;"longdate", $news_info&#91;'news_date'&#93;&#41;." &middot;\n";
					if &#40;$news_info&#91;'news_ext'&#93; == "y" || $news_info&#91;'news_allow_comments'&#93;&#41; &#123;
						$news_&#91;0&#93; .= $news_info&#91;'news_ext'&#93; == "y" ? "<a href='".FUSION_SELF."?readmore=".$news_info&#91;'news_id'&#93;."'>".$locale&#91;'042'&#93;."</a> &middot;\n" &#58; "";
						$news_&#91;0&#93; .= $news_info&#91;'news_allow_comments'&#93; ? "<a href='".FUSION_SELF."?readmore=".$news_info&#91;'news_id'&#93;."'>".$news_info&#91;'news_comments'&#93;.$locale&#91;'043'&#93;."</a> &middot;\n" &#58; "";
						$news_&#91;0&#93; .= $news_info&#91;'news_reads'&#93;.$locale&#91;'044'&#93;." &middot;\n";
					&#125;
					$news_&#91;0&#93; .= "<a href='print.php?type=N&amp;item_id=".$news_info&#91;'news_id'&#93;."'><img src='".THEME."images/printer.gif' alt='".$locale&#91;'045'&#93;."' style='border&#58;0px;vertical-align&#58;middle;'></a>";
					if &#40;iSUPERADMIN && checkrights&#40;"N"&#41;&#41; &#123; $news_&#91;0&#93; .= " &middot; <input type='hidden' name='edit' value='edit'><a href='javascript&#58;document.editnews".$news_info&#91;'news_id'&#93;.".submit&#40;&#41;;'><img src='".IMAGES."edit.gif' alt='".$locale&#91;'048'&#93;."' title='".$locale&#91;'048'&#93;."' style='vertical-align&#58;middle;border&#58;0px;'></a></span>\n</form>\n"; &#125; else &#123; $news_&#91;0&#93; .= "</span>\n"; &#125;
					$news_&#91;0&#93; .= "</td>\n</tr>\n</table>\n";
					if &#40;$ncount != $rows&#41; $news_&#91;0&#93; .= "<div><img src='".THEME."images/blank.gif' alt='' width='1' height='8'></div>\n";
				&#125; else &#123;
					if &#40;$i == $nrows && $ncolumn != 2&#41; &#123; $ncolumn = 2; $i = 0; &#125;
					$row_color = &#40;$rc % 2 == 0 ? "tbl2" &#58; "tbl1"&#41;;
					$news_&#91;$ncolumn&#93; .= "<table width='100%' cellpadding='0' cellspacing='0'>\n";
					$news_&#91;$ncolumn&#93; .= "<tr>\n<td class='tbl2'><b>$news_subject</b></td>\n</tr>\n";
					$news_&#91;$ncolumn&#93; .= "<tr>\n<td class='tbl1' style='text-align&#58;justify'>$news_news</td>\n</tr>\n";
					$news_&#91;$ncolumn&#93; .= "<tr>\n<td align='center' class='tbl2'>\n";
					if &#40;iSUPERADMIN && checkrights&#40;"N"&#41;&#41; $news_&#91;$ncolumn&#93; .= "<form name='editnews".$news_info&#91;'news_id'&#93;."' method='post' action='".ADMIN."news.php".$aidlink."&amp;news_id=".$news_info&#91;'news_id'&#93;."'>\n";
					$news_&#91;$ncolumn&#93; .= "<span class='small2'><img src='".THEME."images/bullet.gif' alt=''> <a href='profile.php?lookup=".$news_info&#91;'user_id'&#93;."'>".$news_info&#91;'user_name'&#93;."</a> ".$locale&#91;'041'&#93;.showdate&#40;"longdate", $news_info&#91;'news_date'&#93;&#41;;
					if &#40;$news_info&#91;'news_ext'&#93; == "y" || $news_info&#91;'news_allow_comments'&#93;&#41; &#123;
						$news_&#91;$ncolumn&#93; .= "<br>\n";
						$news_&#91;$ncolumn&#93; .= $news_info&#91;'news_ext'&#93; == "y" ? "<a href='".FUSION_SELF."?readmore=".$news_info&#91;'news_id'&#93;."'>".$locale&#91;'042'&#93;."</a> &middot;\n" &#58; "";
						$news_&#91;$ncolumn&#93; .= $news_info&#91;'news_allow_comments'&#93; ? "<a href='".FUSION_SELF."?readmore=".$news_info&#91;'news_id'&#93;."'>".$news_info&#91;'news_comments'&#93;.$locale&#91;'043'&#93;."</a> &middot;\n" &#58; "";
						$news_&#91;$ncolumn&#93; .= $news_info&#91;'news_reads'&#93;.$locale&#91;'044'&#93;." &middot;\n";
					&#125; else &#123;
						$news_&#91;$ncolumn&#93; .= " &middot;\n";
					&#125;
					$news_&#91;$ncolumn&#93; .= "<a href='print.php?type=N&amp;item_id=".$news_info&#91;'news_id'&#93;."'><img src='".THEME."images/printer.gif' alt='".$locale&#91;'045'&#93;."' style='border&#58;0px;vertical-align&#58;middle;'></a>\n";
					if &#40;iSUPERADMIN && checkrights&#40;"N"&#41;&#41; &#123; $news_&#91;$ncolumn&#93; .= " &middot; <input type='hidden' name='edit' value='edit'><a href='javascript&#58;document.editnews".$news_info&#91;'news_id'&#93;.".submit&#40;&#41;;'><img src='".IMAGES."edit.gif' alt='".$locale&#91;'048'&#93;."' title='".$locale&#91;'048'&#93;."' style='vertical-align&#58;middle;border&#58;0px;'></a></span>\n</form>\n"; &#125; else &#123; $news_&#91;$ncolumn&#93; .= "</span>\n"; &#125;
					$news_&#91;$ncolumn&#93; .= "</td>\n</tr>\n</table>\n";
					if &#40;$ncolumn == 1 && $i < &#40;$nrows - 1&#41;&#41; $news_&#91;$ncolumn&#93; .= "<div><img src='".THEME."images/blank.gif' alt='' width='1' height='8'></div>\n";
					if &#40;$ncolumn == 2 && $i < &#40;dbrows&#40;$result&#41; - $nrows - 2&#41;&#41; $news_&#91;$ncolumn&#93; .= "<div><img src='".THEME."images/blank.gif' alt='' width='1' height='8'></div>\n";
					$i++; $rc++;
				&#125;
				$ncount++;
			&#125; else &#123;
				render_news&#40;$news_subject, $news_news, $news_info&#41;;
				if &#40;$i != $numrows&#41; &#123; tablebreak&#40;&#41;; &#125; $i++;
			&#125;
		&#125;
		if &#40;$settings&#91;'news_style'&#93; == "1"&#41; &#123;
			opentable&#40;$locale&#91;'046'&#93;&#41;;
			echo "<table cellpadding='0' cellspacing='0' style='width&#58;100%'>\n<tr>\n<td colspan='3' style='width&#58;100%'>\n";
			echo $news_&#91;0&#93;;
			echo "</td>\n</tr>\n<tr>\n<td style='width&#58;50%;vertical-align&#58;top;'>\n";
			echo $news_&#91;1&#93;;
			echo "</td>\n<td style='width&#58;10px'><img src='".THEME."images/blank.gif' alt='' width='10' height='1'></td>\n<td style='width&#58;50%;vertical-align&#58;top;'>\n";
			echo $news_&#91;2&#93;;
			echo "</td>\n</tr>\n</table>\n";
			closetable&#40;&#41;;
		&#125;
		if &#40;$rows > $items_per_page&#41; echo "<div align='center' style='margin-top&#58;5px;'>\n".makePageNav&#40;$rowstart,$items_per_page,$rows,3&#41;."\n</div>\n";
	&#125; else &#123;
		opentable&#40;$locale&#91;'046'&#93;&#41;;
		echo "<center><br>\n".$locale&#91;'047'&#93;."<br><br>\n</center>\n";
		closetable&#40;&#41;;
	&#125;
&#125; else &#123;
	include INCLUDES."comments_include.php";
	include INCLUDES."ratings_include.php";
	$result = dbquery&#40;
		"SELECT tn.*, user_id, user_name FROM ".$db_prefix."news tn
		LEFT JOIN ".$db_prefix."users tu ON tn.news_name=tu.user_id
		WHERE news_id='$readmore'"
	&#41;;
	if &#40;dbrows&#40;$result&#41;!=0&#41; &#123;
		$data = dbarray&#40;$result&#41;;
		if &#40;checkgroup&#40;$data&#91;'news_visibility'&#93;&#41;&#41; &#123;
			$news_cat_image = "";
			if &#40;!isset&#40;$_POST&#91;'post_comment'&#93;&#41; && !isset&#40;$_POST&#91;'post_rating'&#93;&#41;&#41; &#123;
				 $result2 = dbquery&#40;"UPDATE ".$db_prefix."news SET news_reads=news_reads+1 WHERE news_id='$readmore'"&#41;;
				 $data&#91;'news_reads'&#93;++;
			&#125;
			$news_subject = $data&#91;'news_subject'&#93;;
			if &#40;$data&#91;'news_cat'&#93; != 0&#41; &#123;
				$result2 = dbquery&#40;"SELECT * FROM ".$db_prefix."news_cats WHERE news_cat_id='".$data&#91;'news_cat'&#93;."'"&#41;;
				if &#40;dbrows&#40;$result2&#41;&#41; &#123;
					$data2 = dbarray&#40;$result2&#41;;
					$news_cat_image = "<a href='news_cats.php?cat_id=".$data2&#91;'news_cat_id'&#93;."'><img src='".IMAGES_NC.$data2&#91;'news_cat_image'&#93;."' alt='".$data2&#91;'news_cat_name'&#93;."' align='left' style='border&#58;0px;margin-top&#58;3px;margin-right&#58;5px'></a>";
				&#125;
			&#125;
			$news_news = stripslashes&#40;$data&#91;'news_extended'&#93; ? $data&#91;'news_extended'&#93; &#58; $data&#91;'news_news'&#93;&#41;;
			if &#40;$data&#91;'news_breaks'&#93; == "y"&#41; &#123; $news_news = nl2br&#40;$news_news&#41;; &#125;
			if &#40;$news_cat_image != ""&#41; $news_news = $news_cat_image.$news_news;
			$news_info = array&#40;
				"news_id" => $data&#91;'news_id'&#93;,
				"user_id" => $data&#91;'user_id'&#93;,
				"user_name" => $data&#91;'user_name'&#93;,
				"news_date" => $data&#91;'news_datestamp'&#93;,
				"news_ext" => "n",
				"news_reads" => $data&#91;'news_reads'&#93;,
				"news_comments" => dbcount&#40;"&#40;comment_id&#41;", "comments", "comment_type='N' AND comment_item_id='".$data&#91;'news_id'&#93;."'"&#41;,
				"news_allow_comments" => $data&#91;'news_allow_comments'&#93;
			&#41;;
			render_news&#40;$news_subject, $news_news, $news_info&#41;;
			if &#40;$data&#91;'news_allow_comments'&#93;&#41; showcomments&#40;"N","news","news_id",$readmore,FUSION_SELF."?readmore=$readmore"&#41;;
			if &#40;$data&#91;'news_allow_ratings'&#93;&#41; showratings&#40;"N",$readmore,FUSION_SELF."?readmore=$readmore"&#41;;
		&#125; else &#123;
			redirect&#40;FUSION_SELF&#41;;
		&#125;
	&#125; else &#123;
		redirect&#40;FUSION_SELF&#41;;
	&#125;
&#125;
:roll:
трябва да остане:

Code: Select all

<?php
/*---------------------------------------------------+
| PHP-Fusion 6 Content Management System
+----------------------------------------------------+
| Copyright © 2002 - 2006 Nick Jones
| http&#58;//www.php-fusion.co.uk/
+----------------------------------------------------+
| Released under the terms & conditions of v2 of the
| GNU General Public License. For details refer to
| the included gpl.txt file or visit http&#58;//gnu.org
+----------------------------------------------------*/
require_once "maincore.php";
require_once "subheader.php";
require_once "side_left.php";



require_once "side_right.php";
require_once "footer.php";
?>

User avatar
nanov_91
Нов
Нов
Posts: 192
Joined: Sun Apr 30, 2006 6:58 am
Location: Мездра - Правец

Post by nanov_91 » Sun May 20, 2007 10:38 am

Мерси! +1 :D

Post Reply