MyBB Community Forums

Full Version: Need Some help witha few codes
You're currently viewing a stripped down version of our content. View the full version with proper formatting.
Well i am still getting used to the MyCode stuff so i would like some help with fixing some of the code.

Youtube code. My old bbcode for this was [youtube]*vid number*[/youtube]

Example: [youtube]r7NkYu6SaPo[/youtube]

How can I make it do that for MyBB, if there is a way?

Also most of the links posted without using the http://*** have turned into <!-- m --><a class="postlink" href="link">link</a><!-- m -->

How can I make it so that it so that those don't appear if there is a way?

thanks in advance Smile
Would still like some help with this! All help is appreciated Smile
So you are trying add a youtube video using anything after the "watch?v=" ?
Well I know the perfect way to fix your problem!!
OK put this into the "Regular Expression" box EXACTLY:
\[youtube=(.*?)x(.*?)\](.*?)\[/youtube\]
MyBB will read it like this:
[youtube=widthxheight]r7NkYu6SaPo[/youtube]

Then, put this in the html box EXACTLY:
<embed width="$1" height="$2" src="http://www.youtube.com/v/$3">


You should also write a MyCode for without width or height options...
Put this in regular expressions:
\[youtube\](.*?)\[/youtube\]

Then the html replacement:
<embed src="http://www.youtube.com/v/$1">

Good luck!!
Oh and for the second code, this is what you do:
Original expression:
http://(.*?)
And then the HTML Replacement:
<a href="http://$1">Click</a>
You can change click to what ever you want.

But if you want it to be a link that you don't click on, but you copy and paste this is your code:
http://$1
(HTML REPLACEMENT)
(2011-01-28, 07:44 PM)Wes the Bes Wrote: [ -> ]Oh and for the second code, this is what you do:
Original expression:
http://(.*?)
And then the HTML Replacement:
<a href="http://$1">Click</a>
You can change click to what ever you want.

But if you want it to be a link that you don't click on, but you copy and paste this is your code:
http://$1
(HTML REPLACEMENT)

Not sure how well that worked for the problem I was talking about, but it did cause other problems where it would show the link and right before it say Click (linked to site) and the link would be plain. also, all bbcode was shown and so were images, so i removed it. thanks for trying though.

hmmm
I think to fix this you do this:
 http://(.*?)
(there is a space before the whole thing)
And then choose an HTML Replacement also, you should make another code...
http://(.*?) 
(space after it)

And lastly:

http://(.*?)
(hit enter key before it)
Is there any way to find out the location of IP address..not mine but different peoples of different location.. just want to know the location