vb.org Archive

vb.org Archive (https://vborg.vbsupport.ru/index.php)
-   vB3 General Discussions (https://vborg.vbsupport.ru/forumdisplay.php?f=111)
-   -   How can i get avatar's width and height? (https://vborg.vbsupport.ru/showthread.php?t=179811)

ovnnet 05-19-2008 03:14 PM

How can i get avatar's width and height?
 
I'm making a mod integration with avatar. I need set condition if avatar width is > 100. But i cannot get its width. $post[avwidth] return width="xx". I need the width number only. How can i do it?

Thank you

ovnnet 05-24-2008 01:23 PM

Still looking for the help.

Lynne 05-24-2008 03:52 PM

It looks like you want to play with the code in the class_postbit.php file right around lines 610 or so. That is where the width and height part of the image tag are defined and where you have access to the variables. (This shows up in several other files also, but you seemed to be interested in the postbit. You can do a global search through your files for "avwidth" and find all the places it is used.)

ovnnet 05-25-2008 11:47 AM

Thank you, i can edit this now
Quote:

if ($this->post['avwidth'] AND $this->post['avheight'])
{
// $this->post['avw'] = $this->post['avwidth'] ;
// $this->post['avh'] = $this->post['avheight'] ;
$this->post['avwidth'] = 'width="' . $this->post['avwidth'] . '"';
$this->post['avheight'] = 'height="' . $this->post['avheight'] . '"';
}
But i want to create new variable to get only width and height like this, but i still get width="" height="" instead the numbers. Something is wrong?

Lynne 05-25-2008 04:23 PM

Why don't you just say:
PHP Code:

 $avwidth $this->post['avwidth'] ;
$avheight $this->post['avheight'] ; 

and use those new variables?


All times are GMT. The time now is 03:52 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.00956 seconds
  • Memory Usage 1,719KB
  • 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)bbcode_quote_printable
  • (1)footer
  • (1)gobutton
  • (1)header
  • (1)headinclude
  • (6)option
  • (1)post_thanks_navbar_search
  • (1)printthread
  • (5)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