Name Last Update
setup-data Loading commit data...
Readme.md Loading commit data...

Readme.md

How to install the Add-on

Copy the new files

Copy the new files to the source directory

If you are in Linux

cp -r $PATH_TO _ADDON/setup-data/dspace-source/* $DSPACE_SRC/

Where $PATH_TO ADDON is the directory where you put the add-on for instalation and $DSPACESRC/ is the source directory.

As an example: If the addon is in the opt directory and dspace source is in /src-dspace/dspace32 the command is:

cp -r /opt/setup-data/dspace-source/* /src-dspace/dspace32

Adding the new entries in the Messages.properties and in Messages_pt_PT.properties

Add the fowlowing messages to Messages.properties: Edit $DSPACE_SRC/dspace/dspace-api/src/main/resources/Messages.properties and add:

sharing.facebook.title = Share this item over Facebook
sharing.facebook.alt = Facebook
sharing.twitter.title = Share this item over Twitter
sharing.twitter.alt = Twitter
sharing.linkedin.title = Share this item over LinkedIn
sharing.linkedin.alt = LinkedIn
sharing.delicious.title = Share this item over Delicious
sharing.delicious.alt = Delicious
sharing.digg.title = Share this item over Digg
sharing.digg.alt = Digg
sharing.googlebookmark.title = Add this item to Google Bookmarks
sharing.googlebookmark.alt = Google Bookmarks
sharing.myspace.title = Share this item over MySpace
sharing.myspace.alt = MySpace
sharing.orkut.title = Share this item over Orkut
sharing.orkut.alt = Orkut
sharing.bibtex.title = Export this item to BibTex Format
sharing.bibtex.alt = BibTex Format
sharing.mendeley.title = Add this item to Mendeley
sharing.mendeley.alt = Mendeley
sharing.endnote.title = Export this item to Endnote Format
sharing.endnote.alt = Endnote
sharing.orcid.title = Add this item to Orcid
sharing.orcid.alt = Orcid

sharing.orcid.title = Orcid
sharing.orcid.success.title = Item successfully added to Orcid
sharing.orcid.success.content = The item was successfully added to Orcid. Now you can close this window.
sharing.orcid.error.title = Error while adding the item to Orcid
sharing.orcid.error.content = An error has occurred while adding the item to Orcid.
sharing.orcid.error.content.1 = An error has occurred while adding the item to Orcid.
sharing.orcid.error.content.2 = An error has occurred while adding the item to Orcid.

Add the fowlowing messages to Messages_pt_PT.properties: Edit $DSPACE_SRC/dspace/dspace-api/src/main/resources/Messages_pt_PT.properties and add:

sharing.facebook.title = Partilhe no Facebook
sharing.facebook.alt = Facebook
sharing.twitter.title = Partilhe no Twitter
sharing.twitter.alt = Twitter
sharing.linkedin.title = Partilhe no LinkedIn
sharing.linkedin.alt = LinkedIn
sharing.delicious.title = Partilhe no Delicious
sharing.delicious.alt = Delicious
sharing.digg.title = Partilhe no Digg
sharing.digg.alt = Digg
sharing.googlebookmark.title = Adicionar ao Google Bookmarks
sharing.googlebookmark.alt = Google Bookmarks
sharing.myspace.title = Partilhe no MySpace
sharing.myspace.alt = MySpace
sharing.orkut.title = Partilhe no Orkut
sharing.orkut.alt = Orkut
sharing.bibtex.title = Exporte no formato BibTex
sharing.bibtex.alt = Formato BibTex
sharing.mendeley.title = Adicione ao Mendeley
sharing.mendeley.alt = Mendeley
sharing.endnote.title = Exporte no formato Endnote
sharing.endnote.alt = Endnote
sharing.orcid.title = Adicione ao Orcid
sharing.orcid.alt = Logotipo do Orcid

sharing.orcid.title = Orcid 
sharing.orcid.success.title = Item enviado com sucesso para o Orcid
sharing.orcid.success.content = O item foi enviado com sucesso para o Orcid. Agora pode fechar a janela.
sharing.orcid.error.title = Erro ao enviar o item para o Orcid
sharing.orcid.error.content = Aconteceu um erro durante o envio do item para o Orcid.
sharing.orcid.error.content.1 = Aconteceu um erro durante o envio do item para o Orcid.
sharing.orcid.error.content.2 = Aconteceu um erro durante o envio do item para o Orcid.

Change the dspace.cfg

Edit dspace.cfg in $DSPACE_SRC/dspace/config/dspace.cfg.

#---------------------------------------------------------------#
#----------------SHARING BAR CONFIGURATIONS---------------------#
#---------------------------------------------------------------#

# Show sharing bar?
sharing.active = true
# Export templates
sharing.template.dir = ${dspace.dir}/config/sharing/templates

# Items listed at left
sharing.left = \
    facebook, \
    twitter, \
    delicious, \
    linkedin, \
    digg, \
    googlebookmark, \
    myspace, \
#   orkut

# Items listed at right
sharing.right = \
    bibtex, \
    mendeley, \
    endnote, \
#   orcid

# Simple Items
sharing.facebook.type = simple
sharing.twitter.type = simple
sharing.delicious.type = simple
sharing.linkedin.type = simple
sharing.digg.type = simple
sharing.googlebookmark.type = simple
sharing.myspace.type = simple
#sharing.orkut.type = simple
sharing.mendeley.type = simple

# Advanced Items
sharing.bibtex.type = advanced
#sharing.mendeley.type = advanced
sharing.endnote.type = advanced
#sharing.orcid.type = advanced

# Simple Items URL
sharing.facebook.url = http://www.facebook.com/sharer.php?s=100&p[url]=[$url]&p[title]=[$title]&p[summary]=[$description]
sharing.twitter.url = http://twitter.com/home?status=[$title]-[$url]
sharing.twitter.params.title.maxlength = 85
sharing.delicious.url = http://delicious.com/post?url=[$url]&title=[$title]
sharing.linkedin.url = http://www.linkedin.com/shareArticle?mini=true&url=[$url]&title=[$title]&summary=[$description]
sharing.digg.url = http://digg.com/submit?phase=2&url=[$url]
sharing.googlebookmark.url = https://www.google.com/bookmarks/mark?op=add&bkmk=[$url]&title=[$title]
sharing.myspace.url = http://www.myspace.com/Modules/PostTo/Pages/?u=[$url]
#sharing.orkut.url = http://promote.orkut.com/preview?nt=orkut.com&tt=[$title]&du=[$url]
sharing.mendeley.url = https://www.mendeley.com/import/?url=[$url]#

# Advanced Items Class & Params
sharing.bibtex.class = pt.keep.dspace.sharing.app.BibtexSharing
#sharing.mendeley.class = pt.keep.dspace.sharing.app.MendeleySharing
#sharing.mendeley.param.url = http://www.mendeley.com/min.php/bookmarklet
sharing.endnote.class = pt.keep.dspace.sharing.app.EndnoteSharing
#sharing.orcid.class = pt.keep.dspace.sharing.app.OrcidSharing
## baseurl and apibaseurl should not contain ending forward slash (e.g., sharing.orcid.param.baseurl = https://orcid.org)
#sharing.orcid.param.baseurl = https://orcid.org
#sharing.orcid.param.apibaseurl = https://api.orcid.org
#sharing.orcid.param.defaultvisibility = private
#sharing.orcid.param.clientid = 
#sharing.orcid.param.clientsecret =

Change the styles.css

Edit styles.css in $DSPACE_SOURCE/dspace-jspui/src/main/webapp/styles.css

Add the following lines:

.sharingbar {
    height:20px;
    padding:10px 5px 5px;
    margin-top:20px;
    width:600px;
    margin-left: auto;
    margin-right: auto;
}

.sharingbar div.left {
    margin-left:12px;
    float:left;
}

.sharingbar div.left a {
    margin-right:5px;
}

.sharingbar div.right {
    margin-right:12px;
    float:right;
}

.sharingbar div.right a {
    cursor:pointer;
    margin-right:5px;
}

.sharingbar div.clear {
    clear: both;
}

Change web.xml and add the following entries:

Edit web.xml in $DSPACE_SOURCE/dspace-jspui/src/main/webapp/WEB-INF/web.xml After </servlet-mapping> add:

<servlet>
    <servlet-name>sharing</servlet-name>
    <servlet-class>pt.keep.dspace.sharing.SharingServlet</servlet-class>
</servlet>

After <!-- Servlet Mappings --> add:

<servlet-mapping>
    <servlet-name>sharing</servlet-name>
    <url-pattern>/sharing</url-pattern>
</servlet-mapping>

Change display-item.jsp

Edit display-item.jsp in $DSPACE_SOURCE/dspace-jspui/src/main/webapp/display-item.jsp Add the follwoing imports after <%@ page import="org.dspace.license.CreativeCommons" %>:

<%@ page import="pt.keep.dspace.sharing.ItemWrapper" %>
<%@ page import="pt.keep.dspace.sharing.SharingManager" %>

Add before <p class="submitFormHelp"><fmt:message key="jsp.display-item.copyright"/></p>

<% if (ConfigurationManager.getBooleanProperty("sharing.active", false)) { %>

<% // code
    SharingManager manager = new SharingManager(new ItemWrapper(item));
%>
    <div class="sharingbar">
        <div class="left">
            <%= manager.getItemsAtLeft(request) %>
        </div>
        <div class="right">
            <%= manager.getItemsAtRight(request) %>
        </div>
        <div class="clear"></div>
    </div>
<% } %>

Developers

The Sharing Bar Add-on was developed in the context of RCAAP ProjectRCAAP by KEEP SOLUTIONS, a spin-off of the University of Minho, specialized in digital preservation and advanced solutions for digital archives and libraries, in partnership with the Documentation Services of the University of Minho.

Need help, or give any type of contribution?

Please contact us at FCT|FCCN or any commiter.

License

Please contact us at FCT|FCCN.