Loading...
 
Skip to main content

changi's work

Hello All,

Just a little wiki page to expose what i'm trying to do.

1. 2011

1.1. Revamping stats.tiki.org

Change the default theme to use Fivealive css
Change the code presentation to get a different look

1.2. Implement XHPROF on our website.


Example:
Image

1.3. Implement CSS Sprite in Tiki


Sprite Generator

I'm starting with admin panel :


will replace all uniq picture.

CSS Code : Should i create a new css file or insert it in layout.css or design.css

Copy to clipboard
.sprite { background: url('sprite.png') no-repeat top left; } .sprite.ads48x48 { background-position: 0px 0px; width: 48px; height: 48px; } .sprite.blogs48x48 { background-position: -58px 0px; width: 48px; height: 48px; } .sprite.boot48x48 { background-position: -116px 0px; width: 48px; height: 48px; } .sprite.categories48x48 { background-position: -174px 0px; width: 48px; height: 48px; } .sprite.comments48x48 { background-position: -232px 0px; width: 48px; height: 48px; } .sprite.copyright48x48 { background-position: -290px 0px; width: 48px; height: 48px; } .sprite.date48x48 { background-position: -348px 0px; width: 48px; height: 48px; } .sprite.display-capplet48x48 { background-position: -406px 0px; width: 48px; height: 48px; } .sprite.editing48x48 { background-position: -464px 0px; width: 48px; height: 48px; } .sprite.evolution48x48 { background-position: -522px 0px; width: 48px; height: 48px; } .sprite.feed-icon-48x48 { background-position: -580px 0px; width: 48px; height: 48px; } .sprite.file-manager48x48 { background-position: -638px 0px; width: 48px; height: 48px; } .sprite.gnome-camera-video-48 { background-position: -696px 0px; width: 48px; height: 48px; } .sprite.gnome-fs-server48x48 { background-position: -754px 0px; width: 48px; height: 48px; } .sprite.gnome-globe48x48 { background-position: -812px 0px; width: 48px; height: 48px; } .sprite.gnome-lockscreen48x48 { background-position: -870px 0px; width: 48px; height: 48px; } .sprite.gnome-settings-background48x48 { background-position: -928px 0px; width: 48px; height: 48px; } .sprite.gnome-settings-font48x48 { background-position: -986px 0px; width: 48px; height: 48px; } .sprite.google_maps48x48 { background-position: -1044px 0px; width: 48px; height: 48px; } .sprite.goto48x48 { background-position: -1102px 0px; width: 48px; height: 48px; } .sprite.i18n48x48 { background-position: -1160px 0px; width: 48px; height: 48px; } .sprite.icon-configuration48x48 { background-position: -1218px 0px; width: 48px; height: 48px; } .sprite.intertiki48x48 { background-position: -1276px 0px; width: 48px; height: 48px; } .sprite.maps48x48 { background-position: -1334px 0px; width: 48px; height: 48px; } .sprite.messages48x48 { background-position: -1392px 0px; width: 48px; height: 48px; } .sprite.metatags48x48 { background-position: -1450px 0px; width: 48px; height: 48px; } .sprite.payment48x48 { background-position: -1508px 0px; width: 48px; height: 48px; } .sprite.performance48x48 { background-position: -1566px 0px; width: 48px; height: 48px; } .sprite.profiles48x48 { background-position: -1624px 0px; width: 48px; height: 48px; } .sprite.rating48x48 { background-position: -1682px 0px; width: 48px; height: 48px; } .sprite.semantic48x48 { background-position: -1740px 0px; width: 48px; height: 48px; } .sprite.socialnetworks48x48 { background-position: -1798px 0px; width: 48px; height: 48px; } .sprite.stock_about48x48 { background-position: -1856px 0px; width: 48px; height: 48px; } .sprite.stock_bold48x48 { background-position: -1914px 0px; width: 48px; height: 48px; } .sprite.stock_contact { background-position: -1972px 0px; width: 32px; height: 32px; } .sprite.stock_dialog_question48x48 { background-position: -2014px 0px; width: 48px; height: 48px; } .sprite.stock_index48x48 { background-position: -2072px 0px; width: 48px; height: 48px; } .sprite.stock_missing-image48x48 { background-position: -2130px 0px; width: 48px; height: 48px; } .sprite.stock_quit48x48 { background-position: -2188px 0px; width: 48px; height: 48px; } .sprite.stock_select-color48x48 { background-position: -2246px 0px; width: 48px; height: 48px; } .sprite.userfiles48x48 { background-position: -2304px 0px; width: 48px; height: 48px; } .sprite.users48x48 { background-position: -2362px 0px; width: 48px; height: 48px; } .sprite.vcard48x48 { background-position: -2420px 0px; width: 48px; height: 48px; } .sprite.webservices48x48 { background-position: -2478px 0px; width: 48px; height: 48px; } .sprite.wikipages48x48 { background-position: -2536px 0px; width: 48px; height: 48px; } .sprite.wysiwyg48x48 { background-position: -2594px 0px; width: 48px; height: 48px; } .sprite.xfce4-appfinder48x48 { background-position: -2652px 0px; width: 48px; height: 48px; }


In that example, it decrease the size from 364ko to 146ko.

What do you think ?

1.3.1. Step 1 : Static creation for admin panel

1.3.2. Step 2 : Static creation for other common icons

1.3.3. Step 3 : View to generate dynamic CSS Sprite




2. 2010

1/ Fight against non/bad indent code.
2/ Check all Tikiwiki code to find unuse thing (php file, template, function)

1/ Fight against non indent code.

Use PHP_beautifier to auto indent the PHP Code and to put Tikiwiki copyright.

command line
Copy to clipboard
php_beautifier -t -l "ArrayNested()" source destination


I made a global commit on the tiki-admin*.
I can add the Tiki Copyright in the PHP file header. Just add a comment on this article if you want so and give me a example of what you want to add.

Let me know if this correspond to your need.

1.1/ Adding Copyright.


// (c) Copyright 2002-2009 by authors of the Tiki Wiki/CMS/Groupware Project
//
// All Rights Reserved. See copyright.txt for details and a complete list of authors.
// Licensed under the GNU LESSER GENERAL PUBLIC LICENSE. See license.txt for details.



2/ Check all Tikiwiki code to find unuse thing (php file, template, function)
The global goal is to identify unuse function and template in Tiki to create a wiki page with the unused list.

In order to do that, i have to create some REGEXP based on good practise in smarty and zend which will be use to browse the Tiki tree looking for the UNUSE.

  • TPL
    • First work is to look for TPL declaration in template with the "include file=" smarty function. <= actually working on
    • Doing this, I saw that this declaration was different depending on who create the tpl.
    • To make some quality i decided to standardize the way of declaration according to smarty examples http://www.smarty.net/manual/en/language.function.include.phpQuestion

    • Next, identified TPL display in the PHP files.

  • Function
    • Browsing, first time, all php files to get all function
    • For all function found, try to find usage in PHP file
    • Build an unuse list of function.






Show PHP error messages