Go Back   vb.org Archive > vBulletin Modifications > vBulletin 3.8 Modifications > vBulletin 3.8 Add-ons
FAQ Community Calendar Today's Posts Search

Reply
 
Thread Tools
Starcraft 2 Replay Uploader Details »»
Starcraft 2 Replay Uploader
Version: 1.00, by jdelator jdelator is offline
Developer Last Online: Nov 2018 Show Printable Version Email this Page

Category: Integration with vBulletin - Version: 3.8.7 Rating:
Released: 12-29-2010 Last Update: Never Installs: 2
Template Edits
Re-useable Code Translations  
No support by the author.

Starcraft 2 Replay Uploader

Description

This modification will modify the vbulletin template to add visitors simple replay sharing on your forums. The button can upload many replay at the same time. Each uploaded replay will have the appropriate bbcode in the text box inserted automatically.

The replay upload button will be available whenever a registered member wants to create a new thread or post a reply (not a quick reply).

It is recommended that the board also use smilies for the the three terran races (:T:, :Z:, :P: ) in the same manner teamliquid.net does. Installation instructions can be found below.

The replays will be hosted at topreplays.com but will be available on your forum through download links.

Template installation

The template edits will need to be depending on where you want to add the feature.

The code needed

1. "newthread" Template (Forum) - When the member creates a new thread

Find: $attachmentoption
Below it paste the code.

2. "newreply" Template (Forum) - When the member creates a new reply to a thread (not quick reply)

Find: $attachmentoption
Below it paste the code.

3. "editpost" Template (Forum) - When the member is editing a post (not quick edit)

Find: $attachmentoption
Below it paste the code.

Code:
		   <script src="http://topreplays.com/Content/JS/swfobject.js" type="text/javascript"></script>
		   <script type="text/javascript">		
		   
					function initupload()
					{
						var uploadKey = ""; //optional
						$('#uploadreplays').uploadify({
							'uploader': 'http://topreplays.com/Content/uploadify.swf',
							'script': 'http://topreplays.com/Replays/InsertJson',
							'cancelImg': 'http://topreplays.com/img/layout/error.png',
							'folder': '/_uploads',
							'multi': true,
							'scriptAccess' : 'always',
							'auto': true,
							'buttonText': 'Upload Replay',
							'scriptData': { 'UploadKey': uploadKey },
							'onComplete': function (event, queueID, fileObj, response, data) {
								var replay = jQuery.parseJSON(response);
								vB_Editor['vB_Editor_001'].insert_text(replay.TlCode + ' \n', replay.TlCode.length + 2, 0);
								$('#uploadreplays').val($('#uploadreplays').val); 
								return false;
							},
							'onAllComplete': function (event, queueID, fileObj, response, data) {
								return false;
							}
						});
					}
					
					/******** Load jQuery if not present *********/
					if (typeof jQuery === "undefined" || jQuery.fn.jquery !== '1.4.2') {
					    var jquery_tag = document.createElement('script');
					    jquery_tag.setAttribute("type","text/javascript");
					    jquery_tag.setAttribute("src",
					      "http://ajax.googleapis.com/ajax/libs/jquery/1.4.2/jquery.min.js")
					      
					    var script_tag = document.createElement('script');
					    script_tag.setAttribute("type","text/javascript");
					    script_tag.setAttribute("src",
					      "http://topreplays.com/Content/JS/jquery.uploadify.js")
					    script_tag.onload = initupload; // Run initupload() once jQuery has loaded
					    script_tag.onreadystatechange = function () { // Same thing but for IE
					      if (this.readyState == 'complete' || this.readyState == 'loaded') 
					      initupload();
					    }
					    document.getElementsByTagName("head")[0].appendChild(jquery_tag);
					    document.getElementsByTagName("head")[0].appendChild(script_tag);
					} else {
						initupload();
					}

		    </script>
				<fieldset class="fieldset">
			     	<legend>Upload Starcraft 2 Replay</legend>
			     	<div align="center">
						<input id="uploadreplays" name="uploadreplays" type="file" onmouseover="initupload()" /><br />
			     	</div>
				</fieldset>

