Skip to content

Commit

Permalink
upload existing code to github
Browse files Browse the repository at this point in the history
  • Loading branch information
foosinn committed Oct 23, 2019
0 parents commit 54a0401
Show file tree
Hide file tree
Showing 7 changed files with 591 additions and 0 deletions.
1 change: 1 addition & 0 deletions .gitignore
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
.idea
21 changes: 21 additions & 0 deletions LICENSE
Original file line number Diff line number Diff line change
@@ -0,0 +1,21 @@

The MIT License (MIT)

Copyright (c) 2013 Christopher Schirner

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 IN
CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
59 changes: 59 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,59 @@
# shoogle list

## what it does

ShoogleList is an MediaWiki-Extension to provide an overview of a specific category.
It's not just a simple list of articles inside a specific category - it parses data from a template used inside the article

An example can be found here: https://hackerspace-bamberg.de/Projekte

## Usage

To use shooglelist inside your mediawiki you only have to specify the shoogle-tag:

<shoogle defaultdesc="This is a default description" defaultimg="Cat default processor.png">Projekt</shoogle>

As you can see, you are able to define an default image and description, which is used if neither the image or the description is specified in the article project-template. This examples indexes all articles inside the category "Projekt".

Possible arguments are:

defaultdesc (string) - default description if the article doesnt have an description
defaultimage (string) - default image if article doesnt have an image
thumb_size (integer) - thumbnail size (default 180)
trim_text (integer) - trims text to a given length (default off)
limit (integer) - on "project of the day"-mode the amount of items shown


## Article Definition

In order to work correctly you have to specify a ProjektInfobox-Template inside your article:

{{Infobox Projekt
|name = ShoogleList Github Example
|autor = schinken
|beschreibung = Some basic usage example of shooglelist
|image = ShoogleList Preview Image.png
}}


This template is also available here: https://hackerspace-bamberg.de/index.php?title=Vorlage:Infobox_Projekt&action=edit and requires a lot of installation
and configuration to work (which i wont explain here :))

## Installation

Switch to your mediawiki-extension directory:

cd /var/www/mediawik/extensions

Clone ShoogleList from my repostory (or a fork on your repository):

git clone https://github.com/Schinken/shooglelist.git

instead you can also install it from tarball:

wget 'https://github.com/Schinken/shooglelist/tarball/master' -O ShoogleList.tar.gz
tar xvfz ShoogleList.tar.gz

... and as the last step, you need to add the extension to your LocalSettings.php (in your mediawiki-root directory):

include_once("$IP/extensions/ShoogleList/ShoogleList.php");
55 changes: 55 additions & 0 deletions ShoogleList.css
Original file line number Diff line number Diff line change
@@ -0,0 +1,55 @@
.shoogle-list {
list-style-position: outside;
list-style-type: none;
list-style-image: none;
}

.shoogle-item {
float: left;
width: 190px;
height: 300px;
padding: 5px;
margin: 10px 16px;
}

.shoogle-title {
font-family: 'Ubuntu Condensed', sans-serif;
font-size: 18px;
margin: 5px 0;
font-weight: normal;
color: #222;

display: block;
}

.shoogle-title a, .shoogle-title a:visited, .shoogle-title a:link {
color: #222;
}

.shoogle-image {
display: block;
}

.shoogle-teaser {
line-height: 20px;
text-align: justify;
color: #7E7E7E;
font-family: Lucida Grande, Verdana, Arial, sans-serif;
font-size: 12px;
}

.shoogle-potd .shoogle-item {
width: 160px;
padding: 0;
margin: 4px 6px;
height: auto;
}

.shoogle-potd .shoogle-title {
font-size: 14px;
}

.shoogle-sortable {
text-align: right;
margin-right: 45px;
}
29 changes: 29 additions & 0 deletions ShoogleList.i18n.php
Original file line number Diff line number Diff line change
@@ -0,0 +1,29 @@
<?php
/**
* Internationalisation file for ShoogleList extension.
*
* @file
* @ingroup Extensions
* @author Christoher Schirner
*/

$messages = [];

/** English
* @author Christopher Schirner
*/
$messages['en'] = [
'sort_ASC' => 'ascending',
'sort_DESC' => 'descending',
'field_cl_sortkey' => 'alphabetical',
'field_page_touched' => 'last change',
'field_page_id' => 'creation date',
];

$messages['de'] = [
'sort_ASC' => 'Aufsteigend',
'sort_DESC' => 'Absteigend',
'field_cl_sortkey' => 'Alphabetisch',
'field_page_touched' => 'Letzte Änderung',
'field_page_id' => 'Erstellungsdatum',
];
Loading

0 comments on commit 54a0401

Please sign in to comment.