Showing posts with label cms. Show all posts
Showing posts with label cms. Show all posts

7 Aug 2012

Concrete 5 [FR/EN/DE]

[FR]

Ça fait plaisir d'avoir des demandes d'intervention des sociétés non-connu de notre part afin de régler des soucis avec leur installation Concrete 5. On peut vraiment dire que nous nous sommes distingué comme des experts dans les installations de Concrete 5 et de la création d'extensions de ce dernier.

Concrete 5 est vraiment un CMS qui évolue dans la bonne direction (même si je changerait plusieurs choses à leur place), et ça fait vraiment plaisir de travailler avec, de construire au-dessus la base et de l'étendre à nos besoins et les besoins de nos clients.

[EN]

It is really a pleasure to get demands for intervention from for us unknown companies to help them solve problems with their Concrete 5 installations. One can really say that we distinguished ourselfs as experts in Concrete 5 installations and the creation of extensions for it.

Concrete 5 is really a CMS that evolves in the right direction (even if I would change multiple things ain their place), and it is really a pleasure to work with it, build upon its base and to extend it for our needs and the needs of our clients.

[DE]

Es ist mit grosser Freude Anfragen von für uns unbekannte Firmen zu bekommen um Probleme mit ihren Concrete 5 Installationen zu regeln. Man kann wirklich sagen das wir uns als Concrete 5 Experten hervorgehoben haben was installationen und erweiterungen angeht.

Concrete 5 ist wirklich ein CMS das sich in die richtige Richtung entwickelt (selbst wenn ich an deren Stelle mehrere Dinge ändern würde), und es es bereitet Freude damit zu arbeiten, auf seiner Basis aufzubauen und es zu erweitern für unsere Bedürfnisse und den Bedürfnissen unserer Kunden.

3 Jun 2010

Concrete 5 : Add a filetype-logo to the "File-Block" [TinyHowTo]

A small how-to add a CSS selector to the File-block in the Concrete 5.4 base install :

The Goal

When linking to a file for download, a nice way to brush up the presentation of the link is to display the file-type icon alongside it. This gives the site visitor an idea as to what they are downloading, and makes the link stand out a bit more within the page:






By default, concrete5's file block simply displays a link to the file, without any icon. But adding this icon can be easily done with some quick modifications to the file block's view.php and controller.php files.

Override the File Block's View Template and Controller

First you have to create the folder 'file' in the blocks folder in your concrete5 root. Then copy the files 'view.php' and 'controller.php' from the /concrete/blocks/file/ folder in your newly created one. This will allow you to make changes to these two templates without affecting the core files.

Modify the Controller

Open the controller.php and add the following function to the end of the class :
function getFileExtension() {
$f = $this->getFileObject();
$file_name = $f->getTitle();
$file_extension = explode('.',$file_name);
return $file_extension[1];
}

Modify the View

Now open the view.php and change the line 7 (the HTML link) to :

<a href="<?php echo View::url('/download_file', $controller->getFileID())?>" title="<?php echo stripslashes($controller->getLinkText())?>" class="file-type-<?=$controller->getMimeType()?>"><?php echo stripslashes($controller->getLinkText())?></a>

What you get

As a result you will have the usual link, but now with a CSS selector you can use to add a file-type logo/icon, like this style-sheet (case PDF) :

.file-type-pdf {
display:block;
background-image:url(./images/pdf.gif);
background-position:0 center;
background-repeat:no-repeat;
padding-left:20px;
}


Now you have a file-type logo with your file download in Concrete5.