🌍
English
This shows you the differences between two versions of the page.
en:customization:branch_1.5 [2006/03/27 19:18] 82.246.200.19 |
— (current) | ||
---|---|---|---|
Line 1: | Line 1: | ||
- | ====== Activate Links ====== | ||
- | |||
- | ===== Reminder ===== | ||
- | |||
- | With /tools/ you've get a sample of config_local.inc.php | ||
- | |||
- | **Make a copy** in /include/ | ||
- | |||
- | Then: | ||
- | - Add any parameter changes as explained in [[en:configuration|Configuration]] | ||
- | - **Don't change anymore config_default.inc.php !** | ||
- | |||
- | ===== Open your own link in a new window ===== | ||
- | For each used template, in category.tpl e.g. yoga | ||
- | |||
- | Replace (near line 3, following lines): | ||
- | <code html4strict> | ||
- | <!-- BEGIN links --> | ||
- | <dl> | ||
- | <dt>{lang:Links}</dt> | ||
- | <dd> | ||
- | <ul> | ||
- | <!-- BEGIN link --> | ||
- | <li><a href="{links.link.URL}">{links.link.LABEL}</a></li> | ||
- | <!-- END link --> | ||
- | </ul> | ||
- | </dd> | ||
- | </dl> | ||
- | <!-- END links --> | ||
- | </code> | ||
- | |||
- | By: | ||
- | <code html4strict><!-- BEGIN links --> | ||
- | <dl> | ||
- | <dt>{lang:Links}</dt> | ||
- | <dd> | ||
- | <ul> | ||
- | <!-- BEGIN link --> | ||
- | <li><a target="_blank" href="{links.link.URL}">{links.link.LABEL}</a></li> | ||
- | <!-- END link --> | ||
- | </ul> | ||
- | </dd> | ||
- | </dl> | ||
- | <!-- END links --> | ||
- | </code> | ||
- | |||
- | ===== Move "Links" menu ===== | ||
- | For each used template, in category.tpl e.g. yoga | ||
- | |||
- | Cut (near line 3, following lines): | ||
- | <code html4strict><!-- BEGIN links --> | ||
- | <dl> | ||
- | <dt>{lang:Links}</dt> | ||
- | <dd> | ||
- | <ul> | ||
- | <!-- BEGIN link --> | ||
- | <li><a href="{links.link.URL}">{links.link.LABEL}</a></li> | ||
- | <!-- END link --> | ||
- | </ul> | ||
- | </dd> | ||
- | </dl> | ||
- | <!-- END links --> | ||
- | </code> | ||
- | |||
- | Paste before (or after), this: | ||
- | <code html4strict> | ||
- | <dl> | ||
- | <dt>{L_SUMMARY}</dt> | ||
- | <dd> | ||
- | <ul> | ||
- | <!-- BEGIN summary --> | ||
- | <li><a href="{summary.U_SUMMARY}" title="{summary.TITLE}">{summary.NAME}</a></li> | ||
- | <!-- END summary --> | ||
- | <!-- BEGIN upload --> | ||
- | <li><a href="{upload.U_UPLOAD}">{L_UPLOAD}</a></li> | ||
- | <!-- END upload --> | ||
- | </ul> | ||
- | </dd> | ||
- | </dl></code> | ||
- | |||
- | |||
- | |||
- | ====== Layout ====== | ||
- | |||
- | ===== Add your own Welcome Banner ===== | ||
- | |||
- | via Admininistration / Configuration / General for field "Gallery description" remove current description and replace it | ||
- | by | ||
- | <code html><div style="padding:3px;"><img src="logo/my_logo.jpg"></div> </code> | ||
- | |||
- | This html code will be used in state of the previous text format description. | ||
- | A received tip on French side of our [[http://forum.phpwebgallery.net/|Forum]], thanks a lot to [[http://forum.phpwebgallery.net/profile.php?id=1476|rub]]. | ||
- | |||
- | |||
- | ===== Hide galery title ===== | ||
- | in **default_layout.css** : | ||
- | <code>#theHeader { | ||
- | display: none; | ||
- | }</code> | ||
- | |||
- | |||
- | |||
- | |||
- | |||
- | |||
- | |||
- | ===== Hide the "quickconnect" connection form in the menu bar ===== | ||
- | in **default_layout.css** : | ||
- | <code>FORM#quickconnect { | ||
- | display: none; | ||
- | }</code> | ||
- | |||
- | ===== Set the margin of the page ===== | ||
- | in **default_layout.css** : | ||
- | <code> | ||
- | BODY { | ||
- | margin: 5px; | ||
- | } | ||
- | </code> | ||
- | |||
- | ===== Fix position of next/previous thumbnail in picture page ===== | ||
- | To set both thumbnails under the title bar and left and right of the actual picture, try in **default_layout.css** : | ||
- | <code> | ||
- | #the_page { | ||
- | position: relative; | ||
- | } | ||
- | * html #the_page { /* IE only */ | ||
- | position: absolute; | ||
- | left: 0; | ||
- | } | ||
- | #thumbPrev { | ||
- | position: absolute; | ||
- | left: 5px; | ||
- | top: 200px; | ||
- | float: none; | ||
- | } | ||
- | #thumbNext { | ||
- | position: absolute; | ||
- | right: 5px; | ||
- | top: 200px; | ||
- | float: none; | ||
- | } | ||
- | </code> | ||
- | Seems to be OK with Gecko, KHTML, Opera, and IE (with a special rule "* html #the_page") | ||
- | We don't like this layout very mutch because when the picture is wide, the thumbnails overlap and it's not pretty. | ||
- | |||
- | ===== Change legend attributes in picture page ===== | ||
- | All picture legend information has the same generation code. | ||
- | If you need to change some of those, you can edit picture.php. | ||
- | Author field for instance, near line 671, find this : | ||
- | <code php> | ||
- | // author | ||
- | if (!empty($picture['current']['author'])) | ||
- | { | ||
- | $infos['INFO_AUTHOR'] = | ||
- | '<a href="'. | ||
- | add_session_id( | ||
- | PHPWG_ROOT_PATH.'category.php?cat=search'. | ||
- | '&search=author:'.$picture['current']['author'] | ||
- | ). | ||
- | '">'.$picture['current']['author'].'</a>'; | ||
- | } | ||
- | else | ||
- | { | ||
- | $infos['INFO_AUTHOR'] = l10n('N/A'); | ||
- | } | ||
- | </code> | ||
- | You could add a class (class="author" and manage it in defaut-color.css), | ||
- | or you could add style="color: #009900; font-weight: bold;"... | ||
- | e.g.: | ||
- | <code php> | ||
- | // author | ||
- | if (!empty($picture['current']['author'])) | ||
- | { /* MyPWG Start */ | ||
- | $infos['INFO_AUTHOR'] = | ||
- | '<a style="color: #009900; font-weight: bold;" href="'. | ||
- | add_session_id( | ||
- | PHPWG_ROOT_PATH.'category.php?cat=search'. | ||
- | '&search=author:'.$picture['current']['author'] | ||
- | ). | ||
- | '">'.$picture['current']['author'].'</a>'; | ||
- | } | ||
- | else | ||
- | { | ||
- | $infos['INFO_AUTHOR'] = '<span class="water">'.l10n('N/A').'</span>'; | ||
- | } /* MyPWG End */ | ||
- | </code> | ||
- | This is true for **all metadata** fields. | ||
- | |||
- | Note: inline style should be used for testing only, **use a class and rules in default-color.css instead** espacially if you want to release a MOD. | ||
- | |||
- | Tips: | ||
- | * Try to **add your change without adding any new line** (this will simplify support and MOD apply). | ||
- | * Try to **add a comment marker** to improve finding your changes before applying a new version of PWG (i.e. /* MyPWG */ ) | ||
- | |||
- | ===== Hide legend fields under pictures ===== | ||
- | |||
- | ... like Author, Created on, Registered on, Dimensions, File or Average rate. | ||
- | |||
- | In the file **template/your_template/default-layout.css** add this part of code: | ||
- | <code css> | ||
- | TABLE.infoTable { | ||
- | display: none; | ||
- | } | ||
- | </code> | ||
- | |||
- | //Warning: this tip will hide **all** captions, you can't select only on caption to hide.// | ||
- | |||
- | ===== Hide the navigation thumbnails in "picture" page ===== | ||
- | In **default_layout.css** : | ||
- | <code> | ||
- | .navThumb { | ||
- | display: none; | ||
- | } | ||
- | </code> | ||
- | |||
- | ====== Behaviour ====== | ||
- | |||
- | ===== Display only positive number of user comments ===== | ||
- | |||
- | in **''include/category_default.inc.php''**, (line 136) replace | ||
- | <code php>$template->assign_block_vars( | ||
- | 'thumbnails.line.thumbnail.nb_comments', | ||
- | array('NB_COMMENTS'=>$row['nb_comments']));</code> | ||
- | by | ||
- | <code php>if ($row['nb_comments'] > 0) | ||
- | { | ||
- | $template->assign_block_vars( | ||
- | 'thumbnails.line.thumbnail.nb_comments', | ||
- | array('NB_COMMENTS'=>$row['nb_comments'])); | ||
- | }</code> |