Simple Machines Community Forum

SMF Support => SMF 2.0.x Support => Topic started by: brucegust on November 25, 2019, 09:15:54 PM

Title: Where is a member's profession displayed?
Post by: brucegust on November 25, 2019, 09:15:54 PM
I just updated my client to version 15. She was using 7 so I'm guessing there may very well be several changes in terms of navigation and what's displayed, but I don't know...

Here's the thing:

It used to be that when you logged on to the Admin page, you would in the upper left hand corner an alert that told you how many members were awaiting approval. You would click on that link and be given a list of candidates and from there you could see each of their respective professions.

At this point, she doesn't have any members awaiting approval, but she is seeing activity in the Messages section that's been created by users that she recognizes as bogus. What's made it easy to confirm her suspicions was the profession of these renegades. But when you click on "View the Member List," there's no reference to their profession and when I look at the member table, I don't see a column heading that suggests this info is even available in the system.

Am I missing something?

Where would a user's profession be displayed?
Title: Re: Where is a member's profession displayed?
Post by: Sir Osis of Liver on November 25, 2019, 09:22:11 PM
Sounds like advanced profile fields.  Upgrade shouldn't have broken that if you patched from .7 to .15 in package manager.
Look in Admin -> Core Features, is Advanced Profile Fields enabled?  Do you see the field in Admin -> Features and Options -> Profile Fields?
Title: Re: Where is a member's profession displayed?
Post by: brucegust on November 25, 2019, 09:40:59 PM
Evening, Sir!

Since posting this, I found something: In the database, there's a table called "smf_custom_fields." In that table, I see "Occupational Specialty," so it is in the system!

But...

I don't know how to ensure that field is accessible and it sounds from your post that there's a setting I need to activate in order for it to be displayed.

When I go to Admin, I don't see "Core Features." The "Profile Fields" suggestion you made sounds completely on point, but I don't how to get there.

When I go to "Features and Options," I don't see Profile Fields.

What do you think?
Title: Re: Where is a member's profession displayed?
Post by: brucegust on November 25, 2019, 09:47:02 PM
OK! I did find "Profile Settings" and I was able to activate it! But it's still not displaying on the user's individual profile or on the member list. Is there a way in which you can dictate where the field shows up?

Here's a screenshot of what I'm looking at...

Title: Re: Where is a member's profession displayed?
Post by: brucegust on November 25, 2019, 09:51:16 PM
This is where I want the "occupation" specialty profile setting to show up.
Title: Re: Where is a member's profession displayed?
Post by: efk on November 25, 2019, 09:57:55 PM
Slow down, click on Modify button and you should be able to set it be like that from given options, read what you have inside Modify. About Standard Profile Fields, I think they can't be modified the same way you can manipulate with Custom Profile Fields. So go experiment for some time before asking more questions :)
Not sure atm, but you might need mod to display on member list.
Title: Re: Where is a member's profession displayed?
Post by: brucegust on November 26, 2019, 04:06:46 PM
This is what I get when I click on "Modify..."

There's nothing on this screen that I can find that would facilitate the field showing up on a list of members anywhere in the app.

What am I missing?
Title: Re: Where is a member's profession displayed?
Post by: brucegust on November 26, 2019, 04:08:34 PM
Admin -> Configuration -> Features and Options -> Profile Fields -> Modify

That's where I'm at. Let me know if I need to go somewhere else.
Title: Re: Where is a member's profession displayed?
Post by: Arantor on November 26, 2019, 04:23:55 PM
Showing them on the memberlist is not a feature in 2.0, but it is in 2.1.
Title: Re: Where is a member's profession displayed?
Post by: Sir Osis of Liver on November 26, 2019, 04:42:17 PM
It can be done (think I did it once), requires some custom coding.
Title: Re: Where is a member's profession displayed?
Post by: efk on November 26, 2019, 06:29:26 PM
Custom Fields On Memberlist
https://custom.simplemachines.org/mods/index.php?mod=1520

I thought its easier.
Title: Re: Where is a member's profession displayed?
Post by: brucegust on December 01, 2019, 09:26:34 PM
eftk...

