Jump to content


Photo
* * * * * 1 votes

[Unsupported] (B23) Video BBCode v1.0.1


  • Please log in to reply
141 replies to this topic

#1 Mexfrag

Mexfrag

    Member

  • Members
  • PipPipPip
  • 27 posts
  • IPB Version:v3.0.x
  • Location:Mexico

Posted 07 September 2007 - 11:19 PM

File Name: [Unsupported] (B23) Video BBCode v1.0.1
File Submitter: Mexfrag
File Submitted: 7 Sep 2007
File Updated: 20 Sep 2007
File Category: IP.Board v2.3.x & v2.2.x

This modification allows you to use a bbcode to embed videos onto your posts from a large list of websites just using this format link and the mod will automatically recognize where the video comes from (no need for searching codes or allowing html). Also adds a new button on the Quick/Normal Reply and Quick Edit windows for easy access and input, works for the Standard and Rich Text Editors.

The list includes:

YouTube (www.youtube.com)
GoogleVideo (video.google.com)
LiveLeak (www.liveleak.com)
Veoh (www.veoh.com)
GameTrailers (www.gametrailers.com)
iFilm (www.ifilm.com)
Revver (www.revver.com)
BrightCove (www.brightcove.com)
MySpaceVideo (vids.myspace.com)
CollegeHumor (www.collegehumor.com)
vSocial (www.vsocial.com)
Guba (www.guba.com)
Glumbert (www.glumbert.com)

This modification is based on a tutorial posted on IPS Resources ("Easy Youtube and Google Embed") created by "The Big Cheese" and edited by "Gary B"

Compatibility:
This mod is compatible with both the IP.Board 2.2.x and IP.Board 2.3.x series.

Requirements:
This mod was designed to be installed using the Universal Mod Installer, available from IPS Resources or Invision Modding.

Files Affected:
  • cache\lang_cache\--\lang_javascript.js
  • jscripts\ips_text_editor.js
  • jscripts\ips_text_editor_lite.js
  • sources\classes\bbcode\class_bbcode.php
  • sources\classes\bbcode\class_bbcode_core.php
Version History:
1.0
  • First initial release of modification...
1.0.1
  • Fixed bbcode not parsing correctly on the Rich Text Editor.
    Note: The button in the normal reply will add the [video] tags between any selected url (like the code/quote bbcode), the quick reply/edit window use a pop up (like the image bbcode) where you can input the url.
    This was made to allow the bbcode to be used on the STE and RTE without breaking the bbcode, but will be fixed in the next release.


Click here to download this file

Edited by Mexfrag, 20 September 2007 - 06:00 PM.


#2 Forsaken

Forsaken

    Novice

  • Members
  • PipPip
  • 11 posts
  • IPB Version:v2.3.x

Posted 07 September 2007 - 11:23 PM

Dude this is really nice!

#3 BirdForce

BirdForce

    Member

  • Members
  • PipPipPip
  • 24 posts
  • IPB Version:v2.3.x
  • Real Name:Michael

Posted 07 September 2007 - 11:46 PM

There was an error reading the XML file 'video_bbcode.xml' in your mod_install directory. Please correct the problem before continuing.

#4 Mexfrag

Mexfrag

    Member

  • Members
  • PipPipPip
  • 27 posts
  • IPB Version:v3.0.x
  • Location:Mexico

Posted 07 September 2007 - 11:58 PM

Ugh, i just updated the file

Redownload and just replace the installer

Sorry for the trouble

Edited by Bort Simpson, 07 September 2007 - 11:58 PM.


#5 Mexfrag

Mexfrag

    Member

  • Members
  • PipPipPip
  • 27 posts
  • IPB Version:v3.0.x
  • Location:Mexico

Posted 08 September 2007 - 12:41 AM

Apparently the installer cant add the language string to the lang_javascript file so you will be missing the text on the window popup.

I updated the instructions to reflect that edit, if you already installed the mod just do the lang_javascript edit and your done.

Sorry again :'(

#6 BirdForce

BirdForce

    Member

  • Members
  • PipPipPip
  • 24 posts
  • IPB Version:v2.3.x
  • Real Name:Michael

Posted 08 September 2007 - 12:41 AM

Edit.. Works great!

Edited by BirdForce, 08 September 2007 - 12:43 AM.


#7 Mexfrag

Mexfrag

    Member

  • Members
  • PipPipPip
  • 27 posts
  • IPB Version:v3.0.x
  • Location:Mexico

Posted 08 September 2007 - 12:45 AM

Clear you cache so the javascript can be downloaded again.

When you click the button, a pop up will show just like in the image bbcode.

Adding the bbcode to your admin panel only will add that bbcode into the Help Files.

Edit: Nice, slow fingers here tongue.gif

Edited by Bort Simpson, 08 September 2007 - 12:45 AM.


#8 BirdForce

BirdForce

    Member

  • Members
  • PipPipPip
  • 24 posts
  • IPB Version:v2.3.x
  • Real Name:Michael

Posted 08 September 2007 - 01:00 AM

ya my bad.. I forgot 1 thing I realized JUST as I posted.

#9 Cameron07

Cameron07

    Member

  • Banned
  • PipPipPip
  • 42 posts
  • IPB Version:N/A
  • Real Name:Tommy

Posted 08 September 2007 - 02:10 AM

Great mod, nice job. I'll be installing soon.

Edited by Cameron07, 08 September 2007 - 02:10 AM.

Posted Image

#10 Lazrik

Lazrik

    Novice

  • Members
  • PipPip
  • 10 posts
  • IPB Version:v3.0.x

