Oh no! Where's the JavaScript?
Your Web browser does not have JavaScript enabled or does not support JavaScript. Please enable JavaScript on your Web browser to properly view this Web site, or upgrade to a Web browser that does support JavaScript.
Not a member yet? Click here to register.
Forgot Password?

News edit button on main page

Asked Modified Viewed 4,544 times
P
pavka
P
pavka 10
  • Junior Member, joined since
  • Contributed 38 posts on the community forums.
  • Started 14 threads in the forums
  • Started this discussions
asked
Junior Member

Hello, after upgrade from 6.00.x to 6.01.10 my button "edit" on main page /in news" dissapear for "news admin" i see it only when logged as superadmin , i prefer previous one, how /where to change it?

thx
0 replies

11 posts

R
Reflectoman
R
------------------------------------------------
Adnan Ahmed Online
File Hosting | Image Hosting | Free SMS
  • Member, joined since
  • Contributed 176 posts on the community forums.
  • Started 9 threads in the forums
answered
Member

If you are talking abt the little pencil (or watever) on the main page at the bottom of the news with the print icon and the posted information ...then that is theme specific.

Which theme you using, you'll be changing the coding in there?

Adnan.
0 replies
P
pavka
P
pavka 10
  • Junior Member, joined since
  • Contributed 38 posts on the community forums.
  • Started 14 threads in the forums
  • Started this discussions
answered
Junior Member

i use my own theme and i had this pencil visible before upgrade, now i see the pencil only when i login to SUPERADMIN when i login into admin with news edition right i need to go administration panel to edit news and before i saw the pencil button on main page
0 replies
S
Sveinungs
S
  • Veteran Member, joined since
  • Contributed 935 posts on the community forums.
  • Started 3 threads in the forums
answered
Veteran Member

OK, does your "theme.php" have this lines in the top:

if (!defined("IN_FUSION")) { header("Location: ../../index.php"); exit; }
require_once INCLUDES."theme_functions_include.php";


If it does, and you can't see the "edit pencil" - please post your "theme.php" file here if so we might look at it.
0 replies
P
pavka
P
pavka 10
  • Junior Member, joined since
  • Contributed 38 posts on the community forums.
  • Started 14 threads in the forums
  • Started this discussions
answered
Junior Member

No , i dont have this line, but i add it and still no pencil when login in normaln admin /but when i login as SUPERADMIN i see the pencil correct/

Only when i login into normal admin with NEWS admin permissions i cant see it /before upgrade i saw it/


Also i change theme to some default theme and its the same /cant see edit button on normal admin/

I tried add all admin rights to this user - no result, but when i add superadmin rights to this user - then i see the pencil /edit button/.

