Jump to content
TNG Community
4lexsharpe

User defined fields on Individual

Recommended Posts

4lexsharpe

It would be useful if there were a couple of un displayed blank fields on the individual. These could be populated by admins only and used to create a query in the reports page.

Share this post


Link to post
Share on other sites
Rob Severijns

Alex,

I believe those fields are already available.

They are called Custom Event Types an can be created via Admin --> Custom Even Types.

 

Rob

Share this post


Link to post
Share on other sites
4lexsharpe

Rob, That's what I've used as a work around but they display on the individuals record. Is there a way to not display the event?

Share this post


Link to post
Share on other sites
Rob Severijns

Alex,

The Custom Event Type can not hidden.

The notes and media linked to a Custom Event can be hidden.

For the entire Custom Event to be hidden someone needs to write a mod. I Don't think it already exists.

Rob

Share this post


Link to post
Share on other sites
Brett
1 hour ago, Rob Severijns said:

The Custom Event Type can not hidden.

Alex/Rob

Rob Roy and I have discussed hiding a Custom Event this week. No result yet but if no one can offer a solution we will look into it further.

Share this post


Link to post
Share on other sites
4lexsharpe
38 minutes ago, Brett said:

Alex/Rob

Rob Roy and I have discussed hiding a Custom Event this week. No result yet but if no one can offer a solution we will look into it further.

Brett, Thanks for the update. 

Share this post


Link to post
Share on other sites
Rob Severijns

Brett,

52 minutes ago, Brett said:

Rob Roy and I have discussed hiding a Custom Event this week. No result yet but if no one can offer a solution we will look into it further.

Thx.

I will start a new topic in New Ideas and Suggetions regarding the setting of Private flag for Media files at the Individual and/or Family level.

 

Rob

Share this post


Link to post
Share on other sites
Michel KIRSCH

 Hi All!

Assuming yout Custom Event name is "MYTAG", to hide this event :

Into the personlib.php file, in function doCustomEvents(),

after the lines

    while ( $custevent = tng_fetch_assoc( $custevents ) )    {
        $xnote = '';


insert these lines :

//Hide this event
if ($custevent['tag'] == "
MYTAG")
     continue;

//END of Hide this event

You can define a little array with events to be hidden and :

//Hide these events
$events_to_hide = array("MYTAG", "OCCU", "OTHER");
if(in_array($custevent['tag'], $events_to_hide))
     continue;
// END hide these events

the $events_to_hide can be a list in Mod Manger parameters

$list_of_tags_to_hide = "MYTAG,OCCU,OTHER";

and the array to hide is constructed with :

$events_to_hide = explode("," , $list_of_tags_to_hide);

Michel

 

Share this post


Link to post
Share on other sites
4lexsharpe

Michel,

Thank you that is exactly what I want. I can now set up and run custom query / reports to suit my own needs.

Do you know whether my other idea is achievable? Set the 'place level' to a specific event rather than a place. If bespoke icons are being used for different events then if an address has multiple events you cannot allocate a default icon to that place.

Alex

Edited by 4lexsharpe
added query

Share this post


Link to post
Share on other sites
Ken Roy

Alex,

9 minutes ago, 4lexsharpe said:

Do you know whether my other idea is achievable? Set the 'place level' to a specific event rather than a place. If bespoke icons are being used for different events then if an address has multiple events you cannot allocate a default icon to that place.

Place levels are associated with places and not events.   That said, you could create a Military place level and assign it to Military events like I have done using Roger Moffat's Google Maps - More Place Levels Mod

12 minutes ago, 4lexsharpe said:

Thank you that is exactly what I want. I can now set up and run custom query / reports to suit my own needs.

While Michel's solution might provide what you need, you have better create yourself a mod to install that code change, otherwise you will be back on this forum asking for help next time you upgrade TNG since personlib.php changes in nearly every TNG upgrade

Share this post


Link to post
Share on other sites
Michel KIRSCH
39 minutes ago, Ken Roy said:

While Michel's solution might provide what you need, you have better create yourself a mod

Here is a Mod. It works with a list of tags that you can change in Mod Manager parameters.

Delete your modifications in personlib.php and install this mod with the Mod Manager.

No support (for now) !!

Michel

52 minutes ago, 4lexsharpe said:

Set the 'place level' to a specific event rather than a place.

Sorry, don't know anything about place levels...

Michel

hide_events_v13.0.2.1.zip

Share this post


Link to post
Share on other sites
Rob Roy

Michael,

Installed the mod on both my websites and seems to be working well. Thank you.

Share this post


Link to post
Share on other sites
Brett
13 hours ago, Michel KIRSCH said:

You can load the Mod Hide_events_v13.0.2.1a on the wiki page

Thanks Michel

Much appreciated.

Share this post


Link to post
Share on other sites
Michel KIRSCH
1 hour ago, 4lexsharpe said:

using v 12.3,

Thanks Alex. Will report on the wiki page.

Michel

Share this post


Link to post
Share on other sites
Brett
On 1/11/2021 at 3:13 AM, Michel KIRSCH said:

Here is a Mod. It works with a list of tags that you can change in Mod Manager parameters.

Michel

An enhancement request please. If you have time, please consider an additional option to display when admin user logged in.

Thanks

Share this post


Link to post
Share on other sites
Michel KIRSCH

Hi Brett,

Sorry, i don't understand what's you want exactly... Can you develop your idea?

Michel

Share this post


Link to post
Share on other sites
Michel KIRSCH
On 3/20/2021 at 12:10 PM, Brett said:

please consider an additional option to display when admin user logged in

Brett,

do you mean "Hide events only when administrator is logged in"?

Michel

Share this post


Link to post
Share on other sites
Rob Roy

Michel,  I think the original intent was to unhide the events when the Administrator is logged in.  Basically, unless you are logged in as an administrator, you'd never see it.  At least that is what I think they are trying to get too.

Share this post


Link to post
Share on other sites
Brett
7 hours ago, Michel KIRSCH said:

Hide events only when administrator is logged in

Sorry for the delay in responding.

As Rob said, Admin logged in would see the events. Non admins would have the event hidden.

I am introducing a "reviewed" option and it seems an event is the best option, following on from how Rob does his.

Share this post


Link to post
Share on other sites
Michel KIRSCH

OK Rob and Brett. Understand. Will work on it !

Michel

Share this post


Link to post
Share on other sites
Michel KIRSCH

Done !

Hide events

Michel

Share this post


Link to post
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now

×