Posted 08 September 2007 - 06:11 AM

I get errors from both of the edits in sources\classes\bbcode\class_bbcode.php :/

#11 Mexfrag

Mexfrag

    Member

  • Members
  • PipPipPip
  • 27 posts
  • IPB Version:v3.0.x
  • Location:Mexico

Posted 08 September 2007 - 06:16 AM

Could you please be more specific, what kind of errors?

Edited by Bort Simpson, 08 September 2007 - 06:17 AM.


#12 Lazrik

Lazrik

    Novice

  • Members
  • PipPip
  • 10 posts
  • IPB Version:v3.0.x

Posted 08 September 2007 - 06:22 AM

They are:

IPB WARNING [2] preg_replace_callback() requires argument 2, 'class_bbcode::regex_video_tag', to be a valid callback (Line: 152 of /sources/classes/bbcode/class_bbcode.php)
IPB WARNING [2] preg_replace_callback() requires argument 2, 'class_bbcode::clean_video_tag', to be a valid callback (Line: 540 of /sources/classes/bbcode/class_bbcode.php)
IPB WARNING [2] preg_replace_callback() requires argument 2, 'class_bbcode::regex_video_tag', to be a valid callback (Line: 152 of /sources/classes/bbcode/class_bbcode.php)

And they only happen when you make a reply.

You get the error:

IPB WARNING [2] preg_replace_callback() requires argument 2, 'class_bbcode::regex_video_tag', to be a valid callback (Line: 152 of /sources/classes/bbcode/class_bbcode.php)

When making a thread, also.

Edited by Lazrik, 08 September 2007 - 06:23 AM.


#13 Mexfrag

Mexfrag

    Member

  • Members
  • PipPipPip
  • 27 posts
  • IPB Version:v3.0.x
  • Location:Mexico

Posted 08 September 2007 - 06:37 AM

I assume your using IPB 2.2.2.

If im correct try this.

Find:
CODE
//-----------------------------------------
// Do [VIDEO] tag
//-----------------------------------------
$txt = preg_replace_callback("#\[video\](.+?)\[/video\]#is", array( &$this, 'regex_video_tag' ), $txt );

Replace with:
CODE
//-----------------------------------------
// Do [VIDEO] tag
//-----------------------------------------
$txt = preg_replace_callback("#\[video\](.+?)\[/video\]#is", array( $this, 'regex_video_tag' ), $txt );


Save and upload.

Tell me if that works, if your using IPB 2.3.x then check your edits, especially the one on class_bbcode_core



#14 Lazrik

Lazrik

    Novice

  • Members
  • PipPip
  • 10 posts
  • IPB Version:v3.0.x

Posted 08 September 2007 - 06:55 AM

Nope, same errors.

Um, this might have been stupid of me, but:

I misread the instructions and skipped step 2 (installing with universal mod installer), but I undid the edits to class_bbcode.php and installed it later, but still got the same errors throughout the whole process, that couldn't have been the reason, could it?

Should I undo the whole mod and do it in the proper order?

And yes, I'm using 2.2.2

Edited by Lazrik, 08 September 2007 - 06:55 AM.


#15 Mexfrag

Mexfrag

    Member

  • Members
  • PipPipPip
  • 27 posts
  • IPB Version:v3.0.x
  • Location:Mexico

Posted 08 September 2007 - 07:00 AM

The installer just add the language strings for the button, so that cant be the problem.

I can only recommend to check the edits again or if you want to PM access so i can check where is the problem and try to fix it. I developed the mod on a 2.3.1 board but i also used this on my 2.2.2 board for a while

#16 Lazrik

Lazrik

    Novice

  • Members
  • PipPip
  • 10 posts
  • IPB Version:v3.0.x

Posted 08 September 2007 - 07:14 AM

Alright, I'll check all of the edits and PM you if I can't figure it out. Thanks.

#17 awaisuk

awaisuk

    Member

  • Members
  • PipPipPip
  • 33 posts
  • IPB Version:v3.2.x
  • Real Name:duno

Posted 08 September 2007 - 04:10 PM

Can you add a BUTTON like the image button, so a popup comes up and we put the link inside and it auto puts the bbcode?

#18 Mexfrag

Mexfrag

    Member

  • Members
  • PipPipPip
  • 27 posts
  • IPB Version:v3.0.x
  • Location:Mexico

Posted 08 September 2007 - 04:36 PM

QUOTE(awaisuk @ Sep 8 2007, 11:10 AM) <{POST_SNAPBACK}>
Can you add a BUTTON like the image button, so a popup comes up and we put the link inside and it auto puts the bbcode?


The mod already do that wink.gif

Also i fixed the instructions for the first file edit on IPB 2.2.x, if you use 2.3.x there is nothing new.

#19 TurXaliM

TurXaliM

    Member

  • Members
  • PipPipPip
  • 46 posts
  • IPB Version:v2.3.x
  • Real Name:TXM
  • Location:StraSbourg

Posted 08 September 2007 - 09:15 PM

and METACAFE?

#20 Mexfrag

Mexfrag

    Member

  • Members
  • PipPipPip
  • 27 posts
  • IPB Version:v3.0.x
  • Location:Mexico

Posted 08 September 2007 - 11:20 PM

Actually Metacafe works, but there is a nasty bug whit the last slash, so i decided to no include that one until i fix the problem.

Edited by Bort Simpson, 08 September 2007 - 11:21 PM.





0 user(s) are reading this topic

0 members, 0 guests, 0 anonymous users

IPB Skin By Virteq