contentBoxHeading class

Messagepar Jamez » Mer 10 Jan 2007, 12:50

Hi,
In every sidebox contribution at osc exists contentBoxHeading refering to contentBoxHeading class which does not exist in oscss.
What do we have to do?
Do we just remove it from the files (comment it out?).
Thanks in advance.
Jamez
Membre inactif
 
Messages: 1
Inscription: Mar 09 Jan 2007, 09:51

Messagepar stepibou » Mer 10 Jan 2007, 13:38

Hi,

yes this is the interresting part of oscss.

just do nothing!

you can modify CSS in templates/your template/stylesheet.css
or on clean template :
templates/clean/css/boxes.css
very easy!

bye
--> osCSS inside <--
stepibou
Membre très actif
 
Messages: 274
Inscription: Dim 30 Oct 2005, 02:15
Localisation: Lyon

Messagepar Reesy » Jeu 11 Jan 2007, 21:28

Hi,
Sorry what do you mean "just do nothing" ive tried removing the code but it makes the whole module dissapear.

Thanks
Reesy
Membre actif
 
Messages: 20
Inscription: Sam 11 Nov 2006, 17:32

Messagepar stepibou » Jeu 11 Jan 2007, 22:31

yes ok!

I didn't understood what you mean!

you've got a oscommerce box (contribution)
that you want to convert to oscss?

put the code of your box here, i will help you!

;)
--> osCSS inside <--
stepibou
Membre très actif
 
Messages: 274
Inscription: Dim 30 Oct 2005, 02:15
Localisation: Lyon

Messagepar Reesy » Dim 21 Jan 2007, 09:55

Hi, thanks for the help...
I think im missing something simple here.... (I hope).

Code: Tout sélectionner
<?php
// set application wide parameters
// this query set is for NewsDesk
$configuration_query = tep_db_query("select configuration_key as cfgKey, configuration_value as cfgValue from " . TABLE_NEWSDESK_CONFIGURATION . "");
while ($configuration = tep_db_fetch_array($configuration_query)) {
  define($configuration['cfgKey'], $configuration['cfgValue']);
}

