Go Back   vb.org Archive > vBulletin Modifications > Archive > vB.org Archives > vBulletin 3.6 > vBulletin 3.6 Add-ons
FAQ Community Calendar Today's Posts Search

Reply
 
Thread Tools
VB image Hosting Details »»
VB image Hosting
Version: 1.0.1, by Ranma2k Ranma2k is offline
Developer Last Online: Oct 2017 Show Printable Version Email this Page

Category: Major Additions - Version: 3.6.0 Rating:
Released: 08-08-2006 Last Update: 04-10-2007 Installs: 1108
DB Changes Uses Plugins Template Edits
Additional Files  
No support by the author.

VB Image Hosting Version 1.0.1

This is the port for my hack to vb 3.6.x
check it for vb 3.5.x here

A New installer replaced the old one so you should not face any problems with database

NOTE :
People who were using vbimghost in vb 3.5.x and moved to vb 3.6.0 MAKE sure that you have vbimghost 1.4.1 Since this port will only support upgrading from that ver only
People who do a fresh install use this ver.


Requirements:
  1. requires GD 2.0.1 or later (2.0.28 or later is recommended).
  2. PHP ver 4.3.x or later (newer ver is better).

Introduction:
What does it do ?
VB Image Hosting is a similar feature to imageshak and photopoket and online free image hosting, but this is for your members. it will allow them to upload and host their images on your servers, you can still manage the permissions and set the number of files for each group.
Main Features:
  • Image hosting
  • Restrict # of file upload for each group
  • Allow/disallow group from upload
  • Restrict file uploaded based on file extension, dimensions and size
  • Users can manage their uploaded files
  • Users can set the view permission for each uploaded images
  • Admin can mange all members images
  • Admin can set the number of images/users per page.
  • Admin can mange images uploaded by the members
  • Admin can set the default upload permission
  • Thumbnail system admin can turn it on/off.
  • Allow multiple uploads.
  • Admin can set upload slots for each group
  • Admin can recreate thumbnails from admin cp
  • Fully using the phrase system.
Time required to install
  • 1- 2 min max.

Update instruction :
Just replace the old files with the new ones and import the product file don't forget to select overwrite.

History:
1.0.0:
  • inital release contains everytverg in 1.4.1 ver.
1.0.1:
  • Fix security bug with delete image.
  • fix some minor mysql problems.
Download Tracking:
1.0.0 : 3886


Known Issues:
no known issues.

Screen shscreenshot.zip
screenshot.zip.


NOTE:
before you post any error here :
Set that path to your forums correctly in the vbimghost options.
if you getting the error "
"supplied argument is not a valid"
that's because you didn't set the path correctly

And for all the people asking when is the next release it will be in 2007 not this month .. due to some problems in real life ..



URGENT ISSUES:
you may contact me on msn id : waiel[at]waieleid.com
replace [at] with @ ok? -_-

Supporters / CoAuthors

Show Your Support

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

Comments
  #272  
Old 09-27-2006, 01:49 AM
Gripemaster Gripemaster is offline
 
Join Date: Oct 2005
Location: MD
Posts: 188
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

Quote:
Originally Posted by toolblast
You could do that, but the navbar link isnt actually just a single link. It is a vb dynamic dropdown menu button... so when they click 'photos' it actually brings down a menu with the options:

- my images
- upload an image
- view all user's images

So.. theres really 3 links you'd want to add in there.
Oh, OK... cool beans. Then I'll just move a link or two from the default navbar to the secondary one. It's just getting kinda cluttered. Thanks much!
Reply With Quote
  #273  
Old 09-27-2006, 04:11 AM
GrendelKhan{TSU's Avatar
GrendelKhan{TSU GrendelKhan{TSU is offline
 
Join Date: Jun 2005
Location: Boston | Seoul, S. Korea
Posts: 1,311
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

Quote:
Originally Posted by toolblast
Suggestion:
I would like there to be comments and rating added to the images when you view them in 'full view' only. This would be great!

IMPROVEMENT:
I have edited the imagebit somewhat. In the original script... all users always see that bbcode, permissions, and other stuff that for the user who owns the photos may be useful, but for other users it just seems to clutter up the photo gallery page in my opinion.

I was wanting something more like Facebook... where if they go to view their friend's gallery... it simply shows a gallery page with a bunch of thumbnails only... no details or stuff underneath. However, I didn't want to remove this stuff, so what I did was edited the template and added an extra condition so that:

1) When viewing photos, if the photos belong to the user that is logged in... they see all that extra bbcode and permission stuff underneath the photo.

2) For OTHER users viewing photos that belong to their friends... they will just see the gallery page with only the photo thumbnails listed.

3) In either case... clicking the thumbnail will open up the main view page and will have the large photo, and will have all the bbcode stuff showing.. but only when the image is viewed in the fullscreen size page.


CODE CHANGES:

OPEN template called "vbimghost_imgbits"

Delete everything in that template, and replace it with this:

Code:
<td>
    <table class="tborder" cellpadding="$stylevar[cellpadding]" cellspacing="$stylevar[cellspacing]" border="0">
    <tr>
        <td class="alt1" align="center" valign="center"><a href="$vbimghost[dispath]"><img src="$vbimghost[thumbpath]" <if condition="$vbimghost[thumbsize]!=0"> width="$vbimghost[thumbsize]"</if> border="0"></a></td>
    </tr>
 
<if condition="$vbimghost[private]!=None">
    <tr>
            <td class="alt2" align="center" valign="center">
                <table class="tborder" cellpadding="$stylevar[cellpadding]" cellspacing="$stylevar[cellspacing]" border="0">
                    <thead>
 
 
 
 
                        <tr>
                            <td class="thead" colspan="2">$vbimghost[imgname]</td>
                        </tr>
                    </thead>
                    <tbody>
                        <tr>
                            <td class="alt1">$vbphrase[vbimghost_filesize]</td>
                            <td class="alt2">$vbimghost[filesize] </td>
                        </tr>
                        <tr>
                            <td class="alt1">$vbphrase[vbimghost_imgdime]</td>
                            <td class="alt2">$vbimghost[width] x $vbimghost[height] </td>
                        </tr>
                        <tr>
                            <td class="alt1">$vbphrase[vbimghost_update]</td>
                            <td class="alt2">$vbimghost[date] </td>
                        </tr>
                        <tr>
                            <td class="alt1">$vbphrase[vbimghost_imgdlink]</td>
                            <td class="alt2"><input type="text" value="[img]$vbimghost[path][/img]"></td>
                        </tr>
                        <tr>
                            <td class="alt1">$vbphrase[vbimghost_imgflink]</td>
                            <td class="alt2"><input type="text" value=""></td>
                        </tr>
                        <tr>
                            <td class="alt1">$vbphrase[vbimghost_imglink]</td>
                            <td class="alt2"><input type="text" value="<a href='$vbimghost[dispath]' border=0><img src='$vbimghost[thumbpath]'></a>"></td>
                        </tr>
                        <tr>
                            <td class="alt1">$vbphrase[vbimghost_perm] </td>
                            <td class="alt2">$vbimghost[private]</td>
                        </tr>
                    </tbody>
 
                </table>
            </td>
    </tr></if>
    </table>
</td>

VIEW THIS IN ACTION: http://www.undrgrads.com/vbimghost.p...iewimages&id=3
aweseome!!! I love this improvement. should be standard admincp option, imo
Reply With Quote
  #274  
Old 09-27-2006, 04:13 AM
toolblast's Avatar
toolblast toolblast is offline
 
Join Date: Mar 2004
Posts: 266
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

Your welcome Grendel! Glad you like it
Reply With Quote
  #275  
