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)

magnus 04-24-2004 12:58 PM

Quote:

Originally Posted by dede1
@magnus

I have from vB 3.0.0 to vB 3.0.1 update now get I this error message and can
however nothing find:

Fatal error: Call to undefined function: can_administer() in /var/www/html/Board/vbgarage.php on line 50

Upgrading vB version shouldn't have anything to do with it, either download the latest vBGarage PHP file or see this link:
https://vborg.vbsupport.ru/showpost....&postcount=347

magnus 04-24-2004 01:12 PM

Quote:

Originally Posted by eoc_Jason
Here's a way to do the thumbnails using vB's function for creating the thumbnails in threads... You have to write a temp file for the image function to work from, not a big deal... I used all the vB variables for the temp directory and such.

Code:

                if (!empty($_FILES['src']['tmp_name'])) {
                        require_once('./includes/functions_image.php');

                        $name = $_FILES['src']['name'];
                        $data = addslashes(fread(fopen($_FILES['src']['tmp_name'], "r"), filesize($_FILES['src']['tmp_name'])));
                        $type = $_FILES['src']['type'];

                        $filename = tempnam(ini_get('upload_tmp_dir'), 'tmpimg');
                        $fp = @fopen($filename, 'wb');
                        @fwrite($fp, stripslashes($data));
                        @fclose($fp);

                        $attachment[tmp_name] = $filename;
                        $attachment[name] = $name;
                        $thumb = addslashes(fetch_thumbnail_from_image($attachment,$imageerror));
                        @unlink($filename);
// insert into DB table here...
                }


Hah, beat me to it. I have this implemented in v3.2.0. :)

BTW, you have a PM.

dede1 04-24-2004 02:10 PM

magnus

thanks :)

eoc_Jason 04-24-2004 05:04 PM

You can make a little icon (or link, whatever you want) and have it display on the postbits template if they have created a profile.

Just edit showthread.php & find the big query around line 844, add your 'vbgarage_users.userid' to the SELECT part, and add a 'LEFT JOIN " . TABLE_PREFIX . "vbgarage_users AS vbgarage_users ON(vbgarage_users.userid = user.userid)

Then in your postbit (or postbit_legacy) template, you can add something like:

Code:

<if condition="$post['vbgarage']"><a href="vbgarage.php?$session[sessionurl]do=view&id=$post[userid]">(image or text here)</a></if>

That way as people read threads, they can go directly to that person's page...

magnus 04-24-2004 05:19 PM

Quote:

Originally Posted by eoc_Jason
You can make a little icon (or link, whatever you want) and have it display on the postbits template if they have created a profile.

Just edit showthread.php & find the big query around line 844, add your 'vbgarage_users.userid' to the SELECT part, and add a 'LEFT JOIN " . TABLE_PREFIX . "vbgarage_users AS vbgarage_users ON(vbgarage_users.userid = user.userid)

Then in your postbit (or postbit_legacy) template, you can add something like:

Code:

<if condition="$post['vbgarage']"><a href="vbgarage.php?$session[sessionurl]do=view&id=$post[userid]">(image or text here)</a></if>

That way as people read threads, they can go directly to that person's page...

lol, you're taking all the fun out of v3.2.0. :) j/k, keep up the good work. ;)

Shahrum 04-24-2004 08:27 PM

Quote:

Originally Posted by eoc_Jason
You can make a little icon (or link, whatever you want) and have it display on the postbits template if they have created a profile.

Just edit showthread.php & find the big query around line 844, add your 'vbgarage_users.userid' to the SELECT part, and add a 'LEFT JOIN " . TABLE_PREFIX . "vbgarage_users AS vbgarage_users ON(vbgarage_users.userid = user.userid)

Then in your postbit (or postbit_legacy) template, you can add something like:

Code:

<if condition="$post['vbgarage']"><a href="vbgarage.php?$session[sessionurl]do=view&id=$post[userid]">(image or text here)</a></if>

That way as people read threads, they can go directly to that person's page...

Hey, I tried to use your SQL code and while the field I added to the select statement works, the LEFT clause kept giving me errors... would you mind just copy/pasting the full SQL...? Thanks.

Shahrum 04-24-2004 08:42 PM

Here's my code fyi...

Code:

