Welcome!

Join our community of MMO enthusiasts and game developers! By registering, you'll gain access to discussions on the latest developments in MMO server files and collaborate with like-minded individuals. Join us today and unlock the potential of MMO server development!

Join Today!

Web How to add news or events in MapleCrashCMS

Newbie Spellweaver
Joined
Apr 27, 2011
Messages
18
Reaction score
0
I've had this problem and found a solution, now I want to post here, who have the same problem has a solution.
If you have this error:

Fogomax - How to add news or events in MapleCrashCMS - RaGEZONE Forums

It is very easy to solve, first go to www/bbs/bbs-news.php and bbs-events.php
In bbs-news.php look for:

Code:
site_news
Replace by:
Code:
website_news
In bbs-events.php look for:
Code:
site_events
Replace by:
Code:
website_events
Save and go to MySQL.
Run this:

Code:
CREATE TABLE `website_news` (
`id` INT( 10 ) NOT NULL AUTO_INCREMENT ,
`title` VARCHAR( 50 ) NOT NULL ,
`author` VARCHAR( 16 ) NOT NULL ,
`date` VARCHAR( 32 ) NOT NULL ,
`type` VARCHAR( 50 ) NOT NULL ,
`content` TEXT NOT NULL ,
`views` INT ( 10 ) NOT NULL DEFAULT '0',
PRIMARY KEY ( `id` )
) ENGINE = MYISAM ;

 CREATE TABLE `website_events` (
`id` INT( 10 ) NOT NULL AUTO_INCREMENT ,
`title` VARCHAR( 50 ) NOT NULL ,
`author` VARCHAR( 16 ) NOT NULL ,
`date` VARCHAR( 32 ) NOT NULL ,
`type` VARCHAR( 100 ) NOT NULL ,
`status` VARCHAR( 32 ) NOT NULL ,
`content` TEXT NOT NULL ,
`views` INT ( 10 ) NOT NULL DEFAULT '0',
PRIMARY KEY ( `id` )
) ENGINE = MYISAM ;
Well, now the error is gone.
Now to add news or events, go back into MySQL and click on the "website_news" or "website_events" and something like this will appear:

Fogomax - How to add news or events in MapleCrashCMS - RaGEZONE Forums

Do this and you will see a table below, before you do anything, click once on "website_news" or "website_events" and press F2.
Add this at the end:

Fogomax - How to add news or events in MapleCrashCMS - RaGEZONE Forums

Or simply execute this:
Code:
ALTER TABLE `moopledev`.`website_news` ADD COLUMN `url` TEXT NOT NULL AFTER `views`;
Attention, change the `moopledev`for the name of your DB before running it.
Click again on "website_news" or "website_events" twice and run.
Something like this should appear:

Fogomax - How to add news or events in MapleCrashCMS - RaGEZONE Forums

In "id" you put the number of news, as I put my first one.
In the "title" you put the name of the news.
In "author" you put the name of who created the news.
In "date" you put the date of the news.
In "type" you put the kind of news, you can see the folder www \ bbs \ images and copy the image name.
By "content" and not know what to put there, always put the same as the "type"
In "views" you put the number of views, I'll put 0
In "url", you put a file name in pro PhP example notice1.php
Now click "Apply Changes".

By now you should have something like this:
Fogomax - How to add news or events in MapleCrashCMS - RaGEZONE Forums

But when you click on the news, it takes you to the file "news.php", but MapleCrashCMS not have a file called "news.php", so I added the "url" in the table.
Go to Notepad or another text editor you use, and write the news there, before you start, add this at the beginning:

PHP:
<?php

/*   

	Copyright (C) 2010 Eirik Hansen. <eirik@lan-u.net>



    This program is free software: you can redistribute it and/or modify
    it under the terms of the GNU Affero General Public License version 3
    as published by the Free Software Foundation. You may not use, modify
    or distribute this program under any other version of the
    GNU Affero General Public License.

    This program is distributed in the hope that it will be useful,
    but WITHOUT ANY WARRANTY; without even the implied warranty of
    MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
    GNU Affero General Public License for more details.
    You should have received a copy of the GNU Affero General Public License
    along with this program.  If not, see <http://www.gnu.org/licenses/>.

*/

include("header.php"); ?>
        <ul id="navigation">
                <li id="home_current"><a href="index.php">Home</a></li>
                <li id="register"><a href="register.php">Register</a></li>
                <li id="download"><a href="download.php">Download</a></li>
                <li id="forum"><a href="<?php echo $forum; ?>">Forum</a></li>
                <li id="ranking"><a href="ranking.php">Ranking</a></li>
                <li id="status"><a href="status.php">Status</a></li>
                <li id="vote"><a href="voto.php">Vote</a></li>
                <li id="donate"><a href="donate.php">Donate</a></li>
                <li id="chat"><a href="<?php echo $chat; ?>">Chat</a></li>
       </ul>
       <div id="container">
<div align="center">
<a href="vote.php"><img src="images/vote_button.png" border="0" /></a>
<?php
         $fp = @fsockopen($serverip, $worldport, $errno, $errstr, 1);
if (!$fp) {
    echo $offline = '<img src="images/offline_button.png" border="0" /> ';
} else {
    echo $online = '<img src="images/online_button.png" border="0" /> ';
}
    @fclose($fp);

?>
<a href="donate.php"><img src="images/donate_button.png" border="0" /></a>
</div>
<br/><br/>
Now at the end type:
PHP:
<?php include("footer.php"); ?>
Once finished, save it on your www folder, but remember:
The file name must be the same as what you put in "url".

Now go again to: www/bbs/bbs-news.php and bbs-events.php
You should have something like this:
Fogomax - How to add news or events in MapleCrashCMS - RaGEZONE Forums

Now, let's edit the link to each story, instead of redirecting to the file "index.php", will be redirected to the file name you created.
Look for this line:
Code:
<a href=\"news.php?id=".$n['id']."\">".$n['title']."</a>
Now, delete the "news.php?id=" and change the "id" with "url", looks like this:
Fogomax - How to add news or events in MapleCrashCMS - RaGEZONE Forums

Now just save and test the site, if you did everything correctly, you will have something like this:
Fogomax - How to add news or events in MapleCrashCMS - RaGEZONE Forums

If you managed to get it right, congratulations! But if you have any problems, I'll be very happy to help. Thank you ^-^
Of course, all credits go to me because it did not copy any site, and the solution, I personally was fool with my computer to find.
 
Back
Top