Go Back   vb.org Archive > Community Discussions > Modification Requests/Questions (Unpaid)
FAQ Community Calendar Today's Posts Search

Reply
 
Thread Tools Display Modes
  #1  
Old 01-29-2003, 12:37 PM
USODJA's Avatar
USODJA USODJA is offline
 
Join Date: Dec 2002
Location: Arnprior, Ontario, Canada
Posts: 36
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default Using Titles in Showgroups

Is there a way to show a persons title after their name on the staff page.

Like Coordinators, CEO, yada yada...

Thanks
Reply With Quote
  #2  
Old 01-30-2003, 12:38 PM
Xenon's Avatar
Xenon Xenon is offline
 
Join Date: Oct 2001
Location: Bavaria
Posts: 12,878
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

should be possible

open showgroups.php
find:
PHP Code:
$users $DB_site->query("
    SELECT
        
$locationfieldselect usergroup.title, user.username, user.userid, user.invisible, user.receivepm,
        user.usergroupid, user.lastactivity, user.lastvisit
        FROM usergroup
        LEFT JOIN user ON (usergroup.usergroupid = user.usergroupid)
        LEFT JOIN userfield ON (userfield.userid = user.userid)
        WHERE usergroup.showgroup = 1
    "
); 
and change it to:
PHP Code:
$users $DB_site->query("
    SELECT
        
$locationfieldselect usergroup.title, user.title AS usertitle, user.username, user.userid, user.invisible, user.receivepm,
        user.usergroupid, user.lastactivity, user.lastvisit
        FROM usergroup
        LEFT JOIN user ON (usergroup.usergroupid = user.usergroupid)
        LEFT JOIN userfield ON (userfield.userid = user.userid)
        WHERE usergroup.showgroup = 1
    "
); 
then find:
PHP Code:
$users $DB_site->query("
    SELECT
        
$locationfieldselect forum.forumid, forum.title AS forumtitle,
        user.username, user.userid, user.invisible, user.receivepm, user.lastactivity, user.lastvisit
        FROM moderator
        LEFT JOIN user ON (user.userid = moderator.userid)
        LEFT JOIN forum ON (forum.forumid = moderator.forumid)
        LEFT JOIN userfield ON (userfield.userid = user.userid)
    WHERE forum.active = 1
    ORDER BY user.username ASC, forum.displayorder ASC
    "
); 
and change to:
PHP Code:
$users $DB_site->query("
    SELECT
        
$locationfieldselect forum.forumid, forum.title AS forumtitle,
        user.title AS usertitle, user.username, user.userid, user.invisible, user.receivepm, user.lastactivity, user.lastvisit
        FROM moderator
        LEFT JOIN user ON (user.userid = moderator.userid)
        LEFT JOIN forum ON (forum.forumid = moderator.forumid)
        LEFT JOIN userfield ON (userfield.userid = user.userid)
    WHERE forum.active = 1
    ORDER BY user.username ASC, forum.displayorder ASC
    "
); 
then you should be able to use $user[usertitle] in the showgroupbit templates
Reply With Quote
  #3  
Old 01-30-2003, 04:47 PM
USODJA's Avatar
USODJA USODJA is offline
 
Join Date: Dec 2002
Location: Arnprior, Ontario, Canada
Posts: 36
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

I get this error:

Database error in vBulletin 2.2.9:

Invalid SQL:
SELECT
usergroup.title, user.title AS usertitle, user.username, user.userid, user.invisible, user.receivepm,
user.usergroupid, user.lastactivity, user.lastvisit
FROM usergroup
LEFT JOIN user ON (usergroup.usergroupid = user.usergroupid)
LEFT JOIN userfield ON (userfield.userid = user.userid)
WHERE usergroup.showgroup = 1

mysql error: Unknown column 'user.title' in 'field list'

mysql error number: 1054
Reply With Quote
  #4  
Old 02-01-2003, 02:34 AM
USODJA's Avatar
USODJA USODJA is offline
 
