Fullscreen
[Show/Hide Right Column]

Close
noteNote
This page is to document "what Tiki should do". For feature documentation (what Tiki does), please see corresponding page on doc site

Image Directory Revamp

Tiki img directory consolidation.

Revamp finished and part of Tiki9

Goal

  • Stage 1: to have a clean, organized structure to find things where they are expected - DONE
  • Stage 2: delete unnecessary, unused files - partly DONE, still many unused files left

Timeline

  • lets agree first on how it should be, than figure out how to do
  • March 2nd - 4th: make it happen for Tiki9 (trunk now)
  • Document the changes made: Update docs for Tiki 9 -> Tiki9

Number of references in all the files

Some grepping stats (revision 39998 after clearing Tiki cache):

luci@w7-vbox-ubuntu:/var/www/tikitrunk$ grep -Ro --exclude-dir=\.svn 'img\/' * | wc -l
1029
luci@w7-vbox-ubuntu:/var/www/tikitrunk$ grep -Ro --exclude-dir=\.svn 'images\/' * | wc -l
1448
luci@w7-vbox-ubuntu:/var/www/tikitrunk$ grep -Ro --exclude-dir=\.svn 'pics\/' * | wc -l
4574

Revamped img dir structure proposal

  • img/
    • img/avatars/
    • img/flags/
    • img/icons/
    • img/smiles/
    • img/tiki/
    • img/trackers/
    • img/webmail/
    • img/wiki/
    • img/wiki_up/

Issues / Questions / Concerns

  • things might get temporarily broken in trunk but on the long run we should get through this
  • afraid if the "icon themes" override functionality will be preserved (see for example Strasa theme) — luci
  • what happens if there is wiki page created named "images" and rewrite rules are on via .htaccess - it is very possible case. Will the images be still readable or broken ? would not it be better to use the img dir or pics dir instead ? — luci
    • OK. Just tried and it reveals, that if one creates page named "Images", he/she cannot access the created page after save using the SEFURL, because Tiki thinks it is the images/ dir and there is the index.php redirect to Tiki index page. — luci
      • luci: Only one problem remains with the images dir - now when it is gone i would expect that my test wiki page named "images" will be working but i get error instead redirecting me from http://localhost/tikitrunk/images to http://localhost/tikitrunk/images/ and the error is: "Page not found images/" and the theme is completely broken
        • gezza: on my localhost with SefURL on "tikitrunk/images" is being displayed fine
  • just spotted it: what about lib/images/icons/ ? — luci
  • known issue - Xavi reported his custom icons use old paths to pics/ and he gets PHP error now - will need php upgrade script created in installer/schema/ to replace the paths in tiki_preferences tool_icon

Things to Check

  • Now we have just some things to check remaining:
    • rewrite rules in .htaccess
    • is there any Tiki 9 specific profile using the old paths on http://profiles.tiki.org?
    • is there any Theme on themes.tiki.org using the old paths?
    • are there any possible use cases causing trouble after upgrade?
      • custom toolbar icons created at /tiki-admin_toolbars.php get broken after update if they point to the legacy pics/icons folder. Related data is stored in tiki_preferences table with pref name tool_icons.
    • does fresh install work fine?

Overview

Current pathCurrent number of picsProposalDone in trunk
EXISTING DIRECTORIES
/images87move to /imgYes
/img26leave as it isYes
/img/avatars0leave as it isYes
/img/flags252leave as it isYes
/img/graph4move files to /img and DELETEYes
/img/icn34DELETEYes
/img/icons310leave as it isYes
/img/icons2164move files to /img/icons and DELETEYes
/img/mytiki16move files to /img/icons/large/ and DELETEYes
/img/smiles24leave as it isYes
/img/tiki7leave as it isYes
/img/trackers0leave as it isYes
/img/webmail14leave as it isYes
/img/wiki0leave as it isYes
/img/wiki_up0leave as it isYes
/pics6move to /img/ and DELETEYes
/pics/icons212move to /img/iconsYes
/pics/icons/mime39move to /img/icons/mime and DELETEYes
/pics/large111move to /img/icons/large and DELETEYes
/pics/sprite2move to /img/icons/sprite and DELETEYes

Important files to check

./lib/init/smarty.php:26:			'styles/strasa/pics/icons/',
./lib/init/smarty.php:27:			'styles/coelesce/pics/icons/',
./lib/init/smarty.php:28:			'styles/darkroom/pics/icons/',
./lib/init/smarty.php:29:			'styles/thenews/pics/icons/',
./lib/init/smarty.php:30:			'styles/tikinewt/pics/icons/',
./lib/init/smarty.php:31:			'styles/twist/pics/icons/',
./lib/init/smarty.php:38:			'pics/',
./lib/init/smarty.php:39:			'pics/icons',
./lib/init/smarty.php:40:			'pics/icons/mime',
./lib/init/smarty.php:41:			'pics/large',
./lib/prefs/menus.php:20:			'default' => 'pics/large',
./lib/smarty_tiki/function.icon.php:58:	$basedirs = array('pics/icons', 'images', 'img/icons', 'pics/icons/mime');
./lib/smarty_tiki/function.icon.php:71:		if ( isset($params['_defaultdir']) && $params['_defaultdir'] == 'pics/large' ) {
./lib/smarty_tiki/function.icon.php:79:		if ( $params['_defaultdir'] == 'pics/large' ) {

./lib/smarty_tiki/modifier.iconify.php 29: 	$icon = file_exists("pics/icons/mime/$ext.png") ? $ext : 'default';

33: '_id' => 'pics/icons/mime/'.$icon.'.png',

Change description

File system changes

r39999 - r40040

DB changes

No change

Background information

[+]

Alias


Contributors to this page: Marc Laporte19152 points  , gezza457 points  and luciash d' being2301 points  .
Page last modified on Saturday 21 April, 2012 19:44:38 UTC by Marc Laporte19152 points .

Search Wishes (subject only) [toggle]

Categorize Image Directory Revamp

Keywords

The following is a list of keywords that should serve as hubs for navigation within the Tiki development and should correspond to documentation keywords.

Each feature in Tiki has a wiki page which regroups all the bugs, requests for enhancements, etc. It is somewhat a form of wiki-based project management. You can also express your interest in a feature by adding it to your profile. You can also try out the Dynamic filter.