Skip Navigation

[Resolved] waqas please a follow up

This support ticket is created 4 years, 10 months ago. 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.

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/Karachi (GMT+05:00)

This topic contains 40 replies, has 2 voices.

Last updated by martinP-13 4 years, 9 months ago.

Assisted by: Waqar.

Author
Posts
#1488667

thankyou waqas , i have a test domain that i have duplicated my site onto , what is the easiest way from there to delete all the toolset stuff so i can start afresh with the rest of the site intact. thanks

#1488833

To clean only Toolset related data, you can follow these steps:

1. You'll go to the following Toolset section to delete all items from the available list:

- Post Relationships:
hidden link

- Custom Fields:
hidden link

- Post Views:
hidden link

- WordPress Archives
hidden link

- Content Templates:
hidden link

- Post Types ( delete all custom post previously added by Toolset ):
hidden link

2. At this point, the interface to manage the deleted post types will not be available in the Admin area but their post entries will still be available in the database.

To remove/clean them, you can use the plugin like "Custom Post Type Cleanup" ( https://wordpress.org/plugins/custom-post-type-cleanup/ ). It will delete all unused posts and their custom field data from the database.

After that, you can start adding the Toolset items, as needed.

#1489545

hi waqas before i continue can you clear a few thing up please? please note the caps are so you can see what i have added , i am not being rude.....

A). Custom Post Types:

1. Events ( I understand this will be controlled by the events plugin )

YES TOOLSET WILL JUST LINK TROUGH THIS CPT

................................................................................
2. Persons:
In order to be used in any role ("judge", "owner", "handler", "breeder" etc), a person will need to be available as a post in this post type.

I HAVE NO IDEA WHAT THIS MEANS ? CAN YOU CLARIFY A BIT MORE SPECIFICALY PLEASE

The fixed custom fields data like contact information, kennel affix etc, which won't be changing with events will be saved with this post type.
............................................................................................................
3. Dogs:
Each dog's fixed custom fields data like age, sex, sire, dam, etc, which won't be changing with events will be saved with this post type.

HOW WILL BREEDER FIT INTO THIS ? A DOGS BREEDER NEVER CHANGES
............................................................................................................................
Note: You don't need separate post types for saving sire and dam of a dog. You can create a select type custom field in this post type for sire and dam and populate the options, dynamically from the same dog posts, using the "wpt_field_options" filter.
( ref: https://toolset.com/documentation/programmer-reference/types-api-filters/#wpt_field_options )

We've discussed this in the past:
https://toolset.com/forums/topic/custom-field/#post-1190447
........................................................................................

4. Person Participations:
This post type will hold the information/record of each person's participation in an event, in a particular role ("judge", "owner", "handler", "breeder" etc).

WHERE AND HOW DOES THE INFO FOR THIS GET ENTERED? I DO NOT GET THIS PART.....
.......................................................................................................
5. Dog Participations:
This post type will hold the information/record of each dog's participation in an event, and the position/place and award that was secured (if any).

WHERE AND HOW DOES THE INFO FOR THIS GET ENTERED? IS THIS WHERE I WOULD HAVE MY PLACEMENT FIELDS FOR THE EVENTS???

.............................................................................................................................
B). Post Relationships:

WHICH RELATIONSHIP WOULD HAVE THE CUSTOM FIELD FOR THE DOGS PLACEMENTS AT AN EVENT ?

1. Dog -> Persons (breeders):
Since you mentioned that each dog can have multiple persons as breeders, you can create a one-to-many relationship between them.
.........................................................................................
2. Events -> Person Participations:
Each person's participation record can be related to only one event, so you'll create a one-to-many relationship between them.

TEST PERSON 1 COULD HAVE A DOG IN 1000 EVENTS IN THEORY, IS ONE TO MANY CORRECT?

...................................................................................................

3. Person Participations <-> Persons:
Multiple persons can participate in an event in multiple roles, so you'll create a many-to-many relationship between them.

IS THIS WHERE I WOULD SPECIFY A JUDGE HANDLER ETC? AGAIN I DO NOT UNDERSTAND THIS
...................................................................
4. Events -> Dog Participations:
Each dog's participation record can be related to only one event, so you'll create a one-to-many relationship between them.

