Русификация компонента UHP2

Версия для печати

Материал из База знаний Joomla

Перейти к: навигация, поиск

Недавно на форуме шла дискуссия о том, как обустроить коллективную Joomla!, чтобы учинить мультисайт. Ravenswood User Home Pages - UHP2 позволяет устроить 50 сайтов по 5 страниц/ Совершенно бесплатно. Подробнее на сайте

Russian.php

Перевод из языкового пакета. Здесь - перевод фронтэнда.

 
<?php
 
defined( '_VALID_MOS' ) or die( 'Прямой Доступ запрещён.' );
 
if (!defined('_UHP'))
{
define('_UHP', 1);
 
define ("_PAGE_TITLE","Пользовательские Домашние страницы");
define ("_NO_HOME_PAGE","Этот посетитель так и не не обновил их домашнюю страницу!");
 
 
// components/com_uhp2
 
// uhp2.php
define ("_UHP2_CLASS_EXP","Основной файл класса UHP2 истек - обновите пожалуйста");
define ("_UHP2_VP1","VP1: Недействительный идентификатор");
define ("_UHP2_VP3","VP3: Доступ к этой странице ограничен");
define ("_UHP2_MAX_PAGES",'достигнуто предельное количество созланных вами страниц ');
define ("_UHP2_INVALID_ID","Недействительный идентификатор");
define ("_UHP2_NO_PAGES","Этот посетитель не может устанавливать любые страницы");
 
// uhp2.html.php
define ("_UHP2_CATEGORY","Категория");
define ("_UHP2_OWNER","Владелец");
define ("_UHP2_SITE_DETAILS","Подробности Сайта");
 
// administrator/components/com_uhp2
 
// admin.uhp2.php
define ("_UHP2_SHOW_ALL","Показать Всё");
define ("_UHP2_SHOW_UNP","Все Неопубликованные");
define ("_UHP2_SHOW_UNA","Все Неутвержденные");
define ("_UHP2_NEW_TITLE"," сайт - ждущий владельца для обновления");
define ("_UHP2_NEW_CATEGORY","Общий");
define ("_UHP2_ACCESS_GRANTED",'Доступ предоставленный всем посетителям.');
define ("_UHP2_SELECT_USER",'Выбрать Пользователя');
define ("_UHP2_CONFIG_WARNING",'Предупреждение');
define ("_UHP2_CONFIG_FILE",'Ваш конфигурационный файл - ');
define ("_UHP2_CONFIG_CHMOD",'Вам надо выставить chmod  766 для обноблённого файла конфигурации');
define ("_UHP2_CONFIG_FATAL_WRITE","ФАТАЛЬНАЯ ОШИБКА: Конфигурационный файл, Не перезаписываемый");
define ("_UHP2_CONFIG_FATAL_OPEN","ФАТАЛЬНАЯ ОШИБКА: Файл может не быть открыт.");
define ("_UHP2_ALL_GRANTED",'Доступ предоставлен всем посетителям');
 
// admin.uhp2.html.php
// to be completed
define ("_UHP2_DIR_SHOW_FULLNAME","Показать Полное Имя");
define ("_UHP2_DIR_SHOW_USERNAME","Показать Имя пользователя");
define ("_UHP2_DIR_SHOW_NONE","Не Показывать Имя");
 
// main encrypted class
// uhp2.class.php
 
// buttons
define ("_UHP2_CANCEL","Выход");
define ("_UHP2_SAVE","Сохранить");
define ("_UHP2_SAVEAS","Сохранить Копию");
 
define ("_UHP2_PUBLISH","Допустить");
define ("_UHP2_PRIVATE","Приватный");
define ("_UHP2_APPROVE","Одобрить");
 
define ("_UHP2_YES","Yes");
define ("_UHP2_NO","No");
 
define ("_UHP2_SETTINGS","Настройки");
define ("_UHP2_SITE_TITLE","Заголдовок Сайта");
define ("_UHP2_SITE_DESC","Краткое Описание");
define ("_UHP2_SITE_HEADER","Page Header");
define ("_UHP2_SITE_FOOTER","Page Footer");
define ("_UHP2_SITE_DIRECTORY","List Site in Directory");
define ("_UHP2_SITE_VISIBILITY","Видимость Сайта");
define ("_UHP2_AUTOAPPROVE","Авторазрешение включено");
define ("_UHP2_SITE_LAST_UPDATE","Сайт Обновлён");
 
define ("_UHP2_SETTING_LAST_UPDATE","Установки Обновлены");
 
define ("_UHP2_DISABLE_EDIT","Administrator has disabled updating for this site");
 
define ("_UHP2_UNKNOWN_PAGETYPE","Неизвестный Тип Страницы");
define ("_UHP2_ERROR_GETPAGE","Error retrieving page");
define ("_UHP2_WAIT","Подождите...");
 
define ("_UHP2_PAGE_INFO","Edit Page Info");
define ("_UHP2_PAGE_TITLE","Page Title");
define ("_UHP2_MENU_TITLE","Menu Title");
define ("_UHP2_PAGE_VISIBILITY","Page Visibility");
define ("_UHP2_PAGE_ORDERING","Ordering");
 
define ("_UHP2_PAGE_LAST_UPDATE","Страница Обновлена");
define ("_UHP2_HITS","Просмотров");
define ("_UHP2_SITE_OWNER","Владелец");
 
// Management Page
 
define ("_UHP2_CONTROL_PANEL","Панель Управления UHP2");
define ("_UHP2_PAGE_TYPE","Тип");
define ("_UHP2_PAGE_MENUTITLE","Заголовок Меню");
define ("_UHP2_PAGE_PAGETITLE","Заголовоу Страницы");
define ("_UHP2_PAGE_ORDER","Порядок");
define ("_UHP2_PAGE_SAVEORDER","Сохранить Порядок");
define ("_UHP2_PAGE_VIEW","Просмотреть");
define ("_UHP2_PAGE_DELETE","Удалить");
define ("_UHP2_PAGE_PUBLISH","Допустить");
define ("_UHP2_PAGE_PRIVATE","Приватный");
define ("_UHP2_PAGE_APPROVE","Разрешить");
 
define ("_UHP2_PAGE_EDIT","Править эту страницу");
define ("_UHP2_PAGE_NEW","Создать Новую Страницу");
define ("_UHP2_SITE_SETTINGS","Настройки Сайта");
define ("_UHP2_VIEW_PAGES","Просмотр Страниц");
define ("_UHP2_MANAGE_PAGES","Управление Страницами");
 
define ("_UHP2_PAGE_REVISED","Revised - Awaiting approval");
 
define ("_UHP2_SEARCH","Search phrase has been found but we are unable to display the text");
define ("_UHP2_SEARCH_HEAD","Search");
define ("_UHP2_SEARCH_RESULTS","Search Results");
 
define ("_UHP2_SELECT_ACTION","Select an item to");
define ("_UHP2_SITE_ADMIN_APPROVAL","Your site must be approved by an administrator before you can set up pages");
 
define ("_UHP2_UPGRADE_TITLE","website");
define ("_UHP2_UPGRADE_STANDARD_TITLE","Home Page");
define ("_UHP2_UPGRADE_STANDARD_MENU","Home");
define ("_UHP2_UPGRADE_CONTACT_TITLE","Contact Page");
define ("_UHP2_UPGRADE_CONTACT_MENU","Contact");
define ("_UHP2_UPGRADE_GALLERY_TITLE","Gallery Page");
define ("_UHP2_UPGRADE_GALLERY_MENU","Gallery");
 
//Javascript validation
define ("_UHP2_JS_SITE_TITLE","Site must have a title");
define ("_UHP2_JS_SITE_CAT","Site must have a category assigned");
define ("_UHP2_JS_SITE_DESC","Site must have a description");
define ("_UHP2_JS_SITE_DESC_SIZE1","Sorry - description size (");
define ("_UHP2_JS_SITE_DESC_SIZE2",") characters, you are limited to");
define ("_UHP2_JS_SITE_HDR_SIZE1","Sorry - header size (");
define ("_UHP2_JS_SITE_FTR_SIZE1","Sorry - footer size (");
 
define ("_UHP2_JS_PAGE_TITLE","Page must have a title");
define ("_UHP2_JS_PAGE_MENU","Page must have a menu name");
 
define ("_UHP2_JS_UNAP","You do not have permission to unapprove pages");
define ("_UHP2_JS_AP","You do not have permission to approve pages");
 
// upload encrypted class
// uhp2.upload.class.php
 
define ("_UHP2_UPLOAD_ERR_INI","The uploaded file exceeds the upload_max_filesize directive in php.ini.");
define ("_UHP2_UPLOAD_ERR_FORM_SIZE","The uploaded file exceeds the MAX_FILE_SIZE directive that was specified in the HTML form.");
define ("_UHP2_UPLOAD_ERR_PARTIAL",'The uploaded file was only partially uploaded.');
define ("_UHP2_UPLOAD_ERR_NO_FILE",'No file was uploaded.');
define ("_UHP2_UPLOAD_ERR_NO_TMP",'Missing a temporary folder.');
define ("_UHP2_UPLOAD_ERR_CANT_WRITE",'Failed to write file to disk.');
define ("_UHP2_UPLOAD_ERR_PATH",'Upload path is not a directory.');
define ("_UHP2_UPLOAD_ERR_SIZE",'The uploaded file exceeds the max file size.');
define ("_UHP2_UPLOAD_ERR_TYPE",'The uploaded file type is invalid.');
define ("_UHP2_UPLOAD_ERR_INVALID",'The file is not an actual uploaded file.');
define ("_UHP2_UPLOAD_ERR_MKDIR",'Failed to create output directory structure.');
define ("_UHP2_UPLOAD_ERR_WRITE",'Failed to write image to disk.');
define ("_UHP2_UPLOAD_ERR_UNKNOWN",'Unknown error ');
 
// pageclasses
 
define ("_UHP2_PC_STANDARD","Standard");
define ("_UHP2_PC_STANDARD_SIZE1","Sorry - page size (");
define ("_UHP2_PC_STANDARD_SIZE2",") characters, you are limited to");
 
define ("_UHP2_PC_EDIT","Edit Page Details");
 
define ("_UHP2_PC_CONTACT","Contact");
define ("_UHP2_PC_CONTACT_NAME","Name");
define ("_UHP2_PC_CONTACT_EMAIL","Email");
define ("_UHP2_PC_CONTACT_WEBSITE","Website");
define ("_UHP2_PC_CONTACT_ADDRESS","Address");
define ("_UHP2_PC_CONTACT_PHONE","Phone");
 
define ("_UHP2_PC_CONTACT_JS_NAME","Enter contact name");
 
define ("_UHP2_PC_GALLERY","Gallery");
define ("_UHP2_PC_GALLERY_DEL","Deleted ");
define ("_UHP2_PC_GALLERY_DESC","Short Description");
define ("_UHP2_PC_GALLERY_POPUP","Popup style");
define ("_UHP2_PC_GALLERY_POPUP_TT",'Type of gallery popup to use');
define ("_UHP2_PC_GALLERY_WATER","Text watermark");
define ("_UHP2_PC_GALLERY_WATER_TT",'Watermark text to be added to each image uploaded');
define ("_UHP2_PC_GALLERY_REPLACE","Replace existing image");
define ("_UHP2_PC_GALLERY_DELETE","Delete Image?");
define ("_UHP2_PC_GALLERY_UPLOAD","Upload New image");
define ("_UHP2_PC_GALLERY_DELETE_TT",'Check this box if you wish to delete this entry completely');
 
define ("_UHP2_PC_GALLERY_IMAGE","Image");
define ("_UHP2_PC_GALLERY_UPLOAD_TT",'Select the image file to be uploaded');
define ("_UHP2_PC_GALLERY_CAPTION","Caption");
define ("_UHP2_PC_GALLERY_CAPTION_TT",'Enter a caption for this image');
define ("_UHP2_PC_GALLERY_JS_TYPE","Invalid type of file - supported types: ");
 
define ("_UHP2_PC_RSS","RSS");
define ("_UHP2_PC_RSS_CACHE",'Cache Directory Unwriteable');
define ("_UHP2_PC_RSS_FEED","Feed");
 
define ("_UHP2_PC_MUSIC","Music");
define ("_UHP2_PC_MUSIC_DEL","Deleted ");
define ("_UHP2_PC_MUSIC_POPUP","Popup style");
define ("_UHP2_PC_MUSIC_POPUP_TT",'Type of gallery popup to use');
define ("_UHP2_PC_MUSIC_WATER","Text watermark");
define ("_UHP2_PC_MUSIC_WATER_TT",'Watermark text to be added to each image uploaded');
define ("_UHP2_PC_MUSIC_REPLACE","Replace existing image");
define ("_UHP2_PC_MUSIC_DELETE","Delete?");
define ("_UHP2_PC_MUSIC_UPLOAD","Upload New image");
define ("_UHP2_PC_MUSIC_REPLACE_FILE","Replace existing file");
define ("_UHP2_PC_MUSIC_DELETE_FILE","Delete file?");
define ("_UHP2_PC_MUSIC_UPLOAD_FILE","Upload New file");
 
define ("_UHP2_PC_MUSIC_ARTIST","Artist");
define ("_UHP2_PC_MUSIC_SONG","Song Title");
define ("_UHP2_PC_MUSIC_ALBUM","Album Title");
define ("_UHP2_PC_MUSIC_IMAGE","Album Cover Image");
define ("_UHP2_PC_MUSIC_FILE","Music File");
define ("_UHP2_PC_MUSIC_URL","url to link to external file");
define ("_UHP2_PC_MUSIC_OR","OR");
define ("_UHP2_PC_MUSIC_DESC","Description");
define ("_UHP2_PC_MUSIC_LYRICS","Lyrics");
define ("_UHP2_PC_MUSIC_LINK","Link to website");
define ("_UHP2_PC_MUSIC_JS_TYPE","Invalid type of file - supported types: ");
define ("_UHP2_PC_MUSIC_SONG_TEXT","Song");
 
// additions 7/8/06
 
define ("_UHP2_PC_REPOSITORY","Репозиторий");
define ("_UHP2_PC_REPOSITORY_DEL","Deleted ");
define ("_UHP2_PC_REPOSITORY_DESC","Short Description");
define ("_UHP2_PC_REPOSITORY_REPLACE","Replace existing File");
define ("_UHP2_PC_REPOSITORY_DELETE","Delete File?");
define ("_UHP2_PC_REPOSITORY_UPLOAD","Upload New File");
define ("_UHP2_PC_REPOSITORY_DELETE_TT",'Check this box if you wish to delete this entry completely');
define ("_UHP2_PC_REPOSITORY_IMAGE","File");
define ("_UHP2_PC_REPOSITORY_UPLOAD_TT",'Select the File file to be uploaded');
define ("_UHP2_PC_REPOSITORY_NAME","Name");
define ("_UHP2_PC_REPOSITORY_NAME_TT",'Enter a name for this File');
define ("_UHP2_PC_REPOSITORY_CAPTION","Desc");
define ("_UHP2_PC_REPOSITORY_CAPTION_TT",'Enter a description for this File');
define ("_UHP2_PC_REPOSITORY_JS_TYPE","Invalid type of file - supported types: ");
define ("_UHP2_PC_REPOSITORY_LAST_UPDATE","Last Updated");
 
define ("_UHP2_PC_MUSIC_PLAY","Click here to play");
define ("_UHP2_PC_MUSIC_VISIT","Visit");
define ("_UHP2_SEARCH_RESULTS_FOUND"," matches found.");
define ("_UHP2_NEW_USER","To start working with your new site, please click on the icon below");
 
define ("_UHP2_PAGE_PAGETYPE","Page Type");
define ("_UHP2_UNKNOWN","Unknown");
 
define ("_UHP2_PC_CUSTOM","Custom");
define ("_UHP2_PC_CUSTOM_SIZE1","Sorry - page size (");
define ("_UHP2_PC_CUSTOM_SIZE2",") characters, you are limited to");
 
define ("_UHP2_PROMPT_KEYWORD","Search Keyword");
define ("_UHP2_SEARCH_TITLE","Search");
 
define ("_UHP2_UNABLE_TO_LOAD","Unable to load");
}
?>
 
 