Join Date: Dec 2002
Location: Arnprior, Ontario, Canada
Posts: 36
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

Reply With Quote
  #5  
Old 02-01-2003, 09:55 AM
Xenon's Avatar
Xenon Xenon is offline
 
Join Date: Oct 2001
Location: Bavaria
Posts: 12,878
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

replace user.title with user.usertitle
Reply With Quote
  #6  
Old 02-01-2003, 01:15 PM
USODJA's Avatar
USODJA USODJA is offline
 
Join Date: Dec 2002
Location: Arnprior, Ontario, Canada
Posts: 36
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

Thanks it worked like a charm, I run an association site, so they were all bugging me to list the members with titles on a page, and I knew modifiying this one would do the trick....

Thanks again!
Reply With Quote
  #7  
Old 02-02-2003, 12:07 PM
Xenon's Avatar
Xenon Xenon is offline
 
Join Date: Oct 2001
Location: Bavaria
Posts: 12,878
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default


you're welcome
Reply With Quote
  #8  
Old 09-24-2006, 03:53 PM
blonboy blonboy is offline
 
Join Date: May 2006
Posts: 5
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

I would like to be able to use this modification as well, but it seems the code has changed substantialy since this posting. Anyone willing to update what would be the necessary changes? Thanks In Advance.
Reply With Quote
  #9  
Old 09-29-2006, 07:45 AM
Luggruff's Avatar
Luggruff Luggruff is offline
 
Join Date: Apr 2005
Posts: 239
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

now it seems like it looks like this:
PHP Code:
// get usergroups who should be displayed on showgroups
// Scans too many rows. Usergroup Rows * User Rows
$users $db->query_read_slave("
    SELECT user.*, usergroup.usergroupid, usergroup.title, user.options, usertextfield.*, userfield.*,
    IF(displaygroupid=0, user.usergroupid, displaygroupid) AS displaygroupid, infractiongroupid
    FROM " 
TABLE_PREFIX "usergroup AS usergroup
    LEFT JOIN " 
TABLE_PREFIX "user AS user ON(user.usergroupid = usergroup.usergroupid OR FIND_IN_SET(usergroup.usergroupid, user.membergroupids))
    LEFT JOIN " 
TABLE_PREFIX "userfield AS userfield ON(userfield.userid = user.userid)
    LEFT JOIN " 
TABLE_PREFIX "usertextfield AS usertextfield ON(usertextfield.userid=user.userid)
    WHERE (usergroup.genericoptions & " 
$vbulletin->bf_ugp_genericoptions['showgroup'] . ")
"
); 
What to do now?

EDIT:
Why even go that way? You could just go to the showgroups_usergroupbit template in templatemanager.. then you could just copy the usertitle code from postbit and paste it there?
Reply With Quote
  #10  
Old 01-18-2007, 09:19 PM
sinucello sinucello is offline
 
Join Date: Apr 2006
Location: dutch-german border
Posts: 107
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

Hi,

Quote:
EDIT:
Why even go that way? You could just go to the showgroups_usergroupbit template in templatemanager.. then you could just copy the usertitle code from postbit and paste it there?
ASFAIK you can only display in your template what is selected in the code. So pasting the template-parts there won`t help if you don`t extract the necessary data in the php-files using that template.

Ciao,
Sacha
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 09:35 AM.


Powered by vBulletin® Version 3.8.12 by vBS
Copyright ©2000 - 2024, vBulletin Solutions Inc.
X vBulletin 3.8.12 by vBS Debug Information
  • Page Generation 0.05207 seconds
  • Memory Usage 2,264KB
  • 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
  • (5)bbcode_php
  • (1)bbcode_quote
  • (1)footer
  • (1)forumjump
  • (1)forumrules
  • (1)gobutton
  • (1)header
  • (1)headinclude
  • (1)navbar
  • (3)navbar_link
  • (120)option
  • (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
  • tag_fetchbit_complete
  • forumrules
  • navbits
  • navbits_complete
  • showthread_complete