Shoutbox

Onyx with its NyxServer is a plugin container written in java. Nyx plugins are simple javascript text files and can be added and removed on the fly. Some plugins: TMX, Dedimania, NextMapInfo, CopperDonation and many more.

Moderators: PaGaisu, Vegeta, TM-Patrol

Post Reply
PaGaisu
Pit Crew
Pit Crew
Posts: 126
Joined: 16 Jan 2006 10:48
Contact:

Shoutbox

Post by PaGaisu » 19 Dec 2008 16:04

Apparently, some of you were interested on the Onyx shoutbox and wanted to integrate the same in their manialink.

So better to share my code.
Requirements:
- http server with php5 (maybe it works on php4, i did not try)
- MySql (if you have another database, you ll have to do some adjustement)

Php code: http://www.dndnetworks.com/onyx/manialink/shoutbox.txt (to be saved as php file)
Sql code: http://www.dndnetworks.com/onyx/maniali ... ox.sql.txt
Example: Onyxcolor>

Note: I marked in the php code where you should change the coordinates for the shoutbox location.

User avatar
jimos94
happy cruiser
happy cruiser
Posts: 122
Joined: 06 Jan 2007 22:52
Owned TM-games: TMUF
Manialink(s): fun
Contact:

Re: Shoutbox

Post by jimos94 » 23 Dec 2008 15:00

Good Job Pagaisu, kool design :P
http://www.tm-planet.net/ Server hosting, Interviews, Events and more :)

User avatar
SmokyBird
pedestrian
pedestrian
Posts: 6
Joined: 24 Jul 2006 18:37
Owned TM-games: TMSX, TMN, TMUF
Contact:

Re: Shoutbox

Post by SmokyBird » 24 Jan 2009 18:36

Thanks for the chat Pag :thumbsup:

But can someone explain me how to put our informations about SQL ? Really difficult, first time using it :oops:

PaGaisu
Pit Crew
Pit Crew
Posts: 126
Joined: 16 Jan 2006 10:48
Contact:

Re: Shoutbox

Post by PaGaisu » 30 Jan 2009 11:14

If u have phpmyadmin, it s pretty straight forward.
u just need to copy/paste the SQL after having selected/created a database.

User avatar
SmokyBird
pedestrian
pedestrian
Posts: 6
Joined: 24 Jul 2006 18:37
Owned TM-games: TMSX, TMN, TMUF
Contact:

Re: Shoutbox

Post by SmokyBird » 30 Jan 2009 18:18

I've already made this chat with kev717's help. But now, I've got full errors on the php code :?

(sorry bad english)

User avatar
Terron
speedy pilot
speedy pilot
Posts: 445
Joined: 02 Jun 2007 15:00
Owned TM-games: all full+some betas
Location: Earth

Re: Shoutbox

Post by Terron » 12 Apr 2009 14:24

Code: Select all

$http_location="http://".$_SERVER["HTTP_HOST"].$_SERVER["PHP_SELF"];
what I have to add as http location???

User avatar
Terron
speedy pilot
speedy pilot
Posts: 445
Joined: 02 Jun 2007 15:00
Owned TM-games: all full+some betas
Location: Earth

Re: Shoutbox

Post by Terron » 12 Apr 2009 14:25

please make here step-by-step tutorial

PaGaisu
Pit Crew
Pit Crew
Posts: 126
Joined: 16 Jan 2006 10:48
Contact:

Re: Shoutbox

Post by PaGaisu » 13 Apr 2009 11:14

U have not to change http_location.

The only parameters to modify are the following :

Code: Select all

/** To change: database details **/
$db_host = "localhost"; // ip:port
$db_user = "DATABASE_USERNAME";
$db_pass = "DATABASE_PASSWORD";
$db_name = "DATABASE_NAME";
/** end **/
Change this and create the right tables in the right location of ur DB using the sql file.
It s quite basic, u can do it manually if u prefer. The sql just create a table:

Code: Select all

CREATE TABLE `manialink_shoutbox` (
  `id` mediumint(8) NOT NULL auto_increment,
  `login` varchar(255) collate utf8_unicode_ci NOT NULL,
  `nickname` varchar(255) collate utf8_unicode_ci NOT NULL,
  `lang` varchar(10) collate utf8_unicode_ci NOT NULL,
  `path` varchar(255) collate utf8_unicode_ci NOT NULL,
  `message` varchar(255) collate utf8_unicode_ci NOT NULL,
  `timestamp` datetime NOT NULL,
  PRIMARY KEY  (`id`)
) ENGINE=MyISAM AUTO_INCREMENT=680 DEFAULT CHARSET=utf8 COLLATE=utf8_unicode_ci AUTO_INCREMENT=680 ;

User avatar
Terron
speedy pilot
speedy pilot
Posts: 445
Joined: 02 Jun 2007 15:00
Owned TM-games: all full+some betas
Location: Earth

Re: Shoutbox

Post by Terron » 13 Apr 2009 17:56

I did it but when i want to view it by in-game browser, it says INVALID MANIALINK ILE, I have also registered it at playerpage

PaGaisu
Pit Crew
Pit Crew
Posts: 126
Joined: 16 Jan 2006 10:48
Contact:

Re: Shoutbox

Post by PaGaisu » 14 Apr 2009 08:14

Can u give me the url of ur manialink ? i ll take a look on the xml which has been generated by the php.

User avatar
Terron
speedy pilot
speedy pilot
Posts: 445
Joined: 02 Jun 2007 15:00
Owned TM-games: all full+some betas
Location: Earth

Re: Shoutbox

Post by Terron » 15 Apr 2009 09:09

ok it works, I hat to save it as PHP file, not XML

gooblaster
cyclist
cyclist
Posts: 46
Joined: 07 Jul 2009 15:23
Owned TM-games: TMUF
Manialink(s): tmtp:///:Gooblaster

Re: Shoutbox

Post by gooblaster » 12 Oct 2009 08:10

Errr.... How do you install this? lol..
I know... Im noob.. Could anyone be so kind as to help me out here? :D
My Manialink: Gooblastercolor>

PaGaisu
Pit Crew
Pit Crew
Posts: 126
Joined: 16 Jan 2006 10:48
Contact:

Re: Shoutbox

Post by PaGaisu » 12 Jan 2010 14:03

You need to have a minimum of knowledge on php and DB.
Can u find a friend to explain u this ?

Post Reply