vb.org Archive

vb.org Archive (https://vborg.vbsupport.ru/index.php)
-   vBulletin 2.x Full Releases (https://vborg.vbsupport.ru/forumdisplay.php?f=4)
-   -   Image Gallery v1.0 (https://vborg.vbsupport.ru/showthread.php?t=21602)

06-29-2001 10:00 PM

Instructions in the ZIP file (gallery.txt). Should explain most details of installation. I haven't done an INSTALL from scratch, so you get to beta test that part of the program.

The gallery itself seems quite stable. I added some load limiting/checking options before releasing as well. Let me know how your installs go, features you'd like to see, etc.

If you want to see an example:

http://www.noows.com/gallery.php?s=&forumid=88

Zamtil 06-30-2001 03:38 AM

Hadn't really explored the differences between JPG and GIF. I figured the files were so small, that file size wouldn't be much difference.. boy was I wrong. This is an updated copy that uses JPEG compression instead of GIF. If you've already install this hack, just replace the files, use a SQL tool to "DELETE FROM thumb" and rerun admin/gallerymakethumbs.php.

In the future I may make thumbnail type a config option, but when I saw 20k thumbnails go to 3-5k, I decided quality was a mute point.

The main change is this line in functions.php:

PHP Code:

system("$galleryconvert -geometry '160x120>' $path GIF:$thumbname"); 

to

PHP Code:

system("$galleryconvert -geometry '160x120>' $path -quality '75' JPEG:$thumbname"); 


eva2000 06-30-2001 03:41 AM

just another thing, what font and settings did you use for the gallery button ? mind attaching the psd file for it too :D

Znaper 06-30-2001 03:42 AM

you forgot the thumb.php in the zip file! ;)

Zamtil 06-30-2001 03:45 AM

Quote:

Originally posted by eva2000
just another thing, what font and settings did you use for the gallery button ? mind attaching the psd file for it too :D
It's the exact buttons from the vBulletin 2.0 graphics development kit. I just edited one of the top_ templates and the find template. Changed the word to gallery. Actually, I didn't even save the Photoshop version, just the exported GIFs.

Zamtil 06-30-2001 03:48 AM

Quote:

Originally posted by Znaper
you forgot the thumb.php in the zip file! ;)
Yep, you're right. The ZIP is now: JPEG thumbnails + thumb.php. About 8 people got ahold of the original GIF version, I'd suggest switching to this.

Zamtil 06-30-2001 03:52 PM

Would like to see it on someone else's site, post URL please.

mojotim 06-30-2001 05:24 PM

Hey, great hack, but I'm having problems.

Parse error: parse error in /usr/local/xxxxxx/httpdocs/admin/galleryinstall.php on line 17

Looks ok to me, but I keep getting this.
Using, Apache, RedHat Linux 7

-Tim

Zamtil 06-30-2001 05:48 PM

Quote:

Originally posted by mojotim
Hey, great hack, but I'm having problems.

Parse error: parse error in /usr/local/xxxxxx/httpdocs/admin/galleryinstall.php on line 17

Looks ok to me, but I keep getting this.
Using, Apache, RedHat Linux 7

-Tim

Change line 17 to this:

PHP Code:

$DB_site->query("INSERT INTO setting VALUES (NULL,$groupid,'Pages to show in nav bar','gallerynavpages','5','','',1)"); 

Looks like there's an extra ") at the end of the line in the released file.

mojotim 06-30-2001 05:56 PM

Got a new one:

Warning: Division by zero in /usr/xxxxx/httpdocs/gallery.php on line 108

Should there be an "@" somewhere in there?

mojotim 06-30-2001 06:06 PM

I had the Gallery Load Limit
set to the default. I erased the value and the error does not come up now.

mojotim 06-30-2001 06:19 PM

Check out this attachement and tell me if something should be in the filedata, value box.

I also go to the /gallery.php and see no attachments. I see nothing but the blank template.

mojotim 06-30-2001 06:29 PM

Here is the entire substance of my gallery.php page.

Zamtil 06-30-2001 07:31 PM

Have you run yourforums.com/admin/gallerymakethumbs.php? It should spit out a list of file names for all the JPG/BMP/GIFs it finds in your existing attachment table.

mojotim 06-30-2001 08:02 PM

I had to modify it a little:

makeThumb($thumb[attachmentid], $thumb[filename], $filename);
unlink($filename);
set_time_limit();
}
?>

notice the change of set_time_limit();

