Previous Thread
Next Thread
Print Thread
Rate Thread
Page 2 of 3 1 2 3
#146805 10/30/2001 11:54 AM
Joined: Apr 2001
Posts: 235
Member
Member
Offline
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.

Sponsored Links
#146806 10/31/2001 7:48 AM
Joined: Apr 2001
Posts: 235
Member
Member
Offline
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.

_
Quote
quote:

#146807 10/31/2001 1:56 PM
Joined: Oct 2001
Posts: 9
Junior Member
Junior Member
Offline
Joined: Oct 2001
Posts: 9
Quote
quote:
well that's strange because there is one there with other vars
confused

#146808 10/31/2001 10:50 PM
Joined: Feb 2001
Posts: 28
Member
Member
Offline
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.

#146809 11/01/2001 10:37 AM
Joined: Oct 2001
Posts: 9
Junior Member
Junior Member
Offline
Joined: Oct 2001
Posts: 9
Quote
quote:
yea, well you must put pictures, and some other files in BINARY and *.cgi *.pl *.html in PLAIN a.k.a. ASCII

Sponsored Links
#146810 11/01/2001 11:55 AM
Joined: Feb 2001
Posts: 28
Member
Member
Offline
Joined: Feb 2001
Posts: 28
where do you tell it if its ascii or binary?

#146811 11/01/2001 3:21 PM
Joined: Oct 2001
Posts: 9
Junior Member
Junior Member
Offline
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

#146812 11/01/2001 3:30 PM
Joined: Feb 2001
Posts: 28
Member
Member
Offline
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?

#146813 11/01/2001 10:19 PM
Joined: Oct 2001
Posts: 9
Junior Member
Junior Member
Offline
Joined: Oct 2001
Posts: 9
I guess not laugh I thought that your files FOR upload hack gets corrupted when you upload them, hehe, sorry cool :rolleyes:

#146814 11/05/2001 9:48 AM
Joined: Dec 2000
Posts: 371
Member
Member
Offline
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! wink

Sponsored Links
#146815 11/10/2001 2:05 AM
Joined: Sep 2001
Posts: 170
Member
Member
Offline
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 ]

#146816 11/12/2001 1:51 PM
Joined: Jun 2001
Posts: 43
Member
Member
Offline
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]

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 ]

#146817 11/14/2001 11:30 PM
Joined: Feb 2001
Posts: 54
Member
Member
Offline
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 frown 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 smile

#146818 11/15/2001 12:05 AM
Joined: Feb 2001
Posts: 54
Member
Member
Offline
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:
Code
code:

Change this to:
Code
code:

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:
Code
code:

This is just the error message so I changed it to the following:

Code
code:

Now to ensure the file can't be overwritten:

Find:
Code
code:

and replace it with:
Code
code:


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

Code
code:


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 smile

[ 11-14-2001: Message edited by: ericruhl ]

#146819 11/15/2001 10:16 AM
Joined: Apr 2001
Posts: 235
Member
Member
Offline
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 ################


Quote
quote:

#146820 11/15/2001 11:26 AM
Joined: Feb 2001
Posts: 54
Member
Member
Offline
Joined: Feb 2001
Posts: 54
Woohoo! Sweet, thanks freeTV! That fixed it smile

#146821 11/15/2001 12:03 PM
Joined: Oct 2000
Posts: 109
Member
Member
Offline
Joined: Oct 2000
Posts: 109

#146822 11/15/2001 1:33 PM
Joined: Mar 2001
Posts: 7,394
LK Offline
Admin / Code Breaker
Admin / Code Breaker
Offline
Joined: Mar 2001
Posts: 7,394
You got my permission wink

#146823 11/15/2001 3:06 PM
Joined: Apr 2001
Posts: 235
Member
Member
Offline
Joined: Apr 2001
Posts: 235
???

Quote
quote:

#146824 11/15/2001 3:10 PM
Joined: Mar 2001
Posts: 7,394
LK Offline
Admin / Code Breaker
Admin / Code Breaker
Offline
Joined: Mar 2001
Posts: 7,394
Quote
quote:

#146825 11/16/2001 5:58 AM
Joined: Oct 2001
Posts: 4
Junior Member
Junior Member
Offline
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.

#146826 11/16/2001 11:27 AM
Joined: Feb 2001
Posts: 28
Member
Member
Offline
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!

#146827 11/16/2001 12:39 PM
Joined: Jun 2001
Posts: 43
Member
Member
Offline
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

#146828 11/16/2001 6:17 PM
Joined: Oct 2001
Posts: 4
Junior Member
Junior Member
Offline
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

#146829 11/17/2001 3:16 PM
Joined: Oct 2001
Posts: 4
Junior Member
Junior Member
Offline
Joined: Oct 2001
Posts: 4
AH HA! laugh

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

#146830 12/08/2001 4:58 PM
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


- Allen wavey
- What Drives You?
#146831 01/02/2002 9:43 PM
Joined: Dec 2001
Posts: 96
Member
Member
Offline
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
#146832 01/04/2002 5:49 PM
Joined: Dec 2001
Posts: 96
Member
Member
Offline
Joined: Dec 2001
Posts: 96
OK, used the MultiHack file and all systems are go !


#1 Stunna
#146833 01/10/2002 2:10 PM
Joined: Feb 2001
Posts: 54
Member
Member
Offline
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?

#146834 01/13/2002 1:06 AM
Joined: Feb 2001
Posts: 54
Member
Member
Offline
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?

#146835 01/13/2002 6:22 AM
Joined: Dec 2001
Posts: 96
Member
Member
Offline
Joined: Dec 2001
Posts: 96
ELY_M,

have u seen the Attachment File Manager hack?

Demo:

http://www.cannabisworld.com/cgi/po...r=1&forum=Indoor&DaysPrune=45&LastLogin=

http://www.cannabisworld.com/cgi/attach.cgi?PostTopic&3&Attachment

It shows a corresponding image for known filetypes once uploaded, i.e. zip, rar, doc, etc. It also allows all filetypes to be uploaded by default, with options to restrict uploaded to specific filetypes.

Could you make your hack more like this? How about integrating it more into the default posting page, like with a "Browse" button or something.

Also like the way that vBulletin shows you how many times a file has been downloaded.


#1 Stunna
#146836 01/17/2002 4:07 PM
Joined: Oct 2001
Posts: 199
Member
Member
Offline
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

#146837 01/20/2002 8:34 PM
Joined: Jan 2002
Posts: 48
Member
Member
Offline
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
[/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 ]

#146838 01/20/2002 8:37 PM
Joined: Jan 2002
Posts: 48
Member
Member
Offline
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 ]

#146839 01/20/2002 8:38 PM
Joined: Sep 2001
Posts: 2
Junior Member
Junior Member
Offline
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]

#146840 01/21/2002 2:12 PM
Joined: Oct 2001
Posts: 199
Member
Member
Offline
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 ]

#146841 01/22/2002 10:41 PM
Joined: Oct 2001
Posts: 199
Member
Member
Offline
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

#146842 01/24/2002 11:39 AM
Joined: Feb 2001
Posts: 54
Member
Member
Offline
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?

#146843 01/24/2002 11:44 AM
Joined: Feb 2001
Posts: 54
Member
Member
Offline
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

#146844 01/24/2002 7:39 PM
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

Page 2 of 3 1 2 3

Link Copied to Clipboard
Donate Today!
Donate via PayPal

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.
Recommended Hosts
We have personally worked with and recommend the following Web Hosts:
Stable Host
bluehost
InterServer
Visit us on Facebook
Member Spotlight
Posts: 70
Joined: January 2007
Forum Statistics
Forums63
Topics37,573
Posts293,925
Members13,849
Most Online5,166
Sep 15th, 2019
Today's Statistics
Currently Online
Topics Created
Posts Made
Users Online
Birthdays
Top Posters
AllenAyres 21,079
JoshPet 10,369
LK 7,394
Lord Dexter 6,708
Gizmo 5,833
Greg Hard 4,625
Top Posters(30 Days)
Top Likes Received
isaac 82
Gizmo 20
Brett 7
Morgan 2
Top Likes Received (30 Days)
None yet
The UBB.Developers Network (UBB.Dev/Threads.Dev) is ©2000-2024 VNC Web Services

 
Powered by UBB.threads™ PHP Forum Software 8.0.0
(Preview build 20221218)