Jump to content
xt:Commerce Community Forum

Neuer Contentbereich Im Content Manager


nom

Recommended Posts

Hallo,

Ich m?chte eine neue Contentbox erstellen, hab folgendes gemacht:

habe mit PhpMyAdmin ein neuer Bereich "Content1" angelegt, so wie Content und Informationen in der Administration unter Content Manager.


# Table structure for table `cm_file_flags`

#


CREATE TABLE cm_file_flags (

 file_flag int(11) NOT NULL default '0',

 file_flag_name varchar(32) NOT NULL default '',

 PRIMARY KEY (file_flag)

) TYPE=MyISAM;


#

# Dumping data for table `cm_file_flags`

#


INSERT INTO cm_file_flags (file_flag, file_flag_name) VALUES (0, 'information');

INSERT INTO cm_file_flags (file_flag, file_flag_name) VALUES (1, 'content');

INSERT INTO cm_file_flags (file_flag, file_flag_name) VALUES (2, 'content1');

habe auch in index.html einen Smarty-Tag hizugef?gt
{$box_CONTENT1}
und eine html (box_content1.html) und php (content1.php) Datei im Template-Ordner erstellt. Dann in boxes.php folgendes hinzugef?gt
require(DIR_WS_BOXES . 'content1.php');

Mit dem Content Manager ein Test Content angelegt und unter Box: Content1 ausgew?hlt, Sprache: Deutsch usw.

Trotzallem wird die neue Contentbox im Shop nicht angezeigt, was habe ich vergessen? Es muss doch irgendwo eine Definition von Smarty-Tag definiert werden

{$box_CONTENT1}=box_content1.html

oder so was ?nhliches, oder verstehe ich das falsch?

danke

Link to comment
Share on other sites

hier ist sie ..


<?php

/* -----------------------------------------------------------------------------------------

  $Id: content1.php,v 1.2 2004/02/17 16:20:07 fanta2k Exp $  


  XT-Commerce - community made shopping

  http://www.xt-commerce.com


  Copyright (c) 2003 XT-Commerce

  -----------------------------------------------------------------------------------------

  based on: 

  (c) 2000-2001 The Exchange Project (earlier name of osCommerce)

  (c) 2002-2003 osCommerce(information.php,v 1.6 2003/02/10); [url]www.oscommerce.com[/url] 

  (c) 2003 nextcommerce (content.php,v 1.2 2003/08/21); [url]www.nextcommerce.org[/url]


  Released under the GNU General Public License 

  ---------------------------------------------------------------------------------------*/

$box_smarty = new smarty;

$box_smarty->assign('tpl_path','templates/'.CURRENT_TEMPLATE.'/'); 

$content_string='';

$content_query=xtc_db_query("SELECT

   content_id,

   categories_id,

   parent_id,

   content_title,

   content_group

   FROM ".TABLE_CONTENT_MANAGER."

   WHERE languages_id='".(int)$_SESSION['languages_id']."'

   and file_flag=2 and content_status=2");

 while ($content_data=xtc_db_fetch_array($content_query)) {


 $content_string .= '<img src="templates/' . CURRENT_TEMPLATE . '/img/010.gif"><a href="' . xtc_href_link(FILENAME_CONTENT,'coID='.$content_data['content_group']) . '">' . $content_data['content_title'] . '</a><br>';	

}

if ($content_string!='') {





 $box_smarty->assign('BOX_CONTENT', $content_string);

	$box_smarty->assign('language', $_SESSION['language']);

   // set cache ID

 if (USE_CACHE=='false') {

 $box_smarty->caching = 0;

 $box_content1= $box_smarty->fetch(CURRENT_TEMPLATE.'/boxes/box_content1.html');

 } else {

 $box_smarty->caching = 1;

 $box_smarty->cache_lifetime=CACHE_LIFETIME;

 $box_smarty->cache_modified_check=CACHE_CHECK;

 $cache_id = $_SESSION['language'];

 $box_content1= $box_smarty->fetch(CURRENT_TEMPLATE.'/boxes/box_content1.html',$cache_id);

 }


  $smarty->assign('box_CONTENT1',$box_content1);




}

?>

Link to comment
Share on other sites

  • 4 weeks later...

Archived

This topic is now archived and is closed to further replies.

×
  • Create New...