News:

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

Main Menu

Daily Motion BBC Tag (XHTML Compliant)

Started by Pierre29200, May 20, 2007, 10:06:28 AM

Previous topic - Next topic

Pierre29200

Link to Mod

This mod allows a poster the option to embed a Dailymotion.com video in a post through the use of the [dailymotion=425,350][/dailymotion] BBC (bulletin board code) tags.  The code it uses is XHTML compliant, this keeping with the forum's XHTML validity.

Its use is easy: simply plug the video Number between the [dailymotion][/dailymotion] tags.

Language Integration

To make the mod work with your language, simply open Modifications.*.php, where * is the language you wish to integrate the mod into, and add $txt['myvideo'] = 'DailyMotion insert Number'; to its own line in the file.

thx goes to Marlon he coded the Youtube Button. I use his code and modified.
Pierre/Brest/Bretagne/France
PowerBook G4 1,5 Ghz/1 Go/160 Mo/Mac OS 10.4.8
NeoOffice 2.1
OpenOffice 2.1
Microsoft Word X Release 1
Seamonkey 1.1.1

Jmecca2

good mod using Aa New Damage template  works just fine :)

JamesWC

The YouTube mod works fine but this one just shows a white box where the video should be.

Am I doing this right?

Video: http://www.dailymotion.com/video/x16cpb_sonic-the-hedgehog

Code: [dailymotion=425,350]x16cpb_sonic-the-hedgehog[/dailymotion]

drswift

I'm hitting the same problem. Anyone know the solution?

gescolino

i solved the problem!
so you have to take this:
<div><object width="400" height="316"><param name="movie" value="http://www.dailymotion.com/swf/3h6bG9UR59rt04Pp8"></param><param name="allowfullscreen" value="true"></param><embed src="http://www.dailymotion.com/swf/3h6bG9UR59rt04Pp8" type="application/x-shockwave-flash" width="400" height="316" allowfullscreen="true"></embed></object><br /><b><a href="http://www.dailymotion.com/video/xoo1u_betisier-n3-by-worms">betisier n&deg;3 by Worms</a></b><br /><i>envoy&eacute; par <a href="http://www.dailymotion.com/SpY">SpY</a></i></div>

and to extract this:

<param name="movie" value="http://www.dailymotion.com/swf/3h6bG9UR59rt04Pp8">

and finally put this: 3h6bG9UR59rt04Pp8

between [dailymotion=425,350][/dailymotion]

JamesWC

Wow... I'll enjoy trying to explain that to my members!

Guess it can't be helped though. Thanks for sharing!

RIPPeterBrock

 Error in Package Installation
At least one error was encountered during a test installation of this package. It is strongly recommended that you do not continue with installation unless you know what you are doing, and have made a backup very recently. This error may be caused by a conflict between the package you're trying to install and another package you have already installed, an error in the package, a package which requires another package that you don't have installed yet, or a package designed for another version of SMF.

-------

In other words, can't use it with the youtube one it seems, oh well i won't install, as i dont wanna have to search for

<param name="movie" value="http://www.dailymotion.com/swf/3h6bG9UR59rt04Pp8 [nofollow]">

Because all i need to do is use the flash tags with the http://www.dailymotion.com/swf/3h6bG9UR59rt04Pp8 [nofollow] for it to work anyway, so this mods kinds useless.

Pierre29200

#7
I see several of yours have some difficulties with this mod.
So it's right there is only the "code" of the daily motion to insert beetween tags.


Let's take an example.
To show the movie here :
http://forum.frequencebonheur.fr/index.php?topic=85.0
the code is :
[dailymotion=520,406]1yAoMzICcS0xCdY8T[/dailymotion]

A another reason for wich you can have some error when you want install this mod is a problem with the file :
Themes/default/languages/modifications.english.php
In this file, you must have something like that :
Quote<?php
// Version: 1.1; Modifications


// Begin modification - Increase/Decrease postbox size
$txt['postbox_incdec'] = '+/- buttons change postbox size by';
$txt['postbox_incdec_rows'] = 'rows';
// End modification
$txt['youtube'] = 'YouTube';

$txt['myvideo'] = 'MyVideo insert Number';

$txt['dailymotion'] = 'DailyMotion';

$txt['gvideo'] = 'Google Video';

$txt['mp3'] = 'mp3';

?>

Please, notice the lign : $txt['dailymotion'] = 'DailyMotion';

It's possible when you open this file you can notice that all carriage return has disappeared. So the mod can be installed correctly.

In my experience this problem seems in relationship with the installation of an other previous mod...
I install and uninstall this mod on five different SMF forum for several times each one and i don't meet any problem but somebody reports this problem of carriage return...

Please notice that you can install easily manually downloading this mod then following instructions here :
http://modparser.dev.dansoftaustralia.net/

You have to modify manually to files and to upload on picture...

Here is the result :

=============

General Package Information
-----------------------------------
This is general information about the package, such as the package ID and name.
Package ID: Marlon:DailyMotion BBC Tag (XHTML Compliant)
Package name: DailyMotion BBC Tag (XHTML Compliant)
Package version: 1.0
Package type: modification

Installation instructions for SMF versions: Not defined
----------------------------------------------------------------
Readme:
This mod allows a poster the option to embed a DailyMotion video in a post through the use of the [dailymotion][/dailymotion] BBC (bulletin board code) tags. What makes this variation different from other DailyMotion BBC mods is that the code it uses is XHTML compliant, thus keeping with the forum's XHTML validity.

Files installed

&nbsp; &nbsp; * dailymotion.gif will be copied to Themes/default/images/bbc

Modifications to SMF files
------------------------------
In file $sourcedir/Subs.php

Find:
Quotearray(
            'tag' => 'hr',
            'type' => 'closed',
            'content' => '<hr />',
            'block_level' => true,
         ),

Add after:
Quotearray(
            'tag' => 'dailymotion',
            'type' => 'unparsed_commas_content',
            'test' => '\d+,\d+\]',
            'content' => '<object type="application/x-shockwave-flash" width="$2" height="$3" data="http://www.dailymotion.com/swf/$1"><param name="movie" value="http://www.dailymotion.com/swf/$1"></param><param name="allowfullscreen" value="true"></param></object>',
            'validate' => create_function('&$tag, &$data, $disabled', '
               if (isset($disabled[\'url\']))
                  $tag[\'content\'] = \'$1\';'),
            'disabled_content' => '<a href="$1" target="_blank">$1</a>',
         ),

In file $themedir/Post.template.php
Find:

Quote'flash' => array('code' => 'flash', 'before' => 'http://',%20'after'%20=>%20'', 'description' => $txt[433]),

Add after:


Quote'dailymotion' => array('code' => 'dailymotion', 'before' => '[dailymotion=425,350]', 'after' => '[/dailymotion]', 'description' => $txt['dailymotion']),


In file $themedir/languages/Modifications.english.php

Add to end of file:

Quote$txt['dailymotion'] = 'DailyMotion';

=================

Hoping it's helping for you,

Enjoy !

Pierre

P.S. : For people who speak french, see also this post :
http://www.simplemachines.org/community/index.php?topic=171300.0
Pierre/Brest/Bretagne/France
PowerBook G4 1,5 Ghz/1 Go/160 Mo/Mac OS 10.4.8
NeoOffice 2.1
OpenOffice 2.1
Microsoft Word X Release 1
Seamonkey 1.1.1

05185736

installed but gave [quote][code]$txt['dailymotion'] = 'DailyMotion';[/code]
and couldn't find where located, so uninstalled until another mod comes out similar
.::.

devinrajaram1993

can i please get this for 1.1.3 please i really need it

dado d.d.

just download it and do this
it works for me smf 1.1.5



For all other themes which have a custom Post.template.php a manual edit will be required to add the BBCode Button.
(SMF 2.0 Beta 1 Only) You can choose to have the SMF Package Manager attempt* to perform the manual edit on all themes.

FIND
Code: [Select]
         'flash' => array('code' => 'flash',
ADD BEFORE
Code: [Select]
         'dailymotion' => array('code' => 'dailymotion', 'before' => '[dailymotion]', 'after' => '[/dailymotion]', 'description' => $txt['dailymotion']),

You will also need to place a copy of the youtube.gif in each of your themes bbc image folders (eg Themes/{themename}/images/bbc)

Apllicmz

Portuguese Update

<file name="$themedir/languages/Modifications.portuguese_pt.php" error="ignore">
                <operation>
                        <search position="end"></search>
                        <add><![CDATA[
$txt['dailymotion'] = 'Movimento diário';
]]></add>
                </operation>
        </file>
        <file name="$themedir/languages/Modifications.portuguese_pt-utf8.php" error="ignore">
                <operation>
                        <search position="end"></search>
                        <add><![CDATA[
$txt['dailymotion'] = 'Movimento diário';
]]></add>
                </operation>
        </file>




Advertisement: