Items filtered by date: December 2014

Tuesday, 14 February 2017 14:13

caching with htaccess

This is an email I sent with information on caching by htaccess.


Hi Vlado

Just a quick update and the information on caching I have.

I mentioned that the jotcache component showed entries even after I had emptied the joomla cache. You advised me to hit refresh. This worked. Perhaps an automatic refresh when the component is launched might help.

The Expires plugin fails with the normal joomla cache as well so I will contact the plugin author about this as it appears to be a fault or missing feature with this plugin.

Cache

I am still experimenting with cache for my website. I do not know how much you know about this so if my reply is basic please don’t be offended.

I am currently setting everything to one hour so I can test things without leaving unwanted cached items on peoples browsers. I intend to move these to 1 day when I have finshed developing. Google prefers expires (because more compatible) and to have them set to one month, this might have an effect on SEO.

My cache is set both in the htaccess file and in the expires plugin and jotcache (different type of cache and you already know its feature and power)

htacess

This is the rule I am working with at the minute, I have included both types of cache for testing but cache-control overrides expires anyway. I have also put them inside a filesmatch rather than globally, this would be fine aswell. last modified is unset because I am using cache-control to set freshness of the files and it is an overhead that is not needed. This assume fairly static content. However if you set a max-age of only an hour it is not really an issue a user having out of date content

## My Cache Rule - check whether ExpiresActive is required here
# All specified files can be cached in public/private proxies and browsers etc..and when it expires must revalidate 
<FilesMatch "\.(ico|pdf|flv|gif|jpg|JPG|jpeg|JPEG|png|PNG|swf|css|js|js\.gz|gz|htm|html|xml|txt)$">
    Header set Cache-Control "max-age=3600, public, must-revalidate"
    ExpiresActive On
    ExpiresDefault "now plus 1 hour"
    Header unset Last-Modified
</FilesMatch>

This rule set below is the same as above but the cache control is slightly different, it has a private option set, this means that no public proxy or cache can store this data, only a cache that the user has private access to  ie internet explorer cache

## My Shop Cache Rule - check whether ExpiresActive is required here
# All specified files can be cached in browsers but not public caches/proxies etc..and when it expires must revalidate
# bbc.co.uk uses private
<FilesMatch "\.(ico|pdf|flv|gif|jpg|JPG|jpeg|JPEG|png|PNG|swf|css|js|js\.gz|gz|htm|html|xml|txt)$">
    Header set Cache-Control "max-age=3600, private, must-revalidate"
    ExpiresActive On
    ExpiresDefault "now plus 1 hour"
    Header unset Last-Modified
</FilesMatch>

You mention in your email - (a problem with this at the minute is joomla does not set a Last Modified Header, I need to look in to this further but the theory still stands)

For general usage I think here is necessary that browser at least make a ping to server and this one responds with 304 code.

This can be achived better by using a cache control setting off

Header set Cache-Control "max-age=3600, no-store, public, must-revalidate"

The no-store actually means that the browser cannot use the content in its browser without first revalidating the content with the original source. However this method with not depend on the session still being open like with the 'Use Browser Cache option'. When using this either ETag or Last Modified header need to be set, as ETAGs are problematic everyone uses Last Modified Header, so in this case I would not unset Last Modified asa it is needed to revalidate content.

My settings that I am will be testing on my Expires plugin:

1 hour, Public, Must Revalidate

I will also give you these links which I found very helpful in understanding cache:

I hope this helps. I am currently writing a htaccess files with a really good cache section in it. If you would like a copy of it I can send it you. I would send it now but I don’t want the email to end up in spam.

One last question. Does joomlas cache/jotcache store html headers in the cache or just the html page content?

Thanks

Shoulders

Published in htaccess
Tuesday, 14 February 2017 13:59

CSS margin syntax cheatsheet

Top – Right – Bottom – Left

The margin property can have from one to four values.

  • margin: 25px 50px 75px 100px;
    • top margin is 25px
    • right margin is 50px
    • bottom margin is 75px
    • left margin is 100px 
  • margin: 25px 50px 75px;
    • top margin is 25px
    • right and left margins are 50px
    • bottom margin is 75px 
  • margin: 25px 50px;
    • top and bottom margins are 25px
    • right and left margins are 50px 
  • margin: 25px;
    • all four margins are 25px
Published in CSS
Tuesday, 14 February 2017 12:23

Make USB Floppy Drive appear as A:

This issue came about because I needed to image some Atari ST floppy disks and the only OS that would run the specialised Makedisk App was XP. I loaded XP in a Vitrual Box and then plugged in my USB floppy drive and mounted it. The floppy drive then mounted as B: . It did this becasue I had a virtual floppy disk as part of the vitual machine so the external floppy disk drive then took the next letter which is B:

Makedisk would probably work with B: drive but annoyed me. I thenshutdown the virtual machine and then rebooted. The USB floppy drive still shows as B: because it is registered in the windows registry.

My solution

This issue is not just related to virtual machines nor XP but I have verified the solutions on XP. This assumes your USB floppy drive come up as B:

  • Unplug your USB floppy drive
  • Make sure the floppy disk (A: drive) is disabled in the BIOS or Virtual Machine control panel
  • Load Windows XP (Virtual Machine or real)
  • Open regedit
  • Goto
    HKEY_LOCAL_MACHINE\SYSTEM\MountedDevices
  • Delete Pane/Key found:
    \DosDevices\B:
  • Plug in USB floppy drive and it will appear as A:

Links

Published in Windows XP
Sunday, 29 January 2017 13:49

Fair Use

This is one of the most confusing things in copyright law for the lay person but I will try and explain it here.

The "fair use" exemption to (U.S.) copyright law was created to allow things such as commentary, parody, news reporting, research and education about copyrighted works without the permission of the author. That's vital so that copyright law doesn't block your freedom to express your own works -- only the ability to appropriate other people's. Intent, and damage to the commercial value of the work are important considerations.

10 Big Myths about copyright explained

Links

Published in Media

This is article will show you how to practically implement a license after you have decided which one you are going to use. There are several different methods and people implement them differently. I am going to show you the different ways people have been adding licenses and then what I decided to use.

I will group the methods by license to make things easier and so you can use this article as a reference.

Choose a License has the official ways of implementing licenses and you can get text versions of the full licenses there. They do look a bit different in terms of formatting (indendtations) to some of the others I have see but the wording is the same

The licenses are expresssed in 2 different ways.

  1. The full license file which should be put (usually) in the root folder of the software. Some people create a license folder and put it in there. The rules mainly say that the license should be distributed with the sofatware and I would advise not to hide it.
  2. boilerplate / copyright header put in the actual software/source files. The rule of thumb is add it tro all significant parts of the code. This is code that is more than 300 lines as a rule of thumb. but it does not ahrm adding it to all files if you want. The code that is put here is refered to as the boilerplate. If you've got a project where individual files might be taken out of context, it may be sensible to add the boilerplate to all files.

Collaboration

This is where you modify work where it already has a copyright and you must leave the copyright inplace.

GPL / MIT

If a copyright has already been expressed you cannot remove that copyright declaration so what a lot of people do is just add their copyright notice below the old one which keeps the same license but adds your copyright claim.

Copyright (C) 20015-2016 Original Author   // unchanged
Copyright (C) 2017 QuantumwWarp.com

This article tells you about collabaration (already worked on) for GPL -

Apache

I think apache is the same as above but you might be required to make notes of the changes that have been made rather than just add an extra copyright line.

GPLv2 / GPLv3

This method also applies to GPLv2 but using the v2 of the license.

How to apply this license

  • Create a text file (typically named LICENSE, LICENSE.txt, sometimes LICENSE.md) in the root of your source code and copy the text of the license into the file.
  • The Free Software Foundation recommends taking the additional step of adding a boilerplate notice to the top of each file. The boilerplate can be found at the end of the license.
  • Optional: Add GPL-3.0+ (or GPL-3.0 to disallow future versions) to your project's package description, if applicable (e.g., Node.js, Ruby, and Rust). This will ensure the license is displayed in package directories.

Other GPL Family Notes

  • The method for applying a lcinese using GPLv2 is exactly the same excepot the license and boilerplate are different.
  • AGPL and LGPL has different licenses and boilerplates and slightly different rules ans when and where the license should be available.

Boilerplate License Examples

The following are examples of GPL boilerplate code. There seems to be quite a variety of these code different people use. These companies are respected organisations so the code must be good and I suppose it is personal preference.

My GPLv3

This is the boilerplate I am going to use for my GPLv3 software.

I went with this design because it includes my name and website, it has a small foot print and because I have not put version numbers in I do not have to update the text everytime I upgrade my software, there is also a generic link to the GPL license so I am not stuck with using a particlualr filename for the license (i.e. LICENSE, LICENSE.txt, LICENSE.md)

NB: I need to decide on the license line once I have added it my github repe. apparently it will recognise LICENSE.txt as a license file. I could also then like Divi add extra infor to the top of the license file.

@license   GNU/GPLv3 or later; https://www.gnu.org/licenses/gpl.html
or
@license    GNU General Public License version 2 or later; see LICENSE.txt

/**
 * @package   QWcrm
 * @author    Jon Brown https://quantumwarp.com/
 * @copyright Copyright (C) 2016 - 2017 Jon Brown, All rights reserved.
 * @license   GNU/GPLv3 or later; https://www.gnu.org/licenses/gpl.html
 */

My GPLv2

The same as above but for GPLv2 software.

/**
 * @package   QWcrm
 * @author    Jon Brown https://quantumwarp.com/
 * @copyright Copyright (C) 2016 - 2017 Jon Brown, All rights reserved.
 * @license   GNU/GPLv2 or later; https://www.gnu.org/licenses/gpl-2.0.html
 */

GNU Official GPLv3 instructions

Attach the following notices to the program. It is safest to attach them to the start of each source file to most effectively state the exclusion of warranty; and each file should have at least the “copyright” line and a pointer to where the full notice is found.

For a one-file program, the statement (for the GPL) should look like this:

  • replace the first line with a description of the software - some pople do not put the software description line in, but just delete it instead.
  • replace <year> with the year
  • replace <name of author> with your name
<one line to give the program's name and a brief idea of what it does.>
Copyright (C) <year>  <name of author>

