Pomoc - Szukaj - Użytkownicy - Kalendarz
Pełna wersja: Problem z szablonem
Forum PHP.pl > Forum > Gotowe rozwiązania
Enei
Witam, dopiero zaczynam z joomla wiec prosze o wyrozumiałość i zrozumienie,
znalazłem szablon który przypadł mi do gustu (http://demo.themexpert.com/index.php?show=gravity)
mozna go pobrać stąd (http://www.joomla24.com/option,com_remository/Itemid,4/func,fileinfo/id,4723.html)

Pobrałem, zainstalowałem, chce go włączyć a tu błąd

Cytat
Parse error: parse error, expecting `T_OLD_FUNCTION' or `T_FUNCTION' or `T_VAR' or `'}'' in c:\usr\krasnal\www\joomla\templates\tx_gravity\lib\php\tx.template.helper.php on line 12


Dany plik (tx.template.helper.php) pierwsze 40 linijek z 334:
  1. <?php
  2. // no direct access
  3. defined( '_JEXEC' ) or die( 'Restricted access' );
  4.  
  5. //include TXParameters Helper class.
  6. include_once(LIB_PATH.'php/tx.param.helper.php');
  7.  
  8. class TXTemplateHelper extends TXParametersHelper{
  9.  
  10. var $_tpl = null;
  11. var $template = '';
  12. public $doc;
  13. var $browser = array();
  14.  
  15. //Active parameters set
  16. public $temParams = array();
  17.  
  18. function __construct($template){
  19. parent::__construct();
  20. $this->_tpl = $template;
  21. $this->template = $template->template;
  22.  
  23. $this->doc= &JFactory::getDocument();
  24.  
  25. // ie browser
  26. if (array_key_exists('HTTP_USER_AGENT', $_SERVER) && preg_match('/(MSIE\\s?([\\d\\.]+))/', $_SERVER['HTTP_USER_AGENT'], $matches)) {
  27. $this->browser['ie7'] = intval($matches[2]) == 7;
  28. $this->browser['ie6'] = intval($matches[2]) == 6;
  29. }
  30. }
  31.  
  32. /*public function &getInstance(){
  33.   static $instance;
  34.   if($instance == NULL){
  35.   $instance = new TXTemplateHelper();
  36.   }
  37.   return $instance;
  38.   }*/
  39.  



Proszę o pomoc : )
nospor
Odpalasz szablon napisany dla php5 na php4 smile.gif

Zamien słowa PUBLIC na VAR - moze pomoze.
Enei
Pomogło, lecz pojawił się następny problem:


Cytat
Parse error: parse error, expecting `T_VARIABLE' in c:\usr\krasnal\www\joomla\templates\tx_gravity\lib\php\tx.template.helper.php on line 44




Dany plik (tx.template.helper.php) linijki do 60 z 334:
  1. <?php
  2. // no direct access
  3. defined( '_JEXEC' ) or die( 'Restricted access' );
  4.  
  5. //include TXParameters Helper class.
  6. include_once(LIB_PATH.'php/tx.param.helper.php');
  7.  
  8. class TXTemplateHelper extends TXParametersHelper{
  9.  
  10. var $_tpl = null;
  11. var $template = '';
  12. var $doc;
  13. var $browser = array();
  14.  
  15. //Active parameters set
  16. var $temParams = array();
  17.  
  18. function __construct($template){
  19. parent::__construct();
  20. $this->_tpl = $template;
  21. $this->template = $template->template;
  22.  
  23. $this->doc= &JFactory::getDocument();
  24.  
  25. // ie browser
  26. if (array_key_exists('HTTP_USER_AGENT', $_SERVER) && preg_match('/(MSIE\\s?([\\d\\.]+))/', $_SERVER['HTTP_USER_AGENT'], $matches)) {
  27. $this->browser['ie7'] = intval($matches[2]) == 7;
  28. $this->browser['ie6'] = intval($matches[2]) == 6;
  29. }
  30. }
  31.  
  32. /*var function &getInstance(){
  33.   static $instance;
  34.   if($instance == NULL){
  35.   $instance = new TXTemplateHelper();
  36.   }
  37.   return $instance;
  38.   }*/
  39.  
  40.  
  41. /****************************************
  42.   * Get all font properties
  43.   ****************************************/
  44. var function getFonts(){
  45. $this->setFonts();
  46. return $this->arrayToObject($this->temParams['fonts']) ;
  47.  
  48. }
  49. /****************************************
  50.   * Set all font propertins in array
  51.   ****************************************/
  52. private function setFonts(){
  53. $fontsLib= $this->get('fontLibrary');
  54. $this->temParams['fonts']= array(
  55. 'lib'=>$fontsLib,
  56. 'name'=>$this->get('fontLibrary-'.$fontsLib.'-Fonts'),
  57. 'for'=>$this->get('fontLibrary-'.$fontsLib.'-Fonts-for')
  58. );
  59. }
  60.  
nospor
w przypadku funkcji nie zamieniaj PUBLIC na VAR smile.gif
W przypadku funkcji wszelkie PUBLIC czy PRIVATE usun.
molis85
Witam,
zmień sobie pakiet z Krasnala na jakiś inny, np XAMPP (http://www.apachefriends.org/en/xampp.html). Krasnal jest starym oprogramowaniem i już nie rozwijanym.
Pozdrawiam
To jest wersja lo-fi głównej zawartości. Aby zobaczyć pełną wersję z większą zawartością, obrazkami i formatowaniem proszę kliknij tutaj.
Invision Power Board © 2001-2024 Invision Power Services, Inc.