Bugzilla – Attachment 59200 Details for
Bug 17937
Adding item description to Twitter Summary
Home
|
New
|
Browse
|
Search
|
[?]
|
Reports
|
Help
|
New Account
|
Log In
[x]
|
Forgot Password
Login:
[x]
[patch]
Bug 17937 Adding item description to Twitter Summary
Bug-17937-Adding-item-description-to-Twitter-Summa.patch (text/plain), 5.21 KB, created by
Caitlin Goodger
on 2017-01-19 01:56:09 UTC
(
hide
)
Description:
Bug 17937 Adding item description to Twitter Summary
Filename:
MIME Type:
Creator:
Caitlin Goodger
Created:
2017-01-19 01:56:09 UTC
Size:
5.21 KB
patch
obsolete
>From 5490b2fc8382f53258b82d327db39eaaa1aacf96 Mon Sep 17 00:00:00 2001 >From: Caitlin Goodger <caitlingoodger.student@wegc.school.nz> >Date: Wed, 18 Jan 2017 23:09:35 +0000 >Subject: [PATCH] Bug 17937 Adding item description to Twitter Summary > >Test Plan >1: Apply Patch >2: Enable Twitter Summary and enter a Twitter account >3: To test you can go to this site. >https://cards-dev.twitter.com/validator >4: When you tweet about the book it should show the description of the >book >--- > .../atomicupdate/Bug17937-AddingTwitterAccountsyspref.sql | 1 + > .../atomicupdate/Bug17937-AddingTwitterSummarysyspref.sql | 1 + > installer/data/mysql/sysprefs.sql | 2 ++ > .../intranet-tmpl/prog/en/modules/admin/preferences/opac.pref | 10 ++++++++++ > koha-tmpl/opac-tmpl/bootstrap/en/modules/opac-detail.tt | 6 ++++++ > 5 files changed, 20 insertions(+) > create mode 100644 installer/data/mysql/atomicupdate/Bug17937-AddingTwitterAccountsyspref.sql > create mode 100644 installer/data/mysql/atomicupdate/Bug17937-AddingTwitterSummarysyspref.sql > >diff --git a/installer/data/mysql/atomicupdate/Bug17937-AddingTwitterAccountsyspref.sql b/installer/data/mysql/atomicupdate/Bug17937-AddingTwitterAccountsyspref.sql >new file mode 100644 >index 0000000..1a77295 >--- /dev/null >+++ b/installer/data/mysql/atomicupdate/Bug17937-AddingTwitterAccountsyspref.sql >@@ -0,0 +1 @@ >+INSERT IGNORE INTO systempreferences (`variable`, `value`, `options`, `explanation`, `type`) VALUES ('TwitterAccount', '', NULL, 'Link a Twitter account so that tweets can be linked to catalog items', 'free'); >diff --git a/installer/data/mysql/atomicupdate/Bug17937-AddingTwitterSummarysyspref.sql b/installer/data/mysql/atomicupdate/Bug17937-AddingTwitterSummarysyspref.sql >new file mode 100644 >index 0000000..c15adc9 >--- /dev/null >+++ b/installer/data/mysql/atomicupdate/Bug17937-AddingTwitterSummarysyspref.sql >@@ -0,0 +1 @@ >+INSERT IGNORE INTO systempreferences (`variable`, `value`, `options`, `explanation`, `type`) VALUES ('TwitterSummary', '0', NULL, 'Show the description of an item in Twitter when linked to the catalog detail page', 'YesNo'); >diff --git a/installer/data/mysql/sysprefs.sql b/installer/data/mysql/sysprefs.sql >index 423bbdf..442ad5f 100644 >--- a/installer/data/mysql/sysprefs.sql >+++ b/installer/data/mysql/sysprefs.sql >@@ -522,6 +522,8 @@ INSERT INTO systempreferences ( `variable`, `value`, `options`, `explanation`, ` > ('TrackLastPatronActivity','0',NULL,'If set, the field borrowers.lastseen will be updated everytime a patron is seen','YesNo'), > ('TransfersMaxDaysWarning','3',NULL,'Define the days before a transfer is suspected of having a problem','Integer'), > ('TransferWhenCancelAllWaitingHolds','0',NULL,'Transfer items when cancelling all waiting holds','YesNo'), >+('TwitterAccount', '', NULL, 'Link a Twitter account so that tweets can be linked to catalog items', 'free'), >+('TwitterSummary', '0', NULL, 'Show the description of an item in Twitter when linked to the catalog detail page', 'YesNo'), > ('UNIMARCAuthorityField100','afrey50 ba0',NULL,'Define the contents of UNIMARC authority control field 100 position 08-35','Textarea'), > ('UNIMARCAuthorsFacetsSeparator',', ',NULL,'UNIMARC authors facets separator','short'), > ('UNIMARCField100Language','fre',NULL,'UNIMARC field 100 default language','short'), >diff --git a/koha-tmpl/intranet-tmpl/prog/en/modules/admin/preferences/opac.pref b/koha-tmpl/intranet-tmpl/prog/en/modules/admin/preferences/opac.pref >index 62aaeff..90c9592 100644 >--- a/koha-tmpl/intranet-tmpl/prog/en/modules/admin/preferences/opac.pref >+++ b/koha-tmpl/intranet-tmpl/prog/en/modules/admin/preferences/opac.pref >@@ -345,6 +345,16 @@ OPAC: > footer: "only footer" > Features: > - >+ - "Link Tweeter account " >+ - pref: TwitterAccount >+ class: long >+ - >+ - pref: TwitterSummary >+ choices: >+ yes: Enable >+ no: "Don't enable" >+ - Twitter Summary Cards for linking catalog items to tweets. >+ - > - pref: opacuserlogin > choices: > yes: Allow >diff --git a/koha-tmpl/opac-tmpl/bootstrap/en/modules/opac-detail.tt b/koha-tmpl/opac-tmpl/bootstrap/en/modules/opac-detail.tt >index e4fb61f..0f75a12 100644 >--- a/koha-tmpl/opac-tmpl/bootstrap/en/modules/opac-detail.tt >+++ b/koha-tmpl/opac-tmpl/bootstrap/en/modules/opac-detail.tt >@@ -26,6 +26,12 @@ > [% END %] > [% INCLUDE 'doc-head-open.inc' %] > <title>[% IF ( LibraryNameTitle ) %][% LibraryNameTitle %][% ELSE %]Koha online[% END %] catalog › Details for: [% title |html %][% FOREACH subtitl IN subtitle %][% IF Koha.Preference('marcflavour')=='UNIMARC' %],[% END %] [% subtitl.subfield |html %][% END %]</title> >+[% IF Koha.Preference(' TwitterSummary ') %] >+<meta name="twitter:card" content="summary" /> >+<meta name="twitter:site" content="[% Koha.Preference('TwitterAccount') %]" /> >+<meta name="twitter:title" content="[% title |html %]" /> >+<meta name="twitter:description" content="View it at [% LibraryNameTitle %]" /> >+[% END %] > [% INCLUDE 'doc-head-close.inc' %] > [% IF ( bidi ) %] > [% BLOCK cssinclude %]<link rel="stylesheet" type="text/css" href="[% interface %]/[% theme %]/css/right-to-left.css" />[% END %] >-- >2.1.4
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 17937
:
59192
| 59200 |
59816
|
59817