None of my mods, wherever you find them, are abandoned.
All of them are in developement, even if i am not active on phpbb.com.

[DEV] jQuery [img] Upload v.0.0.1

[DEV] 3.0.* Mod Base

[DEV] jQuery [img] Upload v.0.0.1

Postby Sekuro » 01 Oct 2011, 23:37

jQuery [img] Upload
(jQiU)

MOD-Title: jQuery [img] Upload
MOD-Version: 0.0.1
MOD-Author: 4seven

Credits: spocke and jayarjo for plupload

License: GNU General Public License v2

Inspired by: http://www.phpbb.com/community/viewtopi ... 5#p9595455

MOD-Description: This Mod allows queued multiple [img] uploading on different places

phpBB-Version: phpBB 3.0.x
phpBB-Languages: en
phpBB-Styles: prosilver based styles

Demo: posting.php?mode=reply&f=14&t=11 un: test / pw: testuser
(now with full rights to checkout the delete and admin mode)
works on postbox, signature and pm


Screenshots: (older [dev] ones)
admin mode (no quota)
http://www.loaditup.de/files/609119.png
choose user
http://www.loaditup.de/files/609121.png
administr. user
http://www.loaditup.de/files/609122.png
user mode
http://www.loaditup.de/files/609123.png
user quota reached (no upload)
http://www.loaditup.de/files/609124.png

Download:
jQuery_[img]_Upload_v.0.0.1.zip
(480.44 KiB) Downloaded 695 times

IMPORTANT: Read this before http://www.phpbb.com/community/viewtopi ... #p12991272

#1 Usability-Update for v.0.0.1
http://www.phpbb.com/community/viewtopi ... #p12992027
If you have downloaded and installed before 02.05(May).2011 - 22:45 MEZ follow instruction in link

Image

Image

Current Features:
- Multiple File Selection
- Queued Multiple Upload
- One click various resize
- Near realtime, full ajaxed
- BBCodes inserted logy from Gallery
- Work on Signature, PM, Postbox etc.
- Filetypes: jpg, png, gif (other possible)
- Generated User/Date/Folder
- User Quota
(except administration-group)
- File Delete
- Live Admin Menu
- Group Rights
(usage/deleting/administrating)
- File Statistic

Requirements: no significant

Planned:
- ACP ?
- ?
Mod-Bot / Service-Team
User avatar
Sekuro

Tiptop

Tiptop
 
Posts: 241
Joined: 11 Feb 2008, 11:49
 
Resolution: 1440x900



Re: [DEV] jQuery [img] Upload v.0.0.1

Postby Sekuro » 14 Dec 2011, 21:28

Usability-Update #2 for v.0.0.1

- Fixing caret position behaviour on insert images in message and pm

Explanation:
Before the inserted img code lands on the end of post.
Now it lands on correct position, where you set the cursor (caret position).

Update Instruction

open

styles/prosilver/template/uploadify_files.html

find

Code: Select all
<!-- END user_img -->
// ]]>
</script>


replace with

Code: Select all
<!-- END user_img -->

function 
insert_texts(strText){

                var 
objElem document.getElementById('message');
                
                if(
document.selection)
                    {
                    
objElem.focus();
                    
document.selection.createRange().text=strText;
                    
document.selection.createRange().select();
                    }
                  else if (
objElem.selectionStart || objElem.selectionStart == '0')
                    {
                    
intStart objElem.selectionStart;
                    
intEnd objElem.selectionEnd;
                    
objElem.value = (objElem.value).substring(0intStart) + strText + (objElem.value).substring(intEndobjElem.value.length);
                    
objElem.selectionStart=objElem.selectionEnd=intStart+strText.length;
                    
objElem.focus();
                    }
                  else
                    {
                    
objElem.value += strText;
                    }
}

// ]]>
</script>


find

Code: Select all
<input type="button" class="button2" value="{L_UPL_UPL_INSERT}" onclick="imgcopy{user_img.USER_IMG_KEY}();" />  


replace with

Code: Select all
<input type="button" class="button2" value="{L_UPL_UPL_INSERT}" onclick="insert_texts('{TAG_OPEN}{TAG_OUTPUT}{user_img.USER_IMG_VALUE}{TAG_CLOSE}');return false;" />  


find and remove

Code: Select all
<script type="text/javascript">
// <![CDATA[
function imgcopy{user_img.USER_IMG_KEY}(){
var 
copy{user_img.USER_IMG_KEY} = '{TAG_OPEN}{TAG_OUTPUT}{user_img.USER_IMG_VALUE}{TAG_CLOSE}';
document.forms['postform'].message.value += copy{user_img.USER_IMG_KEY};
document.forms['postform'].message.focus();
return 
false;
}
// ]]>        
</script>


