Hi,
So, it would be probably best for now to post changes here. The ’typo’, as I write, is a short version of ’typography’ - fonts and their colors. I’m a big fan of clear, stylish text.
(1) Language improvements
==========================
(A) I’ve put this function in config.inc.php. I put it in this file, ’cos I don’t know where it would be better. Config is probably not the best idea:
function lang($key) { /* returns translation form $lang array. But if it is not present, returns $key - better than nothing! */
global $_lang;
if (isset($_lang[$key])) {
return $_lang[$key];
} else return $key;
}
You may rewrite it using $_GLOBAL and you will probably know where the proper place for this function is.
(B) For Site schedule translation, this needs to be appended to englis.inc.php:
/* Site schedule */
$_lang["document"] = "Document";
$_lang["id"] = "ID";
$_lang["publish_events"] = "Publish events";
$_lang["unpublish_events"] = "Unpublish events";
$_lang["all_events"] = "All Event";
$_lang["no_docs_pending_unpublishing"]="There are no documents pending unpublishing.";
$_lang["no_docs_pending_publishing"]="There are no documents pending publishing.";
$_lang["no_docs_pending_pubunpub"]="There are no documents pending publishing or unpublishing.";
(C) File site_schedule.static.action.php was changed, several lang() calls added. Changed file is in the attachment.
(D) Please consider leaving_underscore_convention in $_lang[] keys. If it would be like lang("English text goes here") and $_lang["English text goes here"] in the language file, the english developer would be able to write almost-english in the code and with lang() function it would work even if the localization file is not complete.
(2) XHTML header
================
I’ve added these lines to header.inc.php:
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.1//EN" "
http://www.w3.org/TR/xhtml11/DTD/xhtml11.dtd">
<html xmlns="
http://www.w3.org/1999/xhtml" xml:lang="en">
Remember, that DOCTYPE must be on the first line, no enter before that.
Doing development out of quirk mode is imho absolute must, otherwise it would need heavy recoding when changed to standard mode later.
(3) After saving translation
============================
Please, in /actions/dynamic, change all
<td><span class="comment"> After saving:</span></td>
to
<td><span class="comment"> <?=lang("after_saving");?>:</span></td>
and add $_lang["after_saving"]="After saving"; to english language file.
(4) Two columns in document info
================================
Due to little bit mess in CSS files, I’m not sure if I can track my changes back correctly.
So, in document_data.static.action.php, the table is broken into two:
/* BEGIN CODE */
<table class="docinfotable" style="float:left;margin-right:1em;" width="45%" border="0" cellspacing="0" cellpadding="0">
<tr>
<td colspan="2"><h3><?php echo $_lang["page_data_general"]; ?></h3></td>
</tr>
<tr>
<td width="50%" valign="top"><?php echo $_lang["document_title"]; ?>: </td>
<td><b><?php echo $content['pagetitle']; ?></b></td>
</tr>
<tr>
<td width="50%" valign="top"><?php echo $_lang["long_title"]; ?>: </td>
<td><small><?php echo $content['longtitle']!='' ? $content['longtitle'] : "(<i>".$_lang["notset"]."</i>)" ; ?></small></td>
</tr>
<tr>
<td valign="top"><?php echo $_lang["document_description"]; ?>: </td>
<td><?php echo $content['description']!='' ? $content['description'] : "(<i>".$_lang["notset"]."</i>)" ; ?></td>
</tr>
<tr>
<td valign="top"><?php echo $_lang["type"]; ?>: </td>
<td><?php echo $content['type']=='reference' ? $_lang['weblink'] : $_lang['document'] ; ?></td>
</tr>
<tr>
<td valign="top"><?php echo $_lang["document_alias"]; ?>: </td>
<td><?php echo $content['alias']!='' ? $content['alias'] : "(<i>".$_lang["notset"]."</i>)" ; ?></td>
</tr>
<tr>
<td valign="top"><?php echo $_lang['keywords']; ?>: </td>
<td><?php
if(count($keywords) != 0) {
echo join($keywords, ", ");
} else {
echo "(<i>".$_lang['notset']."</i>)";
}
?></td>
</tr>
<tr>
<td colspan="2"> </td>
</tr>
<tr>
<td colspan="2"><h3><?php echo $_lang["page_data_changes"]; ?></h3></td>
</tr>
<tr>
<td><?php echo $_lang["page_data_created"]; ?>: </td>
<td><?php echo strftime("%d/%m/%y %H:%M:%S", $content['createdon']+$server_offset_time); ?> (<b><?php echo $createdbyname ?></b>)</td>
</tr>
<?php
if($editedbyname!='') {
?>
<tr>
<td><?php echo $_lang["page_data_edited"]; ?>: </td>
<td><?php echo strftime("%d/%m/%y %H:%M:%S", $content['editedon']+$server_offset_time); ?> (<b><?php echo $editedbyname ?></b>)</td>
</tr>
<?php
}
?>
</table>
<table class="docinfotable" style="float:left;margin-left:1em;" width="45%" border="0" cellspacing="0" cellpadding="0">
<tr>
<td colspan="2"><h3><?php echo $_lang["page_data_status"]; ?></h3></td>
</tr>
<tr>
<td width="50%"><?php echo $_lang["page_data_status"]; ?>: </td>
<td width="50%"><?php echo $content['published']==0 ? "<b style='color: #821517'>".$_lang['page_data_unpublished']."</b>" : "<b style='color: #006600'>".$_lang['page_data_published']."</b>"; ?></td>
</tr>
<tr>
<td><?php echo $_lang["page_data_publishdate"]; ?>: </td>
<td><?php echo $content['pub_date']==0 ? "(<i>".$_lang["notset"]."</i>)" : strftime("%d-%m-%Y %H:%M:%S", $content['pub_date']); ?></td>
</tr>
<tr>
<td><?php echo $_lang["page_data_unpublishdate"]; ?>: </td>
<td><?php echo $content['unpub_date']==0 ? "(<i>".$_lang["notset"]."</i>)" : strftime("%d-%m-%Y %H:%M:%S", $content['unpub_date']); ?></td>
</tr>
<tr>
<td><?php echo $_lang["page_data_cacheable"]; ?>: </td>
<td><?php echo $content['cacheable']==0 ? $_lang['no'] : $_lang['yes']; ?></td>
</tr>
<tr>
<td><?php echo $_lang["page_data_searchable"]; ?>: </td>
<td><?php echo $content['searchable']==0 ? $_lang['no'] : $_lang['yes']; ?></td>
</tr>
<tr>
<td><?php echo $_lang['document_opt_menu_index']; ?>: </td>
<td><?php echo $content['menuindex']; ?></td>
</tr>
<tr>
<td><?php echo $_lang['document_opt_show_menu']; ?>: </td>
<td><?php echo $content['hidemenu']==1 ? $_lang['no'] : $_lang['yes']; ?></td>
</tr>
<tr>
<td><?php echo $_lang["page_data_web_access"]; ?>: </td>
<td><?php echo $content['privateweb']==0 ? $_lang['public'] : "<b style='color: #821517'>".$_lang['private']."</b> <img src='media/images/icons/secured.gif' align='absmiddle' width='16' height='16' />"; ?></td>
</tr>
<tr>
<td><?php echo $_lang["page_data_mgr_access"]; ?>: </td>
<td><?php echo $content['privatemgr']==0 ? $_lang['public'] : "<b style='color: #821517'>".$_lang['private']."</b> <img src='media/images/icons/secured.gif' align='absmiddle' width='16' height='16' />"; ?></td>
</tr>
<tr>
<td colspan="2"> </td>
</tr>
<tr>
<td colspan="2"><h3><?php echo $_lang["page_data_markup"]; ?></h3></td>
</tr>
<tr>
<td><?php echo $_lang["page_data_template"]; ?>: </td>
<td><?php echo $templatename ?></td>
</tr>
<tr>
<td><?php echo $_lang["page_data_editor"]; ?>: </td>
<td><?php echo $content['richtext']==0 ? $_lang['no'] : $_lang['yes']; ?></td>
</tr>
<tr>
<td><?php echo $_lang["page_data_folder"]; ?>: </td>
<td><?php echo $content['isfolder']==0 ? $_lang['no'] : $_lang['yes']; ?></td>
</tr>
</table>
<div style="clear:both;"> </div>
/* END CODE */
Please note the breaker at the end.
Now, we need some CSS. I use <h3> for small titles in the table and class docinfotable for the tables.
h3 {
margin-bottom:0.3em;
margin-top:0.5em;
border-bottom:solid 1px black;
padding-bottom:0.4em;
}
.docinfotable tr td {
font-size:100%;
}
But as I said, I do not know what these standalone changes will produce. I would probably release my own Manager Theme and post changes in .php files.
(5) Color changes in the tree
=============================
There is no green and oragne. Document in menu is black bold, document that is not in menu is just black, no bold.
(6) Opera-working menu
======================
In frames/scripter.php, change
elm.setInnerHTML(messagestr);
to
if(navigator.userAgent.toLowerCase().indexOf("opera")==-1) elm.setInnerHTML(messagestr);
(We want to exclude Opera. This is really a strange bug for me. I can’t figure out why setInnerHTML() destroys our menu (little bit, but it looks bad) ).
(7) Others
==========
> One thing you might feel like taking a peek at is the settings
> tabs and the pop-up tree menu. Neither one of them works worth
> a squat in Safari.
The pop-up tree menu works poorly in Opera 9. It shows up ONLY when I click ON THE ICON with LEFT button (!?!?). As far as Opera is my favourite browser, I did not do anything with this popup menu. I can’t tell you anythig about why it is not working :-(.
The settings tabs - where exactly does it not work? The problem for me is that i don’t have safari =(.