• This forum has been archived. New threads and replies may not be made. All add-ons/resources that are active should be migrated to the Resource Manager. See this thread for more information.

BB Code Manager

Status
Not open for further replies.
How would you go about making a [youtube][/youtube] code thing similar to the one on Vbulletin?

The Vbulletin one is:

HTML:
<object width="425" height="350"><param name="movie" value="http://www.youtube.com/v/{param}"></param><embed src="http://www.youtube.com/v/{param}" type="application/x-shockwave-flash" width="425" height="350"></embed></object>

Wouldn't that be similar to Xenforo?

If you can help, that'd be nice. Thanks. :3
 
YouTube BB Code is included by default.

ACP -> BB Code Media Sites.

Is there any particular reason why you need another BB Code which does the same thing as [media=youtube][/media] ?
 
Well originally my VBulletin forums had [youtube][/youtube] and all posts moved now show those tags like this post.

And about two years worth of posts are similar to that. So is there a way to change that?
 
You can do that with a couple of SQL queries:

Code:
UPDATE xf_post SET message = REPLACE(message, '[youtube]', '[media=youtube]');
UPDATE xf_post SET message = REPLACE(message, '[/youtube]', '[/media]');

Take a backup first though and test it out on your test/dev installation, if you have one.
 
There's no need to install the add-on for a simple replace such as that.

The add-on is intended for more complex regex cases.

Up to you which one you use though.
 
You can do that with a couple of SQL queries:

Code:
UPDATE xf_post SET message = REPLACE(message, '[youtube]', '[media=youtube]');
UPDATE xf_post SET message = REPLACE(message, '[/youtube]', '[/media]');

Take a backup first though and test it out on your test/dev installation, if you have one.
Hmmm, I can't get that to work, it looks right. My ol' friend Google seems to agree too. Never much luck with mysql. This is the error I'm kicking
Code:
You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near 'UPDATE xf_post SET message = REPLACE(message, '[/youtube]', '[/media]')' at line 2
 
Did the first query run OK?
Try running them separately.

I just tried them on my test installation and they both ran fine.
 
Yeah. Would help to know how. I just browsed through it and landed in editor_is_setup to look at something and got lost. xD
 
I am struggling with what seems to be an otherwise simple adjustment.

In HTML you can add mouse over text to a table cell by adding title="xyz" to the td code. How can I adjust the current [td] bb code to allow for that as an option?

I tried the below and a few variations involving single quotes.

Code:
<td style="border: 1px solid #E0E0E0; padding: 2px 3px title="{1}"">
 
no. My thought was in most cases there would be no mouse-over tip, but in some occasions the tip would be added
 
Status
Not open for further replies.
Top Bottom