Community Forums

Important Notice:

Two sections of this forum are available only to registered customers. In order to receive access to the Customer Forums and ResellerCentral Forums, you must first register on these forums or login to your existing forum account. If you are an existing HostNine customer, be sure to register using the email address on file for your billing profile.

Go Back   HostNine Community Forums > H9 General Forums > Lounge / Off Topic > Web Development

Notices

Reply
 
Thread Tools Display Modes
  #1  
Old 06-29-2007, 12:49 PM
willow willow is offline
Junior Guru Wannabe
 
Join Date: Jun 2007
Location: South of England
Posts: 54
Default News script?

Can anyone recommend a simple news script? Something i can skin to merge with my sites and obviously something stable so i dont get my account suspended
Reply With Quote
  #2  
Old 06-29-2007, 01:08 PM
meltingcube meltingcube is offline
H9 Addict
 
Join Date: May 2007
Posts: 111
Default

Here is a simple one:

PHP Code:
$_SERVER['c_mysql_host'] = "localhost";
$_SERVER['c_mysql_user'] = "db_user";
$_SERVER['c_mysql_password'] = "passwd";
$_SERVER['c_mysql_database'] = "db_name";

$connection mysql_connect($_SERVER['c_mysql_host'],$_SERVER['c_mysql_user'],$_SERVER['c_mysql_password'])
    or die (
"Couldn't connect to server.");

$db mysql_select_db($_SERVER['c_mysql_database'], $connection)
    or die (
"Couldn't select database.");

$sql "SELECT id,title,date,body FROM news ORDER BY id DESC";
    
$r mysql_query($sql)
            or die(
"Couldn't execute query. ".mysql_error());
        
    while ( 
$row mysql_fetch_assoc($r) ) {
        echo 
"<div id=\"news_{$row[id]}\">{$row[title]}<br />{$row[date]}<br />{$row[body]}</div><br /><br />";

It's a little rough but i'm sure you get the gist of it. All you have to do is insert this into a page, create the database, edit the login information, and add the items into the database. Now if you want the option to add them via the web by logging in on your site that will take a bit more. But this should be fine for just displaying the news.

If needed just PM me and I can help you on a more personal level.
Reply With Quote
  #3  
Old 06-29-2007, 01:10 PM
willow willow is offline
Junior Guru Wannabe
 
Join Date: Jun 2007
Location: South of England
Posts: 54
Default

Thats really kind of you Dan but its way out of my league. I dont know the first thing about php and messing around with databases would be like pulling my hair out
I really need something with an admin interface, WYSIWYG etc.

I really appreciate your offer though
Reply With Quote
  #4  
Old 06-29-2007, 01:13 PM
meltingcube meltingcube is offline
H9 Addict
 
Join Date: May 2007
Posts: 111
Default

Haha, no problem. Really PHP is a very easy a good programming language to learn (of course you ASP guys will object ). Here is one I found using a quick Google search. It should be fine for what you want.

http://www.gentlesource.com/news-script/
Reply With Quote
  #5  
Old 06-29-2007, 01:26 PM
willow willow is offline
Junior Guru Wannabe
 
Join Date: Jun 2007
Location: South of England
Posts: 54
Default

I dont know whether to kiss you or kick you Dan

Ive spend the last couple of hours on Hotscrips and couldnt find anything that looked good and you pop on to Google and find this beauty!

Looks very good indeed and i owe you a beer but if anyone else can recommend anything they use its would be appreciated too
Reply With Quote
  #6  
Old 06-29-2007, 01:30 PM
meltingcube meltingcube is offline
H9 Addict
 
Join Date: May 2007
Posts: 111
Default

Haha, no problem. I remember when I was first starting out several years ago no one would help me other forums so I had to learn everything my self, which was hard. So I make sure if I can help, I do.
Reply With Quote
Reply

Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off

Forum Jump

Similar Threads
Thread Thread Starter Forum Replies Last Post
Looking for a script zanass Web Development 1 06-01-2009 05:54 AM
RSS Feed for Network News and important RC news euro Reseller Hosting 3 11-17-2008 05:23 AM
Email to Script mcentral Reseller Hosting 1 01-29-2007 10:23 AM


All times are GMT -5. The time now is 09:26 PM.


Powered by vBulletin® Version 3.8.6
Copyright ©2000 - 2012, Jelsoft Enterprises Ltd.

Host Nine

Our mission began in 2006. Thousands of awesome clients later, we are now one of the most popular hosters in the world.
Most of this is because of our fantastic support. Join us, you'll be glad you did - that's a given.