View Full Version : New Posting Features - Attachments No Popup & Auto Upload
Jafo232
10-25-2007, 10:00 PM
This hack was created on a custom job that I am doing for a third party and they gave me permission to release it to the community. It requires several template REPLACEMENTS, but most are minor and should not affect your forums layout. To be prudent BACKUP YOUR TEMPLATES before installing this hack.
This hack is a use at your own risk mod!
What does it do?
As part of the custom job, the client requested a way to make the upload attachments part not require a popup window. Currently, when you upload attachments to threads, you click the manage attachments button and a popup appears and you upload your attachments.
This modification will keep the uploads on the same page (no popup).
Auto uploading is also a feature. When a user browses to the file and selects it, the file is automatically uploaded so the user does not have to click the upload button. I don't know about you guys, but there has been a few times I forget to hit that stupid upload button.
Will this work for your forum?
Well, I have no idea, and honestly it really is not my concern. This should work for a new installation of a Vbulletin forum. It could be possible that you have mod'd your templates to the point where this mod may adversely affect your layout and function.
As for support, don't come begging to me if you cannot get this to work. Most people who pay for scripting never let custom work like this out to the public free of charge. Consider how much you paid for this before you complain if it doesn't work for you.
I will support this as I can, but I am very busy lately so don't hold your breath for replies.
Please don't forget to:
CLICK INSTALL (https://vborg.vbsupport.ru/vborg_miscactions.php?do=installhack&threadid=161148)
Nominate For Mod Of The Month! (https://vborg.vbsupport.ru/vborg_miscactions.php?do=nominate&threadid=161148&type=1)
ChurchMedia
10-26-2007, 04:03 AM
Very cool! I'll try this out tomorrow.
sensimilla
10-26-2007, 04:51 AM
Nice idea ! :D
Lionel
10-26-2007, 04:58 AM
Not too crazy about the iframe, but nice idea.
Jafo232
10-26-2007, 05:33 AM
Well, Iframes just made it easier and gave it an almost AJAX quality. It isn't like Vbulletin doesn't ever use them. In fact, viewing the source chart of this reply page shows:
<iframe style="border: 2px inset ; width: 600px; height: 250px;" tabindex="1" id="vB_Editor_001_iframe">
</iframe>
yoyoyoyo
10-26-2007, 10:07 AM
cool - I like it - just wondering why there are still "upload" buttons, though. (Also -shouldn't this mod be a template modification since it modifies templates?)
Snake
10-26-2007, 02:14 PM
Thanks!
Lea Verou
10-26-2007, 03:05 PM
cool - I like it - just wondering why there are still "upload" buttons, though. (Shouldn't this be a template modification?)
Perhaps for those that don't have javascript enabled.
It should be controlled by a conditional though.
PS: vBulletin uses iframes where it can't do otherwise (in this case, the WYSIWYG editor). This mod doesn't need iframes, an iframe was put there just to cut dev time...
Jafo232
10-26-2007, 03:29 PM
I left the upload button in just in case someones security settings or some other browser setting stopped the auto upload for some reason. Sure, you could take it out if you wanted to.
As for the iframe, it was either that or AJAX, and honestly that really seemed overkill.
yoyoyoyo
10-26-2007, 04:08 PM
I dunno - I think ajax would be cool :D
Hornstar
10-26-2007, 11:54 PM
I believe the reason vbulletin users the pop up is if the upload times out, you will not loose your thread/post. Just a note to users who are not aware of that reason. Other then that, very nice work. I would love for the upload part to be ajax based by default ^^
jasculs
10-27-2007, 03:05 AM
I believe the reason vbulletin users the pop up is if the upload times out, you will not loose your thread/post. Just a note to users who are not aware of that reason. Other then that, very nice work. I would love for the upload part to be ajax based by default ^^
So then wouldn't that be a plus for the iframe, since the attachments aren't actually loading on the page, but in the frame...If the attachment failed then they won't lose the post...Right?
wolfe
10-27-2007, 11:33 AM
just what i was looking for m8 :P thx alot.
chuchukuttie
10-28-2007, 02:51 AM
Looks awesome man, thanks.
TheMilkCarton
10-28-2007, 02:47 AM
Why are people making a deal over the iframe?? Is SEO a huge concern on a private vBulletin page? =p
If someone was using an ancient browser that didn't support iFrames, well, then they probably wouldn't be able to look at the rest of my site, either. ;)
Nice hack, I'll look into this. **bookmarked**
yoyoyoyo
10-28-2007, 03:59 AM
here are the template edits/replacements (assuming that the indicated templates are unmodified) in Template Modification System (TMS) XML format, so anyone that has TMS installed simply needs to upload this XML and the template edits are taken care of for you.
Jafo232
10-28-2007, 03:29 PM
Why are people making a deal over the iframe?? Is SEO a huge concern on a private vBulletin page? =p
If someone was using an ancient browser that didn't support iFrames, well, then they probably wouldn't be able to look at the rest of my site, either. ;)
Yeah, it isn't like your ranking is going to change at all if the upload page is in an IFRAME.
I feel the same way about Javascript. If a user does not have Javascript enabled, their experience on the web it going to be dull just about everywhere they go.
yoyoyoyo
10-29-2007, 03:39 PM
how can we get this to work with your virus scan? I got it to work with the zip file but for some reason the virus scan mod is not working. (using 3.6.8 BTW)
Jafo232
10-29-2007, 05:07 PM
Not sure if this will work with the virus scan.. Should, but I haven't dealt with that plugin in some time..
honestdave
10-29-2007, 05:10 PM
jafo you are a pimp!
yoyoyoyo
10-30-2007, 03:38 AM
Not sure if this will work with the virus scan.. Should, but I haven't dealt with that plugin in some time..
I tried it and get this error after uploading:
Warning: system() has been disabled for security reasons in /newattachment.php(159) : eval()'d code on line 49
and oddly enough, line 49 of newattachment.php is:
if (!$vbulletin->userinfo['userid']) // Guests can not post attachments
(I am not a guest - I am an admin)
:confused:
Jafo232
10-30-2007, 03:42 AM
My guess is first, you have wordwrap on, on your editor. Turn it off so you get the proper line number.
Second, the error is point towards eval'd code, not the source code.
Third, your server does not allow the system command. If you are the server administrator, you will need to edit your php.ini file to allow it. It needs to be able to execute the f-prot program so it can check for viruses..
yoyoyoyo
10-30-2007, 05:18 AM
thanks for the reply - I do not have word wrap on. Any idea on what I should add to the php.ini file to get f-prot working? sorry to hijack your thread here - if you wanna take it to PM I can do that.
JohnBee
10-30-2007, 07:31 PM
I think the popup offers timeout protection whereas embeded would not. It might work well with iFrame though, I will give it a try and see :)
Great idea btw
andrewy3k
10-31-2007, 05:31 AM
hmm.. I wonder if someone can take this mod and turn it into something using this..
http://swfupload.mammon.se/
That would be awesome.. id pay for a mod like that ^ :)
I would use the current one it if it wasn't an iframe..
Jafo232
11-02-2007, 04:36 PM
thanks for the reply - I do not have word wrap on. Any idea on what I should add to the php.ini file to get f-prot working? sorry to hijack your thread here - if you wanna take it to PM I can do that.
In your php.ini file you should see a line that looks something like:
disable_functions = system, exec, passthru, proc_open, shell_exec,
popen
Want to take system out of there...
slednutz.com
11-09-2007, 12:43 AM
Jafo, I'm having a little trouble getting this work work smoothly.
First, I have a highslide mod on, i'm running 3.6.8, and I just installed your edit. I changed the upload template a little (removed the table with the acceptable extensions because I feel it just takes up too much space).
The problems that I'm having now are:
If I click the paperclip nothing happens, except the browser says "error on page" in the bottom left. No biggie - but it'd be nice if clicking the paperclip jumped the page down to where the new upload section is?
Second one is the real issue. Uploaded attachments do nothing when you click on them... and they say "attached images" unlike my previously attached ones that say "attached thumbnails". Can I get a little help as to what I need to change so that my highslide works again?
Thanks
Jafo232
11-14-2007, 05:42 AM
This may be due to your template modifications. Can't confirm it with the default template..
nerofix
11-14-2007, 11:43 PM
Great idea and I like the mod, I just hope it isnt completly unsupported because I got following error message in my browser:
window.opener has no properties
[Break on this error] if (typeof window.opener.vB_Attachments != 'undefined')
newattachment.php (line 462)
Uploading works well but I want get this error away of my newreply page. Someone can help?
slednutz.com
11-15-2007, 01:35 AM
I don't know how this is possible, but I tried to remove this and it won't completely go away.
If anyone tries to upload anything, it does the auto-upload deal... but doesn't save it.
How can I get rid of the auto-upload completely?
basketmen
12-14-2007, 06:52 AM
this hack working for me
but i always get error message after page loaded : Done, but with errors on page
i am using standart internet explorer 6 and windows xp sp2
please share if you know how to fix this, i cant find what's wrong, i am edited from default original template
deltagsm
12-15-2007, 10:37 AM
cool hack...
installed
basketmen
12-16-2007, 04:19 AM
cool hack...
installed
hi
do you dont get any errors on it????
like Done, but with errors on page
70age
04-23-2008, 02:55 AM
I got a problem
After install this hack,I can not use https://vborg.vbsupport.ru/external/2011/04/2.gif,attach tag
Mrdby
05-31-2008, 03:51 PM
3.7.1?
bonkerspr
06-02-2008, 06:04 AM
when i try to upload the plugin i get this error:
This file appears to be a Plugin, not a Product. Please use the Plugin Manager to add this file.
Arrogant-One
08-24-2012, 08:31 AM
Any chance of this mod being updated so that it works on 4.1.12?
I am appalled how ugly the new Attachments Manager looks in the vB 4 series.
career
05-05-2013, 02:13 PM
Dear Jafo
newattachment template requires this <input type="hidden" name="securitytoken" value="$bbuserinfo[securitytoken]" />
vBulletin® v3.8.12 by vBS, Copyright ©2000-2025, vBulletin Solutions Inc.