Произволна песен (Онлайн музика мод)
Това добавка към мода за онлайн музика( http://web-tourist.net/login/login/view.php?st=2754 ) чрез която се показват прозиволни песни.

Няма файлове за сваляне.

## Hack Title: Random Song Hack (MOM 2.0.5 only)
## Hack Version: 1.0.0 (ex phpbb 2.0.8)
## Hack Author: Cf Manager < cf_manager@yahoo.com > (Vincent Thai)

Лесно се инсталира за 2-3 минути.

#
#-----[ ОТВОРИ ]--------------------------------------------------
#
music.php

#
#-----[ НАМЕРИ ]--------------------------------------------------
#
// ------------------------------------
// additional sorting options
// ------------------------------------

#
#-----[ ПРЕДИ ТОВА, ДОБАВИ ]--------------------------------------------
#
//
// BEGIN Random Song
//

$sql = "SELECT song_id, song_title, song_singer, song_user_id, song_username FROM phpbb_music ORDER BY RAND() LIMIT 1";

if (!$result = $db->sql_query($sql))
{
message_die(GENERAL_ERROR, 'Could not query random song information', '', __LINE__, __FILE__, $sql);
}
$randomsong = $db->sql_fetchrow($result);

//
// END Random Song
//

#
#-----[ НАМЕРИ ]--------------------------------------------------
#
'L_PUBLIC_CATS' => $lang['Public_Categories'],

#
#-----[ СЛЕД ТОВА, ДОБАВИ ]---------------------------------------------
#
// Random Songs
'RAND_TITLE' => '<b>'. $randomsong['song_title'] .'</b>',
'RAND_SINGER' => ($lang['Singer'].': '.$randomsong['song_singer']),
'RAND_POSTER' => $lang['Poster'] . ': '.'<a href="'. append_sid("profile.$phpEx?mode=viewprofile&". POST_USERS_URL .'='. $randomsong['song_user_id']) .'">'. $randomsong['song_username'] .'</a>',
'RAND_LINK' => append_sid('music_song.' . $phpEx . '?song_id=' . $randomsong['song_id']),

#
#-----[ отвори ]--------------------------------------------------
#
templates/subSilver/music_index_body.tpl
#
#-----[ НАМЕРИ ]--------------------------------------------------
#
<table width="100%" cellpadding="1" cellspacing="1" border="0" class="forumline">
<tr>
<th class="thTop" height="25" colspan="6" nowrap="nowrap">{L_TOP_SONGS}
</tr>

#
#-----[ ПРЕДИ ТОВА, ДОБАВИ ]--------------------------------------------
#
<table width="100%" cellpadding="1" cellspacing="1" border="0" class="forumline">
<tr>
<td class="row1" width="50%" align="center">
<object id="wmp" width={WIDTH} height={HEIGHT} classid="CLSID:22d6f312-b0f6-11d0-94ab-0080c74c7e95"
codebase="http://activex.microsoft.com/activex/controls/mplayer/en/nsmp2inf.cab#Version=6,0,0,0"
standby="Loading Microsoft Windows Media Player components..." type="application/x-oleobject">
<param name="FileName" value="{RAND_LINK}">
<param name="ShowControls" value="1">
<param name="ShowDisplay" value="0">
<param name="ShowStatusBar" value="0">
<param name="AutoSize" value="1">
<embed type="application/x-mplayer2"
pluginspage="http://www.microsoft.com/windows95/downloads/contents/wurecommended/s_wufeatured/mediaplayer/default.asp"
src="{RAND_LINK}" name=MediaPlayer2 showcontrols=1 showdisplay=0 showstatusbar=1 autosize=1 visible=1 animationatstart=0 transparentatstart=1 loop=0 height=70 width=300>
</embed></object>
</td>
<td class="row1"><span class="gen">{RAND_TITLE}<br />{RAND_SINGER}<br />{RAND_POSTER}<br /></span></td>
</tr>
</table><br />


Запазвате файловете и сте готови!

Демо:
Под менюто с линковете.



/ Трябва да сте регистриран за да напишете коментар /
От: batmanabg
13:28 22-07-2011
Полезен урок.
1