admin.uhp2.html.php

Перевод админ части компонента. Как правило, интерфейсные элементы находятся между тэгами > и <

 
<?php
// $Id: uhp2.php 2 2006-01-09 11:26:43Z phillipsjohn $ 
/**
* User Home Pages
* @author John Phillips - Ravenswood IT Services
* @package User Home Pages
* @version $Revision: 2 $
* @Copyright (C) 2006 Ravenswood IT Services
* @All rights reserved
* License is for ONE site only.
*/
 
defined( '_VALID_MOS' ) or die( 'Direct Access to this location is not allowed.' );
 
class HTML_uhp
{
 
 
    function showuhpEntries( $option, $rows, $lists, $search, $pageNav)
    {
        global $database, $my, $mosConfig_absolute_path, $mosConfig_live_site;
 
        ?>
    <form action="index2.php" method="post" name="adminForm">
    <table cellpadding="4" cellspacing="0" border="0" width="100%" class="adminheading">
    <tr valign="bottom">
      <td>
        <img src="<?php echo $mosConfig_live_site; ?>/components/com_uhp2/images/uhp2.gif">
      </td>
 
      <td nowrap="nowrap">Display #</td>
      <td>
        <?php echo $pageNav->writeLimitBox(); ?>
      </td>
      <td>Filter by name:
        <input type="text" name="search" value="<?php echo $search;?>" class="inputbox" onChange="document.adminForm.submit();" />
      </td>
      <td align="right">Filter by Status: 
			<?php echo $lists['filter'];?>
      </td>
    </tr>
 
    </table>
 
    <table cellpadding="4" cellspacing="0" border="0" width="100%" class="adminlist">
      <tr>
        <th width="2%" class="title"><input type="checkbox" name="toggle" value="" onclick="checkAll(<?php echo count( $rows );
 
        ?>);" /></th>
 
