|
Joined: Apr 2001
Posts: 235
Member
|
Member
Joined: Apr 2001
Posts: 235 |
Error3 means that you have to configure Who's Online Setting in the Control Panel. Don't know why your vars_wordlet_mods.cgi was overwritten, maybe it had to do with your who's online setting.
|
|
|
|
Joined: Apr 2001
Posts: 235
Member
|
Member
Joined: Apr 2001
Posts: 235 |
Most likely, your cp.cgi was not hacked properly. Remember when you "grab the other required files" wordlets_mods should be one of them. _
|
|
|
|
Joined: Oct 2001
Posts: 9
Junior Member
|
Junior Member
Joined: Oct 2001
Posts: 9 |
well that's strange because there is one there with other vars 
|
|
|
|
Joined: Feb 2001
Posts: 28
Member
|
Member
Joined: Feb 2001
Posts: 28 |
I installed this hack properly (i think!) and am having trouble after the file is uploaded. right now im on a test board running locally on my machine. the permissions are all fine, and when i try uploading (locally) the file uploads ok. but it seems to be corrupted. im trying right now on .gifs and .jpgs but they are garbage when i try to click on the link. any ideas? running win2k server.
|
|
|
|
Joined: Oct 2001
Posts: 9
Junior Member
|
Junior Member
Joined: Oct 2001
Posts: 9 |
yea, well you must put pictures, and some other files in BINARY and *.cgi *.pl *.html in PLAIN a.k.a. ASCII
|
|
|
|
Joined: Feb 2001
Posts: 28
Member
|
Member
Joined: Feb 2001
Posts: 28 |
where do you tell it if its ascii or binary?
|
|
|
|
Joined: Oct 2001
Posts: 9
Junior Member
|
Junior Member
Joined: Oct 2001
Posts: 9 |
well that depends on your FTP programm or you could do it manualy using this down in ftp TYPE A -> ascii TYPE I -> Binary
|
|
|
|
Joined: Feb 2001
Posts: 28
Member
|
Member
Joined: Feb 2001
Posts: 28 |
Are we talking about the same thing here?! The purpose of the Upload Hack is so you dont need to use a FTP program. The user click Upload Form and then they upload a file through the script. upload.cgi seems to be corrupting the file, does anyone know why?
|
|
|
|
Joined: Oct 2001
Posts: 9
Junior Member
|
Junior Member
Joined: Oct 2001
Posts: 9 |
I guess not  I thought that your files FOR upload hack gets corrupted when you upload them, hehe, sorry  :rolleyes:
|
|
|
|
Joined: Dec 2000
Posts: 371
Member
|
Member
Joined: Dec 2000
Posts: 371 |
Ok, the upload works well. But a file with the name "img.jpg" shows up as "1787826.jpg" (???) Also..it shows the url to the uploaded image, not the code to show the image between ubb code tags. Can this be changed? Tnx in advance....great hack! 
|
|
|
|
Joined: Sep 2001
Posts: 170
Member
|
Member
Joined: Sep 2001
Posts: 170 |
I also would like to know if you could add an option to allow the user to name the file or leave it the same as whats being uploaded. It would need to check for the files existance prior to uploading just for safety sake.
I am using this to upload pics and display them in the post that I upload from, the code added is the URL tag and not the IMG tag on the results window, how hard would it be to add a toggle in the CP to allow linking to the file (URL tag) or actually putting the file in the post if its an jpg or gif?(img tag - we are only using it for pics)
[ 11-10-2001: Message edited by: MrStormyNights ]
|
|
|
|
Joined: Jun 2001
Posts: 43
Member
|
Member
Joined: Jun 2001
Posts: 43 |
Stormy I was having the same problem as you. On my board, I will be restricting image posting to 640x480 or smaller. For larger images they would need to upload that picture and post a link. There for I modified the Upload hack to meet my demands. here is a sample of what my modified version of the upload hack looks like. If it's alright with LK I will show you the coding for this change, which really isn't that hard to do. But I want to get LK's permission first. ![[Linked Image]](http://cf3d.hypermart.net/uploadsample.gif) P.S. LK - I read the PM you sent me back but that version is for 6.0 which has alot of coding different than 6.1.0.2. Are you going to be adding the option in the 6.1.0.2. version of this hack to pick a random number, user name, or number? I'm not a coder so I wouldn't know where to begin... Thanks... Tom [ 11-12-2001: Message edited by: tomjinx1 ] [ 11-12-2001: Message edited by: tomjinx1 ]
|
|
|
|
Joined: Feb 2001
Posts: 54
Member
|
Member
Joined: Feb 2001
Posts: 54 |
Thought everything went great but when I click on "upload an image" I get the following error at the bottom of the window: Software error: Can't call method "close" on an undefined value at /webdata/www.colorado4x4.org/cgi-bin/ubb/ubb_lib_filehandler.cgi line 83 during global destruction.The file uploads fine and the followup window does not have this error text at the bottom. Any idea what is causing this? I have re-hacked and double checked each step but I see nothing out of place  Any help appreciated. Also, for the 6.0 mod I had altered the code to preserve the filename as opposed to this version's method of renaming the user's file to a string of numbers (yuk). I lost my mod when I upgraded, so if any of you know how to preserve the filename please share. Otherwise I'll figure it out on my own again eventually 
|
|
|
|
Joined: Feb 2001
Posts: 54
Member
|
Member
Joined: Feb 2001
Posts: 54 |
OK, to retain the filename you need to edit upload.cgi as follows (note, most of this code comes from the 6.0 version of this mod): Find: Change this to: That's it. However, I took this one step further and disallowed overwritting files (since file names are no longer assigned). To do this: Find: This is just the error message so I changed it to the following: Now to ensure the file can't be overwritten: Find: and replace it with: That retains the file name and ensures that they can't be accidentally overwritten. I'm still stuck on the error I mentioned above though. For now I just set the window size so it trims off the error message at the bottom :rolleyes: but I'd really like to know why it's there to begin with. Oh, one more thing... in public_new_topic_form.pl, public_new_reply_form.pl, public_edit_post.pl, and public_pm_form.pl the mod specifies some javascript code for the upload window. Purely cosmetic, but in each case I set toolbar, location, menubar, scrollbars, and resizeable all to no. Finally I ditched the spaces at the top of the upload window. To kill that space go to upload_form.cgi, look for and simply delete the part. That's the extent of my own tweaks to this mod, any help on the error I mentioned would be much appreciated  [ 11-14-2001: Message edited by: ericruhl ]
|
|
|
|
Joined: Apr 2001
Posts: 235
Member
|
Member
Joined: Apr 2001
Posts: 235 |
To get rid of this error, open file "upload_form.cgi". ########## FIND ########## # DANGER: Do not remove the following line! 1; ######### ADD ABOVE ############ close; ########## DONE ################
|
|
|
|
Joined: Feb 2001
Posts: 54
Member
|
Member
Joined: Feb 2001
Posts: 54 |
Woohoo! Sweet, thanks freeTV! That fixed it 
|
|
|
|
Joined: Oct 2000
Posts: 109
Member
|
Member
Joined: Oct 2000
Posts: 109 |
|
|
|
|
Joined: Mar 2001
Posts: 7,394
Admin / Code Breaker
|
Admin / Code Breaker
Joined: Mar 2001
Posts: 7,394 |
You got my permission 
|
|
|
|
Joined: Apr 2001
Posts: 235
Member
|
Member
Joined: Apr 2001
Posts: 235 |
|
|
|
|
Joined: Mar 2001
Posts: 7,394
Admin / Code Breaker
|
Admin / Code Breaker
Joined: Mar 2001
Posts: 7,394 |
|
|
|
|
Joined: Oct 2001
Posts: 4
Junior Member
|
Junior Member
Joined: Oct 2001
Posts: 4 |
Well guys,
It is 4:00am and I'm packing it in. I can get the upload to function but the file that is uploaded is corrupted. I can see the right colors of an uploaded .gif but it doesn't look right. Any ideas on how a file would get corrupted during upload?
This is an NT 4 server with IIS4. The file gets up there but it is messed up.
Thanks, Tim H.
|
|
|
|
Joined: Feb 2001
Posts: 28
Member
|
Member
Joined: Feb 2001
Posts: 28 |
Tim, Im having the same problems. Are you trying to upload the file from the same computer that the site resides on? I have a feeling thats why mine isnt working. Once I deploy, Im hoping it will magically fix itself!
|
|
|
|
Joined: Jun 2001
Posts: 43
Member
|
Member
Joined: Jun 2001
Posts: 43 |
Tim, I'm not sure that I can help much, but you might want to check and make sure that all your write permissions are set right for the upload directory. I'm not sure exactly how you would do that for IIS... If I have time, I will setup a test board on my IIS machine and see if I can get it to work. If so, I will let you know what I find out. Everyone else, if you are interested in displaying both the URL code and the IMG coding after your user uploads check out this FILE . It's pretty simple and I made it as cut and dry as possible. Enjoy Tom
|
|
|
|
Joined: Oct 2001
Posts: 4
Junior Member
|
Junior Member
Joined: Oct 2001
Posts: 4 |
No, I'm using another machine at my company's home office that hosts the folder. I have control and get the file created but the contents are corrupt. I'm going to make up some known content binary files and see how they get corrupted when posted.
Later,
TimH
|
|
|
|
Joined: Oct 2001
Posts: 4
Junior Member
|
Junior Member
Joined: Oct 2001
Posts: 4 |
AH HA! I got it! When using the upload hack on NT4 you must add the binmode function just after opening the file and BEFORE using the filehandle. My NT or some variant of the PERL library etc. opens the file in a text mode and translates 0A (linefeed) to 0D0A (carriage return, linefeed). The corrupt file was filled with 0D's that shouldn't have been there. They were next to each 0A that was in the original graphic file. Open upload.cgi and find... undef $BytesRead; undef $Buffer; while ($Bytes = read($File_Handle,$Buffer,1024)) { $BytesRead += $Bytes; print OUTFILE $Buffer; And add just BEFORE it... binmode OUTFILE; I tested this on text files as well and the file was created identically. This only needs to be done on an operating system that distinguishes between text and binary files. Great hack by the way, I have learned a great deal during its installation. Thanks all, Tim
|
|
|
|
Joined: Mar 2000
Posts: 21,079 Likes: 3
I type Like navaho
|
I type Like navaho
Joined: Mar 2000
Posts: 21,079 Likes: 3 |
MHK (2.0 version) written for this one, if you want it:
https://ubbdev.com/db/cgi/ultimatebb.cgi?ubb=get_topic;f=22;t=000011
I didn't include the the instructions to edit the pm template files, you'll need to add that yourselves if you want it. This one also includes Tim's change from the previous post here, if that makes any difference to you.
Added and tested on our database files, 6.1.0.3
|
|
|
|
Joined: Dec 2001
Posts: 96
Member
|
Member
Joined: Dec 2001
Posts: 96 |
in the file mods_wordlet_install.txt in Step 3 none of the items that you are supposed to find are present. WTF? I'm using UBB 6.1.0.3.
[code][/code]
[ 01-02-2002 08:45 PM: Message edited by: [ #1 Stunna ] ]
#1 Stunna
|
|
|
|
Joined: Dec 2001
Posts: 96
Member
|
Member
Joined: Dec 2001
Posts: 96 |
OK, used the MultiHack file and all systems are go !
#1 Stunna
|
|
|
|
Joined: Feb 2001
Posts: 54
Member
|
Member
Joined: Feb 2001
Posts: 54 |
OK, here's a question / feature request for ya. How would I go about restricting upload permissions to specific users? Perhaps another profile field (1 = can upload, 0 = cannot upload) and a simple if-then statement perhaps? Not sure how to go about this, but I REALLY would like to be able to restrict upload permissions. Any thoughts?
|
|
|
|
Joined: Feb 2001
Posts: 54
Member
|
Member
Joined: Feb 2001
Posts: 54 |
Anyone? Beuller? Anyone? I'm trying to figure this out on my own and not having too much luck. I don't mind editing profiles manually if need be or I'm fairly certain I can at least figure out how to code that in the control panel, but I don't know how to perform the user profile check & if-then statement in public_new_topic.pl, etc. so that the upload link only appears if the profile flag is set to "1". Perhaps I'm looking at this the wrong way too because I wouldn't want them to be able to just type in the URL and access the upload either. So, perhaps I should be looking at modifying upload.cgi somehow? Check the user profile there when they click the upload link and if they don't have permission they get an error message? I'd still like to know how to check user profile values so that I can display the link only for those users with permission. Can anyone help me with this? Puhleeeezze? 
|
|
|
|
Joined: Oct 2001
Posts: 199
Member
|
Member
Joined: Oct 2001
Posts: 199 |
Hi Ely, I wanted to bring this upload hack and its features to you also, the one Stunna is refering to above. I had a couple posts on this board concerning it before I came across your hack here. My first post whihc shows Vipermad had found the hack is: https://ubbdev.com/ubbcgi/ultimatebb.cgi?ubb=get_topic;f=26;t=000790#000002 I wouldn't want you to change your prog unless you wanted but I am also offering a barter if you could port this old one if you could. My last link I posted on this one is: https://www.ubbdev.com/ubbcgi/ultimatebb.cgi?ubb=get_topic&f=28&t=000473&p= This link is my offer to any hack that can help port it over for me but also shows some of the details of the hack. It has all the features I really want. Big thing is placment of uploads directly in the message off to the right, up to three. They enlarge when the user clicks on them. Please visit their and goto post and upload and check it out. PS: If your interested in any type barter, please PM me. Thanks for your concideration Rainner 
|
|
|
|
Joined: Jan 2002
Posts: 48
Member
|
Member
Joined: Jan 2002
Posts: 48 |
Hi there, I want to set up a custom header and footer for the upload form, rather than using the ones in the current forum's style template. In the file upload_form.cgi, I tried this: [/code] Then I added a "require" to the list of required files at the top:
[code] Then I made the file UploadForm_html.pl and dropped it into the Templates folder. This template simply defines the two vars, $html_header_skusa and $html_footer_skusa. That way, the lines: print "$Header_in"; and $Footer_in in the UPLOADform should print my custom header and footer, right? But what I get is the custom, header and footer together at the top of the page, with the UPLOADform output below it (with the "close method" error described in the last post). Also, the UPLOADform prints an extra body tag line at the top of the output page. Any tips for how I can get the form to display *within* my custom header and footer? Thanks much, Getagrip Greg [ 01-20-2002 07:42 PM: Message edited by: GetAGrip ]
|
|
|
|
Joined: Jan 2002
Posts: 48
Member
|
Member
Joined: Jan 2002
Posts: 48 |
Hello,
Has anyone had the following error come up in the popup window? code:
[code][/code]
I can't figure out where the "close" method is being called from. I get this msg in MSIE, NS6, and Opera.
Any help appreciated!
Thanks, Getagrip Greg
[ 01-20-2002 07:44 PM: Message edited by: GetAGrip ]
|
|
|
|
Joined: Sep 2001
Posts: 2
Junior Member
|
Junior Member
Joined: Sep 2001
Posts: 2 |
could some1 please assist me my friend owns a ubb board, and while he is out at the moment (uni exams) he put me in charge of the forums, he gave me admin axs and ftp axs i attempted to install this hack i followed the instructions to the last ; but when i open cp.cgi and click misc. there is no option for the upload form the upload form works fine wot can be the problem? email: [email protected]
|
|
|
|
Joined: Oct 2001
Posts: 199
Member
|
Member
Joined: Oct 2001
Posts: 199 |
Hi All
Anyway to have the image show right away or as a thumbnail and they can click on it as people are viewing the post instead of just getting a link? either way?
Thanks
Rainner
[ 01-22-2002 08:32 PM: Message edited by: Rainner ]
|
|
|
|
Joined: Oct 2001
Posts: 199
Member
|
Member
Joined: Oct 2001
Posts: 199 |
Hi Again,
Great Hack, anyway I changed the hack from previously noted to being able to save the file names as there uploaded. If someone trys to upload a file that already exists, what happens is "File Download" starts...
Any idea!
Thanks
Rainner
|
|
|
|
Joined: Feb 2001
Posts: 54
Member
|
Member
Joined: Feb 2001
Posts: 54 |
quote: Originally posted by Rainner: Hi Again,
Great Hack, anyway I changed the hack from previously noted to being able to save the file names as there uploaded. If someone trys to upload a file that already exists, what happens is "File Download" starts...
Any idea!
Thanks
Rainner
I don't know how to get it to check if the file exists before starting the upload, but what you should find in its current form is that you'll receive an error at the conclusion of the upload stating that the file already exists (at least that's what should happen if you made the changes I listed). The script currently checks file size and name restrictions AFTER uploading but BEFORE writing the file to the upload directory.
Still looking for an easy/simple way to restrict uploads to specific users. Any ideas? Anyone? 
|
|
|
|
Joined: Feb 2001
Posts: 54
Member
|
Member
Joined: Feb 2001
Posts: 54 |
Anyone know a slick way to deal with file names containing spaces? Right now I list instructions for the user to manually replace the spaced with %20's in their image link, but I'd like to be able to automate this. Upload file, check for spaces in name, replace spaces with %20 when generating the link for the user. Oh, and a way to restrict access to specific users would be nice 
|
|
|
|
Joined: Dec 2001
Posts: 13
Newbie
|
Newbie
Joined: Dec 2001
Posts: 13 |
Well crap ... all links shown dont work. Can someone email this hack to me ? Please [email protected]Thanks in Advance Glen
|
|
|
Donate to UBBDev today to help aid in Operational, Server and Script Maintenance, and Development costs.
Please also see our parent organization VNC Web Services if you're in the need of a new UBB.threads Install or Upgrade, Site/Server Migrations, or Security and Coding Services.
|
|
Posts: 417
Joined: November 2001
|
|
Forums63
Topics37,575
Posts293,930
Members13,823
|
Most Online6,139 Sep 21st, 2024
|
|
Currently Online
Topics Created
Posts Made
Users Online
Birthdays
|
|
|
|