vb.org Archive

vb.org Archive (https://vborg.vbsupport.ru/index.php)
-   vBulletin 3.5 Add-ons (https://vborg.vbsupport.ru/forumdisplay.php?f=113)
-   -   Show Usergroup Description on Show Groups (https://vborg.vbsupport.ru/showthread.php?t=92219)

Link14716 07-14-2005 10:00 PM

Show Usergroup Description on Show Groups
 
This plugin shows the description of the usergroup on showgroups.php.

Enjoy. :)

Chris M 07-15-2005 01:56 AM

I noticed that the hook showgroups_start is initialised just before the query you modify in your Code Modification version...

Couldn't you do something like the following?
PHP Code:

$locationfieldselect array_merge($locationfieldselect, array(' usergroup.description,')); 

Not entirely sure but wouldn't this work? ;)

Satan

Link14716 07-15-2005 02:58 AM

$locationfieldselect isn't an array. I didn't notice it, though. I guess I can make a plugin without a query. :p

(Whoops...)

Chris M 07-15-2005 02:59 AM

Quote:

Originally Posted by Link14716
$locationfieldselect isn't an array. I didn't notice it, though. I guess I can make a plugin without a query. :p

(Whoops...)

Yeh I know it's not an array, but I was just being lazy and quoting something to give you the general idea :p

Satan

Link14716 07-15-2005 03:02 AM

Actually, I don't think I can. The same variable is used on a query that doesn't involve usergroups (moderators), so I end up with a MySQL error. I can probably find some way around it, though.

Chris M 07-15-2005 03:06 AM

Quote:

Originally Posted by Link14716
Actually, I don't think I can. The same variable is used on a query that doesn't involve usergroups (moderators), so I end up with a MySQL error. I can probably find some way around it, though.

Hrm yes I see that :ermm:

Isn't there a way that you can clear the alteration to $locationfieldselect after you display the description?

Like "unset($locationfieldselect);"
Then you could reset it before it goes on to the moderators query?

Just theorising :p

Satan

Link14716 07-15-2005 03:08 AM

That would make it not select the location field silly. :p

I did something similar, setting what was $locationfieldselect to a temp variable and then changing it back when it gets to the usergroup loop. I just need to download the .xml file, attach it, and report my code mod version for deletion. :D

Chris M 07-15-2005 03:10 AM

Quote:

Originally Posted by Link14716
That would make it not select the location field silly. :p

I did something similar, setting what was $locationfieldselect to a temp variable and then changing it back when it gets to the usergroup loop. I just need to download the .xml file, attach it, and report my code mod version for deletion. :D

Well I was just theorising :p

Glad to see my confusion brought a query-free plugin out of this :p

Satan

Link14716 07-15-2005 03:14 AM

Thanks for spotting that variable, Satan. I was looking for one before I did the code mod, but I was looking for it at the end of the fields.

Chris M 07-15-2005 03:17 AM

Heh - You are going to hate me:p

Quote:

Database error in vBulletin 3.5.0 Beta 4:

Invalid SQL:

SELECT userfield.field2, usergroup.description, user.*,moderator.*
FROM moderator AS moderator
INNER JOIN user AS user USING(userid)
INNER JOIN userfield AS userfield USING(userid)
#ORDER BY user.username;

MySQL Error : Unknown table 'usergroup' in field list
Error Number : 1109
Date : Thursday, July 14th 2005 @ 11:17:06 PM
Script : http://forums.hellsatan.co.uk/showgroups.php
Referrer : http://forums.hellsatan.co.uk/index.php?
IP Address :
Username : hellsatan
Classname : vb_database
:D

Satan


All times are GMT. The time now is 04:07 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.00999 seconds
  • Memory Usage 1,739KB
  • 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
  • (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