Clear all board- and browser-caches
Mod-Bot / Service-Team
User avatar
Sekuro

Tiptop

Tiptop
 
Posts: 241
Joined: 11 Feb 2008, 11:49
 
Resolution: 1440x900



Re: [DEV] jQuery [img] Upload v.0.0.1

Postby Sekuro » 17 Dec 2011, 03:22

Usability-Update #2 for v.0.0.1

- Fixing caret position behaviour on insert images in signature

Explanation:
Before the inserted img code lands on the end of signature.
Now it lands on correct position, where you set the cursor (caret position).

Update Instruction

open

styles/prosilver/template/uploadify_files_sig.html

find

Code: Select all
<!-- IF S_UCP_ACTION and not S_PRIVMSGS and not S_EDIT_DRAFT -->
$(
"#clickdatecks").click(function(){
$(
"#upl").load("plupload/uploadify_files_sig.php?sid={SESSION_ID}", {date : $("#datecks").val(), user_its : $('#user_it').val()});
if ($(
'#user_it').val() != '{USER_ID}'){
$(
"#uploader").css("display""none");}
return 
false;});
<!-- ELSE -->
$(
"#clickdatecks").click(function(){
$(
"#upl").load("plupload/uploadify_files.php?sid={SESSION_ID}", {date : $("#datecks").val(), user_its : $('#user_it').val()});
if ($(
'#user_it').val() != '{USER_ID}'){
$(
"#uploader").css("display""none");}
return 
false;});
<!-- ENDIF -->  


replace with

Code: Select all
$("#clickdatecks").click(function(){
$(
"#upl").load("plupload/uploadify_files_sig.php?sid={SESSION_ID}", {date : $("#datecks").val(), user_its : $('#user_it').val()});
if ($(
'#user_it').val() != '{USER_ID}'){
$(
"#uploader").css("display""none");}
return 
false;});  


find

Code: Select all
<!-- END user_img -->
// ]]>
</script>


replace with

Code: Select all
<!-- END user_img -->

function 
insert_texts(strText){

                var 
objElem document.getElementById('signature');
                
                if(
document.selection)
                    {
                    
objElem.focus();
                    
document.selection.createRange().text=strText;
                    
document.selection.createRange().select();
                    }
                  else if (
objElem.selectionStart || objElem.selectionStart == '0')
                    {
                    
intStart objElem.selectionStart;
                    
intEnd objElem.selectionEnd;
                    
objElem.value = (objElem.value).substring(0intStart) + strText + (objElem.value).substring(intEndobjElem.value.length);
                    
objElem.selectionStart=objElem.selectionEnd=intStart+strText.length;
                    
objElem.focus();
                    }
                  else
                    {
                    
objElem.value += strText;
                    }
}

// ]]>
</script>


find

Code: Select all
<input type="button" class="button2" value="{L_UPL_UPL_INSERT}" onclick="imgcopy{user_img.USER_IMG_KEY}();" />   


replace with

Code: Select all
<input type="button" class="button2" value="{L_UPL_UPL_INSERT}" onclick="insert_texts('{TAG_OPEN}{TAG_OUTPUT}{user_img.USER_IMG_VALUE}{TAG_CLOSE}');return false;" />   


find and remove

Code: Select all
<script type="text/javascript">
// <![CDATA[
function imgcopy{user_img.USER_IMG_KEY}(){
var 
copy{user_img.USER_IMG_KEY} = '{TAG_OPEN}{TAG_OUTPUT}{user_img.USER_IMG_VALUE}{TAG_CLOSE}';
document.forms['postform'].message.value += copy{user_img.USER_IMG_KEY};
document.forms['postform'].message.focus();
return 
false;
}
// ]]>        
</script>


Clear all board- and browser-caches


- package will be updated soon
- demo is updated
Mod-Bot / Service-Team
User avatar
Sekuro

Tiptop

Tiptop
 
Posts: 241
Joined: 11 Feb 2008, 11:49
 
Resolution: 1440x900



Re: [DEV] jQuery [img] Upload v.0.0.1

Postby Sekuro » 19 Nov 2013, 02:06

Info

The demo is fixed and work again.
Was a kind of htaccess error,
bcs. of domain transfer.
Mod-Bot / Service-Team
User avatar
Sekuro

Tiptop

Tiptop
 
Posts: 241
Joined: 11 Feb 2008, 11:49
 
Resolution: 1440x900



Return to phpbb 3.0.* St@ff

Who is online

Users browsing this forum: No registered users and 1 guest

cron