Not sure whether or not the number of errors contained in the test installation of this mod represents a dealbreaker or not. I have made a backup of everything, so I've got a net, but if this was you, would you proceed or would you be looking for another option?

Here's a screenshot:

Title: Re: Where is a member's profession displayed?
Post by: Sir Osis of Liver on December 01, 2019, 09:52:09 PM
If you click on the edit widget left side, it will show you the target code and the edit, you can do it manually.  If you proceed with the install as is, bad things will happen.
Title: Re: Where is a member's profession displayed?
Post by: efk on December 01, 2019, 10:04:22 PM
brucegust I am wrong guy to ask that, but when I see problems I always avoid. Also there is at bottom in Package Manager "Advanced" and there you can emulate version before installing, but I usually let friends to play with that, and last time when I've touched that was about year ago. Also search for topic for that mod, maybe there are some instructions that you need to know. I always read a lot about mod before installing, and from that I learned almost all what I know, also have lists of useful mods on side.
And of course, listen what people with nice amount of posts are saying to you.
Title: Re: Where is a member's profession displayed?
Post by: aegersz on December 01, 2019, 11:19:58 PM
Yes, I tried to install that and after making the modifications manually on 2.0.15, i got this:

Table 'smf209.custom_fields' doesn't exist
File: /var/www/html/Packages/temp/install.php
Line: 16


the only difference is the "." after smf209 - i use a "_" so it won't install anyway !
Title: Re: Where is a member's profession displayed?
Post by: aegersz on December 02, 2019, 12:33:45 AM
Just for you - I got this working on 2.0.15 (still have an issue with the config formatting though) by:

1. I had to unzip the mod into it's own directory in .Packages

2. I had to make the minor manual changes to the existing code

3. modify install.php and removed any database code to now look like:

<?php

if (file_exists(dirname(__FILE__) . '/SSI.php') && !defined('SMF'))
{
        
$ssi true;
        require_once(
dirname(__FILE__) . '/SSI.php');
}
elseif (!
defined('SMF'))
        exit(
'<b>Error:</b> Cannot install - please verify you put this in the same place as SMF\'s index.php.');

?>



4. add the column into the table (your db and table name may vary):

USE smf209;
ALTER TABLE smf209_custom_fields
ADD   show_mlist tinyint(3)
;


5. check the box to display on memberlist in Admin -> Features and Options -> Profile Fields > Profession (that i added)

it works now on 2.0.15 !
Title: Re: Where is a member's profession displayed?
Post by: aegersz on December 02, 2019, 01:37:38 AM
forget all that, the field displays in the Topic anyway and the memberlist field still eludes me  :P >:(
Title: Re: Where is a member's profession displayed?
Post by: brucegust on December 03, 2019, 03:01:11 PM
Guys, this is still a "thing..."

I went out to https://custom.simplemachines.org/mods/index.php?action=parse and went through every change in the code by hand, uploaded it and got an error that was generated from the "MemberSettings.php" page that said, "show_mlist" isn't a column in the 'custom_fields' table."

And they're right.

Any other ideas?

This was a fixture in my client's previous version and I really do want to figure it out.

Again, I just want to have one more column on the page that displays the members. That column would be their occupation.
Title: Re: Where is a member's profession displayed?
Post by: Arantor on December 03, 2019, 03:05:48 PM
Well, the plugin would have a script that would have to be run to add the show_mlist column... it'll be part of the zip file and the parse page should indicate you have to run this.

And we understand your need and what you're trying to do, just this is not something the core supports at this time, so you'll need to reimplement it using that mod.
Title: Re: Where is a member's profession displayed?
Post by: brucegust on December 03, 2019, 03:21:56 PM
The problem with the zip file is that when I attempted to upload it and run it, it generated all kinds of errors, however...

Popping the hood on the install.php page, I see your point.

Can I just run the install.php page from the root directory on its own? Seems like the only thing that its affecting is the database. All of the other code modifications have been done.
Title: Re: Where is a member's profession displayed?
Post by: Arantor on December 03, 2019, 03:24:27 PM
Yup, it's there to add the show_mlist column that the rest of the code depends on.