PDA

توجه ! این یک نسخه آرشیو شده میباشد و در این حالت شما عکسی را مشاهده نمیکنید برای مشاهده کامل متن و عکسها بر روی لینک مقابل کلیک کنید : سوال مشکل در قالب



rezabelack
02-08-2012, 05:18 PM
سلام خدمت تمامی کمک کنندگان عزیز
آقا من یک قالب نصب کردم ولی وقتی مخوام سایت رو باز کنم ارور زیر میاد :
Fatal error: Call to undefined function cubeimport() in /home2/bazibazn/public_html/khane/templates/jf_gamespoint/html/com_content/frontpage/default.php on line 10
فکر هم نکنم قالب مشکلی داشته باشه من کد default رو میزارم برای بررسی :

<?php
/*--------------------------------------
# Copyright(C) 2004-2009 Jooforge
# <b><font color=red>فقط کاربران عضو انجمن می توانند لینک ها را مشاهده کنند</font></b>
-----------------------------------------*/

defined('_JEXEC') or die('Restricted Access');

JPluginHelper::importPlugin('cube', 'cube');
cubeimport('template');

?>

<?php if ($this->params->get('show_page_title', 1)) : ?>
<div class="componentheading">
<?php echo $this->escape($this->params->get('page_title')); ?>
</div>
<?php endif; ?>

<div class="frontpage">

<?php if ($this->params->def('num_leading_articles', 1)) : ?>
<div class="leadingarticles">
<?php for ($i = $this->pagination->limitstart; $i < ($this->pagination->limitstart + $this->params->get('num_leading_articles')); $i++) : ?>
<?php if ($i >= $this->total) : break; endif; ?>
<?php
$this->item =& $this->getItem($i, $this->params);
echo $this->loadTemplate('item');
?>
<?php endfor; ?>
</div>
<?php else : $i = $this->pagination->limitstart; endif; ?>

<?php
if ($i < $this->total) {

// init vars
$count = min($this->params->get('num_intro_articles', 4), ($this->total - $i));
$rows = ceil($count / $this->params->get('num_columns', 2));
$columns = array();

// create intro columns
for ($j = 0; $j < $count; $j++, $i++) {

if ($this->params->get('multi_column_order', 1) == 0) {
// order down
$column = intval($j / $rows);
} else {
// order across
$column = $j % $this->params->get('num_columns', 2);
}

if (!isset($columns[$column])) {
$columns[$column] = '';
}

$this->item =& $this->getItem($i, $this->params);
$columns[$column] .= $this->loadTemplate('item2');
}

// render intro columns
$count = count($columns);
if ($count) {
if ($count != 1) {
echo '<div class="teaserarticles clearfix">';
} else {
echo '<div class="teaserarticles">';
}
for ($j = 0; $j < $count; $j++) {
$firstlast = "";
if ($count != 1) {
$firstlast = "center";
if($j == 0) $firstlast = "first";
if($j == $count - 1) $firstlast = "last";
}
echo '<div class="'.$firstlast.' float-left width'.intval(100 / $count).'">'.$columns[$j].'</div>';
}
echo '</div>';
echo '<div class="article_separator"></div>';
}
}
?>

<?php if ($this->params->def('num_links', 4) && ($i < $this->total)) : ?>
<div class="blog_more">
<?php
$this->links = array_splice($this->items, $i - $this->pagination->limitstart);
echo $this->loadTemplate('links');
?>
</div>
<?php endif; ?>

<?php if ($this->params->def('show_pagination', 2) == 1 || ($this->params->get('show_pagination') == 2 && $this->pagination->get('pages.total') > 1)) : ?>
<div class="pagination clearfix">
<?php if ($this->params->def('show_pagination_results', 1)) : ?>
<div class="results">
<?php echo $this->pagination->getPagesCounter(); ?>
</div>
<?php endif; ?>
<?php echo $this->pagination->getPagesLinks(); ?>
</div>
<?php endif; ?>

</div>


ممنون میشم کمک کنید با تشکر
قربون همه بچه های جوملای فارسی

shmata
02-08-2012, 05:43 PM
در خط 10 فایل default.php در آدرسی که خودتون مشخص کردید تابع cubeimport() وجود ندارد .


function cubeimport(){
$a = 'true'
return $a;
}

را در خط 10 اضافه کنید .

rezabelack
02-08-2012, 06:15 PM
اضافه کردم ولی باز به ارور جدید برخوردم :
Parse error: syntax error, unexpected T_RETURN in /home2/bazibazn/public_html/khane/templates/jf_gamespoint/html/com_content/frontpage/default.php on line 12
این هم کدی که تغییرات اعمال کردم :

