vb.org Archive

vb.org Archive (https://vborg.vbsupport.ru/index.php)
-   vB3 General Discussions (https://vborg.vbsupport.ru/forumdisplay.php?f=111)
-   -   Little help please, w/ custom user group and author info (https://vborg.vbsupport.ru/showthread.php?t=12022)

JJR512 03-22-2001 02:49 AM

What I want is for some of my members, those who are on my SETI@home team, to have a link to my SETI@home page somewhere in their post. I think it would be cool/neat to have it in the author info area (the left column), right above their registration date.

I tried this with a custom user profile field, and I edited the appropriate template so it shows up in the right spot. But they can edit the contents of the field. This I do not want, because I only want one thing displayed, and only for the certain members. Non-team-members were putting silly stuff in the field, etc.

So now I'm thinking I can make a custom user group (i.e., like Registered or Moderator), called SETI Group Members. I can manually add people to this group. I'm thinking there must be some kind of way the board, when displaying posts, can check to see if the member is a member of that group, and if so, to put this link above the registration date.

I've already made the group; now I just need to know how to make the checking part, and include the link in that spot. Any help, please? :)

03-22-2001 03:09 AM

Code:

if ($post[usergroup] == XX) {
  $setilink = "your/url/here";
} else {
  $setilink ="";
}

That should give you an idea of what to put in showthread.php

03-22-2001 04:02 AM

I just thought of something. I'm on the SETI team, as are moderators and regular members. Obviously, we all can't be part of the same user group. If I add multiple user groups, like SETI_Admin, SETI_Mod, SETI_SuperMod, and SETI_Member, how would the above little code be made to check all those groups?

And assuming I correctly set permissions for each group, would putting a Moderator in another group have any effect on his/her abilities?

03-22-2001 04:06 AM

Or is there maybe a better way to do this? I could make a new field in the user table, and if I manually set the value to 1 for someone, the link would show up. This is probably the best way.

But I don't know how to write the part...the same part, that checks the value to see if it's 1 or not.

03-22-2001 03:31 PM

Code:

if ($post[seti] == 1) {
  $setilink = "<a href=http://your.com/url/here/>SETI member</a>";
} else {
  $setilink = "";
}

You must add a field named "seti" to the User table, and set each seti member to "1" by hand. Add $setilink where you want it to appear under each user's info or in the icon line.

03-22-2001 06:39 PM

OK, thanks! Two questions:

1. Does it matter where in showthread.php I put this code?

2. What is the syntax of a query I could issue to the db through phpMyAdmin to change the value for a member?

03-22-2001 06:42 PM

1. Find
Code:

    if ($post[aim]!="") {
      eval("\$post[aimicon] = \"".gettemplate("aim")."\";");
    } else {
      $post[aim]="";
    }

and put it right after that.
2.
Code:

UPDATE user SET seti='1' WHERE userid='XX'
and substitute the user's ID for XX.

HTH.


All times are GMT. The time now is 08:04 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.02135 seconds
  • Memory Usage 1,719KB
  • 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)post_thanks_navbar_search
  • (1)printthread
  • (7)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
  • bbcode_fetch_tags
  • bbcode_create
  • bbcode_parse_start
  • bbcode_parse_complete_precache
  • bbcode_parse_complete
  • printthread_post
  • printthread_complete