This program is free software: you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
the Free Software Foundation, either version 3 of the License, or
(at your option) any later version.

This program is distributed in the hope that it will be useful,
but WITHOUT ANY WARRANTY; without even the implied warranty of
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
GNU General Public License for more details.

You should have received a copy of the GNU General Public License
along with this program.  If not, see <http://www.gnu.org/licenses/>.

For programs that are more than one file, it is better to replace “this program” with the name of the program, and begin the statement with a line saying “This file is part of NAME”. For instance,

  • Replace 'Foobar' with the name of your product
This file is part of Foobar.

Foobar is free software: you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
the Free Software Foundation, either version 3 of the License, or
(at your option) any later version.

Foobar is distributed in the hope that it will be useful,
but WITHOUT ANY WARRANTY; without even the implied warranty of
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
GNU General Public License for more details.

You should have received a copy of the GNU General Public License
along with Foobar.  If not, see <http://www.gnu.org/licenses/>.

If the program does terminal interaction, make it output a short notice like this when it starts in an interactive mode:

<program>  Copyright (C) <year>  <name of author>
This program comes with ABSOLUTELY NO WARRANTY; for details type `show w'.
This is free software, and you are welcome to redistribute it
under certain conditions; type `show c' for details.

Joomla (index.php)

  • https://www.joomla.org/
  • This is one of the most well known Open Source softwre using GPLv2 and this is their boilerplate from the index.php
/**
 * @package    Joomla.Site
 *
 * @copyright  Copyright (C) 2005 - 2016 Open Source Matters, Inc. All rights reserved.
 * @license    GNU General Public License version 2 or later; see LICENSE.txt
 */

Joomla (com_content)

  • components/com_content/controller.php
  • notice the aditional @subpackage
/**
 * @package     Joomla.Site
 * @subpackage  com_content
 *
 * @copyright   Copyright (C) 2005 - 2016 Open Source Matters, Inc. All rights reserved.
 * @license     GNU General Public License version 2 or later; see LICENSE.txt
 */

Power Content

/**
 * @package    com_epc / Power Content
 * @version    CVS: 1.0.0
 * @author     Shir Ekerling <shirekerling@gmail.com>
 * @copyright  2016 Shir Ekerling
 * @license    GNU General Public License version 2 or later; see LICENSE.txt
 */

Divi Builder

/*
 * Plugin Name: Divi Builder
 * Plugin URI: http://elegantthemes.com
 * Description: A drag and drop page builder for any WordPress theme.
 * Version: 1.3.10
 * Author: Elegant Themes
 * Author URI: http://elegantthemes.com
 * License: GPLv2 or later
 */

Gantry

  • http://gantry.org/
  • Gantry - templates/g5_helium/html/layouts/joomla/system
  • this is an excellent example on how to add cascading copyright notices
/**
 * @package   Gantry 5 Theme
 * @author    RocketTheme http://www.rockettheme.com
 * @copyright Copyright (C) 2007 - 2015 RocketTheme, LLC
 * @copyright Copyright (C) 2005 - 2015 Open Source Matters, Inc. All rights reserved.
 * @license   GNU/GPLv2 and later
 *
 * http://www.gnu.org/licenses/gpl-2.0.html
 */

AllVideos

/**
 * @version    4.8.0
 * @package    AllVideos (plugin)
 * @author     JoomlaWorks - http://www.joomlaworks.net
 * @copyright  Copyright (c) 2006 - 2016 JoomlaWorks Ltd. All rights reserved.
 * @license    GNU/GPL license: http://www.gnu.org/copyleft/gpl.html
 */

Joomla Forum

A

/**
 * @package Joomla
 * @subpackage [PROGRAM]
 * @copyright (C) [COMPANY]
 * @license GNU/GPL, see license.txt
 * [PROGRAM] is free software; you can redistribute it and/or
 * modify it under the terms of the GNU General Public License 2
 * as published by the Free Software Foundation.
 *
 * [PROGRAM] is distributed in the hope that it will be useful,
 * but WITHOUT ANY WARRANTY; without even the implied warranty of
 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
 * GNU General Public License for more details.
 *
 * You should have received a copy of the GNU General Public License
 * along with [PROGRAM]; if not, write to the Free Software
 * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA  02110-1301, USA
 * or see http://www.gnu.org/licenses/.
 */

B

/**
 * @package Joomla
 * @subpackage [PROGRAM]
 * @copyright (C) [COMPANY]
 * @license GNU/GPL, see license.txt
 * [PROGRAM] is free software; you can redistribute it and/or
 * modify it under the terms of the GNU General Public License 2
 * as published by the Free Software Foundation.
 */

C

/**
 * @package Joomla
 * @subpackage [PROGRAM]
 * @copyright (C) [COMPANY]
 * @license GNU General Public License 2, see license.txt
 */ 

Stackoverflow - How to propertly comment a PHP file based on GNU/GPL source

/**
 * @package     GovArticle.Administrator
 * @subpackage  com_govarticle.layouts
 * @author      Artur Stępień (artur@example.pl)
 * @copyright   (C) 2005 - 2015 Open Source Matters. All rights reserved.
 * @copyright   (C) 2015 - Fundacja PCJ Otwarte Źródła
 * @license     http://www.gnu.org/licenses/old-licenses/gpl-2.0-standalone.html
 * @link        http://dostepny.joomla.pl
 * 
 * Based on com_content layouts from Joomla!
 */

GitHub - ThinkUp

  • https://github.com/ThinkUpLLC/ThinkUp
  • ThinkUp's source code is licensed under the GNU General Public License, except for the external libraries listed below. See the website linked above
  • This incorporates a normal GPLv3 licenses but with author information added at the bottom in function delcaration style. this would work better if there are more authors to disclose.
/**
 *
 * ThinkUp/webapp/public.php
 *
 * Copyright (c) 2009-2010 Gina Trapani, Jason McPheron, Dash30, Christoffer Viken, Dwi Widiastuti
 *
 * LICENSE:
 *
 * This file is part of ThinkUp.
 * 
 * ThinkUp is free software: you can redistribute it and/or modify
 * it under the terms of the GNU General Public License as published by
 * the Free Software Foundation, either version 3 of the License, or
 * (at your option) any later version.
 * 
 * ThinkUp is distributed in the hope that it will be useful,
 * but WITHOUT ANY WARRANTY; without even the implied warranty of
 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
 * GNU General Public License for more details.
 * 
 * You should have received a copy of the GNU General Public License
 * along with ThinkUp.  If not, see <http://www.gnu.org/licenses/>.
 *
*/
/**
 * @author Gina Trapani <ginatrapani[at]gmail[dot]com>
 * @author Jason McPheron <jason[at]onebigword[dot]com>
 * @author Dash30 <customerservice[at]dash30[dot]com>
 * @author Christoffer Viken <christoffer[at]viken[dot]me>
 * @author Dwi Widiastuti <admin[at]diazuwi[dot]web[dot]id>
 * @license http://www.gnu.org/licenses/gpl.html
 * @copyright 2009-2010 Gina Trapani, Jason McPheron, Dash30, Christoffer Viken, Dwi Widiastuti
*/

GPL - Collaboration Examples

Here I will put a collection of licenses where there has been more than 1 author.

Stackoverflow - GPL license. Code reuse

All original material Copyright (C) 2009-2010 author

Original file from A: A/foo/foo.h
Copyright (C) 1997-2001 author.

This program is free software; you can redistribute it and/or
modify it under the terms of the GNU General Public License
as published by the Free Software Foundation; either version 2
of the License, or (at your option) any later version.

This program is distributed in the hope that it will be useful,
but WITHOUT ANY WARRANTY; without even the implied warranty of
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.

See the GNU General Public License for more details.

You should have received a copy of the GNU General Public License
along with this program; if not, write to the Free Software
Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA  02111-1307, USA.

Or

/*  
 * Copyright (c) 2007  GPL Project Developer Who Made Changes <gpl@example.org>  
 *  
 *  This file is free software: you may copy, redistribute and/or modify it  
 *  under the terms of the GNU General Public License as published by the  
 *  Free Software Foundation, either version 2 of the License, or (at your  
 *  option) any later version.  
 *  
 *  This file is distributed in the hope that it will be useful, but  
 *  WITHOUT ANY WARRANTY; without even the implied warranty of  
 *  MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU  
 *  General Public License for more details.  
 *  
 *  You should have received a copy of the GNU General Public License  
 *  along with this program.  If not, see <http://www.gnu.org/licenses/>.  
 *  
 * This file incorporates work covered by the following copyright and  
 * permission notice:  
 *  
 *     Copyright (c) YEARS_LIST, Permissive Contributor1 <contrib1@example.net>  
 *     Copyright (c) YEARS_LIST, Permissive Contributor2 <contrib2@example.net>  
 *  
 *     Permission to use, copy, modify, and/or distribute this software  
 *     for any purpose with or without fee is hereby granted, provided  
 *     that the above copyright notice and this permission notice appear  
 *     in all copies.  
 *  
 *     THE SOFTWARE IS PROVIDED "AS IS" AND THE AUTHOR DISCLAIMS ALL  
 *     WARRANTIES WITH REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED  
 *     WARRANTIES OF MERCHANTABILITY AND FITNESS. IN NO EVENT SHALL THE  
 *     AUTHOR BE LIABLE FOR ANY SPECIAL, DIRECT, INDIRECT, OR  
 *     CONSEQUENTIAL DAMAGES OR ANY DAMAGES WHATSOEVER RESULTING FROM LOSS  
 *     OF USE, DATA OR PROFITS, WHETHER IN AN ACTION OF CONTRACT,  
 *     NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT OF OR IN  
 *     CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE.  
 */

Stackoverflow - GPL copyright notice when contributing new files

A

/**
 * Some open source application
 * Component Bar
 * (C) 20?? by Scruffy H. Hacker (scruffy@foo.bar)
 * (C) 20?? by Tobier Hackerson (tobier@foo.bar)
 * Released under the GPL
 *
 * Awesome description here.
 */

B

