Simple Machines Community Forum

SMF Development => Feature Requests => Applied or Declined Requests => Topic started by: Hellen on March 13, 2005, 12:13:03 AM

Title: Support the .WMAand .RMonline play defaultly !
Post by: Hellen on March 13, 2005, 12:13:03 AM
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 (http://www.simplemachines.org/community/Themes/simple/images/bbc/flash.gif)
Title: Re: Support the .WMAand .RMonline play defaultly !
Post by: [Unknown] on March 13, 2005, 01:08:21 AM
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]
Title: Re: Support the .WMAand .RMonline play defaultly !
Post by: Louis (CSpotkill) on March 13, 2005, 02:44:28 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 (http://www.simplemachines.org/community/Themes/simple/images/bbc/flash.gif)
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).
Title: Re: Support the .WMAand .RMonline play defaultly !
Post by: Hellen on March 13, 2005, 07:05:25 AM
Thanks !

(http://www.ruyimiracle.net/bbs/Themes/default/images/bbc/wma.gif) (http://www.ruyimiracle.net/bbs/Themes/default/images/bbc/real.gif) (http://www.ruyimiracle.net/bbs/Themes/default/images/bbc/img.gif) (http://www.ruyimiracle.net/bbs/Themes/default/images/bbc/flash.gif) (http://www.ruyimiracle.net/bbs/Themes/default/images/bbc/url.gif) (http://www.ruyimiracle.net/bbs/Themes/default/images/bbc/email.gif)
Title: Re: Support the .WMAand .RMonline play defaultly !
Post by: Louis (CSpotkill) on March 13, 2005, 12:39:03 PM
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
Title: Re: Support the .WMAand .RMonline play defaultly !
Post by: Hellen on March 13, 2005, 03:36:33 PM
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


Code: [Select]
// 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]


Code: [Select]
}
$context['random_news_line'] ']= $context
Title: Re: Support the .WMAand .RMonline play defaultly !
Post by: Bullcat Webhosting 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 !
Title: Re: Support the .WMAand .RMonline play defaultly !
Post by: Hellen on March 13, 2005, 05:59:44 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
Title: Re: Support the .WMAand .RMonline play defaultly !
Post by: Louis (CSpotkill) on March 13, 2005, 08:03:12 PM
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 ;)
Title: Re: Support the .WMAand .RMonline play defaultly !
Post by: Hellen on March 17, 2005, 01:38:38 AM
 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:

Code: [Select]
// An email address they just typed in
 Before this line, add:

Code: [Select]
// 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:

Code: [Select]
'flash' => array
 Below this line, add:

Code: [Select]
'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. (http://www.ruyimiracle.net/bbs/Themes/default/images/bbc/wma.gif)
Title: Re: Support the .WMAand .RMonline play defaultly !
Post by: raedzaro on November 13, 2005, 03:54:26 AM
what about smf1.1