Jump to content
TNG Community

Documents linked to sources


Michael Jones

Recommended Posts

Michael Jones

I've noticed when you call up an individual, at the bottom the sources are listed by short title. However, if you browse documents and a document is linked to a source, the full source name shows up. I'd rather have it so that if you link a document to a source, it shows the short title under "linked to," rather than the full source title. My guess is that this shouldn't be too hard to change. Any of you coder wizards out there want to give this a shot?

Thanks.

Mike

Link to comment
Share on other sites

In browsedocs.php

change line 131

from

$sources_table.title, $sources_table.sourceID

to

$sources_table.shorttitle, $sources_table.sourceID

change line 155

from

$sourcetext = $prow[title] ? $prow[title] : $prow[sourceID];

to

$sourcetext = $prow[shorttitle] ? $prow[shorttitle] : $prow[sourceID];

i.e. You're changing title to shorttitle in three instances - once on line 131, twice on line 155.

Link to comment
Share on other sites

Michael Jones

In browsedocs.php

change line 131

from

$sources_table.title, $sources_table.sourceID

to

$sources_table.shorttitle, $sources_table.sourceID

change line 155

from

$sourcetext = $prow[title] ? $prow[title] : $prow[sourceID];

to

$sourcetext = $prow[shorttitle] ? $prow[shorttitle] : $prow[sourceID];

i.e. You're changing title to shorttitle in three instances - once on line 131, twice on line 155.

Hmm... maybe I'm doing something wrong, but I did try this and it seemed to have no effect. Any ideas?

Link to comment
Share on other sites

We are talking about the page that starts out with the header "Browse All Histories", right? This is the browsedocs.php file which you access via the Histories link of your menu.

Did you...

- save the browsedocs.php file after making the edits?

- upload the edited browsedocs.php file to the TNG directory of your web server?

- click the refresh (or reload) button on your browser while viewing browsedocs.php?

- clear your browser cache (so the old version of the page isn't just being reloaded from your local cache)? This may or may not be necessary, depending on your browser cache settings.

My suggested edits pull and display shorttitle instead of title from the tng_sources table of the database. The three edits are the only three places in browsedocs.php where the word title appears.

Link to comment
Share on other sites

Michael Jones

We are talking about the page that starts out with the header "Browse All Histories", right? This is the browsedocs.php file which you access via the Histories link of your menu.

Ah... I was actually talking about the Browse Documents Page --so I made the changes to browsephotos.php and it works... I'll probably keep the change on my histories page as well... Thanks so much!

Mike

Link to comment
Share on other sites

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

×
×
  • Create New...