News:

Bored?  Looking to kill some time?  Want to chat with other SMF users?  Join us in IRC chat or Discord

Main Menu

Support the .WMAand .RMonline play defaultly !

Started by Hellen, March 13, 2005, 12:13:03 AM

Previous topic - Next topic

Hellen

I Wish that the next  version of SMF can support the  documents such as .WMA,.RMand so on online play in the topic defaultly !

It better that the player can show the details of the documents which is been playing such as Author,Title, Album and so on!

And more , please add the buttons of "WM Player" and "Realone Player" on the page of writing topic such as

[Unknown]

Thing is, this is more specialty for most of SMF's users.  While your usage may make it very important or nice, and we respect and wish to accomodate that, other people's usages don't.

Remember - the Titanic didn't sink because it was lean and sleek ;).

-[Unknown]

Louis (CSpotkill)

#2
Quote from: ruyi_forever on March 13, 2005, 12:13:03 AM
It better that the player can show the details of the documents which is been playing such as Author,Title, Album and so on!

And more , please add the buttons of "WM Player" and "Realone Player" on the page of writing topic such as
The reason why the player can't show the details is because it's older. But the new ActiveX binary for WMP10 is only loaded when you use a certain classid which is unique for that Windows binary. Which means other browsers like Firefox or Opera won't see it, nor will Microsoft Internet Explorer or Safari on the Mac, etc. So I figured I'd write the snippet to work with all browsers, instead of just IE. I could try to add in a check for IE and replace the more compatible version with the WMP10 one (which shows the details, etc.)

For the basic code to work, see the following posts ...
Add [wma] to your forum: http://www.simplemachines.org/community/index.php?topic=30258.msg229216#msg229216
Add [real] to your forum: http://www.simplemachines.org/community/index.php?topic=30247.msg229195#msg229195

As for putting the buttons on the post page, well, that's easy enough to do, I suppose. Just add the following to Themes/default/post.template.php, below 'flash' => array on line 633 or so.

	
	
	
'wma' => array('code' => 'wma''before' => '[wma]''after' => '[/wma]''description' => 'Windows Media Player'),
	
	
	
'real' => array('code' => 'real''before' => '[real]''after' => '[/real]''description' => 'Real Player'),


Just make sure there are two images for the buttons in Themes\default\images\bbc\ named wma.gif and real.gif. For best appearance, make sure the icon image is 23 px (w) by 22 px (h).
My SMF Mods:


Louis (CSpotkill)

Quote from: Hellen on March 13, 2005, 12:13:03 AM
It better that the player can show the details of the documents which is been playing such as Author,Title, Album and so on!
Yay :) I've fixed that problem too ;)

Use this instead:
	
	
	
// WMA [wma]example.wma[/wma]
	
	
	
'~\[wma\](?:<br />)*(.+?)(?:<br />)*\[/wma\]~i' => isset($disabled['wma']) ? 'WMA: $1' '<object type="audio/x-ms-wma" height="69" width="300"><param name="filename" value="$1" /><param name="Autostart" value="0" /><param name="ShowControls" value="1" /><param name="ShowPositionControls" value="0" /><param name="ShowStatusBar" value="1" /><param name="ShowDisplay" value="0" /><param name="ShowTracker" value="1" /><param name="ShowAudioControls" value="1" /><param name="pluginspage" value="http://www.microsoft.com/windowsmedia/" /></object>',


It will look like this: http://www.cszen.com/testforum/index.php?topic=1.msg6#msg6
My SMF Mods:

Hellen

IT DOES NOT WORK AGAIN!

Parse error: parse error, unexpected T_CONSTANT_ENCAPSED_STRING in /data/members/paid/r/u/ruyimiracle.net/htdocs/www/bbs/Sources/Subs.php on line 1595

From Line1576-1607


