Edycja newsa z poziomu strony głównej
|
Diamond |
Dodany dnia 02.04.2007 19:36:22
|
Przedszkolak
Postów: 32
Data rejestracji: 12.03.2005 17:10
|
Posiadam skórke DAJ_Glass i kiedy ustawię aby byly newsy w dwoch kolumnach to jest przy kazdym "olowek" do edycji newsa. Kiedy zmienie aby newsy byly pojedynczo w jednej kolumnie olowka nie ma i edycja odbywa sie przez Panel Admina. Dla przykladu sprawdzilem skorke Azaraz i tam czy w dwoch kolumnach czy w jednej jest olowek do edycji. Gdzie szukac rozwiazania problemu?
Edytowane przez Diamond dnia 02.04.2007 19:39:11
|
|
|
|
Wścibski Gość |
Dodany dnia 22.11.2024 14:07:12
|
Pan Kontekstualny
Postów: n^x
Data rejestracji: Zawsze
|
|
IP: localhost |
|
|
szer |
Dodany dnia 02.04.2007 20:35:15
|
Zaawansowany
Postów: 1139 Pomógł: 4
Data rejestracji: 13.11.2004 23:06
|
Widocznie w Twoim themie nie ma dodanej funkcji by przy Newsie był ołówek do edycji. Jeżeli masz newsy w dwóch kolumnach, to wtedy jest pobierany szablon newsów bezpośrednio z pliku news.php gdzie to jest automatycznie ustawione. Niestety w Twoim themie tego nie ma ustawionego... |
|
|
|
Diamond |
Dodany dnia 02.04.2007 20:37:34
|
Przedszkolak
Postów: 32
Data rejestracji: 12.03.2005 17:10
|
Szer ale rozumiem, że można dodać to?
Niestety u mnie z edycja jest cieniutko. Jak coś grzebane było to SlawekNeo grzebał. Niestety zmiana skina nie wchodzi w grę ponieważ ten jest idealnie spasowany. Czy mogę liczyć na pomoc?
function render_header($header_content) {
global $theme_width,$settings,$userdata;
echo "<table width='100%' cellspacing='0' cellpadding='0' border='0'>
<tr><td valign='top'>
<table width='100%' border='0' cellspacing='0' cellpadding='0'>
<tr><td height='14' width='25' nowrap='nowrap' class='ul'><span class='vsmall'> </span></td>
<td width='100%' colspan='2' class='uc'><span class='vsmall'> </span></td>
<td width='25' nowrap='nowrap' class='ur'><span class='vsmall'> </span></td></tr>
<tr><td class='headl'><span class='vsmall'> </span></td>
<td align='left' class='row3' colspan='2'>
<a href='start'><img src='".THEME."images/logo.gif' border='0' title='".$settings[sitename]."'/></a></td>
<td class='headr'><span class='vsmall'> </span></td></tr>
<tr valign='bottom'><td rowspan='3' class='tul'><span class='vsmall'> </span></td>
<td height='30' class='tuc'>";
$result = dbquery("SELECT * FROM ".DB_PREFIX."site_links WHERE link_position>='2' ORDER BY link_order");
if (dbrows($result) != 0) {
$i = 0;
while($data = dbarray($result)) {
if (checkgroup($data['link_visibility'])) {
if ($data['link_url']!="---") {
if ($i != 0) { echo " <font color='FFFFFF'>r6;</font>\n"; } else { echo "\n"; }
$link_target = ($data['link_window'] == "1" ? " target='_blank'" : "");
if (strstr($data['link_url'], "http://") || strstr($data['link_url'], "https://")) {
echo "".furl("<a href='".$data['link_url']."' ".$link_target." class='navbar'>".$data['link_name']."</a>")."";
} else {
echo "".furl("<a href='".BASEDIR.$data['link_url']."' ".$link_target." class='navbar'>".$data['link_name']."</a>")."";
}
}
$i++;
}
}
}
echo ($i == 0 ? " " : "")."</td>";
echo "<td align='right' nowrap='nowrap' class='tuc'><font class='navbar'>".ucwords(showdate($settings['subheaderdate'], time()))."</font></td>";
echo "<td rowspan='3' class='tur'><span class='vsmall'> </span></td></tr>";
echo "<tr><td height='10' colspan='2' class='row5'><img src='".THEME."images/spacer.gif' border='0' height='1' width='1'></td></tr>";
echo "<tr valign='top'><td align='center' height='30' nowrap='nowrap' class='tlc'><span class='navbar'>";
echo "<td nowrap='nowrap' align='right' class='tlc'></td></tr>";
echo "<tr><td class='left'><span class='vsmall'> </span></td>";
echo "<td colspan='2' class='row2'><br />";
echo "<table width='100%' cellpadding='0' cellspacing='0' border='0'>";
echo "<tr valign='top'><td valign='top' width='1'>";
}
function render_footer($license=false) {
global $theme_width,$settings,$locale,$sql_query,$userdata;
echo "</td></table></td>";
echo "<td class='right'><span class='vsmall'></span></td></tr>";
echo "<tr><td class='left'><span class='vsmall'> </span></td>";
echo "<td colspan='2' class='row2'>";
echo "<div align='center'>".stripslashes($settings['footer'])."</div>";
echo "<div align='center'><b>".$settings['counter']." </b></font>".($settings['counter'] == 1 ? $locale['140']."\n" : $locale['141']."</div>\n");
if ($userdata['user_level'] == "103") {
echo"<center>Wykonano <b>".$sql_query."</b> zapytan do bazy.</center>";
}
echo "<div align='center'>";
if ($license == false) {
echo "Powered by <a target='_blank' href='http://www.php-fusion.co.uk'><img src='".THEME."images/fusion.gif' title='PHP-Fusion' style='vertical-align:top;'></a> v".$settings['version']." © 2003-2005";
}
echo " | Original <b>DAJ Glass</b> Theme by: <a target='_blank' href='http://www.dumbassjones.com/'>Dustin Baccetti</a> : Ported for PHP-Fusion by: <a target='_blank' href='http://phpfusion.org'><img title='PHP-Fusion Themes' src='".THEME."images/fthemes.gif' style='vertical-align:top;'></a></div></td>";
echo "<td class='right'><span class='vsmall'></span></td></tr>";
echo "<tr><td height='27' class='ll'><span class='vsmall'></span></td>";
echo "<td colspan='2' class='lc'><span class='vsmall'></span></td>";
echo "<td class='lr'><span class='vsmall'></span></td></tr></table>\n";
}
function render_news($subject, $news, $info) {
global $locale;
echo "<table width='100%' border='0' cellspacing='0' cellpadding='5'>";
echo "<tr><td><table width='100%' border='0' cellspacing='0' cellpadding='0'>";
echo "<tr><td class='panel-cellpic' width='100%' height='25' align='center'>$subject</td></tr></table>";
echo "<table width='100%' border='0' cellspacing='0' cellpadding='0'>";
echo "<tr><td bgcolor='#F5F5F5'><table width='100%' border='0' cellspacing='0' cellpadding='0'>";
echo "<tr><td bgcolor='#525E6E'><table width='100%' border='0' cellspacing='1' cellpadding='1'>";
echo "<tr><td bgcolor='#FFFFFF'><table width='100%' border='0' cellspacing='0' cellpadding='4'>";
echo "<tr><td class='main-body'>$news</td></tr></table>";
echo "<tr><td height='30' class='news-footer'><div align='center'>";
echo "".$locale['040']."<a href='profile.php?lookup=".$info['user_id']."'>".$info['user_name']."</a> ";
echo "".$locale['041'].showdate("longdate", $info['news_date'])." ";
echo "<br />";
echo "".($info['news_ext'] == "y" ? "<a href='news.php?readmore=".$info['news_id']."'>".$locale['042']."</a> ·\n" : "")."";
if ($info['news_allow_comments'])
echo "<a href='news.php?readmore=".$info['news_id']."'>".$info['news_comments'].$locale['043']."</a> · ";
echo "".$info['news_reads'].$locale['044']." ";
echo "| <a href='print.php?type=N&item_id=".$info['news_id']."'><img src='".THEME."images/printer.gif' alt='".$locale['045']."' border='0' style='vertical-align:middle;'></a>";
echo "</div>";
echo "<table width='100%' border='0' cellspacing='0' cellpadding='4'>";
echo "</td></tr></table></td></tr></td></tr></table></td></tr>";
echo "</table></td></tr></table></td></tr></table>";
}
function render_article($subject, $article, $info) {
global $locale;
echo "<table width='100%' border='0' cellspacing='0' cellpadding='5'>";
echo "<tr><td><table width='100%' border='0' cellspacing='0' cellpadding='0'>";
echo "<tr><td class='panel-cellpic' width='100%' height='25' align='center'>$subject</td></tr></table>";
echo "<table width='100%' border='0' cellspacing='0' cellpadding='0'>";
echo "<tr><td bgcolor='#F5F5F5'><table width='100%' border='0' cellspacing='0' cellpadding='0'>";
echo "<tr><td bgcolor='#525E6E'><table width='100%' border='0' cellspacing='1' cellpadding='1'>";
echo "<tr><td bgcolor='#FFFFFF'><table width='100%' border='0' cellspacing='0' cellpadding='4'>";
echo "<tr><td class='main-body'>".($info['article_breaks'] == "y" ? nl2br($article) : $article)."</td></tr></table>";
echo "<tr><td height='30' class='news-footer'><div align='center'>";
echo "".$locale['040']."<a href='profile.php?lookup=".$info['user_id']."'>".$info['user_name']."</a> ";
echo "".$locale['041'].showdate("longdate", $info['article_date'])." ";
echo "<br />";
if ($info['article_allow_comments']) echo $info['article_comments'].$locale['043']." · ";
echo "".$info['article_reads'].$locale['044']." ";
echo " | <a href='print.php?type=A&item_id=".$info['article_id']."'><img src='".THEME."images/printer.gif' alt='".$locale['045']."' border='0' style='vertical-align:middle;'></a>";
echo "</div>";
echo "<table width='100%' border='0' cellspacing='0' cellpadding='4'>";
echo "</td></tr></table></td></tr></td></tr></table></td></tr>";
echo "</table></td></tr></table></td></tr></table>";
}
// Open table begins
function opentable($title) {
echo "<table width='100%' border='0' cellspacing='0' cellpadding='5'><tr>";
echo "<td><table width='100%' border='0' cellspacing='0' cellpadding='0'>";
echo "<tr><td class='panel-cellpic' width='100%' align='center'>$title</td></tr></table>";
echo "<table width='100%' border='0' cellspacing='0' cellpadding='0'>";
echo "<tr><td><table width='100%' border='0' cellspacing='0' cellpadding='0'>";
echo "<tr><td bgcolor='#525E6E'><table width='100%' border='0' cellspacing='1' cellpadding='0'>";
echo "<tr><td><table width='100%' border='0' cellspacing='0' cellpadding='4'>";
echo "<tr><td class='main-body'>";
}
// Close table end
function closetable() {
echo "</td></tr></table></td></tr></table></td></tr></table></td></tr></table>";
echo "<table border='0' cellspacing='0' cellpadding='0' width='100%'>";
echo "</table></td></tr></table>\n";
}
function openside($title) {
echo "<table width='100%' border='0' cellspacing='0' cellpadding='5'><tr>";
echo "<td><table width='100%' border='0' cellspacing='0' cellpadding='0'>";
echo "<tr><td align='center' class='panel-cellpic' width='100%'>$title</td></tr></table>";
echo "<table width='100%' border='0' cellspacing='0' cellpadding='0'>";
echo "<tr><td><table width='100%' border='0' cellspacing='0' cellpadding='0'>";
echo "<tr><td bgcolor='#525E6E'><table width='100%' border='0' cellspacing='1' cellpadding='0'>";
echo "<tr><td><table width='100%' border='0' cellspacing='0' cellpadding='4'>";
echo "<tr><td class='side-body'>";
}
function closeside() {
echo "</td></tr></table></td></tr></table></td></tr></table></td></tr></table>";
echo "<table border='0' cellspacing='0' cellpadding='0' width='100%'>";
echo "</table></td></tr></table>\n";
}
function opensidex($title,$open="on") {
$box_img = ($open=="on" ? "off" : "on");
echo "<table width='100%' border='0' cellspacing='0' cellpadding='5'><tr>";
echo "<td><table width='100%' border='0' cellspacing='0' cellpadding='0'>";
echo "<tr><td align='center' class='panel-cellpic' width='100%'>";
echo "<img valign='middle' align='right'onclick=\"javascript:flipBox('$title')\" name='b_$title' alt='$box_img' border='0' src='".THEME."images/panel_$box_img.gif'>$title</td></tr></table>";
echo "<table width='100%' border='0' cellspacing='0' cellpadding='0'>";
echo "<tr><td><table width='100%' border='0' cellspacing='0' cellpadding='0'>";
echo "<tr><td bgcolor='#525E6E'><table width='100%' border='0' cellspacing='1' cellpadding='0'>";
echo "<tr><td><table width='100%' border='0' cellspacing='0' cellpadding='4'>";
echo "<tr><td class='side-body'>";
echo "<div id='box_$title'".($open=="off" ? "style='display:none'" : "").">\n";
}
function closesidex() {
echo "</td></tr></table></td></tr></table></td></tr></table></td></tr></table>";
echo "<table border='0' cellspacing='0' cellpadding='0' width='100%'>";
echo "</table></td></tr></table>\n";
}
// Table functions
function tablebreak() {
echo "<table width='100%' cellspacing='0' cellpadding='0'><tr><td height='8'></td></tr></table>\n";
}
?>
Edytowane przez Diamond dnia 02.04.2007 20:40:28
|
|
|
|
szer |
Dodany dnia 02.04.2007 20:42:12
|
Zaawansowany
Postów: 1139 Pomógł: 4
Data rejestracji: 13.11.2004 23:06
|
Zaraz Ci to napisze. Ale zdaje mi się że już to było.
EDIT.
Podmień funckje render_news
function render_news($subject, $news, $info) {
global $locale,$userdata,$aidlink;
echo "<table width='100%' border='0' cellspacing='0' cellpadding='5'>";
echo "<tr><td><table width='100%' border='0' cellspacing='0' cellpadding='0'>";
echo "<tr><td class='panel-cellpic' width='100%' height='25' align='center'>$subject</td></tr></table>";
echo "<table width='100%' border='0' cellspacing='0' cellpadding='0'>";
echo "<tr><td bgcolor='#F5F5F5'><table width='100%' border='0' cellspacing='0' cellpadding='0'>";
echo "<tr><td bgcolor='#525E6E'><table width='100%' border='0' cellspacing='1' cellpadding='1'>";
echo "<tr><td bgcolor='#FFFFFF'><table width='100%' border='0' cellspacing='0' cellpadding='4'>";
echo "<tr><td class='main-body'>$news</td></tr></table>";
echo "<tr><td height='30' class='news-footer'><div align='center'>";
echo "".$locale['040']."<a href='profile.php?lookup=".$info['user_id']."'>".$info['user_name']."</a> ";
echo "".$locale['041'].showdate("longdate", $info['news_date'])." ";
echo "<br />";
echo "".($info['news_ext'] == "y" ? "<a href='news.php?readmore=".$info['news_id']."'>".$locale['042']."</a> ·\n" : "")."";
if ($info['news_allow_comments'])
echo "<a href='news.php?readmore=".$info['news_id']."'>".$info['news_comments'].$locale['043']."</a> · ";
echo "".$info['news_reads'].$locale['044']." ";
echo "| <a href='print.php?type=N&item_id=".$info['news_id']."'><img src='".THEME."images/printer.gif' alt='".$locale['045']."' border='0' style='vertical-align:middle;'></a>";
if (checkrights("N") || $userdata['user_level'] >= 102) {
echo "<form name='editnews".$info['news_id']."' method='post' action='".ADMIN."news.php".$aidlink."&news_id=".$info['news_id']."'>
<input type='hidden' name='edit' value='edit'><a href='javascript:document.editnews".$info['news_id'].".submit();'><img src='".IMAGES."edit.gif' alt='".$locale['048']."' title='".$locale['048']."' style='vertical-align:middle;border:0px;'></a></span>\n</form>\n";
}
echo "</div>";
echo "<table width='100%' border='0' cellspacing='0' cellpadding='4'>";
echo "</td></tr></table></td></tr></td></tr></table></td></tr>";
echo "</table></td></tr></table></td></tr></table>";
}
Powinno działać / Ps poprawiłem kod
Edytowane przez szer dnia 02.04.2007 20:50:18
|
|
|
|
Pieka |
Dodany dnia 02.04.2007 20:48:12
|
Postów: 19882 Pomógł: 767
v7.02.03 Data rejestracji: 23.02.2005 18:12
|
Dodaj ponizszy kod do theme.php zaraz po <?php:
if (!defined("IN_FUSION")) { header("Location: ../../index.php"); exit; }
require_once INCLUDES."theme_functions_include.php";
Ponizej masz funkcje do zmiany.
Znajdz:
function render_news($subject, $news, $info) {
global $locale;
echo "<table width='100%' border='0' cellspacing='0' cellpadding='5'>";
echo "<tr><td><table width='100%' border='0' cellspacing='0' cellpadding='0'>";
echo "<tr><td class='panel-cellpic' width='100%' height='25' align='center'>$subject</td></tr></table>";
echo "<table width='100%' border='0' cellspacing='0' cellpadding='0'>";
echo "<tr><td bgcolor='#F5F5F5'><table width='100%' border='0' cellspacing='0' cellpadding='0'>";
echo "<tr><td bgcolor='#525E6E'><table width='100%' border='0' cellspacing='1' cellpadding='1'>";
echo "<tr><td bgcolor='#FFFFFF'><table width='100%' border='0' cellspacing='0' cellpadding='4'>";
echo "<tr><td class='main-body'>$news</td></tr></table>";
echo "<tr><td height='30' class='news-footer'><div align='center'>";
echo "".$locale['040']."<a href='profile.php?lookup=".$info['user_id']."'>".$info['user_name']."</a> ";
echo "".$locale['041'].showdate("longdate", $info['news_date'])." ";
echo "<br />";
echo "".($info['news_ext'] == "y" ? "<a href='news.php?readmore=".$info['news_id']."'>".$locale['042']."</a> ˇ\n" : "")."";
if ($info['news_allow_comments'])
echo "<a href='news.php?readmore=".$info['news_id']."'>".$info['news_comments'].$locale['043']."</a> ˇ ";
echo "".$info['news_reads'].$locale['044']." ";
echo "| <a href='print.php?type=N&item_id=".$info['news_id']."'><img src='".THEME."images/printer.gif' alt='".$locale['045']."' border='0' style='vertical-align:middle;'></a>";
echo "</div>";
echo "<table width='100%' border='0' cellspacing='0' cellpadding='4'>";
echo "</td></tr></table></td></tr></td></tr></table></td></tr>";
echo "</table></td></tr></table></td></tr></table>";
}
I zamien na:
function render_news($subject, $news, $info) {
global $locale;
echo "<table width='100%' border='0' cellspacing='0' cellpadding='5'>";
echo "<tr><td><table width='100%' border='0' cellspacing='0' cellpadding='0'>";
echo "<tr><td class='panel-cellpic' width='100%' height='25' align='center'>$subject</td></tr></table>";
echo "<table width='100%' border='0' cellspacing='0' cellpadding='0'>";
echo "<tr><td bgcolor='#F5F5F5'><table width='100%' border='0' cellspacing='0' cellpadding='0'>";
echo "<tr><td bgcolor='#525E6E'><table width='100%' border='0' cellspacing='1' cellpadding='1'>";
echo "<tr><td bgcolor='#FFFFFF'><table width='100%' border='0' cellspacing='0' cellpadding='4'>";
echo "<tr><td class='main-body'>$news</td></tr></table>";
echo "<tr><td height='30' class='news-footer'><div align='center'>";
echo openform("N",$info['news_id']).newsposter($info," ·").newsopts($info,"·").closeform("N",$info['news_id']);
echo "</div>";
echo "<table width='100%' border='0' cellspacing='0' cellpadding='4'>";
echo "</td></tr></table></td></tr></td></tr></table></td></tr>";
echo "</table></td></tr></table></td></tr></table>";
}
Edytowane przez Pieka dnia 08.04.2007 03:37:55
Jestem jaki jestem
|
|
|
|
Diamond |
Dodany dnia 02.04.2007 20:56:27
|
Przedszkolak
Postów: 32
Data rejestracji: 12.03.2005 17:10
|
Panowie rewelacja. Od ręki zadziałało. Dziękuję Wam za pomoc. Jest to bardzo duże ułatwienie dla nas teraz. Męczyliśmy się z tym rok ;-) Gdybyście kiedyś mieli problem z video/audio (kompresja, konwersja, edycja) mam nadzieję, że się odwdzięczymy ;-) |
|
|