|
Creating Custom MyCode
|
|
09-16-2006, 05:09 AM
(This post was last modified: 09-16-2006 08:44 AM by xiaozhu.)
Post: #31
|
|||
|
|||
RE: Creating Custom MyCode
shrek Wrote:nope. that didn't work eitherI tested on my board and it worked successfully. And actually, you can just use hello! Code: [align=center][/align] |
|||
|
09-16-2006, 05:48 AM
(This post was last modified: 09-16-2006 06:34 AM by shrek.)
Post: #32
|
|||
|
|||
|
RE: Creating Custom MyCode
lol. i found out why that url code wont work. because regular expression is wrong.
the code should be ; \[url=(.*?)\](.*?)\[\/url\] . thanks everyone. it works now |
|||
|
09-16-2006, 11:55 AM
Post: #33
|
|||
|
|||
|
RE: Creating Custom MyCode
But there is already an url mycode
MyBB Addicted. =) My plug-ins list |
|||
|
09-17-2006, 04:51 AM
Post: #34
|
|||
|
|||
RE: Creating Custom MyCode
CraKteR Wrote:But there is already an url mycodeApparently he wants support for [url="http://example.com"] but MyBB doesn't support the quotes... |
|||
|
09-27-2006, 01:55 AM
Post: #35
|
|||
|
|||
|
RE: Creating Custom MyCode
NOTICE NOTICE.
Guys. I find this topice just now. Many of you,dont note to security in Custom Tags. When you'r creating a custom tag that have some variables INSIDE of html tags, for example <a href="XXXXX" title="YYYYY">blab blab</a> you should not that XX and YY have some conditions for security reasons. they sould not have " because if so they will exploit by XSS techniques by bad guys. Also if they have [ there is a chance that nested tags became a danger of XSS hacking for your board. So a safe custom tage have such conditions : we wana make a tag for tooltip, so we should use <span title="XXXX">blab blab</a> RegExp: \[tooltip=([^"[]+?)\](.*)\[/tooltip] Replacement: <span title="$1">$2</span> and works well and more secure. ![]() ُPersian MyBBoard , Translations, Plugins , Mods, Themes, Templates,... |
|||
|
09-27-2006, 02:06 AM
(This post was last modified: 09-27-2006 02:07 AM by imei.)
Post: #36
|
|||
|
|||
RE: Creating Custom MyCode
WDZ Wrote:It supports, but bad support! in fact it is converted this way: <a href=""http://example.com"" >blabblab</a>CraKteR Wrote:But there is already an url mycodeApparently he wants support for [url="http://example.com"] but MyBB doesn't support the quotes... and you know, it is a bad html, it can be worse if you hit by an attacker. a good Regexp for your purpose is: \[url=(["']?)([^"'[]+?)\\1\](.*?)\[\/url\] <a href="$2">$3</a> it will support: [u rl="blab"]xx[/url] [u rl='blab']xx[/url] [u rl=blab]xx[/url] but not support: {you may not do that by mybb standard.} [url="bl"ab"]xx[/url] [url="bl'ab"]xx[/url] [url=blab"]xx[/url] [url="blab]xx[/url] [url="bl[ab"]xx[/url] NOTE NOTE: it is not still completely safe against XSS: [url="javascript:alert(1)"]xx[/url] but there is a chance that this code if have not a trick agains fixjavascript() function of mybb, became safe... ![]() ُPersian MyBBoard , Translations, Plugins , Mods, Themes, Templates,... |
|||
|
09-27-2006, 04:47 PM
Post: #37
|
|||
|
|||
RE: Creating Custom MyCode
Quote:Ah, so in the next release, my javascript will work?That change is in 1.2.1 for your information - so you should be able to use Javascript in your custom MyCode. Chris Boulton Rate MyBB @ HotScripts.com - Show your support! You can also Write a review! - Help us grow! |
|||
|
04-20-2007, 06:59 PM
Post: #38
|
|||
|
|||
|
RE: Creating Custom MyCode
Is it possible to, say, insert PHP code into a MyCode so that, for example, I could use the PHP function rand() and have the output of that function be output. When I try to set this up how it ought to look just as a script I get weird answers.
Like... Code: <?php $var = rand(1,20) ?> $varQuote:$var. Am I just not getting something about PHP and/or HTML or is this something more to do with how MyCode works? |
|||
|
04-28-2007, 03:56 AM
(This post was last modified: 04-28-2007 05:53 AM by richjohnny.)
Post: #39
|
|||
|
|||
|
RE: Creating Custom MyCode
Hey, how do you add the Custom MyCode links to the Posting Pages?
Like say, Underneath the Smilies. I just made one to insert YouTube videos. I think I made a better way for flash files, this supports width and height and is less confusing. its like this. [flash width=WIDTH height=HEIGHT]FLASH URL[/flash] Expression: Code: \[flash width\=(.*?) height\=(.*?)\](.*?)\[/flash\]Replacement: PHP Code: <object classid="clsid:D27CDB6E-AE6D-11cf-96B8-444553540000" codebase="http://download.macromedia.com/pub/shockwave/cabs/flash/swflash.cab#version=4,0,2,0" width="$1" height="$2">If that doesn't work then I don't know what will. And for Youtube Videos. [youtube]YouTube ID Tag eg: GHfasidfs-dfu[/youtube] The Id tag is that little jumbled up piece of text that appears at the end of the youtube Url. Extension: Code: \[youtube\](.*?)\[/youtube\]Replacement: PHP Code: <object width="425" height="350"><param name="movie" value="http://www.youtube.com/v/$1"></param><param name="wmode" value="transparent"></param><embed src="http://www.youtube.com/v/$1" type="application/x-shockwave-flash" wmode="transparent" width="425" height="350"></embed></object> |
|||
|
05-16-2007, 06:15 PM
Post: #40
|
|||
|
|||
|
RE: Creating Custom MyCode
How would I add mycode that would find [!HA] and replace it with a picture, like http://www.mysite.com/HA.png?
Thnx Skilly |
|||
|
« Next Oldest | Next Newest »
|
Search
Member List
Calendar
Help





![[Image: header.jpg]](http://myimei.com/security/wp-content/themes/wuhan/images/header.jpg)