vb.org Archive

vb.org Archive (https://vborg.vbsupport.ru/index.php)
-   vB3 General Discussions (https://vborg.vbsupport.ru/forumdisplay.php?f=111)
-   -   vBulletin.org Staff Display (Showgroups.php) (https://vborg.vbsupport.ru/showthread.php?t=154272)

ThreeD 08-04-2007 06:49 AM

vBulletin.org Staff Display (Showgroups.php)
 
I find the vbulletin.org staff introduction really interesting, and I'd like to do something similar on my site. I've figured out how to make my own staff template and link it up to the forum site, but I'm still puzzled how I can make each admins/mods profile information show up on the staff site.

Maybe there is a MOD available to do this kind of thing?

Thanks for your help :)

Kirk Y 08-04-2007 09:19 AM

There hasn't been one released, to my knowledge. I imagine it would be relatively easy to do, using the Forum Leaders page as a guide - as it is basically the same concept.

ThreeD 08-04-2007 09:37 AM

Thanks Kirk, I'm basically looking for something like the "Forum Leaders" page, but with a more fancy design like the vbulletin.org page :) I've made a custom page loaded through "information.php?do=staff", but I'm having problems pulling the data from the vbulletin database.

All the basic html in the custom template shows up just fine, but none of the data like admin/mod usernames, posts, avatars, joindates etc. How can I pull that data from the database into the custom page? Do I have to create extra plugins or hooks?

I'm not sure what I'm missing out on here, but your help is much appreciated.

Dismounted 08-04-2007 10:39 AM

How are you pulling the data?

ThreeD 08-04-2007 10:58 AM

Quote:

Originally Posted by Dismounted (Post 1309562)
How are you pulling the data?

basically I am using the same "setup" as the Showgroups template. I'm not sure what I have to add to include the avatars on my custom staff page. I've looked over the showgroups.php file and here is what I can't figure out:

What do I have to add to my custom php file in order to pull the avatars, last online, user title info from the database?

I imagine the code I have to add would be something like:
HTML Code:

<if condition="$show['avatar']">
<td><img src="$userinfo[avatarurl]" $userinfo[avatarsize] vspace="5" alt="<phrase 1="$userinfo[username]">$vbphrase[xs_avatar]</phrase>" border="0" /></td>
<else />
<td>&nbsp;</td>
</if>

For some reason it is not pulling the data (avatars, last online, user title) from the database so if you could give me a little hint as to what code I have to put in my custom php file to pull the data correctly, I'd be very happy :)

Thanks in advance

ThreeD 08-05-2007 04:34 PM

Do I have to make a hook or plugin to pull avatars into a custom page?

Allan 08-05-2007 04:42 PM

Global_start (hook)

Content:
Code:

require_once('./includes/functions_user.php');
$userid = $vbulletin->userinfo['userid'];
$avatarurl = fetch_avatar_url($userid); 
 if (empty($avatarurl)) {
          $show['avatar'] = false;
        }
        else {
          $show['avatar'] = true;
        }

And add this in the template to custom page
Code:

<if condition="$show['avatar']">
<img src="$avatarurl[0]">
<else />
<img src="your_image_if_no_avatar" border="0" alt="My avatar" />
</if>


http://www.vbulletin-ressources.com/...ead.php?t=6636

ThreeD 08-05-2007 05:38 PM

thanks a million Allan, appreciate your help! It worked like a charm too :) The only problem is that the page I am making is a custom page to display info (including avatars) of moderators and admins. I want the avatars of the mods/admins to be displayed, not my own avatar.

Could you please tell me what I have to change to display the avatars of the admins/mods instead of my own?

Thanks Allan! :)

PS: Looked at your forum btw, looks awesome!! Unfortunately my french knowledge is very very limited :)

ThreeD 08-06-2007 08:45 PM

Anyone willing to help me make the slight change to Allan's little hook/script so I can display staff info, in this case the avatars on a custom page? :)

Kaasie 08-07-2007 07:09 AM

hey perhaps one if you guys could help me out..?

i added the hook as decribed and wanted to add it in whoviewed my profile, but it only shows my own avatar and of course i want them visitors avatars to be displayed on there like $avatarurl[userid] ??

--------
for example please login at
http://www.my3dprofile.com/forums/Kaasie

username: vBulletin
password: org

----------

I would appreciate it very much and any help or tip i am really thankful for


All times are GMT. The time now is 01:44 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.04390 seconds
  • Memory Usage 1,737KB
  • 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
  • (1)bbcode_html_printable
  • (1)bbcode_quote_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