Jump to content


Corporate Sponsors


Latest News: (loading..)

- - - - -

Contribution Issue


366 replies to this topic

#21 passage

  • Community Member
  • 2 posts
  • Real Name:Erik Thorsen

Posted 07 March 2005, 10:32

Is it really so that no one knows what the problem is and can fix it? I am seriously getting anxious to get this working as I cannot enter information, or at least change the information on these pages as it gets screwed up with the extra slashes added. Please. someone tell me what to do. Will do anything to get this fixed!!!! So if anyone tells me to uninstall, reinstall, move, delete or have to do something please do not hesitate.. :-)

Thank you!

Passage

#22 WVSailor

  • Community Member
  • 27 posts
  • Real Name:Jim Adams
  • Location:Southern West "By God" Virginia

Posted 12 March 2005, 20:39

:'(
Ready for a biggun??
Installed this contribution, then uninstalled due to errors. Still didnt' get rid of the errors. Here they are, any ideas?

Warning: Cannot modify header information - headers already sent by (output started at /home/nownthen/public_html/includes/filenames.php:131) in /home/nownthen/public_html/includes/functions/general.php on line 1174

Warning: session_start(): Cannot send session cookie - headers already sent by (output started at /home/nownthen/public_html/includes/filenames.php:131) in /home/nownthen/public_html/includes/functions/sessions.php on line 67

Warning: session_start(): Cannot send session cache limiter - headers already sent (output started at /home/nownthen/public_html/includes/filenames.php:131) in /home/nownthen/public_html/includes/functions/sessions.php on line 67

Thanks for anyone's input!
Jim

#23 ifccnb

  • Community Member
  • 19 posts
  • Real Name:Manny
  • Gender:Male

Posted 22 March 2005, 13:09

passage, on Mar 7 2005, 06:32 AM, said:

Is it really so that no one knows what the problem is and can fix it? I am seriously getting anxious to get this working as I cannot enter information, or at least change the information on these pages as it gets screwed up with the extra slashes added. Please. someone tell me what to do. Will do anything to get this fixed!!!! So if anyone tells me to uninstall, reinstall, move, delete or have to do something please do not hesitate.. :-)

Thank you!

Passage

<{POST_SNAPBACK}>


What I do as a work around for this problem is I DON'T use the WYSIWYG editor that came with this contrib. I do all my html editing with an external html editor and copy and paste my code into the page manager box.

If I wanted to add an internal link I would format it like this: Don't use any " " if it's an internal link. I'm not sure how to add external links yet :huh:
<a href=/catalog/contact_us.php>contact us</a>

If I wanted to add an image It would look like this: same rule for the " "
<img src=/catalog/images/oscommerce.gif>

If I need to edit the page I copy and paste the new code over the old code in page manager... I never edit directly inside page manager.

Also if you need to add special characters such as "Quotation marks" or an 'Apostrophe' I use HTMLSpecial Characters codes to cut down on the extra \ problem. Here is a useful link HTMLSpecial Characters

This work around seems to work ok for me :thumbsup:

#24 juerg

  • Community Member
  • 16 posts
  • Real Name:Juerg Schumacher
  • Location:Thurgau, Switzerland

Posted 06 April 2005, 16:32

I'm ONLY using the TEXT BOX to enter some new or links.

I've tried with both 'page_manager.php' files placed on March 23rd 2005 in the corresponding contributions section (Authors: Jocke4u and Benan Tumkaya). There was no remarkeable change at all - the backslashes were still there. Thus I thougth that this scripts are not working ... :angry:

But after saving the text again it worked! :blush: Thank you!

Edited by juerg, 06 April 2005, 16:36.

Juerg

#25 bombola

  • Community Member
  • 31 posts
  • Real Name:Johan

Posted 17 April 2005, 17:39

juerg, on Apr 6 2005, 04:32 PM, said:

But after saving the text again it worked!  :blush:  Thank you!

<{POST_SNAPBACK}>


What do you mean "saving the text again"...

I canīt get it to work with pictures and links.

#26 ifccnb

  • Community Member
  • 19 posts
  • Real Name:Manny
  • Gender:Male

Posted 23 April 2005, 00:00

bombola, on Apr 17 2005, 01:39 PM, said:

What do you mean "saving the text again"...

I canīt get it to work with pictures and links.

<{POST_SNAPBACK}>


CnB said:

I do all my html editing with an external html editor and copy and paste my code into the page manager box. If I need to edit the page I copy and paste the new code over the old code in page manager... I never edit directly inside the page manager box.

Edited by ifccnb, 23 April 2005, 00:01.


#27 Fantom

  • Community Member
  • 23 posts
  • Real Name:Fantom

Posted 25 April 2005, 19:51

Hi,

After updating the latest page_manager.php (23-05-2005) i still keep the error that add's the extra \ before the ".

<a href="www.............. will result in <a href=\"www.....................

Can you please help me solve this?

Thanks

#28 ifccnb

  • Community Member
  • 19 posts
  • Real Name:Manny
  • Gender:Male

Posted 25 April 2005, 19:55

Fantom, on Apr 25 2005, 03:51 PM, said:

Hi,

After updating the latest page_manager.php (23-05-2005) i still keep the error that add's the extra \ before the ".

<a href="www.............. will result in <a href=\"www.....................

