Code: Select all
[youtube]http://www.youtube.com/watch?v={SIMPLETEXT}[/youtube]
Code: Select all
<div style="width: 430px; text-align: center; padding: 3px; background-color: #FFFFFF; border: 1px solid #d8d8d8; font-size: 1em;">
<div style="text-transform: uppercase; border-bottom: 1px solid #CCCCCC; margin-bottom: 3px; font-size: 0.8em; font-weight: bold; display: block;">
<span onClick="if (this.parentNode.parentNode.getElementsByTagName('div')[1].getElementsByTagName('div')[0].style.display != '') { this.parentNode.parentNode.getElementsByTagName('div')[1].getElementsByTagName('div')[0].style.display = ''; this.innerHTML = '<b>Youtube Video: </b><a href=\'#\' onClick=\'return false;\'>hide</a>'; } else { this.parentNode.parentNode.getElementsByTagName('div')[1].getElementsByTagName('div')[0].style.display = 'none'; this.innerHTML = '<b>Youtube Video: </b><a href=\'#\' onClick=\'return false;\'>show</a>'; }" />
<b>Youtube Video: </b>
<a href="#" onClick="return false;">show</a>
</span>
</div>
<div class="quotecontent">
<div style="display: none;">
<object width="425" height="350"><param name="movie" value="http://www.youtube.com/v/{SIMPLETEXT}&autoplay=1"></param><param name="wmode" value="transparent"></param><embed src="http://www.youtube.com/v/{SIMPLETEXT}&autoplay=1" type="application/x-shockwave-flash" wmode="transparent" width="425" height="350"></embed></object>
</div>
</div>
</div>
Code: Select all
[youtube]http://www.youtube.com/watch?v=vtE6VKSiVkA[/youtube]
Code: Select all
<div class="top-head-right"><img src="http://valorsolo.com/styles/prosilver/theme/images/top-right.png" alt="" /></div><div class="top-head-left"><img src="http://valorsolo.com/styles/prosilver/theme/images/top-left.png" alt="" /></div><div class="top-head-bg"><ul class="topiclist"><li class="header"><dl><dt>Info</dt></dl></li></ul></div><div style="border: red solid 1px; padding: 10px;"><p>{text}</p></div><div class="bottom-head-right"><img src="http://valorsolo.com/styles/prosilver/theme/images/bottom-right.png" alt="" /></div><div class="bottom-head-left"><img src="http://valorsolo.com/styles/prosilver/theme/images/bottom-left.png" alt="" /></div><div class="bottom-head-bg"></div>
Code: Select all
[info]{text}[/info]
Code: Select all
[info]just put anything here[/info]
Brf wrote:It should be {TEXT} not {text}
You also need that somewhere in your replacement code.
Code: Select all
[youtube]http://uk.youtube.com/watch?v={SIMPLETEXT}[/youtube]
Code: Select all
<div style="padding: 3px; background-color: #FFFFFF; border: 1px solid #d8d8d8; font-size: 1em;">
<div style="text-transform: uppercase; border-bottom: 1px solid #CCCCCC; margin-bottom: 3px; font-size: 0.8em; font-weight: bold; display: block;">
<span onClick="if (this.parentNode.parentNode.getElementsByTagName('div')[1].getElementsByTagName('div')[0].style.display != '') { this.parentNode.parentNode.getElementsByTagName('div')[1].getElementsByTagName('div')[0].style.display = ''; this.innerHTML = '<b>Youtube Video: </b><a href=\'#\' onClick=\'return false;\'>hide</a>'; } else { this.parentNode.parentNode.getElementsByTagName('div')[1].getElementsByTagName('div')[0].style.display = 'none'; this.innerHTML = '<b>Youtube Video: </b><a href=\'#\' onClick=\'return false;\'>show</a>'; }" />
<b>Youtube Video: </b>
<a href="#" onClick="return false;">show</a>
</span>
</div>
<div class="quotecontent">
<div style="display: none;">
<object width="425" height="350"><param name="movie" value="http://uk.youtube.com/v/{SIMPLETEXT}&autoplay=1"></param><param name="wmode" value="transparent"></param><embed src="http://uk.youtube.com/v/{SIMPLETEXT}&autoplay=1" type="application/x-shockwave-flash" wmode="transparent" width="425" height="350"></embed></object>
</div>
</div>
</div>
Thank You ric323ric323 wrote:No. The comment is saying that only a genuine URL will be accepted. It specifically stops any javascript from running, as people can use that to try to break into your board.Francisco.phpBB wrote:What means, this Custom BBCodes rule?Can I use {URL} into JavaScript?Code: Select all
{URL} A valid URL using any protocol (http, ftp, etc… cannot be used for javascript exploits). If none is given, "http://" is prefixed to the string.
As far as phpBB is concerned, they are two different bbcodes.
ric323 wrote:As far as phpBB is concerned, they are two different bbcodes.
Enter definitions for each, and you will have one for: "url", and another for "url=".
Sorry for the late reply...nicholas.alipaz wrote:Thanks for the info, but how does this {IDENTIFIER} code work. I have never seen this code used in custom bbcodes.tzanampeths wrote:FWIW I use the following that also seems to work ok:nicholas.alipaz wrote:...
Code: Select all
[youtube]{TEXT1}watch?v={IDENTIFIER}{TEXT2}[/youtube]
All the best,Code: Select all
<object width="425" height="350"> <param name="movie" value="{TEXT1}v/{IDENTIFIER}"></param> <embed src="{TEXT1}v/{IDENTIFIER}" type="application/x-shockwave-flash" width="425" height="350"></embed> </object><br /> <a href="{TEXT1}watch?v={IDENTIFIER}{TEXT2}" target="_blank"></a><br />
Takis
Does the user have to specify anything other than the url? Additionally, does it allow for any version of the url to be posted? The IDENTIFIER thing seems as though it could simplify the code I posted a bit if I used it and it works sort of like you posted. Thanks.