$getpostids = $DB_site->query("
                        SELECT postid, 'vbgarage_users.userid', NOT ISNULL(deletionlog.primaryid) AS isdeleted
                        FROM " . TABLE_PREFIX . "post AS post

LEFT JOIN " . TABLE_PREFIX . "deletionlog AS deletionlog ON(post.postid = deletionlog.primaryid AND type = 'post')
                        WHERE threadid = $threadid AND visible = 1
                        ORDER BY dateline $postorder
                ");


magnus 04-24-2004 08:53 PM

Quote:

Originally Posted by Shahrum
Here's my code fyi...

Code:

$getpostids = $DB_site->query("
                        SELECT postid, 'vbgarage_users.userid', NOT ISNULL(deletionlog.primaryid) AS isdeleted
                        FROM " . TABLE_PREFIX . "post AS post

LEFT JOIN " . TABLE_PREFIX . "deletionlog AS deletionlog ON(post.postid = deletionlog.primaryid AND type = 'post')
                        WHERE threadid = $threadid AND visible = 1
                        ORDER BY dateline $postorder
                ");


Yikes! You're editing the wrong variable/query. You need to be modifying the $posts variable/query. Something like this:

[SQL]
$posts = $DB_site->query("
SELECT
vbgarage_users.userid, post.*, post.username AS postusername, post.ipaddress AS ip,
user.*, userfield.*, usertextfield.*,
" . iif($forum['allowicons'], 'icon.title as icontitle, icon.iconpath,') . "
" . iif($vboptions['avatarenabled'], 'avatar.avatarpath, NOT ISNULL(customavatar.avatardata) AS hascustomavatar, customavatar.dateline AS avatardateline,') . "
" . iif($vboptions['reputationenable'], 'level,') . "
" . iif(!$deljoin, 'NOT ISNULL(deletionlog.primaryid) AS isdeleted, deletionlog.userid AS del_userid, deletionlog.username AS del_username, deletionlog.reason AS del_reason,') . "
editlog.userid AS edit_userid, editlog.username AS edit_username, editlog.dateline AS edit_dateline,
editlog.reason AS edit_reason,
post_parsed.pagetext_html, post_parsed.hasimages,
IF(displaygroupid=0, user.usergroupid, displaygroupid) AS displaygroupid
" . iif(!can_moderate(), $datastore['hidprofilecache']) . "
FROM " . TABLE_PREFIX . "post AS post
LEFT JOIN " . TABLE_PREFIX . "user AS user ON(user.userid = post.userid)
LEFT JOIN " . TABLE_PREFIX . "userfield AS userfield ON(userfield.userid = user.userid)
LEFT JOIN " . TABLE_PREFIX . "usertextfield AS usertextfield ON(usertextfield.userid = user.userid)
" . iif($forum['allowicons'], "LEFT JOIN " . TABLE_PREFIX . "icon AS icon ON(icon.iconid = post.iconid)") . "
" . iif($vboptions['avatarenabled'], "LEFT JOIN " . TABLE_PREFIX . "avatar AS avatar ON(avatar.avatarid = user.avatarid) LEFT JOIN " . TABLE_PREFIX . "customavatar AS customavatar ON(customavatar.userid = user.userid)") .
iif($vboptions['reputationenable'], " LEFT JOIN " . TABLE_PREFIX . "reputationlevel AS reputationlevel ON(user.reputationlevelid = reputationlevel.reputationlevelid)") . "
" . iif(!$deljoin, "LEFT JOIN " . TABLE_PREFIX . "deletionlog AS deletionlog ON(deletionlog.primaryid = post.postid AND deletionlog.type = 'post')") . "
LEFT JOIN " . TABLE_PREFIX . "editlog AS editlog ON(editlog.postid = post.postid)
LEFT JOIN " . TABLE_PREFIX . "post_parsed AS post_parsed ON(post_parsed.postid = post.postid)
LEFT JOIN " . TABLE_PREFIX . "vbgarage_users AS vbgarage_users ON(vbgarage_users.userid = user.userid)
WHERE $postids
ORDER BY dateline $postorder
");
[/SQL]

Shahrum 04-24-2004 09:25 PM

Great, the query works... but no links are showing up for the users who have garages.

from postbit_legacy:

Code:

<if condition="$post['vbgarage']"><br><div><a href="vbgarage.php?$session[sessionurl]do=view&id=$post[userid]">Check Out My Ride!</a></div></if>

Shahrum 04-24-2004 09:29 PM

I think something's wrong with the variable used in the if statement because w/o the if statement, it works fine!


All times are GMT. The time now is 04:01 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.02330 seconds
  • Memory Usage 1,765KB
  • 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
  • (7)bbcode_code_printable
  • (5)bbcode_quote_printable
  • (1)footer
  • (1)gobutton
  • (1)header
  • (1)headinclude
  • (6)option
  • (1)pagenav
  • (1)pagenav_curpage
  • (4)pagenav_pagelink
  • (5)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