Can you please help me solve this?

Thanks

<{POST_SNAPBACK}>


I don't think there is a fix for that yet. But as a work around try leaving out the "quotes", see if that makes a difference

#29 netmotiv8

  • Community Member
  • 17 posts
  • Real Name:Neil

Posted 28 April 2005, 22:46

Hi,

I have just installed the Extra Pages contribution (4.1) but it does not seem to working properly when I add pages under 'Other' such as About Us etc a link appears in the information box but when you click on the link it says page not found. What is going wrong, as it seems to only generate the link not the page.

Help!


Neil :D

#30 skipwater

  • Community Member
  • 41 posts
  • Real Name:Skip Water
  • Gender:Male
  • Location:Washington DC

Posted 29 April 2005, 14:56

netmotiv8, on Apr 28 2005, 06:46 PM, said:

Hi,

I have just installed the Extra Pages contribution (4.1) but it does not seem to working properly when I add pages under 'Other' such as About Us etc a link appears in the information box but when you click on the link it says page not found. What is going wrong, as it seems to only generate the link not the page.

Help!
Neil  :D

<{POST_SNAPBACK}>


Let me just say this contribution rocks :D

This contribution combined with these others allow any user to create and maintain there web pages other then just the products.

Here is what I am using and have no issues at all.

Extra Pages Infobox Version 4.1 http://www.oscommerce.com/community/contributions,2021

WYSIWYG HTMLArea (MULTI-LINGUAL) http://www.oscommerce.com/community/contributions,1347
WYSIWYG HTMLArea Extra Pages Patch
WYSIWYG HTMLArea Patch

Sitemap with Extra Pages Mod http://www.oscommerce.com/community/contributions,2208
Compatibility with Extra Pages-InfoBox CROSSOVER (again+1)

With this install you do not need /catalog/admin/editor at all.

Niel when you open your MYSQL PAGES DESCRIPTION is there data?
If only I could remember that.

#31 netmotiv8

  • Community Member
  • 17 posts
  • Real Name:Neil

Posted 29 April 2005, 19:58

There is data and is this:

<FONT face=\\\\\\\"Georgia, Times New Roman, Times, serif\\\\\\\" size=4>This is a test</FONT>

Whats going on with the \\\\\\\\ ???


I am sure this is an awesome contribution once it works ;)


Neil :D

#32 skipwater

  • Community Member
  • 41 posts
  • Real Name:Skip Water
  • Gender:Male
  • Location:Washington DC

Posted 29 April 2005, 21:14

netmotiv8, on Apr 29 2005, 03:58 PM, said:

There is data and is this:

<FONT face=\\\\\\\"Georgia, Times New Roman, Times, serif\\\\\\\" size=4>This is a test</FONT>

Whats going on with the \\\\\\\\ ???
I am sure this is an awesome contribution once it works  ;)
Neil  :D

<{POST_SNAPBACK}>


I would suggest to install WYSIWYG Editor 1.7 with all of it's updates. There was a bug in all these types of editors that doubled up on the escape codes "\". If I remember this happened when you viewed the code as HTML and source and back again. Or was it preview then back to edit. Sorry :huh: just don't remember.

I did not use the editor that came with Extra Pages because WYSIWYG Editor 1.7 allows you to use it with email, newsletter, catalog products etc.

If you enter this in without html on:
<FONT face="Georgia, Times New Roman, Times, serif" size=4>This is a test</FONT>

It should display like this:

This is a test

Here is a screen shoot of WYSIWYG config menu:
[img]http://www.ccssinc.net/wysiwyg_editor.gif[/img]

After all done and said it the HTML editor that is giving you the trouble.
Hope this helped :thumbsup:
If only I could remember that.

#33 littleneo

  • Community Member
  • 47 posts
  • Real Name:Patrice Khalifa

Posted 04 May 2005, 10:46

Hi all,

I try to install this contribution (Extra Pages Infobox Version 4.1) but the info say to search for :

catalog/index.php :
<?php echo TEXT_MAIN; ?>

to replace it by:
<?php echo $page_check[pages_html_text]; ?>

But I can't find :
<?php echo TEXT_MAIN; ?>
(neither text_main only too)


??? Idea ? Suggestion ?
Thank you very much

Edited by littleneo, 04 May 2005, 10:46.


#34 littleneo

  • Community Member
  • 47 posts
  • Real Name:Patrice Khalifa

Posted 04 May 2005, 13:08

It's good, I find where was the error, by another contribution...

#35 Fantom

  • Community Member
  • 23 posts
  • Real Name:Fantom

Posted 11 May 2005, 20:34

I'm still having troubels with the page_manager and the slashes it adds in front of the " and ' .

I have installed the FCKeditor which is working suburb for product descriptions and the define mainpage. Now i am trying to get the FCKeditor to work with de page_manager, but is can't get it to work. I must say that my knowledge of PHP is poor. :blush:

Can somebody please help me adjust the code of the page_manager.php so that i can edit the text with FCKeditor? :thumbsup:

Very much thanks in advance. :rolleyes:

