malum
18th of March 2005 (Fri), 03:48
Whilst modifying my install of 1.5 RC4 I made some notes about what I did and how it changes stuff.
I attach it here as a PDF. (edit no I don't it's too big. I have pasted it below)
It has a lot of stuff that I found in this forum all in one place and some other stuff that I found by trial and error.
Bear in mind that it was written for just me but i have tried to keep it universally understandable.
If you want to modify the look and feel, add/remove components etc then have a look
I suspect that I will do a similar one for the final release
Hope someone finds it useful
Header
Served from
/languages/En/header.php
The headers and footers is three-level system:
1. EE gallery root is searched for header.php and footer.php. These are shared between languages.
2. EE's languages folder, under each language, is searched for header.php and footer.php. This makes translated header and footer possible.
3. If misc. settings editor header and footer text areas contain any characters then header.php and footer.php files are ignored and text areas are used instead. This means you can disable header by adding just one space into header text area.
To only have the header on the photo page
In fetchsettings.php find
function ee_get_headerfooter ($switch,$type) {
global $toroot;
global $lang;
global $pass;
global $exhibition;
global $photo;
global $s_include_header;
global $s_include_footer;
replace it with
function ee_get_headerfooter ($switch,$type) {
global $toroot;
global $lang;
global $pass;
global $exhibition;
global $photo;
global $s_include_header;
global $s_include_footer;
global $currentpage;
if ($currentpage != "photo") {
return;
}
Remove subheader (the line under the header)
In pagetemplates/photo/default.php and pagetemplates/list/default.php you have a line
PHP Code:
@include($toroot . "subheader.php");
to disable it, change it to
PHP Code:
//@include($toroot . "subheader.php");
Translations
Languages/eng/list.php
And global.php etc
This gives the text on final pages so change to ‘bottles’ or whatever here (I am displaying bottles in my EE)
Photo Frames
Take the code from another style and put it in original.php (in the styles folder)
From
// FRAME GRAPHICS:
to
// fill.gif : Dimensions of this transparent gif define frame width and height (important!).
replace code in between and use
$s_graph_frame_dir = "styles/frames_1/passepartout_1/";
for nice black frames
turn shadows off
$s_photopage_shadow = "0";
Input text and html formatting
(from Pekka)
Those styles are currently as hard-to-find html in photodetails.php. They will be set as CSS classes soon to make it easier to style them.
See below
Basic page settings
styles/original.php (or whatever style you have chosen)
You can change the font and size of text on the page including the inputted HTML for descriptions etc
I find 18px a good size for the basic paragraph font
Untick ‘activate links’ wherever it occurs in Exhibition Editor if you want to use HTML (in Misc settings and in each exhibition under ‘Free Textual Info’ Box)
Make copywrite and easy link small
Pagetemplates/photo/default.php
<small></small> tags around the lines
Dropdown options
The browser dropdowns are in list.php (root menu)
Remove the ‘show sort’ option from list page
pagetemplates/list/default.php
Comment out this line
print $form_reveal_hide_html;
Change ‘Gallery’ text on list page
To change the word ‘Gallery’ on the list page
Replace
<?php print ee_translate_A($translated["visit exhibition"]);
With
<?php print "Jump to section" ; ?>
Edit password text on news page
In file /languages/xxx/global.php (where xxx is language code)
$translated["password_field_info_a"] = "optional password";$translated["password_field_info_b"] = "leave empty to reset";
Password box can be removed all together from Exhibition Editor in ‘Misc settings’
Removing total count and making EE text smaller on news page
1.php in index styles (or whatever style you are using)
Comment out
ee_howmanyphotosinall();
to remove total photo count
To make EE text smaller, wrap in small tags (see below)
<small>
<?php
// don't touch this code block
// print out EE notice and version (DO NOT REMOVE FROM INDEX PAGE)
ee_version();
?>
</small>
Edit ‘info card’ output
Outputstyles/infocard.php
Comment out bits you don’t want
Edit languages/eng/global.php to change the text ‘info cards’ from the drop down menu into something else
To move thumbnails to top of infocards table (otherwise if you have a big description they become central in the cell)
Replace line 36
<?php print "<tr><td width=\"140\">";
with
<?php print "<tr><td width=\"140\" valign=\"top\">";
Move EE logo to bottom of list page (after descriptive text)
/pagetemplates/list/default.php
Move line
<?php print $ee_logo_html; ?>
To bottom just after </tr></table> tags
To put a border round each cell in the thumbnail list (looks a bit ugly in firefox though)
In outputstyles/x_per_row.php change in line 11
<table width="100%" border="0" ......
to
<table width="100%" border="1"
Changing photo list order in input side to list by filename
EDITOR_copy_move_delete.php
line 1464 and 1465 (note: line numbers are from fixed update of this file)
change to
ORDER
by ee_photo.ee_photo_filename
photo order in photo editor
EDITOR_photo.php
change
line 1597 and 1598 to
ORDER by
ee_photo.ee_photo_filename
To make snippets work (still have problems with this and thumbnails)
Some of the variables weren't declared, in snippets.php (around line 222), change
==========================================
if ($includecategory != "") {
$orlist = "";
$inccats = explode("|",$includecategory);
//ee_print_array($inccats);
foreach ($inccats as $key) {
$cat = trim($key);
$ors[] .= " ee_photo_to_category.ee_category_id = '{$cat}' ";
}
$orlist = implode(" OR ",$ors);
}
$exlcatfrom = "";
==========================================
to
==========================================
$orlist = "";
if ($includecategory != "") {
$orlist = "";
$inccats = explode("|",$includecategory);
//ee_print_array($inccats);
foreach ($inccats as $key) {
$cat = trim($key);
$ors[] .= " ee_photo_to_category.ee_category_id = '{$cat}' ";
}
$orlist = implode(" OR ",$ors);
}
$exlcatfrom = "";
$exlorlist = "";
=============================================
I attach it here as a PDF. (edit no I don't it's too big. I have pasted it below)
It has a lot of stuff that I found in this forum all in one place and some other stuff that I found by trial and error.
Bear in mind that it was written for just me but i have tried to keep it universally understandable.
If you want to modify the look and feel, add/remove components etc then have a look
I suspect that I will do a similar one for the final release
Hope someone finds it useful
Header
Served from
/languages/En/header.php
The headers and footers is three-level system:
1. EE gallery root is searched for header.php and footer.php. These are shared between languages.
2. EE's languages folder, under each language, is searched for header.php and footer.php. This makes translated header and footer possible.
3. If misc. settings editor header and footer text areas contain any characters then header.php and footer.php files are ignored and text areas are used instead. This means you can disable header by adding just one space into header text area.
To only have the header on the photo page
In fetchsettings.php find
function ee_get_headerfooter ($switch,$type) {
global $toroot;
global $lang;
global $pass;
global $exhibition;
global $photo;
global $s_include_header;
global $s_include_footer;
replace it with
function ee_get_headerfooter ($switch,$type) {
global $toroot;
global $lang;
global $pass;
global $exhibition;
global $photo;
global $s_include_header;
global $s_include_footer;
global $currentpage;
if ($currentpage != "photo") {
return;
}
Remove subheader (the line under the header)
In pagetemplates/photo/default.php and pagetemplates/list/default.php you have a line
PHP Code:
@include($toroot . "subheader.php");
to disable it, change it to
PHP Code:
//@include($toroot . "subheader.php");
Translations
Languages/eng/list.php
And global.php etc
This gives the text on final pages so change to ‘bottles’ or whatever here (I am displaying bottles in my EE)
Photo Frames
Take the code from another style and put it in original.php (in the styles folder)
From
// FRAME GRAPHICS:
to
// fill.gif : Dimensions of this transparent gif define frame width and height (important!).
replace code in between and use
$s_graph_frame_dir = "styles/frames_1/passepartout_1/";
for nice black frames
turn shadows off
$s_photopage_shadow = "0";
Input text and html formatting
(from Pekka)
Those styles are currently as hard-to-find html in photodetails.php. They will be set as CSS classes soon to make it easier to style them.
See below
Basic page settings
styles/original.php (or whatever style you have chosen)
You can change the font and size of text on the page including the inputted HTML for descriptions etc
I find 18px a good size for the basic paragraph font
Untick ‘activate links’ wherever it occurs in Exhibition Editor if you want to use HTML (in Misc settings and in each exhibition under ‘Free Textual Info’ Box)
Make copywrite and easy link small
Pagetemplates/photo/default.php
<small></small> tags around the lines
Dropdown options
The browser dropdowns are in list.php (root menu)
Remove the ‘show sort’ option from list page
pagetemplates/list/default.php
Comment out this line
print $form_reveal_hide_html;
Change ‘Gallery’ text on list page
To change the word ‘Gallery’ on the list page
Replace
<?php print ee_translate_A($translated["visit exhibition"]);
With
<?php print "Jump to section" ; ?>
Edit password text on news page
In file /languages/xxx/global.php (where xxx is language code)
$translated["password_field_info_a"] = "optional password";$translated["password_field_info_b"] = "leave empty to reset";
Password box can be removed all together from Exhibition Editor in ‘Misc settings’
Removing total count and making EE text smaller on news page
1.php in index styles (or whatever style you are using)
Comment out
ee_howmanyphotosinall();
to remove total photo count
To make EE text smaller, wrap in small tags (see below)
<small>
<?php
// don't touch this code block
// print out EE notice and version (DO NOT REMOVE FROM INDEX PAGE)
ee_version();
?>
</small>
Edit ‘info card’ output
Outputstyles/infocard.php
Comment out bits you don’t want
Edit languages/eng/global.php to change the text ‘info cards’ from the drop down menu into something else
To move thumbnails to top of infocards table (otherwise if you have a big description they become central in the cell)
Replace line 36
<?php print "<tr><td width=\"140\">";
with
<?php print "<tr><td width=\"140\" valign=\"top\">";
Move EE logo to bottom of list page (after descriptive text)
/pagetemplates/list/default.php
Move line
<?php print $ee_logo_html; ?>
To bottom just after </tr></table> tags
To put a border round each cell in the thumbnail list (looks a bit ugly in firefox though)
In outputstyles/x_per_row.php change in line 11
<table width="100%" border="0" ......
to
<table width="100%" border="1"
Changing photo list order in input side to list by filename
EDITOR_copy_move_delete.php
line 1464 and 1465 (note: line numbers are from fixed update of this file)
change to
ORDER
by ee_photo.ee_photo_filename
photo order in photo editor
EDITOR_photo.php
change
line 1597 and 1598 to
ORDER by
ee_photo.ee_photo_filename
To make snippets work (still have problems with this and thumbnails)
Some of the variables weren't declared, in snippets.php (around line 222), change
==========================================
if ($includecategory != "") {
$orlist = "";
$inccats = explode("|",$includecategory);
//ee_print_array($inccats);
foreach ($inccats as $key) {
$cat = trim($key);
$ors[] .= " ee_photo_to_category.ee_category_id = '{$cat}' ";
}
$orlist = implode(" OR ",$ors);
}
$exlcatfrom = "";
==========================================
to
==========================================
$orlist = "";
if ($includecategory != "") {
$orlist = "";
$inccats = explode("|",$includecategory);
//ee_print_array($inccats);
foreach ($inccats as $key) {
$cat = trim($key);
$ors[] .= " ee_photo_to_category.ee_category_id = '{$cat}' ";
}
$orlist = implode(" OR ",$ors);
}
$exlcatfrom = "";
$exlorlist = "";
=============================================