Whats changed when i upgrade it from 6.00.x to 6.01.10? (i saw pencil on normal admin user with news admin permisions/


here is my theme:

<?
/*--------------------------------------------+
| PHPFusion v6 - Content Management System   |
|---------------------------------------------|
| author: Nick Jones (Digitanium) © 2002-2005 |
| web: http://www.php-fusion.co.uk            |
| email: nick@php-fusion.co.uk                |
|---------------------------------------------|
| Released under the terms and conditions of  |
| the GNU General Public License (Version 2)  |
+--------------------------------------------*/
/*--------------------------------------------+
|    Greenscape Theme for PHPFusion v6.x     |
|---------------------------------------------|
| author: PHPFusion Themes © 2005            |
| web: http://phpfusion.org                   |
| email: webmaster@phpfusion.org              |
|---------------------------------------------|
| Released under the terms and conditions of  |
| the GNU General Public License (Version 2)  |
+--------------------------------------------*/

// theme settings
$body_text = "#555555";
$body_bg = "#Ffffff";
$theme_width = "780";
$theme_width_l = "170";
$theme_width_r = "160";
define("JG_BODY", "onload=\"MM_preloadImages('images/jg_buttons_home_over.gif','images/jg_buttons_prasa_over.gif','images/jg_buttons_logo_over.gif','images/jg_buttons_oferta_over.gif','images/jg_buttons_redakcja_over.gif')\"");

// Right Panels off in Forum Mode
//$theme_panels_exclude = array("/forum/");

//include THEME."menu.php";
include THEME."skrypty.php";

//lightbox
echo "<script type='text/javascript' src='/lightbox/js/prototype.js'></script>";
echo "<script type='text/javascript' src='/lightbox/js/scriptaculous.js?load=effects'></script>";
echo "<script type='text/javascript' src='/lightbox/js/lightbox.js'></script>";

//dodane z posta http://php-fusion.co.uk/forum/viewthread.php?forum_id=38&thread_id=16690&pid=93800

if (!defined("IN_FUSION")) { header("Location: ../../index.php"); exit; }
require_once INCLUDES."theme_functions_include.php";

//koniec dodanego z posta powodowalo brak pisaka edycji dla zwyklego admina

function render_header($header_content) {

global $theme_width,$settings;
require_once THEME."locale.php";

   echo "<div align='center'>\n<div id='jg_h'>";
//    echo "<div id='jg_h1_1'> </div>";
    echo "<div id='jg_h2_1'><a href='http://www.jelenia.pl/news.php'><img src='".THEME."images/jg_head__04_santa.jpg' alt='Strona Główna' border='0' /></a></div>";
    echo "<div id='jg_h1_2'>";
     echo "<a href='/news.php' onmouseout='MM_swapImgRestore()' onmouseover=\"MM_swapImage('Strona Główna','','".THEME."images/jg_buttons_home_over.gif',1)\"><img src='".THEME."images/jg_buttons_home.gif' alt='Strona Główna' width='99' height='25' border='0' id='Strona Główna' /></a>";
     echo "<a href='/viewpage.php?page_id=11' onmouseout='MM_swapImgRestore()' onmouseover=\"MM_swapImage('Dla Prasy','','".THEME."images/jg_buttons_prasa_over.gif',1)\"><img src='".THEME."images/jg_buttons_prasa.gif' alt='Dla Prasy' width='99' height='25' border='0' id='Dla Prasy' /></a>";
     echo "<a href='/viewpage.php?page_id=9' onmouseout='MM_swapImgRestore()' onmouseover=\"MM_swapImage('Nasze Logo','','".THEME."images/jg_buttons_logo_over.gif',1)\"><img src='".THEME."images/jg_buttons_logo.gif' alt='Nasze logo' width='99' height='25' border='0' id='Nasze logo' /></a>";
     echo "<a href='/viewpage.php?page_id=49' onmouseout='MM_swapImgRestore()' onmouseover=\"MM_swapImage('Oferta','','".THEME."images/jg_buttons_oferta_over.gif',1)\"><img src='".THEME."images/jg_buttons_oferta.gif' alt='Oferta' width='99' height='25' border='0' id='Oferta' /></a>";
     echo "<a href='/viewpage.php?page_id=10' onmouseout='MM_swapImgRestore()' onmouseover=\"MM_swapImage('Redakcja','','".THEME."images/jg_buttons_redakcja_over.gif',1)\"><img src='".THEME."images/jg_buttons_redakcja.gif' alt='Redakcja' width='99' height='25' border='0' id='Redakcja' /></a>";
   echo "</div>";
//    echo "<div id='clear'></div>";
   echo "<div id='jg_h2_2'>";
     include( THEME.'jg_kategorie.php');
   echo "</div>";
   echo "<div id='jg_h2_3'>";
   echo "<a href='".BASEDIR.$locale['LINK01']."'><img src='".THEME."images/buttony_01.png' alt='".$locale['LINK01A']."' width='130' height='64' border='0' /></a>";
   echo "<a href='#'><img src='".THEME."images/buttony_02.png' alt='".$locale['LINK02A']."' width='130' height='64' border='0' /></a>";
   echo "<a href='/photogallery.php'><img src='".THEME."images/buttony_03.png' alt='".$locale['LINK03A']."' width='130' height='64' border='0' /></a>";
   echo "<a href='".BASEDIR.$locale['LINK04']."'><img src='".THEME."images/buttony_04.png' alt='".$locale['LINK04A']."' width='130' height='64' border='0' /></a>";
   echo "</div>";
    echo "<div id='clear'></div>";
    echo "<div id='jg_h3'>";
          include "imieniny.php";
                    echo "<div style='text-align:left; width:195px; float:left;'>Imieniny: ".$imieniny[date("n",time())][date("j",time())]." </div>" ;
            
             echo '<div style="float: right; text-align: right;">';
include "cos.php";
echo'</div>';
            
   
      
      // ZEGAREK - START
        echo "<div align='right' id='clockbar'>";
         echo "<div id='Clock'></div>";
            echo "<script type='text/javascript'>
         <!--
         var DayNam = new Array('Niedziela','Poniedziałek','Wtorek','¦roda','Czwartek','Pi±tek','Sobota');
         var MnthNam = new Array('Styczeń','Luty','Marzec','Kwiecień','Maj','Czerwiec','Lipiec','Sierpień','Wrzesień','PaĽdziernik','Listopad','Grudzień');
         //-->
         </script>";
      echo "<script type='text/javascript' src='".THEME."/clock/clock.js'></script></div>";
        // ZEGAREK - KONIEC
     echo "</div>";
   echo "</div>";
    echo "<div id='clear'></div>";
    echo "</div>\n</div>";
   
   //poczatek reklamy przewijanej
   
echo "<table width='778' border='0' align='center' cellspacing='0' cellpadding='0' id='ReklamaScroll'>
  <tr>
   <td bgcolor='#FFFFFF'>"; include 'marque.php'; echo"</td>
  </tr>
</table>";
// koniec reklamy przewijanej

//-----------------------------------------------
   echo "<table align='center' cellspacing='0' cellpadding='0' width='$theme_width' class='body-border'><tr><td valign='top'>";
   echo "<table cellpadding='0' cellspacing='0' width='100%'>\n<tr>\n";
}

/*function render_header($header_content) {

global $theme_width,$settings;

   echo "<table align='center' cellspacing='0' cellpadding='0' width='$theme_width' class='body-border'>";
   echo "<tr><td><table cellpadding='0' cellspacing='0' width='100%'><tr>";
   echo "<td><table cellpadding='0' cellspacing='0' width='100%'><tr>";
   echo "<td><div align='right' id='clockbar'><div class='clockbarcolor'>";

      echo "<div id='Clock'></div>";
   echo "<script type='text/javascript'>
      <!--
      var DayNam = new Array(
      'Niedziela','Poniedziałek','Wtorek','¦roda','Czwartek','Pi±tek','Sobota');
      var MnthNam = new Array(
      'Styczeń','Luty','Marzec','Kwiecień','Maj','Czerwiec','Lipiec','Sierpień','Wrzesień','PaĽdziernik','Listopad','Grudzień');
      //-->
      </script>";
   echo "<script type='text/javascript' src='".THEME."/clock/clock.js'></script></div></div>";
   echo "<div align='right' id='pageheader'>";
   echo "<table style='WIDTH: 100%' height='50' cellSpacing='0' cellPadding='0' border='0'><tr>";
   echo "<td style='WIDTH: 45%'>";
   echo "<img alt='".$settings[sitename]."' src='".THEME."images/logo.jpg' border='0' width='216' height='74'></a>";
   echo "</td>";
   echo "<td style='padding-right:15px;' align='right'><a class='clockbarcolor' href='#' onClick=\"return clickreturnvalue()\" onMouseover=\"dropdownmenu(this, event, menu1, '185px')\" onMouseout=\"delayhidemenu()\"><img src='".THEME."images/quicktips.gif'></a></td>";
   echo "</tr></table></div>";
   echo "<table style='WIDTH: 100%' cellSpacing='0' cellPadding='0' border='0'><tr>";
   echo "<td class='subheader'>";

   $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 " - \n"; } else { echo "\n"; }
   $link_target = ($data['link_window'] == "1" ? " target='_blank'" : "");
      if (strstr($data['link_url'], "http://") || strstr($data['link_url'], "https://")) {
   echo "<a href='".$data['link_url']."'".$link_target."' class='subheader-text'>".$data['link_name']."</a>";
   } else {
   echo "<a href='".BASEDIR.$data['link_url']."'".$link_target."' class='subheader-text'>".$data['link_name']."</a>";
}
   }
$i++;
      }
   }
}
   echo ($i == 0 ? " " : "")."</div></td>";
   echo "<td class='subheader' vAlign='center' align='right'>";
   echo "<form name='search' action='".BASEDIR."search.php?stype=f' method='post'>";
   echo "<table cellSpacing='0' width='100%' cellPadding='0' border='0'><tr>";
   echo "<td align='right'><b>Search</b>  ";
   echo "<input type='text' class='input' name='stext' value='Search Forums'  onBlur=\"if(this.value=='') this.value='Search Forums';\" onFocus=\"if(this.value=='Search Forums') this.value='';\">";
   echo " <input name='option' class='submit' type='submit' value='Search'>";
   echo "</td></tr></table></form>";
   echo "</td></tr></table></div>";
   echo "</td></tr></table>";
   echo "</td></tr></table>\n";
   echo "<table cellpadding='0' cellspacing='0' width='100%'>\n<tr>\n";
}
*/
function render_footer($license=false) {

global $theme_width,$settings,$locale;

   echo "</tr>\n</table>\n";
   echo "<table cellpadding='0' cellspacing='0' width='100%'><tr>";
   echo "<td align='center' class='footer'>".stripslashes($settings['footer'])."\n";
/*if ($license == false) {
   echo "<b>Greenscape</b> by: <a target='_blank' href='http://phpfusion-themes.com'><img src='".THEME."images/fthemes.gif' style='vertical-align:top;'></a><br><br>Powered by <a href='http://www.php-fusion.co.uk' class='breadcrumb' target='_blank'>PHPFusion</a> v".$settings['version']." © 2003-2006<br><br>\n";
}
   echo number_format($settings['counter'])." ".($settings['counter'] == 1 ? $locale['140']."<br>\n" : $locale['141']."<br>\n")."";
*/   echo "</td></tr></table></td></tr></table>\n";
}

function render_news($subject, $news, $info) {

global $locale;

   echo "<table style='WIDTH: 100%;' cellSpacing='0' cellPadding='2' border='0'><tr>";
   echo "<td class='tableHeadingBG'><div class='tableHeading'>$subject</div></td></tr>";
   echo "<tr><td class='td-cell1' style='WIDTH: 100%' vAlign='top'>$news</td></tr>";
   echo "<tr><td class='td-cell2' align='center' style='WIDTH: 100%'>";
   echo "<table cellSpacing='0' cellPadding='0' border='0'><tr>";
   echo "<td><img src='".THEME."images/bullet.gif'> ".$locale['040']."<a href='profile.php?lookup=".$info['user_id']."'>".$info['user_name']."</a>";
   echo " ".$locale['041'].showdate("longdate", $info['news_date'])." · ".($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> ·\n";
   echo " ";
   echo "<a href='print.php?type=N&item_id=".$info['news_id']."'><img align='right' src='".THEME."images/printer.gif' alt='".$locale['045']."' style='vertical-align:middle;border:0px;'></a>";
   echo "</td></tr></table></td></tr></table>\n";
}

function render_article($subject, $article, $info) {

global $locale;

   echo "<table style='WIDTH: 100%;' cellSpacing='0' cellPadding='2' border='0'><tr>";
   echo "<td class='tableHeadingBG'><div class='tableHeading'>$subject</div></td></tr>";
   echo "<tr><td class='td-cell1' style='WIDTH: 100%' vAlign='top'>".($info['article_breaks'] == "y" ? nl2br($article) : $article)."</td></tr>";
   echo "<tr><td class='td-cell2' align='center' style='WIDTH: 100%'>";
   echo "<table cellSpacing='0' cellPadding='0' border='0'><tr>";
   echo "<td><img src='".THEME."images/bullet.gif'> ".$locale['040']."<a href='profile.php?lookup=".$info['user_id']."'>".$info['user_name']."</a>";
   echo " ".$locale['041'].showdate("longdate", $info['article_date'])." ·\n";
   if ($info['article_allow_comments']) echo $info['article_comments'].$locale['043']." ·\n";
   echo " ";
   echo "<a href='print.php?type=A&item_id=".$info['article_id']."'><img src='".THEME."images/printer.gif' alt='".$locale['045']."' style='vertical-align:middle;border:0px;'></a>";
   echo "</td></tr></table></td></tr></table>\n";
}

function opentable($title) {

   echo "<table style='WIDTH: 100%' cellSpacing='0' cellPadding='0' border='0'><tr>";
   echo "<td class='tableHeadingBG'><div class='tableHeading'>$title</div></td></tr>";
   echo "<tr><td class='td-cell1' vAlign='top'>";
}

function closetable() {

   echo "</td></tr></table>\n";
}

function openside($title) {

   echo "<table style='WIDTH: 100%' cellSpacing='0' cellPadding='0' border='0'><tr>";
   echo "<td class='tableHeadingBG'><div class='tableHeading'>$title</div></td></tr>";
   echo "<tr><td class='td-cell1' vAlign='top'>";
}

function closeside() {

   echo "</td></tr></table>\n";
   tablebreak();
}

function opensidex($title,$open="on") {

$boxname = str_replace(" ", "", $title);
$box_img = $open == "on" ? "off" : "on";
   echo "<table style='WIDTH: 100%' cellSpacing='0' cellPadding='0' border='0'><tr>";
   echo "<td class='tableHeadingBG'>";
   echo "<div class='tableHeading'><img align='right' src='".THEME."images/panel_$box_img.gif' name='b_$boxname' alt='' onclick=\"javascript:flipBox('$boxname')\">$title</div></td></tr>";
   echo "<tr><td class='td-cell1' vAlign='top'>";
   echo "<div id='box_$boxname'".($open=="off"?" style='display:none'":"").">\n";
}

function closesidex() {

   echo "</div></td></tr></table>\n";
   tablebreak();
}

function tablebreak() {

   echo "<table cellpadding='0' cellspacing='0' width='100%'>\n";
   echo "<tr>\n<td height='5'></td>\n</tr>\n</table>\n";
}
?>
Edited by pavka on 04-05-2007 04:17,
0 replies
S
Sveinungs
S
  • Veteran Member, joined since
  • Contributed 935 posts on the community forums.
  • Started 3 threads in the forums
answered
Veteran Member

OK. Try changing the

function render_news

like this:

function render_news($subject, $news, $info) {

global $locale;

echo "
      <table style='WIDTH: 100%;' cellSpacing='0' cellPadding='2' border='0'><tr>";
echo "<td class='tableHeadingBG'><div class='tableHeading'>$subject</div></td></tr>";
echo "<tr><td class='td-cell1' style='WIDTH: 100%' vAlign='top'>$news</td></tr>";
echo "<tr><td class='td-cell2' align='center' style='WIDTH: 100%'>";
echo "<table cellSpacing='0' cellPadding='0' border='0'><tr>";
echo "<td>";
echo openform("N",$info['news_id']).newsposter($info," ·").newsopts($info,"·").closeform("N",$info['news_id']);

echo "</td></tr></table></td></tr></table>\n";
}


This should fix it, hopefully.
0 replies
P
pavka
P
pavka 10
  • Junior Member, joined since
  • Contributed 38 posts on the community forums.
  • Started 14 threads in the forums
  • Started this discussions
answered
Junior Member

i change theme, now it look like this:


<?
/*--------------------------------------------+
| PHPFusion v6 - Content Management System   |
|---------------------------------------------|
| author: Nick Jones (Digitanium) © 2002-2005 |
| web: http://www.php-fusion.co.uk            |
| email: nick@php-fusion.co.uk                |
|---------------------------------------------|
| Released under the terms and conditions of  |
| the GNU General Public License (Version 2)  |
+--------------------------------------------*/
/*--------------------------------------------+
|    Greenscape Theme for PHPFusion v6.x     |
|---------------------------------------------|
| author: PHPFusion Themes © 2005            |
| web: http://phpfusion.org                   |
| email: webmaster@phpfusion.org              |
|---------------------------------------------|
| Released under the terms and conditions of  |
| the GNU General Public License (Version 2)  |
+--------------------------------------------*/

// theme settings
$body_text = "#555555";
$body_bg = "#Ffffff";
$theme_width = "780";
$theme_width_l = "170";
$theme_width_r = "160";
define("JG_BODY", "onload=\"MM_preloadImages('images/jg_buttons_home_over.gif','images/jg_buttons_prasa_over.gif','images/jg_buttons_logo_over.gif','images/jg_buttons_oferta_over.gif','images/jg_buttons_redakcja_over.gif')\"");

// Right Panels off in Forum Mode
//$theme_panels_exclude = array("/forum/");

//include THEME."menu.php";
include THEME."skrypty.php";

//lightbox
echo "<script type='text/javascript' src='/lightbox/js/prototype.js'></script>";
echo "<script type='text/javascript' src='/lightbox/js/scriptaculous.js?load=effects'></script>";
echo "<script type='text/javascript' src='/lightbox/js/lightbox.js'></script>";

//dodane z posta http://php-fusion.co.uk/forum/viewthread.php?forum_id=38&thread_id=16690&pid=93800

if (!defined("IN_FUSION")) { header("Location: ../../index.php"); exit; }
require_once INCLUDES."theme_functions_include.php";

//koniec dodanego z posta powodowalo brak pisaka edycji dla zwyklego admina

function render_header($header_content) {

global $theme_width,$settings;
require_once THEME."locale.php";

   echo "<div align='center'>\n<div id='jg_h'>";
//    echo "<div id='jg_h1_1'> </div>";
    echo "<div id='jg_h2_1'><a href='http://www.jelenia.pl/news.php'><img src='".THEME."images/jg_head__04_santa.jpg' alt='Strona G³ówna' border='0' /></a></div>";
    echo "<div id='jg_h1_2'>";
     echo "<a href='/news.php' onmouseout='MM_swapImgRestore()' onmouseover=\"MM_swapImage('Strona G³ówna','','".THEME."images/jg_buttons_home_over.gif',1)\"><img src='".THEME."images/jg_buttons_home.gif' alt='Strona G³ówna' width='99' height='25' border='0' id='Strona G³ówna' /></a>";
     echo "<a href='/viewpage.php?page_id=11' onmouseout='MM_swapImgRestore()' onmouseover=\"MM_swapImage('Dla Prasy','','".THEME."images/jg_buttons_prasa_over.gif',1)\"><img src='".THEME."images/jg_buttons_prasa.gif' alt='Dla Prasy' width='99' height='25' border='0' id='Dla Prasy' /></a>";
     echo "<a href='/viewpage.php?page_id=9' onmouseout='MM_swapImgRestore()' onmouseover=\"MM_swapImage('Nasze Logo','','".THEME."images/jg_buttons_logo_over.gif',1)\"><img src='".THEME."images/jg_buttons_logo.gif' alt='Nasze logo' width='99' height='25' border='0' id='Nasze logo' /></a>";
     echo "<a href='/viewpage.php?page_id=49' onmouseout='MM_swapImgRestore()' onmouseover=\"MM_swapImage('Oferta','','".THEME."images/jg_buttons_oferta_over.gif',1)\"><img src='".THEME."images/jg_buttons_oferta.gif' alt='Oferta' width='99' height='25' border='0' id='Oferta' /></a>";
     echo "<a href='/viewpage.php?page_id=10' onmouseout='MM_swapImgRestore()' onmouseover=\"MM_swapImage('Redakcja','','".THEME."images/jg_buttons_redakcja_over.gif',1)\"><img src='".THEME."images/jg_buttons_redakcja.gif' alt='Redakcja' width='99' height='25' border='0' id='Redakcja' /></a>";
   echo "</div>";
//    echo "<div id='clear'></div>";
   echo "<div id='jg_h2_2'>";
     include( THEME.'jg_kategorie.php');
   echo "</div>";
   echo "<div id='jg_h2_3'>";
   echo "<a href='".BASEDIR.$locale['LINK01']."'><img src='".THEME."images/buttony_01.png' alt='".$locale['LINK01A']."' width='130' height='64' border='0' /></a>";
   echo "<a href='#'><img src='".THEME."images/buttony_02.png' alt='".$locale['LINK02A']."' width='130' height='64' border='0' /></a>";
   echo "<a href='/photogallery.php'><img src='".THEME."images/buttony_03.png' alt='".$locale['LINK03A']."' width='130' height='64' border='0' /></a>";
   echo "<a href='".BASEDIR.$locale['LINK04']."'><img src='".THEME."images/buttony_04.png' alt='".$locale['LINK04A']."' width='130' height='64' border='0' /></a>";
   echo "</div>";
    echo "<div id='clear'></div>";
    echo "<div id='jg_h3'>";
          include "imieniny.php";
                    echo "<div style='text-align:left; width:195px; float:left;'>Imieniny: ".$imieniny[date("n",time())][date("j",time())]." </div>" ;
            
             echo '<div style="float: right; text-align: right;">';
include "cos.php";
echo'</div>';
            
   
      
      // ZEGAREK - START
        echo "<div align='right' id='clockbar'>";
         echo "<div id='Clock'></div>";
            echo "<script type='text/javascript'>
         <!--
         var DayNam = new Array('Niedziela','Poniedzia³ek','Wtorek','¦roda','Czwartek','Pi±tek','Sobota');
         var MnthNam = new Array('Styczeñ','Luty','Marzec','Kwiecieñ','Maj','Czerwiec','Lipiec','Sierpieñ','Wrzesieñ','Pa¼dziernik','Listopad','Grudzieñ');
         //-->
         </script>";
      echo "<script type='text/javascript' src='".THEME."/clock/clock.js'></script></div>";
        // ZEGAREK - KONIEC
     echo "</div>";
   echo "</div>";
    echo "<div id='clear'></div>";
    echo "</div>\n</div>";
   
   //poczatek reklamy przewijanej
   
echo "<table width='778' border='0' align='center' cellspacing='0' cellpadding='0' id='ReklamaScroll'>
  <tr>
   <td bgcolor='#FFFFFF'>"; include 'marque.php'; echo"</td>
  </tr>
</table>";
// koniec reklamy przewijanej

//-----------------------------------------------
   echo "<table align='center' cellspacing='0' cellpadding='0' width='$theme_width' class='body-border'><tr><td valign='top'>";
   echo "<table cellpadding='0' cellspacing='0' width='100%'>\n<tr>\n";
}

/*function render_header($header_content) {

global $theme_width,$settings;

   echo "<table align='center' cellspacing='0' cellpadding='0' width='$theme_width' class='body-border'>";
   echo "<tr><td><table cellpadding='0' cellspacing='0' width='100%'><tr>";
   echo "<td><table cellpadding='0' cellspacing='0' width='100%'><tr>";
   echo "<td><div align='right' id='clockbar'><div class='clockbarcolor'>";

      echo "<div id='Clock'></div>";
   echo "<script type='text/javascript'>
      <!--
      var DayNam = new Array(
      'Niedziela','Poniedzia³ek','Wtorek','¦roda','Czwartek','Pi±tek','Sobota');
      var MnthNam = new Array(
      'Styczeñ','Luty','Marzec','Kwiecieñ','Maj','Czerwiec','Lipiec','Sierpieñ','Wrzesieñ','Pa¼dziernik','Listopad','Grudzieñ');
      //-->
      </script>";
   echo "<script type='text/javascript' src='".THEME."/clock/clock.js'></script></div></div>";
   echo "<div align='right' id='pageheader'>";
   echo "<table style='WIDTH: 100%' height='50' cellSpacing='0' cellPadding='0' border='0'><tr>";
   echo "<td style='WIDTH: 45%'>";
   echo "<img alt='".$settings[sitename]."' src='".THEME."images/logo.jpg' border='0' width='216' height='74'></a>";
   echo "</td>";
   echo "<td style='padding-right:15px;' align='right'><a class='clockbarcolor' href='#' onClick=\"return clickreturnvalue()\" onMouseover=\"dropdownmenu(this, event, menu1, '185px')\" onMouseout=\"delayhidemenu()\"><img src='".THEME."images/quicktips.gif'></a></td>";
   echo "</tr></table></div>";
   echo "<table style='WIDTH: 100%' cellSpacing='0' cellPadding='0' border='0'><tr>";
   echo "<td class='subheader'>";

   $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 " - \n"; } else { echo "\n"; }
   $link_target = ($data['link_window'] == "1" ? " target='_blank'" : "");
      if (strstr($data['link_url'], "http://") || strstr($data['link_url'], "https://")) {
   echo "<a href='".$data['link_url']."'".$link_target."' class='subheader-text'>".$data['link_name']."</a>";
   } else {
   echo "<a href='".BASEDIR.$data['link_url']."'".$link_target."' class='subheader-text'>".$data['link_name']."</a>";
}
   }
$i++;
      }
   }
}
   echo ($i == 0 ? " " : "")."</div></td>";
   echo "<td class='subheader' vAlign='center' align='right'>";
   echo "<form name='search' action='".BASEDIR."search.php?stype=f' method='post'>";
   echo "<table cellSpacing='0' width='100%' cellPadding='0' border='0'><tr>";
   echo "<td align='right'><b>Search</b>  ";
   echo "<input type='text' class='input' name='stext' value='Search Forums'  onBlur=\"if(this.value=='') this.value='Search Forums';\" onFocus=\"if(this.value=='Search Forums') this.value='';\">";
   echo " <input name='option' class='submit' type='submit' value='Search'>";
   echo "</td></tr></table></form>";
   echo "</td></tr></table></div>";
   echo "</td></tr></table>";
   echo "</td></tr></table>\n";
   echo "<table cellpadding='0' cellspacing='0' width='100%'>\n<tr>\n";
}
*/
function render_footer($license=false) {

global $theme_width,$settings,$locale;

   echo "</tr>\n</table>\n";
   echo "<table cellpadding='0' cellspacing='0' width='100%'><tr>";
   echo "<td align='center' class='footer'>".stripslashes($settings['footer'])."\n";
/*if ($license == false) {
   echo "<b>Greenscape</b> by: <a target='_blank' href='http://phpfusion-themes.com'><img src='".THEME."images/fthemes.gif' style='vertical-align:top;'></a><br><br>Powered by <a href='http://www.php-fusion.co.uk' class='breadcrumb' target='_blank'>PHPFusion</a> v".$settings['version']." © 2003-2006<br><br>\n";
}
   echo number_format($settings['counter'])." ".($settings['counter'] == 1 ? $locale['140']."<br>\n" : $locale['141']."<br>\n")."";
*/   echo "</td></tr></table></td></tr></table>\n";
}

function render_news($subject, $news, $info) {

global $locale;

echo "<table style='WIDTH: 100%;' cellSpacing='0' cellPadding='2' border='0'><tr>";
echo "<td class='tableHeadingBG'><div class='tableHeading'>$subject</div></td></tr>";
echo "<tr><td class='td-cell1' style='WIDTH: 100%' vAlign='top'>$news</td></tr>";
echo "<tr><td class='td-cell2' align='center' style='WIDTH: 100%'>";
echo "<table cellSpacing='0' cellPadding='0' border='0'><tr>";
echo "<td>";
echo openform("N",$info['news_id']).newsposter($info," ·").newsopts($info,"·").closeform("N",$info['news_id']);

echo "</td></tr></table></td></tr></table>\n";
}

//change from http://www.php-fusion.co.uk/forum/viewthread.php?forum_id=38&thread_id=16690&pid=93835#post_93835
//function render_news($subject, $news, $info) {
//
//global $locale;
//
//   echo "<table style='WIDTH: 100%;' cellSpacing='0' cellPadding='2' border='0'><tr>";
//   echo "<td class='tableHeadingBG'><div class='tableHeading'>$subject</div></td></tr>";
//   echo "<tr><td class='td-cell1' style='WIDTH: 100%' vAlign='top'>$news</td></tr>";
//   echo "<tr><td class='td-cell2' align='center' style='WIDTH: 100%'>";
//   echo "<table cellSpacing='0' cellPadding='0' border='0'><tr>";
//   echo "<td><img src='".THEME."images/bullet.gif'> ".$locale['040']."<a href='profile.php?lookup=".$info['user_id']."'>".$info['user_name']."</a>";
//   echo " ".$locale['041'].showdate("longdate", $info['news_date'])." · ".($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> ·\n";
//   echo " ";
//   echo "<a href='print.php?type=N&item_id=".$info['news_id']."'><img align='right' src='".THEME."images/printer.gif' alt='".$locale['045']."' style='vertical-align:middle;border:0px;'></a>";
//   echo "</td></tr></table></td></tr></table>\n";
//}

function render_article($subject, $article, $info) {

global $locale;

   echo "<table style='WIDTH: 100%;' cellSpacing='0' cellPadding='2' border='0'><tr>";
   echo "<td class='tableHeadingBG'><div class='tableHeading'>$subject</div></td></tr>";
   echo "<tr><td class='td-cell1' style='WIDTH: 100%' vAlign='top'>".($info['article_breaks'] == "y" ? nl2br($article) : $article)."</td></tr>";
   echo "<tr><td class='td-cell2' align='center' style='WIDTH: 100%'>";
   echo "<table cellSpacing='0' cellPadding='0' border='0'><tr>";
   echo "<td><img src='".THEME."images/bullet.gif'> ".$locale['040']."<a href='profile.php?lookup=".$info['user_id']."'>".$info['user_name']."</a>";
   echo " ".$locale['041'].showdate("longdate", $info['article_date'])." ·\n";
   if ($info['article_allow_comments']) echo $info['article_comments'].$locale['043']." ·\n";
   echo " ";
   echo "<a href='print.php?type=A&item_id=".$info['article_id']."'><img src='".THEME."images/printer.gif' alt='".$locale['045']."' style='vertical-align:middle;border:0px;'></a>";
   echo "</td></tr></table></td></tr></table>\n";
}

function opentable($title) {

   echo "<table style='WIDTH: 100%' cellSpacing='0' cellPadding='0' border='0'><tr>";
   echo "<td class='tableHeadingBG'><div class='tableHeading'>$title</div></td></tr>";
   echo "<tr><td class='td-cell1' vAlign='top'>";
}

function closetable() {

   echo "</td></tr></table>\n";
}

function openside($title) {

   echo "<table style='WIDTH: 100%' cellSpacing='0' cellPadding='0' border='0'><tr>";
   echo "<td class='tableHeadingBG'><div class='tableHeading'>$title</div></td></tr>";
   echo "<tr><td class='td-cell1' vAlign='top'>";
}

function closeside() {

   echo "</td></tr></table>\n";
   tablebreak();
}

function opensidex($title,$open="on") {

$boxname = str_replace(" ", "", $title);
$box_img = $open == "on" ? "off" : "on";
   echo "<table style='WIDTH: 100%' cellSpacing='0' cellPadding='0' border='0'><tr>";
   echo "<td class='tableHeadingBG'>";
   echo "<div class='tableHeading'><img align='right' src='".THEME."images/panel_$box_img.gif' name='b_$boxname' alt='' onclick=\"javascript:flipBox('$boxname')\">$title</div></td></tr>";
   echo "<tr><td class='td-cell1' vAlign='top'>";
   echo "<div id='box_$boxname'".($open=="off"?" style='display:none'":"").">\n";
}

function closesidex() {

   echo "</div></td></tr></table>\n";
   tablebreak();
}

function tablebreak() {

   echo "<table cellpadding='0' cellspacing='0' width='100%'>\n";
   echo "<tr>\n<td height='5'></td>\n</tr>\n</table>\n";
}
?>


Still no pencil on normal admin :(
0 replies
S
Sveinungs
S
  • Veteran Member, joined since
  • Contributed 935 posts on the community forums.
  • Started 3 threads in the forums
answered
Veteran Member

Well, try moving

if (!defined("IN_FUSION")) { header("Location: ../../index.php"); exit; }
require_once INCLUDES."theme_functions_include.php";


and use it as the first line of code after the opening php tag:

<?php
if (!defined("IN_FUSION")) { header("Location: ../../index.php"); exit; }
require_once INCLUDES."theme_functions_include.php";


I really don't see why this should not work. It might be some javascript in theme that interfere, i don't know.
When I use the line of code i suggested, the edit button is there for all users with news admin rights.

If all fails, try asking the original theme author for help! :D
0 replies
P
pavka
P
pavka 10
  • Junior Member, joined since
  • Contributed 38 posts on the community forums.
  • Started 14 threads in the forums
  • Started this discussions
answered
Junior Member

Im the author :)

ok i go try this one up
0 replies
S
Sveinungs
S
  • Veteran Member, joined since
  • Contributed 935 posts on the community forums.
  • Started 3 threads in the forums
answered
Veteran Member

Quote

Im the author


Very strange having this line of code in a theme you coded entirely on your own, IMO

/*if ($license == false) {
echo "<b>Greenscape</b> by: <a target='_blank' href='http://phpfusion-themes.com'><img src='".THEME."images/fthemes.gif' style='vertical-align:top;'></a><br><br>Powered by <a href='http://www.php-fusion.co.uk' class='breadcrumb' target='_blank'>PHPFusion</a> v".$settings['version']." © 2003-2006<br><br>\n";
}
echo number_format($settings['counter'])." ".($settings['counter'] == 1 ? $locale['140']."<br>\n" : $locale['141']."<br>\n")."";
*/ echo "</td></tr></table></td></tr></table>\n";


Even more strange that you have commented out the php-fusion copyright, but it might be you have bought a licence for you copy?

Anyways, eherm, make sure your theme.php start with

<?php

and not just

<?
0 replies
P
pavka
P
pavka 10
  • Junior Member, joined since
  • Contributed 38 posts on the community forums.
  • Started 14 threads in the forums
  • Started this discussions
answered
Junior Member

nope, doesnt work, i have copy /backup/ old 6.00.307 i upload it with this theme and i see the pencil so this happend cuz upgrade only i think sad
0 replies
P
pavka
P
pavka 10
  • Junior Member, joined since
  • Contributed 38 posts on the community forums.
  • Started 14 threads in the forums
  • Started this discussions
answered
Junior Member

anyone can check please if he upgrade from 6.00.307 to 6.01.10 can you see edit pencil button on news admin ? /not superadmin/

thx,,, i badly need it sad
0 replies

Labels

None yet

Statistics

  • Views 0 views
  • Posts 11 posts
  • Votes 0 votes
  • Topic users 3 members

0 participants

Notifications

Track thread

You are not receiving notifications from this thread.

Related Questions

Not yet