The code for editing the page is below.
<input type="button" value="<? echo RICH_EDIT; ?>" onClick="edit(pages_html_text_<? echo $languages[$i]['id']; ?>)">
The above code can be found in the page_manager.php code below that i use.
<?php
/*
  $Id: page_manager.php,v 1.73 2003/06/29 22:50:51 hpdl Exp $

  osCommerce, Open Source E-Commerce Solutions
  http://www.oscommerce.com

  Copyright (c) 2003 osCommerce

  Released under the GNU General Public License
*/

  require('includes/application_top.php');

  $action = (isset($HTTP_GET_VARS['action']) ? $HTTP_GET_VARS['action'] : '');

$languages = tep_get_languages();

// Sets the status of a page
  function tep_set_page_status($pages_id, $status) {
    if ($status == '1') {
      return tep_db_query("update " . TABLE_PAGES . " set status = '1'  where pages_id = '" . $pages_id . "'");
    } elseif ($status == '0') {
      return tep_db_query("update " . TABLE_PAGES . " set status = '0'  where pages_id = '" . $pages_id . "'");
    } else {
      return -1;
    }
  }

  if (tep_not_null($action)) {




    switch ($action) {
      case 'setflag':
        if ( ($HTTP_GET_VARS['flag'] == '0') || ($HTTP_GET_VARS['flag'] == '1') ) {
          tep_set_page_status($HTTP_GET_VARS['bID'], $HTTP_GET_VARS['flag']);

          $messageStack->add_session(SUCCESS_PAGE_STATUS_UPDATED, 'success');
        } else {
          $messageStack->add_session(ERROR_UNKNOWN_STATUS_FLAG, 'error');
        }

        tep_redirect(tep_href_link(FILENAME_PAGE_MANAGER, 'page=' . $HTTP_GET_VARS['page'] . '&bID=' . $HTTP_GET_VARS['bID']));
        break;
      case 'insert':
      case 'update':
        if (isset($HTTP_POST_VARS['pages_id'])) $pages_id = tep_db_prepare_input($HTTP_POST_VARS['pages_id']);
        $pages_title = tep_db_prepare_input($HTTP_POST_VARS['pages_title']);
        $pages_html_text = tep_db_prepare_input($HTTP_POST_VARS['pages_html_text']);
        $sort_order = tep_db_prepare_input($HTTP_POST_VARS['sort_order']);

        $intorext = tep_db_prepare_input($HTTP_POST_VARS['intorext']);
 
if($intorext == 1)  {
       $externallink = tep_db_prepare_input($HTTP_POST_VARS['externallink']);
}
else  {
$externallink="";
}



$page_error = false;

 for ($i=0, $n=sizeof($languages); $i<$n; $i++) {

$title_field_name='pages_title_'.$languages[$i]['id'];

        if (empty($$title_field_name)) {
          $messageStack->add(ERROR_PAGE_TITLE_REQUIRED, 'error');


          $page_error = true;
        }
 }
        if (empty($pages_html_text)) {

        }


        if ($page_error == false) {




 if ($action == 'insert') {
 
   if($page_type == "1" || $page_type == "2")  {
     $selectquery=tep_db_query("select count(*) as count from ". TABLE_PAGES ." where page_type=\"$page_type\"");
     $exists = tep_db_fetch_array($selectquery);

        if($exists['count'] >= 1)  {
           $updateall=tep_db_query("update ". TABLE_PAGES ." set page_type=\"3\" where page_type=\"$page_type\"");
        }
 
   }
}


 if ($action == 'update') {
 
   if($page_type == "1" || $page_type == "2")  {
     $selectquery=tep_db_query("select count(*) as count from ". TABLE_PAGES ." where page_type=\"$page_type\" and pages_id != \"(int)$pages_id\"");
     $exists = tep_db_fetch_array($selectquery);

        if($exists['count'] >= 1)  {
           $updateall=tep_db_query("update ". TABLE_PAGES ." set page_type=\"3\" where page_type=\"$page_type\"");
        }
 
   }
}




for ($i=0, $n=sizeof($languages); $i<$n; $i++) {


$pages_titlem='pages_title_'.$languages[$i]['id'];
$pages_html_textm='pages_html_text_'.$languages[$i]['id'];
$intorextm='intorext_'.$languages[$i]['id'];
$externallinkm='externallink_'.$languages[$i]['id'];
$link_targetm='link_target_'.$languages[$i]['id'];
$language_idm='language_id_'.$languages[$i]['id'];



          $sql_data_array_pages = array('sort_order' => $sort_order,
                                        'status' => '1',
                                        'page_type'   => $page_type);

          $sql_data_array_pages_description = array('pages_title' => $$pages_titlem,
                                                    'pages_html_text' => $$pages_html_textm,
                                                    'intorext'   => $$intorextm,
                                                    'externallink' => $$externallinkm,
                                                    'link_target' => $$link_targetm);



         if ($action == 'insert') {
            
$bID="";


         if ($i == 0)  {

            tep_db_perform(TABLE_PAGES, $sql_data_array_pages);

            $pages_id = tep_db_insert_id();

         }

            $pageid_merge= array('pages_id' => $pages_id,
                                 'language_id' => $languages[$i]['id']);

            $sql_data_array_pages_desc = array_merge($sql_data_array_pages_description, $pageid_merge);

            tep_db_perform(TABLE_PAGES_DESCRIPTION, $sql_data_array_pages_desc);

            $messageStack->add_session(SUCCESS_PAGE_INSERTED, 'success');


          } elseif ($action == 'update') {


          if ($i == 0)  {
            tep_db_perform(TABLE_PAGES, $sql_data_array_pages, 'update', "pages_id = '" . (int)$pages_id . "'");
          }


          $selectexists=tep_db_query("select count( * ) as `countrecords` from `".TABLE_PAGES_DESCRIPTION."` where pages_id='" . (int)$pages_id . "' and language_id='".$languages[$i]['id']."'");
          $recordexists = tep_db_fetch_array($selectexists);

          

          if($recordexists['countrecords'] >= 1 )  {
          tep_db_perform(TABLE_PAGES_DESCRIPTION, $sql_data_array_pages_description, 'update', "pages_id = '" . (int)$pages_id . "' and language_id='".$languages[$i]['id']."'");
          }
          else  {

                $pageid_merge= array('pages_id' => $pages_id,
               'language_id' => $languages[$i]['id']);

          $sql_data_array_pages_desc = array_merge($sql_data_array_pages_description, $pageid_merge);
          tep_db_perform(TABLE_PAGES_DESCRIPTION, $sql_data_array_pages_desc);
          }


           $messageStack->add_session(SUCCESS_PAGE_UPDATED, 'success');

          }

} //for




          tep_redirect(tep_href_link(FILENAME_PAGE_MANAGER, (isset($HTTP_GET_VARS['page']) ? 'page=' . $HTTP_GET_VARS['page'] . '&' : '') . 'bID=' . $pages_id));
        } else {
          $action = 'new';
        }

        break;


      case 'deleteconfirm':
        $pages_id = tep_db_prepare_input($HTTP_GET_VARS['bID']);

        tep_db_query("delete from " . TABLE_PAGES . " where pages_id = '" . (int)$pages_id . "'");
        tep_db_query("delete from " . TABLE_PAGES_DESCRIPTION . " where pages_id = '" . (int)$pages_id . "'");

        $messageStack->add_session(SUCCESS_PAGE_REMOVED, 'success');

        tep_redirect(tep_href_link(FILENAME_PAGE_MANAGER, 'page=' . $HTTP_GET_VARS['page']));
        break;
    }

  }





