Thread: Add-On Releases - Simple Image Upload
View Single Post
  #14  
Old 10-08-2013, 02:06 PM
LordCo LordCo is offline
 
Join Date: Feb 2012
Posts: 5
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

I think the site uses some script to stop people seeing the full code. I finally got to see the full code by using IE5

// MOD Title: Simple Image Upload // MOD Author: Sium < admin@postimage.org > (N/A) http://postimage.org/ // MOD Version: 1.5.0 if(typeof postimage_lang==='undefined') { var postimage_lang="english"; var postimage_add_text="Add image to post"; function postimage_query_string(postimage_search_name){if(w indow.location.hash){postimage_query=window.locati on.hash.substring(1).split("&");for(postimage_i=0; postimage_i<postimage_query.length;postimage_i++){ postimage_string_data=postimage_query[postimage_i].split("=");if(postimage_string_data[0]==postimage_search_name){postimage_string_data.shi ft();return unescape(postimage_string_data.join("="));}}}retur n void(0);}function postimage_isVisible(e){return e.offsetWidth>0 || e.offsetHeight>0;}function postimage_isEditor(e){return (e.id).indexOf('vB_Editor')>-1;}function postimage_isCkeditor(e){return (e.className).indexOf('ckeditor')>-1;}if(opener){var postimage_text=postimage_query_string("postimage_t ext");if(postimage_text){var postimage_id=postimage_query_string("postimage_id" );var postimage_area=opener.document.getElementsByTagNam e('textarea');for(var postimage_i=0;postimage_i<postimage_area.length;po stimage_i++){if(postimage_i==postimage_id){break;} }var postimage_inserted=false;if(typeof opener.vB_Editor==='object'){for(var A in opener.vB_Editor){if(opener.vB_Editor[A].wysiwyg_mode && opener.vB_Editor[A].initialized){opener.vB_Editor[A].write_editor_contents((opener.vB_Editor[A].get_editor_contents()+postimage_text),true);posti mage_inserted=true;}}}if(typeof postimage_area[postimage_i]!=='undefined'){if(postimage_inserted===false && typeof opener.CKEDITOR==='object' && typeof opener.CKEDITOR.instances[postimage_area[postimage_i].id]==='object'){opener.CKEDITOR.instances[postimage_area[postimage_i].id].insertText(postimage_text);}else{postimage_area[postimage_i].value=postimage_area[postimage_i].value+postimage_text;}}opener.focus();window.clos e();}}function postimage_insert(){var postimage_area=document.getElementsByTagName('text area');for(var postimage_i=0;postimage_i<postimage_area.length;po stimage_i++){if(!postimage_area[postimage_i].name.match(/username_list|search|recipients|backup/i)){if(postimage_isVisible(postimage_area[postimage_i]) || postimage_isEditor(postimage_area[postimage_i])){postimage_div=document.createElement('div');pos timage_open=document.createElement('a');postimage_ open.innerHTML=postimage_add_text;postimage_open.h ref="javascriptostimage_upload("+postimage_i+"); ";postimage_span=document.createElement('span');po stimage_span.innerHTML=" • ";postimage_div.appendChild(document.createElement ('br'));postimage_div.appendChild(postimage_span); postimage_div.appendChild(postimage_open);postimag e_div.appendChild(document.createElement('br'));po stimage_div.appendChild(document.createElement('br '));if(postimage_isCkeditor(postimage_area[postimage_i])){if(postimage_area[postimage_i].parentNode.nextSibling){postimage_area[postimage_i].parentNode.parentNode.insertBefore(postimage_div, postimage_area[postimage_i].parentNode.nextSibling);}else{postimage_area[postimage_i].parentNode.parentNode.appendChild(postimage_div); }}else{postimage_area[postimage_i].parentNode.appendChild(postimage_div);}}}}}functi on postimage_upload(areaid){window.open("http://postimage.org/index.php?mode=vbulletin&areaid="+areaid+"&hash=1& lang="+postimage_lang+"&code=&content=&forumurl="+ escape(document.location.href),"postimage","resiza ble=yes,width=500,height=400");return void(0);}if(typeof postimage_text==='undefined'){if(window.addEventLi stener){window.addEventListener('DOMContentLoaded' ,postimage_insert,false);}else if(window.attachEvent){window.attachEvent('onload' ,postimage_insert);}}}

The mod is still dead though - the URL the images get uploaded to is dead
Reply With Quote
 
X vBulletin 3.8.12 by vBS Debug Information
  • Page Generation 0.01374 seconds
  • Memory Usage 1,777KB
  • Queries Executed 11 (?)
More Information
Template Usage:
  • (1)SHOWTHREAD_SHOWPOST
  • (1)ad_footer_end
  • (1)ad_footer_start
  • (1)ad_header_end
  • (1)ad_header_logo
  • (1)ad_navbar_below
  • (1)footer
  • (1)gobutton
  • (1)header
  • (1)headinclude
  • (6)option
  • (1)post_thanks_box
  • (1)post_thanks_button
  • (1)post_thanks_javascript
  • (1)post_thanks_navbar_search
  • (1)post_thanks_postbit_info
  • (1)postbit
  • (1)postbit_onlinestatus
  • (1)postbit_wrapper
  • (1)spacer_close
  • (1)spacer_open 

Phrase Groups Available:
  • global
  • postbit
  • reputationlevel
  • showthread
Included Files:
  • ./showpost.php
  • ./global.php
  • ./includes/init.php
  • ./includes/class_core.php
  • ./includes/config.php
  • ./includes/functions.php
  • ./includes/class_hook.php
  • ./includes/modsystem_functions.php
  • ./includes/functions_bigthree.php
  • ./includes/class_postbit.php
  • ./includes/class_bbcode.php
  • ./includes/functions_reputation.php
  • ./includes/functions_post_thanks.php 

Hooks Called:
  • init_startup
  • init_startup_session_setup_start
  • init_startup_session_setup_complete
  • cache_permissions
  • fetch_postinfo_query
  • fetch_postinfo
  • fetch_threadinfo_query
  • fetch_threadinfo
  • fetch_foruminfo
  • style_fetch
  • cache_templates
  • global_start
  • parse_templates
  • global_setup_complete
  • showpost_start
  • bbcode_fetch_tags
  • bbcode_create
  • postbit_factory
  • showpost_post
  • postbit_display_start
  • post_thanks_function_post_thanks_off_start
  • post_thanks_function_post_thanks_off_end
  • post_thanks_function_fetch_thanks_start
  • post_thanks_function_fetch_thanks_end
  • post_thanks_function_thanked_already_start
  • post_thanks_function_thanked_already_end
  • fetch_musername
  • postbit_imicons
  • bbcode_parse_start
  • bbcode_parse_complete_precache
  • bbcode_parse_complete
  • postbit_display_complete
  • post_thanks_function_can_thank_this_post_start
  • showpost_complete