The Arcive of Official vBulletin Modifications Site.It is not a VB3 engine, just a parsed copy! |
|
#9
|
||||
|
||||
![]()
I saw a product that uses "misc_start" hook to execute js:
PHP Code:
--------------- Added [DATE]1313790827[/DATE] at [TIME]1313790827[/TIME] --------------- The "quickeditor_improver" product uses a trick to get access to that Javascript file: It uses the hook "showthread_complete" to search inside the SHOWTHREAD "clientscript/vbulletin_quick_edit.js?v=" and replaces it with a new value via misc.php page. Code:
unset($search, $replace); $search = 'clientscript/vbulletin_quick_edit.js?v='; $replace = 'misc.php?do=PUT_NAME_HERE_quickedit&v='; $vbulletin->templatecache['SHOWTHREAD'] = str_replace($search, $replace, $vbulletin->templatecache['SHOWTHREAD']); unset($search, $replace); Code:
if ($_REQUEST['do'] == 'PUT_NAME_HERE') { @ob_start(); ?> Copy here the content of "vbulletin_quick_edit.js" file (without the header) <?php header('Content-type: application/x-javascript'); exit; } --------------- Added [DATE]1313791148[/DATE] at [TIME]1313791148[/TIME] --------------- By the way, I found a nice website that helps to reformat code online: http://jsbeautifier.org/ --------------- Added [DATE]1313793365[/DATE] at [TIME]1313793365[/TIME] --------------- I've tried to put this code inside the display_editor function but it kills the quickedit function to transfer me to advanced editor : Code:
var div = C.responseXML.getElementById("addon_js"); div.innerHTML = innerHTML; var x = div.getElementsByTagName("script"); for(var i=0;i<x.length;i++) { eval(x[i].text);} --------------- Added [DATE]1313795897[/DATE] at [TIME]1313795897[/TIME] --------------- This function looks nice, i've tried to edit it, but fail to every time ![]() If someone got an idea... |
|
|
X vBulletin 3.8.12 by vBS Debug Information | |
---|---|
|
|
![]() |
|
Template Usage:
Phrase Groups Available:
|
Included Files:
Hooks Called:
|