Go Back   vb.org Archive > vBulletin 3 Discussion > vB3 General Discussions
FAQ Community Calendar Today's Posts Search

Reply
 
Thread Tools Display Modes
  #1  
Old 08-04-2007, 06:49 AM
ThreeD ThreeD is offline
 
Join Date: Aug 2006
Posts: 84
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default 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
Reply With Quote
  #2  
Old 08-04-2007, 09:19 AM
Kirk Y's Avatar
Kirk Y Kirk Y is offline
 
Join Date: Apr 2005
Location: Tallahassee, Florida
Posts: 2,604
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

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.
Reply With Quote
  #3  
Old 08-04-2007, 09:37 AM
ThreeD ThreeD is offline
 
Join Date: Aug 2006
Posts: 84
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

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.
Reply With Quote
  #4  
Old 08-04-2007, 10:39 AM
Dismounted's Avatar
Dismounted Dismounted is offline
 
Join Date: Jun 2005
Location: Melbourne, Australia
Posts: 15,047
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

How are you pulling the data?
Reply With Quote
  #5  
Old 08-04-2007, 10:58 AM
ThreeD ThreeD is offline
 
Join Date: Aug 2006
Posts: 84
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

Quote:
Originally Posted by Dismounted View Post
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
Reply With Quote
  #6  
Old 08-05-2007, 04:34 PM
ThreeD ThreeD is offline
 
Join Date: Aug 2006
Posts: 84
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

Do I have to make a hook or plugin to pull avatars into a custom page?
Reply With Quote
  #7  
Old 08-05-2007, 04:42 PM
Allan's Avatar
Allan Allan is offline
 
Join Date: Jun 2003
Location: France
Posts: 1,513
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

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
Reply With Quote
  #8  
Old 08-05-2007, 05:38 PM
ThreeD ThreeD is offline
 
Join Date: Aug 2006
Posts: 84
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

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
Reply With Quote
  #9  
Old 08-06-2007, 08:45 PM
ThreeD ThreeD is offline
 
Join Date: Aug 2006
Posts: 84
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

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?
Reply With Quote
  #10  
Old 08-07-2007, 07:09 AM
Kaasie's Avatar
Kaasie Kaasie is offline
 
Join Date: Nov 2001
Location: rotterdam
Posts: 51
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

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
Reply With Quote
Reply


Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off

Forum Jump


All times are GMT. The time now is 08:15 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.04307 seconds
  • Memory Usage 2,254KB
  • Queries Executed 11 (?)
More Information
Template Usage:
  • (1)SHOWTHREAD
  • (1)ad_footer_end
  • (1)ad_footer_start
  • (1)ad_header_end
  • (1)ad_header_logo
  • (1)ad_navbar_below
  • (1)ad_showthread_beforeqr
  • (1)ad_showthread_firstpost
  • (1)ad_showthread_firstpost_sig
  • (1)ad_showthread_firstpost_start
  • (2)bbcode_code
  • (1)bbcode_html
  • (1)bbcode_quote
  • (1)footer
  • (1)forumjump
  • (1)forumrules
  • (1)gobutton
  • (1)header
  • (1)headinclude
  • (1)navbar
  • (3)navbar_link
  • (120)option
  • (1)pagenav
  • (1)pagenav_curpage
  • (1)pagenav_pagelink
  • (10)post_thanks_box
  • (10)post_thanks_button
  • (1)post_thanks_javascript
  • (1)post_thanks_navbar_search
  • (10)post_thanks_postbit_info
  • (10)postbit
  • (10)postbit_onlinestatus
  • (10)postbit_wrapper
  • (1)spacer_close
  • (1)spacer_open
  • (1)tagbit_wrapper 

Phrase Groups Available:
  • global
  • inlinemod
  • postbit
  • posting
  • reputationlevel
  • showthread
Included Files:
  • ./showthread.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/functions_bigthree.php
  • ./includes/class_postbit.php
  • ./includes/class_bbcode.php
  • ./includes/functions_reputation.php
  • ./includes/functions_post_thanks.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
  • showthread_start
  • showthread_getinfo
  • forumjump
  • showthread_post_start
  • showthread_query_postids
  • showthread_query
  • bbcode_fetch_tags
  • bbcode_create
  • showthread_postbit_create
  • postbit_factory
  • postbit_display_start
  • post_thanks_function_post_thanks_off_start
  • post_thanks_function_post_thanks_off_end
  • post_thanks_function_fetch_thanks_start
  • post_thanks_function_fetch_thanks_end
  • post_thanks_function_thanked_already_start
  • post_thanks_function_thanked_already_end
  • fetch_musername
  • postbit_imicons
  • bbcode_parse_start
  • bbcode_parse_complete_precache
  • bbcode_parse_complete
  • postbit_display_complete
  • post_thanks_function_can_thank_this_post_start
  • pagenav_page
  • pagenav_complete
  • tag_fetchbit_complete
  • forumrules
  • navbits
  • navbits_complete
  • showthread_complete