Support Forum
2 questions:
1- If i go to "Profile, profile options" and choose to show the profile with the "forum profile page". When I go on the forum and click a member, I don't see any information, all I get is "guest" information, no email, etc... If I choose the "pop up window" option, everything is fine, i know see the informations.
I mostly do not want to use the popup because the site will be used a lot on mobile devices... (Mobile theme? *wink wink* )
2- On the member listing page, it is VERY important for me to be able to search users with their WP Login although they use "Firstname Lastname" on the forum... What could I edit and where to just change the sql query?
Thank you very much, great work on this forum.
Your first issue I am totally unable to replicate either on our live site or my local test and development systems. I think I need to see this in action to even begin to diagnose what your problem might be.
Our first mobile theme will be offered for beta very, very shortly. I think we said within a month of the release of 5.3.0 and I believe we are well on target for that. We are using an alpha on this site in fact.
Your second question I am going to have to research and take a closer look at. I found an anomaly here in that the SP member search uses display name only and the SP admin users search uses the WP login name which is a bit odd.
The majority of people do not want to use or see the login name so we do actually keep it hidden at all times from all users (except for forum admins). If you want to open this up in the members search then obviously that is fine with us but I will need to see if I can find a filter that you can use as we will not change core code for this.
If you want me to look closer at your first point then as I say - I will need to take a look so if you would like to make me an account and then PM credentials to both myself and to 'Mr Papa'. Please include in the PM a link to your site, a link to this thread and brief reminder of the problem. And one of us will take a look for you.
YELLOW
SWORDFISH
|
Just paid a quick visit to your site and the profile as page option seems to working as expected... But I did reset the tabs and menus as I see they had become scrambled.
About the search - let us confirm please...
- Are you referring to the front-end/public 'members listing'?
- if this changes then this will allow any user who has permission to view the membership list to also search on login name. So - are you sure?
YELLOW
SWORDFISH
|
1st : Thank you so much for your support!
2nd : Yes and yes. (Listing at .com/discussions/members/) Site is for employees only. Everything is "public" between the employees. WP login is the employee number and I installed a plugin which changes the public name to Firstname Lastname on registration, but users still need to be able to search themselves by WP login "number" in my case.
Thanks again!
OK. You will need to add some filter code to your Simple:Press theme. The file you need is called spFunctions.php and you will find it in the /templates folder of your SP theme. As always we recommend that you create your own SP theme so that any customisation is not lost during a future update. (http://codex.simple-press.com/.....g-a-theme/).
I would suggest you click on the 'raw code' button - copy the resultant code to your clipboard and then paste it into the file to avoid potential typing errors. Anywhere in that file will do as ling as it is within the php tags top and bottom.
add_filter('sph_members_list_query', 'add_login_name', 1, 2); function add_login_name($q, $ob) { $search = (!empty($_POST['msearch']) && !isset($_POST['allmembers'])) ? sp_esc_str($_POST['msearch']) : ''; $ug = (!empty($_GET['ug'])) ? sp_esc_int($_GET['ug']) : $ug_select; if(!empty($search)) { $where = 'posts > -2 '; if(!empty($ug)) { $where .= 'AND '.SFMEMBERSHIPS.'.usergroup_id = '.$ug.' '; } $where .= 'AND ('.SFMEMBERS.'.display_name LIKE "'.$search.'%" OR '.SFUSERS.'.user_login LIKE "'.$search.'%")'; $q->where = $where; } return $q; }
Give that a try.
YELLOW
SWORDFISH
|
1 Guest(s)