?>
<!doctype html public "-//W3C//DTD HTML 4.01 Transitional//EN">
<html <?php echo HTML_PARAMS; ?>>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=<?php echo CHARSET; ?>">
<title><?php echo TITLE; ?></title>
<link rel="stylesheet" type="text/css" href="includes/stylesheet.css">
<script language="javascript" src="includes/general.js"></script>
<script language="javascript"><!--
function popupImageWindow(url) {
  window.open(url,'popupImageWindow','toolbar=no,location=no,directories=no,status=no,menubar=no,scrollbars=no,res
izable=yes,copyhistory=no,width=100,height=100,screenX=150,screenY=150,top=150,le
ft=150')
}
//--></script>

<script language=javascript src="editor/inhtml.js"></SCRIPT>

<script language="javascript">

        function disableIt(a){
         document.getElementById(a).disabled=true;
            }

        function enableIt(a){
         document.getElementById(a).disabled=false;
            }


</script>



</head>
<body marginwidth="0" marginheight="0" topmargin="0" bottommargin="0" leftmargin="0" rightmargin="0" bgcolor="#FFFFFF">
<div id="spiffycalendar" class="text"></div>
<!-- header //-->
<?php require(DIR_WS_INCLUDES . 'header.php'); ?>
<!-- header_eof //-->

<!-- body //-->
<table border="0" width="100%" cellspacing="2" cellpadding="2">
  <tr>
    <td width="<?php echo BOX_WIDTH; ?>" valign="top"><table border="0" width="<?php echo BOX_WIDTH; ?>" cellspacing="1" cellpadding="1" class="columnLeft">
<!-- left_navigation //-->
<?php require(DIR_WS_INCLUDES . 'column_left.php'); ?>
<!-- left_navigation_eof //-->
    </table></td>
<!-- body_text //-->
    <td width="100%" valign="top"><table border="0" width="100%" cellspacing="0" cellpadding="2">
      <tr>
        <td><table border="0" width="100%" cellspacing="0" cellpadding="0">
          <tr>
            <td class="pageHeading"><?php echo HEADING_TITLE; ?></td>
            <td class="pageHeading" align="right"><?php echo tep_draw_separator('pixel_trans.gif', HEADING_IMAGE_WIDTH, HEADING_IMAGE_HEIGHT); ?></td>
          </tr>
        </table></td>
      </tr>
<?php


  if ($action == 'new') {
    $form_action = 'insert';

    $parameters = array('pages_title' => '',
                        'pages_html_text' => '',
                        'sort_order' =>'',
                        'status' =>'');

    $bInfo = new objectInfo($parameters);

    if (isset($HTTP_GET_VARS['bID'])) {
      $form_action = 'update';

      $bID = tep_db_prepare_input($HTTP_GET_VARS['bID']);



      $page_query = tep_db_query("select 
                                    s.status, 
                                    s.sort_order,
                                    s.page_type,
                                    p.pages_title, 
                                    p.pages_html_text,
                                    p.intorext,
                                    p.externallink,
                                    p.link_target,
                                    p.language_id 
                                  from 
                                    " . TABLE_PAGES . " s left join " . TABLE_PAGES_DESCRIPTION . " p on s.pages_id=p.pages_id
                                  where 
                                    s.pages_id = '" . (int)$bID . "'");


#      $page = tep_db_fetch_array($page_query);
#      $bInfo->objectInfo($page);

#while($bInfo->objectInfo($page))  {
#
#$pagetitle[$bInfo->language_id]= $bInfo->pages_title;
#
#echo $bInfo->pages_title;
#
#}


while($page = tep_db_fetch_array($page_query))  {

$languageid=$page['language_id'];
$page_type=$page['page_type'];

$pagetitle[$languageid]= $page['pages_title'];
$sortorder=$page['sort_order'];
$pages_html_text[$languageid]=$page['pages_html_text'];
$intorext[$languageid]=$page['intorext'];
$externallink[$languageid]=$page['externallink'];
$link_target[$languageid]=$page['link_target'];
}


    } elseif (tep_not_null($HTTP_POST_VARS)) {
      $bInfo->objectInfo($HTTP_POST_VARS);
    }

$bIDif="";
if(!empty($bID) && $bID != "")  {
$bIDif='&bID='.$bID;
}

?>


      <tr>
        <td><?php echo tep_draw_separator('pixel_trans.gif', '1', '10'); ?></td>
      </tr>



 




      <tr><?php echo tep_draw_form('new_page', FILENAME_PAGE_MANAGER, (isset($HTTP_GET_VARS['page']) ? 'page=' . $HTTP_GET_VARS['page'] . '&' : '') . 'action=' . $form_action.$bIDif, 'post', 'enctype="multipart/form-data"'); if ($form_action == 'update') echo tep_draw_hidden_field('pages_id', $bID); ?>
        <td><table border="0" cellspacing="0" cellpadding="2">

 <tr>
            <td class="main"><?php echo TEXT_PAGES_TYPE; ?></td>
            <td class="main"><?echo tep_draw_separator('pixel_trans.gif', '24', '15') . '&nbsp;'?><select name="page_type" size=1>
                                 <option value="3" <? if($page_type == 3) { echo "selected"; } ?>>Other</option>
                                 <option value="1" <? if($page_type == 1) { echo "selected"; } ?>>Index</option>
                                 <option value="2" <? if($page_type == 2) { echo "selected"; } ?>>Contact Us</option>
                                 </select></td>
          </tr>


<?
 for ($i=0, $n=sizeof($languages); $i<$n; $i++) {
?>
          <tr>
            <td class="main"><?php if ($i == 0) echo TEXT_PAGES_TITLE; ?></td>
            <td class="main">

<?php 
echo tep_image(DIR_WS_CATALOG_LANGUAGES . $languages[$i]['directory'] . '/images/' . $languages[$i]['image'], $languages[$i]['name']). '&nbsp;'.tep_draw_input_field('pages_title_'.$languages[$i]['id'], $pagetitle[$languages[$i]['id']], '', true); 
}

?>


</td>
          </tr>

          <tr>
            <td class="main"><?php echo TEXT_PAGES_SORT_ORDER; ?></td>
            <td class="main"><?php echo tep_draw_separator('pixel_trans.gif', '24', '15') . '&nbsp;' .  tep_draw_input_field('sort_order', $sortorder, '', false); ?></td>
          </tr>




</tr>

          <tr>
            <td class="main">&nbsp;</td>
            <td class="main">&nbsp;</td>
          </tr>




<?
 for ($i=0, $n=sizeof($languages); $i<$n; $i++) {
?>


<?php if(empty($intorext[$languages[$i]['id']]) or $intorext[$languages[$i]['id']] == "0")  {
$internalchecked="checked";
$externalchecked="";
$disabledlinkbox="disabled";
}
else {
$internalchecked="";
$externalchecked="checked";
$disabledlinkbox="";
}

?>


 <tr>
            <td class="main"><?php echo TEXT_PAGES_INTEXT; ?></td>
            <td class="main">
          <?  echo tep_image(DIR_WS_CATALOG_LANGUAGES . $languages[$i]['directory'] . '/images/' . $languages[$i]['image'], $languages[$i]['name']) ?><input type="radio" value="0" name="intorext_<?php echo $languages[$i]['id']; ?>" <?php echo $internalchecked; ?> onClick='disableIt("<? echo 'externallink_'.$languages[$i]['id']; ?>");'><? echo TEXT_TARGET_INTERNAL; ?>
            &nbsp;&nbsp;
            <? echo tep_draw_separator('pixel_trans.gif', '24', '15'); ?><input type="radio" value="1" name="intorext_<?php echo $languages[$i]['id']; ?>" <?php echo $externalchecked;?> onClick='enableIt("<? echo 'externallink_'.$languages[$i]['id']; ?>");'><? echo TEXT_TARGET_EXTERNAL; ?>
</td>
          </tr>

  <tr>
            <td class="main"><?php echo TEXT_PAGES_EXTERNAL_LINK; ?></td>
            <td class="main"><?php echo tep_image(DIR_WS_CATALOG_LANGUAGES . $languages[$i]['directory'] . '/images/' . $languages[$i]['image'], $languages[$i]['name']).'&nbsp;'.tep_draw_input_field('externallink_'.$languages[$i]['id'], $externallink[$languages[$i]['id']], 'id='.'"externallink_'.$languages[$i]['id'].'"'. $disabledlinkbox, false); ?></td>
          </tr>



<?php if(empty($link_target[$languages[$i]['id']]) or $link_target[$languages[$i]['id']] == "0")  {
$samewindowchecked="checked";
$newwindowchecked="";
}
else {
$samewindowchecked="";
$newwindowchecked="checked";
}
?>

  <tr>
            <td class="main"><?php echo TEXT_TARGET; ?></td>

            <td class="main">

<?php echo tep_image(DIR_WS_CATALOG_LANGUAGES . $languages[$i]['directory'] . '/images/' . $languages[$i]['image'], $languages[$i]['name']);?><input type="radio" value="0" name="link_target_<?php echo $languages[$i]['id']; ?>" <?php echo $samewindowchecked; ?>><? echo TEXT_TARGET_SAMEWINDOW; ?>

<input type="radio" value="1" name="link_target_<?php echo $languages[$i]['id']; ?>" <?php echo $newwindowchecked; ?>><? echo TEXT_TARGET_NEWWINDOW; ?>


</td>
          </tr>




<tr>
            <td colspan="2"><?php echo tep_draw_separator('pixel_trans.gif', '1', '10'); ?></td>
          </tr>


<?
}
?>

<?
 for ($i=0, $n=sizeof($languages); $i<$n; $i++) {
?>
          
          <tr>
            <td valign="top" class="main"><?php if ($i == 0) echo TEXT_PAGES_HTML_TEXT; ?>

<br>

<input type="button" value="<? echo RICH_EDIT; ?>" onClick="edit(pages_html_text_<? echo $languages[$i]['id']; ?>)">
</td>
            <td class="main"><?php echo tep_image(DIR_WS_CATALOG_LANGUAGES . $languages[$i]['directory'] . '/images/' . $languages[$i]['image'], $languages[$i]['name']). '&nbsp;'.tep_draw_textarea_field('pages_html_text_'.$languages[$i]['id'], 'soft', '80', '20', $pages_html_text[$languages[$i]['id']]); ?>
</td>
</tr>

<?
}
?>


          <tr>
            <td colspan="2"><?php echo tep_draw_separator('pixel_trans.gif', '1', '10'); ?></td>
          </tr>
        </table></td>
      </tr>
      <tr>
        <td><?php echo tep_draw_separator('pixel_trans.gif', '1', '10'); ?></td>
      </tr>
      <tr>
        <td><table border="0" width="100%" cellspacing="0" cellpadding="2">
          <tr>
            <td class="main" align="center"><?php echo TEXT_PAGES_PAGE_NOTE . '<br>'; ?></td>
            <td class="main" align="right" valign="top" nowrap><?php echo (($form_action == 'insert') ? tep_image_submit('button_insert.gif', IMAGE_INSERT) : tep_image_submit('button_update.gif', IMAGE_UPDATE)). '&nbsp;&nbsp;<a href="' . tep_href_link(FILENAME_PAGE_MANAGER, (isset($HTTP_GET_VARS['page']) ? 'page=' . $HTTP_GET_VARS['page'] . '&' : '') . (!empty($bID) and $bID != "" ? 'bID=' . $bID : '')) . '">' . tep_image_button('button_cancel.gif', IMAGE_CANCEL) . '</a>'; ?></td>
          </tr>
        </table>

<input type="hidden" name="bID" value="<? echo $bID; ?>">

</td>
      </form></tr>
<?php
  } else {
?>
      <tr>
        <td><table border="0" width="100%" cellspacing="0" cellpadding="0">
          <tr>
            <td valign="top"><table border="0" width="100%" cellspacing="0" cellpadding="2">
              <tr class="dataTableHeadingRow" width="100%">
                <td class="dataTableHeadingContent"><?php echo TABLE_HEADING_PAGES; ?></td>
                <td class="dataTableHeadingContent"></td>
                <td class="dataTableHeadingContent"><?php echo TABLE_HEADING_SORT_ORDER; ?></td>
                <td class="dataTableHeadingContent" align="center"><?php echo TABLE_HEADING_STATUS; ?></td>
                <td class="dataTableHeadingContent"></td>
                <td class="dataTableHeadingContent"></td>
              </tr>

<?php
    $pages_query_raw = "select 
                           p.pages_id, 
                           p.status, 
                           p.sort_order,
                           s.pages_title
                        from 
                           " . TABLE_PAGES . " p LEFT JOIN " .TABLE_PAGES_DESCRIPTION . " s on p.pages_id = s.pages_id
                        where
                           s.language_id='" . (int)$languages_id . "'
                        order by 
                           p.sort_order, s.pages_title";


    $pages_split = new splitPageResults($HTTP_GET_VARS['page'], MAX_DISPLAY_SEARCH_RESULTS, $pages_query_raw, $pages_query_numrows);
    $pages_query = tep_db_query($pages_query_raw);
    while ($pages = tep_db_fetch_array($pages_query)) {



      if ((!isset($HTTP_GET_VARS['bID']) || (isset($HTTP_GET_VARS['bID']) && ($HTTP_GET_VARS['bID'] == $pages['pages_id']))) && !isset($bInfo) && (substr($action, 0, 3) != 'new')) {
        $bInfo_array = array_merge($pages, $info);
        $bInfo = new objectInfo($bInfo_array);
      }


      if (isset($bInfo) && is_object($bInfo) && ($pages['pages_id'] == $bInfo->pages_id)) {
        echo '              <tr id="defaultSelected" class="dataTableRowSelected" onmouseover="rowOverEffect(this)" onmouseout="rowOutEffect(this)" onclick="document.location.href=\'' . tep_href_link(FILENAME_PAGE_MANAGER, 'page=' . $HTTP_GET_VARS['page'] . '&bID=' . $pages['pages_id']) . '\'">' . "\n";
      } else {
        echo '              <tr class="dataTableRow" onmouseover="rowOverEffect(this)" onmouseout="rowOutEffect(this)" onclick="document.location.href=\'' . tep_href_link(FILENAME_PAGE_MANAGER, 'page=' . $HTTP_GET_VARS['page'] . '&bID=' . $pages['pages_id']) . '\'">' . "\n";
      }
?>


                <td class="dataTableContent"><?php echo '<a href="javascript:popupImageWindow(\'' . FILENAME_POPUP_IMAGE . '?page=' . $pages['pages_id'] . '\')">' . tep_image(DIR_WS_IMAGES . 'icon_popup.gif', 'View Page') . '</a>&nbsp;' . $pages['pages_title']; ?></td>
                <td class="dataTableContent" align="right"></td>
                <td class="dataTableContent"><?php echo $pages['sort_order']; ?></td>
                <td class="dataTableContent" align="center">
<?php
      if ($pages['status'] == '1') {
        echo tep_image(DIR_WS_IMAGES . 'icon_status_green.gif', 'Active', 10, 10) . '&nbsp;&nbsp;<a href="' . tep_href_link(FILENAME_PAGE_MANAGER, 'page=' . $HTTP_GET_VARS['page'] . '&bID=' . $pages['pages_id'] . '&action=setflag&flag=0') . '">' . tep_image(DIR_WS_IMAGES . 'icon_status_red_light.gif', 'Set Inactive', 10, 10) . '</a>';
      } else {
        echo '<a href="' . tep_href_link(FILENAME_PAGE_MANAGER, 'page=' . $HTTP_GET_VARS['page'] . '&bID=' . $pages['pages_id'] . '&action=setflag&flag=1') . '">' . tep_image(DIR_WS_IMAGES . 'icon_status_green_light.gif', 'Set Active', 10, 10) . '</a>&nbsp;&nbsp;' . tep_image(DIR_WS_IMAGES . 'icon_status_red.gif', 'Inactive', 10, 10);
      }
?></td>
                <td class="dataTableContent" align="right"></td>
                <td class="dataTableContent" align="right"></td>
              </tr>
<?php
    }
?>
              <tr>
                <td colspan="5"><table border="0" width="100%" cellspacing="0" cellpadding="2">
                  <tr>
                    <td class="smallText" valign="top"><?php echo $pages_split->display_count($pages_query_numrows, MAX_DISPLAY_SEARCH_RESULTS, $HTTP_GET_VARS['page'], TEXT_DISPLAY_NUMBER_OF_PAGES); ?></td>
                    <td class="smallText" align="right"><?php echo $pages_split->display_links($pages_query_numrows, MAX_DISPLAY_SEARCH_RESULTS, MAX_DISPLAY_PAGE_LINKS, $HTTP_GET_VARS['page']); ?></td>
                  </tr>
                  <tr>
                    <td align="right" colspan="2"><?php echo '<a href="' . tep_href_link(FILENAME_PAGE_MANAGER, 'action=new') . '">' . tep_image_button('button_new_file.gif', IMAGE_NEW_PAGE) . '</a>'; ?></td>
                  </tr>
                </table></td>
              </tr>
            </table></td>
<?php
  $heading = array();
  $contents = array();
  switch ($action) {
    case 'delete':
      $heading[] = array('text' => '<b>' . $bInfo->pages_title . '</b>');

      $contents = array('form' => tep_draw_form('pages', FILENAME_PAGE_MANAGER, 'page=' . $HTTP_GET_VARS['page'] . '&bID=' . $bInfo->pages_id . '&action=deleteconfirm'));
      $contents[] = array('text' => TEXT_INFO_DELETE_INTRO);
      $contents[] = array('text' => '<br><b>' . $bInfo->pages_title . '</b>');
      if ($bInfo->pages_image) $contents[] = array('text' => '<br>' . tep_draw_checkbox_field('delete_image', 'on', true) . ' ' . TEXT_INFO_DELETE_IMAGE);
      $contents[] = array('align' => 'center', 'text' => '<br>' . tep_image_submit('button_delete.gif', IMAGE_DELETE) . '&nbsp;<a href="' . tep_href_link(FILENAME_PAGE_MANAGER, 'page=' . $HTTP_GET_VARS['page'] . '&bID=' . $HTTP_GET_VARS['bID']) . '">' . tep_image_button('button_cancel.gif', IMAGE_CANCEL) . '</a>');
      break;
    default:
      if (is_object($bInfo)) {
        $heading[] = array('text' => '<b>' . $bInfo->pages_title . '</b>');

        $contents[] = array('align' => 'center', 'text' => '<br><br><a href="' . tep_href_link(FILENAME_PAGE_MANAGER, 'page=' . $HTTP_GET_VARS['page'] . '&bID=' . $bInfo->pages_id . '&action=new') . '">' . tep_image_button('button_edit.gif', IMAGE_EDIT) . '</a> <a href="' . tep_href_link(FILENAME_PAGE_MANAGER, 'page=' . $HTTP_GET_VARS['page'] . '&bID=' . $bInfo->pages_id . '&action=delete') . '">' . tep_image_button('button_delete.gif', IMAGE_DELETE) . '</a><br><br><br>');

        if ($bInfo->date_scheduled) $contents[] = array('text' => '<br>' . sprintf(TEXT_PAGES_SCHEDULED_AT_DATE, tep_date_short($bInfo->date_scheduled)));

        if ($bInfo->expires_date) {
          $contents[] = array('text' => '<br>' . sprintf(TEXT_PAGES_EXPIRES_AT_DATE, tep_date_short($bInfo->expires_date)));
        } elseif ($bInfo->expires_impressions) {
          $contents[] = array('text' => '<br>' . sprintf(TEXT_PAGES_EXPIRES_AT_IMPRESSIONS, $bInfo->expires_impressions));
        }

        if ($bInfo->date_status_change) $contents[] = array('text' => '<br>' . sprintf(TEXT_PAGES_STATUS_CHANGE, tep_date_short($bInfo->date_status_change)));
      }
      break;
  }

  if ( (tep_not_null($heading)) && (tep_not_null($contents)) ) {
    echo '            <td width="25%" valign="top">' . "\n";

    $box = new box;
    echo $box->infoBox($heading, $contents);

    echo '            </td>' . "\n";
  }
?>
          </tr>
        </table></td>
      </tr>
<?php
  }
?>
    </table></td>
<!-- body_text_eof //-->
  </tr>
</table>
<!-- body_eof //-->

<!-- footer //-->
<?php require(DIR_WS_INCLUDES . 'footer.php'); ?>
<!-- footer_eof //-->
<br>
</body>
</html>
<?php require(DIR_WS_INCLUDES . 'application_bottom.php'); ?>


#36 JJCoolbean

  • Community Member
  • 14 posts
  • Real Name:Mack Duggan

Posted 11 May 2005, 21:19

Does anyone know how to use this contribution but still be able to display new products in the body of the index page? Any help is much appreciated. Thanks.

#37 skipwater

  • Community Member
  • 41 posts
  • Real Name:Skip Water
  • Gender:Male
  • Location:Washington DC

Posted 12 May 2005, 02:21

JJCoolbean, on May 11 2005, 05:19 PM, said:

Does anyone know how to use this contribution but still be able to display new products in the body of the index page?  Any help is much appreciated.  Thanks.

<{POST_SNAPBACK}>


Under admin page manger you should have a index page already there all you have to do is add the text you want.

This is how your index page should look.

This is page manager: Displays page manager text
echo $page_check[pages_html_text];

This is New Products: Displays Products that meet new status.
include(DIR_WS_MODULES . FILENAME_NEW_PRODUCTS);

This is Upcoming Products: Displays Products that meet upcoming status.
include(DIR_WS_MODULES . FILENAME_UPCOMING_PRODUCTS);

  
<!-- page manager -->
         <tr> 
            <td class="main"><?php echo $page_check[pages_html_text]; ?></td>
          </tr> 
         
          <tr>
            <td><?php echo tep_draw_separator('pixel_trans.gif', '100%', '10'); ?></td>
          </tr>
          <tr>
            <td><?php  include(DIR_WS_MODULES . FILENAME_NEW_PRODUCTS); ?></td>
          </tr>
<?php
    include(DIR_WS_MODULES . FILENAME_UPCOMING_PRODUCTS);
?>
        </table></td>
      </tr>
    </table></td>
<?php
  }
?>
<!-- body_text_eof //-->

If only I could remember that.

#38 JJCoolbean

  • Community Member
  • 14 posts
  • Real Name:Mack Duggan

Posted 12 May 2005, 05:26

Thanks a lot, skipwater.

#39 raevsky

  • Community Member
  • 6 posts
  • Real Name:Sergey Raevsky

Posted 20 May 2005, 06:34

Does anybody know, is it possible to create multilevel menu with this contribution?

For example:

MAIN PAGE
->about us
->history of company
->articles
.....
TECHNICAL MANUALS
->.....
->.....
CONTACTS
->sales dept
->tech dept

It will be interesting to use this contribution instead of Mambo or PHP-Nuck
Thanks in advance

#40 raevsky

  • Community Member
  • 6 posts
  • Real Name:Sergey Raevsky

Posted 20 May 2005, 11:40

I need help!
When I'v intalled Page Manager and open it in admin I received this error:
What does it mean and what I did incorrect?

HEADING_TITLE

TABLE_HEADING_PAGES TABLE_HEADING_SORT_ORDER TABLE_HEADING_STATUS
1064 - You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near '-20, 20' at line 11

select p.pages_id, p.status, p.sort_order, s.pages_title from pages p LEFT JOIN pages_description s on p.pages_id = s.pages_id where s.language_id='4' order by p.sort_order, s.pages_title limit -20, 20

[TEP STOP]