vb.org Archive

vb.org Archive (https://vborg.vbsupport.ru/index.php)
-   Modification Graveyard (https://vborg.vbsupport.ru/forumdisplay.php?f=224)
-   -   Show Thread Enhancements - Automatic Embedded Video (youtube, plus many more) (https://vborg.vbsupport.ru/showthread.php?t=150472)

mfyvie 06-26-2007 10:33 PM

Quote:

Originally Posted by Fenriz (Post 1277290)
1. If you edit a thread and add the youtube code, it is not converted to video
2. On the dark background there is some white borders around ( http://valhalla.ulver.com/f155/t8409.html )

1. Are you reporting this to me, or telling the poster above to read the notice at the top of the page? If you are reporting this, I would refer you to the post IMMEDIATELY ABOVE the one you wrote. I've taken the time to support people here - could you please just read the notes before you raise an issue with me that I've known from the start? two people in a row raising exactly the same thing is a bit much sometimes.

2. This is what comes in the embed code. If it makes sense at some later date I might consider seeing if it is possible to configure this, but it would be a pain doing it for every different type of embed code.

mfyvie 06-26-2007 11:06 PM

Quote:

Originally Posted by dizzy100 (Post 1276018)
Just got around to testing this. I have found a plugin clash using the Youtube video embedding.

Posting

http://www.youtube.com/watch?v=m2OC5Z1Fii8

Gives me this

[YOUTUBEvid]m2OC5Z1Fii8[/youtubevid]


But doesn't actually embed. Obviously your mod is working but isn't showing.

Through the process of elimination however i tracked it down to a conflict with the Embed XHTML valid YouTube and Google Video into your posts plugin

https://vborg.vbsupport.ru/showthread.php?t=130868

If i disable his plugin and repost the same link, yours embeds as it should.

Whats bizarre is that viper uses the bbcode

[YOUTUBE]http://www.youtube.com/watch?v=m2OC5Z1Fii8[/YOUTUBE]

So its not touching your BBCODE at all. But i've now tried several times and the only way i can get your embed to work is by disabling his. Although thats an option, we do have many youtubes already embedded using his BBCODE.

Any ideas for a fixable solution ?

I tried with myspace videos and they parse and emded fine.

Fixable solution? Yeah, disable Viper's mod! I didn't have time to completely reverse engineer his mod, but I'll explain what I saw. He's going in to the bbcode parser and screwing around. The bad part is things like this:

Code:

        // Everything that's left is invalid calls to the BBCode, so let's ditch it
        // Not using an array since the pre-PHP5 replica function can't handle arrays
        $text = str_ireplace('[YOUTUBE', '[INVALIDYOUTUBE', $text);
        $text = str_ireplace('[/YOUTUBE]', '[/INVALIDYOUTUBE]', $text);
        $text = str_ireplace('[GVIDEO', '[INVALIDGVIDEO', $text);
        $text = str_ireplace('[/GVIDEO]', '[/INVALIDGVIDEO]', $text);

If you look closely, instead of checking for [YOUTUBE] (which is the tag he uses, also not a good choice to use the same name tag as everyone else might and to delete it if you uninstall the product...), he is checking for [youtube (without the ending bracket).

This basically means that he is looking for any other tag which starts with the word youtube, and trashing it. Since I chose youtubevid to try to be unique, his mod is killing my tag, which is why it isn't showing up until you disable his mod.

Be careful about uninstalling his mod though - it will delete the tags he uses as well, and any existing content you have won't be embedded after that. Disable it instead.

The only way you can fix this is to get him to update his mod to not kill off other people's bbcode, or disable it. If you do uninstall it, manually copy down the details of the bbcode for the existing tags, because you'll have to recreate them again afterwards.

What I can do however is make the next version of my mod refuse to install if it finds a mod like this one which conflicts. I know that's not the perfect solution, but short of changing tag names to get around this issue, there's nothing I can do (and I don't want to change tag names now that they are out there!)

cayne 06-27-2007 01:35 AM

Sorry to bug again, but I still don't know where to disable the "copy url above" option:

It sounds to me like you switched on the option to copy the URL above the embedded text. If you don't want that feature, then don't use that option

...

qtouch 06-27-2007 04:15 AM

great hack, love it !!

mfyvie 06-27-2007 07:14 AM

Quote:

Originally Posted by cayne (Post 1277387)
Sorry to bug again, but I still don't know where to disable the "copy url above" option:

Ummm, well since you were the one who switched it on, you should really know where to switch it off? Try the clue in the description of this mod listed at the top of the page, namely:

Quote:

How do I configure it?

Go to AdminCP -> vBulletin Options -> Automatic Embedded Video. All settings are pretty much self explanatory and there is nothing that needs to be changed for most forums.

Hornstar 06-27-2007 07:33 AM

Hey not sure if you are aware of this link, but this is another link from youtube that is different and doesnt work http://www.youtube.com/watch?v=ZtRk0-B7QEc

mfyvie 06-27-2007 07:56 AM

Quote:

Originally Posted by hornstar1337 (Post 1277481)
Hey not sure if you are aware of this link, but this is another link from youtube that is different and doesnt work http://www.youtube.com/watch?v=ZtRk0-B7QEc

Umm, you've been pretty good so far, but does the following from post #129 apply to you?

Quote:

If requesting support, please confirm that you are running version 1.1. People running 1.0 will not be supported and raising issues which are fixed by 1.1 because you didn't bother to upgrade first will result in sarcastic and irritable comments from me
I tested that URL, and it works. It works because I allowed for that format in 1.1.

dizzy100 06-27-2007 08:04 AM

Quote:

Originally Posted by mfyvie (Post 1277320)
Fixable solution? Yeah, disable Viper's mod! I didn't have time to completely reverse engineer his mod, but I'll explain what I saw. He's going in to the bbcode parser and screwing around. The bad part is things like this:

Code:

    // Everything that's left is invalid calls to the BBCode, so let's ditch it
    // Not using an array since the pre-PHP5 replica function can't handle arrays
    $text = str_ireplace('[YOUTUBE', '[INVALIDYOUTUBE', $text);
    $text = str_ireplace('[/YOUTUBE]', '[/INVALIDYOUTUBE]', $text);
    $text = str_ireplace('[GVIDEO', '[INVALIDGVIDEO', $text);
    $text = str_ireplace('[/GVIDEO]', '[/INVALIDGVIDEO]', $text);

If you look closely, instead of checking for [YOUTUBE] (which is the tag he uses, also not a good choice to use the same name tag as everyone else might and to delete it if you uninstall the product...), he is checking for [youtube (without the ending bracket).

This basically means that he is looking for any other tag which starts with the word youtube, and trashing it. Since I chose youtubevid to try to be unique, his mod is killing my tag, which is why it isn't showing up until you disable his mod.

Yikes yes that does seem like sloppy code. I'll have to look at a workable solution.

Disabling vipers code won't work as his bbcode fails to function then. I can only assume hes parsing as its displayed to alter the {param} tag as he presents his bbcode as

Code:

            <object width="425" height="340" type="application/x-shockwave-flash" data="http://www.youtube.com/v/{param}">
                <param name="movie" value="http://www.youtube.com/v/{param}" />
                <param name="wmode" value="transparent" />
                <em><strong>ERROR:</strong> If you can see this, then <a href="http://www.youtube.com/">YouTube</a> is down or you don't have Flash installed.</em>
            </object>

But we posted in the youtube videos using the url link

http://www.youtube.com/watch?v=1eKifSDgU48

So this results in quite a messed up

Code:

            <object width="425" height="340" type="application/x-shockwave-flash" data="http://www.youtube.com/v/http://www.youtube.com/watch?v=1eKifSDgU48">
                <param name="movie" value="http://www.youtube.com/v/http://www.youtube.com/watch?v=1eKifSDgU48" />
                <param name="wmode" value="transparent" />
                <em><strong>ERROR:</strong> If you can see this, then <a href="http://www.youtube.com/">YouTube</a> is down or you don't have Flash installed.</em>
            </object>

The only workable option i've so far found is to remove vipers code completely and manually edit each youtube embedded video replacing his tags with your tags and removing the front line url so

[YOUTUBE]http://www.youtube.com/watch?v=1eKifSDgU48[/YOUTUBE]

becomes

[YOUTUBEvid]1eKifSDgU48{/YOUTUBEvid]

That works effectively but will require some work to track down each post that has his tags embedded.

Thankfully there is a solution to this using phpmyadmin.

Just enter into your database and type in the following mysql in the SQL tag to show you all your posts that have referance to youtube tags (note on a big board this could be many]

Code:

SELECT *
FROM `post`
WHERE `pagetext` LIKE '%[youtube]%'
LIMIT 0 , 30

The you just have to edit the tags from

[YOUTUBE]http://www.youtube.com/watch?v=VZBxfntDq3M[/YOUTUBE]

to

[YOUTUBEvid]VZBxfntDq3M[/YOUTUBEvid]

removing referance to the url and adding this new embedded bbcode.

Its a cludge but if you only have around 50 or so linked youtube videos is likely the best course of action to get this mod working and remove vipers.

mfyvie 06-27-2007 08:13 AM

Quote:

Originally Posted by dizzy100 (Post 1277505)
Yikes yes that does seem like sloppy code. I'll have to look at a workable solution.

Disabling vipers code won't work as his bbcode fails to function then. I can only assume hes parsing as its displayed to alter the {param} tag as he presents his bbcode as [snip]

Well if I were you I'd complain to viper about that block of code. I don't want to second guess him, but if it were me, and I were dealing with this issue, I'd probably go into his plugin and knock out that block of code - it seems agressive to me and doesn't actually do any good. So there might be some other tags around? So what? They can be left in peace.

I think that will solve your issue - but like I said - the thread for that mod would be the best place to discuss how that mod should be changed, rather than this thread.

dizzy100 06-27-2007 08:21 AM

Agreed however i'm happy to substitute one for the other and for those using vipers mod that think the same, theres a workable solution now posted to allow yours to be used across the board :)


All times are GMT. The time now is 09:20 PM.

Powered by vBulletin® Version 3.8.12 by vBS
Copyright ©2000 - 2025, vBulletin Solutions Inc.

X vBulletin 3.8.12 by vBS Debug Information
  • Page Generation 0.01331 seconds
  • Memory Usage 1,784KB
  • Queries Executed 10 (?)
More Information
Template Usage:
  • (1)ad_footer_end
  • (1)ad_footer_start
  • (1)ad_header_end
  • (1)ad_header_logo
  • (1)ad_navbar_below
  • (5)bbcode_code_printable
  • (8)bbcode_quote_printable
  • (1)footer
  • (1)gobutton
  • (1)header
  • (1)headinclude
  • (6)option
  • (1)pagenav
  • (1)pagenav_curpage
  • (4)pagenav_pagelink
  • (1)pagenav_pagelinkrel
  • (1)post_thanks_navbar_search
  • (1)printthread
  • (10)printthreadbit
  • (1)spacer_close
  • (1)spacer_open 

Phrase Groups Available:
  • global
  • postbit
  • showthread
Included Files:
  • ./printthread.php
  • ./global.php
  • ./includes/init.php
  • ./includes/class_core.php
  • ./includes/config.php
  • ./includes/functions.php
  • ./includes/class_hook.php
  • ./includes/modsystem_functions.php
  • ./includes/class_bbcode_alt.php
  • ./includes/class_bbcode.php
  • ./includes/functions_bigthree.php 

Hooks Called:
  • init_startup
  • init_startup_session_setup_start
  • init_startup_session_setup_complete
  • cache_permissions
  • fetch_threadinfo_query
  • fetch_threadinfo
  • fetch_foruminfo
  • style_fetch
  • cache_templates
  • global_start
  • parse_templates
  • global_setup_complete
  • printthread_start
  • pagenav_page
  • pagenav_complete
  • bbcode_fetch_tags
  • bbcode_create
  • bbcode_parse_start
  • bbcode_parse_complete_precache
  • bbcode_parse_complete
  • printthread_post
  • printthread_complete