The Arcive of Official vBulletin Modifications Site.It is not a VB3 engine, just a parsed copy! |
|
#1
|
|||
|
|||
In need of some mysql help
I could really use some help on this problem i can't get around....and with my limited knowledge of mysql this is causing some problems
Ok i guess i should start off with what i'm trying to do. I have made a file uploader. Now what i want to do is when the user ventures to the upload area it shows them a link for each uploaded file. Also i should mention the script is being run from within vb...so it is using vb's db. Here's what i currently have PHP Code:
once an image is uploaded this is the query i'm using PHP Code:
Upload_isthere looks like this PHP Code:
So my question is how do i get it to display all of the images uploaded? Also how do i get it so it only shows the pics uploaded by that person only? I really appreciate any help...since this is my first hack from scratch and i'm really lost :P |
#2
|
||||
|
||||
PHP Code:
|
#3
|
|||
|
|||
hey thanks for your help...although it's not quite fully working yet
now on the page is it just showing the url once...without the filename attached. this is the current upload_ishere PHP Code:
PHP Code:
|
#4
|
||||
|
||||
upload_ishere:
Code:
<tr> <td bgcolor="#1D6AA0" colspan="2"> <normalfont color="#EEEEFF" class="thtcolor"> <a href="$bburl/$picname">$bburl/$picname</a> </normalfont> </td> </tr> upload_index: Code:
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN"> <html> <head> <title>$bbtitle - $bbuserinfo[username]'s Picture Upload</title> $headinclude </head> </html> <body> $header <!-- breadcrumb --> <table bgcolor="#0E3652" class="bordert" border="0" width="100%" cellpadding="0" cellspacing="0"> <tr> <td> <table cellpadding="2" cellspacing="0" border="0" width="95%" align="center"> <tr> <td> <img src="https://vborg.vbsupport.ru/images/vb_bullet.gif" align="middle" alt="vBulletin"> <normalfont> <b><a href="index.php?s=$session[sessionhash]">$bbtitle</a> > Photo upload for $bbuserinfo[username]</b> </normalfont> </td> <td align="right"> $forumjump </td> </tr> </table> <!-- /breadcrumb --> <br> $cpnav <br> <form enctype="multipart/form-data" action="test.php" method="post"> <table cellpadding="0" cellspacing="0" border="0" bgcolor="#0A293E" width="95%" align="center"> <tr> <td> <table cellpadding="4" cellspacing="1" border="0" width="100%"> <tr> <td bgcolor="#1D6AA0" colspan="2"> <normalfont color="#EEEEFF" class="thtcolor"> <b>Upload - $bbuserinfo[username]</b> </normalfont> </td> $upload_bits <td bgcolor="#13486D"> <normalfont> <b>Upload:</b> </normalfont> </td> <td bgcolor="#13486D"> <normalfont> <input name="userfile" type="file"> </normalfont> </td> </tr> </table> </td> </tr> </table> <br> <table cellpadding="2" cellspacing="0" border="0" width="95%" align="center"> <tr> <td align="center"> <normalfont> <input type="hidden" name="action" value="upload"> <input type="submit" value="Upload"> </normalfont> </td> </tr> </table> </form> $footer </body> </html> Now, one thing, if you are using the user table to define the upload pics, then you would be better off using the uploadname field as an id to query off another table that has the filename stored...that way each user can have multiple uploads. The way it is setup now will only allow one upload per user. The reason is that each user only uses one row in the table, thus only allowing one piece of data per field. Thus, the new query that I provided you will only show one field. If you want, we can hook up this weekend via any of the messengers listed in my profile and we can walk through the code abit and see what we can do with it...but for now without more background on the hack, I canna help any more than what I have done here. |
|
|
X vBulletin 3.8.12 by vBS Debug Information | |
---|---|
|
|
More Information | |
Template Usage:
Phrase Groups Available:
|
Included Files:
Hooks Called:
|