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)

dholt 09-19-2006 02:06 AM

/imagehosting Remove the forword slash if you added it.

Thanks dholt that worked

memomemo 09-19-2006 07:16 PM

Hello

I am web site www.forumsitesi.info/forum > CMPS portal setup = ok
But
This page index how vbimage random to show?

memomemo 09-19-2006 08:26 PM

Open Template :
adv_portal_randomprofile

clear in all and paste :

Code :


<tr>
<td class="alt2" valign="top">
<table>
<tr valign="top">


<td class="alt2" valign="top" align="center">
<img src="$profilepiclink" alt="$vbphrase[vbaCmps_randomprofile]" border="0" /></td>
</tr>
<tr valign="top">


<td class="alt2" valign="top">
<table>
<tr>
<td class="smallfont">
<div>
<img src="$stylevar[imgdir_misc]/arrow.gif" alt="" class="inlineimg" />
$vbphrase[vbaCmps_randomusername]
</div>
</td>
<td>
:
</td>
<td class="smallfont">
$randomusername
</td>
</tr>
<tr>
<td class="smallfont">
<div>
<img src="$stylevar[imgdir_misc]/arrow.gif" alt="" class="inlineimg" />
$vbphrase[vbaCmps_randomtitle]
</div>
</td>
<td>
:
</td>
<td class="smallfont">
$randomusernametitle
</td>
</tr>
<tr>
<td class="smallfont">
<div>
<img src="$stylevar[imgdir_misc]/arrow.gif" alt="" class="inlineimg" />
$vbphrase[vbaCmps_randomjoindate]
</div>
</td>
<td>
:
</td>
<td class="smallfont">
$randomusernamejoindate
</td>
</tr>
</table>
</td>
</tr>
</table>
</td>
</tr>

memomemo 09-19-2006 08:27 PM

Sorry mistake post :(

toolblast 09-19-2006 08:57 PM

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

ryuji 09-19-2006 10:12 PM

just a heads up, you use mysql_num_rows() in your script, which causes breakage when using it on a forum that uses msqli, changing every case of this command to mysqli_num_rows() fixed it on my forum... i dont know if theres a better way other then to manualy edit it tho, ill leave that to you ranma2k

edit: also you use mysql_fetch_array() which has same problem and solution

ryuji 09-19-2006 11:51 PM

i've modified the code to automatically use the correct method, attached the fixed copy, can be used on any forum since i've added in the conditional, heres a example of that i've added
PHP Code:

    if($vbulletin->config['Database']['dbtype']=='mysqli' OR $vbulletin->config['Database']['dbtype']=='mysqli_slave')
        
$usercount mysqli_num_rows($result);
    else
        
$usercount mysql_num_rows($result); 


Morrus 09-20-2006 12:02 AM

Quote:

Originally Posted by toolblast
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.

Looks good on your site. But using that as the template gives this result:

Quote:

The following error occurred when attempting to evaluate this template:

Parse error: parse error, unexpected T_PRIVATE, expecting ']' in /http/circvs/includes/adminfunctions_template.php(3593) : eval()'d code on line 7

This is likely caused by a malformed conditional statement. It is highly recommended that you fix this error before continuing, but you may continue as-is if you wish.

ryuji 09-20-2006 12:49 AM

Quote:

Originally Posted by Morrus
Looks good on your site. But using that as the template gives this result:

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="$vbulletin->GPC['do']=='myimages'">
        <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>

made a modification that makes it both better and work, only shows the urls if you click on the images or your viewing your images through 'view my images'

Morrus 09-20-2006 12:57 AM

Quote:

Originally Posted by ryuji
made a modification that makes it both better and work, only shows the urls if you click on the images or your viewing your images through 'view my images'

That worked - thanks! Although it only works if you select "Columns (new view)" and not "Rows (old view)".


All times are GMT. The time now is 08:07 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.01934 seconds
  • Memory Usage 1,801KB
  • 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
  • (2)bbcode_code_printable
  • (1)bbcode_php_printable
  • (4)bbcode_quote_printable
  • (1)footer
  • (1)gobutton
  • (1)header
  • (1)headinclude
  • (6)option
  • (1)pagenav
  • (1)pagenav_curpage
  • (4)pagenav_pagelink
  • (4)pagenav_pagelinkrel
  • (1)post_thanks_navbar_search
  • (1)printthread
  • (10)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