diff -r c72b545f1304 -r 67bd3121a12e plugins/SpecialPageFuncs.php --- a/plugins/SpecialPageFuncs.php Wed Dec 26 00:37:26 2007 -0500 +++ b/plugins/SpecialPageFuncs.php Thu Dec 27 22:09:33 2007 -0500 @@ -72,6 +72,8 @@ function page_Special_CreatePage() { global $db, $session, $paths, $template, $plugins; // Common objects + global $lang; + if ( isset($_POST['do']) ) { $p = $_POST['pagename']; @@ -88,7 +90,8 @@ { $template->header(); - echo '
The name "'.$p.'" is invalid.
'; + echo '' . $lang->get('pagetools_create_err_name_invalid', array('page_name' => htmlspecialchars($p))) . '
'; $template->footer(); $db->close(); @@ -102,7 +105,8 @@ { $template->header(); - echo 'The name "'.$paths->nslist[$namespace].$p.'" is invalid.
'; + echo '' . $lang->get('pagetools_create_err_name_invalid', array('page_name' => htmlspecialchars($paths->nslist[$namespace].$p))) . '
'; $template->footer(); $db->close(); @@ -118,7 +122,8 @@ { $template->header(); - echo 'The page title can\'t start with "Project:" because this prefix is reserved for a parser shortcut.
'; + echo '' . $lang->get('pagetools_create_err_project_shortcut', array('page_name' => htmlspecialchars($p))) . '
'; $template->footer(); $db->close(); @@ -129,7 +134,7 @@ $tn = $paths->nslist[$_POST['namespace']] . $urlname; if ( isset($paths->pages[$tn]) ) { - die_friendly('Error creating page', 'The page already exists.
'); + die_friendly($lang->get('pagetools_create_err_title'), '' . $lang->get('pagetools_create_err_already_exist') . '
'); } if ( $paths->nslist[$namespace] == substr($urlname, 0, strlen($paths->nslist[$namespace]) ) ) @@ -154,7 +159,7 @@ $perms = $session->fetch_page_acl($urlname, $namespace); if ( !$perms->get_permissions('create_page') ) - die_friendly('Error creating page', 'An access control rule is preventing you from creating pages.
'); + die_friendly($lang->get('pagetools_create_err_title'), 'An access control rule is preventing you from creating pages.
'); $q = $db->sql_query('INSERT INTO '.table_prefix.'logs(time_id,date_string,log_type,action,author,page_id,namespace) VALUES('.time().', \''.date('d M Y h:i a').'\', \'page\', \'create\', \''.$session->username.'\', \''.$urlname.'\', \''.$_POST['namespace'].'\');'); if ( !$q ) @@ -188,7 +193,7 @@ exit; } */ - echo RenderMan::render('Using the form below you can create a page.'); + echo '' . $lang->get('pagetools_create_blurb') . '
'; ?> footer(); @@ -263,9 +268,11 @@ { // This should be an easy one global $db, $session, $paths, $template, $plugins; // Common objects + global $lang; + $template->header(); $sz = sizeof( $paths->pages ) / 2; - echo 'Below is a list of all of the pages on this website.
'; + echo '' . $lang->get('pagetools_allpages_blurb') . '
'; $q = $db->sql_query('SELECT COUNT(urlname) FROM '.table_prefix.'pages WHERE visible!=0;'); if ( !$q ) @@ -328,7 +335,7 @@ global $db, $session, $paths, $template, $plugins; // Common objects $template->header(); $sz = sizeof($paths->pages) / 2; - echo 'Below is a list of all of the special pages on this website.
About the Enano Content Management System | |||||||||
---|---|---|---|---|---|---|---|---|---|
get('meta_enano_about_th'); ?> | |||||||||
get('meta_enano_about_poweredby');
@@ -501,15 +508,36 @@
function page_Special_GNU_General_Public_License()
{
global $db, $session, $paths, $template, $plugins; // Common objects
+ global $lang;
+
$template->header();
- if(file_exists(ENANO_ROOT.'/GPL'))
+ if(file_exists(ENANO_ROOT . '/GPL'))
{
+ echo ' ' . $lang->get('pagetools_gpl_blurb', array('about_url' => makeUrlNS('Special', 'About_Enano'))) . ' '; + + if ( $lang->lang_code != 'eng' ): + // Do not remove this block of code. Doing so is a violation of the GPL. (A copy of the GPL in other languages + // must be accompanied by a copy of the English GPL.) echo 'The following text represents the license that the Enano content management system is under. To make it easier to read, the text has been wiki-formatted; in no other way has it been changed. '; + endif; + + if ( file_exists(ENANO_ROOT . "/GPL_{$lang->lang_code}") ) + { + echo '' . $lang->get('pagetools_gpl_title_native') . ''; + echo '' . $lang->get('pagetools_gpl_link_to_english') . ' / View the license in English' . ' '; + echo RenderMan::render( file_get_contents ( ENANO_ROOT . "/GPL_{$lang->lang_code}" ) ); + echo '' . $lang->get('pagetools_gpl_title_english') . ' / English version'; + } + echo RenderMan::render( file_get_contents ( ENANO_ROOT . '/GPL' ) ); } else { - echo 'It appears that the file "GPL" is missing from your Enano installation. You may find a wiki-formatted copy of the GPL at: http://enanocms.org/GPL. '; + echo '' . $lang->get('pagetools_gpl_err_file_missing') . ' '; + if ( $lang->lang_code != 'eng') + // Also print out English version + // Do not remove the following line of code; doing so would be a violation of the GPL. + echo 'It appears that the file "GPL" is missing from your Enano installation. You may find a wiki-formatted copy of the GPL at: http://enanocms.org/GPL. In the mean time, you may wish to contact the site administration and ask them to replace the GPL file. '; } $template->footer(); } @@ -517,6 +545,7 @@ function page_Special_TagCloud() { global $db, $session, $paths, $template, $plugins; // Common objects + global $lang; $template->header(); @@ -530,7 +559,7 @@ { echo '
No pages are tagged yet. '; + echo '' . $lang->get('pagetools_tagcloud_msg_no_tags') . ' '; } else { - echo 'Summary of page tagging'; + echo '' . $lang->get('pagetools_tagcloud_blurb') . ''; while ( $row = $db->fetchrow() ) { $cloud->add_word($row['tag_name']); } echo $cloud->make_html('normal'); - echo 'Hover your mouse over a tag to see how many pages have the tag. Click on a tag to see a list of the pages that have it. '; + echo '' . $lang->get('pagetools_tagcloud_instructions') . ' '; } } @@ -595,6 +624,7 @@ function sidebar_add_tag_cloud() { global $db, $session, $paths, $template, $plugins; // Common objects + global $lang; $cloud = new TagCloud(); $q = $db->sql_query('SELECT tag_name FROM '.table_prefix.'tags;'); @@ -602,7 +632,7 @@ $db->_die(); if ( $db->numrows() < 1 ) { - $sb_html = 'No pages are tagged yet.'; + $sb_html = $lang->get('pagetools_tagcloud_msg_no_tags'); } else { @@ -610,9 +640,9 @@ { $cloud->add_word($row['tag_name']); } - $sb_html = $cloud->make_html('small', 'justify') . 'Larger version'; + $sb_html = $cloud->make_html('small', 'justify') . ' ' . $lang->get('pagetools_tagcloud_sidebar_btn_larger') . ''; } - $template->sidebar_widget('Tag cloud', " $sb_html ");
+ $template->sidebar_widget($lang->get('pagetools_tagcloud_sidebar_title'), "$sb_html ");
}
$plugins->attachHook('compile_template', 'sidebar_add_tag_cloud();');
|