// Sets up the basic theme context stuff.
function setupThemeContext()
{
global $modSettings, $user_info, $scripturl, $context, $settings, $options, $txt, $maintenance;

// Get some news...
$context['news_lines'] = explode("\n", str_replace("\r", '', trim(addslashes($modSettings['news']))));
$context['fader_news_lines'] = array();
for ($i = 0, $n = count($context['news_lines']); $i < $n; $i++)
{
if (trim($context['news_lines'][$i]) == '')
continue;

// Clean it up for presentation ;).
$context['news_lines'][$i] = doUBBC(stripslashes(trim($context['news_lines'][$i])));

// Gotta be special for the javascript.
$context['fader_news_lines'][$i] = strtr(addslashes($context['news_lines'][$i]), array('/' => '\/', '<a href=' => '<a hre" + "f='));
}
$context['random_news_line'] ']= $context['news_lines'][rand(0, count($context['news_lines']) - 1)];

if (!$user_info['is_guest'])
{
$context['user']['messages'] ']= &$user_info['messages'];
$context['user']['unread_messages'] ']= &$user_info['unread_messages'];

'];// Personal message popup...
if ($user_info['unread_messages'] > (isset($_SESSION['unread_messages']) ? $_SESSION['unread_messages'] : 0))
$context['user']['popup_messages'] = true;
else
$context['user']['popup_messages'] = false;
$_SESSION['unread_messages'] = $user_info['unread_messages'];




It always has some problems on the line where has[color]


}
$context['random_news_line'] ']= $context

Bullcat Webhosting

Take a look at streaming mod ! on the mod pannel, is voor movies to play on your site, take also a look at the topic's of that mod somthing about real player in it !


Wij ondersteunen SMF forums & safe mode staat uit.

Hellen

Quote from: Hans_de_Echte on March 13, 2005, 05:51:33 PM
Take a look at streaming mod ! on the mod pannel, is voor movies to play on your site, take also a look at the topic's of that mod somthing about real player in it !

I have some difficults on understanding your message. Would you like explain it in a more detailed way ?

And in fact, I can't enter the BBS use the admended subs.php any more ! Luckily, I had back-uped !


Parse error: parse error, unexpected T_CONSTANT_ENCAPSED_STRING in /data/members/paid/r/u/ruyimiracle.net/htdocs/www/bbs/Sources/Subs.php on line 1595

Louis (CSpotkill)

Hellen, see http://www.simplemachines.org/community/index.php?topic=30258.msg230161#msg230161 for the fix.

It has nothing to do with my mod, it's the same problem you had before.

And Hans_de_Echte was talking about something else, don't worry ;)
My SMF Mods:

Hellen

The summary for wma online player automatically and add the WMA Player button on the compose page.  :)

Thank Louis (CSpotkill) very much!!!!



If you want wma online player automatically:

In Source/subs.php


find out:


// An email address they just typed in

Before this line, add:

// WMA [wma]example.wma[/wma]
'~\[wma\](?:<br />)*(.+?)(?:<br />)*\[/wma\]~i' => isset($disabled['wma']) ? 'WMA: $1' : '<object type="audio/x-ms-wma" height="69" width="300"><param name="filename" value="$1" /><param name="Autostart" value="1" /><param name="ShowControls" value="1" /><param name="ShowPositionControls" value="0" /><param name="ShowStatusBar" value="1" /><param name="ShowDisplay" value="0" /><param name="ShowTracker" value="1" /><param name="ShowAudioControls" value="1" /><param name="pluginspage" value="http://www.microsoft.com/windowsmedia/" /></object>',



If you want add the WMA Player button on the compose page too:

In Themes/default (or your using theme name)/post.template.php


Find out:


'flash' => array

Below this line, add:

'wma' => array('code' => 'wma', 'before' => '[wma]', 'after' => '[/wma]', 'description' => 'Windows Media Player'),

And please sure that there is the image for the button in  Themes\default (or your using theme name)\images\bbc\ named wma.gif  . For best appearance, make sure the icon image is 23 px (w) by 22 px (h).

eg.


Advertisement: