vb.org Archive

vb.org Archive (https://vborg.vbsupport.ru/index.php)
-   vBulletin 3.6 Add-ons (https://vborg.vbsupport.ru/forumdisplay.php?f=194)
-   -   Major Additions - VB image Hosting (https://vborg.vbsupport.ru/showthread.php?t=123481)

|oR|Greg 09-21-2006 07:28 PM

Quote:

Originally Posted by dholt
I can seem to find were it changes it to i must have changed everything in that nav code

Languages & Phrases => Search in Phrases

Search for text: vbimghost_title
Search in ... : Phrase Variable Name Only

Once it comes up, EDIT it to say what you want.

turfy 09-21-2006 08:05 PM

Hello,

How to set photo "public" by default and not "private".

Thanks.

juan71287 09-22-2006 12:27 AM

Id tell you.. LOVE THIS F************** HACK!

ryuji 09-22-2006 03:33 PM

i might play with the code a bit, but by request would be to set it up so the number of rows/columns is dependant on screen resolution and not a static variable, it should be simple enough, run some javascript to get the browsers size, offset by x pixels and then have it pass the number of rows/columns to the url in the menu bar

Gizmo5h1t3 09-22-2006 06:56 PM

is there any way it can be adapted to show random images on the forumhome?

like vbgallery?

they have a "5 random image" add on....

transitbus 09-22-2006 06:56 PM

Ok here is what I did to try and get random pictures to show for my CMPS homepage:

Copied out the following code from vbimghost_last5forumhome-plugins.xml:

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
        ");

$vbimghost['count'] = $db->num_rows($rec);


if ($vbimghost['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') . '";');
        }
}else{
                $vbimghost['more'] = "";
                eval('$mimghost ="'.fetch_template('vbimghost_memberbit_noimg') . '";');
}

$vbimghost['last5'] = $mimghost;

I then added pphp tags to enclose it:

Quote:

<?php and ?>
I then saved it as vbimagehostpics.php and placed it in my modules folder.

Then I made a template and called it vbimage

Code:

<tr>
<td>
<table class="tborder" align="center" border="0" cellpadding="6" cellspacing="1" width="100%">
<thead>
<tr>
<td class="tcat" colspan='$vbimghost[count]' align="center">$vbphrase[vbimghost_last5img] </td>
</tr>
</thead>
<tbody>
        <tr align="center">
                $vbimghost[last5]
        </tr>
</tbody>
</table>
</td>
</tr>

I then went back and added a modulee as a php file

Module Title: Random Pix
Column: Center
Display Order: 2
Active: Yes
Update All Pages: Yes
File to Include: vbimagehostpics.php
Identifier: blank
Template used: adv_portal_vbimage
Use Module Shell Template: No

everything saved ok but nothing shows on the main page. What am I doing wrong?!?

Ranma2k 09-22-2006 07:22 PM

thx for sharing it with others :)

Ranma2k 09-22-2006 07:23 PM

Quote:

Originally Posted by turfy
Hello,

How to set photo "public" by default and not "private".

Thanks.

from the vbimghost options

transitbus 09-22-2006 08:42 PM

Quote:

Originally Posted by Ranma2k
thx for sharing it with others :)

But it doesn't work!!!

goorgoor 09-24-2006 08:04 AM

why do i get this error?

Warning: imagecreatefromjpeg() [function.imagecreatefromjpeg]: Unable to access /home/user/public_html/forum/imagehosting/1451647e8642a6.jpg in /includes/vbimghost_include.php on line 175

Warning: imagecreatefromjpeg(/home/user/public_html/forum/imagehosting/1451647e8642a6.jpg) [function.imagecreatefromjpeg]: failed to open stream: No such file or directory in /includes/vbimghost_include.php on line 175

Warning: imagesx(): supplied argument is not a valid Image resource in /includes/vbimghost_include.php on line 176

Warning: imagesy(): supplied argument is not a valid Image resource in /includes/vbimghost_include.php on line 176

Warning: imagecreatetruecolor() [function.imagecreatetruecolor]: Invalid image dimensions in /includes/vbimghost_include.php on line 176

Warning: imagesx(): supplied argument is not a valid Image resource in /includes/vbimghost_include.php on line 177

Warning: imagesy(): supplied argument is not a valid Image resource in /includes/vbimghost_include.php on line 177

Warning: imagecopy(): supplied argument is not a valid Image resource in /includes/vbimghost_include.php on line 177

Warning: imagecolorallocate(): supplied argument is not a valid Image resource in /includes/vbimghost_include.php on line 189

Warning: imagesx(): supplied argument is not a valid Image resource in /includes/vbimghost_include.php on line 198

Warning: imagesy(): supplied argument is not a valid Image resource in /includes/vbimghost_include.php on line 199

Warning: imagestring(): supplied argument is not a valid Image resource in /includes/vbimghost_include.php on line 201

Warning: imagejpeg(): supplied argument is not a valid Image resource in /includes/vbimghost_include.php on line 209

Warning: imagedestroy(): supplied argument is not a valid Image resource in /includes/vbimghost_include.php on line 210

ThomasR 09-24-2006 04:21 PM

Is it possible to have the hosting of the files on an external server ? My forum is running on two servers, and I would like to have these files on the second one, for storage purposes :)

ryuji 09-24-2006 11:02 PM

ranma2k said he was doing that for the next version

ThomasR 09-25-2006 04:59 AM

Ok, great! Thanks for the information Ryuji !

aGa 09-25-2006 02:06 PM

very goodddd thank you renma2k ;)

goorgoor 09-25-2006 06:17 PM

no one can help me here??? come on...

GrendelKhan{TSU 09-26-2006 05:11 AM

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.

z3us 09-26-2006 06:06 AM

Man i need help to change the navbar name from VB Image Hosting to something shorter. Im lost in this part and i have read everyting? please help. All i see is something about the vbimghost_title. Where do i find this to change if that is right?

Ronak 09-26-2006 07:06 AM

cud we have Watermarking in this ;)

Ranma2k 09-26-2006 11:02 AM

Quote:

Originally Posted by goorgoor
no one can help me here??? come on...

Easy you didn't set the path .. .
Please set the path in your vbimghost options

Ranma2k 09-26-2006 11:03 AM

Quote:

Originally Posted by z3us
Man i need help to change the navbar name from VB Image Hosting to something shorter. Im lost in this part and i have read everyting? please help. All i see is something about the vbimghost_title. Where do i find this to change if that is right?

go to language and phrases and change it from there

Ranma2k 09-26-2006 11:03 AM

Quote:

Originally Posted by Ronak
cud we have Watermarking in this ;)

there is already a watermark ..
check the options

opteek 09-26-2006 04:33 PM

This is a wonderful mod! Everything works great. I have one question though. I run a private forum and would like my members to be able to post links to the images outside of this forum without revealing the actual url of the forum itself. So.. for the HTML Code that is displayed in the text field for users to cut and paste, I am trying to get

http://imagehosting.mydomain.net/abc992.gif

instead of

http://www.mydomain.net/forumdir/ima...ing/abc992.gif

And then I create a subdomain imagehosting.mydomain.net that points to www.mydomain.net/forumdir/imagehosting/ , see what I mean?

But I cannot figure out how to change that. I've tried modifying the xml file and changing the path and dispath variabes, but it just doesn't seem to be working. I still get the latter display instead of the former.

fly 09-26-2006 04:43 PM

Is there any easy way to make this run from a separate database? It obviously can make a DB quite large. When I backup the DB, I don't really care about the images...

fly 09-26-2006 04:55 PM

Quote:

Originally Posted by opteek
This is a wonderful mod! Everything works great. I have one question though. I run a private forum and would like my members to be able to post links to the images outside of this forum without revealing the actual url of the forum itself. So.. for the HTML Code that is displayed in the text field for users to cut and paste, I am trying to get

http://imagehosting.mydomain.net/abc992.gif

instead of

http://www.mydomain.net/forumdir/ima...ing/abc992.gif

And then I create a subdomain imagehosting.mydomain.net that points to www.mydomain.net/forumdir/imagehosting/ , see what I mean?

But I cannot figure out how to change that. I've tried modifying the xml file and changing the path and dispath variabes, but it just doesn't seem to be working. I still get the latter display instead of the former.

Im no genius at this stuff, but I think the line youre looking for is this one:
PHP Code:

$vbimghost['path']=$vbulletin->options['bburl']."/".$vbulletin->options['imgdir']."/".$row['imgfile']; 

in the vbimghost.php file.

transitbus 09-26-2006 05:36 PM

I ma still trying to get a random picture module to work with CMPS. any idea why nothing shows up?

fly 09-26-2006 05:43 PM

Quote:

Originally Posted by transitbus
I ma still trying to get a random picture module to work with CMPS. any idea why nothing shows up?

Why not just have SQL select a random row from the vbimage table?

transitbus 09-26-2006 05:54 PM

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

toolblast 09-26-2006 09:19 PM

1. Users can create 'albums' or folders within their gallery to organize their photos, instead of them all being in the same clump

2. Comments on individual photos, so when they open the photo in full view there is a comment box below it for users to add comments (shows the user's avatar and their comment). The photo gallery owner can delete comments, approve comments, get emailed when there are new comments.

3. The ability to have galleries that multiple users can upload into, like 'club photo galleries'. Multiple users can upload into a 'collection', and then that collection can have a password protection put on it so that clubs/groups get their own club photo gallery, can make albums for each of their events, and password protect it so only their members know how to get in.

Gripemaster 09-27-2006 01:16 AM

Question...

Getting ready to install this mod on 3.6.1, and my members are really wanting this feature.

My question is simple... my navbar is getting pretty full. I have the "Menu Control" mod installed, where I can add links to a second navbar. So if I link the image hosting page from the second navbar, I just need to skip the navbar template modification part of the install, correct? And link to the imagehosting.php?

Looking forward to this...

toolblast 09-27-2006 01:40 AM

Quote:

Originally Posted by Gripemaster
Question...

Getting ready to install this mod on 3.6.1, and my members are really wanting this feature.

My question is simple... my navbar is getting pretty full. I have the "Menu Control" mod installed, where I can add links to a second navbar. So if I link the image hosting page from the second navbar, I just need to skip the navbar template modification part of the install, correct? And link to the imagehosting.php?

Looking forward to this...

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.

Gripemaster 09-27-2006 01:49 AM

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! :)

GrendelKhan{TSU 09-27-2006 04:11 AM

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="https://vborg.vbsupport.ru/"></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 :D

toolblast 09-27-2006 04:13 AM

Your welcome Grendel! Glad you like it :)

GrendelKhan{TSU 09-27-2006 04:25 AM

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?

Ronak 09-27-2006 04:43 AM

thanks :D added 5 starz for this ;)

GrendelKhan{TSU 09-27-2006 04:55 AM

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.

GrendelKhan{TSU 09-27-2006 07:05 AM

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?

Ranma2k 09-27-2006 09:20 AM

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 :)

transitbus 09-27-2006 03:08 PM

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

toolblast 09-27-2006 05:04 PM

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.


All times are GMT. The time now is 02:15 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.02696 seconds
  • Memory Usage 1,907KB
  • 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
  • (5)bbcode_code_printable
  • (1)bbcode_php_printable
  • (16)bbcode_quote_printable
  • (1)footer
  • (1)gobutton
  • (1)header
  • (1)headinclude
  • (6)option
  • (1)pagenav
  • (1)pagenav_curpage
  • (4)pagenav_pagelink
  • (1)pagenav_pagelinkrel
  • (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