I'm using safe mode php so it didn't like that.

Anyhoo, I get a blank page. I have attachments, I even (just now) posted a new attachment and ran gallerymakethumbs.php.
Still the blank page.

First-Man 06-30-2001 08:10 PM

Please Update the *.zip File!
thx

mojotim 06-30-2001 08:11 PM

It created the table. Then I ran gallerymakethumbs and got this:

Processing attachment #11: woodchips.jpg.
Processing attachment #12: admin.gif.
Processing attachment #13: 411people2.gif.
Processing attachment #14: easton2.jpg.

So that's good I guess.

Still nothing in gallery.php
Still no filedata value.

I have ImageMagick, I can convert from telnet so I know it's installed correctly. What's up, Please?

Zamtil 06-30-2001 08:16 PM

Quote:

Originally posted by mojotim
I had to modify it a little:

I'm using safe mode php so it didn't like that.


I think safe mode is your other problem as well:

safe_mode_exec_dir string

If PHP is used in safe mode, system() and the other functions executing system programs refuse to start programs that are not in this directory.

From what I saw in your database screenshot, the filedata field was blank. I'm guessing the inserts are failing. Hopefully you have rights to update your PHP.INI and add the above statement. Probably the safest thing to do is to make a copy of convert in your existing safe mode directory... pointing it at a shared bin directory kind of defeats the purpose.

You may want to remove the line:

PHP Code:

        unlink($thumbname); 

From makeThumb in functions.php. If thumbnails are being created, you should have a bunch of /tmpPath/th_[RandomStuff] files. You're also gonna need to clear out your 'thumb' table once those th_ files start appearing.

Obviously I didn't test in safe mode. =)

Znaper 06-30-2001 09:01 PM

The pics dosn't display!

See here: http://www.znapers-board.de/forum/gallery.php

mojotim 06-30-2001 09:10 PM

Telnet in and go to a directory where you have some images.

Then type this:

convert -geometry 120x120 filename.jpg new_filename.jpg

this will create a thumg 120x120 of filename.jpg

if you can do this than cool, your problem lies elsewhere and I can't help you because I'm too stupid to get this to work too (different problems)

Znaper 06-30-2001 09:12 PM

i haven't telnet access thats my problem!

Zamtil 06-30-2001 10:56 PM

Quote:

Originally posted by Znaper
i haven't telnet access thats my problem!
Well, you need to find out if ImageMagick is installed, and if so, where the location of convert is. This is an external utility, that is currently 100% required. http://www.imagemagick.org for more information.

Sarge 07-01-2001 06:22 AM

I installed it,
created the thumbs

And the next step wuld be this

http://www.dlrarmy.com/forums/gallery.php


Warning: Division by zero in /home/dlrarmy/public_html/forums/gallery.php on line 108


And it doesn't show... yes I have ImageMagic and it is pointing to the right place
What am I doing wrong?
chris
aol im sgtsling

msn
Sgtsling

Sarge 07-01-2001 06:27 AM

where do I set the options at?
When I ran instll it said done.. that is it.

I am not runnin safe mode
This stinks
Chris

Zamtil 07-01-2001 06:30 AM

Quote:

Originally posted by Sarge
where do I set the options at?
When I ran instll it said done.. that is it.

I am not runnin safe mode
This stinks
Chris

In the normal vBulletin control panel, should at/near the bottom of your normal main options. Post your values please, I'd like to try to figure out why this div0 error is occuring.

Zamtil 07-01-2001 06:54 AM

Here's a picture of the Image Gallery control panel with my settings. The only way I've duplicated the Div0 error is by having no values set.

I've fixed gallery.php to assign default values and do a few error checks. The new ZIP is attached to my 2nd post in this thread. Until I see some working installs, I'm not gonna hassle with versioning this.

Sarge 07-01-2001 07:00 AM

<a href="http://www.dlrarmy.com/forums/gallery.php" target="_blank">http://www.dlrarmy.com/forums/gallery.php</a>

IT just doesnt display the pics

Yes I used your settings and i do have imagemagic

Chris

mojotim 07-01-2001 12:52 PM

Here is the image, still does not work, but I have not made the suggested changes yet. I will let you know how it goes.

mojotim 07-01-2001 01:01 PM

Still same thing, no pics. By turning off Safe mode, I have gotten my other gallery script working (not connected to MySQL or vB at all) which uses ImageMagick, so I know it works and that the location is correct.

What is up with this line:



Find function acceptupload() (Line 1277):
Find (Line 1347):
$attachmentid=$DB_site->insert_id();
Change to:
$attachmentid=$DB_site->insert_id();

How come it says nothing after that? Mistake? Should we be doing something at line 1277?

VirtueTech 07-01-2001 01:38 PM

Question: Since this gallery of images is being used on the forums which uses the PHP GZIP compression agent....if the admin has it set of course....does the PHP GZIP compress the images as well?

eva2000 07-01-2001 01:47 PM

Quote:

Originally posted by VirtueTech
Question: Since this gallery of images is being used on the forums which uses the PHP GZIP compression agent....if the admin has it set of course....does the PHP GZIP compress the images as well?
nope.. gzip and mod_gzip only compress txt

Zamtil 07-01-2001 02:41 PM

Quote:

Originally posted by mojotim
Still same thing, no pics. By turning off Safe mode, I have gotten my other gallery script working (not connected to MySQL or vB at all) which uses ImageMagick, so I know it works and that the location is correct.

What is up with this line:



Find function acceptupload() (Line 1277):
Find (Line 1347):
$attachmentid=$DB_site->insert_id();
Change to:
$attachmentid=$DB_site->insert_id();

How come it says nothing after that? Mistake? Should we be doing something at line 1277?


Er, that block of code reads as:

Find function acceptupload() (Line 1277):
Find (Line 1347):
$attachmentid=$DB_site->insert_id();
Change to:
$attachmentid=$DB_site->insert_id();
makeThumb($attachmentid, $attachment_name, $path);

The first find function is just to get you in the correct block of code.

Zamtil 07-01-2001 03:33 PM

For mojotim and others having problems. Just put this in your forums directory, along with gallery.php. Point your web browser at it or give me a URL. Just does a bunch of debug prints of script variables to help me track down where things are going wrong.

VirtueTech 07-01-2001 04:24 PM

eva2000 - I tried using mod_gzip as per its instructions to gzp the images on my site...it didn't work....sometimes the images would load up broken....so there is a way but I'm not sure about PHP's gzip

VirtueTech 07-01-2001 04:55 PM

Does this Image Gallery hack give me the ability to decide what usergroups have the right to view the gallery(s)?

Zamtil 07-01-2001 05:22 PM

Quote:

Originally posted by VirtueTech
Does this Image Gallery hack give me the ability to decide what usergroups have the right to view the gallery(s)?
If they can view the forum, they can view the gallery for the forum. I suppose what you're looking for is a way to prevent anonymous users from viewing the gallery. It's a good idea for the future.

Znaper 07-01-2001 05:28 PM

here the link:

http://www.znapers-board.de/forum/gallerydebug.php

please help! thx!

mojotim 07-01-2001 05:32 PM

here is an image, I am using your templates.

Zamtil 07-01-2001 06:24 PM

Finally found a real problem, and it was a stupid one. I didn't escape my PHP variables in the install file, so they were interpreted as Null values and leaving blank spots in the templates.

Attached is a new galleryinstall.php, put it in your admin directory and run it. It will update the templates.

I'll update the zip file after I eat dinner and mojotim confirms this works.

First-Man 07-01-2001 07:05 PM

Can you post one *.zip File when it will be work?
thx


All times are GMT. The time now is 04:55 AM.

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.01407 seconds
  • Memory Usage 1,827KB
  • Queries Executed 10 (?)
More Information
Template Usage:
  • (1)ad_footer_end
  • (1)ad_footer_start
  • (1)ad_header_end
  • (1)ad_header_logo
  • (1)ad_navbar_below
  • (4)bbcode_php_printable
  • (9)bbcode_quote_printable
  • (1)footer
  • (1)gobutton
  • (1)header
  • (1)headinclude
  • (6)option
  • (1)pagenav
  • (1)pagenav_curpage
  • (2)pagenav_pagelink
  • (1)post_thanks_navbar_search
  • (1)printthread
  • (40)printthreadbit
  • (1)spacer_close
  • (1)spacer_open 

Phrase Groups Available:
  • global
  • postbit
  • showthread
Included Files:
  • ./printthread.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/class_bbcode_alt.php
  • ./includes/class_bbcode.php
  • ./includes/functions_bigthree.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
  • printthread_start
  • pagenav_page
  • pagenav_complete
  • bbcode_fetch_tags
  • bbcode_create
  • bbcode_parse_start
  • bbcode_parse_complete_precache
  • bbcode_parse_complete
  • printthread_post
  • printthread_complete