<?php
/*--------------------------------------
# Copyright(C) 2004-2009 Jooforge
# <b><font color=red>فقط کاربران عضو انجمن می توانند لینک ها را مشاهده کنند</font></b>
-----------------------------------------*/

defined('_JEXEC') or die('Restricted Access');

JPluginHelper::importPlugin('cube', 'cube');
function cubeimport(){
$a = 'true'
return $a;
}
cubeimport('template');
?>


<?php if ($this->params->get('show_page_title', 1)) : ?>
<div class="componentheading">
<?php echo $this->escape($this->params->get('page_title')); ?>
</div>
<?php endif; ?>

<div class="frontpage">

<?php if ($this->params->def('num_leading_articles', 1)) : ?>
<div class="leadingarticles">
<?php for ($i = $this->pagination->limitstart; $i < ($this->pagination->limitstart + $this->params->get('num_leading_articles')); $i++) : ?>
<?php if ($i >= $this->total) : break; endif; ?>
<?php
$this->item =& $this->getItem($i, $this->params);
echo $this->loadTemplate('item');
?>
<?php endfor; ?>
</div>
<?php else : $i = $this->pagination->limitstart; endif; ?>

<?php
if ($i < $this->total) {

// init vars
$count = min($this->params->get('num_intro_articles', 4), ($this->total - $i));
$rows = ceil($count / $this->params->get('num_columns', 2));
$columns = array();

// create intro columns
for ($j = 0; $j < $count; $j++, $i++) {

if ($this->params->get('multi_column_order', 1) == 0) {
// order down
$column = intval($j / $rows);
} else {
// order across
$column = $j % $this->params->get('num_columns', 2);
}

if (!isset($columns[$column])) {
$columns[$column] = '';
}

$this->item =& $this->getItem($i, $this->params);
$columns[$column] .= $this->loadTemplate('item2');
}

// render intro columns
$count = count($columns);
if ($count) {
if ($count != 1) {
echo '<div class="teaserarticles clearfix">';
} else {
echo '<div class="teaserarticles">';
}
for ($j = 0; $j < $count; $j++) {
$firstlast = "";
if ($count != 1) {
$firstlast = "center";
if($j == 0) $firstlast = "first";
if($j == $count - 1) $firstlast = "last";
}
echo '<div class="'.$firstlast.' float-left width'.intval(100 / $count).'">'.$columns[$j].'</div>';
}
echo '</div>';
echo '<div class="article_separator"></div>';
}
}
?>

<?php if ($this->params->def('num_links', 4) && ($i < $this->total)) : ?>
<div class="blog_more">
<?php
$this->links = array_splice($this->items, $i - $this->pagination->limitstart);
echo $this->loadTemplate('links');
?>
</div>
<?php endif; ?>

<?php if ($this->params->def('show_pagination', 2) == 1 || ($this->params->get('show_pagination') == 2 && $this->pagination->get('pages.total') > 1)) : ?>
<div class="pagination clearfix">
<?php if ($this->params->def('show_pagination_results', 1)) : ?>
<div class="results">
<?php echo $this->pagination->getPagesCounter(); ?>
</div>
<?php endif; ?>
<?php echo $this->pagination->getPagesLinks(); ?>
</div>
<?php endif; ?>

</div>


حالا باید چکار کنم ؟

shmata
02-09-2012, 08:20 AM
این قالب ها یک بسته جوملای مخصوص به خودشان داردند وقتی آن بسته را نصب کنید هیچ مشکلی پیش نمیاد

rezabelack
02-09-2012, 08:44 AM
این قالب ها یک بسته جوملای مخصوص به خودشان داردند وقتی آن بسته را نصب کنید هیچ مشکلی پیش نمیاد
یعنی باید جوملای خودش رو نصب کنم ؟
اخه جایی جوملای مخصوص خودش رو نزده بود :-؟

rezabelack
02-09-2012, 09:38 AM
اون مشکلم از یک پلاگین بود باید نصب میکردم درست شد ولی حالا که نصب کردن این صفحه میاد :
<b><font color=red>فقط کاربران عضو انجمن می توانند لینک ها را مشاهده کنند</font></b>
ولی در اصل باید این باشه :
<b><font color=red>فقط کاربران عضو انجمن می توانند لینک ها را مشاهده کنند</font></b>
چکار کنم مثل این بشه ؟!