Go Back   vb.org Archive > vBulletin Modifications > Archive > vB.org Archives > General > Member Archives
FAQ Community Calendar Today's Posts Search

Reply
 
Thread Tools
Details »»

Version: , by (Guest)
Developer Last Online: Jan 1970 Show Printable Version Email this Page

Version: Unknown Rating:
Released: 09-27-2000 Last Update: Never Installs: 0
 
No support by the author.

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

  • This modification may not be copied, reproduced or published elsewhere without author's permission.

Comments
  #32  
Old 10-14-2000, 04:49 PM
Guest
 
Posts: n/a
Default

I checked the file date under FTP and it's last modified is 10-01-00 so you have the latest version. Glad you like it! Our users couldn't live without it.
Reply With Quote
  #33  
Old 10-14-2000, 04:56 PM
Guest
 
Posts: n/a
Default

I know the feeling! Looking at your site also!

Sorry, don't mean to full your thread full of non-bugs!
Reply With Quote
  #34  
Old 10-15-2000, 01:48 PM
Guest
 
Posts: n/a
Default

*thinking*

hey there.

Would it be possible to make a forum where it had thumbnails also?

I'm thinking of making a place like this and wonder if you would mind if I could modify your code to display the pictures as a thumbnailed list.... It would of course do a check for mogrify, etc.
Reply With Quote
  #35  
Old 10-16-2000, 12:44 AM
Guest
 
Posts: n/a
Default

SC - You may do what you wish with the code..

Current zip includes the security fix..

Herb
Reply With Quote
  #36  
Old 10-19-2000, 04:43 PM
Guest
 
Posts: n/a
Default

Excellent hack! I'm busy integrating it into the pages of Breaking Art - what better use than an art gallery?!

Noticed that the current zip does not correctly limit file size. However replace $secured_size with $fileupload_size in the instructions and it works fine..

Have some plans for how I can enhance the hack. If they get anywhere then I'll let you all know!

Alan

--
http://www.breakingart.com/
breaking art from a different perspective
Reply With Quote
  #37  
Old 12-06-2000, 07:17 PM
Guest
 
Posts: n/a
Default

This is a great hack but i have 2 issues...

1) Can you make it work in preview mode? Right now it wont let you preview a uploaded picture, so you have to post it then edit it after if it didnt come out right.

2) Can this please work with normal forums, I want this hack to be an addition to a regular forum.
Right now if i don't upload a picture it fails to post just text.

Thanks
Reply With Quote
  #38  
Old 12-10-2000, 04:53 AM
Guest
 
Posts: n/a
Default

Quote:
Originally posted by Herb
conan - I uploaded the new zip with the correct create table fields.. sorry about that..

Quote:
How can I remove this option, so users can upload pictures whenever they want?
Ok in newthread.php find this code that you added for the hack..

