vb.org Archive

vb.org Archive (https://vborg.vbsupport.ru/index.php)
-   vB3 Programming Discussions (https://vborg.vbsupport.ru/forumdisplay.php?f=15)
-   -   extract avatar (https://vborg.vbsupport.ru/showthread.php?t=177020)

hrk 04-24-2008 10:26 AM

extract avatar
 
HI , i am running a joomla site . I would like to auto assign avatar for the user using Vb profile avatar. what is the complete code for me to use to call in these avatar?

i need this tol use this in all the other comp such as commenting system.

thanks you..

Dismounted 04-24-2008 11:16 AM

<a href="http://members.vbulletin.com/api/" target="_blank">http://members.vbulletin.com/api/</a>

See "fetch_avatar_url()".

hrk 04-26-2008 06:32 PM

thank you very much.

fetch_avatar_url (line 241)
void fetch_avatar_url (mixed $userid)

this is what it stated. how do i use it in joomla cms?
a sample or hint can help me alot to kickstart .

what i would like to add is a link to fetch the member avatar.

example : upload your images (upload box ) or click here to use your forum avatar.(once clicked avarat fetched)

this link help litlye
https://vborg.vbsupport.ru/showthread.php?t=98009

thank you.
sorry for nmake it complicated.

Dismounted 04-27-2008 05:10 AM

Include vBulletin's backend and use the function.

hrk 04-27-2008 05:28 AM

thanks for reply.

what you think like this.


PHP Code:

chdir('/home/site/public_html/forums');
require_once(
'./global.php');  

if (!
$vbulletin->userinfo['userid'])
{
       
print_no_permission();


// #### Fetch avatar ######################
        
if ($bbuserinfo['userid'])
            {
                
// Fetch Avatar from  Forum
                
require_once('./includes/functions_user.php');
                
$bbuseravatarurl fetch_avatar_url($bbuserinfo['userid']);
    
                if (!
$bbuseravatarurl
                    {
                        
$bbuseravatarurl $stylevar['imgdir_misc'] . '/noavatar.gif';
                    }
            } 

thanks

Dismounted 04-27-2008 07:13 AM

PHP Code:

$cwd getcwd();
chdir('/home/site/public_html/forums');
require_once(
'./global.php');

if (
$vbulletin->userinfo['userid'])
{
    require_once(
'./includes/functions_user.php');
    
$bbuseravatarurl fetch_avatar_url($vbulletin->userinfo['userid']);

    if (!
$bbuseravatarurl)
    {
        
$bbuseravatarurl $stylevar['imgdir_misc'] . '/noavatar.gif';
    }
}

chdir($cwd); 


hrk 04-27-2008 07:25 AM

Excellent somwhere there now

but how do i get it to fetch ?

my original code is

Code:

                <td align="center" style="width:150px; padding: 6px 3px 5px 5px;">
        <?php
        if ( $img != "")
            echo $img;
        else
//            echo "<img src='/images/150px.jpg' alt='Image' title='Image'/>";
echo $plugins["gallery"];

        ?>
                <br>
                <?php echo $ico; ?>
                </td>

thanks alot for your excellent support.
this shld be last step.

Dismounted 04-27-2008 07:29 AM

The variable, $bbuseravatarurl, contains the URL to the avatar.

hrk 04-27-2008 07:51 AM

Code:

<td align="center" style="width:150px; padding: 6px 3px 5px 5px;">
        <?php
$cwd = getcwd();
chdir('public_html/forum');
require_once('./global.php'); 
   
if ($vbulletin->userinfo['userid'])
{
    require_once('./includes/functions_user.php');
    $bbuseravatarurl = fetch_avatar_url($vbulletin->userinfo['userid']);

    if (!$bbuseravatarurl)
    {
        $bbuseravatarurl = $stylevar['imgdir_misc'] . '/noavatar.gif';
    }
}
chdir($cwd);
                <br>

                <?php echo $bbuseravatarurl; ?>

                </td>

Could not get it to display avatar.

few doubts ;

1.chdir('/home/site/public_html/forums'); need to include on top of within php , and the home/site for mycase is nothing. mysite.com/form is the path . unless its the cpanel dir name there need changes

2. <?php echo $bbuseravatarurl; ?> to fetch images ?

thanks alot.

Dismounted 04-27-2008 09:15 AM

Wait a sec, are you using vBulletin templates?


All times are GMT. The time now is 08:00 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.01115 seconds
  • Memory Usage 1,747KB
  • 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
  • (2)bbcode_php_printable
  • (1)footer
  • (1)gobutton
  • (1)header
  • (1)headinclude
  • (6)option
  • (1)pagenav
  • (1)pagenav_curpage
  • (1)pagenav_pagelink
  • (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