Maniaflash as frame like tsviewer
Moderator: NADEO
Maniaflash as frame like tsviewer
Are there any possibilities to include the maniaflash news into your own manialink?
Re: Maniaflash as frame like tsviewer
That's something we want do to
For now, you can use our WebServices to retreive the messages from a specific channel.

For now, you can use our WebServices to retreive the messages from a specific channel.
ManiaPlanet technical documentation portal (Dedicated, ManiaLink, ManiaScript, Titles...) -- contribute!
Re: Maniaflash as frame like tsviewer
And how i can add this? xD
Re: Maniaflash as frame like tsviewer
Is there s specific code for maniaflash?
Because my php knowledge is not so good
Because my php knowledge is not so good
- w1lla
- Posts: 2287
- Joined: 15 Jun 2010, 11:09
- Manialink: maniaplanetblog
- Location: Netherlands
- Contact:
Re: Maniaflash as frame like tsviewer
ManiaFlash GetChannel:
done with webservices:
You can also do GetMessages to get some messages:
done with webservices:
Code: Select all
<?php
/**
* Maniaplanet Web Services SDK for PHP
*
* @copyright Copyright (c) 2009-2011 NADEO (http://www.nadeo.com)
* @license http://www.gnu.org/licenses/lgpl.html LGPL License 3
* @author $Author: maximeraoust $:
* @version $Revision: 2 $:
* @date $Date: 2011-09-08 18:03:11 +0200 (Thu, 08 Sep 2011) $:
*/
require_once __DIR__.'/libraries/autoload.php';
try
{
$mf = new Maniaplanet\WebServices\ManiaFlash('loginMPWS','passwordMPWS');
$id = 'thedoge'; // ManiaFlash Channel ID:
$list = $mf->getChannel($id);
/**
* Return informations about a ManiaFlash
* @param string $id
* @return Object
* - name
* - description
* - id
* @throws Exception
*/
var_dump($list->id);
}
catch(\Maniaplanet\WebServices\Exception $e)
{
echo "Error!\n";
printf('HTTP Response: %d %s', $e->getHTTPStatusCode(),
$e->getHTTPStatusMessage());
echo "\n";
printf('API Response: %s (%d)', $e->getMessage(), $e->getCode());
echo "\n";
}
echo "\n";
?>
Code: Select all
<?php
/**
* Maniaplanet Web Services SDK for PHP
*
* @copyright Copyright (c) 2009-2011 NADEO (http://www.nadeo.com)
* @license http://www.gnu.org/licenses/lgpl.html LGPL License 3
* @author $Author: maximeraoust $:
* @version $Revision: 2 $:
* @date $Date: 2011-09-08 18:03:11 +0200 (Thu, 08 Sep 2011) $:
*/
require_once __DIR__.'/libraries/autoload.php';
try
{
$mf = new Maniaplanet\WebServices\ManiaFlash('loginMPWS','passwordMPWS');
$id = 'thedoge'; // ManiaFlash Channel ID:
$list = $mf->getMessages($id, $offset = 0, $length = 10);
/**
* Return latest messages of a channel
* @param string $id
* @return Object[]
* - id
* - author
* - dateCreated
* - message
* - link
* @throws Exception
*/
var_dump($list);
}
catch(\Maniaplanet\WebServices\Exception $e)
{
echo "Error!\n";
printf('HTTP Response: %d %s', $e->getHTTPStatusCode(),
$e->getHTTPStatusMessage());
echo "\n";
printf('API Response: %s (%d)', $e->getMessage(), $e->getCode());
echo "\n";
}
echo "\n";
?>
TM² Info
SM Info
QM Info
OS: Windows 10 x64 Professional
MB: MSI 970A-G46
Processor: AMD FX-6300 3500 mHz
RAM Memory: 16 GB DDR3
Video: SAPPHIRE DUAL-X R9 280X 3GB GDDR5
KB: Logitech G510s
Mouse: Logitech G300s
Mode Creation
ManiaScript Docs
SM Info
QM Info
OS: Windows 10 x64 Professional
MB: MSI 970A-G46
Processor: AMD FX-6300 3500 mHz
RAM Memory: 16 GB DDR3
Video: SAPPHIRE DUAL-X R9 280X 3GB GDDR5
KB: Logitech G510s
Mouse: Logitech G300s
Mode Creation
ManiaScript Docs
Re: Maniaflash as frame like tsviewer
Ok now i get this in the browser:
Now i want to print out only the message, but how?
Code: Select all
array(1) { [0]=> object(stdClass)#3 (8) { ["id"]=> string(4) "2194" ["author"]=> string(8) "tm-jinzo" ["dateCreated"]=> string(19) "2014-02-16 22:16:37" ["message"]=> string(44) "Maniaflash for $i$0f0gÄx$000. $fffCommunity" ["link"]=> NULL ["iconStyle"]=> NULL ["iconSubStyle"]=> NULL ["mediaURL"]=> string(0) "" } }
- w1lla
- Posts: 2287
- Joined: 15 Jun 2010, 11:09
- Manialink: maniaplanetblog
- Location: Netherlands
- Contact:
Re: Maniaflash as frame like tsviewer
Message in this case will only report a Title message.
There is no way to show the details of the message only a way to link it.
for instance by getting:
Will get the id of the message or replace id with message
There is no way to show the details of the message only a way to link it.
for instance by getting:
Code: Select all
var_dump($list[0]->id);
TM² Info
SM Info
QM Info
OS: Windows 10 x64 Professional
MB: MSI 970A-G46
Processor: AMD FX-6300 3500 mHz
RAM Memory: 16 GB DDR3
Video: SAPPHIRE DUAL-X R9 280X 3GB GDDR5
KB: Logitech G510s
Mouse: Logitech G300s
Mode Creation
ManiaScript Docs
SM Info
QM Info
OS: Windows 10 x64 Professional
MB: MSI 970A-G46
Processor: AMD FX-6300 3500 mHz
RAM Memory: 16 GB DDR3
Video: SAPPHIRE DUAL-X R9 280X 3GB GDDR5
KB: Logitech G510s
Mouse: Logitech G300s
Mode Creation
ManiaScript Docs
Re: Maniaflash as frame like tsviewer
hm damnit
Re: Maniaflash as frame like tsviewer
It's just that we haven't updated the API.
We will add the full message soon.
We will add the full message soon.
ManiaPlanet technical documentation portal (Dedicated, ManiaLink, ManiaScript, Titles...) -- contribute!
Who is online
Users browsing this forum: No registered users and 2 guests