A DOG COULD BE IN 500 EVENTS ? NOT JUST ONE , AM I MISSING THE POINT HERE , I DONT GET IT?

........................................................................................................................

5. Dogs -> Dog Participations:
Each dog's participation record can be related to only one dog, so you'll create a one-to-many relationship between them.

A DOG COULD BE IN 500 EVENTS ? NOT JUST ONE , AM I MISSING THE POINT HERE , I DONT GET IT?

..................................................................................................................................

With this basic structure of post types and post relationships, you'll have a simplified foundation for storing different data items, in a logical and easy-to-retrieve way.
BRILLIANT!
................................................................................................................
In summary, the static/fixed data for persons, events, and dogs should be saved in custom fields in their respective post types.

WHERE DOES THE STAKE GET ENTERED? ON EVENTS? WHERE SO PLACES GET ENTERED NOW ? WHERE DOES THE CUSTOM FIELD KC AFFFIX ( CAN BE A DOGS OR A PERSONS) FIIT IN ?

The data items which will change with respect to events should be saved in their relevant participation post types.

AGAIN IM A LITTLE LOST.....

thankyou so much waqar for your help but as it stands i dont even know how i set up the places and where for the events. and how to enter a dog for that place.....

#1489605

so basically , what post yype do i add the custom field for places to show on events for the dogs? like hidden link

what post type do i add the custom field to show an affix ? dogs or persons?? ( an affix can be for a dog or any of the persons(( and the handler breeder owner)) ) a person can have many affixes and a dog can have an affix before AND after , would i be better to put the affixs on persons and then use a function like the question below to add them to the dog? (i think i answeered my own question here)

where and how is a person defines as a breeder ,owner,handler ? i really dont get this bit?? are they a select custom field on persons?>

my test domain details are
hidden link login details are gundogworld United999!!
hidden link login details are gundogworld United999!!
hidden link login details are carpersmate1 uniteD99!!

thanks waqas i feel with theselast niggles clear in my mind you was right it wont take long to set up hopefully thanks

#1489607

Note: You don't need separate post types for saving sire and dam of a dog. You can create a select type custom field in this post type for sire and dam and populate the options, dynamically from the same dog posts, using the "wpt_field_options" filter.
( ref: https://toolset.com/documentation/programmer-reference/types-api-filters/#wpt_field_options )

We've discussed this in the past:
https://toolset.com/forums/topic/custom-field/#post-1190447

i have done this and it functioning , the problem is i hit the select box and it lists the dogs names , thats ok while there are only 2 dogs , but when restructure is complete and data entered there could be 5000 dogs! it will be impossible to scroll trough these , is there a way to type in dogs name and the results to select are filtered?> if this cant be achieved i thing a rethink will be needed as it will be unworkble.... thankyou waqas

#1490049

hey waqar , if you could just give me a few answers for now so i can continue work on the site today that would be awesome!! many many thanks again

#1490245

Hi Martin,

Thank you for sharing these questions.

Reading these I feel it would be easier and quicker to understand and follow my suggested structure If I share it with you in the form of a test website covering post types, relationships, and fields.

If you agree, I can share a test website with you by tomorrow and then you can examine it, test it and ask any question if any point isn't clear.

Please let me know if this sounds good.

regards,
Waqar

#1490669

it sounds very good waqar , i dont feel im far away but i fear 1 million questions would follow..... ill make a back up of the carpers mate , feel free to use it for the test as it has all my plugins etc in place as its a replica of my original site.. thanks waqar i look forward to it as i really need this up and running now!! thanks again

martin

#1492411

any joy waqar?

#1492871

thank you waqar i will take a good look in the morning your assistance is very much appreciated!

#1495381

hi waqar im having a little trouble with this ,im hoping i dont need to revert to the old way , i cant seem to get things i need here now ,

a few examples
username gundogworld password United999!! for the carpersmate test domain and original site gundogworld.

1) if im on an event page like here hidden link , how do
a) i say who my 4 judges where
b) stipulate a dog for a position ? i also need to declare an owner and a handler for a dog at this event(as owner and dog can change from event to event)
c) why does person appearance role display here? i just can set owner,handler etc ? there is no role for an event ? there are people for an event and a person would have a role as judge or a role for a dog in the event of breeder handler owner.

