Can I add an extra Label category without breaking updates

Write here for anything about bibliography module in SLiMS.

Moderators: wynerst, buitenzorg812, purwoko, sutriadi, ido, Dicarve, ridorido

Post Reply
User avatar
gurujim
Posts: 41
Joined: 05 Feb 2012, 16:59
Location: Byron Bay, NSW, AUSTRALIA

Can I add an extra Label category without breaking updates

Post by gurujim » 27 Mar 2013, 08:27

I wanted an extra label ( for E-Book ) in addition to the existing ones. So I edited the database table and created a new label successfully, as well as installing a new icon in the relevant folder. My question is: Is this likely to have any bad effects on any subsequent SLiMS updates that I might carry out ?

User avatar
buitenzorg812
Posts: 830
Joined: 20 Sep 2011, 14:18
Location: Jakarta, Indonesia
Contact:

Re: Can I add an extra Label category without breaking updat

Post by buitenzorg812 » 27 Mar 2013, 19:17

if you're doing upgrade over your modified-existing SLiMS, you also need to take the modified script to the new upgrade-installation of SLiMS. while in database upgrade, changes you made won't effect, theoritically :).

User avatar
gurujim
Posts: 41
Joined: 05 Feb 2012, 16:59
Location: Byron Bay, NSW, AUSTRALIA

Re: Can I add an extra Label category without breaking updat

Post by gurujim » 01 Apr 2013, 07:07

:lol: Yes everything is theoretical until we see the final result. Thanks

User avatar
hqm
Posts: 21
Joined: 26 Mar 2013, 19:17

Re: Can I add an extra Label category without breaking updat

Post by hqm » 01 Apr 2013, 08:14

gurujim wrote:I wanted an extra label ( for E-Book ) in addition to the existing ones. So I edited the database table and created a new label successfully, as well as installing a new icon in the relevant folder. My question is: Is this likely to have any bad effects on any subsequent SLiMS updates that I might carry out ?
Fork the SLiMS repo, make the modification in your brand new repo, push it. When it's come a new update you can merge with your repo .. CMIIW

User avatar
buitenzorg812
Posts: 830
Joined: 20 Sep 2011, 14:18
Location: Jakarta, Indonesia
Contact:

Re: Can I add an extra Label category without breaking updat

Post by buitenzorg812 » 01 Apr 2013, 09:58

gurujim wrote::lol: Yes everything is theoretical until we see the final result. Thanks
agree with you mate :lol: and how's the final result? eager to read about it :).

User avatar
gurujim
Posts: 41
Joined: 05 Feb 2012, 16:59
Location: Byron Bay, NSW, AUSTRALIA

Re: Can I add an extra Label category without breaking updat

Post by gurujim » 13 May 2013, 13:55

I made an extra Label category and an extra icon to go with it. You can check it out here: http://chiangmai.thebestfriend.org . It seems to work OK and this is important for our library because we will be cataloguing increasing numbers of E-book resources, and want our users to quickly identify them.

Annu
Posts: 36
Joined: 12 Oct 2012, 14:38
Location: Islamabad
Contact:

Re: Can I add an extra Label category without breaking updat

Post by Annu » 04 Apr 2014, 16:14

Please share this update with us

User avatar
gurujim
Posts: 41
Joined: 05 Feb 2012, 16:59
Location: Byron Bay, NSW, AUSTRALIA

Re: Can I add an extra Label category without breaking updat

Post by gurujim » 17 Jan 2015, 18:42

The web address of the catalog I manage is now http://www.burmastudy.org/catalog.
Annu, you can take a copy of the Ebook icon there. You can also use phpMyAdmin or similar, to modify the data table so that there is another category .
Maybe you have already solved this for yourself, since it's been so long before I saw your post. Sorry. :oops:

User avatar
gurujim
Posts: 41
Joined: 05 Feb 2012, 16:59
Location: Byron Bay, NSW, AUSTRALIA

Re: Can I add an extra Label category without breaking updat

Post by gurujim » 18 Jan 2015, 13:14

Anyway, you made me revisit this, and I have also included a label for "website" - as this could be useful for many users. I have created a small sql file which you can IMPORT into the database, by using phpMyAdmin ( or command line if you are a SQL wizard!! :lol: ). The two label icons I use are attached. SQL files cannot be attached here, so copy the text below the ***asterisk*** line, paste it into Notepad, and save the resulting file as "more_mst_label.sql"

Procedure:
1. Copy label-ebook.png and label-website.png into the /images/labels/ directory of your Senayan installation
2. IMPORT the "more_mst_label.sql" file into the TABLE "mst_label" [ I am assuming that you already have the standard installation, with THREE ( 3) labels. This sql file simply INSERTS two more rows. It's very basic and might break if your mst_label table is not standard]
3. Go to Bibliography module - you should find two extra labels you can now use to flag types of resources for users
Enjoy
Oh, and don't forget you need to re-add the icon png's when you do an upgrade to a whole new version :)
Tested OK on SLiMS 7.

***************text for sql file begins below here***************copy until end***********

-- phpMyAdmin SQL Dump
-- version 4.1.14.8
-- http://www.phpmyadmin.net
--
-- Host:
-- Generation Time: Jan 17, 2015 at 10:37 PM
-- Server version: 5.1.73-log
-- PHP Version: 5.4.35-0+deb7u2

SET SQL_MODE = "NO_AUTO_VALUE_ON_ZERO";
SET time_zone = "+00:00";

/*!40101 SET @OLD_CHARACTER_SET_CLIENT=@@CHARACTER_SET_CLIENT */;
/*!40101 SET @OLD_CHARACTER_SET_RESULTS=@@CHARACTER_SET_RESULTS */;
/*!40101 SET @OLD_COLLATION_CONNECTION=@@COLLATION_CONNECTION */;
/*!40101 SET NAMES utf8 */;
--
-- Database: `senayan`
--
-- --------------------------------------------------------
--
-- Table structure for table `mst_label`
--
INSERT INTO `mst_label` (`label_id`, `label_name`, `label_desc`, `label_image`, `input_date`, `last_update`) VALUES
(4, 'label-ebook', 'EBook', 'label-ebook.png', '2013-03-31', '2013-03-31'),
(5, 'label-Website', 'Website', 'label-website.png', '2013-03-31', '2013-03-31');
/*!40101 SET CHARACTER_SET_CLIENT=@OLD_CHARACTER_SET_CLIENT */;
/*!40101 SET CHARACTER_SET_RESULTS=@OLD_CHARACTER_SET_RESULTS */;
/*!40101 SET COLLATION_CONNECTION=@OLD_COLLATION_CONNECTION */;
Attachments
label-website.png
label-website.png (1.68 KiB) Viewed 6587 times
label-ebook.png
label-ebook.png (1.03 KiB) Viewed 6587 times

Post Reply