ورود

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



emad_67
11-02-2007, 01:46 PM
سلام خدمت دوستان عزیز
من از این کد:


<?php echo jdate("l j F Y H:i",time() + ($mosConfig_offset*60*60)); ?>

برای نمایش ساعت و تاریخ در صفحه استفاده کردم. میخواستم بدونم چه جوری باید اونو در قسمت نکته ها قرار داد؟

developer
11-02-2007, 02:14 PM
باید ماژول نکته ها را ویرایش کنید ( فایل mod_newsflash در فولدر modules )

emad_67
11-02-2007, 02:36 PM
با تشکر
میشه دقیق تر بگین که چیکار کنم. من کد این ساعت رو هر جای اون فایل کپی کردم ارور داد.

developer
11-02-2007, 02:41 PM
PHP چقدر کار کردین ؟

emad_67
11-02-2007, 02:52 PM
PHP چقدر کار کردین ؟
هیچی :-\

مشکل قرار گرفتن توی کادر حل شد خدا را شکر فقط بفرمایید من چه جوری اونو وسط کادر تنظیم کنم؟ الان سمت چپ قرار گرفته تقریبا.
با تشکر

developer
11-02-2007, 02:56 PM
این که دیگه HTML هست !
یک تگ <center> میتونی قبل و بعدش بذاری و یا با div یا p و align center این کارو انجام بدی !

emad_67
11-02-2007, 03:12 PM
از تگ های center، div و p استفاده کردم ولی در مورد همشون این ارور رو میده:

Parse error: syntax error, unexpected '<' in /home/irpcnco/public_html/modules/mod_newsflash.php on line 22

در کا هر تگی که میخوام باز کنم از > ارور میگیره

emad_67
11-02-2007, 03:28 PM
اینم کل کد فایل mod_newflash:


<?php
/**
* @package Mambo
* @author Mambo Foundation Inc see README.php
* @copyright Mambo Foundation Inc.
* See COPYRIGHT.php for copyright notices and details.
* @license <b><font color=red>فقط کاربران عضو انجمن می توانند لینک ها را مشاهده کنند</font></b> GNU/GPL, see
* LICENSE.php
* Mambo is free software; you can redistribute it and/or
* modify it under the terms of the GNU General Public License
* as published by the Free Software Foundation; version 2 of the
* License.
*/

