vb.org Archive

vb.org Archive (https://vborg.vbsupport.ru/index.php)
-   vB3 Programming Discussions (https://vborg.vbsupport.ru/forumdisplay.php?f=15)
-   -   vb avatar only working if commenter is user (https://vborg.vbsupport.ru/showthread.php?t=62235)

AN-net 03-07-2004 01:21 AM

vb avatar only working if commenter is user
 
ok for some reason if the commenter isnt using a custom avatar their avatar info only works if their the viewing user. anyone know y this is happening?

here is my code:
PHP Code:

/*###############Begin Displaying Comments###############*/
$fcomment=$DB_site->query("SELECT * FROM gallery_comments WHERE image_id='$imgid' AND gallery_id='$id' ORDER BY comment_date ASC");
while(
$comment=$DB_site->fetch_array($fcomment)){
require_once(
'./includes/functions_bbcodeparse.php');
$fuserinfo=$DB_site->query("SELECT user.usertitle,user.avatarid,usertextfield.signature".iif($comment[show_avatar],',avatar.*')." FROM user,usertextfield 
"
.iif($comment[show_avatar],"LEFT JOIN " TABLE_PREFIX "avatar AS avatar ON(avatar.avatarid = user.avatarid) LEFT JOIN " TABLE_PREFIX "customavatar AS customavatar ON(customavatar.userid = user.userid)") . 
WHERE user.userid='
$comment[commenter_id]' AND usertextfield.userid='$comment[commenter_id]'");
$commenter=$DB_site->fetch_array($fuserinfo);
if(
$comment[show_sig]==1){
$commenter['signature'] = parse_bbcode($commenter['signature'], 01);
$show['signature']="true";
}
else{
$show['signature']="";
}
if(
$commenter[avatarid]==0){
$show['customava']="true";
}
else{
$show['customava']="false";
}
$commentmessage parse_bbcode2($comment['comment_text'], 011100);
$commentdate=date("m/d/Y - g:i A",$comment[comment_date]);
eval(
'$commentbits .= "' fetch_template('gallery_entry_commentbits') . '";');
}
/*###############End Displaying Comments###############*/ 


AN-net 03-08-2004 06:42 PM

anyone know y its doing this?

AN-net 03-11-2004 10:02 PM

anyone have any knowledge y it will only display vb avatar(not custom) only if the viewing user if the user who posted?


All times are GMT. The time now is 01:58 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.00971 seconds
  • Memory Usage 1,729KB
  • 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
  • (1)bbcode_php_printable
  • (1)footer
  • (1)gobutton
  • (1)header
  • (1)headinclude
  • (6)option
  • (1)post_thanks_navbar_search
  • (1)printthread
  • (3)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
  • bbcode_fetch_tags
  • bbcode_create
  • bbcode_parse_start
  • bbcode_parse_complete_precache
  • bbcode_parse_complete
  • printthread_post
  • printthread_complete