Manialink news manager

If you have anything to say - or advice to give - on the creation or publishing of ManiaLinks, here is the place to do it!

Moderator: TM-Patrol

User avatar
apovtx
happy cruiser
happy cruiser
Posts: 154
Joined: 04 Dec 2008 16:06
Owned TM-games: TMUF,TMNF,TMN
Manialink(s): funteam
Location: Xanthi,Greece
Contact:

Manialink news manager

Post by apovtx » 18 Apr 2009 10:19

Manialink news manager

By Apovtx (manialink: funteamcolor>)
Greek maniazones moderator


INTRO

Hi all this is my first script i 've made for manialinks!
I started to learn php a month ago so don't expect too much:P
Well this script helps you to add news in the manialink without change the *.xml or php or anything!
You can add news through a web page and they will automatically been added to your manialink.

INSTALLATION

To install this script you have to make a SQL database or if you already use one (for ex if you have a shoutbox) you can create a table inside the database by importing the news.sql file included in the zip
After that you must rename your manialink from name.xml to name.php.
Then you must put this code in the start of the page berore the <manialink> tag:

Code: Select all

<?

header("Content-type: application/xhtml+xml");

require 'news/config.php';

echo "<?xml version='1.0' encoding='utf-8'?>\n";
?>

Also after the manialink tags
for ex these:
<manialink>
<timeout>0</timeout>
<type>default</type>

you have to input this code:

Code: Select all

<? include 'news/news.php'; ?> 
To add a news you must call from your browser the newsinput.php page and simply fill the fields

ATTENTION: In this version i couldn't intergrate a security system so anyone can add news if he find the newsinput.php so you should put it somewhere hm....hidden:P I'll try to change this in the next versions


ATTENTION 2: The zip should be extracted in the main folder of the manialink (the newsinput.php can be placed anywhere in the webserver)

HOW TO MAKE IT WORK

After having done all things above you should open the config.php inside the news folder that included in the zip
There you must change the database details. There you can change also the location of the whole frame and costumize it as you want. Then you must change the database details in the newsinput.php(the same details as the previous one)

Download it from here
Readme file included

EDIT: UPDATED Password check added. Link changed. Config Changed
Now you don't need to change anything in the newsinput.php. Also The newsinput must be placed outside the news folder

For more information contact me on:
E-mail: apovtx@gmail.com
Ingame: apovtx
xfire:apovtx
:thumbsup: :lovetm
Last edited by apovtx on 18 Apr 2009 13:44, edited 2 times in total.
Do you wanna be a journalist?
Contact me with PM!
Image

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

Re: Manialink news manager

Post by jimos94 » 18 Apr 2009 10:29

Very nice and helpful tool apovtx! Thanks for sharing :)
http://www.tm-planet.net/ Server hosting, Interviews, Events and more :)

User avatar
apovtx
happy cruiser
happy cruiser
Posts: 154
Joined: 04 Dec 2008 16:06
Owned TM-games: TMUF,TMNF,TMN
Manialink(s): funteam
Location: Xanthi,Greece
Contact:

Re: Manialink news manager

Post by apovtx » 18 Apr 2009 13:41

UPDATED see the 1st topic! :thumbsup: :lovetm
Do you wanna be a journalist?
Contact me with PM!
Image

jouko100
speedy pilot
speedy pilot
Posts: 375
Joined: 10 Mar 2007 09:33
Location: finland
Contact:

Re: Manialink news manager

Post by jouko100 » 18 Apr 2009 14:49

pls make it work with rss feed

User avatar
apovtx
happy cruiser
happy cruiser
Posts: 154
Joined: 04 Dec 2008 16:06
Owned TM-games: TMUF,TMNF,TMN
Manialink(s): funteam
Location: Xanthi,Greece
Contact:

Re: Manialink news manager

Post by apovtx » 18 Apr 2009 14:50

lol i'm new to php but i'll try :thumbsup: :lovetm
Do you wanna be a journalist?
Contact me with PM!
Image

User avatar
apovtx
happy cruiser
happy cruiser
Posts: 154
Joined: 04 Dec 2008 16:06
Owned TM-games: TMUF,TMNF,TMN
Manialink(s): funteam
Location: Xanthi,Greece
Contact:

Re: Manialink news manager

Post by apovtx » 18 Apr 2009 17:18

Can you give me for which page do you want it?

:thumbsup: :lovetm Apovtx
Do you wanna be a journalist?
Contact me with PM!
Image

jouko100
speedy pilot
speedy pilot
Posts: 375
Joined: 10 Mar 2007 09:33
Location: finland
Contact:

Re: Manialink news manager

Post by jouko100 » 19 Apr 2009 08:27


User avatar
apovtx
happy cruiser
happy cruiser
Posts: 154
Joined: 04 Dec 2008 16:06
Owned TM-games: TMUF,TMNF,TMN
Manialink(s): funteam
Location: Xanthi,Greece
Contact:

Re: Manialink news manager

Post by apovtx » 20 Apr 2009 15:42

If the rss linked to an xml file first could be much easier but now i don't think i can do it :?

But i will put my best :thumbsup: :roflol:
:thumbsup: :lovetm apovtx
Do you wanna be a journalist?
Contact me with PM!
Image

User avatar
oliverde8
solid chaser
solid chaser
Posts: 1135
Joined: 07 Oct 2006 07:03
Owned TM-games: TMU
Manialink(s): oliverde8
Location: Turkey
Contact:

Re: Manialink news manager

Post by oliverde8 » 24 Apr 2009 15:40

RSS are XML files. you can just use the xml parser of php. I think at least never tried it with rss files

Code: Select all

$xml = file_get_contents(http://newsrss.bbc.co.uk/rss/newsonline_world_edition/front_page/rss.xml);
$xml = simplexml_load_string($xml);

$pageTitle=$xml->channel->title;

$i=0
foreach($xml->channel->item as $item){
     $News[$i]["Title"]="$item->title;
     $News[$i]["description"]="$item->description;
     $News[$i]["link"]="$item->link;
     //getting atributes as isPermaLink ho is in <guid isPermaLink="false">
      $News[$i]["isPermaLink"]=$item->guid["isPermaLink"];
     $i++;
}
Something like this should work. Didn't test it just wrote it now.

I had made something for SMF Phpbb and wordpress using Db to get a lot of information, the code is extremely bad :| but it works. It is quite old uses old Manialink styles. not Forever styles. viewtopic.php?f=28&t=11431 it was also my first TM creation when I started coding :scene:
ImageImage
Manialink : oliverde8color>
Servers : STATS <> United | VeryShort | Made In Turkey

User avatar
apovtx
happy cruiser
happy cruiser
Posts: 154
Joined: 04 Dec 2008 16:06
Owned TM-games: TMUF,TMNF,TMN
Manialink(s): funteam
Location: Xanthi,Greece
Contact:

Re: Manialink news manager

Post by apovtx » 25 Apr 2009 13:58

Thank you for your code. I'll try it. As i said before i'm new to coding (especially in php) so it's not easy to write something like this!

:thumbsup: :lovetm Apovtx
Do you wanna be a journalist?
Contact me with PM!
Image

User avatar
apovtx
happy cruiser
happy cruiser
Posts: 154
Joined: 04 Dec 2008 16:06
Owned TM-games: TMUF,TMNF,TMN
Manialink(s): funteam
Location: Xanthi,Greece
Contact:

Re: Manialink news manager

Post by apovtx » 01 May 2009 17:02

Jouko100 do you want the rss reader now?
I found something so tell me for sure
:thumbsup: :lovetm Apovtx
Do you wanna be a journalist?
Contact me with PM!
Image

User avatar
Basskid
road tourist
road tourist
Posts: 81
Joined: 07 Sep 2008 12:40
Owned TM-games: TMO, TMS, TMN, TMUF
Manialink(s): Basskid, mwl, 100k, bk.ladder
Location: Germany
Contact:

Re: Manialink news manager

Post by Basskid » 17 May 2010 00:32

Yeah i know, that Topic is a Year old :)
Have anyone that Script? Please re-Up that.
I need this :) Please ^^

User avatar
apovtx
happy cruiser
happy cruiser
Posts: 154
Joined: 04 Dec 2008 16:06
Owned TM-games: TMUF,TMNF,TMN
Manialink(s): funteam
Location: Xanthi,Greece
Contact:

Re: Manialink news manager

Post by apovtx » 17 May 2010 13:13

Sorry to say this but i don't have it "ready to publish" If you want i can remake it but on the weekend because i'm having exams...

Regards
Do you wanna be a journalist?
Contact me with PM!
Image

User avatar
Basskid
road tourist
road tourist
Posts: 81
Joined: 07 Sep 2008 12:40
Owned TM-games: TMO, TMS, TMN, TMUF
Manialink(s): Basskid, mwl, 100k, bk.ladder
Location: Germany
Contact:

Re: Manialink news manager

Post by Basskid » 21 May 2010 23:46

I'm found it on my old HDD :) But thanks anyway^^
When you want i can upload the Script so that everyone can use, but i'm want your ok before :)

User avatar
apovtx
happy cruiser
happy cruiser
Posts: 154
Joined: 04 Dec 2008 16:06
Owned TM-games: TMUF,TMNF,TMN
Manialink(s): funteam
Location: Xanthi,Greece
Contact:

Re: Manialink news manager

Post by apovtx » 22 May 2010 07:44

Do what ever you want! I think that all scripts are for the community (even small scripts like mine may be usefull for some) , so no problem for me!
Do you wanna be a journalist?
Contact me with PM!
Image

Post Reply