/**
 * My Extension to some open source application
 *
 *  Copyright 2012 by Tobias Eriksson <author@tobier.se>
 *
 * This file is part of some open source application.
 * 
 * Some open source application is free software: you can redistribute 
 * it and/or modify it under the terms of the GNU General Public 
 * License as published by the Free Software Foundation, either 
 * version 3 of the License, or (at your option) any later version.
 * 
 * Some open source application is distributed in the hope that it will 
 * be useful, but WITHOUT ANY WARRANTY; without even the implied warranty 
 * of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
 * GNU General Public License for more details.
 * 
 * You should have received a copy of the GNU General Public License
 * along with Foobar.  If not, see <http://www.gnu.org/licenses/>.
 *
 * @license GPL-3.0+ <http://spdx.org/licenses/GPL-3.0+>
 */

C

/**
 * Some open source application
 *
 *  Copyright 2012 by Tobias Eriksson <author@tobier.se>
 *  Copyright 2010, 2011 by Scruffy H. Hacker <scruffy@foo.bar>
 *
 *  Licensed under GNU General Public License 3.0 or later. 
 *  Some rights reserved. See COPYING, AUTHORS.
 *
 * @license GPL-3.0+ <http://spdx.org/licenses/GPL-3.0+>
 */

Software Freedom - Maintaining Permissive-Licensed Files in a GPL-Licensed Project: Guidelines for Developers

Including unmodified permissive-licensed files. The top of the incorpoated file should look something like this:

/* Copyright (c) YEARS_LIST, Permissive Project Contributor1 <contrib1@example.net>  
 * Copyright (c) YEARS_LIST, Permissive Project Contributor2 <contrib2@example.net>  
 * ...  
 *  
 * Permission to use, copy, modify, and/or distribute this software for  
 * any purpose with or without fee is hereby granted, provided that the  
 * above copyright notice and this permission notice appear in all copies.  
 *  
 * THE SOFTWARE IS PROVIDED "AS IS" AND THE AUTHOR DISCLAIMS ALL  
 * WARRANTIES WITH REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED  
 * WARRANTIES OF MERCHANTABILITY AND FITNESS. IN NO EVENT SHALL THE AUTHOR  
 * BE LIABLE FOR ANY SPECIAL, DIRECT, INDIRECT, OR CONSEQUENTIAL DAMAGES  
 * OR ANY DAMAGES WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS,  
 * WHETHER IN AN ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION,  
 * ARISING OUT OF OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS  
 * SOFTWARE.  
 */ 

then - 2.2 Adding GPL’d modifications to permissive-licensed files

/*  
 * Copyright (c) 2007  GPL Project Developer Who Made Changes <gpl@example.org>  
 *  
 *  This file is free software: you may copy, redistribute and/or modify it  
 *  under the terms of the GNU General Public License as published by the  
 *  Free Software Foundation, either version 2 of the License, or (at your  
 *  option) any later version.  
 *  
 *  This file is distributed in the hope that it will be useful, but  
 *  WITHOUT ANY WARRANTY; without even the implied warranty of  
 *  MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU  
 *  General Public License for more details.  
 *  
 *  You should have received a copy of the GNU General Public License  
 *  along with this program.  If not, see <http://www.gnu.org/licenses/>.  
 *  
 * This file incorporates work covered by the following copyright and  
 * permission notice:  
 *  
 *     Copyright (c) YEARS_LIST, Permissive Contributor1 <contrib1@example.net>  
 *     Copyright (c) YEARS_LIST, Permissive Contributor2 <contrib2@example.net>  
 *  
 *     Permission to use, copy, modify, and/or distribute this software  
 *     for any purpose with or without fee is hereby granted, provided  
 *     that the above copyright notice and this permission notice appear  
 *     in all copies.  
 *  
 *     THE SOFTWARE IS PROVIDED "AS IS" AND THE AUTHOR DISCLAIMS ALL  
 *     WARRANTIES WITH REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED  
 *     WARRANTIES OF MERCHANTABILITY AND FITNESS. IN NO EVENT SHALL THE  
 *     AUTHOR BE LIABLE FOR ANY SPECIAL, DIRECT, INDIRECT, OR  
 *     CONSEQUENTIAL DAMAGES OR ANY DAMAGES WHATSOEVER RESULTING FROM LOSS  
 *     OF USE, DATA OR PROFITS, WHETHER IN AN ACTION OF CONTRACT,  
 *     NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT OF OR IN  
 *     CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE.  
 */

GPL - Additional Terms

It is possible to add extra terms to the GPL license should you need to. See below for an example

SobiPro

  • https://www.sigsiu.net/
  • SobiPro stores it license (GPLv3) @ /site/gplv3.txt
  • There are additional terms @ /site/gplv3addterms.txt (applicable section 7 additional terms)
SobiPro is released under the GNU General Public License V3
Additional Terms according section 7 of GNU/GPL V3

These additional terms refer to SobiPro and its applications (hereinafter referred to as Software) and any updates to Software.

"Sobi" and "SobiPro" are trademarks of Sigsiu.NET GmbH. The licensing of the Software under the GPL does not imply a trademark license. Therefore any rights, title and interest in our trademarks remain entirely with Sigsiu.NET GmbH.