Smilie installation

First go the add a single smilie menu (Admin Control Panel > Smilies > Add New Smilie > Add a Single Smilie)
Give it a Title
For text to replace choose of the races (:T:, :Z:, :P: )
For smilie image path give it a path relative to your vb installation (e.g. images/smilies/z.gif). You are free to choose the icons. Some example icons are
The rest of the options are up to you.


Demo

This modification is currently live at wcreplays.com/forums, feel free to experiment and use the modification on that website.


Version History
  • v1.0 - Initial Release

Screenshots

File Type: png newreply.png (43.9 KB, 0 views)
File Type: jpg replay preview.jpg (66.0 KB, 0 views)
File Type: jpg replayupload.jpg (47.8 KB, 0 views)

Supporters / CoAuthors

Show Your Support

  • This modification may not be copied, reproduced or published elsewhere without author's permission.

Comments
  #2  
Old 12-31-2010, 10:58 PM
FreshFroot's Avatar
FreshFroot FreshFroot is offline
 
Join Date: Jul 2005
Posts: 770
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

Nice work! MOTM voted!
Reply With Quote
  #3  
Old 01-10-2011, 12:33 AM
Xarwin Xarwin is offline
 
Join Date: Jan 2011
Posts: 29
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

Awesome, thanks!
Reply With Quote
  #4  
Old 03-10-2011, 01:33 PM
hossgher hossgher is offline
 
Join Date: Feb 2010
Posts: 8
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

When will you have a version for VB 4.1.1 / 4.X.X?
Reply With Quote
  #5  
Old 10-08-2011, 05:17 PM
iMoEthos iMoEthos is offline
 
Join Date: Sep 2011
Posts: 1
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

Would this work for 4.1.5 Patch 1? Anyone help please?
Reply With Quote
Reply


Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off

Forum Jump


All times are GMT. The time now is 11:31 AM.


Powered by vBulletin® Version 3.8.12 by vBS
Copyright ©2000 - 2025, vBulletin Solutions Inc.
X vBulletin 3.8.12 by vBS Debug Information
  • Page Generation 0.04139 seconds
  • Memory Usage 2,266KB
  • Queries Executed 22 (?)
More Information
Template Usage:
  • (1)SHOWTHREAD
  • (1)ad_footer_end
  • (1)ad_footer_start
  • (1)ad_header_end
  • (1)ad_header_logo
  • (1)ad_navbar_below
  • (1)ad_showthread_beforeqr
  • (1)bbcode_code
  • (1)footer
  • (1)forumjump
  • (1)forumrules
  • (1)gobutton
  • (1)header
  • (1)headinclude
  • (1)modsystem_post
  • (1)navbar
  • (4)navbar_link
  • (120)option
  • (5)post_thanks_box
  • (5)post_thanks_button
  • (1)post_thanks_javascript
  • (1)post_thanks_navbar_search
  • (5)post_thanks_postbit_info
  • (4)postbit
  • (3)postbit_attachment
  • (5)postbit_onlinestatus
  • (5)postbit_wrapper
  • (1)spacer_close
  • (1)spacer_open
  • (1)tagbit_wrapper 

Phrase Groups Available:
  • global
  • inlinemod
  • postbit
  • posting
  • reputationlevel
  • showthread
Included Files:
  • ./showthread.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
  • showthread_start
  • showthread_getinfo
  • forumjump
  • showthread_post_start
  • showthread_query_postids
  • showthread_query
  • bbcode_fetch_tags
  • bbcode_create
  • showthread_postbit_create
  • postbit_factory
  • 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_attachment
  • postbit_display_complete
  • post_thanks_function_can_thank_this_post_start
  • tag_fetchbit_complete
  • forumrules
  • navbits
  • navbits_complete
  • showthread_complete