Skip Navigation

[Resuelto] Best way to make a photographer's directory

Este hilo está resuelto. Aquí tiene una descripción del problema y la solución.

Problem:
Create user and Edit user fields with CRED form.

Solution:
CRED now support both feature:
1) Create user,
2) Edit user fields

I suggest you try this:
1) Create some custom user fields you need with Types plugin:
https://toolset.com/documentation/user-guides/user-fields/

2) You can use WordPress build-in register form or Create a CRED form for user register in your website:
https://toolset.com/documentation/user-guides/cred-user-forms/

3) in above document, section "Email notifications", there you can send an email with login credentials

4) You can let the user edit their custom user fields in wordpress build-in user profile page, or use CRED to let them edit in front-end.

Relevant Documentation:
https://toolset.com/documentation/user-guides/user-fields/
https://toolset.com/documentation/user-guides/cred-user-forms/

This support ticket is created hace 8 años, 4 meses. There's a good chance that you are reading advice that it now obsolete.

This is the technical support forum for Toolset - a suite of plugins for developing WordPress sites without writing PHP.

Everyone can read this forum, but only Toolset clients can post in it. Toolset support works 6 days per week, 19 hours per day.

No supporters are available to work today on Toolset forum. Feel free to create tickets and we will handle it as soon as we are online. Thank you for your understanding.

Sun Mon Tue Wed Thu Fri Sat
- 9:00 – 13:00 9:00 – 13:00 9:00 – 13:00 9:00 – 13:00 9:00 – 13:00 -
- 14:00 – 18:00 14:00 – 18:00 14:00 – 18:00 14:00 – 18:00 14:00 – 18:00 -

Supporter timezone: Asia/Hong_Kong (GMT+08:00)

This topic contains 31 respuestas, has 2 mensajes.

Last updated by Paulo Ramalho hace 8 años, 1 mes.

Assisted by: Luo Yang.

Autor
Mensajes
#363642

I can't upload images by firefox or chrome.
Here you have it: hidden link

#363846

You are right, The parameter search for User's is on our to - do list, but I can't state any ETA for this feature.
Since your screenshot isn't in English, I am not sure what kind of parameter search form you need.

Also you can pass the URL parameter to your view (which query wordpress users), and use Views filter hook wpv_filter_user_query to add filter in the view:
wpv_filter_user_query
When displaying a View listing users, this filter is applied to the arguments being generated by the View settings before they are passed to the WP_User_Query class.
https://toolset.com/documentation/user-guides/views-filters/wpv_filter_user_query/

#364335

Hi Luoy.

The search fields are in spanish and are "provincia=state" and "nombre=name", these are two of the many custom user fields I have done in Types. (Perfil Fotografo=Photographer's Profile).

Sorry, but I think I still need more assistance with my problem. I'm not a php programmer, however I can read and understand some php scripts and hardcode my themes. I make everything from scratch, over my own css and php framework. I am a long time TYPES user and CRED fits my needs to presenting forms on front end but I feel I can't reach the explanation level you are giving me on VIEWS, sorry.

Right now I have the project stopped by the follow needs.
- changing users permalink generated by Views
- users parametric search with google maps

I though it was a simple thing to do. I've tryed the Adriano's solution and changed the users by CPT, but my Cred form do not appear. Anyway, I fell like and walking in circles with that and maybe I need too much time to learn these Views advanced configurations.

I don't know, but can I send you credentials again for my project?

Thanks again Luoy

#364553

It needs custom PHP codes, if you need more assistance for it, please duplicate same problem in a test site, also point out the problem view URL and page URL, which custom field do you need to filer by, I need a live website to test and debug, thanks

#364627

Hi Luoy.
Thanks for your patience. As soon I have the live development site working I send you the credencials.
Thank you very much.

#364864

Please update this thread or create new thread when your test site is ready, thanks

#368444

Hi Luoy.
I finally publish the test site but I cannot see the option to private message you for the credentials. (are the same ones).
hidden link

Meanwhile I explain you the 03 main problems.

01 - On sidebar there is a Views search field. Right now it is a test search, but I need to filter the users by the follow Types user forms.
a – provincia (state)
b – nombre (name)
The search results must be a search results page.

02 – I need a geolocations point for each photographer (user=fotografos) in the map below the search, with the ability to put the same map, once it is working, on another page of the site.

03 – You have explained before, but I do not know how to do to fix the ugly url from single photographer’s page.
/yesweddo/single-fotografos/?users-filter=3
from
/yesweddo/photographername

#369008

Please fill below private detail box with login details and ftp access of your test site, I need a live website to test and debug this problem, thanks

#369475

Thanks for the details, I can log in your website, could you point out the problem page URL and View URL?

Do I need to create a completed new one?

#369535

Hi Luoy.
I send you the URLS.

- hidden link
Here I have a view, called Search. What I need is a parametric search for the Types User Fields: "nombre", "provincia". The search field appears on site's sidebar and the results must be on a search results page.

- hidden link
I need a Google Map View showing all the registered users with role "fotógrafos", based on the address field. I put a Google Map on site's sidebar just for example purposes.

- You have explained before, but I do not know how to do to fix the ugly url from single photographer’s page.
/yesweddo/single-fotografos/?users-filter=3
by
/yesweddo/photographername

#370023

I checked both view in your website with Chrome browser,
hidden link
hidden link
but both views only display half of the page, I can not edit them, since you are using old version of Views 1.11.1, I am not sure if it is a CSS problem or compatibility problem in your website, could you update all Toolset plugins to the latest version, deactivate other plugins and switch to wordpress default theme.

also please create different thread for different question, this will help other users to find the answers.

#370106

Hi Luoy.
I didn't see this error before but I just updated the Toolset plugins and all run fine now. Sorry for the inconvenience.

#370497

Thanks for the details, I am trying to test and debug in your website, will feedback if there is any found.

#370891

Q1) Filter form of custom user field:
1) I just modified the problem view:
hidden link
in section
using below codes:

[wpml-string context="wpv-views"]Nombr:[/wpml-string] [wpv-user-search-box]
[wpml-string context="wpv-views"]Província:[/wpml-string] [wpv-control field="total_sales" url_param="provincia" type="select" values=", 1, 2, 3, 9" display_values="All, Albacete, Alicante, Almería, Barcelona"]
[wpv-filter-submit name="OK" type="button"]

Since parameter on user fields is not a build-in feature of Views, you will need to manually add more options into the "provincia" field

2) add below codes into your theme/functions.php:

add_filter( 'wpv_filter_user_query', 'prefix_unset_user_roles', 99, 3 );
 
function prefix_unset_user_roles( $query_args, $settings, $view_id  ) {
    if ( $view_id == 172 ) {
		//$query_args['meta_query'] = array('relation' => 'AND',);
        if(isset($_GET['provincia'][0]) && !empty($_GET['provincia'][0])){
			$query_args['meta_query'][] = array(
				'key'     => 'wpcf-provincia',
				'value'   => $_GET['provincia'][0],
	 			'compare' => '='
			);
		}
        if(isset($_GET['wpv_user_search']) && !empty($_GET['wpv_user_search'])){
			$query_args['meta_query'][] = array(
				'key'     => 'wpcf-nombre',
				'value'   => $_GET['wpv_user_search'],
	 			'compare' => 'LIKE'
			);
		}
		//print_r($query_args);
    }
    return $query_args;
}

add_shortcode('wpv-user-search-box', 'wpv_user_search_box');
function wpv_user_search_box($atts){
	$value = 'value="' . stripslashes( urldecode( sanitize_text_field( $_GET['wpv_user_search'] ) ) ) . '"';
	return '<input type="text" name="wpv_user_search" ' . $value . ' class="js-wpv-filter-trigger-delayed" />';
}

See the result post:
hidden link

Q2) GOOGLE MAP
I suggest you follow our document
https://toolset.com/documentation/user-guides/#toolset-maps
To setup your google maps

Q3) Are we talking about this problem page:
hidden link
It needs custom PHP codes, if you needs more assistance for Q2 and Q3, please create different threads for each question, this will help other clients to fined the question, thanks

#370976

Hi Luoy.
Thanks for the feedback.
For template design reasons I put the search here hidden link It is on a page template called page-fotografo.php
It’s the same one created with your code, but it’s not working.

- The loop table appears straight on loading the page with the two registered users. I look the parametric fields documentation and can’t find what is wrong. Besides I need another page results.
- I have two users with photographer role and If I make a search by one of them (whit his name and state) it results me no items found.

Yes, now I know that parameter search on user fields is not possible with Toolset. In fact, ALL MY 03 PROBLEMS are relate with this feature.

Sorry, but I have no time to create another threads and waiting for other users response. In fact I’m not asking for nothing new, since the beginning I had these 03 major problems with users fields. (SEARCH, MAP, UGLY URL). I am sorry if I am boring you or the team with that but I really need some assistance.

Let’s say the map issue: after all posts on this thread you tell me to show the documentation of creating Google Maps!! The Google Maps section simply do not appear if I choose users on a View. It seems like I’m walking on circles.

I have bought Toolset especially for two projects and this is the more important. I have a March 05th deadline and a presentation of this website in front of 200 people on March 07th. Right now I’m stressed because I really don’t know how to fix that.

I repeat. I need assistance because I am working with USERS FIELDS, and Toolset is not ready for what I need without some extra coding. I didn’t know that before buying the product. I believe that if was using post types I could make everything without any help. I have two more sites to publish with Toolset without any problem.

PLEASE, I repeat here my 03 major points again.
01 - I need to filter the users by the follow Types user forms.
a – provincia (state)
b – nombre (name)
The search results must be a search results page.
02 – I need a geolocations point for each photographer (user=fotografos) in the sidebar map.
03 – You have explained before, but I do not know how to do to fix the ugly url from single photographer’s page.
/yesweddo/single-fotografos/?users-filter=3
from
/yesweddo/photographername

This ticket is now closed. If you're a WPML client and need related help, please open a new support ticket.