if ( DISPLAY_LATEST_NEWS_BOX ) {
?>
<!-- newsdesk //-->
 <tr>
    <td>
<?php

// set application wide parameters
// this query set is for NewsDesk

$configuration_query = tep_db_query("select configuration_key as cfgKey, configuration_value as cfgValue from " . TABLE_NEWSDESK_CONFIGURATION . "");
while ($configuration = tep_db_fetch_array($configuration_query)) {
  define($configuration['cfgKey'], $configuration['cfgValue']);
}


$latest_news_var_query = tep_db_query(
'select p.newsdesk_id, pd.language_id, pd.newsdesk_article_name, pd.newsdesk_article_description, pd.newsdesk_article_shorttext, pd.newsdesk_article_url, pd.newsdesk_article_url_name,
p.newsdesk_image, p.newsdesk_date_added, p.newsdesk_last_modified,
p.newsdesk_date_available, p.newsdesk_status  from ' . TABLE_NEWSDESK . ' p, ' . TABLE_NEWSDESK_DESCRIPTION . '
pd WHERE pd.newsdesk_id = p.newsdesk_id and pd.language_id = "' . $languages_id . '" and newsdesk_status = 1 ORDER BY newsdesk_date_added DESC LIMIT ' . LATEST_DISPLAY_NEWSDESK_NEWS);



if (!tep_db_num_rows($latest_news_var_query)) { // there is no news
// echo '<!-- ' . TEXT_NO_NEWSDESK_NEWS . ' -->';

} else {

//$info_box_contents = array();
//$info_box_contents[] = array(
  //  'align' => 'left',
    //'text'  => BOX_HEADING_NEWSDESK_LATEST
  //);

//new infoBoxHeading($info_box_contents, false, false);

$latest_news_string = '';

$row = 0;
while ($latest_news = tep_db_fetch_array($latest_news_var_query))  {
$latest_news['newsdesk'] = array(
    'name' => $latest_news['newsdesk_article_name'],
    'id' => $latest_news['newsdesk_id'],
    'date' => $latest_news['newsdesk_date_added'],
  );

$latest_news_string .= '<a class="smallText" href="';
$latest_news_string .= tep_href_link(FILENAME_NEWSDESK_INFO, 'newsdesk_id=' . $latest_news['newsdesk_id']);
$latest_news_string .= '">';
$latest_news_string .= $latest_news['newsdesk_article_name'];
$latest_news_string .= '</a>';
$latest_news_string .= '<br>';

//$info_box_contents = array();
//$info_box_contents[] = array(
 //  'align' => 'left',
    //'params' => 'class="smallText" valign="top"',
   //'text'  => $latest_news_string);

  //$row++;
}

//new contentBox($info_box_contents);
}

?>

<!-- newsdesk_eof //-->
   </td>
 </tr>
<?php
} else {
}
?>

<?php
/*

  osCommerce, Open Source E-Commerce Solutions ---- http://www.oscommerce.com
 Copyright (c) 2002 osCommerce
 Released under the GNU General Public License

 IMPORTANT NOTE:

 This script is not part of the official osC distribution but an add-on contributed to the osC community.
  Please read the NOTE and INSTALL documents that are provided with this file for further information and installation notes.
 
  script name:      NewsDesk
  version:            1.48.2
  date:             22-06-2004 (dd/mm/yyyy)
 original author:    Carsten aka moyashi
 web site:           www..com
  modified code by:   Wolfen aka 241
*/
?>
Reesy
Membre actif
 
Messages: 20
Inscription: Sam 11 Nov 2006, 17:32

Messagepar Reesy » Dim 21 Jan 2007, 09:59

oooooooooops

I think this is right
Code: Tout sélectionner
<?php
// set application wide parameters
// this query set is for NewsDesk
$configuration_query = tep_db_query("select configuration_key as cfgKey, configuration_value as cfgValue from " . TABLE_NEWSDESK_CONFIGURATION . "");
while ($configuration = tep_db_fetch_array($configuration_query)) {
 define($configuration['cfgKey'], $configuration['cfgValue']);
}

if ( DISPLAY_LATEST_NEWS_BOX ) {
?>
<!-- newsdesk //-->
<div class="boxes">
<?php

// set application wide parameters
// this query set is for NewsDesk

$configuration_query = tep_db_query("select configuration_key as cfgKey, configuration_value as cfgValue from " . TABLE_NEWSDESK_CONFIGURATION . "");
while ($configuration = tep_db_fetch_array($configuration_query)) {
 define($configuration['cfgKey'], $configuration['cfgValue']);
}


$latest_news_var_query = tep_db_query(
'select p.newsdesk_id, pd.language_id, pd.newsdesk_article_name, pd.newsdesk_article_description, pd.newsdesk_article_shorttext, pd.newsdesk_article_url, pd.newsdesk_article_url_name,
p.newsdesk_image, p.newsdesk_date_added, p.newsdesk_last_modified,
p.newsdesk_date_available, p.newsdesk_status  from ' . TABLE_NEWSDESK . ' p, ' . TABLE_NEWSDESK_DESCRIPTION . '
pd WHERE pd.newsdesk_id = p.newsdesk_id and pd.language_id = "' . $languages_id . '" and newsdesk_status = 1 ORDER BY newsdesk_date_added DESC LIMIT ' . LATEST_DISPLAY_NEWSDESK_NEWS);



if (!tep_db_num_rows($latest_news_var_query)) { // there is no news
// echo '<!-- ' . TEXT_NO_NEWSDESK_NEWS . ' -->';

} else {

//$info_box_contents = array();
//$info_box_contents[] = array(
  //  'align' => 'left',
    //'text'  => BOX_HEADING_NEWSDESK_LATEST
  //);

//new infoBoxHeading($info_box_contents, false, false);

$latest_news_string = '';

$row = 0;
while ($latest_news = tep_db_fetch_array($latest_news_var_query))  {
$latest_news['newsdesk'] = array(
    'name' => $latest_news['newsdesk_article_name'],
    'id' => $latest_news['newsdesk_id'],
    'date' => $latest_news['newsdesk_date_added'],
  );

$latest_news_string .= '<a class="smallText" href="';
$latest_news_string .= tep_href_link(FILENAME_NEWSDESK_INFO, 'newsdesk_id=' . $latest_news['newsdesk_id']);
$latest_news_string .= '">';
$latest_news_string .= $latest_news['newsdesk_article_name'];
$latest_news_string .= '</a>';
$latest_news_string .= '<br>';

//$info_box_contents = array();
//$info_box_contents[] = array(
 //  'align' => 'left',
    //'params' => 'class="smallText" valign="top"',
   //'text'  => $latest_news_string);

  //$row++;
}

//new contentBox($info_box_contents);
}

?>

<!-- newsdesk_eof //-->
<?php
} else {
}
?>

<?php
/*

  osCommerce, Open Source E-Commerce Solutions ---- http://www.oscommerce.com
 Copyright (c) 2002 osCommerce
 Released under the GNU General Public License

 IMPORTANT NOTE:

 This script is not part of the official osC distribution but an add-on contributed to the osC community.
  Please read the NOTE and INSTALL documents that are provided with this file for further information and installation notes.
 
  script name:      NewsDesk
  version:            1.48.2
  date:             22-06-2004 (dd/mm/yyyy)
 original author:    Carsten aka moyashi
 web site:           www..com
  modified code by:   Wolfen aka 241
*/
?>
</div>
Reesy
Membre actif
 
Messages: 20
Inscription: Sam 11 Nov 2006, 17:32

Messagepar stepibou » Dim 21 Jan 2007, 15:42

Hello,

You can try this : ( tell me if it doesn't work and why..)

You can see how i simply changed it to be compatible with oscss :
Watch on this example, and you will be able to do so in other files, i hope.

Code: Tout sélectionner
<?php
/*
  $Id: Newsdesk.php,v 1.1 2006/11/22 15:51:51 stepibou Exp $
+-----------------------------------------------------------------------+
|                  osCSS Open Source E-commerce                         |
+-----------------------------------------------------------------------+
| Copyright (c) 2005 The osCSS developers                               |
|                                                                       |
| http://www.counteractdesign.com                                       |
|                                                                       |
| Portions Copyright (c) 2003 osCommerce                                |
+-----------------------------------------------------------------------+
| This source file is subject to version 2.0 of the GPL license,        |
| available at the following url:                                       |
| http://www.counteractdesign.com/license/2_0.txt.                      |
+-----------------------------------------------------------------------+
*/

if ( DISPLAY_LATEST_NEWS_BOX ) {
?>
<!-- newsdesk //-->
<div class="boxes">
<?php
// set application wide parameters
// this query set is for NewsDesk
$configuration_query = tep_db_query("select configuration_key as cfgKey, configuration_value as cfgValue from " . TABLE_NEWSDESK_CONFIGURATION . "");
while ($configuration = tep_db_fetch_array($configuration_query)) {
    define($configuration['cfgKey'], $configuration['cfgValue']);
}


$latest_news_var_query = tep_db_query(
'select p.newsdesk_id, pd.language_id, pd.newsdesk_article_name, pd.newsdesk_article_description, pd.newsdesk_article_shorttext, pd.newsdesk_article_url, pd.newsdesk_article_url_name,
p.newsdesk_image, p.newsdesk_date_added, p.newsdesk_last_modified,
p.newsdesk_date_available, p.newsdesk_status  from ' . TABLE_NEWSDESK . ' p, ' . TABLE_NEWSDESK_DESCRIPTION . '
pd WHERE pd.newsdesk_id = p.newsdesk_id and pd.language_id = "' . $languages_id . '" and newsdesk_status = 1 ORDER BY newsdesk_date_added DESC LIMIT ' . LATEST_DISPLAY_NEWSDESK_NEWS);



if (!tep_db_num_rows($latest_news_var_query)) { // there is no news
    echo /*'<!-- ' .*/ TEXT_NO_NEWSDESK_NEWS /*. ' -->'*/;

} else {
?>
 <h4 class="<?php echo $language ;?>"><?php echo BOX_HEADING_NEWSDESK_LATEST ;?></h4>

  <ul>
<?php
$latest_news_string = '';

$row = 0;
while ($latest_news = tep_db_fetch_array($latest_news_var_query))  {
$latest_news['newsdesk'] = array(
        'name' => $latest_news['newsdesk_article_name'],
        'id' => $latest_news['newsdesk_id'],
        'date' => $latest_news['newsdesk_date_added'],
    );

$latest_news_string .= '<li><a class="smallText" href="'. tep_href_link(FILENAME_NEWSDESK_INFO, 'newsdesk_id=' . $latest_news['newsdesk_id']). '">'. $latest_news['newsdesk_article_name']. '</a></li>'."n";

}

echo $latest_news_string;
?>
  </ul>
<?php
}
?>

<!-- newsdesk_eof //-->
<?php
}
?>

</div>

see you!
--> osCSS inside <--
stepibou
Membre très actif
 
Messages: 274
Inscription: Dim 30 Oct 2005, 02:15
Localisation: Lyon

Messagepar Reesy » Dim 21 Jan 2007, 18:49

Thats great thanks!
Reesy
Membre actif
 
Messages: 20
Inscription: Sam 11 Nov 2006, 17:32


Retourner vers Developpement

Qui est en ligne

Utilisateurs parcourant ce forum: Aucun utilisateur enregistré et 2 invités

cron