Advertisement
naruto0150

Bbcode part-5

May 27th, 2014
824
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
  1.  <script language="javascript">
  2. var msg=document.getElementsByName("wkin");
  3. for(var i=0;i<msg.length;i++){
  4. var txt=document.getElementsByName("wkin")[i].innerHTML;
  5. txt=txt.replace(/\[hidden\]/ig,'<center><div style="border:1px solid red;padding:3px;color:#b0b0b0">Content is Hidden you must  use quote!</div></center><div style="display:none">');
  6. txt=txt.replace(/\[\/hidden\]/ig, "</div>");
  7. txt=txt.replace(/\[quote\]/ig,'<div class="quote1">said:</div><div class="quote3" name="codes">');
  8. txt=txt.replace(/\[\/quote\]/ig, "</div>");
  9. txt=txt.replace(/\<div class=\"wcode\">/ig,'<div class="quote1" style="color:#6cb2e4;margin-top:2px">Mã:</div><div class="wcode" name="codes">');
  10. txt=txt.replace(/\[quote=(.+?)\]/ig,'<div class="quote1"><a href="profile_0.xhtml?u=$1"><b>$1</b></a> said:</div><div class="quote3">');
  11. txt=txt.replace(/•/ig,'•');
  12. document.getElementsByName("wkin")[i].innerHTML=txt;
  13. }
  14. </script>
  15.  
  16. <script language="javascript">
  17. var msg=document.getElementsByName("wkin");
  18. for(var i=0;i<msg.length;i++){
  19. var txt=document.getElementsByName("wkin")[i].innerHTML;
  20. txt=txt.replace(/\[file]/ig,'<div class="file">Attached File:</div><div class="wcode" style="padding-left:10px" name="codes">');
  21. txt=txt.replace(/\[\/file]/ig,'</div>');
  22. txt=txt.replace(/\[media]\<a href="(.+?)">(.+?)\<\/a>(.+?)\[\/media]/ig,'<div class="file">Media file $2 (<a href="$1" target="_blank">Download </a>)<span style="float:right">$3</span></div><div class="wcode" name="codes"><center><embed name="flashplayer" src="http://player.longtailvideo.com/player.swf" flashvars="file=http://vhomie.com/$1&amp;autostart=false&amp;image=http://photo.ssc.vn/images/272loading.gif&amp;backcolor=0x000000&amp;frontcolor=0xCCCCCC&amp;lightcolor=0x557722" type="application/x-shockwave-flash" allowfullscreen="true" allowscriptaccess="always" height="450" width="100%"></embed></center></div>');
  23. txt=txt.replace(/\[media=(.+?)](.+?)\[\/media]/ig,'<div class="file">Media $2 (<a href="$1" target="_blank">Download media </a>)</div><div class="wcode" name="codes"><center><embed name="flashplayer" src="http://player.longtailvideo.com/player.swf" flashvars="file=$1&amp;autostart=false&amp;image=http://photo.ssc.vn/images/272loading.gif&amp;backcolor=0x000000&amp;frontcolor=0xCCCCCC&amp;lightcolor=0x557722" type="application/x-shockwave-flash" allowfullscreen="true" allowscriptaccess="always" height="450" width="100%"></embed></center></div>');
  24. document.getElementsByName("wkin")[i].innerHTML=txt;
  25. }
  26. </script>
  27.  
  28. <script language="javascript">
  29. var msg=document.getElementsByName("wkin");
  30. for(var i=0;i<msg.length;i++){
  31. var oldtext=document.getElementsByName("wkin")[i].innerHTML;
  32. var newtext=oldtext.replace(/(^|[\n ])([\w]+?:\/\/[^ ,\"\n\r\t<]*)/ig,'$1<a href="$2" target="_blank">$2</a>');
  33. newtext=newtext.replace(/\[img\](.+?)\[\/img\]/ig,'<a href="$1"><img src="$1" title="Click to load" alt="'+document.title+'" style="max-width:100%"/></a>'); newtext=newtext.replace(/themeid/ig, ":getid-forum:"); newtext=newtext.replace(/themename/ig, document.title+'&get-n='+nj); newtext=newtext.replace(/temaid/ig,tema); document.getElementsByName("wkin")[i].innerHTML=newtext;
  34. }
  35. </script>
  36.  
  37. <script language="javascript">
  38. var msg=document.getElementsByName("wkin");
  39. for(var i=0;i<msg.length;i++){
  40. var txt=document.getElementsByName("wkin")[i].innerHTML;
  41. txt=txt.replace(/\[youtube=(.+?)\]/ig,'<div name="video"><embed type="application/x-shockwave-flash" allowscriptaccess="always" allowfullscreen="true" width="100%" height="400px" src="$1&vq=hd720"/></div>');
  42. txt=txt.replace(/\[PHP\]/ig,'<div class="file">PHP:</div><pre class="wcode" style="margin:0px;" name="codes"><code>');
  43. txt=txt.replace(/\[\/PHP\]/ig, "</code></pre>");
  44. txt=txt.replace(/\[left\]/ig,'<div align="left">');
  45. txt=txt.replace(/\[\/left\]/ig, "</div>");
  46. txt=txt.replace(/\[center\]/ig,'<center>');
  47. txt=txt.replace(/\[\/center\]/ig, "</center>");
  48. txt=txt.replace(/\[right\]/ig,'<div align="right">');
  49. txt=txt.replace(/\[\/right\]/ig, "</div>");
  50. txt=txt.replace(/\[align=(.+?)\]/ig,'<div align="$1">');
  51. txt=txt.replace(/\[\/align\]/ig, "</div>");
  52. txt=txt.replace(/\[email\](.+?)\[\/email\]/ig, '<a href="mailto:$1">$1</a>');
  53. txt=txt.replace(/\[search=(.+?)\]/ig,'<a href="http://www.google.com/search?sitesearch=Naruto0987. wapka.mobi&q=$1">$1</a>');
  54. txt=txt.replace(/\[fsearch=(.+?)\]/ig,'<a href="site_2.xhtml?get-search=$1">$1</a>');
  55. txt=txt.replace(/\[size=(.+?)\]/ig,'<font size="$1">');
  56. txt=txt.replace(/\[\/size\]/ig, "</font>");
  57. txt=txt.replace(/\[input=(.+?)\]/ig,'<span name="codes"><input type="$1" size="20%" value="');
  58. txt=txt.replace(/\[\/input\]/ig,'"></input></span>');
  59. txt=txt.replace(/\[text\]/ig,'<textarea rows="5" name="codes">');
  60. txt=txt.replace(/\[\/text\]/ig, "</textarea>");
  61. txt=txt.replace(/\[form\]/ig,'<form method="get" action="site_0.xhtml">');
  62. txt=txt.replace(/\[\/form\]/ig, "</form>");
  63. txt=txt.replace(/\[option\]/ig, "<option>");
  64. txt=txt.replace(/\[\/option\]/ig, "</option>");
  65. txt=txt.replace(/\[select\]/ig, "<select>");
  66. txt=txt.replace(/\[\/select\]/ig, "</select>");
  67. txt=txt.replace(/\[indent\]/ig,'<div style="padding-left:10px">');
  68. txt=txt.replace(/\[you\]/ig, ':user:');
  69. txt=txt.replace(/\[\/indent\]/ig, "</div>");
  70. txt=txt.replace(/\[xt\]/ig,'<span style="display:scroll;position:relative;top:-10px">');
  71. txt=txt.replace(/\[xb\]/ig,'<span style="display:scroll;position:relative;bottom:-6px">');
  72. txt=txt.replace(/\[\/x\]/ig, "</span>");
  73. txt=txt.replace(/\[OL\]/ig,'<div id="mf_content" style="padding:0px 10px 0px"><ol>');
  74. txt=txt.replace(/\[\/OL\]/ig, "</ol></div>");
  75. txt=txt.replace(/\[LI\]/ig, "<li>");
  76. txt=txt.replace(/\[\/LI\]/ig, "</li>");
  77. txt=txt.replace(/\[xp\]/ig,'<div style="padding-top:8px;padding-bottom:8px"><hr style="border-top:1px solid #aaaaaa"/></div>');
  78. txt=txt.replace(/\[cb\]/ig, '<span class="cb">');
  79. txt=txt.replace(/\[\/cb\]/ig, '</span>');
  80. txt=txt.replace(/\[TD\]/ig, '<td class="box" style="padding:2px">');
  81. txt=txt.replace(/\[\/TD\]/ig, '</td>');
  82. txt=txt.replace(/\[table\]/ig, '<table width="100%">');
  83. txt=txt.replace(/\[\/table\]/ig, '</table>');
  84. txt=txt.replace(/\[TR\]/ig, '<tr>');
  85. txt=txt.replace(/\[\/TR\]/ig, '</tr>');
  86. txt=txt.replace(/\[TD=(.+?)\]/ig,'<td width="$1" class="box" style="padding:2px">');
  87. txt=txt.replace(/\[FLASH\](.+?)\[\/FLASH\]/ig, '<object width="100%" height="400"><param name="movie" value="$1" /><param name="quality" value="high" /><param name="wmode" value="transparent" /><embed width="100%" height="400" src="$1" quality="high" wmode="transparent" type="application/x-shockwave-flash"></embed></object>');
  88. txt=txt.replace(/\[SPOI(.+?)\]/ig, '<style>.spoil$1 nav{display:none} .spoil$1:hover nav{display:block} .spoil$1:hover .linkxem{display:none}</style><div class="spoil$1"><span class="linkxem" style="color:red"><b>Spoiler</b></span><nav>');
  89. txt=txt.replace(/\[\/SPOI\]/ig, '</nav></div>');
  90. txt=txt.replace(/\[youtube\](.+?)\[\/youtube\]/ig,'<embed type="application/x-shockwave-flash" allowscriptaccess="always" allowfullscreen="true" width="100%" height="400px" src="http://youtube.com/v/$1&vq=large"/>');
  91. txt=txt.replace(/\[FONT=(.+?)\]/ig,'<span style="font-family:$1">');
  92. txt=txt.replace(/\[\/FONT\]/ig, '</span>');
  93. txt=txt.replace(/\[COLOR=(.+?)\]/g,'<font color="$1">');
  94. txt=txt.replace(/\[\/COLOR\]/g, '</font>');
  95. txt=txt.replace(/\[LIST\]/ig, '<div style="padding-left:10px">');
  96. txt=txt.replace(/\[\/LIST\]/ig, '</div>');
  97. txt=txt.replace(/\[\*]/ig, '• ');
  98. txt=txt.replace(/\[ATTACH=full\](.+?)\[\/ATTACH\]/ig, '<a href="http://c.gocmobile.net/attachments/$1/" target="_blank" title="Attached file"><img src="http://c.gocmobile.net/attachments/$1/" alt="'+document.title+'"/></a>');
  99. txt=txt.replace(/\mp3.zing.vn\/bai-hat\/(.+?)\/(.+?)\.html/ig,'mp3.zing.vn/embed/song/$2');
  100. txt=txt.replace(/\mp3.zing.vn\/video-clip\/(.+?)\/(.+?)\.html/ig,'mp3.zing.vn/embed/video/$2');
  101. txt=txt.replace(/\[embed\](.+?)\[\/embed\]/ig,'<div class="mbox"><div class="hwcode"><b>Embed video</b></div><div class="wcode" name="codes"><center><embed type="application/x-shockwave-flash" allowscriptaccess="always" allowfullscreen="true" width="100%" height="400px" src="$1"></embed></center></div></div>');
  102. txt=txt.replace(/\[player\](.+?)\[\/player\]/ig,'<object id="flashplayer" classid="clsid:d27cdb6e-ae6d-11cf-96b8-444553540000" height="480" width="100%"><param name="movie" value="http://player.xixam.com/player.swf"><param name="wmode" value="transparent"><param name="allowfullscreen" value="true"><param name="allowscriptaccess" value="always"><param name="flashvars" value="plugins=http://player.xixam.com/plugins4/proxy.swf&proxy.link=$1"><embed name="flashplayer" src="http://player.xixam.com/player.swf" flashvars="plugins=http://player.xixam.com/plugins4/proxy.swf&proxy.link=$1&autostart=false&skin=http://truyenhinhonline.net/common/player/skins/skewd/skewd.zip&controlbar=over&volume=80&abouttext=Vhomie.Com&aboutlink=http://www.vhomie.com" autostart="true" type="application/x-shockwave-flash" allowfullscreen="true" allowscriptaccess="always" wmode="transparent" height="480" width="100%"></object>');
  103. txt=txt.replace(/\[zippy\]http(.+?)www(.+?).zippyshare.com\/v\/(.+?)\/file.html\[\/zippy\]/ig,'<object width="100%" height="80" name="zs_player$3" id="zs_player$3" classid="clsid:D27CDB6E-AE6D-11cf-96B8-444553540000" style="width:100%; height:80px;"><param value="http://api.zippyshare.com/api/player.swf" name="movie"><param value="false" name="allowfullscreen"><param value="always" name="allowscriptaccess"><param name="wmode" value="transparent"><param value="baseurl=http://api.zippyshare.com/api/&file=$3&server=$2&autostart=false&flashid=zs_player$3&availablequality=both&bordercolor=#cccccc&forecolor=#000000&backcolor=#e8e8e8&darkcolor=#000000&lightcolor=#ff6600" name="flashvars"><embed width="100%" height="80" flashvars="baseurl=http://api.zippyshare.com/api/&file=$3&server=$2&autostart=false&flashid=zs_player$3&availablequality=both&bordercolor=#cccccc&forecolor=#000000&backcolor=#e8e8e8&darkcolor=#000000&lightcolor=#ff6600" allowfullscreen="false" allowscriptaccess="always" type="application/x-shockwave-flash" src="http://api.zippyshare.com/api/player.swf" name="zs_player$3" wmode="transparent" id="zs_player$3"></object>');
  104. txt=txt.replace(/5/ig,'::v');
  105. txt=txt.replace(/href=\"%27(.+?)\%27"/ig,'href="$1"');
  106. txt=txt.replace(/href=\"'(.+?)\'"/ig,'href="$1"');
  107. txt=txt.replace(/href=\"&quot;(.+?)\&quot;"/ig,'href="$1"'); document.getElementsByName("wkin")[i].innerHTML=txt;
  108. }
  109. </script>
  110.  
  111. <script language="javascript">
  112. var msg=document.getElementsByName('video');
  113. for(var i=0;i<msg.length;i++){
  114. var txt=document.getElementsByName('video')[i].innerHTML;
  115. txt=txt.replace(/watch/ig,'');
  116. txt=txt.replace(/v=/ig,'v/');
  117. txt=txt.replace('?','');
  118. document.getElementsByName('video')[i].innerHTML=txt;
  119. }
  120. </script>
  121.  
  122.  
  123. <script language="javascript">
  124. var img=document.getElementsByName("codes");
  125. for(var i=0;i<img.length;i++){
  126. var txt=document.getElementsByName("codes")[i].innerHTML;
  127. txt=txt.replace(/\<img(.+?)wapkaimage.com(.+?)alt=\"(.+?)\">/ig,'$3');
  128. txt=txt.replace(/\&lt;img(.+?)wapkaimage.com(.+?)alt=\"(.+?)\"&gt;/ig,'$3');  document.getElementsByName("codes")[i].innerHTML=txt;
  129. }
  130. </script>
  131.  
  132. <script type="text/javascript"> function spoi(newItem){ var item=document.getElementById(newItem); if(item.style.display=='none'){item.style.display='block';} else {item.style.display='none';}} </script>
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement