View Full Version : [RELEASE vb2.0+] vB Photo Upload
Update : Sept 6
-- Thanks to wajones who pointed out a couple of things, I updated the files.
-- 1. The icons in the top right corner, one of them was suppose to point to the user help file but it was renamed and I forgot to update the code.
-- 2. There was a header error in the admin panel, which was corrected by wajones... if future problems happens please tell me.
------end update.
Well everyone, I decided tonight to release this and just see what happens from there on. I got caught up in working on my multi-page profile for my site, and kind of forgot about this. Sorry I do that a lot, in which I am sure everyone does.
First off... please read all of the files that I have included in this, the Installation.txt file is something I slapped together at the last minute and probably needs proof read... but who cares. The Readme.txt file explains what all the files are, and has some other tidbit information.
The only things you will really need to upload is: upload.php, userhelp.html, vbuploadinstall.php and the images and image folder.
I tried to explain the best way to have it... is putting those three files in the root of your vb folder, then just upload the images folder, which will create a sub folder inside that for the two image icons. Then you will have to create another folder like I suggested named "uploaded" meaning uploaded pictures. Then you will have to chmodd that to 777 and go from there. Then you will have to go through the upload.php file and change the variable preferences to fit your site. I tried to do the best possible explanation of how to do it through my comments throughout the files. So pay attention to those, also feel free to customize the userhelp file to fit your site and everything. :)
One thing I kind of fell short on.. was a cool profile page.. I mean I included a getinfo template that I used when I first made this, which was on vb2.0.1 and now that added like ignore and stuff so.. you might just want to create your own template up in your favorite web page builder or in notepad.. whatever. And go from there with the variables that I include.
Just pretty much go through the installation files and everything and follow the steps and you should not have any problems.. not saying you won't but... hopefully the F.A.Q. file will help with that. :)
Some might hate it, some might like it... if you hate it.. don't download it.. or install it.
To uninstall, follow the steps you took to install it and reverse them :)
ALWAYS BACKUP Before doing hacks... installations, changes, etc!
**Warning** Install at your own risk!
and... there is no place like home! Just remember that!
P.S. search these forums.. for screen shots and there is no demo as of right now... well there was but I Took it down :)
Sarge
09-06-2001, 04:55 AM
How is this better than just attaching the image?
Thanks for the hard work
wajones
09-06-2001, 05:46 AM
Originally posted by Sarge
How is this better than just attaching the image?
Thanks for the hard work
It's better because, you can't just attach a picture to the users profile.
Sarge
09-06-2001, 05:51 AM
Parse error: parse error in /home/dlrarmy/public_html/forums/upload.php on line 110
line 110 is
109 $today=date( "M-D-d-Y", time() );
110 $updatetime = $timenow;
111 $pic_lastupdated=$bbuserinfo['pictime'];
Any Clues?
Sarge
09-06-2001, 06:14 AM
anyone having the same problem?
theflow
09-06-2001, 07:10 AM
Originally posted by BradC
P.S. search these forums.. for screen shots and there is no demo as of right nowHey, congrats Brad!
Are these fairly accurate screen shots? If not, I will edit them out and remove...
http://www.vbulletin.com/forum/attachment.php?s=&postid=155195
BradC
09-06-2001, 09:56 AM
$today = date( "M-D-d-Y", time() );
$updatetime = $timenow;
$pic_lastupdated = $bbuserinfo['pictime'];
try that out.. I just added a space in between the line above and line below line 110..
cause I don't get this error on my server.
and theflow... that is ToraTora!'s edited version with different colors but yes for the most part that is the latest :)
BradC
09-06-2001, 09:59 AM
Originally posted by Sarge
How is this better than just attaching the image?
Thanks for the hard work
Good thing I never said this is better... or anything like that :p
I simply made this for me, and since there was a few people that wanted it, I started making at a best a customized version for release. There is many different ways this could have been done, but this is the way I went... plus I had already done most of it like this for my site.. so I did not want to re-write something just to release it.. so I kept it for the most part intact from what I have.
FreshFroot
09-06-2001, 02:01 PM
Originally posted by BradC
$today = date( "M-D-d-Y", time() );
$updatetime = $timenow;
$pic_lastupdated = $bbuserinfo['pictime'];
try that out.. I just added a space in between the line above and line below line 110..
cause I don't get this error on my server.
and theflow... that is ToraTora!'s edited version with different colors but yes for the most part that is the latest :)
I did this and am still getting the parse error on line 110.
BradC
09-06-2001, 03:36 PM
I don't get this.. and either did Tora.. when he installed it.. so I will have to take a look at it again.. it does not mean it is on line 110.. it could be before it... it just did not show up till then lol
BradC
09-06-2001, 07:00 PM
Ok... I just attached a fresh copy. Now I went through and customized it and added it to my board and it works fine without any parse errors...
http://www.addictedusers.com/board/upload.php
and yes I know you cannot go to it without registering lol..
but it should work now..
*Kool Girl*
09-06-2001, 08:18 PM
Hey Brad and Toratora, thanks for all the hard works for all these wonderful hacks. I knew that some ppl already have these features on their sites but u are the first to release the hacks. Many thanks. I think vBulletin should be thankful to u too. In my opinion, these are important features (hehe) and I was a bit surprise that vBulletin did not have these add-ons when I furst bought the program, considering some other forum programs already have these...
Again thanks for everything. :D
Thanx
just so happen to be working on the profile pages today so i'll have to give this a look see
BradC
09-07-2001, 01:12 AM
Please post any problems.. and/or fixes that you may run into.. :)
I would just like to know how things go with this.. cause I tried to do the best I could at making a helpfull guide to installing this.
Btw I know my coding may look a little wierd.. with the way I name stuff and everything, but I am new at php .. so give me a chance :)
*Kool Girl* thanks for the kind words, that REALLY mean a lot to me. As for vb and having these features... I think they were talking about intergrating an upload script into a future release of vb. So... everyone be aware that might happen :)
thanks again,
Brad C.
ToraTora!
09-07-2001, 12:22 PM
Looks like everything is going pretty well so far...:)
wajones
09-07-2001, 01:47 PM
I got it working on phpPortals, great job Guys.
BradC
09-07-2001, 03:01 PM
thanks wajones... I am pleased to see it works.. on your site :)
Btw.. the way I commented on a couple of those variables.. I think is missleading when I get home I will try to update it!
maverick1236
09-07-2001, 10:12 PM
on submission...
Your Current File Is : Error: file 1_photo.jpg not found.
BradC
09-07-2001, 10:25 PM
All I can say is check your settings..
or scroll to the very bottom of the page and see if there is an error in the error box after submission.
Sarge
09-07-2001, 10:44 PM
Originally posted by Maverick1236
on submission...
Your Current File Is : Error: file 1_photo.jpg not found.
I am having the same problems!
Anyone?
BradC
09-07-2001, 10:54 PM
Not being an ass... but wajones got it to work, ToraTora! got it to work, and I have got it to work.. just fine.
That error usually happens when the right folder combination is not set. That message is pulled out of an if statement, which looks into the database for the image name.. like "1_photo.jpg" then after that it will go to a function that will check the path to the image folder, to see if there is a file that the name "1_photo.jpg" if it finds it, it goes to another function which displays it. If it can't find it, it gives you that error.
So there has to be a directory problem, cause it is updating to the database just fine, but not the server. So when you upload a photo and it displays that, check the very bottom of the page for an error. Also make sure that you have the uploaded folder set to 777.
So it should work... if you are having this problems PLEASE POST THAT YOU ARE!...
--- as a test check your server to see if there is anything uploaded into the folder on the server.
ALSO.. if you are trying to upload a .gif file, it will not be possible unless you uncomment that gif code, and comment the other line. Which I tried my best to explain in the comments and other files.
maverick1236
09-07-2001, 11:23 PM
no errors at bottom of page--just the "not found" error
BradC
09-08-2001, 05:52 AM
ok... please download the new version... I was running through it with Sarge.. and we got it to work for him..
so just make sure that you have the correct files and folder paths set in the variables and it should rock and roll..
JohnV
09-08-2001, 04:52 PM
Greetings All:
For those of you that are having problems getting the file to upload properly, here's a quick fix:
Find:
exec("cp $picture $path/$chacha");
Replace With:
copy("$picture", "$path/$chacha");
That should take care of the problem!
BradC
09-08-2001, 04:58 PM
I am no expert... but I know my works pretty well. But thanks this way might help for others using maybe a different version of php.
I got my way straight out of the php manual. So I would hope it would work, and it does for me and a few others. :)
RobAC
09-08-2001, 06:00 PM
Brad,
Couple other problems: In upload.php the following parameters do not show up in: $welcome =
$max_height = "200"; /* Max Image Height */
$max_width = "200"; /* Max Image Width */
$Size_Restrictions = "10000"; /* image size limit in bytes */
$Width_Restrictions = "200"; /* your width limit */
$Height_Restrictions = "200"; /* your height limit
grumpy
09-08-2001, 06:35 PM
Thanks! I've installed it on my test forum and it works perfectly. Can't wait to put it to use!
BradC
09-08-2001, 06:41 PM
That is very interesting... cause it used to work.. now today it don't.. what in the world.
-- update
I have tried different combinations... with no luck yet.
The best thing I can say to do.. is to take those variables out of that welcome line and just put in the info you want.. like 430 for height and width etc.. that way it will show up for now. :)
JohnV
09-08-2001, 07:19 PM
Greetings
The way you had it before relied on an external program, which was called as a system function. The method I have above uses php's build in copy function.
So, anyone using windows nt, 2000, etc. etc. or any other OS that doesn't have the cp function built in, will be able to use the method above.
You might want to change it in your base code as well, since calling external system functions from PHP can lead to security problems on some OSs (buffer over flows, escape characters, etc. etc.)
BradC
09-08-2001, 08:26 PM
JohnV,
thanks for the heads up... that helps a lot to know others can help try to perfect the code for flawless installations for everyone :)
--- Also..
thanks to JohnV I updated the zip file with the changes. I went ahead and commented out the old way, and added the new way. So if you have problems with the new way... just look for that copy function.. and comment that line out and use the other line.
Sarge
09-09-2001, 05:37 AM
First Off... I would like to say
Thanks BRAD C
This guy worked with me over ICQ to get the bugs worked out on mine.
It looks killer and my users are enjoying it.
i redid my profile page so that it would fit in ... and I must say it is 100% better.
Very impressed and grateful
Thanks
Sarge
Click here for a demo And A Picture Of Me
http://www.dlrarmy.com/forums/member.php?s=&action=getinfo&userid=2440
BradC
09-09-2001, 06:04 AM
Thanks Sarge for the compliments.
It was a pleasure to help you get things setup the way they needed to be and usable by your users :)
Btw his profile pages look great! I just slapped one together as a demo or template to go off of, maybe I should take lessons from Sarge on that :)
Sarge
09-09-2001, 06:45 AM
thanks to you!
The Profile took me a few hours to get it looking the way I wanted to.
Attention to detail.. that is what I love about VB's!
BradC
09-09-2001, 01:49 PM
Yah all things take time... and it does look good :)
I still have 3 or 4 new profile styles to work on. I have one done, almost done with a generic one.. then to make some really cool ones.. :)
Nemesis77
09-09-2001, 06:07 PM
Getting this error on a friends board:
Parse error: parse error in /usr/local/httpd/htdocs/TheDaene2/admin/user.php on line 804
$profilefields=$DB_site->query("SELECT profilefieldid,title FROM profilefield");
while ($profilefield=$DB_site->fetch_array($profilefields)) {
makeyesnocode("Display $profilefield[title]","display".$profilefield[profilefieldid],0);
}
doformfooter("Find");
} <---Line 804 here.
// ###################### Start find #######################
if ($action=="find") {
Anyone have any Ideas? Thanks in Advanced.
ToraTora!
09-09-2001, 07:36 PM
Profile fields are also used for the vb forums, not brads script. The variables his script would be calling for, are user tables mostly, so i do not know how you picked up a error for a admin profile area, unless you misplaced the code in the admin area script, or otherwise used script that is not part of brads hack. (There was a suggestion in here earlier on how to pull out different paths to the pictures...which we will not support)
Stick with his instructions, and go through the adding code area to the admin script one more time. I would be willing to bet, you might have a extra } or missing a } being it is a parse error, which means you might not of copied the whole script and entered it correctly, or misplaced it within the script. :)
let me also add that missing a ; could be a problem, or adding one to many ;
I know the first one all to well.....( missing ; )
BradC
09-09-2001, 08:18 PM
In my instructions.. I have you putting MY code at the end of that user.php file... which would be WAY WAY past line 803... so the error you are getting should not be part of my hack at all. Unless something was messed up during installation.
the only code that is above line 803 is at the very beginning and I Don't think that would mess it up.
ToraTora!
09-09-2001, 08:40 PM
well, that is what i was thinking...it seems to be that the parse error happened where he threw in the code, or hit a backspace or something by accident, which may of erased a closing tag } or the good ol ; geeze i love those dearly....lol
Nemesis77
09-09-2001, 11:03 PM
After i edited the user.php file i was getting that same error for the Find User Option in the Admin CP. I'll try your suggestions and keep you posted. Thanks for the help. greatly appriciated.
Oh also for the editing the user.php file, one thing was to replace the <?php by replacing it with the code you listed in the filechanges.html file. When in the user.php file there are 2 places with <?php listed, at the very beginning and around line 780 which is listed as:
<select name="direction">
<option value="">in ascending order</option>
<option value="DESC">in descending order</option>
</select>
</p></td></tr>
<?php
Which one is supposed to be replace. the one at the beginning or the one around line 780? Thanks you very much for the help.
BradC
09-10-2001, 12:58 AM
I don't think the directions were that clear..
leave the <?php at the very top.. paste that first part of the code right underneath that.. and that is it. Leave everything else alone.
BradC
09-10-2001, 01:43 AM
Ok.. I updated the zip again.. because of one flaw.
When I was rushing around to get some things fixed.. I forgot to change my instructions... gotta remember to slow down and think next time :)
Ok.. the only thing I changed was in the filechanges.html file which.. I changed to
in the admin/user.php file
look for <?php and right after that place this code:
... it used to be replace .. which you DO NOT want to replace that with the code... the file will not work. So remember if you don't want to download the new file, to please paste the code underneath that..
and again my apologies for my sloppy work.
ToraTora!
09-10-2001, 09:28 AM
Brad...ah...i cannot understand a damned thing you replied in that last post...might want to lay off the tequilia man...lol...
ToraTora!
09-10-2001, 09:41 AM
Brad...ah...i cannot understand a damned thing you replied in that last post...might want to lay off the tequilia man...lol...
BradC
09-10-2001, 12:36 PM
Look who is talking... you just double posted lol!
I just stated that I updated my filechanges.html file..
cause one of the instructions on what to add/change in a file.. was misleading and NOT correct.. but it is now :D
ToraTora!
09-10-2001, 12:50 PM
in correct?
lol..you are getting worse than me....lol...
BradC
09-10-2001, 01:21 PM
hey I am not as think as you drunk I am... so there!
Dontom
09-11-2001, 12:25 PM
Brad, thank you for this great hack!
I just installed it without any problems - now I just have to make the Profile-Page look pretty :D
http://www.mtb-news.de/forum/member.php?s=&action=getinfo&userid=1
;)
Tom
webhost
09-11-2001, 03:45 PM
Thanks for the hack Brad, up and running.
Joey
BradC
09-11-2001, 05:26 PM
I am very happy to hear that it works from both of you.. Hope it serves it's purpose well for ya.. and... don't quote me.. but look for better versions in the future from me :)
Reeve of shinra
09-11-2001, 05:45 PM
was testing this out a dev site and when I goto the admin control panel and goto the link I get this
Database error in vBulletin Control Panel: Invalid SQL: SELECT user.userid,username,email,picture_name,photodesc, ipaddress,userfield.* FROM user,userfield WHERE 1=1 AND userfield.userid=user.userid ORDER BY username LIMIT 0,99999999
mysql error: Unknown column 'picture_name' in 'field list'
mysql error number: 1054
Date: Tuesday 11th of September 2001 02:40:47 PM
Script: /forum/admin/user.php?action=viewuploadedphotos
Referer: http://192.168.0.10/forum/admin/index.php?action=nav
I cant figure out what it might be ... unless its my ip but thats not been a factor before...
Nemesis77
09-11-2001, 06:57 PM
Getting this error now
Cannot redeclare stripslashesarray() in /usr/local/httpd/htdocs/TheDaene2/admin/global.php on line 5
<?php
if (isset($explain)) {
$showqueries=1;
}
if (isset($showqueries)) { <---Line 5
$pagestarttime=microtime();
}
This is the first time i've had probs installing a hack. please help.
Edit: I just removed the code that was suppose to be added to the User.php file and now when i click the link in the admin CP I get the screen that is supposed to come up listing all the members and showing the photos they have uploaded, but not showing photos casue no one has uplaoded any. This is weird. Where is the link on the board supposed to be after this hack is install Successfully? in the User CP under Profile?
BradC
09-12-2001, 01:51 AM
Originally posted by Reeve of Shinra
I cant figure out what it might be ... unless its my ip but thats not been a factor before...
It sounds more like you did not upload and run the vbuploadinstall.php file to me.
BradC
09-12-2001, 01:54 AM
Originally posted by Nemesis77
Edit: I just removed the code that was suppose to be added to the User.php file and now when i click the link in the admin CP I get the screen that is supposed to come up listing all the members and showing the photos they have uploaded, but not showing photos casue no one has uplaoded any. This is weird. Where is the link on the board supposed to be after this hack is install Successfully? in the User CP under Profile?
I have never got the error that you got... nor do I think it is because of the hack unless something was not installed.. or missed.. but that is strickly my opinion.
And yes in the user cp, is where you can put the upload script... that is where I put it or you can put it wherever you want.
Simple go into your usercpnav template file and add a link to it..
numerodix
09-14-2001, 08:03 AM
I just installed the upload hack last night and I can't get it to work properly. Uplading from the CP is ok, viewing them is okay. The pictures come up in the right dir and all. The problem is in the user profile. The photo desc comes up alright, but not the pic itself:
http://www.juventuz.com/forum2/member.php?s=&action=getinfo&userid=3
I followed the instructions and there seems to be a problem right about here:
if ($userinfo[picture_name] !="") {
eval("\$picture_name = \"".gettemplate("photo_show")."\";");
} else {
$userinfo[picture_name]=$userinfo[picture_name];
eval("\$picture_name = \"".gettemplate("photo_unknown")."\";");
}
What happens is that $picture_name in the getinfo template seems to remain empty. Instead of displaying photo_show or photo_unknown it doesn't display anything. There is nothing at all in the html code where that is supposed to come up.
The reason for all that could possibly be in the upload.php file itself, leaving the variable empty. I may be completely off course, trying to reason despite my ignorance of php and mysql.
Upload is at:
http://www.juventuz.com/forum2/upload.php
webhost
09-14-2001, 10:37 AM
Do You have this in the getinfo template?
F1F1F1 is firstaltcolor and DFDFDF is secondaltcolor
<tr>
<td bgcolor="#F1F1F1"><normalfont></normalfont><b>$userinfo[username]'s
Photo</b></td>
<td bgcolor="#F1F1F1"><normalfont>$picture_name<br><br>$userinfo[photodesc]</normalfont></td>
</tr>
Should be right above this.
<tr>
<td bgcolor="#DFDFDF"><normalfont><b>Date Registered:</b></normalfont></td>
<td bgcolor="#DFDFDF"><normalfont>$userinfo[datejoined]</normalfont></td>
</tr>
numerodix
09-14-2001, 02:10 PM
I most certainly do:
<tr>
<td bgcolor="#DFDFDF"><normalfont><b>$userinfo[username]'s
Photo:</b></normalfont></td>
<td bgcolor="#F1F1F1"><normalfont>$picture_name<br><br>$userinfo[photodesc]</normalfont></td>
</tr>
That is why I'm amazed it comes up empty. I made it work using <img src="path/$userinfo[picture_name]"> in the getinfo template but then a broken image comes up if a user doesn't have a photo.
webhost
09-14-2001, 02:29 PM
Got this in member.php
//* BradC's vB Photo Upload Script : Start
// Photo Upload
if ($userinfo[picture_name] !="") {
eval("\$picture_name = \"".gettemplate("photo_show")."\";");
} else {
$userinfo[picture_name]=$userinfo[picture_name];
eval("\$picture_name = \"".gettemplate("photo_unknown")."\";");
}
// End Photo Upload
// Photo Description
if ($userinfo[photodesc] !="") {
eval("\$photodesc = \"".gettemplate("postbit_photodesc_unknown")."\";");
} else {
$userinfo[photodesc]=$userinfo[photodesc];
}
// End Photo Description
//* BradC's vB Photo Upload Script : Finish
BradC
09-14-2001, 02:54 PM
I am to busy at work right now to support you or anyone... because I am support in the life insurance business... and umm lets just say it is extra hectic.
But.. I will say.. please make sure you go through all of my files to make sure you add all the code and make all the necessary changes to work, cause without every single one of the steps being followed it will not work for you.
numerodix
09-14-2001, 03:07 PM
Yes, of course I do, webhost. What I posted the first time was a part of that code as you can see. I followed all the steps as I said, except from the ones to give mods access to the pics (which are optional according to the hack guide).
ToraTora!
09-14-2001, 03:57 PM
My guess, is that you have entered the wrong path, or not created a folder for the picture to reside in.
Brads instructions were to create a folder, that was named appropriately, "uploads" inside your image directory.
So, if your user name is gumdrops, and your vb folder name is poster, and the folder that should be named "uploads" (for the uploaded pics) is indeed named uploads, this is the path, that should be entered into the area that asks for $path=
here we go..a example.
$path = "/home/gumdrops/public_html/poster/images/uploads";
numerodix
09-14-2001, 05:19 PM
As I explained earlier, I have indeed created a dir for the uploaded pictures, I have succeeded in uploading from the upload.php file, which paths read as follows:
require($DOCUMENT_ROOT . "/forum2/global.php");
$path = "/usr/home/martin/www/forum2/images/uploaded";
$cpurl = "http://www.juventuz.com/forum2";
$shortpath = "/forum2";
$imagepath = "/forum2/images/uploaded";
The picture comes up alright in the upload.php script, it does indeed upload to the specified dir, everything seems to be in order, except for displaying it in the user profile. I can also handle the pics alright from the Admin CP.
I really appreciate you people trying to help me but I wouldn't have said what I did in the first post about all those thing working well if I had missed these things you mention. There must be some other possibility...
webhost
09-14-2001, 05:27 PM
/.
numerodix
09-14-2001, 05:37 PM
Well I changed them now and the upload also works with
$path = "/usr/home/martin/www/forum2/images/uploaded";
$cpurl = "http://www.juventuz.com/forum2";
$shortpath = "/forum2";
$imagepath = "images/uploaded";
But that doesn't change anything, the user profile still comes up empty. The $picture_name variable in getinfo is not assigned for some reason.
ToraTora!
09-14-2001, 05:55 PM
ok...hear me out..there are a couple things that may of happened.
1) CHMOD the folder incorrectly.
2) template for photo show is done incorrectly
3) Check the folder, to make sure there are pictures in there.
also, are you uploading just jpg's? are they the rite size?
4) If there are pictures in there, than all that is needed is:
$picture_name in the getinfo template, and for photoshow, the variable should be $userinfo[picture_name] along with the img src path.
The member.php file, for showing the picture is this:
if ($userinfo[picture_name] !="") {
eval("\$picture_name = \"".gettemplate("photo_show")."\";");
} else {
$userinfo[picture_name]=$userinfo[picture_name];
eval("\$picture_name = \"".gettemplate("photo_unknown")."\";");
}
Make sure you didnt change any of that info.
Also, check if there are no images in the upload folder, that your server information is completely filled out. (below)
It did give me the indication the first time i monkeyed with this, that it did indeed upload, however, watching the upload error message area, it did not..so this is something you should do to pinpoint or describe to us in detail what is going on to us as well.
define("SQL_SERVER", "localhost"); /* Server Name */
define("SQL_UID", "namehere"); /* Username */
define("SQL_PWD", "passwordhere"); /* User Password */
define("SQL_DB", "db name here"); /* Database Name */
ToraTora!
09-14-2001, 06:00 PM
this is what your photo show template should resemble like..
I added a few things to keep my mini gallery in check, but the main premise of what Brad did with this, is listed below, off a working board. (images is our "uploaded" folder)
<img src="images/images/$userinfo[picture_name]" height="150" width="150" alt="$userinfo[username]'s personal pic"><br>
numerodix
09-14-2001, 06:16 PM
Yep, it's all there:
1. 777 should be enough
2. nope, according to instructions
3. yep, it's all there, jpg and under the size limit
4. yep, all according to instructions
The upload script gives no errors at all.
I changed the db info around, and it gave no errors with incorrect password when uploading pictures. What puzzles me is that the info entered there is the same as in the admin/config.php file and changing the info there obviously resulted in a failure to log into the dbase... So the upload.php script does in fact not required correct dbase info, it seems to work anyhow.
It seems this is vey hard to get working. Could one of the experts here perhaps have a look at my set up?
ToraTora!
09-14-2001, 07:16 PM
Well, from personal experience, it seems at first that the uploader does not need server information. I was the first to test this out, so i know from past experiences, that if none of the info is entered in the data base variables, it will not work. It will act like it is uploading, but it wont. I tried sneaking a couple of quick variables in there, and it still would not let it go past, so..i added every bit and piece of server info i could, and than it uploaded.
However, you are saying, that it is uploading pictures, so obviously it is a matter of just pulling the pictures out, and into your getinfo area. If the information that is provided for the member.php script is correct, and it is entered rite above the:
"// get last post" area, than it should work without a problem.
This would leave the photo_show template at fault. I gave a img src and variable example above, so that should work to bring out the picture.
Obviously, from what you are stating, all information has been entered. So, that leaves once again, your image paths. If it is uploading to your folder, and there are pictures in there, than the only thing, if everything else is done rite, is the return path from the image folder. Obviously, there is a problem with one of your paths.
Have you checked your:
require($DOCUMENT_ROOT . "/vb/global.php");
Also, are there pictures being displayed within the upload area?
They work off a image path as well, so if there is something wrong with the image path, they will not display, even if you uploaded a pic.
did you change any of the varible names such as: chacha, or picture_name anywhere in the script?
Without the chacha variable, there will be no way of pulling the picture out of the folder.
numerodix
09-14-2001, 09:05 PM
DUH!!!!! Okay I feel like an idiot now. And so I should. I'm really sorry to have taken up so much of your time, people and thanks a lot for the help!
I thought it was something serious and it was my fault all along. I checked what you said about "// get last post" area and realized that I had pasted Brad's code in the wrong place. The editor I'm using doesn't have the ability to search for multiple lines of text so I ended up inserting the code in a different function which was of course pointless!
Then I checked the install directions to check whether there was a bug there, maybe two occurences of the code given. But no. It was my fault all along. But it's typical in a way. To mess up in an easy place. It would have been more likely to get the paths wrong or the dbase info. But no, this is my destiny... I can't believe you are still reading...
Anyhow, THANKS AGAIN to everyone that has tried to help out, I really appreciate it!
Kevin Zi Lung
09-18-2001, 02:47 PM
Originally posted by Nemesis77
Getting this error now
Cannot redeclare stripslashesarray() in /usr/local/httpd/htdocs/TheDaene2/admin/global.php on line 5
I am getting the same error too.. when I got to Control Panel and choose "Edit Photo Uploads"
" Fatal error: Cannot redeclare stripslashesarray() "
Line 5 in my global.php
function stripslashesarray (&$arr) { <- line 5
while (list($key,$val)=each($arr)) {
How can I fix it? I would like to be able to delete a user's photo
BradC
09-18-2001, 11:33 PM
please review above comments.
Kevin Zi Lung
09-19-2001, 12:25 AM
I did, but can't find a solution.. my english isn't that good either.. :)
BradC
09-19-2001, 03:41 AM
Need to check your copy paste job..
from looking above.. the solution was going back and finding an error in posting in the wrong place of the vb file.
Kevin Zi Lung
09-19-2001, 12:02 PM
Thanks, I found the error.
Think you did a mistake in your filechanges.html file:
Changes to admin/user.php:
find:
<?php
and right below that put this!:
error_reporting(7);
require("./global.php");
/* ......
-
then there's going to be two of error_reporting and require in the same file - to solve it: simply delete the other two below the part you pasted in :)
BradC
09-19-2001, 02:19 PM
true thanks for the heads up on that...
that was changed code after the release.. so it was a sloppy job of fixing it up lol.... but none the less should be fixed.
when I get home I will update it again.. although I thought I did.. maybe I left that on my laptop.. and forgot to upload it :(
SirSteve
09-19-2001, 02:24 PM
So let me get this straight... this hack is used to add a picture of yourself (or whatever) in your profile? If yes, what if I would want to have this option only available to those who earned the right to upload when they hit a certain amount of posts like the avatars?
ToraTora!
09-19-2001, 03:42 PM
The user posts, or time accumulated as a member, coupled with our mini gallery hack, is something that will appear in future versions.
For now though, this version is all that is being currently supported, documented, and released until we decide on the other aspects of the hack.
SirSteve
09-19-2001, 05:46 PM
I added the hack and have these problems:
It uploaded with no errors but this is what gets displayed after a pic is uploaded:
"Last Updated : @"
Isn't the picture supposed to be viewed on the Get Info (Profile For) page?
Mine doesn't display. You can view it here:
http://www.sirstevesguide.com/forums/member.php?s=&action=getinfo&userid=2
ToraTora!
09-19-2001, 08:00 PM
well, the only thing i get is a user permission screen when i click on the link, and personally, im not signing up for anymore boards...lol..:)
The only advice i can offer, is to read through this thread. If your pic is not showing up, there are at least a dozen reasons why, however, the most likely is that you entered in the member.php information incorrect.
If you are not recieving any errors during, or after uploading, than it tells me you have chmod the folder correctly, and have the path correctly entered. To make sure, check your folder, and see if there is any pictures that you have uploaded inside it. If there is, like i have stated before, you have entered in your member.php information incorrectly, Not created the proper adderess in the show template, or have not used the correct variable to display the picture.
SirSteve
09-19-2001, 09:39 PM
Originally posted by ToraTora!
well, the only thing i get is a user permission screen when i click on the link, and personally, im not signing up for anymore boards...lol..:)
The only advice i can offer, is to read through this thread. If your pic is not showing up, there are at least a dozen reasons why, however, the most likely is that you entered in the member.php information incorrect.
If you are not recieving any errors during, or after uploading, than it tells me you have chmod the folder correctly, and have the path correctly entered. To make sure, check your folder, and see if there is any pictures that you have uploaded inside it. If there is, like i have stated before, you have entered in your member.php information incorrectly, Not created the proper adderess in the show template, or have not used the correct variable to display the picture.
Ok, I was able to get the photo to show. Now the only problems I have now are the following calls not displaying the information:
$pic_lastupdated and $time4lastupdate
$Width_Restrictions
$Type_Restrictions
I can dummy out the last two but need the first one working. Other than that, nice looking hack!
Also, when I click on Edit Photo Upload via admin CP, I get this:
Fatal error: Cannot redeclare stripslashesarray() in thiswasdeleted/forums/admin/global.php on line 14
Line 14 states:
$arr[$key]=stripslashes($val);
And how do I get the upload.php page to have the vbulletin header and footer?
BradC
09-20-2001, 01:17 AM
Originally posted by SirSteve
Ok, I was able to get the photo to show. Now the only problems I have now are the following calls not displaying the information:
$pic_lastupdated and $time4lastupdate
$Width_Restrictions
$Type_Restrictions
I can dummy out the last two but need the first one working. Other than that, nice looking hack!
Also, when I click on Edit Photo Upload via admin CP, I get this:
Fatal error: Cannot redeclare stripslashesarray() in thiswasdeleted/forums/admin/global.php on line 14
Line 14 states:
$arr[$key]=stripslashes($val);
And how do I get the upload.php page to have the vbulletin header and footer?
As if you did not know.. from reading above.. oh wait maybe you didn't.. and yes I am not in that good of a mood. Because of college problems..
if you would simply look above you can see the the stripslashesarry problem... and the new zip fixed it.
As for the variables not showing up... that was a given, RobAC pointed that out, and I still have not solved that mystery.
There was no header or footer added to my addon, and since it seems you did not read my documents.. I will not support nor will I help change the layout design of it. So if you want to add to it, someone else will help you out if they want to.
SirSteve
09-20-2001, 01:53 AM
Originally posted by BradC
As if you did not know.. from reading above.. oh wait maybe you didn't.. and yes I am not in that good of a mood. Because of college problems..
if you would simply look above you can see the the stripslashesarry problem... and the new zip fixed it.
As for the variables not showing up... that was a given, RobAC pointed that out, and I still have not solved that mystery.
There was no header or footer added to my addon, and since it seems you did not read my documents.. I will not support nor will I help change the layout design of it. So if you want to add to it, someone else will help you out if they want to. '
Guess I will wait until you are in a better mood because I looked at the new zip and don't see any changes in the files from the one I got early today to fix the stripslashesarry. Perhaps I am blind.
BradC
09-20-2001, 02:55 AM
perhaps reading the threads before this...
someone or a few people have had this problem.
and yes in the html instructions file it was changed.
Ok.. might as well explain it.
when you add the code in the admin/user.php file, at the very top you are doubling the error_reporting line..
when I had.. find <?php ... and then after that I put paste this code under that, ... I had you in a sense doubling the error_report .. which gives you that, cause it is trying to do it twice.. and it can only do it once.
so go into your admin/user.php file, look at the very top.... right above <?php trace that down to where it says.. error_reporting(7);
and delete that line all the way up to the <?php line... leaving that line..
the instructions now say... find :
<?php
error_reporting(7);
and right underneath that paste this code:
require("./global.php");
/*
Auto center window script- snyx (<a href="http://snyxmedia.com" target="_blank">http://snyxmedia.com</a>) DO NOT REMOVE!
*/
echo "<SCRIPT language=\"javascript\" type=\"text/javascript\">\n";
echo "<!--\n";
echo "var win = null;\n";
echo "function NewWindow(mypage,myname,w,h,scroll){\n";
echo "LeftPosition = (screen.width) ? (screen.width-w)/2 : 0;\n";
echo "TopPosition = (screen.height) ? (screen.height-h)/2 : 0;\n";
echo "settings = 'height='+h+',width='+w+',top='+TopPosition+',left ='+LeftPosition+',scrollbars='+scroll+',resizable' \n";
echo "win = window.open(mypage,myname,settings)\n";
echo "if(win.window.focus){win.window.focus();}\n";
echo "}\n";
echo "\n";
echo "//--></SCRIPT>\n";
echo "\n";
end result it should like this.. starting from line 1:
<?php
//* Modified by Brad Clampitt *//
error_reporting(7);
require("./global.php");
/*
Auto center window script- snyx (<a href="http://snyxmedia.com" target="_blank">http://snyxmedia.com</a>) DO NOT REMOVE!
*/
echo "<SCRIPT language=\"javascript\" type=\"text/javascript\">\n";
echo "<!--\n";
echo "var win = null;\n";
echo "function NewWindow(mypage,myname,w,h,scroll){\n";
echo "LeftPosition = (screen.width) ? (screen.width-w)/2 : 0;\n";
echo "TopPosition = (screen.height) ? (screen.height-h)/2 : 0;\n";
echo "settings = 'height='+h+',width='+w+',top='+TopPosition+',left ='+LeftPosition+',scrollbars='+scroll+',resizable' \n";
echo "win = window.open(mypage,myname,settings)\n";
echo "if(win.window.focus){win.window.focus();}\n";
echo "}\n";
echo "\n";
echo "//--></SCRIPT>\n";
echo "\n";
does this help...
ToraTora!
09-20-2001, 03:01 AM
i think from now on, im not going to include instructions for anything i ever release again. Just because of the simple fact, everything winds up here one way or the other.
ToraTora!
09-20-2001, 03:03 AM
I wonder if brad could of made us scroll just a bit more to the right.....lol..
SirSteve
09-20-2001, 03:06 AM
Now I see it and I got it. I didn't see there were two sets of error_reporting(7); and require("./global.php");
Thank you for your time. Exceptional hack!
BradC
09-20-2001, 03:28 AM
hey I am just glad it works... :)
and don't make me make you guys scroll more to the right :D
and.. sorry if I seem pissed off for the next couple of weeks.. and well for the last couple of weeks lol..
at my college, which I am going to be graduating in November, they have all my grades and GPA all messed up. I have a 3.9GPA and they say I have a 3.23... which makes no sense... so I have been frustrated and irriated at all of the crap I am having to go through to get this fixed, before I graduate.. cause this is something that I will be showing to employers... and a 3.9 looks better than a 3.23 lol
maverick1236
09-21-2001, 02:11 PM
i cannot-no matter what i try-get this hack to work :(
is there any way u can make it so this "upload.php" connects to the database without a user typing his mysql info in-like some other hacks?
i know this will fix it :)
BradC
09-21-2001, 02:53 PM
why can't you find your config.php file in your admin folder for your vb files..
in there is the information you need if you say *it will fix it* just copy over the information.
maverick1236
09-25-2001, 01:14 AM
nothing works
ive even had an experienced webmaster try-no-go
will their be any updates with the coding?-or should i delete the code?
tx
BradC
09-25-2001, 01:25 AM
I know for a fact that it cannot be this tuff to figure out.. and I know a lot of people have tried to help you with this...
There will probably not be any updates for awhile for this.. ohh sure I have updated it a lot for my site, and everything but I don't know if I will release my updates.
See the thing is that it works for me perfectly on my servers, it is hard to get something to work smoothly and problemless on all server types and configerations.. ya know..
maverick1236
09-25-2001, 01:32 AM
well heres a good sign
the DB IS updating
i try to upload a pic...and get this error
Error: file 1_photo.jpg not found.
BUT-i look in the picture_name field in the database and it says file 1_photo.jpg !!!
so the DB isnt the problem
please dont give up on me yet-im one of those people who will still be trying this a year from now lol
ToraTora!
09-25-2001, 01:47 AM
mav, your image paths are wrong. that is the bottom line. Trust me on this, check your image paths, or make sure your folder is CHMOD correct. Than use the variables that Brad has set in the show picture template, and all is well.
I just reinstalled this script again on portals, and believe me when i say image paths are a direct result of display. I might add, that the script i am using, allows 6 uploads, so there is nothing wrong with the script itself. Please re-read the instructions.
BradC
09-25-2001, 02:42 AM
I won't give up on you, as long as you don't give up on my directions! :)
and yes Tora is correct.. did you ever get moved over to using webhost as your host? Cause like I told him.. if you don't have permissions to put a chmodd on a folder under win2k to 777 then this might not work at all..
cause 777 gives users, and admins actually anyone the ability to write and read to that folder.. which is needed.
maverick1236
09-25-2001, 03:03 AM
i see,
but if permissions on the server were the problem-how come the upload attachment feature works?
just curious-it might help me troubleshoot
maverick1236
09-25-2001, 04:08 AM
almost everything works
database updates
paths are correct
if i manually stick the photo in the dir-it pulls up perfect in profile
but it WILL NOT upload!!!!!
BradC
09-25-2001, 02:02 PM
have you switched over to webhosts hosting services?
Cause like I said.. he has helped you out with this in the past, instead of coming to me first...
if you are using win2k.. or a windows server, I cannot help you cause I don't know what it might be, but I will tell you this when me and webhost were talking.. it seems that was the problem... your permissions are off.. and I don't know how the file attachment stuff work or anything about that.
maverick1236
09-25-2001, 02:12 PM
right now i am MANUALLY entering their pics into DB and Server
and its working fine....150 users!!lol
Oh well-this hack is worth it
Thank You!!
BradC
09-25-2001, 03:27 PM
I am sorry I cannot be of more help... I don't use windows as my server, nor do I have access to one, so I cannot help ya on how to set it up.. and the problems that can occur..
Once again I am sorry if I come off a little like an a--hole.. hopefully here in a couple of weeks... all that is hectic and in total chaos.. will be gone and I will be back to my normal self :D
hopefully.. lol
Zombie
09-25-2001, 04:17 PM
Has anyone run into this problem:
I've uploaded a .gif & .jpg and it's telling me that my file is not a jpg,gif type.
Can anyone figure out why the hell it's saying this?
It's set like this: $Type_Restrictions = "jpg,gif";
Zombie
09-25-2001, 05:09 PM
Forget it, guess this won't upload gif's
webhost
09-25-2001, 05:49 PM
mind uploades gif files, you need to make a change in the upload.php file I believe
/* File Type Restrictions Variables */
/*-----------------------------------------------------------------*/
$max_height = "200"; /* Max Image Height */
$max_width = "200"; /* Max Image Width */
$Size_Restrictions = "2000000"; /* image size limit in bytes */
$Width_Restrictions = "200"; /* your width limit */
$Height_Restrictions = "200"; /* your height limit */
/*-----------------------------------------------------------------*/
/* If you want to have it chosen where you can enable users to be */
/* able to upload gif formated pictures to... then use this next */
/* line that is commented out, instead of the other one. */
$Type_Restrictions = "jpg,gif,jpeg"; /* your upload file types */
/* $Type_Restrictions = ""; /* your upload file types */
//*---------------------------------------------------------------*//
/* This is where you fill in your server information so that it */
/* knows where and what to connect to. */
//*---------------------------------------------------------------*//
$error_msg .= "<font color=\"$errortext\" face=\"$font\" size=\"$smallerfontsize\">You Did Not Specify a ". "Photo to Upload! Please Re-Submit!!</font>";
}
/* again if you are giving the users the ability to upload gif formated pictures use the commented out line */
/* else if (($picture_type != "image/pjpeg") && ($picture_type != "image/jpeg") && ($picture_type != "image/gif")) */
else if (($picture_type != "image/pjpeg") && ($picture_type != "image/jpeg"))
{
$error_msg .= "<font color=\"$errortext\" face=\"$font\" size=\"$smallerfontsize\">Your file is not a $Type_Restrictions type, please only try to upload: $Type_Restrictions formated images.</font></font></td></tr></table></td></tr></table>";
}
else if ( $picture_size > $Size_Restrictions )
BradC
09-27-2001, 03:27 PM
Here in a week or so.. I might start on version 2.0 of this, where it will be more closely intergrated into vb... and hopefully stop and fix all the little problems in my first release version.
I will try to make it where, if you are still running the first version... the changes for the new one can be easily updated or changed to be the new version :)
and I might make it where you can have up to 2 or 3.. uploads .. but that is just a thought, not for sure.. really.
maverick1236
09-27-2001, 10:41 PM
your not gonna believe this!!......
I just Installed the "store custom avatars as files" hack-and its working perfect!!!
It uploads the avatar to the server and renames it according to UserID!!!
Not a single problem!!!
My paths are correct-ive confirmed that numerous ways-and the DB IS updating!!-But with your hack the files wont upload!!??
what do u think of this?
tx :)
BradC
09-27-2001, 11:55 PM
I already knew about this... but I can't explain it... because I am a complete moron :p
Besides installing it myself on your server, I have no way of knowing why it won't.. I mean the way it seems.. it should work just fine with the amount of help that has been given to ya.. so I dunno.
In the getinfo you made a mistake.
<td bgcolor="#DFDFDF"><normalfont></normalfont><b>$userinfo[username]'s
Photo</b></td>
<td bgcolor="#DFDFDF"><normalfont>$picture_name<br><br>$userinfo[photodesc]</normalfont></td>
</tr>
<tr>
It should be:
<td bgcolor="#DFDFDF"><normalfont><b>$userinfo[username]'s
Photo</b></normalfont></td>
<td bgcolor="#DFDFDF"><normalfont>$picture_name<br><br>$userinfo[photodesc]</normalfont></td>
</tr>
<tr>
Im not sure if this has been mentioned already but anyway..
SirSteve
10-01-2001, 01:44 AM
When viewing Who's online and a visitor is on the upload.php page, it displays "Unknown Location", to fix this:
Look in online.php:
Around the 200 lines mark your see lots of "case" statements
You need to add this:
PHP:
--------------------------------------------------------------------------------
case 'upload':
$userinfo[where] = "Viewing the <a href='upload.php?s=$session[sessionhash]'>Photo Upload</a>";
break;
--------------------------------------------------------------------------------
Also around the 500 lines mark you see more "case" statements
You need to add this:
PHP:
--------------------------------------------------------------------------------
case 'upload.php':
$userinfo[activity] = 'upload';
break;
--------------------------------------------------------------------------------
Now, can someone tell me how to pull in the photo when viewing your "Edit Options" page via User CP?
I also would like to add the vB header and footer to my upload.php page, anyone done this yet?
VirtueTech
10-01-2001, 02:00 AM
Version 2.0 should use ImageMagick to resize the photo into a thumbnail. That would rule.
Nice hack. :)
BradC
10-01-2001, 02:47 PM
Originally posted by VirtueTech
Version 2.0 should use ImageMagick to resize the photo into a thumbnail. That would rule.
Nice hack. :)
Not a bad idea, but most likely I will not be adding it .. in my release.. reason being that some people if not a lot of people may not have the access to imagemagik.. so it would do them no good.. and then there is.. what would the thumbnail be used for? Cause I have other methods I use.. to make thumbnails..
as for the header and fooder SirSteve... I will most likely make it more intergrated into the user control panel.. so that part might be taken care of easily :)
topgun
10-10-2001, 03:19 AM
It can run on win2000?
BradC
10-10-2001, 04:52 AM
I am not actually for sure, I think it does for a lot of people certain people have messed up servers, so it will not work... and lucky anything else does..
But I only test my stuff on linux right now till I setup another win2k server to play with at my house :)
could someone help me. when i upload a picture. it says that it uploaded it but i cannot find the file. i have the upload path settings correct but it still wont work.. here is my code
/* Folder variables */
/*-----------------------------------------------------------------*/
$path = "/home/username/public_html/images/uploaded";
/* this is the path to your uploaded */
/* image folder where the pictures */
/* are going to be stored. */
$cpurl = "http://animegathering.com/";
/* The path where your vb files are */
/* located at */
$shortpath = ""; /* folder where the file is located */
/* anything after the domain name */
/* like www.domain.com/vb/...file */
$imagepath = "/images/uploaded";
/* folder where the uploaded images */
/* are going to be stored. This will */
/* be used to pull the images up to */
/* show on this page. */
also it seems it wont let me upload .gif files.
/* File Type Restrictions Variables */
/*-----------------------------------------------------------------*/
$max_height = "200"; /* Max Image Height */
$max_width = "200"; /* Max Image Width */
$Size_Restrictions = "2000000"; /* image size limit in bytes */
$Width_Restrictions = "200"; /* your width limit */
$Height_Restrictions = "200"; /* your height limit */
/*-----------------------------------------------------------------*/
/* If you want to have it chosen where you can enable users to be */
/* able to upload gif formated pictures to... then use this next */
/* line that is commented out, instead of the other one. */
$Type_Restrictions = "jpg,gif,jpeg"; /* your upload file types */
/* $Type_Restrictions = ""; /* your upload file types */
//*---------------------------------------------------------------*//
/* This is where you fill in your server information so that it */
/* knows where and what to connect to. */
i use this code but it does not work.
BradC
10-12-2001, 10:24 PM
At first glance.. I cannot actually tell why it won't upload or it uploads but you can find it..
I take it your public_html folder is your root web folder, and inside that folder is some vb files, like index.php, member.php, register.php and that inside that is your admin, mod, images folder..
and inside the images folder is the uploaded folder.. which is set to chmod @ 777..
and you have your actual username.. or account name instead of username in this next lines username area..
$path = "/home/username/public_html/images/uploaded";
IF so.. then I am not for sure.. it does not show up at all anywhere on the server.. does the script find it? Like after it refreshes.. does it show the image, or a small box with a Red X in it?
Also on the second question you asked.. there is one more section.. that needs to be changed.. to be able to use gif... which is on line. 307.. that reads and looks like this.
/* again if you are giving the users the ability to upload gif formated pictures use the commented out line */
/* else if (($picture_type != "image/pjpeg") && ($picture_type != "image/jpeg") && ($picture_type != "image/gif")) */
else if (($picture_type != "image/pjpeg") && ($picture_type != "image/jpeg"))
hope that helps..
just reply either way.. so I know and if it does not.. we can take it another step :)
joergh
10-13-2001, 11:50 AM
Hi,
i had problems with this hack. Upload went well but for heavens sake :) the photos weren?t shown in the profiles of my users.
After testing eveything (chmod, paths ..) teh solution for my problem was the following:
I took the second solution for the getinfo-template from the html-filechangesfile:
Edit to this template:
getinfo
And add these two variables:
Original (no Fotos):
$picture_name
$userinfo[photodesc]
My version (finally the Fotos work) :)
$userinfo[picture_name]
$userinfo[photodesc]
Of course its easy but it took my some evenings to find this :)
Hope it helps ...
but i have one last question for this hack:
Is it possible to define a standard-pic (f.e. nofoto.jpg) for users that havn?t uploaded their photo yet?
joergh
BradC
10-13-2001, 03:11 PM
Glad that way works for ya... interesting... never really tried it that way. :)
and yes... I know a couple of people that added a no photo for those users that don't have a photo..
in your template named : photo_unknown
it says this
"Sorry, No Photo Available"
just change that to have an image instead of saying text..
like
<img src="images/nophoto.jpg">
or something like that..
thanks for the help. i am now able to show the image, which it only showed a box with a red x in it before. but i still cant get it to upload .gif files it gives me a erroe saying its not one of the correct files extensions.
BradC
10-14-2001, 08:04 AM
Here is the code I have in my script..
else if (($picture_type != "image/pjpeg") && ($picture_type != "image/jpeg") && ($picture_type != "image/gif"))
now on my personal sites I don't allow gif's for my own personal reasons..
but maybe instead of being && .. && make it OR.. like this
else if (($picture_type != "image/pjpeg") or ($picture_type != "image/jpeg") or ($picture_type != "image/gif"))
and see if that fixes it or helps it.
umm ok i try that aswell and it still does not seems to want to wrok so i got the upload.php file and if you could take a quick look and see if their is anything wrond that would help out alot.
BradC
10-14-2001, 05:37 PM
Yah forgot to change what I said above..
but that is ok..
you were suppose to uncomment this line:
else if (($picture_type != "image/pjpeg") && ($picture_type != "image/jpeg") && ($picture_type != "image/gif"))
/* else if (($picture_type != "image/pjpeg") && ($picture_type != "image/jpeg"))
but ya left that commented and just changed it from && to or.. and left the other one uncommented..
but I attached it again so see if this new one works :)
thats alot this really help. to bad i cant think or i would have figured it out:rolleyes:
BradC
10-14-2001, 06:14 PM
Does it work now... :)
My directions are pretty good, but not the best... and somewhere in my directions I said you will have to go through the upload.php file to make sure that you check for all the comments I made.. to see if there is any other changes... that is my downfall.. next version if and when I complete and release it, will be a lot better and will take a lot less time to accomplish what you want done :)
pgowder
10-22-2001, 06:26 PM
When I try to click on the link in the CP, here is what I get. Everything else is working great.
Fatal error: Cannot redeclare stripslashesarray() in /home/sites/home/web/gathering/admin/global.php on line 14
BradC
10-23-2001, 12:09 AM
which page.. when you view the users with photos?
pgowder
10-23-2001, 12:21 AM
Got it fixed, thanks!
Bouddha
10-25-2001, 08:55 PM
I use this script and it's very nice but I would like to know if it is possible to know when an user have uploaded his pic by putting a small gif (like a mini camera) near his avatar. This gif will link to the user's profile and allow to see the photo.
Is it possible or someone have a better/other idea ?
Thx in advance
coolmody
10-26-2001, 01:16 AM
Does this hack work with safe mode turned on?
BradC
10-26-2001, 01:40 PM
Bouddha,
If you have a camera icon... I will get this to work.. I have been searching when I get time to find one to use, and I cannot find one.. so I keep putting it off lol..
you find me one and I will type out the instructions on how to add it :)
and coolmody
not for sure, it should... I do believe it should work either way.
webhost
10-26-2001, 04:20 PM
Brad you try this one.
http://realwebhost.net/camera.gif
http://realwebhost.net/camera1.gif
Bouddha
10-26-2001, 05:55 PM
Cool, this pic is very nice !
BradC> Thx in advance, it'll be great !
BradC
10-27-2001, 04:16 AM
The icon is not transparent.. or when I saved as.. it wasn't.. but still none the less it will do.. and everyone can change it if they like :)
thanks webhost..
now.. on to.. where abouts you want to place it..
postbit template for sure... and maybe in the memberlist template..
question is do you want it underneath their avatar or name.. or beside, or would you like it on the bottom row, where the profile button, email, pm buttons are?
Bouddha
10-27-2001, 02:37 PM
I think the better place to put it is just beside the name of the poster.
I'm impatient the see the result ;)
BradC
10-27-2001, 04:14 PM
don't be impatient... it takes me a long time just to get up in the mornings let alone accomplish anything on a given day :)
and.. I will do it both ways.. or all three, just to see what the results will be.. cause I think it is kind of a big icon to have posted right next to their name.
Bouddha
10-27-2001, 04:21 PM
Take your time ! May the force be with you :D
BradC
10-27-2001, 08:45 PM
Will actually work on it here in a few minutes..
and.. after looking back at my first.. php scripting lessons.. umm it needs a major overhaul lol
BradC
10-27-2001, 09:45 PM
Ok.. I have attached a text document on how to do this.
But I want to let everyone know a couple of things. Which I also put in the text document.
It will post right next to the User's Title, and will be the attached icon above provided by Webhost.. thanks webhost :)
When you hover over it, it simply says "User has a photo to show" blah.. ok.. well when you click on it, it will pop open a fixed window.. and inside it will show the image.
It does not auto-resize to the size of the image, and it is not fancy... and the java code was provided to me by snyx awhile back.. still using it in the template :)
If you... come up with some auto-resizing code for this, would you please provide it to me.. I can play with it and maybe add some new stuff like a photo frame for the picture and .. stuff :)
Thanks,
Brad C.
BradC
10-27-2001, 10:47 PM
Ok.. I have fixed the earlier version as best I could.. now it will popup just a little bit bigger than the picture.. :)
play with this one.. cause I mixed up codes in the other one..
$post[photo_one] should be $post[picture_name] in the other file.. :)
here is the new one:
Bouddha
10-28-2001, 12:37 PM
Thank you ! You did it faster than I thought but... it doesn't run on my forum :( .
I think I did the way you explain (and I tried 3 times).
Maybe a little mistake in your code or maybe I'm wrong :confused:
Thx a lot
BradC
10-28-2001, 02:59 PM
First which document did you download the second one?
I hope so..
and tell me what errors you are getting so I have something to go off of.
email me if you wish,
bradc@addictedusers.com
BradC
10-29-2001, 10:55 AM
I had to update the text file... I am sure some people caught the error, but I updated the text file to reflect an error I made from converting from my version back to this version :)
Bouddha
10-29-2001, 11:58 AM
Thank you so much for your email support, your script it's why I were really looking for ;)
BradC
10-30-2001, 02:38 AM
Does it work yet, if not... email me again.. and we can work on it some more.. lol
I am working on another version... and have added a lot of new features.. so atleast I am in the mood for working on this project :)
Bouddha
10-30-2001, 08:54 AM
Yes it work but the GetImageSze don't. It's not really a problem...
I would like to help you to code another version but I don't really understand the way how run vbulletin. I know better C++ ;)
But I can test every version of your hack !
Still thx for your support
BradC
10-30-2001, 01:39 PM
I don't know vb either :)
I know C.. somewhat... actually I don't know anything really.. just a guy that likes to tinker with stuff :)
as for that getImageSize problem.. email me sometime today.. I want to get that resolved. :)
Mr. X
11-02-2001, 12:04 AM
Does this hack work with this:
http://www.vbulletin.com/forum/showthread.php?s=&threadid=32009
I tried it on my test forums but I musta screwed up somewhere if it does.
cobradude
11-04-2001, 09:38 PM
I've got this hack working, with one exception....For some reason, when the photo is saved, it is set chmod 440. The directory that the images are being stored in is set at 777. When I update the uploaded image 777 it shows up fine.
Is the chmod value set with the script? If not, what could be going on here?
SirSteve
11-05-2001, 07:28 PM
This code is different in vb 2.2.0:
<center><a href="index.php?s=<?php echo $session[sessionhash]; ?>&action=home"> Control Panel Home </a></center>
<table width="100%" border="0" cellspacing="0" cellpadding="5" id="navtable">
<tr><td><hr></td></tr>
What is the new replacement code?
joergh
11-10-2001, 11:10 AM
Does the Hack work with vb 2.2.0 ? Anybody installed it sucessfully? :)
SirSteve
11-10-2001, 10:36 PM
What about adding the vb header and footer? Has anyone been able to do it? If so, can you post how?
Thanks.
TheComputerGuy
11-10-2001, 11:28 PM
i updated it in from 2.03 and I suppose it still works great..
SirSteve
11-11-2001, 01:39 AM
I cannot get the post bit addon to work. Keep getting errors with the functions.php part:
if ($post[[picture_name]!="") {
Is there supposed to be 2 "[" in there?
Here are the errors:
Parse error: parse error, expecting `']'' in /forums/admin/functions.php on line 210
Fatal error: Call to undefined function: getuserinfo() in /forums/admin/sessions.php on line 323
and what about this:
<a href=http://www.addictedusers.com/dbase/ranking/uploaded/$post[picture_name] onclick="NewWindow(this.href,'name','$imagewidth','$imagehe ight','yes');return false">
No quatation mark is needed after a href= or _name] ?
grumpy
11-21-2001, 02:06 PM
I got the same error as SirSteve with the add-on. Does anyone know the solution?
thanks :)
SirSteve
11-21-2001, 02:23 PM
And I am still waiting to get it fixed....
:(
ToraTora!
11-22-2001, 06:37 PM
BradC has not even registered on this site yet. He has been REALLY busy on other projects and with school.. and everything. So you will probably be waiting a good while to get fixes for whatever problems were created when updates were made with vb.
The instructions have not been updated since 2.0.3 so for it to work with 2.2+ a new things will have to be changed to work with what was changed in the vb files.
btw.. why not try emailing him and see if you get a response.
bradc@addictedusers.com
ToraTora!
11-23-2001, 08:30 AM
currently, to help brad out as much as i can with the new improved photo upload, i am working on a total template upload script, which will allow the user "pages". Click on page one, to upload, delete, or change your picture and description, or just to display your first picture, which also uses all of your vb settings.
This also means a overhaul of the main script to accomodate the new changes made to VB after to the script's initial release.
SirSteve
11-23-2001, 02:18 PM
Originally posted by ToraTora!
currently, to help brad out as much as i can with the new improved photo upload, i am working on a total template upload script, which will allow the user "pages". Click on page one, to upload, delete, or change your picture and description, or just to display your first picture, which also uses all of your vb settings.
This also means a overhaul of the main script to accomodate the new changes made to VB after to the script's initial release.
Waiting for this! :D
ToraTora!
11-24-2001, 08:55 AM
brads coding style is a intricate, and very definitive, which has caused a couple of minor set-back in my bid to up his already fine script, however, hopefully in short time, she will be up for his approval soon.
grumpy
11-24-2001, 10:52 AM
The script worked perfectly on 2.2.1. It's just the add-on that I'm having problems with, I don't really understand the instructions.
ToraTora!
11-24-2001, 12:39 PM
I talked to Brad and he said that he has everything fixed up and working with 2.2 and he said if and when he gets some time he will pass on the updates or fixes for everyone. So I will post them AS soon as I get them :)
ToraTora!
11-25-2001, 12:46 AM
Ok, Brad has sent me this file, which he "says" should work and if there is any problems please email him! Cause it works for him.
I have looked for the instructions and they seem like they will work, yes the text file is a little cluttered, but we all have to work with what we are given.. :) :stupid:
grumpy
11-27-2001, 04:11 AM
Thanks for the addon update :) I installed it and it actually does work. However, I'm getting an error printing across the top of the forum...
Warning: getimagesize: Unable to open 'http://www.thingsarentwhattheyseem.com/vb/images/uploaded/1_photo.jpg' for reading. in /home/thingsar/public_html/vb/admin/functions.php on line 212
(btw, this forum is not open to the public, it's my test forum)
When I click the camera icon, I get the popup image. But it's very small and I have to resize it to view it well.
Any idea what is causing the error message?
thanks :)
SirSteve
11-27-2001, 04:17 AM
I got the same exact thing so I e-mailed Brad and he said he didn't know what was wrong... sigh........
Originally posted by grumpy
Thanks for the addon update :) I installed it and it actually does work. However, I'm getting an error printing across the top of the forum...
Warning: getimagesize: Unable to open 'http://www.thingsarentwhattheyseem.com/vb/images/uploaded/1_photo.jpg' for reading. in /home/thingsar/public_html/vb/admin/functions.php on line 212
(btw, this forum is not open to the public, it's my test forum)
When I click the camera icon, I get the popup image. But it's very small and I have to resize it to view it well.
Any idea what is causing the error message?
thanks :)
grumpy
11-27-2001, 04:22 AM
On a whim, I just deleted $imagehw = GetImageSize($thephoto); from the functions.php (part of the hack) and reloaded it, and it removed the error, and the popup still works :)
SirSteve
11-27-2001, 04:46 AM
Originally posted by grumpy
On a whim, I just deleted $imagehw = GetImageSize($thephoto); from the functions.php (part of the hack) and reloaded it, and it removed the error, and the popup still works :)
hey! That did do it! Thanks!
SirSteve
11-27-2001, 04:46 AM
I get this when trying to view the install instructions:
Changes to admin/index.php:
find:
<center><a href="index.php?s=<?php echo $session[sessionhash]; ?>&action=home"> Control Panel Home </a></center>
<table width="100%" border="0" cellspacing="0" cellpadding="5" id="navtable">
<tr><td><hr></td></tr>
Immediately below the last line from above, paste the following:
<tr><td>
<table width="100%" border="0" cellspacing="0" cellpadding="2" id="navtable">
<br>
<b>Fatal error</b>: Call to unsupported or undefined function makenavselect() in <b>/usr/www/users/gandalf/starwarsguide.com/vbportal/forums/filechanges.html</b> on line <b>51</b><br>
and that's it. My guess is because of the new changes in 2.2.0...
ToraTora!
11-27-2001, 02:49 PM
$imagehw = GetImageSize($thephoto);
that line and two other lines, are the one that gets the size of the image. With that it is what makes the popup window resize to fit the image, instead of being a default size.
and SirSteve I don't know what you did on your last post.. cause you should have the filechanges file on your hard drive to look at, not on your website. Cause you should only need to look at that once, and why are you looking at that.. for the postbit addon.
grumpy
11-27-2001, 03:00 PM
It wouldn't get my image size though, just the error message. Should the code be different to achieve this?
Or could it be a permissions error since it says it cant 'read' it? Just guessing at that. The photos loaded set themselves at 600. I dont have a clue if this matters.
SirSteve
11-27-2001, 04:37 PM
Originally posted by ToraTora!
$imagehw = GetImageSize($thephoto);
that line and two other lines, are the one that gets the size of the image. With that it is what makes the popup window resize to fit the image, instead of being a default size.
and SirSteve I don't know what you did on your last post.. cause you should have the filechanges file on your hard drive to look at, not on your website. Cause you should only need to look at that once, and why are you looking at that.. for the postbit addon.
It's not for the postbit addon but vb Photo Upload (from the beginning). I uploaded vbpinstall and html file, skipped the table creation and that's where the errors are. I need to re-install this hack.
grumpy
11-28-2001, 12:41 AM
Regarding the $imagehw = GetImageSize($thephoto); in the postbit-addon hack, I put it back in to try to get it to work because the thumbnails sucked.
When I originally loaded this hack, I received the error at the top of the page:
Warning: getimagesize: Unable to open 'http://www.thingsarentwhattheyseem.com/vb/images/uploaded/1_photo.jpg' for reading. in /home/thingsar/public_html/vb/admin/functions.php on line 212
Then it worked for the day (not sure why), I showed it off to friends. But just now, it's doing it again, and I haven't changed it anymore.
I found an interesting site that examined why GetImageSize doesn't always work. There are several workarounds but I don't know how to make them work here, if they even will in this situation. Maybe someone that knows what they are doing could take a look when you get a chance?
http://www.php.net/manual/en/function.getimagesize.php
SirSteve
11-28-2001, 03:24 AM
Just make your pop-up window the same size as your max allowed image size...
grumpy
11-28-2001, 04:00 AM
Well thank you, SirSteve :) I'm well known for making this much more complicated than they have to be. I have altered the height/width accordingly and now it's all safe to release, thanks :)
SirSteve
11-28-2001, 02:20 PM
No problem... I am still trying to figure out why I cannot pull up the pic in the getinfo template.
:(
This hack really needs to be re-done, especially making it use vb headers and footers.
ToraTora!
11-28-2001, 11:47 PM
This hack took a lot of time for Brad to make up, and he did it the way he wanted to... he took a lot of suggestions from the get go from me and others like wajones. The end result he decided not to use headers and footers for his own reasons, and if you want them.. I am sure you can add them... then if you find it takes a long time to figure it out, then you might know what he went through.. hehe
it was his first script, so it was roughly coded, and done in a fashion to if it works, leave it alone. lol
btw.. I have seen his latest version, which he has not released cause he is not done with.... and it does have a lot more features, and will work a lot better. :)
I do believe this has been brought up a few times.. and I think when he gets his v2.0 done it might have headers and footers or an option for it. But he has been working on a lot of other things and has not really made it back to fixing this.
But I was told last night that he is atleast working with the old version and updating it completely to work with vb2.2+ so we will see.
grumpy
11-28-2001, 11:55 PM
While we may have had a few problems tweaking it to work for us, it's a great hack, and I greatly appreciate his time to make it :) I'm happy with what it does for now, and will look forward to seeing his update whenever he shares it with us.
Thank you for keeping us updated on his progress and for helping sort things out :)
SirSteve
11-29-2001, 12:25 AM
Originally posted by grumpy
While we may have had a few problems tweaking it to work for us, it's a great hack, and I greatly appreciate his time to make it :) I'm happy with what it does for now, and will look forward to seeing his update whenever he shares it with us.
Thank you for keeping us updated on his progress and for helping sort things out :)
I could not have said it better... :)
derfelix
12-03-2001, 08:30 PM
Great Hack..
just one little question.. in your install file you write
"If you have previously installed vB Photo Ranking, there will be no need to make any database changes, so you ......."
I habe been making queries all over the place for the last few days....
Where do i get: vB Photo Ranking
that would be exactly what i need !!!!
thanks
grumpy
12-04-2001, 12:25 AM
I'd like to make a suggestion, in case anyone can help with this. In the Admin CP, the option to view/edit photos will load a list of every member on one page, regardless of whether they have a photo uploaded. I have over 15,000 members and it zapped my browser trying to load it all. So if there is a way to load a certain number at a time, or even allow a search for specific members, that would be a great addition to this script.
thanks :)
SirSteve
12-04-2001, 02:51 AM
Originally posted by grumpy
I'd like to make a suggestion, in case anyone can help with this. In the Admin CP, the option to view/edit photos will load a list of every member on one page, regardless of whether they have a photo uploaded. I have over 15,000 members and it zapped my browser trying to load it all. So if there is a way to load a certain number at a time, or even allow a search for specific members, that would be a great addition to this script.
thanks :)
I agree totally...
ToraTora!
12-04-2001, 04:09 AM
derfelix,
I asked Brad about that... I think he forgot to change his internal script .. lol. He has photo ranking, and has been working on it for a long time. Photo upload was one part of it and he decided to release it to everyone after he got so far with it... so he pulled it out of a bigger script and released it, so luckily there was no real big mess ups.. :)
Second SirSteve and grumpy.. Brad has updated that .. a few times, just never got around to releasing it.. :)
find this code.. in the (admin/user.php) file:
$users=$DB_site->query("SELECT user.userid,username,email,picture_name,photodesc, ipaddress,userfield.* FROM user,userfield WHERE $condition AND userfield.userid=user.userid ORDER BY $orderby $direction LIMIT $limitstart,$limitnumber");
and change it to this:
$users=$DB_site->query("SELECT user.userid,username,email,picture_name,photodesc, ipaddress,userfield.* FROM user,userfield WHERE $condition AND userfield.userid=user.userid AND picture_name<>'' ORDER BY $orderby $direction LIMIT $limitstart,$limitnumber");
what was added was a WHERE clause (picture_name<>'') meaning where the picture_name field is not empty.
So it will only display the users that have uploaded a photo.
Does this help..
derfelix
12-04-2001, 05:47 AM
Thanks... will i it be long before release? (even commercial)?
anyway i'il work on an addon for this one... in memberlist.. a button to display only members with photos in profile ;)
SirSteve
12-04-2001, 06:01 PM
Thanks! Works great! I still cannot get the pic to show up on the Profile page. It shows up in the postbit addon though.... no errors or anything, just no pic. The description however DOES show....
ToraTora!
12-04-2001, 08:25 PM
SirSteve... I know that it works.. and I know now that the postbit addon will work.. cause Brad has tested it.
Brad has totally changed things around and they still work..
the best thing for ya to do is email Brad and somehow give him a link where it can look at it himself.. and I am sure he will help solve your problem.
SirSteve
12-04-2001, 08:36 PM
ok. Thanks!
derfelix
12-05-2001, 01:52 PM
Stupid question.. maybe offtopic.. but:
if your provider doesnt let you compile an external program,
and doesn't have image-magic or another resizing proggy installend...
and the new providers only have GD with png but no jpg support...
is there a way in php or perl to resize a graphic????
like getimagesize for example works without any external helpers..
or maybe to convert image to png so GD could take over?
- i thought of writing a java applet for submitting.. that could resize the image and then send the converted image to a php file via post... i got it running sending text but lost to much time in figuring out how to to send an image...
my question: is there something out there that would do the job????
ToraTora!
12-05-2001, 05:17 PM
check out php.net and see if there is some functions to do that..
there is a copy function.. I do believe.
You can have it copy and reduce the size of the image by a percentage maybe or something.
Tell your provider to install imagemagik! :)
derfelix
12-05-2001, 08:30 PM
oh.. you probably mean ImageCopyResized()
but that only works if php has been compiled with GD :(
Warez
12-23-2001, 01:30 AM
I must have had 10 hacks done, but this one eludes me, even after reading all the posts twice and rechecking every code. My error is:
'/home/dotcoms/verztec/home/dotorgs/dyne/public_html/forums/global.php' (include_path='.:/usr/local/lib/php') in /home/dotorgs/dyne/public_html/forums/upload.php on line 15
I have changed the path and I still can't get it :(.
Originally posted by BradC
Please post any problems.. and/or fixes that you may run into.. :)
I would just like to know how things go with this.. cause I tried to do the best I could at making a helpfull guide to installing this.
ToraTora!
12-23-2001, 02:51 AM
no offense, but with a name like the one you chose, probably wont garner any support here.
Bouddha
01-30-2002, 07:39 AM
I like this script but I got a small visualisation problem...
Maybe one of you could help me...
Thx in advance
slideboxer
02-05-2002, 03:08 AM
Originally posted by Bouddha
I like this script but I got a small visualisation problem...
Maybe one of you could help me...
Thx in advance
It has to do with this code
<td bgcolor="$cpnav[12]"><smallfont><b><a href="upload.php">Upload Photo</a></b></smallfont></td>
in your usercpnav template. I simply changed the [12] to [7] and it looks fine. I have no lcue what those numbers mean BTW :D
slideboxer
02-05-2002, 03:09 AM
Anyone have a photo.gif to share? Couldn't find the ones that were posted.
Gutspiller
02-05-2002, 03:23 PM
OK I installed this on my board and it wont upload the picture from the upload.php to the server. I created the directory in the right place, I went through the files and made sure they had the same path as my server. I put a photo in the directory manually and it worked, but for some reason I can't get the upload.php to upload the file.
I also get this error when I click the link in the admin control panel:
Fatal error: Cannot redeclare stripslashesarray() in /home/theforum/public_html/forumz/admin/global.php on line 14
Can somebody please help me out. :confused:
Thanks in advance! :)
ToraTora!
02-09-2002, 09:00 PM
The code for the User CP.. might have been left out of the member.php or usercp.php file. But just adding it, should fix that problem.
Btw the numbers relate to what the $cpnav background color is.. it alternates, well not really. The page selected will have a different color than the others.
Gutspiller, did you check to make sure that the upload folder (for the images) is chmodded to 777. Cause that is the only thing that I can think of.. for that problem.
and the second problem.. I think if you search through this thread, it might have something for that.. I think somewhere I saw that one :)
Also as soon as brad sends me the new updated version I will pass it on to you guys. It will probably be the last release. But will fix a lot of problems and give a lot more flexibility.
Bouddha
02-09-2002, 09:32 PM
Originally posted by slideboxer
Anyone have a photo.gif to share? Couldn't find the ones that were posted.
here it is
And thk you very much for you answer about "$cpnav[7]" ;)
Dontom
02-17-2002, 05:09 AM
Hi,
i am using this hack and it worked fine, untill I moved to another server - could someone give me the correct chmod and ownership for the uploaded photos? i had to upload them manually, so permissions were lost...
thank you!
Tom
ToraTora!
02-17-2002, 07:27 AM
Originally posted by Dontom
Hi,
i am using this hack and it worked fine, untill I moved to another server - could someone give me the correct chmod and ownership for the uploaded photos? i had to upload them manually, so permissions were lost...
thank you!
Tom
755 on some servers, 777 on others. I have varied the two on four different servers..lol...
Remember, that the permissions are only to be produced on your uploaded images folder. :)
Dontom
02-17-2002, 08:46 AM
thank you, found the error - server was in Safe mode :O
changed, now running again :)
Tom
kypdurron
02-20-2002, 03:46 PM
This hacks works great!
Had to move a couple of things around
(like declaring variables in upload.php BEFORE using them
in welcome).
I am also adding more templates so you can customize your
welcome message. (I have a bilingual forum..)
Thanks again for everyone's input
EJMack
02-21-2002, 03:28 AM
Warning: getimagesize: Unable to open 'C:PHPuploadtempphp93E.tmp' for reading. in c:\inetpub\wwwroot\forums\upload.php on line 319
Image upload successful.
Warning: Unable to open 'C:PHPuploadtempphp93E.tmp' for reading: No such file or directory in c:\inetpub\wwwroot\forums\upload.php on line 191
Anyone have any idea what that would be caused by??? Permissions are set correctly and all directories are correct but it still wont let me upload a file.. And Yes i have gone through this whole thread and looked for the answers....still no luck....
EJMack
02-21-2002, 04:33 PM
anyone?????
ToraTora!
02-22-2002, 11:12 AM
why is it trying to open a temp file... the getimagesize, in the script will only work on an image.. not a temp file.. unless well dunno.
Plus there is no paths.. it is trying to open a blob.. instead of..
c:\phpupload\temp\php93e.tmp\ or whatever..
which that whole format.. should not be like that nor should it be in that folder. Don't try uploading a temp file.
EJMack
02-23-2002, 04:49 AM
i didn't, i tried uploading an image file.. thats what i got
EJMack
02-23-2002, 05:16 AM
heres my file.....
EJMack
02-23-2002, 09:14 PM
?
EJMack
02-25-2002, 03:39 AM
?????
Tarion
02-25-2002, 05:54 PM
if everyone of you hast the problem that the uploaded images get not the right CHMOD to be display here a way to get it work:
find in upload.php:
exec("cp $picture $path/$chacha");
add after that:
chmod("$path/$chacha",0777);
and now it will work i had the same problem on my server an now it is fixed.
I hope you like this addition
KPI-Delivery
03-11-2002, 11:16 PM
Hi Board..
I have uploaded this program and all the templates etc.
Thought I was ready... but when I executed the upload.php i got a Parse error:
parse error, expecting `','' or `';'' in /usr/local/plesk/apache/vhosts/myhost.com/httpdocs/userforums/upload.php on line 124
This is my line 124...
[PHP]echo"<TD bgcolor=\"$headcolor\" bordercolor=\"$headcolor\" bordercolorlight=\"$headcolor\" bordercolordark=\"$headcolor\" height=17><table border=0 width=100% cellspacing=0 cellpadding=0><tr><td width=33%><b><font face=\"$font\" color=\"$headcolortext\" size=$smallerfontsize> Photo Upload Information</font></b></td><td width=64%></td><td width=3%><a href="$cpurl/usercp.php?"><img border=0 src=images/photoalbum/upload_files/profile.gif width=15 height=14 alt=\"Click here to view your profile control panel.\"></a> <a href=userhelp.htm onclick=\'window.open(this.href,'name','225','225' ,'yes');return false\'><img border=0 src=images/photoalbum/upload_files/question.jpg width=18 height=19 alt=\"Click here to view a user manual, if you are not for sure about something.\"></a></td></tr></table";
I have downloaded a fresh copy... and still get an error on this line... Can anyone see what I cant see. ... The error :)
Thanks, this looks like a great peice of code.
ToraTora!
03-27-2002, 04:59 AM
I go back to BradC's original hack.. his first, and it scares me.. at times me and him wonder how some even got it installed, or it actually worked.. lol :)
KPI, most likely it is not on that line, I mean it could be.. but it could be on the line above that. If you want, send your file.. and some brief info to Brad, and let him take a quick look at it.. I don't think anyone has listened to me when I say email him and he will help, but he will .. just might be a day or two before he checks his email :p.
BradC. - bradc@addictedusers.com
- icq = 3421297
if you don't want to.. to sum it up, that parse error is because of a missing or changed line of code, did you happen to mess with it at all.. like change some wording or what not.. ?
streamzone
04-21-2002, 02:10 PM
ok have a question i have everything working except the paths are wrong too show the gifs in the CP and the main.photo.page were would i edit thos paths
thanks in advance
streamzone
04-21-2002, 10:32 PM
can someone please help with the above help thanks
scsa20
05-05-2002, 09:09 PM
the following just gives me a error:
require($DOCUMENT_ROOT . "/forums/global.php");
and the error is:
[quote]
Fatal error: Failed opening required '/home/scsa20/public_html/forums/forums/global.php' (include_path='') in /home/scsa20/public_html/forums/upload.php on line 15
[/qoute]
so I change it to:
require('./global.php');
and that seems to work, but everytime you upload a picture, it refreshes to http://upload.php .... how can I make it stop doing that and just refresh it to forums.simon-soft.com/upload.php ??
thanks (and I know this is old)
ToraTora!
05-06-2002, 05:18 AM
the paths are located somewhere near line 124 unless you altered the code or added/delete anything.
do a search on the upload.php file for "gif"
it should be around this..
<img border=0 src=images/upload_files/profile.gif
edit it to your pleasure.. depending on what you changed.
Second question scsa20..
what you are looking for is this.. on line 192.
URL=$shortpath/upload.php\"
that is just part of that echo statement.
What you will want to change it to is:
URL='forums.simon-soft.com/upload.php'
and see if that works. :)
Btw.. for those who care.. Brad said that if vB 3 does not come bundled with a photo upload .. like this one .. that he will over haul this version and make it template driven, and fix any and all problems present and future :)
scsa20
05-06-2002, 08:28 AM
cool, I got it fixed, I just deleted that $shortpath after that URL= from 3 different places and got it to work that way...thanks for your help ;)
tora? :surprised: what is up!?
ZiRu$
05-06-2002, 08:09 PM
thanks I'll try to install on 2.2.4
thehobbyforum
05-09-2002, 12:22 AM
This is along the same subjest lines but has anyone yet put up a hack for thumnailing attachments automatically?
Birdie501
05-23-2002, 11:37 PM
hi,
i just installed without problems. Now i am testing all functions, but this time with problems.
i have my folder in images/userphoto and chmod to 777!!!
But every time i upload a photo, the photo itself has only 400 rights (-rw------)!
Why is that? What do i have to change! because of that the photo is in that folder but can not be seen!
Thanks!
Birdie501
05-24-2002, 01:22 PM
Originally posted by Tarion
if everyone of you hast the problem that the uploaded images get not the right CHMOD to be display here a way to get it work:
find in upload.php:
exec("cp $picture $path/$chacha");
add after that:
chmod("$path/$chacha",0777);
and now it will work i had the same problem on my server an now it is fixed.
I hope you like this addition
ok got it, that was the problem that took me 24 hours!!!!!
Thanks!
btw i am running vb 2.2.5! Works perfect!
Carthriller
06-07-2002, 02:44 PM
In the adminstrative CP, when I click on 'photo upload' I get the following error:
Fatal error: Cannot redeclare stripslashesarray() in /usr/home/username/public_html/forum/admin/global.php on line 33
Can someone please help.
ToraTora!
06-10-2002, 02:53 AM
<a href="https://vborg.vbsupport.ru/showthread.php?postid=173191#post173191" target="_blank">https://vborg.vbsupport.ru/showt...191#post173191</a>
and scroll down to see if any of those help you..
Birdie501
06-17-2002, 01:45 PM
Originally posted by RobAC
Brad,
Couple other problems: In upload.php the following parameters do not show up in: $welcome =
$max_height = "200"; /* Max Image Height */
$max_width = "200"; /* Max Image Width */
$Size_Restrictions = "10000"; /* image size limit in bytes */
$Width_Restrictions = "200"; /* your width limit */
$Height_Restrictions = "200"; /* your height limit
Don't know if someone already figured that out but if you want to use this variables above do this:
Cut this:
/*-----------------------------------------------------------------*/
/* File Type Restrictions Variables */
/*-----------------------------------------------------------------*/
$max_height = "600"; /* Max Image Height */
$max_width = "600"; /* Max Image Width */
$Size_Restrictions = "2000000"; /* image size limit in bytes */
$Width_Restrictions = "600"; /* your width limit */
$Height_Restrictions = "600"; /* your height limit */
/*-----------------------------------------------------------------*/
and add it before
$Site_Name.........
:bunny:
fridayweb
07-10-2002, 01:24 AM
All right guys, I've read through this whole thread, read the FAQ and everything, and I've tried to fix it myself. I come to you for help now. Everything works except for this one small problem:
Warning: Access denied for user: 'friday13f@fridaythe13thforum.com@jupiter.hostingg roup.com' (Using password: YES)
in /home/virtual/site7/fst/var/www/html/upload.php on line 168
friday13f@fridaythe13thforum.com is the username and my server will only accept this, but when it adds @jupiter.hostinggroup.com to the end, it won't let me access it. I've tried to find a way to stop that from happening, but I believe it's in the mysql somewhere that I don't know how to get to. If anyone could help me out, it would be greatly appreciated. Thanks. :)
dreamhost
07-11-2002, 03:19 AM
ok i've tried everything i can think of, but when I run the script, I get no picture uploaded, but there are no errors shown either. I look into the /images/uploaded folder there is nothing there. It just shows the x box with no pic there, when right click it shows correct path.
PLEASE HELP, SPENT ABOUT 4 HRS TROUBLESHOOTING, MY BRAIN HURTS..... :)
sorry url is
http://connect.samstech.net/forums/member.php?s=&action=getinfo&userid=482
or http://connect.samstech.net/forums/upload.php
dreamhost
07-11-2002, 03:21 AM
I also noticed that on this url
http://connect.samstech.net/forums/member.php?s=&action=getinfo&userid=482
the path to the missing picture isn't correct, it is missing the /forums before the /images tag
in the upload.php though missing pic location is correct. I even tried full path urls
alanvo
07-16-2002, 01:03 AM
Everything works great!! I even see the picture in my USERCP and everywhere else except the main_photogallery.php. Why is that?
I think that the upload.php didnt execute the query line that suppose to or something, can someone please help!
Fuitad
07-17-2002, 04:16 AM
If you're like me, the only reason you'll use the control panel to play with pictures is to make sure nobody uploaded stupid stuff. I found it long and annoying to see the list of all the members so here's two lines you can add to this script to make it faster and one little line to make it easier.
On user.php:
find:
$users=$DB_site->query("SELECT user.userid,username,email,picture_name,photodesc, ipaddress,userfield.* FROM user,userfield WHERE $condition AND userfield.userid=user.userid ORDER BY $orderby $direction LIMIT $limitstart,$limitnumber");
and replace it with:
$users=$DB_site->query("SELECT user.userid,username,email,picture_name,photodesc, ipaddress,userfield.* FROM user,userfield WHERE $condition AND user.picture_name != '' AND userfield.userid=user.userid ORDER BY $orderby $direction LIMIT $limitstart,$limitnumber");
now find (it should be the line right under the one you just replaced):
$countusers=$DB_site->query_first("SELECT COUNT(*) AS users FROM user,userfield WHERE $condition AND userfield.userid=user.userid");
and replace it with:
$countusers=$DB_site->query_first("SELECT COUNT(*) AS users FROM user,userfield WHERE $condition AND user.picture_name != '' AND userfield.userid=user.userid");
To easily view the picture (without having to click edit and then view picture, do this:
find:
makelinkcode("<font type=verdana color=#3366cc>edit</font>","user.php?s=$session[sessionhash]&action=photosuploadedit&userid=$user[userid]").
and above it, add:
makelinkcode("<font type=verdana color=#3366cc>view</font>","../images/userpics/$user[picture_name]").
Obviously, you might need to modify this to fit your own image path.
Also, this will prevent you from manually adding pictures to users but hey, if you installed the script, they should be able to do it themselves... no?
Hope this help anybody...
Fuitad
07-22-2002, 07:51 PM
Make sure you get the latest version, I fixed a little something I left in
admin/user.php.
Edit: Whoa, what the hell does that post does in this thread?
Brad,
Firstly thank you very much for this hack, it is execellent. I have installed in on my board 2.2.6 and the members LOVE IT!
A couple of questions have come up, unfortunatly, I do not have the PHP skillset to fix this, otherwise I would like to.
Is it possible to add a "Photo" icon in the message information where their status and number of posts is, each time they post a message, to indicate if they have a photo. Clicking on it would launch it.
Also, is there any possibility of a PHP page much like Leasane's Award hack (showaward.php). This would list only the users that have photos and display the photo and the description.
Many thanks again, if anyone can help with any of the above I'd really appricate it, not just Brad. I am just directing this at him to give thanks to this hack.
Harvey.
ToraTora!
07-27-2002, 10:03 PM
Originally posted by HLodder
Brad,
Firstly thank you very much for this hack, it is execellent. I have installed in on my board 2.2.6 and the members LOVE IT!
A couple of questions have come up, unfortunatly, I do not have the PHP skillset to fix this, otherwise I would like to.
Is it possible to add a "Photo" icon in the message information where their status and number of posts is, each time they post a message, to indicate if they have a photo. Clicking on it would launch it.
Also, is there any possibility of a PHP page much like Leasane's Award hack (showaward.php). This would list only the users that have photos and display the photo and the description.
Many thanks again, if anyone can help with any of the above I'd really appricate it, not just Brad. I am just directing this at him to give thanks to this hack.
Harvey.
Brad has yet to update this much.. well at all.. but as for the possibility of the icon in the postbit.. yes it should be in the zip, or I hate to say this.. through looking through this topic lol.. you should be able to find it.. if not email brad I am sure he has it laying around.. :)
also look for webhost, cause I do believe he posted one of the icons..
As for the second.. it was only done in his latest stuff.. but yes it is possible... as for to get him to doing it, might be like pulling teeth..
bradc = bradc@addictedusers.com
dadymac
08-06-2002, 08:31 PM
ok, guys, if you are sure that everything is right, i bet you ANYTHING that its jsut that yoru server is running safe mode....
i moved from a working non safe mode server, to one with sm enabled, and 100x checked the paths, and it wont work....everything but writing the darn image file works...db, everything, just no uploading....yes..i chmod...my lil 3 year old sister can chmod...
Tigga
08-29-2002, 04:50 PM
Is there a way to get this hack to work with safemode on? I had it installed on 3 different servers without a problem. Now I'm on a new server that has safemode turned on and can't get it to work. It will display the pictures already uploaded and everything seems to work fine except it won't actually upload the picture to the directory. Has anyone gotten this to work with safemode on?
omegauk
08-29-2002, 06:37 PM
I am getting this error, anyone know why?
Fatal error: Failed opening required '/home/alex/public_html/vb/global.php' (include_path='') in /home/alex/public_html/muscle/upload.php on line 15
omegauk
08-29-2002, 06:56 PM
and this:
Parse error: parse error, unexpected T_ENCAPSED_AND_WHITESPACE, expecting ']' in /home/alex/public_html/muscle/member.php(3268) : eval()'d code on line 171
Tigga
08-29-2002, 08:40 PM
[QUOTE]Originally posted by omegauk
I am getting this error, anyone know why?
Fatal error: Failed opening required '/home/alex/public_html/vb/global.php' (include_path='') in /home/alex/public_html/muscle/upload.php on line 15
omegauk
08-30-2002, 06:45 AM
now I am getting thius error when trying to see a user profile:
Parse error: parse error, unexpected T_ENCAPSED_AND_WHITESPACE, expecting ']' in /home/alex/public_html/muscle/member.php(3267) : eval()'d code on line 171
omegauk
08-30-2002, 07:43 AM
Ok I decided to remove this hack now, I removed all the file edits and templates but what about the photo table in the profiles? How do I remove that? The Install file added some tables, where are they? Anyone please.
AZNGuy
09-26-2002, 03:38 PM
Hi Brad.
I followed all the instructions, but I still get the problem with this.
When I upload a picture, it does not seem to upload the pic into my folder i specified. The folder is empty and has no pic. I did set chmod 777 to the "uploaded" folder
Here is my config
$path = "/home/xxxxxx/public_html/forums/images/uploaded";
$cpurl = "http://www.xxxxxxxxx.com/forums";
$shortpath = "/forums";
$imagepath = "/forums/images/uploaded";
If i manually put the images into that folder then everything seems fine. I can see and view it in the profile. Could u give me an advice?
Erwin
09-26-2002, 04:36 PM
Easy fix:
Change:
$shortpath = "/forums";
$imagepath = "/forums/images/uploaded";
To:
$shortpath = "forums";
$imagepath = "forums/images/uploaded";
Only change these lines, the other 2 lines are fine. That should work. It's a tricky difference (you must remove the / from the start of those 2 paths only).
AZNGuy
09-27-2002, 05:01 PM
it still does not work. I think it's because the safe mode thing that prevent the srcript to upload. My server is running with Safe Mode is on.
Anyone here success using this hack with server has safe mode is on?
PiotrasG
10-04-2002, 02:42 AM
[QUOTE]Originally posted by AZNGuy
[B]Hi Brad.
I followed all the instructions, but I still get the problem with this.
When I upload a picture, it does not seem to upload the pic into my folder i specified. The folder is empty and has no pic. I did set chmod 777 to the "uploaded" folder
I have the same problem plz help
Larry@IOG
12-10-2002, 01:59 AM
Will this work with 2.2.9?
Larry
indiamike
12-14-2002, 11:59 PM
Originally posted by Larry@IOG
Will this work with 2.2.9?
Larry
I just got it working on 2.2.8 on a dev site. Took some serious hours of work. A few manual changes from the templates and other stuff.
Personally I would install this on a dev site first before going live. It was a pain in the butt and I still haven't got out all the bugs. 99 percent there though.
Some php pages and templates need to be alterted slightly from the original hack.
Mike
indiamike
12-21-2002, 09:38 PM
Following up on my own post, this hack should work with 2.2.9. I installed it successfully on 2.2.8 and have it running live on my own site which is 2.2.5 (hacked to death).
The original hack should be touched up, most of the answers to the problems are all in the follow up threads, though I still couldn't get gif's to work.
So if you combine the original hack and all the solutions in the threads and put them together it still works.
I am just really pleased with myself that I was able to get this to work, one of the toughest hacks I think I have ever installed, errrr....I should say easy to install but tough to get to work properly.
Here is my profile page just to show it off.
http://www.indiamike.com/india/member.php?s=&action=getinfo&userid=1
Yeah baby...I did it.
Mike
Regit
01-08-2003, 04:05 PM
hey . please post your solutions here ^^
PiotrasG
01-08-2003, 10:47 PM
i couldnt get it to upload the pics to the web site, any solutions
Patrik
01-27-2003, 02:50 PM
Well, same problem here, files just won't be uploaded.
Yes, I'm absolutely sure my CHMOD-permissions are correct and that all modifications to the files are correct as well(as stated in the instructions). Yet, I always get the same error:
"Image upload successful.
Warning: Unable to create '/vbb/images/uploaded/1_photo.jpg': No such file or directory in /var/www/planetliebe.de/vbb/upload.php on line 190"
This is the error I get when replace
exec("cp $picture $path/$chacha");
With:
copy("$picture", "$path/$chacha"); (this is my line 190)
otherwise the script will only say the upload was successful, but yet nothing will happen. The database is by the way updated correctly, ONLY THE IMAGES ARE NOT UPLOADED.
The text in the "current image"-field is: "Error: file 1_photo.jpg not found."
I tried uploading a file called 1_photo.jpg but the script will also not overwrite this with the correct file...
Any idea what one can do about this?
indiamike
01-27-2003, 04:13 PM
It's probably the path setup.
I was going to rewrite the instructions for this hack but since it's going to be in the new version of vbulletin I felt it was a waste of time and I didn't think Brad C would approve.
Anyway I have uploaded the exact script that I use on my site with this.
I have left everything intact in this script except for my database names and password. All the paths and everything else are directly off of my site so you can see the way I set it up.
Look at the script lines 1-105 and view carefully the way I have set up the paths.....that is the key. I had left my paths in this script on purpose so you can see what it should look like.
If you change all the stuff between 1-105 and get a photo to upload then we can go on to the next steps which is displaying it in your users profile page. There are a bunch of errors in the templates that needed to be changed to.
Mike
Patrik
01-28-2003, 09:12 AM
Thanks, that really worked. I've checked and rechecked the scripts and couldn't find any difference, yet it works...
Now I have the image in my /uploaded-directory, yet the script says "no photo uploaded" (the image doesn't display) and the user-info-template also says "sorry, no photo available".
If you could walk me through the rest of the steps that'd be really great.
Thanks in advance...
indiamike
01-28-2003, 09:23 AM
Patrick,
Since I have to rush off to work, I will post how I did it with the template changes later on today. I did it another way than the templates that where in the original download file. It's simpler and cleaner.
Give me till later on today okay.
Mike
indiamike
01-28-2003, 09:56 AM
Just a quick tip before I head off for work Patrick so you can try this before I add the other template changes I did.
If your photo in the script uploads and it's showing up in your web folders that means the script is working correctly.
So I am assuming that you got that far and are having troubles in the users profile page getting it to show up.
If you have used the template and file changes as listed in the download script, which I used differantly, you should have created a template in your vb admin called photo_show.
The original file changes instructions has it as
<img src=/images/uploaded/$userinfo[picture_name]><br>
I changed it to an exact url instead. So mine looks like
<img src=http://www.indiamike.com/india/images/uploaded/$userinfo[picture_name]><br>
Try that and let me know.
Patrik
01-28-2003, 11:16 AM
Thanks for all your help, I really apreciate it.
I've actually been playing around with the script myself (couldn't wait for you to get back from work) and got it working...
Great script, thanks again for all the help!
vBulletin® v3.8.12 by vBS, Copyright ©2000-2025, vBulletin Solutions Inc.