vb.org Archive

vb.org Archive (https://vborg.vbsupport.ru/index.php)
-   vB4 Programming Discussions (https://vborg.vbsupport.ru/forumdisplay.php?f=252)
-   -   Order results by VIP Members first (https://vborg.vbsupport.ru/showthread.php?t=294674)

KimK 02-02-2013 12:03 AM

Order results by VIP Members first
 
Hello.

I want to add an option to the order results combo box so the user can order the search results by VIP members (which the group ID for them = 10) and that's mean the VIP members appear first in the search results page before the other members in the other groups.

Thanks.

--------------- Added [DATE]1359814388[/DATE] at [TIME]1359814388[/TIME] ---------------

Does anyone know how to do this?

LifesGreatestGift 02-05-2013 03:45 AM

Only put vip posts at the top if it is the thread starter post? (post 1)

KimK 02-06-2013 01:00 PM

I would like the featured members to show up first on the the member search results, maybe highlighted in a different color in the result indicated as a featured member.
http://www.agentlinkus.com/memberlist.php?do=search
and the members list page:
http://www.agentlinkus.com/members/list/

Thanks

LifesGreatestGift 02-07-2013 02:35 AM

1 Attachment(s)
Open template memberlist

Find
Code:

                <vb:each from="memberlistbits" value="userinfo">
                        <tr>
                                <td class="alt1 username">

Replace With:
Code:

                <vb:each from="memberlistbits" value="userinfo">
                        <tr<vb:if condition="is_member_of($userinfo, 6)"> style="background:red;"</vb:if>>
                                <td class="alt1 username"<vb:if condition="is_member_of($userinfo, 6)"> style="background:red;"</vb:if>>

Enter your usergroup ID in the is_member_of function. It is currently set for usergroup 6. you can add additional groups separated by commas. Also change the
Code:

style="background:red;"
to what suites you.

KimK 02-07-2013 10:09 AM

Thank you so much LifesGreatestGift but how can I get the featured members to show up first on the the member list page?

LifesGreatestGift 02-07-2013 12:21 PM

you would probably need to look into the queries that memberlist.php makes

KimK 02-07-2013 12:58 PM

I don't know anything about the queries in the memberlist.php. Can you help me?

LifesGreatestGift 02-07-2013 02:50 PM

Create a new plugin

Product: vBulletin
Hook Location: memberlist_fetch
Title: Sort admin first
Code:
Code:

$sqlsort = 'user.usergroupid=6';
$sortorder = 'desc';

Where 6 is the group id you want to show first.

KimK 02-11-2013 08:30 AM

A million billion thanks to you LifesGreatestGift for your help.

Thank you sooooo much :)

KimK 02-16-2013 06:00 PM

Sorry for disturbing you again. Can I create a featured members widget to include the same VIP group (group id = 10)?

Thanks :)


All times are GMT. The time now is 01: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.01055 seconds
  • Memory Usage 1,728KB
  • 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
  • (4)bbcode_code_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