Bugzilla – Attachment 12832 Details for
Bug 8917
Track clicks to links external to Koha
Home
|
New
|
Browse
|
Search
|
[?]
|
Reports
|
Help
|
New Account
|
Log In
[x]
|
Forgot Password
Login:
[x]
[patch]
Bug 8917 : Adding link tracking to the opac detail page, without xslt
Bug-8917--Adding-link-tracking-to-the-opac-detail-.patch (text/plain), 3.76 KB, created by
Chris Cormack
on 2012-10-15 19:28:47 UTC
(
hide
)
Description:
Bug 8917 : Adding link tracking to the opac detail page, without xslt
Filename:
MIME Type:
Creator:
Chris Cormack
Created:
2012-10-15 19:28:47 UTC
Size:
3.76 KB
patch
obsolete
>From 5f8e81fa52f7d5da6c744d267e52a79f735c3632 Mon Sep 17 00:00:00 2001 >From: Chris Cormack <chrisc@catalyst.net.nz> >Date: Mon, 15 Oct 2012 11:55:51 +1300 >Subject: [PATCH] Bug 8917 : Adding link tracking to the opac detail page, > without xslt > >--- > koha-tmpl/opac-tmpl/prog/en/modules/opac-detail.tt | 22 ++++++++++++++++++-- > opac/opac-detail.pl | 1 + > 2 files changed, 21 insertions(+), 2 deletions(-) > >diff --git a/koha-tmpl/opac-tmpl/prog/en/modules/opac-detail.tt b/koha-tmpl/opac-tmpl/prog/en/modules/opac-detail.tt >index f740488..a3d0dc6 100644 >--- a/koha-tmpl/opac-tmpl/prog/en/modules/opac-detail.tt >+++ b/koha-tmpl/opac-tmpl/prog/en/modules/opac-detail.tt >@@ -461,7 +461,19 @@ YAHOO.util.Event.onContentReady("furtherm", function () { > <br />[% END %] > <!-- here you might do a tmpl_if name="toc" and use greybox or equivalent for table of contents --> > >- [% IF ( MARCurl.OPACurlOpenInNewWindow ) %]<a href="[% MARCurl.MARCURL %]" title="[% MARCurl.MARCURL %]" target="_blank">[% ELSE %]<a href="[% MARCurl.MARCURL %]" title="[% MARCurl.MARCURL %]">[% END %] >+ [% IF ( MARCurl.OPACurlOpenInNewWindow ) %] >+ [% IF trackclicks == 'track' || trackclicks == 'anonymous' %] >+ <a href="/cgi-bin/koha/tracklinks.pl?uri=[% MARCurl.MARCURL |url%]" title="[% MARCurl.MARCURL %]" target="_blank"> >+ [% ELSE %] >+ <a href="[% MARCurl.MARCURL %]" title="[% MARCurl.MARCURL %]" target="_blank"> >+ [% END %] >+ [% ELSE %] >+ [% IF trackclicks == 'track' || trackclicks == 'anonymous' %] >+ <a href="/cgi-bin/koha/tracklinks.pl?uri=[% MARCurl.MARCURL |url%]" title="[% MARCurl.MARCURL %]"> >+ [% ELSE %] >+ <a href="[% MARCurl.MARCURL %]" title="[% MARCurl.MARCURL %]"> >+ [% END %] >+ [% END %] > > [% MARCurl.linktext %]</a> > [% IF ( MARCurl.notes ) %]<ul>[% FOREACH note IN MARCurl.notes %]<li>[% note.note %]</li>[% END %]</ul>[% END %]</li> >@@ -775,7 +787,13 @@ YAHOO.util.Event.onContentReady("furtherm", function () { > [% IF ( itemdata_ccode ) %]<td class="collection">[% ITEM_RESULT.ccode %]</td>[% END %] > <td class="call_no">[% IF ( ITEM_RESULT.itemcallnumber ) %] [% ITEM_RESULT.itemcallnumber %][% IF ( OPACShelfBrowser ) %] (<a href="/cgi-bin/koha/opac-detail.pl?biblionumber=[% ITEM_RESULT.biblionumber %]&shelfbrowse_itemnumber=[% ITEM_RESULT.itemnumber %]#shelfbrowser">Browse shelf</a>)[% END %][% END %]</td> > [% IF ( itemdata_enumchron ) %]<td class="vol_info">[% ITEM_RESULT.enumchron %]</td>[% END %] >- [% IF ( itemdata_uri ) %]<td class="url"><a href="[% ITEM_RESULT.uri %]">[% ITEM_RESULT.uri %]</a></td>[% END %] >+ [% IF ( itemdata_uri ) %]<td class="url"> >+ [% IF trackclicks == 'track' || trackclicks == 'anonymous' %] >+ <a href="/cgi-bin/koha/tracklinks.pl?uri=[% ITEM_RESULT.uri | url %]"> Link to resource </a> >+ [% ELSE %] >+ <a href="[% ITEM_RESULT.uri %]">[% ITEM_RESULT.uri %]</a> >+ [% END %] >+ </td>[% END %] > [% IF ( itemdata_copynumber ) %]<td class="copynumber">[% ITEM_RESULT.copynumber %]</td>[% END %] > <td class="status">[% INCLUDE 'item-status.inc' item = ITEM_RESULT %]</td> > [% IF ( itemdata_itemnotes ) %]<td class="notes">[% ITEM_RESULT.itemnotes %]</td>[% END %] >diff --git a/opac/opac-detail.pl b/opac/opac-detail.pl >index cdb4a5a..277b9cf 100755 >--- a/opac/opac-detail.pl >+++ b/opac/opac-detail.pl >@@ -973,5 +973,6 @@ if (C4::Context->preference('OPACLocalCoverImages') == 1) { > if (C4::Context->preference('OpacHighlightedWords')) { > $template->{VARS}->{query_desc} = $query->param('query_desc'); > } >+$template->{VARS}->{'trackclicks'} = C4::Context->preference('TrackClicks'); > > output_html_with_http_headers $query, $cookie, $template->output; >-- >1.7.9.5
You cannot view the attachment while viewing its details because your browser does not support IFRAMEs.
View the attachment on a separate page
.
View Attachment As Diff
View Attachment As Raw
Actions:
View
|
Diff
|
Splinter Review
Attachments on
bug 8917
:
12831
|
12832
|
12833
|
12834
|
12998
|
12999
|
13000
|
13001
|
14058
|
14059
|
14060
|
14061
|
15669
|
15670
|
15671
|
15672
|
15711
|
15712
|
15713
|
15714
|
15715
|
15716
|
15783
|
15784
|
15785
|
15786
|
15787
|
15812
|
15815
|
15818
|
15819
|
15820
|
15821
|
15822
|
15823
|
15824
|
15825
|
15850
|
15851
|
15852
|
15853
|
15854
|
15855
|
15856
|
15857
|
15858