Except as expressly provided herein, no trademark rights are granted to any trademarks of Sigsiu.NET GmbH. Licensees are granted a limited, non-exclusive right to use the marks "Sobi", "SobiPro" and the SobiPro and Sigsiu.NET logos in connection with unmodified copies of the Software.

If the licensee distributes modified copies of the Software, he has to:

    Replace/remove all terms, images and files containing the marks "Sobi", "SobiPro" and the SobiPro and Sigsiu.NET logos.
    Remove any code which causes connection to or any kind of load of servers managed by Sigsiu.NET GmbH
    The terms "Sigsiu", "Sigsiu.NET", "Sobi" and "SobiPro" have to be removed from all visual outputs (front-end and back-end).
    The copyright notices within the source code files must not be removed and have to be left fully intact.
    This agreement does not limit user's rights under, or grant user rights that supersede, the license terms of any particular component of the Software.

In addition, licensees that modify the Software must give the modified Software a new name that is not confusingly similar to "Sobi" or "SobiPro" and may not distribute it under the names "Sobi" and "SobiPro".
The names "Sobi", "SobiPro" and "Sigsiu" must not be used to endorse or promote products derived from this Software without prior written permission of Sigsiu.NET GmbH.

If any provision of this agreement is held to be unenforceable, it does not excuse you from the conditions of this License. If the licensee cannot distribute so as to satisfy simultaneously his obligations under this License and any other pertinent obligations, then as a consequence he may not distribute the Software at all.

Divi Builder

  • Divi has added the following to the begining of the license.txt (GPLv2) in it's package
/*************************************************************************/
/*************************************************************************/

    Copyright 2015 Elegant Themes, Inc.

    All plugin files are licensed under the GNU Public License 2.0 unless
    specified as otherwise within the file itself. Some files may be
    licensed under alternative open source licenses such as MIT, BSD
    or OFL. Refer to individual files for licensing information. If no
    license is stated, then the file is placed under the GPL 2.0. You
    will find a copy of the GPL 2.0 below.

/*************************************************************************/
/*************************************************************************/

GPL - Aggregation

This Wordpress template license is a 'GPLv2 or later' license but it also 'bundles' third-party resources with their own licenses. I believe these will then form part of the GPLv2 license. This is good example of aggregation but it is possibly an example distributing code with a GPL licensed software but where they keep their own license rather than the viral properties of the parent softwares GPL license.

=== Twenty Seventeen ===
Contributors: the WordPress team
Requires at least: WordPress 4.7
Tested up to: WordPress 4.9-trunk
Version: 1.3
License: GPLv2 or later
License URI: http://www.gnu.org/licenses/gpl-2.0.html
Tags: one-column, two-columns, right-sidebar, flexible-header, accessibility-ready, custom-colors, custom-header, custom-menu, custom-logo, editor-style, featured-images, footer-widgets, post-formats, rtl-language-support, sticky-post, theme-options, threaded-comments, translation-ready

== Description ==

Twenty Seventeen brings your site to life with header video and immersive featured images. With a focus on business sites, it features multiple sections on the front page as well as widgets, navigation and social menus, a logo, and more. Personalize its asymmetrical grid with a custom color scheme and showcase your multimedia content with post formats. Our default theme for 2017 works great in many languages, for any abilities, and on any device.

For more information about Twenty Seventeen please go to https://codex.wordpress.org/Twenty_Seventeen.

== Installation ==

1. In your admin panel, go to Appearance -> Themes and click the 'Add New' button.
2. Type in Twenty Seventeen in the search form and press the 'Enter' key on your keyboard.
3. Click on the 'Activate' button to use your new theme right away.
4. Go to https://codex.wordpress.org/Twenty_Seventeen for a guide on how to customize this theme.
5. Navigate to Appearance > Customize in your admin panel and customize to taste.

== Copyright ==

Twenty Seventeen WordPress Theme, Copyright 2016 WordPress.org
Twenty Seventeen is distributed under the terms of the GNU GPL

This program is free software: you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
the Free Software Foundation, either version 2 of the License, or
(at your option) any later version.

This program is distributed in the hope that it will be useful,
but WITHOUT ANY WARRANTY; without even the implied warranty of
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
GNU General Public License for more details.

Twenty Seventeen bundles the following third-party resources:

HTML5 Shiv, Copyright 2014 Alexander Farkas
Licenses: MIT/GPL2
Source: https://github.com/aFarkas/html5shiv

jQuery scrollTo, Copyright 2007-2015 Ariel Flesler
License: MIT
Source: https://github.com/flesler/jquery.scrollTo

normalize.css, Copyright 2012-2016 Nicolas Gallagher and Jonathan Neal
License: MIT
Source: https://necolas.github.io/normalize.css/

Font Awesome icons, Copyright Dave Gandy
License: SIL Open Font License, version 1.1.
Source: http://fontawesome.io/

Bundled header image, Copyright Alvin Engler
License: CC0 1.0 Universal (CC0 1.0)
Source: https://unsplash.com/@englr?photo=bIhpiQA009k

== Changelog ==

= 1.3 =
* Released: June 8, 2017

https://codex.wordpress.org/Twenty_Seventeen_Theme_Changelog#Version_1.3

= 1.2 =
* Released: April 18, 2017

https://codex.wordpress.org/Twenty_Seventeen_Theme_Changelog#Version_1.2

