Firefox PHP

Module: BB Code Video

Posted by Maurice Makaay 
Re: Module: BB Code Video (YouTube, Google and Vimeo.com video)
July 05, 2007 05:26AM
And while I was at it, version 1.0.5, which adds support for an Editor Tools button.

Important for upgrading:
This version of the module contains a new hook definition. Therefore, the upgrade takes some extra work. Install the module as usual. After that, go to the admin Modules screen. Disable the BB Code Video module and re-enable the BB Code Video module. After that, the new hook is seen by Phorum.

To show the Editor Tools button, go to the module's settings screen and enable the appropriate option.


Maurice Makaay
Phorum Development Team
my blog linkedin profile secret sauce
Lon
Re: Module: BB Code Video (YouTube, Google and Vimeo.com video)
July 05, 2007 03:26PM
Sounds sweet, Maurice, but just can't seem to get it to work in my 5.1.22 version of phorum... I can see the hook in the admin interface of the bbcode_video mod, but after selecting to add a button to editor_tools it doesn't seem to show up.

Might be that this problem has something to do with the fact that I'm trying to run phorum embedded in Drupal, so it's installed as www.some.domain/phorum/ but accessed via www.some.domain/discuss/...?

No, that doesn't seem to be the problem. Just tried to set it back to not be embedded, but still doesn't work.



Edited 2 time(s). Last edit at 07/05/2007 04:12PM by Lon.
Re: Module: BB Code Video (YouTube, Google and Vimeo.com video)
July 05, 2007 06:47PM
Did you disable and re-enable the full bbcode_video module? A new hook was added, so it needs a full reload. The fact that you see the option in the settings does not tell that the hook is working, because that option will always show up.


Maurice Makaay
Phorum Development Team
my blog linkedin profile secret sauce
Lon
Re: Module: BB Code Video (YouTube, Google and Vimeo.com video)
July 08, 2007 06:01AM
Yes, I've tried to disable and re-enable several times.
Re: Module: BB Code Video (YouTube, Google and Vimeo.com video)
July 08, 2007 06:51AM
It might be a little bug in the Editor Tools module code. I uploaded a new version (1.1.20) to the Editor Tools thread. Try if installing that one fixes your problem. No need to disable/re-enable the module after installing this update. Just unpacking the files over the existing ones should be enough.


Maurice Makaay
Phorum Development Team
my blog linkedin profile secret sauce
Lon
Re: Module: BB Code Video (YouTube, Google and Vimeo.com video)
July 08, 2007 07:00AM
That worked, Maurice. Tnx. I would like this button to work a little different, I think. More in the same way as the "Insert URL". A pop-up that gives the user a window to insert the URL for the video, but I can have a look at that myself first. At least the button is there now. :-)

Was simple to have the same kind of functionality as "insert image". Just grabbed the function editor_tools_handle_image() and added it to bbcode_video.js and changed the name of the function to be bbcode_video_editor_tool() and changed some of the text inside. Now it's more like what I wanted. Tnx again for the fix!



Edited 1 time(s). Last edit at 07/08/2007 07:10AM by Lon.
Re: Module: BB Code Video (YouTube, Google and Vimeo.com video)
July 08, 2007 09:52AM
I'll do the same kind of thing in the module, so next release it will have this behavior by default. Good to hear that it's working now! My implementation:
function bbcode_video_editor_tool()
{
    editor_tools_add_tags(
        '[video]', '[/video]',
        null,
        editor_tools_translate("enter url")
    );

    editor_tools_focus_textarea();
}


Maurice Makaay
Phorum Development Team
my blog linkedin profile secret sauce



Edited 1 time(s). Last edit at 07/08/2007 10:03AM by mmakaay.
Re: Module: BB Code Video
July 20, 2007 08:26AM
Great module, many thanks!
I also had to install the "make BBCode run last" module in order to get this to work.

Also, anyone previously using PCRE replacements in the Simple Text Replacement module to hack YouTube functionality will now need to delete those entries.

/\dam

--
My notable Phorum sites:
Movie Deaths Database - "review comments" system mostly powered by Phorum
Learn Chinese! - integrated forum quiz
Re: Module: BB Code Video
July 20, 2007 08:49AM
Hmmm... if I enable the button in Editor Tools, it shows up but doesn't do anything when clicked.
I have the latest 1.1.20 version and am running Phorum 5.1.23.

It's not a big problem in my opinion, as being able to embed videos via a simple link is far more important!

/\dam

--
My notable Phorum sites:
Movie Deaths Database - "review comments" system mostly powered by Phorum
Learn Chinese! - integrated forum quiz
Re: Module: BB Code Video
July 20, 2007 09:10AM
If you look on your JavaScript console (asuming you're not using MSIE, which does not have that), do you see any messages / errors appear when you click the button? I have the code running on my server too and in FireFox things are working for me.


Maurice Makaay
Phorum Development Team
my blog linkedin profile secret sauce
Sorry, only registered users may post in this forum.

Click here to login