/** ensure this file is being included by a parent file */
defined( &#039;_VALID_MOS&#039; ) or die( &#039;Direct Access to this location is not allowed.&#039; );

require_once( $mainframe-&gt;getPath( &#039;front_html&#039;, &#039;com_content&#039;) );
require_once($mosConfig_absolute_path.&#039;/components/com_content/content.class.php&#039;);

global $my, $mosConfig_shownoauth, $mosConfig_offset, $acl;
&lt;center&gt;echo jdate(&quot;l j F Y H:i&quot;,time() + ($mosConfig_offset*60*60))&lt;/center&gt;

// Disable edit ability icon
$access = new stdClass();
$access-&gt;canEdit = 0;
$access-&gt;canEditOwn = 0;
$access-&gt;canPublish = 0;


$now = date( &#039;Y-m-d H:i:s&#039;, time()+$mosConfig_offset*60*60 );

$catid = intval( $params-&gt;get( &#039;catid&#039; ) );
$style = $params-&gt;get( &#039;style&#039; );
$image = $params-&gt;get( &#039;image&#039; );
$readmore = $params-&gt;get( &#039;readmore&#039; );
$items = intval( $params-&gt;get( &#039;items&#039; ) );
$moduleclass_sfx = $params-&gt;get( &#039;moduleclass_sfx&#039; );

$params-&gt;set( &#039;intro_only&#039;, 1 );
$params-&gt;set( &#039;hide_author&#039;, 1 );
$params-&gt;set( &#039;hide_createdate&#039;, 0 );
$params-&gt;set( &#039;hide_modifydate&#039;, 1 );

if ( $items ) {
$limit = &quot;LIMIT &quot;. $items;
} else {
$limit = &quot;&quot;;
}

$noauth = !$mainframe-&gt;getCfg( &#039;shownoauth&#039; );

// query to determine article count
$query = &quot;SELECT a.id&quot;
.&quot;\n FROM #__content AS a&quot;
.&quot;\n INNER JOIN #__categories AS b ON b.id = a.catid&quot;
.&quot;\n WHERE a.state = 1&quot;
. ( $noauth ? &quot;\n AND a.access &lt;= &#039;&quot;. $my-&gt;gid .&quot;&#039; AND b.access &lt;= &#039;&quot;. $my-&gt;gid .&quot;&#039;&quot; : &#039;&#039; )
.&quot;\n AND (a.publish_up = &#039;0000-00-00 00:00:00&#039; OR a.publish_up &lt;= &#039;&quot;. $now .&quot;&#039;) &quot;
.&quot;\n AND (a.publish_down = &#039;0000-00-00 00:00:00&#039; OR a.publish_down &gt;= &#039;&quot;. $now .&quot;&#039;)&quot;
.&quot;\n AND catid=&#039;&quot;. $catid .&quot;&#039; &quot;
.&quot;\n ORDER BY a.ordering&quot;
.&quot;\n &quot;. $limit
;
$database-&gt;setQuery( $query );
$rows = $database-&gt;loadResultArray();

$row = new mosContent( $database );
if (!count($rows)) {
return;
}
$numrows = count( $rows );

switch ($style) {
case &#039;horiz&#039;:
echo &quot;\n&lt;table class=\&quot;moduletable&quot; . $moduleclass_sfx . &quot;\&quot;&gt;\n&quot;;
echo &quot;&lt;tr&gt;\n&quot;;
foreach ($rows as $id) {
$row-&gt;load( $id );
$row-&gt;text = $row-&gt;introtext;
$row-&gt;groups = &#039;&#039;;
echo &#039;&lt;td&gt;&#039;;
HTML_content::show( $row, $params, $access, 0, &#039;com_content&#039; );
echo &quot;&lt;/td&gt;\n&quot;;
}
echo &quot;&lt;/tr&gt;\n&lt;/table&gt;\n&quot;;
break;

case &#039;vert&#039;:
foreach ($rows as $id) {
$row-&gt;load( $id );
$row-&gt;text = $row-&gt;introtext;
$row-&gt;groups = &#039;&#039;;

HTML_content::show( $row, $params, $access, 0, &#039;com_content&#039; );
}
break;

case &#039;flash&#039;:
default:
if ($numrows &gt; 0) {
srand ((double) microtime() * 1000000);
$flashnum = $rows[rand( 0, $numrows-1 )];
} else {
$flashnum = 0;
}
$row-&gt;load( $flashnum );
$row-&gt;text = $row-&gt;introtext;
$row-&gt;groups = &#039;&#039;;

HTML_content::show( $row, $params, $access, 0, &#039;com_content&#039; );
break;
}
?&gt;

خطی رو که قرمز کردم کدی هست که وارد میکنم.
وقتی اینجوری مینویسم جواب میده. فقط وسط نمیفته:


echo jdate(&quot;l j F Y H:i&quot;,time() + ($mosConfig_offset*60*60));

ولی وقتی بین هر تگی قرار میدم ارور میده

emad_67
11-02-2007, 03:41 PM
این قاطی شد نمیدونم چرا. قسمتی رو که کد ساعت رو نوشتم میزارم


defined( &#039;_VALID_MOS&#039; ) or die( &#039;Direct Access to this location is not allowed.&#039; );

require_once( $mainframe-&gt;getPath( &#039;front_html&#039;, &#039;com_content&#039;) );
require_once($mosConfig_absolute_path.&#039;/components/com_content/content.class.php&#039;);

global $my, $mosConfig_shownoauth, $mosConfig_offset, $acl;



&lt;center&gt;echo jdate(&quot;l j F Y H:i&quot;,time() + ($mosConfig_offset*60*60))&lt;/center&gt;




// Disable edit ability icon
$access = new stdClass();
$access-&gt;canEdit = 0;
$access-&gt;canEditOwn = 0;
$access-&gt;canPublish = 0;

radmehr
11-02-2007, 07:59 PM
توی PHP برای وارد کردن تگ ها از echo استفاده کنید