= 1.1 =
* Released: January 6, 2017

https://codex.wordpress.org/Twenty_Seventeen_Theme_Changelog#Version_1.1

= 1.0 =
* Released: December 6, 2016

Initial release

 


 

Apache

How to apply this license

  • Create a text file (typically named LICENSE, LICENSE.txt, sometimes LICENSE.md) in the root of your source code and copy the text of the license into the file.
  • Note: The Apache Foundation recommends taking the additional step of adding a boilerplate notice to the header of each source file. You can find the notice at the very end of the license in the appendix.

Boilerplate License Examples

There is only the official boilerplate I have come across and it is straight forward.

To apply the Apache License to your work, attach the following boilerplate notice, with the fields enclosed by brackets "[]" replaced with your own identifying information. (Don't include the brackets!) The text should be enclosed in the appropriate comment syntax for the file format. We also recommend that a file or class name and description of purpose be included on the same "printed page" as the copyright notice for easier identification within third-party archives.

Copyright [yyyy] [name of copyright owner]

Licensed under the Apache License, Version 2.0 (the "License");
you may not use this file except in compliance with the License.
You may obtain a copy of the License at

    http://www.apache.org/licenses/LICENSE-2.0

Unless required by applicable law or agreed to in writing, software
distributed under the License is distributed on an "AS IS" BASIS,
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
See the License for the specific language governing permissions and
limitations under the License.

 


 

MIT

How to apply this license

  • Create a text file (typically named LICENSE, LICENSE.txt, sometimes LICENSE.md) in the root of your source code and copy the text of the license into the file. Replace [year] with the current year and [fullname] with the name (or names) of the copyright holders.
  • Optional: Add MIT to your project's package description, if applicable (e.g., Node.js, Ruby, and Rust). This will ensure the license is displayed in package directories.

The License

Some versions of this license do not have 'MIT License' at the top, but you should include it as it helps people identify the license quicker.

MIT License

Copyright (c) [year] [fullname]

Permission is hereby granted, free of charge, to any person obtaining a copy
of this software and associated documentation files (the "Software"), to deal
in the Software without restriction, including without limitation the rights
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
copies of the Software, and to permit persons to whom the Software is
furnished to do so, subject to the following conditions:

The above copyright notice and this permission notice shall be included in all
copies or substantial portions of the Software.

THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
OUT OF OR 

Boilerplate License Examples

There is no boilerplate because the license is so short it serves as both the license and boilerplate.

Published in General
Saturday, 28 January 2017 10:10

My Git Repository Provider Notes

This is my research on Git client software, Git server software and Git hosted services.

TL;DR = Use GitHub

Git is better than SVN for the following reasons and is why I use Git over SVN

  • Git is a distibuted repository system - What this means is you can work offline with your copy of the repository to which you can save, edit and modify etc.. and then when you go online you sync your repository rather that having to sync individual changes as soon as you have made them. This makes for a more efficient working enviroment.
  • There are many free Hosted Git repositories and many free local Git servers.

Online Repositories

  Bitbucket GitLab GitHub Gitea
URL https://bitbucket.org/ https://about.gitlab.com/gitlab-com/ https://github.com/

https://about.gitea.com/

Technology Cloud / Local Cloud / Local Cloud Cloud / Local
Model Free / Pro Free / Pro Free / Pro Free / Pro
Pro Terms basically $1 per Month User in blocks (10/25/50/100/Unlimited) - Academics can get unlimited account for free $39 per year per user Costing is done per number of users  
Notes Get unlimited private and public repositories with Bitbucket. Bitbucket Cloud is free for small teams of 5, integration with JIRA and Mercurial, issue tracking via JIRA, wiki -- 2gb repositry size https://confluence.atlassian.com/bitbucket/what-kind-of-limits-do-you-have-on-repository-file-upload-size-273877699.html, https://blog.bitbucket.org/2014/05/30/repository-size-limits/ Free unlimited public & private repositories and unlimited collaborators. 10GB Disk Space - Want to start using GitLab? You can easily import your repositories from Bitbucket, GitHub, Gitorious or anywhere else, all in batch!, this is the closet to GitHub, it supports the import of git and the issues, wikis, milestones and labels, it alos looks the closets inbuilt wiki and issue tracking  

Local Repositories

  Bitbucket Server GitLab CE Git SCM git for windows GitStack Bonobo Git Server Gogs - Go Git Service
URL https://bitbucket.org/product/server https://about.gitlab.com/downloads/ https://git-scm.com/ https://git-for-windows.github.io/ http://gitstack.com/ https://bonobogitserver.com/ https://gogs.io/
Technology Windows x64, Linux x64, Mac OS X Rasberry Pi 2 and other linux distros Windows, Mac OS X, Linux, Solaris Windows Windows Windows (via IIS)  
Model Paid Free (Single Tenant?) Free Free Free (for small teams)    
Pro Terms $10 1-Time payment for upto 10 Users further tiers available unlimited users          
Notes No Issue tracking a single-tenant solution which means your IP does not share the underlying infrastructure with other customers, opensource, basically linux only and would require VM for windows I think this is the creators of Git, possible command line only        

Notes

  • What is Mercurial repository hosting - it is another type of repository
  • Git was invented by linus torvell (the linux creator)
  • Git does not inherently come with a bugtracker, that is specific to the supplier
  • issue tracking is non standard so consider redmine
  • JIRA on local PC $10 1-Time payement for up to 10 users - is this a bug tracker
  • GitHub for all open source
  • you can move git repositories from one proveder to another
  • issue tracking is sseperate to Git and I don’t believe can be moved from 1 repo to another
  • bitbucket, gitlab and github have importers
  • what is jira
  • gitlab seems a lot slicker
  • if my projects get to big I can always do a virtual machine or use a rspeberry pi
  • bitnami has a gitlab virtual machine
  • bitbucket has a native windows executable
  • gitlab and github are both based on ruby on rails
  • need to researh JIRA
  • gitlab has this thing called Continuous Integration  (CI) which allows live testing of code
  • gitlab does not allow githooks in community edition - http://docs.gitlab.com/ee/customization/issue_closing.html
  • gitlab you can add files, bitbucket you cannot
  • gitlab has CI integration
  • gitlab sends you a quickstart email

My Thoughts?

  • bitbuckets is great for small companies with many projects who want all features of git, bit bucket has JIRA integration and the lcoal server version with JIRA is availabe for upt to 10 people for $20 1-Time payment which is great if you want a lcoal copy. The paid versions scale up quite nicly.
  • "gitlab is great for a single deloper whoes projects are not large in size, and needs many people to work on it. Gitlab communtiy edition is crippled and nto all git fuctions are vailable for the expert user, the local server is avaiable as a virtual mnachine for Pc, rasberyy pir 2 (but a bit slow) and othe flavours of linx --
  • To replace GitLab, you'd need a combination of Bitbucket server, JIRA, Confluence, and Bamboo. --"
  • Gitlab is the better choice for me because it has more fetures and I am never going to go over the 10gb limit and it can allow as many users as I want, If I do need more than 10gb I can setup a private server although I am not sure how to migrte to it just yet from the cloud version. the extra CI features are nice and migth come in handy later
  • for all my opensourec projects, suich as myitcrm I will use Github as this is the market leader and there are no limits to the account except it cannot be a private reposotry.
  • I went with the cloud version of GitLab because I don’t want the hassle of runnigna server and I can share worldwide. I also do not have to setup a serve local and maintain it. I would like to know how to backup my repositoires to my local machine once in a while.
  • no free SVN repositories out there but market leading free Git reposotries hence why I have picked Git and everytone seems to be moving to it. You can migrate the whole repositorie from one palce to another in tack by a simple command

Git Clients

Published in Programming
Friday, 27 January 2017 14:07

PHP comment characters

We should all know these but I didnt so I have just made a note of the PHP comment characters you can use.

#

//

/*
 *
 */ 

and in a HTML code block, within a PHP page, you should still use the code below as normal.

 <!-- -->
Published in PHP
Friday, 27 January 2017 14:05

What is PHP

This really is a place holder fopr me to explain PHP in simple terms.

PHP is a combination of

  • classes
  • functions
  • magic functions
  • maths
  • variables and constants

which is oriented around creating HTML and responding to POST and GET requests.


PHP also utilises numbers and text

 

Published in PHP
Friday, 27 January 2017 13:09

Grid columns in Footer

This allows me to use joomlashine <div class="grid-layout"></div> in the footer. This code was used in the JSN Dona template would I am sure is the same for all of the other templates. It is great for adding in modules or mutliple menus.

/*-- Grid columns in Footer --*/

/* grid columns get squashed in footer */
div#jsn-pos-footer {
    width: 100% !important;
}

