vb.org Archive

vb.org Archive (https://vborg.vbsupport.ru/index.php)
-   vBulletin 2.x Full Releases (https://vborg.vbsupport.ru/forumdisplay.php?f=4)
-   -   Avatar on homepage (https://vborg.vbsupport.ru/showthread.php?t=32560)

Crinos 11-26-2001 06:13 AM

LOL, I wish it was that easy - the whole process of putting it together is scattered althroughout several templates:

forumhome
forumhome_unregmessage
forumhome_welcometext
forumhome_logincode
forumhome_logoutcode
forumhome_pmloggedin

I'm afraid giving you just the forumhome template is not gonna be useful ;)

Took me about 3-4 hours of trial and error just trying to put it together ... what I did was set up a "mock-up" page with the layout as I want it to be ... then I just insert the relevant code and then chop it up by the <tr>'s and insert each one in the templates I mentioned :D

Jakeman 11-26-2001 06:43 AM

oic. ok then... i'll manage :)

trilOByte 11-26-2001 08:48 AM

Hey man, I think I just posted what you are looking for. I installed it all together, then wrote a walkthrough of most of it for a friend, thought someone might find it usefull, so uploaded the zip here...

https://vborg.vbsupport.ru/showthrea...threadid=32702

See my sig for a working example.

Even if it's not exactly what you are looking for, it should give you the *bones* to play with!

trilOByte 11-26-2001 08:51 AM

Thinking about it, I prolly should have posted it here - not sure about the protocol for such things :rolleyes:

Anyway, I *think* I included all the edits :rolleyes: :rolleyes: :D :D

Jakeman 11-27-2001 02:06 AM

thanks :)

Jakeman 11-27-2001 06:13 PM

cool... check out my www link

fiona 11-30-2001 04:10 PM

Quote:

Originally posted by JTMON
For some reason that code didn't work for me firefly. I just get a red x if I don't have an avatar selected, but no noavatar.gif. I have reuploaded the gif file twice too. Otherwise it works great.
have you checked the path to the image matches with what you have in index.php
ie mine is images/noavatar.gif

but in the code given by Firefly its
Quote:

<img src="vbimages/noavatar.gif">
i had the same problem :D

Gamingforce 11-30-2001 04:50 PM

Really nice hack Firefly. I would install it but the default avatar size for our message board is 105x150 making the avatar take up too much board real estate. Awesome job though Firefly!

JTMON 11-30-2001 09:10 PM

Quote:

Originally posted by fiona


i had the same problem :D

Well it's been images for me this whole time. I never saw vbimages. I changed the coding so if they don't have an avatar it gives them the no avatar but it's also linked to the edit avatar page:D

westi 12-02-2001 12:59 PM

Hi,

Quote:

Originally posted by Matt
Is there anyway to encorporate this into a non-vb page?
include the follow global.php to your page...

PHP Code:

<?
// global.php
// Diese Datei ist f?r Webseiten die auf Funktionen eines vBulletin zugreifen
// wollen.
// Autor: westi (westi@ftpworld.org)
// Stand: v1.0 / 2001-12-02

$boardpath="/path/to/the/board";

unset($dbservertype);
//load config
require("$boardpath/admin/config.php");
require("$boardpath/admin/functions.php");

// init db **********************
// load db class
$dbservertype = strtolower($dbservertype);
$dbclassname="$boardpath/admin/db_$dbservertype.php";
require($dbclassname);

$DB_site=new DB_Sql_vb;
$DB_site->appname="vBulletin Control Panel";
$DB_site->appshortname="vBulletin (cp)";
$DB_site->database=$dbname;
$DB_site->server=$servername;
$DB_site->user=$dbusername;
$DB_site->password=$dbpassword;
$DB_site->connect();

$dbpassword="";
$DB_site->password="";
// end init db

// load options
$optionstemp=$DB_site->query_first("SELECT template FROM template WHERE title='options'");
eval($optionstemp[template]);
// ################ END INIT #################

if ($bbuserid!="") {
  $user=getuserinfo($bbuserid);
  $username=$user[username];
  $lastday=vbdate($dateformat,$user[lastvisit]+3600);
  $lasttime=vbdate($timeformat,$user[lastvisit]+3600);
  $templatesetid=$DB_site->query_first("SELECT templatesetid AS templatesetid FROM style WHERE styleid=$user[styleid]");
  $templatesetid=$templatesetid[templatesetid];

  $avatarurl=getavatarurl($user[userid]);
  if ($avatarurl=='') {
    $avatarurl='images/noavatar.gif';
  }
  $avatarimage='<a href="'.$bburl.'/member.php3?action=editavatar"><img src="'.$bburl.'/'.$avatarurl.'" border="0"></a>';
} else {
  $avatarimage='<a href="'.$bburl.'/register.php?action=signup"><img src="'.$bburl.'/images/guestavatar.gif" border="0"></a>';
}

}

?>

greets,
westi


All times are GMT. The time now is 06:11 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.01276 seconds
  • Memory Usage 1,749KB
  • 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
  • (4)bbcode_quote_printable
  • (1)footer
  • (1)gobutton
  • (1)header
  • (1)headinclude
  • (6)option
  • (1)pagenav
  • (1)pagenav_curpage
  • (4)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