same login details , this is how old one worked> hidden link
a) event -dogs ( notice i can select dog ,handler and place or add a new dog ,in new system i would also need to add owner to this part im presuming i would use the same as the likes for dam and sire in custom code somehow)

b) event-judges( igone the custom field its an old field that should of been deleted) i can specify my judges here .
this would display as follows ( hidden link)

the original site used the php file to get the views into here.

these are my major obsticles , i feel other little bits im confident of doing myself. thanks waqar for your constant support

#1495391

another quick one here hidden link , 1 dog can have a handler breeder owner and can be judged by a judges , these 4 can change at every trial so wouldnt it need to be one dog to many people ? or am i just being dumb?
thanks

#1496241

Hi Martin,

First, a little correction about what I shared earlier about the relationship between "Person Participations" and "Persons"
( ref: https://toolset.com/forums/topic/waqas-please-a-follow-up/#post-1487297 )

3. Person Participations <-> Persons:
Multiple persons can participate in an event in multiple roles, so you'll create a many-to-many relationship between them.

I apologize and the correct relationship, in this case, would be

3. Persons -> Person Participations:
Each person's participation record can be related to only one person, so you'll create a one-to-many relationship between them.

This is already fixed on my test website and on your website, you can delete the existing "Person Participations Persons" relationship and set a new one, as it is on my test website.
( screenshot: hidden link )

As for your recent questions, they suggest that there is some confusion regarding the role of the post type "Person Participations".

Let me clarify this through some example case/scenario:

- Suppose your website has an event post named "Event X".

- A person "Jeff" participated in the "Event X" as a "judge".
- A person "Kelly" participated in the "Event X" as a "judge".
- A person "Tom" participated in the "Event X" as a "judge".

- A person "Jeff" also participated in the "Event X" as a "handler".
- A person "Tom" also participated in the "Event X" as a "handler".
- A person "John" participated in the "Event X" as a "handler".
- A person "Sam" participated in the "Event X" as a "handler".
- A person "Paul" participated in the "Event X" as a "handler".

- A person "Kelly" also participated in the "Event X" as an "owner".
- A person "John" also participated in the "Event X" as an "owner".
- A person "Sam" also participated in the "Event X" as an "owner".
- A person "Paul" also participated in the "Event X" as an "owner".

Now that we have clearly laid out how each person participated in a particular event, we can start adding the records of each participant's participation.

Please note that the total participants in this event are 6 (Jeff, Kelly, Tom, John, Sam, Paul), but their roles are repeating making the total role records to 12 entries for this event. This means you'll be adding 12 new posts in the post type "Person Participations" (and not 6).
( 1 post in the post type will represent 1 record or entry of each participation, even if the person is repeating since the role is different )

For even better understanding please refer to an example post "Person B appears as a judge in Event B" in the "Person Appearances" post type in my test website and the following screenshot:
hidden link

Using the same rule, you can add all 12 posts/records in your "Person Participations" for this "Event X" and then move on to the next events.

To include the information about which "Dog" a "Person" "handled" or owned "owned" in an event, you can use a select type custom field with dog options dynamically generated, similar to sire and dam selection.

In your field group "Person Appearance Details", you can include a new select type custom field "Person Appearance Dog", and then include a "wpt_field_options" filter function for this field too.
( screenshot: hidden link )

Also this field group "Person Appearance Details" should be available only for the "Person Participations" post type and not all post types.

I hope this helps.

regards,
Waqar

#1496365

thanks waqar , so i dont add the details for the evnt on the event page but rather the Person Participations page ? so i can select an event to attach the person too ? ill have a look later. thnks again

#1497299

1) so i get it now. same for a dog or a person

create dog/person
create a dog/person appearance and select the event role etc
and thats it. then i just sort out the views for what i want and where ?

2) hidden link , i can not select any events it just brings up 1 event , i have thousands? i have double cheked and i have all the same settings as your site,i have some extra custom fields.

3) same here hidden link ,i can not select any events it just brings up 1 event , i have thousands?