        <th align="left"><a href="index2.php?option=com_uhp2&sort=name">Full Name</a></th>
        <th align="left"><a href="index2.php?option=com_uhp2&sort=title">Title</a></th>
        <th align="center">Pages<br>Lastedit</div></th>
        <th align="center">Pages<br>Unapproved</div></th>
				<th align="left">Category</div></th>
        <th >Directory</div></th>
        <th >Published</div></th>
	    	<th >Approved</th>
 
      </tr>
      <?php
 
        $k = 0;
        for ( $i = 0, $n = count( $rows ); $i < $n; $i++ )
        {
            $row = &$rows[$i];
            echo "<tr class='row$k'>";
            echo "<td width='20'>";
          ?>
					<input type="checkbox" id="cb<?php echo $i;?>" name="cid[]" value="<?php echo $row->user_id;?>" onclick="isChecked(this.checked);" />
            </td>
      <td align="left">
          <a href="#edit" onclick="return listItemTask('cb<?php echo $i;
 
            ?>','edit')">
 
<?php
 $where = array();
 $where[] = "approved = 0";
 $where[] = "user_id = ".$row->user_id;
 $database -> setQuery("SELECT count(user_id)"
     . "\nFROM #__uhp2_pages"
     . (count($where) ? "\nWHERE " . implode(' AND ', $where) : "")
    );
 $pagect = $database -> loadResult();
 
 unset($where);
 $where[] = "user_id = ".$row->user_id;
 $database -> setQuery("SELECT lastupdate"
     . "\nFROM #__uhp2_pages"
     . (count($where) ? "\nWHERE " . implode(' AND ', $where) : "")
     . "\nORDER BY lastupdate DESC"
     . "\nLIMIT 1"
    );
 $lastupdate = $database -> loadResult();
 
?>
 
            <?php echo "$row->fullname"; ?>
          </a>
        </td>
        <td align="left"><?php echo $row->title;?></td>
        <td align="center"><?php echo $lastupdate?></td>
        <td align="center"><?php echo $pagect?></td>
        <td align="left"><?php echo $row->category;?></td>
<?php
            if ( $row->showtitle == "1")
            {
                ?>
 				<td width="5%" align="center"><a href="#undirectory" onClick="return listItemTask('cb<?php echo $i;
                ?>','undirectory')"><img src="images/tick.png" border=0></a></td>
<?php
            } elseif ( $row->showtitle == "0" )
            {
                ?>
				<td width="5%" align="center"><a href="#directory" onClick="return listItemTask('cb<?php echo $i;
                ?>','directory')"><img src="images/publish_x.png" border=0></a></td>
<?php } 
            if ( $row->published == "1")
            {
                ?>
 				<td width="5%" align="center"><a href="#unpublish" onClick="return listItemTask('cb<?php echo $i;
                ?>','unpublish')"><img src="images/tick.png" border=0></a></td>
<?php
            } elseif ( $row->published == "0" )
            {
                ?>
				<td width="5%" align="center"><a href="#publish" onClick="return listItemTask('cb<?php echo $i;
                ?>','publish')"><img src="images/publish_x.png" border=0></a></td>
<?php } 
 
 
            if ( $row->approved == "1")
            {
                ?>
 				<td width="5%" align="center"><a href="#unapprove" onClick="return listItemTask('cb<?php echo $i;
                ?>','unapprove')"><img src="images/tick.png" border=0></a></td>
<?php
            } elseif ( $row->approved == "0" )
            {
                ?>
				<td width="5%" align="center"><a href="#approve" onClick="return listItemTask('cb<?php echo $i;
                ?>','approve')"><img src="images/publish_x.png" border=0></a></td>
<?php } 
            echo "</tr>";
            $k = 1 - $k;
        } 
 