Old 09-27-2006, 04:25 AM
GrendelKhan{TSU's Avatar
GrendelKhan{TSU GrendelKhan{TSU is offline
 
Join Date: Jun 2005
Location: Boston | Seoul, S. Korea
Posts: 1,311
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

Quote:
Originally Posted by GrendelKhan{TSU
feature request:

I would be all over this if it had:

** an image link for clickable thumbnails in a thread (unless that is possible and I just didn't see it posted).

-img linking a giant image always breaks my forum borders. grrr.
-anyone got a thumbnail link solution mod for this hack?

I know vbadvanced has a hack for that.

feature request:

+ An image link for clickable thumbnails in a thread +
(ie: so you can post the THUMBNAIL of an image not the full orginal image. then some can click that to see the full image or go to that users detailed info page of that image )


would anyone else be interested in that?
Reply With Quote
  #276  
Old 09-27-2006, 04:43 AM
Ronak's Avatar
Ronak Ronak is offline
 
Join Date: Sep 2006
Posts: 109
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

thanks added 5 starz for this
Reply With Quote
  #277  
Old 09-27-2006, 04:55 AM
GrendelKhan{TSU's Avatar
GrendelKhan{TSU GrendelKhan{TSU is offline
 
Join Date: Jun 2005
Location: Boston | Seoul, S. Korea
Posts: 1,311
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

Quote:
Originally Posted by toolblast
Your welcome Grendel! Glad you like it
hey tool...
do you know how to make so you have 5 thumbnails images to appear...
but I want the actual display page to only display 3 or whatever. ie: make it conditional.
Reply With Quote
  #278  
Old 09-27-2006, 07:05 AM
GrendelKhan{TSU's Avatar
GrendelKhan{TSU GrendelKhan{TSU is offline
 
Join Date: Jun 2005
Location: Boston | Seoul, S. Korea
Posts: 1,311
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

hmm..tool. was testing it and registered users still see all the details..
is that correct?

how do you change it so registered users only see the thumbnails?
Reply With Quote
  #279  
Old 09-27-2006, 09:20 AM
Ranma2k Ranma2k is offline
 
Join Date: Dec 2001
Location: Earth
Posts: 586
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

Quote:
Originally Posted by transitbus
That is exactly what I am trying to do but I get nothing, the module does not even show up.

as per my orignal post, I compiled the different suggestions and this is what i came up with

https://vborg.vbsupport.ru/showpost....&postcount=246

If I can get this to work, I'll work on limiting it to one random picture.

What I would love to have is a module for CMPS that pulls a random pic and shows it for a certain amount of time. So in a way what i want is a random picture of the day that pulls from this addon
Here you go
create a file with the following code:
Code:
<?
$rec = $vbulletin->db->query_read("
        SELECT imgid,imgfile,thumbname,imgwidth,imgheight,imgdate
        FROM ".TABLE_PREFIX."vbimghost
        WHERE imgprivate='0'
        order by imgdate DESC
        LIMIT 5
        "); 

$count = $db->num_rows($rec);

$rec2 = $vbulletin->db->query_read("
        SELECT count(*) mark
        FROM ".TABLE_PREFIX."vbimghost
        WHERE userid='$userinfo[userid]' and imgprivate='0'
        "); 
$row2 = $vbulletin->db->fetch_array($rec2);
if ($count){
	while ($row = $vbulletin->db->fetch_array($rec)) {
		$vbimghost['id']=$row['imgid'];
		$vbimghost['path']=$vbulletin->options['bburl']."/".$vbulletin->options['imgdir']."/".$row['imgfile'];
		$vbimghost['dispath']=$vbulletin->options['bburl']."/vbimghost.php?do=displayimg&imgid=".$row['imgid'];
		$vbimghost['width']=$row['imgwidth'];
		$vbimghost['height']=$row['imgheight'];
		$vbimghost['date']=date('Y-m-d', $row['imgdate']);
		if (file_exists($vbulletin->options['imgdir']."/".$row['thumbname'])){
			$vbimghost['thumbpath']=$vbulletin->options['bburl']."/".$vbulletin->options['imgdir']."/".$row['thumbname'];
			$vbimghost['thumbsize']=0;
		}else{ 
			$vbimghost['thumbpath']=$vbimghost['path'];
			if ($row['imgwidth'] <= $vbulletin->options['imgthumw'])
				$vbimghost['thumbsize']=$row['imgwidth'];
			else 
				$vbimghost['thumbsize']=$vbimghost['imgthumw'];
		}
			eval('$mimghost .= "'.fetch_template('vbimghost_memberbit') . '";');
			 $vbimghost['more'] = "<a href='vbimghost.php?do=viewimages&id=$userinfo[userid]'>" .construct_phrase($vbphrase['vbimghost_viewmore'],$row2['mark'])."</a>";
	 } 
}else{
		$vbimghost['more'] = "";
		eval('$mimghost ="'.fetch_template('vbimghost_memberbit_noimg') . '";');
}

$vbimghost['last5'] = $mimghost;

eval('$home["$mods[modid]"][\'content\'] = "' . fetch_template('adv_portal_vbimghost_module') . '";');
?>

Name the file (last5.php) and save it int he module folder

Now create a template with the following name ( adv_portal_vbimghost_module )
and put this code in it

Code:
<tr>
<td>
<table class="tborder" align="center" border="0" cellpadding="6" cellspacing="1" width="100%">
<tbody>
	<tr align="center">
		$vbimghost[last5]
	</tr>
</tbody>
</table>
</td>
</tr>

Now go to vbadvanced and chose Add Module --> select PHP FILE

in there set the following :

Module Title : Last 5 images uploaded
Column : center
Active : yes
Update All Pages: yes ( if you want it to be displayed on all pages )
File to include : last5.php
Templates Used : adv_portal_vbimghost_module
Clean File Output: no
Use Module Shell Template: yes


and it should work with you
Reply With Quote
  #280  
Old 09-27-2006, 03:08 PM
transitbus transitbus is offline
 
Join Date: Aug 2006
Location: California
Posts: 97
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

Works great! Thanks for taking the time to clean this up and make it work

For anyone else who wants to try it out, you can limit the amount of pictures by changing the value of "LIMIT 5" to a smaller number. Also you may want to chage the size of your thumbnails and rebuild them. I halved the size of the default thumbnail values and it worked great.

A Demo can be seen on my homepage

Demo
Reply With Quote
  #281  
Old 09-27-2006, 05:04 PM
toolblast's Avatar
toolblast toolblast is offline
 
Join Date: Mar 2004
Posts: 266
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

Quote:
Originally Posted by GrendelKhan{TSU
hmm..tool. was testing it and registered users still see all the details..
is that correct?

how do you change it so registered users only see the thumbnails?
Registered users, guests, it doesnt matter... nobody should see those details on the photo thumbnails page UNLESS the pictures BELONG to them.

So... try uploading some photos in "johns" account.. and then login as user "mark", go and view "johns" photos while you're logged in as "mark" and you should see only thumbnails.. no details below.

If you still see details... you haven't done the mod properly and need to refollow those steps I posted.


@transitbus
Ya, making the thumbnails 50% smaller works like a charm... they fit nicely.
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 10:48 PM.


Powered by vBulletin® Version 3.8.12 by vBS
Copyright ©2000 - 2024, vBulletin Solutions Inc.
X vBulletin 3.8.12 by vBS Debug Information
  • Page Generation 0.04898 seconds
  • Memory Usage 2,345KB
  • Queries Executed 26 (?)
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
  • (3)bbcode_code
  • (6)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
  • (4)pagenav_pagelinkrel
  • (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_onlinestatus
  • (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
  • postbit_imicons
  • 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