/* set min width for grid layout */
/* #jsn-footer div.grid-layout4 div.grid-col, - for reference only */
#jsn-footer div[class*="grid-layout"] div.grid-col {
	min-width: 200px;
}

/* note this is the total width of the columns -1px */
@media only screen and (max-width: 799px), (max-device-width: 799px) {
    #jsn-footer div[class*="grid-layout"] div.grid-col {
        width: 100%;
        
    }
    /* centers all items */
    #jsn-footer div[class*="grid-layout"] div.grid-col_inner {   
        text-align: center;
    }
    /* centers social icons - i also could add text-align: justify; to the custom html code */
    #jsn-footer #jsn-social-icons ul li a {	
        text-align: center;
    }
}

/* fix for column min height  custom.css 2378 */
@media only screen and (max-width: 768px), (max-device-width: 768px) {
    div.grid-layout4 div.grid-col {
        min-height: 1px;
    }
}

 

Published in Joomlashine
Friday, 27 January 2017 12:14

Logo

I cant remember where I have used this.

/** logo fix / header **/

/* remove large gap above and below - when you have seperated menu and logo */
#jsn-logo a {
	margin-top: 10px;
    margin-bottom: 0;
}

/* make the header sections responsive so they look nice */
@media screen and (max-width: 640px) {
    
    #lancastrian-header-left{
        float: none !important;
        text-align: center;
    }
    
    #lancastrian-header-right{
        float: none !important;
        text-align: center;
    }    
    
}

 

 

Published in Joomlashine
Page 16 of 95