Сделать радио на форуме.
Добавлено: 21.02.2008 15:59
Подскажите хороший мод что бы организовать свое радио (плеер mp3) на форуме. Буду очень признателен за помощь.
скачать русский перевод, моды, скины и стили для phpBB, phpBB3
https://www.phpbbguru.net/community/
Код: Выделить всё
<?php
/* this file was made by khaleel mughal and is copyright to him and death-eater.net 2004
* if you want to distribute this please show a link me for credit http://fan.death-eater.net will do
* enjoy it and see the bits and bobs file including in the mod zip
* this is version myphpBBRadio Version 1.0.0 not a beta the next version will have an auto mp3 compressor and is
* going to be relased next month check phpbb for more info!
*/
define('IN_PHPBB',true);
$phpbb_root_path = "./"; // set path to phpBB files leave it blank like this if its root
include($phpbb_root_path . 'extension.inc'); // Leave this
include($phpbb_root_path . 'common.'.$phpEx); // leave this
//
// Start session management
//
$userdata = session_pagestart($user_ip, PAGE_LOGIN); // initiate session
init_userprefs($userdata); // load user prefs
//
// End session management
//
$page_title = "Death-Eater.NET :: Radio! You say we play"; // change this to your page title
$userid = $userdata['user_id'];
$sql = "SELECT * FROM " . USER_GROUP_TABLE . " WHERE user_id = '$userid'"; // selects mysql
$result = $db->sql_query($sql);
$isauth = 0;
while ($row = $db->sql_fetchrow($result))
{
if ($row['group_id'] == '70' || $row['group_id'] == '70') // if you want a usergroup only to have access change 70 to your usergroups ID
{
$isauth = 1; // double checks if it is accessble for the permission
}
}
if($userdata['session_logged_in'])
{ // user is logged in
include($phpbb_root_path . 'includes/page_header.'.$phpEx);
if ($isauth == '1')
{ // the contents of your blog, this is the html include change the address to your sites link to
echo "<p align=\"center\">
<iframe width=\"222\" height=\"300\" frameborder=\"0\" name=\"radioiframe\" src=\"http://your.com/radio.blog/index.php\" scrolling=\"no\"></iframe><br /><p align=\"center\"><a href=\"radio.php?\">--=~Refresh~=--</a></P></p>";
} // the refresh is there to session id it leave and the echo is phpHTML see google.com for more tutorials on how src=/"here/" to get better idea
else
{ // if they are logged in and dont have access message...
message_die(GENERAL_ERROR, "You do not have permission to access this page");
}
}
else
{ // not logged in and it will take them to login page which redirects them back here...
header('Location: ' . append_sid($phpbb_root_path.'login.'.$phpEx.'?redirect='.$PHP_SELF, true));
}
include($phpbb_root_path . 'includes/page_tail.'.$phpEx);
?>
Iftin писал(а):PavlegSS
а где мп3 плеера?