PDA

Zobacz pełną wersję : docman - błąd: tasks.tpl.php on line 36



nastrychu
19-01-2008, 18:15
Witam serdecznie - czy ktoś wie, jak usunąć ów błąd?
in /home/mfserwer/ftp/psychologia/components/com_docman/
themes/default_polish/templates/documents/tasks.tpl.php on line 36
dziękuje za pomoc:-)

zwiastun
20-01-2008, 00:03
ni podałeś błędu - podałeś tylko linię z adresem wskazujacym gdzie jest ew. źródło błędu

nastrychu
20-01-2008, 01:35
rzecz w tym, że w momencie, gdy po zadaniu wyszukiwania jakiejś rzeczy w docman'ie - widzę wyniki wyszukiwania, ale są one nieaktywne i pojawia się taki o to komunikat:
Warning: Invalid argument supplied for foreach() in /home/mfserwer/ftp/psychologia/components/com_docman/themes/default_polish/templates/documents/tasks.tpl.php on line 36

i nie wiem jak to miałabym ugryźć

ni podałeś błędu - podałeś tylko linię z adresem wskazujacym gdzie jest ew. źródło błędu

mery_master
01-02-2008, 00:48
W miejsce 36 linijki wklejamy to:


$buttonArray;

if ($this->doc->links == null) {
$buttonArray = $this->doc->buttons;
}
else {
$buttonArray = $this->doc->links;
}

foreach($buttonArray as $button) {


Ale nie rozwiązuje to wszystkiego niestety...
Ktoś sobie poradził z tym, żeby tytuł był linkiem ?

alex51
05-05-2008, 11:29
W tym przypadku chodzi o przywrócenie przycisków umożliwiających m.in. pobieranie itp funkcje. Można to osiągnąć nadpisując plik w ścieżce:
/www/components/com_docman/themes/default_polish/templates/documents/tasks.tpl.php
oraz w:
/www/components/com_docman/themes/default/templates/documents/tasks.tpl.php

takim plikiem (http://alex51.al.funpic.de/pliki/tasks.tpl.zip) w którym zminiłem jego oryginalną zawartość na taką:


<?php
/**
* DOCman 1.4.x - Joomla! Document Manager
* @version $Id: tasks.tpl.php 423 2007-10-29 22:18:47Z mjaz $
* @package DOCman_1.4
* @copyright (C) 2003-2007 The DOCman Development Team
* @license http://www.gnu.org/copyleft/gpl.html GNU/GPL
* @link http://www.joomlatools.org/ Official website
**/
defined('_VALID_MOS') or die('Restricted access');

/**
* Default DOCman Theme
*
* Creator: The DOCman Development Team
* Website: http://www.joomlatools.org/
* Email: support@joomlatools.org
* Revision: 1.4
* Date: February 2007
**/

/*
* Display the document tasks (called by document/list_item.tpl.php and documents/document.tpl.php)
*
* General variables :
* $this->theme->path (string) : template path
* $this->theme->name (string) : template name
* $this->theme->conf (object) : template configuartion parameters
* $this->theme->icon (string) : template icon path
* $this->theme->png (boolean): browser png transparency support
*
* Template variables :
* $this->doc->links (object) : holds the tasks a user can preform on a document
*/

if(isset($this->doc->buttons))
{
$list = $this->doc->buttons;
}
else
{
$list = $this->doc->links;
}
foreach($list as $button) {
$popup = ($button->params->get('popup', false)) ? 'type="popup"' : '';
$attr = '';
if($class = $button->params->get('class', '')) {
$attr = 'class="' . $class . '"';
}
?><li <?php echo $attr?>>
<a href="<?php echo $button->link?>" <?php echo $popup?>>
<?php echo $button->text ?>
</a>
</li><?php
}

Po nadpisaniu pliku tasks.tpl.php w 2 katalogach (wg wyżej podanych ścieżek) wyszukiwarka u mnie zaczęła funkcjonować prawidłowo.