The Arcive of Official vBulletin Modifications Site.It is not a VB3 engine, just a parsed copy! |
|
#1
|
|||
|
|||
ed2k
hi,
where is the html replacement of this bbcode? e.g. Quote:
Edit: This vbCode show this image before the "URLED" link: |
#2
|
||||
|
||||
Code:
<img src="http://img229.imageshack.us/img229/3470/ed2kiconrz4.gif" border="0" /><a href="ed2k://{option}">{param}</a> |
#3
|
|||
|
|||
Quote:
but i have a problem, when i go to add the ed2k link, the link don't showed in the posts..... why? Where is the problem? --------------- Added [DATE]1209310363[/DATE] at [TIME]1209310363[/TIME] --------------- Edit nothing problems, but the ed2k: in the href="ed2k: can cause problems in adding a full link..... i've removed it and this vBcode works ok. Thank to the moderator. |
#4
|
|||
|
|||
Quote:
i have upgraded to 3.81, but this code want work, is possible an upgrade of this code for 3.81? Thanks in advance |
#5
|
||||
|
||||
It should be the same, the upgrade should not affect this.
|
#6
|
|||
|
|||
I have also problems with the ed2k hack on 3.8.1. First it shows the link nice in a block. and the next day are al ed2k links gone. I must edit the post and click ok and the link is ok again. The next day the same.
I have used this hack: https://vborg.vbsupport.ru/showthrea...highlight=ed2k Already have send a pm to the coder buth no response And ad a request for this mod working on 3.8.1. Ore must i ad the code [ED2K] and [/ED2K] in the bb code manager? So yes how must i fill it there in? maybe anyone? iiyama |
#7
|
||||
|
||||
If you have used a modification - post in that modification's release thread.
|
#8
|
|||
|
|||
Thnx to my chinees warez peopel:
*open: includes/class_bbcode.php *find: /** * Returns whether this parser is a WYSIWYG parser. Useful to change * behavior slightly for a WYSIWYG parser without rewriting code. * * @return bool True if it is; false otherwise */ function is_wysiwyg() { return false; } *add below: /** * * @param string URLs of ed2k * * @return string table with download list * * @by explon */ function handle_ed2k_links($text) { global $vbulletin; if (!$this->is_wysiwyg()) { if (strpos($text, "<br>") OR strpos($text, "<br />")) { $text = str_replace("<br>", "<br />", $text); $text = str_replace("<br />", "\n", $text); $ed2klist = explode("\n", $text); } else { $ed2klist = explode("\n", $text); } $ed2k_rand = rand(0, 1000); $text = "<br /><table class=\"tborder\" cellpadding=\"5\" cellspacing=\"1\" border=\"0\" width=\"100%\" align=\"center\"><thead><tr><td class=\"tcat\" colspan=\"2\">eMule download</td></tr></thead><tbody>"; foreach ($ed2klist AS $key => $ed2k) { $ed2klen = strlen($ed2k); if ($ed2k AND $ed2klen > 7) { $ed2k_array = explode("|", $ed2k); $total += $ed2k_array[3]; $totalper = $ed2k_array[3]; if ($totalper > (1024*1024*1024*1024)) { $totalper = round($totalper/1024/1024/1024/1024,2); $totalper .= "TB"; } else if ($totalper > (1024*1024*1024)) { $totalper = round($totalper/1024/1024/1024,2); $totalper .= "GB"; } else if($totalper > (1024*1024)) { $totalper = round($totalper/1024/1024,2); $totalper .= "MB"; } else { $totalper = round($totalper/1024,2); $totalper .= "KB"; } $ed2k_array[2] = urldecode($ed2k_array[2]); $text .= "<tr align=\"left\" class=\"alt" . iif($key%2, 1, 2) . "\"><td width=\"80%\" align=\"left\"><input type=\"checkbox\" class=\"button\" name=\"ed2k" . $ed2k_rand . "\" value=\"" . $ed2k . "\" onclick=\"Ed2KFileSize('ed2k" . $ed2k_rand . "');\" checked=\"checked\" /> <a href=\"" . $ed2k . "\">" . $ed2k_array[2] . "</a></td><td align=\"center\">" . $totalper . "</td></tr>"; } } if ($total > (1024*1024*1024*1024)) { $total = round($total/1024/1024/1024/1024,2); $total .= "TB"; } else if($total > (1024*1024*1024)) { $total = round($total/1024/1024/1024,2); $total .= "GB"; } else if ($total > (1024*1024)) { $total = round($total/1024/1024,2); $total .= "MB"; } else { $total = round($total/1024,2); $total .= "KB"; } $text .= "<tr align=\"left\" class=\"alt" . iif($key%2, 1, 2) . "\"><td width=\"80%\" align=\"left\"><input type=\"checkbox\" class=\"button\" id=\"CheckAll_ed2k".$ed2k_rand."\" onclick=\"Ed2KCheckAll('ed2k" . $ed2k_rand . "', this.checked)\" checked=\"checked\" /> <label for=\"CheckAll_ed2k" . $ed2k_rand . "\" style=\"margin-right:6px\">all</label> <input type=\"button\" class=\"button\" value=\"download selected\" onclick=\"Ed2KDownLoad('ed2k" . $ed2k_rand . "', 0, 1)\" /> <input type=\"button\" class=\"button\" value=\"copy selected\" onclick=\"Ed2KCopyLink('ed2k" . $ed2k_rand . "')\" /><div id=\"Ed2KLink_ed2k" . $ed2k_rand . "\" style=\"position:absolute; height:0px; width:0px; overflow:hidden;\"></div> </td><td align=\"center\" id=\"FileSize_ed2k" . $ed2k_rand . "\">" . $total . "</td></tr></tbody></table>"; } else { $text = "[ed2k]" . $text . "[/ed2k]" ; } return $text; } *find: if ($vbulletin->options['allowedbbcodes'] & ALLOW_BBCODE_HTML) { // [HTML] $tag_list['no_option']['html'] = array( 'callback' => 'handle_bbcode_html', 'strip_empty' => true, 'stop_parse' => true, 'disable_smilies' => true, 'disable_wordwrap' => true, 'strip_space_after' => 1 ); } *add below: if (($vbulletin->options['allowedbbcodes']) OR $force_all) { // [ED2K] $tag_list['no_option']['ed2k'] = array( 'callback' => 'handle_ed2k_links', 'strip_empty' => true, 'stop_parse' => true, 'disable_smilies' => true, 'disable_wordwrap' => true, 'strip_space_after' => 1 ); } *open: clientscript/vbulletin_global.js *add at the end: function Ed2KCheckAll(str, checked) { var a = document.getElementsByName(str); var n = a.length; for (var i = 0; i < n; i++) { a[i].checked = checked; } Ed2KFileSize(str); } function Ed2KDownLoad(str, i, first) { var a = document.getElementsByName(str); var n = a.length; for (var i = i; i < n; i++) { if(a[i].checked) { window.location = a[i].value; if (first) { timeout = 6000; } else { timeout = 500; } i++; window.setTimeout("Ed2KDownLoad('"+str+"', "+i+", 0)", timeout); break; } } } function Ed2KCopyLink(str) { var a = document.getElementsByName(str); var n = a.length; var CopyLink = document.getElementById("Ed2KLink_" + str) CopyLink.innerHTML = "" for (var i = 0; i < n; i++) { if(a[i].checked) { CopyLink.innerHTML += a[i].value; CopyLink.innerHTML += "<br />"; } } var rng = document.body.createTextRange(); rng.moveToElementText(CopyLink) rng.scrollIntoView(); rng.select(); rng.execCommand("Copy"); rng.collapse(false); } function Ed2KFileSize(str) { var a = document.getElementsByName(str); var n = a.length; try { var Input_CheckAll = document.getElementById("CheckAll_"+str); var FileSize = 0; Input_CheckAll.checked = true ; for (var i=0; i < n; i++) { if (a[i].checked) { var piecesArray = a[i].value.split("|"); FileSize += piecesArray[3]*1; } else { Input_CheckAll.checked = false; } } OutPut = document.getElementById("FileSize_" + str); OutPut.innerHTML = Ed2KGetSize(FileSize, 3, 2); } catch (e) { // Nothing } } function Ed2KGetSize(val, li, sepa) { sep = Math.pow(10, sepa); li = Math.pow(10, li); retval = val; unit = 'Bytes'; if (val >= li*1000000000) { val = Math.round(val / (1099511627776/sep)) / sep; unit = 'TB'; } else if (val >= li*1000000) { val = Math.round(val / (1073741824/sep)) / sep; unit = 'GB'; } else if (val >= li*1000) { val = Math.round(val / (1048576/sep)) / sep; unit = 'MB'; } else if (val >= li) { val = Math.round(val / (1024/sep)) / sep; unit = 'KB'; } return val + unit; } *edit temple: editor_toolbar_on *find: $vBeditTemplate[extrabuttons] *add above: <!-- ED2K --><td><div class="imagebutton" id="{$editorid}_cmd_wrap0_ed2k"><img src="$stylevar[imgdir_editor]/ed2k.gif" width="21" height="20" alt="Wrap eD2k tag" /></div></td><!-- /ED2K --> ====================== Make your own ed2k.gif |
#9
|
||||
|
||||
Quote:
|
#10
|
|||
|
|||
I guess I must be a little slow but I don' t "get" your meaning...
|
|
|
X vBulletin 3.8.12 by vBS Debug Information | |
---|---|
|
|
More Information | |
Template Usage:
Phrase Groups Available:
|
Included Files:
Hooks Called:
|