        ?>
 
 
<?php if ($pageNav->total > $pageNav->limit) { ;?>
    <tr>
      <th align="center" colspan="11">
        <?php echo $pageNav->writePagesLinks();?></th>
    </tr>
    <tr>
      <td align="center" colspan="11">
        <?php echo $pageNav->writePagesCounter();?></td>
    </tr>
<?php	};?>
 
  </table>
  <input type="hidden" name="option" value="<?php echo $option;?>" />
  <input type="hidden" name="task" value="" />
  <input type="hidden" name="boxchecked" value="0" />
  </form>
  <table cellspacing="0" cellpadding="4" border="0" align="center">
  <tr align="center">
    <td> <img src="images/tick.png" width="12" height="12" border=0 alt="Published" />
    </td>
    <td> Published |</td>
    <td> <img src="images/publish_x.png" width="12" height="12" border=0 alt="Not Published" />
    </td>
    <td> Not Published </td>
  </tr>
  <tr>
	<td colspan="7" align="center">Click on icon to toggle state.</td>
  </tr>
</table>
 
  <?php ravenswood_details();
 
  } 
 
    function edituhp( $option, $user_id, $id, &$row, &$lists, $fullname)
    {
        global $database, $mosConfig_offset,$mosConfig_live_site, $mosConfig_absolute_path;
				global $uhp;
 
        ?>
<div id="overDiv" style="position:absolute; visibility:hidden; z-index:1000;"></div>
<script language="JavaScript" src="<?php echo $mosConfig_live_site;?>/includes/js/overlib_mini.js"></script>
    <script language="javascript" type="text/javascript">
 
    function submitbutton(pressbutton) {
      var form = document.adminForm;
      if (pressbutton == 'cancel') {
        submitform( pressbutton );
        return;
      }
      // do field validation
      if (form.user_id.value == 0) {
	      alert( "Please choose a user" );
  	    return;
				}
      if (form.title.value == "") {
	      alert( "<?php echo _UHP2_JS_SITE_TITLE; ?>" );
  	    return;
				}
      if (form.category.value == "") {
	      alert( "<?php echo _UHP2_JS_SITE_CAT; ?>" );
  	    return;
      }			
      if (form.description.value == "") {
	      alert( "<?php echo _UHP2_JS_SITE_DESC; ?>" );
  	    return;
      }			
 
     submitform( pressbutton );
    }
 
    </script>
 
    <script language="javascript" src="js/dhtml.js"></script>
 
    <table cellpadding="4" cellspacing="0" border="0" width="100%">
 
    <tr>
      <td>
        <img src="<?php echo $mosConfig_live_site; ?>/components/com_uhp2/images/uhp2.gif">
      </td>
      <td ><span class="sectionname"><?php echo $row->user_id ? 'Edit' : 'Add';?> User Site</span></td>
    </tr>
    </table>
 
    <table cellpadding="4" cellspacing="1" border="0" width="100%" class="adminform">
    <form action="index2.php" method="post" name="adminForm" id="adminForm">
      <tr>
        <td width="20%" align="right">Name:</td>
        <td width="80%">
			<?php echo $lists['fullname'];        ?>
        </td>
      </tr>
      <tr>
        <td width="20%" align="right">Title:</td>
        <td width="80%">
          <input class="inputbox" type="text" name="title" size="40" maxlength="60" value="<?php echo $row->title ?>" />
        </td>
      </tr>
      <tr>
        <td width="20%" align="right">Category:</td>
        <td width="80%">
          <?php echo $lists['category'];        ?>
        </td>
      </tr>
      <tr>
        <td width="20%" align="right">Short Description:</td>
        <td width="80%">
        <textarea class="inputbox" rows="6" cols="50" name="description"><?php echo $row->description ?></textarea>
        </td>
      </tr>
    <tr>
		<td valign="top" align="right">Directory Listing:</td>
    <td><?php echo $lists['showtitle'];?></td>
		</tr>
 
    <tr>
		<td valign="top" align="right">Published:</td>
    <td>
			<?php echo $lists['published'];
 
        ?>
			</td>
		</tr>
    <tr>
		<td valign="top" align="right">Private:</td>
    <td>
			<?php echo $lists['private'];
 
        ?>
			</td>
		</tr>
 
    <tr>
		<td valign="top" align="right">Approved:</td>
    <td>
			<?php echo $lists['approved'];
 
        ?>
			</td>
		</tr>
		<tr><td>
 
    <input type="hidden" name="datecreated" value="<?php echo $row->datecreated; ?>" />
    <input type="hidden" name="option" value="<?php echo $option; ?>" />
    <input type="hidden" name="id" value="<?php echo $id;?>" />
    <input type="hidden" name="task" value="" />
	   </form>
	<tr><td colspan=20 align=center>
	<?php 
  $pagemenu = new user_pages($user_id);
 
	if ($pagemenu->numpages) {
		$pagemenu->showpagelist();
	}	
	ravenswood_details(); 
	?>
	</td></tr>
    </table>
  <?php
    } 
 
    function showAbout()
    {
		global $uhp;
    global $database, $mosConfig_offset,$mosConfig_live_site, $mosConfig_absolute_path;
 
        ?>
    <table cellpadding="4" cellspacing="0" border="0" width="100%">
    <tr>
      <td width="100%">
        <img src="<?php echo $mosConfig_live_site; ?>/components/com_uhp2/images/uhp2.gif" title="Logo by Petter Carlweitz ( www.kallsupen.com )" >
      </td>
    </tr>
    <tr>
      <td>
        <p><b>uhp2 Version <?php echo $uhp['version'] ?></b><p>
        uhp is simple component to allow users to create and edit their own home pages.
		Once the administrator enables their account, they can edit their own home page, enable
		which personal details are displayed, upload images etc.
		<p>
		It utilises the Joomla framework to provide a simple and consistent front/backend interface
        and to take advantage of a lot of builtin Mambo functionality.
        </p>
        <p>It has been developed for Joomla and tested with Joomla 1.0.8, with some light testing on mambo 4.5.3
				but may work with older versions of Joomla or even Mambo 4.5.1 onwards (no guarantees!)
        </p>
        <p><b>Author</b><br>
        uhp was written by John Phillips of Ravenswood IT Services in Scotland.
        </p>
        <p><b>Credits</b><br>
        Logo by Petter Carlweitz ( www.kallsupen.com )
        </p>
				<b>Thanks to our Beta Testers:</b><p>
				John Alberts<br>
  	  	nickjo<br>
				Jamie Vaughan<br>
				Franky<br>
				Michael Commini<br>
				masyomo<br>
				eds132<br>
 
 
        </p>
        <p><b>License</b><br>
        uhp is &copy Ravenswood IT Services 2006.
        <P>
      </td>
    </tr>
    </table>
<?php
ravenswood_details();
    } 
 
