Jump to content


Corporate Sponsors


Latest News: (loading..)

- - - - -

News box with admin


4 replies to this topic

#1 indigo11

  • Community Member
  • 69 posts
  • Real Name:Manuel

Posted 10 July 2004, 11:02

Hi,
I'm looking for a contribution like a News box with admin.
Does anyone can point me out one?

Thanks

#2 Acheron

  • Community Member
  • 525 posts
  • Real Name:

Posted 10 July 2004, 11:09

Have you checked out Newsdesk? I've never used it but sounds like it might be what you're looking for.

#3 indigo11

  • Community Member
  • 69 posts
  • Real Name:Manuel

Posted 10 July 2004, 12:26

Thanks Acheron.
Yes, i tried Newsdesk.
I think it is too complicated for what i want. It could work also as a kind of guestbook.

#4 Acheron

  • Community Member
  • 525 posts
  • Real Name:

Posted 10 July 2004, 14:54

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

Edited by Acheron, 10 July 2004, 14:55.


#5 indigo11

  • Community Member
  • 69 posts
  • Real Name:Manuel

Posted 10 July 2004, 22:47

It seems you're a lot ahead of me :P
I have to look at this code and try something with it.
Thanks :)