I mentioned this a while ago, but it got not response and I really need a hand with it.

I suspect that the reason for a lack of response is because most folks will now be using civicrm or contact manager, but (for a whole host of reasons) I've gone back to using contact_dir, which is serving my purposes perfectly.

However, instead of it showing "Owner" and linking to whoever added the entry, I'd like it to show "Job" and maybe link to a results page for all with the same job title.

Is that possible? If not, can someone at least guide me to removing the "Owner" column altogether?

Comments

divrom’s picture

*BUMP*

deadhobo’s picture

I recently ran into the same situation and just started toying around to try and disable the 'Owners' column. After reading through a little bit of the code, it looks to me like the line $header[] = array('data' => t('Owner'), 'field' => 'username can simply be commented out (//$header[] = array('data' => t('Owner'), 'field' => 'username) without any problems that I have seen (search and replace the line).

EDIT: Oops, my above code only removes the column title (it no longer says "Owner", it just says the usernames). In addition to the above change, look for the following:

while ($contact = db_fetch_object($result)) {

and replace that section with

while ($contact = db_fetch_object($result)) {
			$rows[] = array(l($contact->name, 'contact_dir/'. urlencode($contact->cid)),
					$contact->mail,
					$contact->category);
					//l($contact->username, 'user/'. urlencode($contact->uid)));

All it does is comment out the line that outputs the usernames, but just commenting out the line causes syntax errors because PHP is looking for ");" to end the statement. I just moved it to the $contact->category line and everything seems to be hunkydory now.