function help()
    {
		global $mosConfig_live_site, $uhp;
 
?>
    <table cellpadding="4" cellspacing="0" border="0" width="100%">
    <tr>
      <td width="100%">
        <img src="<?php echo $mosConfig_live_site; ?>/components/com_uhp2/images/uhp2.gif" title="Logo by Petter Carlweitz ( www.kallsupen.com )" >
      </td>
    </tr>
    <tr>
      <td>
 
			Please check the Readme.txt file or go to our <a target="_blank" href="http://www.ravenswoodit.co.uk">website</a> for more help
      </td>
    </tr>
    </table>
<?php
ravenswood_details();
    } 
 
function uhp_maintenance( )
{
    global $mosConfig_absolute_path, $mosConfig_live_site;
 
    ?>
    <table cellpadding="4" cellspacing="0" border="0" width="100%" class="adminheading">
    <tr valign="bottom">
      <td><img src="<?php echo $mosConfig_live_site; ?>/components/com_uhp2/images/uhp2.gif"></td>
			<td><span  class="sectionname">Running UHP2 maintenance</span></td>
    </tr>
		<tr>
		<td colspan="2">
<?php 	
		include_once($mosConfig_absolute_path.'/administrator/components/com_uhp2/uhp2.maint.php');
?>	</td>
		</tr>
    </table>
			<td><span  class="sectionname">Maintenance Complete</span></td>
<?php
}		
 
