vb.org Archive

vb.org Archive (https://vborg.vbsupport.ru/index.php)
-   vBulletin 3.0 Full Releases (https://vborg.vbsupport.ru/forumdisplay.php?f=33)
-   -   vBGarage v3.1.1 (now with GD-Lib support!) (https://vborg.vbsupport.ru/showthread.php?t=63681)

cinq 12-09-2004 12:41 AM

Grant, these may help :

http://underscorebleach.net/content/...ent_hotlinking
http://www.devpapers.com/article/242

Goggle should turn up lots of results on this search : "prevent hotlinking using htaccess"
Good luck :)

Grant Sherwood 12-09-2004 12:59 AM

I guess im not understanding this. How can i just turn off hot linking in the folder these images will be uploaded too? Sorry im not computer smart..lol :ninja:

alkatraz 12-09-2004 11:53 PM

my members are uploading massive pics which is ok by me, but the popup window is not resizable/scrollable and you can only see 1/4 of the pic when it's popup'd up.

Any fix for this?

GoTTi 12-10-2004 01:29 AM

is there a way to put a link into a users profile to link to their gallery?

its prolly real easy to do im just doing it wrong.

GoTTi 12-10-2004 01:30 AM

hey alkatraz i get that same problem sometimes...and some days the scroll bars load...i dont get it...

cinq 12-10-2004 02:18 AM

Quote:

Originally Posted by Silverstangs
I have a request, could someone come up with alittle icon that sits under the user avatar, that when clicked, will take them to that user's garage? Just like the AIM icon or online icon.

In response to this :


In /includes/functions_showthread.php
FIND:
Code:

// ###################### Start process_highlight_postbit #######################
function process_highlight_postbit($text, $words, $prepend)

ADD ABOVE:
Code:

###################### FOR GARAGE ICON #######################
function fetch_garageicon($userid)
{
        global $DB_site, $garagecache;
    if (!is_array($garagecache))
      {
      $garagecache = array();
      $garage = $DB_site->query
                ("
        SELECT gu.userid, user.userid
        FROM " . TABLE_PREFIX ."vbgarage_users AS gu
        LEFT JOIN " . TABLE_PREFIX ."user AS user ON gu.userid = user.userid
        ");

        while($garagequeryarray = $DB_site->fetch_array($garagequery))
        {
          $garagecache["$garagequeryarray[userid]"] = $garagequeryarray;
        }

              $DB_site->free_result($garagequery);
          }

        if($garageinfo = $garagecache[$userid])
          {
          if ($garageinfo[userid])
                  {
                return "$stylevar[imgdir_misc]/viewgarage.gif";
                        }
          }
          return FALSE;
      }
###################### FOR GARAGE ICON #######################

SAVE AND UPLOAD THE FILE

In showthread.php in the root directory of your forums.
FIND:
Code:

$post['attachments'] = &$postattach["$post[postid]"];
ADD BELOW:
Code:

###################### FOR GARAGE ICON #######################
$post['garage'] = fetch_garageicon($post[userid]);
###################### FOR GARAGE ICON #######################

SAVE AND UPLOAD THE FILE


Now in your postbit template ( or postbit_legacy, whichever you are using )
Just add this whereever you want the icon image to show:
Code:

<if condition="$post[garage]">
<br><div><a href="$vboptions[bburl]/vbgarage.php?do=list&userid=$post[userid]" target="_blank">$post[garage]</a>
<br /></div></if>

Lastly, upload your image into your forum images directory, in the MISC folder.

NOT TESTED but it should work. Do feedback for any errors and I will amend the errors accordingly. Would be good if this post can be linked in the hack post under the modifications/addons bit.

Hope this helps :)

Silverstangs 12-10-2004 05:06 AM

Quote:

Originally Posted by cinq
In response to this :


In /includes/functions_showthread.php
FIND:
Code:

// ###################### Start process_highlight_postbit #######################
function process_highlight_postbit($text, $words, $prepend)

ADD ABOVE:
Code:

###################### FOR GARAGE ICON #######################
function fetch_garageicon($userid)
{
        global $DB_site, $garagecache;
    if (!is_array($garagecache))
      {
      $garagecache = array();
      $garage = $DB_site->query
                ("
        SELECT gu.userid, user.userid
        FROM " . TABLE_PREFIX ."vbgarage_users AS gu
        LEFT JOIN " . TABLE_PREFIX ."user AS user ON gu.userid = user.userid
        ");

        while($garagequeryarray = $DB_site->fetch_array($garagequery))
        {
          $garagecache["$garagequeryarray[userid]"] = $garagequeryarray;
        }

              $DB_site->free_result($garagequery);
          }

        if($garageinfo = $garagecache[$userid])
          {
          if ($garageinfo[userid])
                  {
                return "$stylevar[imgdir_misc]/viewgarage.gif" border=\"0\">";
                        }
          }
          return FALSE;
      }
###################### FOR GARAGE ICON #######################

SAVE AND UPLOAD THE FILE

In showthread.php in the root directory of your forums.
FIND:
Code:

$post['attachments'] = &$postattach["$post[postid]"];
ADD BELOW:
Code:

###################### FOR GARAGE ICON #######################
$post['garage'] = fetch_garageicon($post[userid]);
###################### FOR GARAGE ICON #######################

SAVE AND UPLOAD THE FILE


Now in your postbit template ( or postbit_legacy, whichever you are using )
Just add this whereever you want the icon image to show:
Code:

<if condition="$post[garage]">
<br><div><a href="$vboptions[bburl]/vbgarage.php?do=list&userid=$post[userid]" target="_blank">$post[garage]</a>
<br /></div></if>

Lastly, upload your image into your forum images directory, in the MISC folder.

NOT TESTED but it should work. Do feedback for any errors and I will amend the errors accordingly. Would be good if this post can be linked in the hack post under the modifications/addons bit.

Hope this helps :)


I get this error
PHP Code:

Parse errorparse errorunexpected T_STRING in /home3/www/stangcountry/forums/includes/functions_showthread.php on line 688 

This is the code I have
PHP Code:

         SELECT gu.useriduser.userid
         FROM 
" . TABLE_PREFIX ."vbgarage_users AS gu
         LEFT JOIN 
" . TABLE_PREFIX ."user AS user ON gu.userid user.userid
         
");

         while(
$garagequeryarray = $DB_site->fetch_array($garagequery))
         {
           
$garagecache["$garagequeryarray[userid]"] = $garagequeryarray;
         }

               
$DB_site->free_result($garagequery);
           }

         if(
$garageinfo $garagecache[$userid])
           {
           if (
$garageinfo[userid])
               {
                return 
"$stylevar[imgdir_misc]/viewgarage.gif" border=\"0\">";
            }
           }
           return 
FALSE;
       }
###################### FOR GARAGE ICON ####################### 


cinq 12-10-2004 05:16 AM

Which line is 688 ?

Silverstangs 12-10-2004 09:46 AM

Quote:

Originally Posted by cinq
Which line is 688 ?

Opps sorry, this line is 688

PHP Code:

               return "$stylevar[imgdir_misc]/viewgarage.gif" border=\"0\">"


cinq 12-10-2004 09:55 AM

Sorry, it should just read the code below.
Copied and pasted it from my own but made an error :)
This should work now.

Code:

return "$stylevar[imgdir_misc]/viewgarage.gif";


All times are GMT. The time now is 05:04 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.02786 seconds
  • Memory Usage 1,773KB
  • 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
  • (11)bbcode_code_printable
  • (3)bbcode_php_printable
  • (3)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