Custom profile field in showgroups.php

Collapse
X
 
  • Time
  • Show
Clear All
new posts
  • Cold Steel
    Senior Member
    • Apr 2000
    • 383
    • 3.0.1

    Custom profile field in showgroups.php

    I've added custom field 16 (Extended Biography):

    Multiple-line text box
    Field Required: No
    Editable by user: Yes
    Hidden on profile: No
    Searchable on members list: No

    I want this field to show up on http://forums.asiansinc.com/showgroups.php

    After searching for a long time through this forum, I've tried various variations of

    $user[field16]
    $userinfo[field16]
    etc.

    Nothing worked.

    Can someone tell me what code I should use to get it to display?

    Thanks!
    Richard Young, Esq.
    asian forums | asians
    Reverse Funnel System - Fastest Way To Monetize Your Forum
  • mtha
    Senior Member
    • Oct 2002
    • 348
    • 3.6.x

    #2
    Idea:
    - You have to edit showgroup.php file, find the part where it read the information from database for showgroup (query SELECT something)
    - Add to the query so that it also read all field (or field16) from customfield table

    by that time, you will be able to use field16 in your template

    I didnt actually look at the file, so cant tell you excactly where it is right now.

    Comment

    • Cold Steel
      Senior Member
      • Apr 2000
      • 383
      • 3.0.1

      #3
      Thanks!
      Richard Young, Esq.
      asian forums | asians
      Reverse Funnel System - Fastest Way To Monetize Your Forum

      Comment

      • mtha
        Senior Member
        • Oct 2002
        • 348
        • 3.6.x

        #4
        something like this:

        Code:
        $users = $DB_site->query("
        	SELECT userfield.*, user.*, usergroup.usergroupid, usergroup.title, user.options
        	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)
        	WHERE (usergroup.genericoptions & " . SHOWGROUP . ")
        ");

        and

        Code:
        $moderators = $DB_site->query("
        	SELECT userfield.*, user.*,moderator.*
        	FROM " . TABLE_PREFIX . "moderator AS moderator
        	INNER JOIN " . TABLE_PREFIX . "user AS user USING(userid)
        	INNER JOIN " . TABLE_PREFIX . "userfield AS userfield USING(userid)
        	#ORDER BY user.username
        ");

        Comment

        • Cold Steel
          Senior Member
          • Apr 2000
          • 383
          • 3.0.1

          #5
          Since this requires code modification, maybe we should discuss it here:



          If you have any idea on how to edit the code, can you contact me either via PM or any online chat client?
          Richard Young, Esq.
          asian forums | asians
          Reverse Funnel System - Fastest Way To Monetize Your Forum

          Comment

          widgetinstance 262 (Related Topics) skipped due to lack of content & hide_module_if_empty option.
          Working...
          😀
          😂
          🥰
          😘
          🤢
          😎
          😞
          😡
          👍
          👎