The Arcive of Official vBulletin Modifications Site.It is not a VB3 engine, just a parsed copy! |
|
Details »» | |||||||||||||||||||||||||
How do all..
I am going to release my image gallery hack (in action http://www.overgrow.com/edge/index.php) without the admin piece.. I am still trying to finish it up without having to re-write all the vB delete routines.. Plus some of you may want to write your own way of administering the images that get uploaded and keeping things clean.. When my admin piece is finished I will post it here as well.. Features: Not too many.. very basic.. -- Only allows gif or jpg files to be uploaded.. I'm sure you can easily modify this for other file types.. PHP really makes things easy.. -- To start a thread in the gallery you must upload an image.. (doesn't apply when replying) -- You can set a file size limit for upload.. -- Stores information in a new vB table for use later.. (ie; admin stuff. Currently the admin piece is in progress..) You can download the instructions here - http://www.overgrow.com/tmp/imggalhack.zip It is a fairly simple hack with a few mods to global.php, newthread.php and newreply.php and a few new templates.. It is not automated, the download is just a text file with the modification intructions.. Please let me know if I made the instructions to confusing and what ya think.. Have Fun.. Herb Show Your Support
|
Comments |
#2
|
|||
|
|||
I don't know regular expressions in PHP by the back of my hand but there has got to be a way to replace the following lines with just one line of code:
Code:
$fileupload_name = str_replace(" ","",$fileupload_name); $fileupload_name = str_replace("%","",$fileupload_name); $fileupload_name = str_replace("!","",$fileupload_name); $fileupload_name = str_replace("@","",$fileupload_name); $fileupload_name = str_replace("#","",$fileupload_name); $fileupload_name = str_replace("~","",$fileupload_name); $fileupload_name = str_replace("^","",$fileupload_name); $fileupload_name = str_replace("&","",$fileupload_name); $fileupload_name = str_replace("+","",$fileupload_name); $fileupload_name = str_replace("=","",$fileupload_name); |
#3
|
|||
|
|||
Excellent man I've been waiting a long time for this, Thank you!
|
#4
|
|||
|
|||
upimage should be filename or the other way around. please note this....ROCK on...i love this image hack
|
#5
|
|||
|
|||
Quote:
|
#6
|
|||
|
|||
i don't know how to explain it really in depth, i have been up to late. but i will just show you what i am talking about, the table created doesn't have a field for upimage. so upimage should be filename.
Code:
CREATE TABLE imagegal ( imagegalid int(10) unsigned DEFAULT '0' NOT NULL auto_increment, postid int(10) unsigned DEFAULT '0' NOT NULL, filename varchar(100) NOT NULL, username varchar(50) NOT NULL, userid int(10) unsigned DEFAULT '0' NOT NULL, PRIMARY KEY (imagegalid) ); Code:
if (isset($fileupload)) { $DB_site->query("INSERT INTO imagegal (imagegalid,postid,upimage,username,userid) VALUES ('NULL','$mypostid','$TheFileNameIs','".addslashes($username)."','$userid')"); } Code:
Database error in vBulletin: Invalid SQL: INSERT INTO imagegal (imagegalid,postid,upimage,username,userid) VALUES ('NULL','15','CaddilacEscalade.gif','poil11','1') mysql error: Unknown column 'upimage' in 'field list' mysql error number: 1054 Date: Thursday 28th of September 2000 01:57:59 PM Script: /boards/newthread.php newthread.php?action=newthread&forumid=24 |
#7
|
|||
|
|||
you are right my man.. My bag.. As soon as my ftp server comes back I will re-upload with the correct field name..
thanks.. |
#8
|
|||
|
|||
Herb could you please let us know once you have uploaded the file?
|
#9
|
|||
|
|||
ok I have changed the imageupload for filename, but how would I go if I did not want the users to HAVE to upload a picture when starting a thread?
How can I remove this option, so users can upload pictures whenever they want? NOTE: this is prolly very easy to do, I apologize for my ignorance on PHP! Thanks |
#10
|
|||
|
|||
conan - I uploaded the new zip with the correct create table fields.. sorry about that..
Quote:
Code:
if (isset($fileupload)){ Code:
if (isset($fileupload) and $fileupload != "none") { Code:
if ($fileupload == "none") { eval("echo standarderror(\$bbtitle,\"".gettemplate("error_filenone")."\");"); exit(); } Then find Code:
// ##### Image Upload Hack (update image table) ##### if (isset($fileupload)) { $DB_site->query("INSERT INTO imagegal (imagegalid,postid,upimage,username,userid) VALUES ('NULL','$mypostid','$TheFileNameIs','".addslashes($username)."','$userid')"); } // ##### Image Upload Hack (update image table) ##### Code:
// ##### Image Upload Hack (update image table) ##### if (isset($fileupload) and $fileupload != "none") { { $DB_site->query("INSERT INTO imagegal (imagegalid,postid,upimage,username,userid) VALUES ('NULL','$mypostid','$TheFileNameIs','".addslashes($username)."','$userid')"); } // ##### Image Upload Hack (update image table) ##### I think that should do it for ya.. Herb [Edited by Herb on 09-29-2000 at 10:25 AM] |
|
|
X vBulletin 3.8.12 by vBS Debug Information | |
---|---|
|
|
More Information | |
Template Usage:
Phrase Groups Available:
|
Included Files:
Hooks Called:
|