Jump to content
TNG Community
fluffy82

Display Jobs Facts - display issue

Recommended Posts

fluffy82

@mkoche I have another question about your Display Jobs Facts mod.

I have been entering my occupations according to the format JOB CATEGORY - JOB ...INFORMATION in Family Tree Maker, and it works perfectly with your mod. I love how the job categories are included in the statistics. Due to my use of a bunch of other mods, I have one display issue though...

On the person profile, JOB CATEGORY - JOB ...INFORMATION is displayed as follows:

  • job category: removed
  • job: column 1 [colspan 2]
  • information + citations: column 2 [no colspan]

As the job takes up 2 columns, and the information is in a separate column, it sometimes gives weird results (some examples in attachment).

I've been playing around with the inspect tool of my browser, and I think everything might be solved simply by putting the job/information/citations in 1 single cell in stead of two separate cells. My guess is that the colspan=2 does not come from your mod (I haven't found it anyway, and it does also say rrevdata, which indicates that it is created by one of the regroup profile mods). So the easiest way would be to retain the colspan=2, but to place all job info into one cell in stead of 2.

 

Could you point out how and where I can change your mod to get to that result? Place JOB and INFORMATION (+ citations) in one cell?

census open colspan 1.PNG

census open colspan 2.PNG

colspan 1 all.PNG

colspan 1.PNG

original.PNG

Share this post


Link to post
Share on other sites
fluffy82

PS I suppose it's merely a question of turning two <td> into one, but I can't find where your code builds them...

Share this post


Link to post
Share on other sites
fluffy82

Getting closer to the solution (I think *lol*).

I suppose this is where I need to look? Trying to join the two separate "insert:before" into one?

%target:personlib.php%

%location:%
		if(!$custevent['ldsevent'] || $allow_lds) {
%end:%

%insert:before%
// start display jobs facts - construct a job event

$job_id = get_jobid();
if ($custevent['eventtypeID'] == $job_id)
{
	if (strpos($custevent['info'], " - ") != false)
	{
	$jobconstruct = substr($custevent['info'], strpos($custevent['info'], " - ") + 3);
	$arr = explode("...", $jobconstruct, 2);
	$jname = trim($arr[0]).'</td>';
	if (strpos($jobconstruct, "...")) $jdetail = '<td class="databack">'.trim(substr($jobconstruct, strpos($jobconstruct, "...") + 3)); else $jdetail = '<td class="databack">';
	$custevent['info'] = $jname.$jdetail;
	}

}

//end display job
%end:%

      
      
%location:%
				$output .= "<td valign=\"top\" colspan=\"2\" class=\"databack\">" . nl2br( insertLinks($data['fact'][$i]) ) . "$cite&nbsp;</td></tr>\n";
%end:%

%insert:before%
// start display jobs facts - construct a job event
$job_id = get_jobid();
if ($data["eventtypeID"] == $job_id)
  		$output .= "<td valign=\"top\" class=\"databack\">" . nl2br( insertLinks($data['fact'][$i]) ) . "$cite&nbsp;</td></tr>\n";
else
//end display job
%end:%



%location:%
eventplace, age,
%end:%

%triminsert:after%
$events_table.eventtypeID,
%end:%

 

Share this post


Link to post
Share on other sites
mkoche

Hi - just trying to get up to speed on all this! Yes, those are the lines.  I am not wedded to the format at all and would be happy for a better a solution.  If I remember I was really just trying to mimic the tng style.  I haven't noticed any unintended consequences on my own system but am attempting to follow and recreate the issue as best I can.  I really didn't know that anyone else was using the mod!

I will work on it too and try to monitor the forum.

Share this post


Link to post
Share on other sites
fluffy82

No hurry, this is only a hobby and I'm already glad you are willing to look at it. Take your time :)

Share this post


Link to post
Share on other sites
fluffy82

Oh, I was also just realising something. I think (but I'm not entirely sure) that the Regroup Person Profile mod modifies the columns/cells on this page. So the Display Jobs might actually be ok in a modless TNG as it is...

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

×