Code:
if (isset($fileupload)){
and change it to

Code:
if (isset($fileupload) and $fileupload != "none") {
Then below the above should be

Code:
if ($fileupload == "none") {
       eval("echo standarderror(\$bbtitle,\"".gettemplate("error_filenone")."\");");
       exit();
       }
Remove that check..

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) #####
and change it to:

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]
There were 2 { in your code above in case anyone tries this...
Reply With Quote
  #39  
Old 12-10-2000, 05:31 AM
Guest
 
Posts: n/a
Default

I made a modification to this. If anyone knows if this is secure, would appreciate the feedback.

I like to be able to separate the uploads into a user directory. Personally I think it's tricky to give the username a directory due to funny characters, but with vb, we can use userid which is always a number and always safe.

So in newthread.php, instead of the instruction, simply add
Code:
       mkdir ("$uppath/$userid", 0777);
       copy("$secured","$uppath/$userid/$secured_name");
probably you can be more restrictive than 0777. Also, this code goes right above
Code:
       $TheFileNameIs = $secured_name;
       $TheFileLinkIs = "\n\n\[img\]$bburl/$upfolder/$userid/$TheFileNameIs\[/img\]";
       $message = "$message".stripslashes($TheFileLinkIs)."";
and instead of saving your files to an upload directory, it will save it to upload/$userid/*.gif if you know what I mean.
Reply With Quote
  #40  
Old 12-10-2000, 06:09 AM
Guest
 
Posts: n/a
Default

ok, tightened the permissions to more restrictive and checked if the file exists first:

Code:
       if (!is_dir("$uppath/$userid")){
       	mkdir ("$uppath/$userid", 0766);
       }
Reply With Quote
  #41  
Old 03-18-2001, 07:58 AM
Guest
 
Posts: n/a
Default

I keep getting this error when trying to post an image:
Quote:
Warning: Unable to open '/tmp/phpjv2608' for reading: No such file or directory in /web/dojo/paintball/forums/newthread.php on line 208
It seems as though it does not create the temporary directory. I've even tried changing the code in global.php to have to write to another temporary directory called "galtmp" and set the correct permissions and ownerships and it still did not work.

I think the code in global.php is not creating the temporary name directory in the "/tmp" directory.

Can someone please help me. I'd love to have this feature setup.

Thanks.
Reply With Quote
Reply


Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off

Forum Jump


All times are GMT. The time now is 09:50 PM.


Powered by vBulletin® Version 3.8.12 by vBS
Copyright ©2000 - 2025, vBulletin Solutions Inc.
X vBulletin 3.8.12 by vBS Debug Information
  • Page Generation 0.08884 seconds
  • Memory Usage 2,287KB
  • Queries Executed 25 (?)
More Information
Template Usage:
  • (1)SHOWTHREAD
  • (1)ad_footer_end
  • (1)ad_footer_start
  • (1)ad_header_end
  • (1)ad_header_logo
  • (1)ad_navbar_below
  • (1)ad_showthread_beforeqr
  • (8)bbcode_code
  • (3)bbcode_quote
  • (1)footer
  • (1)forumjump
  • (1)forumrules
  • (1)gobutton
  • (1)header
  • (1)headinclude
  • (1)modsystem_post
  • (1)navbar
  • (6)navbar_link
  • (120)option
  • (1)pagenav
  • (1)pagenav_curpage
  • (4)pagenav_pagelink
  • (11)post_thanks_box
  • (11)post_thanks_button
  • (1)post_thanks_javascript
  • (1)post_thanks_navbar_search
  • (11)post_thanks_postbit_info
  • (10)postbit
  • (11)postbit_wrapper
  • (1)spacer_close
  • (1)spacer_open
  • (1)tagbit_wrapper 

Phrase Groups Available:
  • global
  • inlinemod
  • postbit
  • posting
  • reputationlevel
  • showthread
Included Files:
  • ./showthread.php
  • ./global.php
  • ./includes/init.php
  • ./includes/class_core.php
  • ./includes/config.php
  • ./includes/functions.php
  • ./includes/class_hook.php
  • ./includes/modsystem_functions.php
  • ./includes/functions_bigthree.php
  • ./includes/class_postbit.php
  • ./includes/class_bbcode.php
  • ./includes/functions_reputation.php
  • ./includes/functions_post_thanks.php 

Hooks Called:
  • init_startup
  • init_startup_session_setup_start
  • init_startup_session_setup_complete
  • cache_permissions
  • fetch_threadinfo_query
  • fetch_threadinfo
  • fetch_foruminfo
  • style_fetch
  • cache_templates
  • global_start
  • parse_templates
  • global_setup_complete
  • showthread_start
  • showthread_getinfo
  • forumjump
  • showthread_post_start
  • showthread_query_postids
  • showthread_query
  • bbcode_fetch_tags
  • bbcode_create
  • showthread_postbit_create
  • postbit_factory
  • postbit_display_start
  • post_thanks_function_post_thanks_off_start
  • post_thanks_function_post_thanks_off_end
  • post_thanks_function_fetch_thanks_start
  • post_thanks_function_fetch_thanks_end
  • post_thanks_function_thanked_already_start
  • post_thanks_function_thanked_already_end
  • fetch_musername
  • bbcode_parse_start
  • bbcode_parse_complete_precache
  • bbcode_parse_complete
  • postbit_display_complete
  • post_thanks_function_can_thank_this_post_start
  • pagenav_page
  • pagenav_complete
  • tag_fetchbit_complete
  • forumrules
  • navbits
  • navbits_complete
  • showthread_complete