Jump to content
  • Checkout
  • Login
  • Get in touch

osCommerce

The e-commerce.

News box with admin


indigo11

Recommended Posts

Well, how ghetto do you want it? ;)

 

Run the SQL ..

 

INSERT INTO configuration (configuration_id, configuration_title, configuration_key, configuration_value, configuration_description, configuration_group_id, sort_order, last_modified, date_added, use_function, set_function) VALUES ('555', 'News Snippet', 'NEWS_SNIPPET', 'Some news', 'You can fit 255 characters here', 1, 99, '2004-07-09 11:45:52', '2004-07-09 11:45:52', NULL, NULL);

 

Create a new PHP file called news.php and put it in includes/boxes/:

 

<?php
/*
?$Id: news.php,v 0.01 Ghetto Beta 2004/07/10 10:31:05 doh Exp $

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

?Copyright (c) 2003 osCommerce

?Released under the GNU General Public License
*/
?>
<!-- news //-->
? ? ? ? ?<tr>
? ? ? ? ? ?<td>
<?php
?$info_box_contents = array();
?$info_box_contents[] = array('text' => 'News');

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

?$info_box_contents = array();
?$info_box_contents[] = array('text' => NEWS_SNIPPET);

?new infoBox($info_box_contents);
?>
? ? ? ? ? ?</td>
? ? ? ? ?</tr>
<!-- news //-->

 

Add the includes/requires to whichever column and you're done. Now you can add 255 characters worth of news in admin. lol

Link to comment
Share on other sites

Archived

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

×
×
  • Create New...