function showConfig( &$uhp, &$lists, $option ) {
		global $mosConfig_absolute_path,$mosConfig_live_site, $database;
		global $uhp_plugins;
 
		//$tab = mosGetParam( $_REQUEST, 'tab', 'tab1' );
		$width = 400;	// width of 100%
		$tabs = new mosTabs(1);
		?>
<div id="overDiv" style="position:absolute; visibility:hidden; z-index:1000;"></div>
		<script  type="text/javascript" src="<?php echo $mosConfig_live_site;?>/includes/js/overlib_mini.js"></script>
    <script language="javascript" type="text/javascript">
    function submitbutton(pressbutton) {
      var form = document.adminForm;
      if (pressbutton == 'uhp_cancel') {
        submitform( pressbutton );
        return;
      }
	  <?php getEditorContents( 'cfg_title_desc', 'cfg_title_desc' ) ; ?>		 	  
	  <?php getEditorContents( 'cfg_newuser_text', 'cfg_newuser_text' ) ; ?>		 	  
     submitform( pressbutton );
    }
 
    </script>
   <form action="index2.php" method="post" name="adminForm">
		<table class="adminheading">
		<tr>
			<td>
			<img align="right" src="<?php echo $mosConfig_live_site; ?>/components/com_uhp2/images/uhp2.gif">
			</td>
			<th class="config">
			Configuration 
			</th>
		</tr>
		</table>
<!-- <style>
.dynamic-tab-pane-control .tab-row .tab {
	width: 90px;
}
.dynamic-tab-pane-control .tab-row .tab.selected {
	width: 94px !important;
}
.dynamic-tab-pane-control .tab-row .tab.hover {
	width: 90px;
}		
</style>
 -->		<?php
		$tabs->startPane("Main");
 
		$tabs->startTab(" General ","admin-page1");
		?>
		<table class="adminform">
      <tr align="left" valign="middle">
         <td width="20%" align="left" valign="top"><strong>Version <?php echo $uhp['version']; 
				 echo $uhp['licence'] ? " - Full" : " - Free";?></strong>
				 <br>
				 <?php
				 $versionurl = "http://www.ravenswoodit.co.uk/index.php?option=com_versions&catid=1&myVersion=".$uhp['version'];
				 ?>
						<a target="_blank" href="<?php echo $versionurl; ?>">
						Check Version
						</a>
				 </td>
				 <td width="20%" align="left" valign="top">
				 <?php echo $mosConfig_live_site;
				 if (! $uhp['licence']) {
				 $licurl = "http://www.ravenswoodit.co.uk/shop/index.php?url=".$mosConfig_live_site;
				 ?>
						<a target="_blank" href="<?php echo $licurl; ?>">
						Click here to purchase a licence for this site
						</a>
				 <?php
				 }
				 ?>
				 </td>
      </tr>
			<tr align="left" valign="middle">
         <td width="20%" align="left" valign="top"><strong>Licence Code</strong></td>
         <td width="20%" align="left" valign="top"><input type="text" name="cfg_licence_code" size="40" value="<?php echo $uhp['licence_code']; ?>" />
				<?php	$tip = 'The full version requires a licence code for the site, it is entered here';
					echo mosToolTip( $tip );	?>
			</td>
      </tr>
      <tr align="left" valign="middle">
         <td width="20%" align="left" valign="top"><strong>Administrator Level</strong></td>
         <td width="20%" align="left" valign="top">      
				 <?php echo uhp_access_list($uhp['admin_access'], "cfg_admin_access"); ?>
				<?php	$tip = 'Enter the minimum level to allow administrator access.';
					echo mosToolTip( $tip );	?>
			 </td>
      </tr>
      <tr align="left" valign="middle">
         <td width="20%" align="left" valign="top"><strong>AutoApprove new user sites</strong></td>
         <td width="20%" align="left" valign="top">      
				 <?php echo mosHTML::yesnoRadioList( 'cfg_newuserapprove', 'class="inputbox"', $uhp['newuserapprove'] ); ?>
				<?php	$tip = 'When a new user registers, if this option is set, their site will be automatically created and they can start adding pages immediately.';
					echo mosToolTip( $tip );	?>
			 </td>
      </tr>
			<tr align="left" valign="middle">
         <td width="20%" align="left" valign="top"><strong>AutoPublish</strong></td>
         <td width="20%" align="left" valign="top">      
				 <?php echo mosHTML::yesnoRadioList( 'cfg_autopublish', 'class="inputbox"', $uhp['autopublish'] ); ?>
				<?php	$tip = 'Automatically publish pages and user sites after update.';
					echo mosToolTip( $tip );	?>
			 </td>
      </tr>
      <tr>
         <td width="20%" align="left" valign="top"><strong>New User text</strong></td>
         <td valign="top">
       <?php 
        editorArea( 'cfg_newuser_text', str_replace( '&', '&amp;', $uhp['newuser_text']) , 'cfg_newuser_text', 
				$uhp['editorwidth'], $uhp['editorheight'], '80', '15' ) ;
        ?>
         </td>
      </tr>      
      <tr align="left" valign="middle">
         <td width="20%" align="left" valign="top"><strong>Editor Width</strong></td>
         <td width="20%" align="left" valign="top"><input type="text" name="cfg_editorwidth" size="5" value="<?php echo $uhp['editorwidth']; ?>" />
				<?php	$tip = 'Width of wysiwyg editor edit area';
					echo mosToolTip( $tip );	?>
			</td>
      </tr>
      <tr align="left" valign="middle">
         <td width="20%" align="left" valign="top"><strong>Editor Height</strong></td>
         <td width="20%" align="left" valign="top"><input type="text" name="cfg_editorheight" size="5" value="<?php echo $uhp['editorheight']; ?>" />
				<?php	$tip = 'Height of wysiwyg editor edit area';
					echo mosToolTip( $tip );	?>
			</td>
      </tr>
 
      <tr align="left" valign="middle">
         <td width="20%" align="left" valign="top"><strong>Email address to notify changes<br>(leave blank if not required)</strong></td>
         <td width="20%" align="left" valign="top"><input type="text" name="cfg_emailnotify" size="40" value="<?php echo $uhp['emailnotify']; ?>" />
				<?php	$tip = 'Email address to receive notification of events, i.e. page approval required etc.';
					echo mosToolTip( $tip );	?>
					</td>
      </tr>
      <tr align="left" valign="middle">
         <td width="20%" align="left" valign="top"><strong>Enable Logging</strong></td>
         <td width="20%" align="left" valign="top">      
				 <?php echo mosHTML::yesnoRadioList( 'cfg_logging', 'class="inputbox"', $uhp['logging'] ); ?>
				<?php	$tip = 'Write activity logfile - N.B. may be large.';
					echo mosToolTip( $tip );	?>
			 </td>
      </tr>
      <tr align="left" valign="middle">
         <td width="20%" align="left" valign="top"><strong>Enable debugging output</strong></td>
         <td width="20%" align="left" valign="top">      
				 <?php echo mosHTML::yesnoRadioList( 'cfg_debug', 'class="inputbox"', $uhp['debug'] ); ?>
				<?php	$tip = 'Enable debugging - only use if advised by support';
					echo mosToolTip( $tip );	?>
			 </td>
      </tr>
 
		</table>
		<?php
		$tabs->endTab();	
 
		$tabs->startTab(" Page Options ","admin-page1");
		?>
		<table class="adminform">
      <tr align="left" valign="middle">
         <td width="20%" align="left" valign="top"><strong>Enable page editing</strong></td>
         <td width="20%" align="left" valign="top">      
				 <?php echo mosHTML::yesnoRadioList( 'cfg_editok', 'class="inputbox"', $uhp['editok'] ); ?>
				<?php	$tip = 'Allow pages to be modified, set this to no to only allow administrators to edit pages';
					echo mosToolTip( $tip );	?>
			 </td>
      </tr>
      <tr align="left" valign="middle">
         <td width="20%" align="left" valign="top"><strong>Enable page hit counting</strong></td>
         <td width="20%" align="left" valign="top">      
				 <?php echo mosHTML::yesnoRadioList( 'cfg_pagehits', 'class="inputbox"', $uhp['pagehits'] ); ?>
				<?php	$tip = 'Enable the page hit counter collection and display of stats n.b. this requires an additional database access per page';
					echo mosToolTip( $tip );	?>
			 </td>
      </tr>
      <tr align="left" valign="middle">
         <td width="20%" align="left" valign="top"><strong>Maximum pages per user</strong></td>
         <td width="20%" align="left" valign="top">
<?php if ( $uhp['licence']) { ?>
				 <input type="text" name="cfg_maxpages" size="5" value="<?php echo $uhp['maxpages']; ?>" />
				<?php	$tip = 'Maximum number of pages a user is allowed to create. If this is changed once pages are created, this is the maximum number which will be visible.';
					echo mosToolTip( $tip );	
					}
					else
					{
					echo $uhp['maxpages'];
					?>
				 <input type="hidden" name="cfg_maxpages" size="5" value="<?php echo $uhp['maxpages']; ?>" />
				 <?php
					$tip = 'Maximum number of pages a user is allowed to create. Fixed at '.$uhp['maxpages'].' in the free version.';
					echo mosToolTip( $tip );	
					}
					?>
			</td>
      </tr>
      <tr align="left" valign="middle">
         <td width="20%" align="left" valign="top"><strong>AutoApprove Pages</strong></td>
         <td width="20%" align="left" valign="top">      
				 <?php echo mosHTML::yesnoRadioList( 'cfg_autoapprove', 'class="inputbox"', $uhp['autoapprove'] ); ?>
				<?php	$tip = 'Automatically approve pages after update.';
					echo mosToolTip( $tip );	?>
			 </td>
      </tr>
      <tr align="left" valign="middle">
         <td width="20%" align="left" valign="top"><strong>Enable Revisions for page edits</strong></td>
         <td width="20%" align="left" valign="top">      
				 <?php echo mosHTML::yesnoRadioList( 'cfg_revisions', 'class="inputbox"', $uhp['revisions'] ); ?>
				<?php	$tip = 'Only active if AutoApprove is off. Page updates will be written to a new version, this version will not be visible until approved by the admin, it will then replace the original version.';
					echo mosToolTip( $tip );	?>
			 </td>
      </tr>
 
      <tr align="left" valign="middle">
         <td width="20%" align="left" valign="top"><strong>Maximum size of page header(chars)</strong></td>
         <td width="20%" align="left" valign="top"><input type="text" name="cfg_maxpagehdrsize" size="5" value="<?php echo $uhp['maxpagehdrsize']; ?>" />
				<?php	$tip = 'Maximum number of characters allowed per page header(not including html tags)';
					echo mosToolTip( $tip );	?>
			</td>
      </tr>
      <tr align="left" valign="middle">
         <td width="20%" align="left" valign="top"><strong>Maximum size of page footer(chars)</strong></td>
         <td width="20%" align="left" valign="top"><input type="text" name="cfg_maxpagefootsize" size="5" value="<?php echo $uhp['maxpagefootsize']; ?>" />
				<?php	$tip = 'Maximum number of characters allowed per page footer(not including html tags)';
					echo mosToolTip( $tip );	?>
			</td>
      </tr>
 
      <tr align="left" valign="middle">
         <td width="20%" align="left" valign="top"><strong>Show Site last updated footer</strong></td>
         <td width="20%" align="left" valign="top">      
				 <?php echo mosHTML::yesnoRadioList( 'cfg_showsiteupdated', 'class="inputbox"', $uhp['showsiteupdated'] ); ?>
				<?php	$tip = 'Show Site last updated footer.';
					echo mosToolTip( $tip );	?>
			 </td>
      </tr>
      <tr align="left" valign="middle">
         <td width="20%" align="left" valign="top"><strong>Show Page last updated footer</strong></td>
         <td width="20%" align="left" valign="top">      
				 <?php echo mosHTML::yesnoRadioList( 'cfg_showpageupdated', 'class="inputbox"', $uhp['showpageupdated'] ); ?>
				<?php	$tip = 'Show Page last updated footer.';
					echo mosToolTip( $tip );	?>
			 </td>
      </tr>
      <tr align="left" valign="middle">
         <td width="20%" align="left" valign="top"><strong>Show Owner footer</strong></td>
         <td width="20%" align="left" valign="top">      
				 <?php echo mosHTML::yesnoRadioList( 'cfg_showowner', 'class="inputbox"', $uhp['showowner'] ); ?>
				<?php	$tip = 'Show Owner footer.';
					echo mosToolTip( $tip );	?>
			 </td>
      </tr>
      <tr align="left" valign="middle">
         <td width="20%" align="left" valign="top"><strong>Custom Template Directory</strong></td> 
         <td width="20%" align="left" valign="top"><input type="text" name="cfg_templates" size="80" value="<?php echo $uhp['templates']; ?>" />
				<?php	$tip = 'Location of user templates, relative to Joomla home dir, copy uhp2.css file and any custom templates in here and edit. Any templates or css not found will be loaded from default directory';
					echo mosToolTip( $tip );	?>
			 </td>
      </tr>
 
		</table>
		<?php
		$tabs->endTab();	
 
$dirname[] = mosHTML::makeOption( '0', _UHP2_DIR_SHOW_NONE );
$dirname[] = mosHTML::makeOption( '1', _UHP2_DIR_SHOW_FULLNAME );
$dirname[] = mosHTML::makeOption( '2', _UHP2_DIR_SHOW_USERNAME );
$showdirname = mosHTML::selectList( $dirname, 'cfg_dirname', 'class="inputbox" size="1" ', 'value', 'text', $uhp['dirname'] );
 
		$tabs->startTab(" Directory ","admin-page");
		?>
		<table class="adminform">
 
      <tr align="left" valign="middle">
         <td width="20%" align="left" valign="top"><strong>Number of entries per page</strong></td>
         <td width="20%" align="left" valign="top"><input type="text" name="cfg_uhp_page" size="2" value="<?php echo $uhp['uhp_page']; ?>" />
				<?php	$tip = 'Number of entries to show per page in the directory';
					echo mosToolTip( $tip );	?>
			</td>
      </tr>
      <tr align="left" valign="middle">
         <td width="20%" align="left" valign="top"><strong>User Name Display</strong></td>
         <td width="20%" align="left" valign="top">
				<?php	
					echo $showdirname;
					$tip = 'What to show in the user name area in the directory';
					echo mosToolTip( $tip );	?>
			</td>
      </tr>
      <tr align="left" valign="middle">
         <td width="20%" align="left" valign="top"><strong>Title</strong></td>
         <td width="20%" align="left" valign="top"><input type="text" name="cfg_title" size="40" value="<?php echo $uhp['title']; ?>" />
				<?php	$tip = 'Main Title to be displayed above the listing on the directory';
					echo mosToolTip( $tip );	?>
			</td>
      </tr>
      <tr>
         <td width="20%" align="left" valign="top"><strong>Description</strong></td>
         <td valign="top">
       <?php 
        editorArea( 'cfg_title_desc', str_replace( '&', '&amp;', $uhp['title_desc']) , 'cfg_title_desc', 
				$uhp['editorwidth'], $uhp['editorheight'], '80', '15' ) ;
        ?>
         </td>
      </tr>
      <tr>
         <td width="20%" align="left" valign="top"><strong>Categories</strong></td>
         <td width="20%" align="left" valign="top"><input type="text" name="cfg_cats" size="80" value="<?php echo $uhp['cats']; ?>" />
				<?php	$tip = 'Enter comma separated list of categories to choose from in addition to the General category';
					echo mosToolTip( $tip );	?>
         </td>
      </tr>
      <tr align="left" valign="middle">
         <td width="20%" align="left" valign="top"><strong>Header field</strong></td>
         <td width="20%" align="left" valign="top"><input type="text" name="cfg_list_header" size="40" value="<?php echo $uhp['list_header']; ?>" />
				<?php	$tip = 'Header to be displayed above the listing on the directory';
					echo mosToolTip( $tip );	?>
			</td>
      </tr>
      <tr align="left" valign="middle">
         <td width="20%" align="left" valign="top"><strong>Show Search</strong></td>
         <td width="20%" align="left" valign="top">   
				 <?php echo mosHTML::yesnoRadioList( 'cfg_show_search', 'class="inputbox"', $uhp['show_search'] ); ?>
				<?php	$tip = 'Show the search button on the directory';
					echo mosToolTip( $tip );	?>
			</td>
      </tr>
      <tr align="left" valign="middle">
         <td width="20%" align="left" valign="top"><strong>Show Sites with no Pages</strong></td>
         <td width="20%" align="left" valign="top">   
				 <?php echo mosHTML::yesnoRadioList( 'cfg_show_empty', 'class="inputbox"', $uhp['show_empty'] ); ?>
				<?php	$tip = 'Show sites in the directory which have no pages';
					echo mosToolTip( $tip );	?>
			</td>
      </tr>
      <tr align="left" valign="middle">
         <td width="20%" align="left" valign="top"><strong>Maximum size of site description(chars)</strong></td>
         <td width="20%" align="left" valign="top"><input type="text" name="cfg_maxsitedescsize" size="5" value="<?php echo $uhp['maxsitedescsize']; ?>" />
				<?php	$tip = 'Maximum number of characters allowed per site description - set in the site settings page (not including html tags)';
					echo mosToolTip( $tip );	?>
			</td>
      </tr>
      <tr align="left" valign="middle">
         <td width="20%" align="left" valign="top"><strong>Show Control panel</strong></td>
         <td width="20%" align="left" valign="top">   
				 <?php echo mosHTML::yesnoRadioList( 'cfg_show_cpanel', 'class="inputbox"', $uhp['show_cpanel'] ); ?>
				<?php	$tip = 'Show the user Control panel on the directory page';
					echo mosToolTip( $tip );	?>
			</td>
      </tr>
 
		</table>
		<?php
		$tabs->endTab();	
 
/*		$tabs->startTab(" Theme ","admin-page1");
		?>
		<table class="adminform">
      <tr align="left" valign="middle">
         <td width="20%" align="left" valign="top"><strong>Modify default stylesheet</strong></td>
         <td width="20%" align="left" valign="top">      
				 <textarea class="inputbox" rows="20" cols="80" name="cfg_css"><?php echo $uhp['css'] ?></textarea>
			 </td>
      </tr>
 
		</table>
		<?php
		$tabs->endTab();			
*/
 
// plugin configs..
//print_r ($uhp_plugins);
		foreach ($uhp_plugins as $plugin) {		
		$p = new $plugin[2];
 
		$p->admin_config($tabs);
 
		}
// end of plugins
		$tabs->endPane();
		?>
   <input type="hidden" name="task" value="" />
   <input type="hidden" name="option" value="<?php echo $option; ?>" />
   <input type="hidden" name="cfg_version" value="<?php echo $uhp['version']; ?>" />
   </form>
	<?php 
	ravenswood_details();
	}	
 
} //end class
 
?>
 
К этой странице обращались 13 295 раз.
Последнее изменение этой страницы: 14:49, 15 января 2007.
Поддержка Joomla!