PDA

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



myparsa
03-31-2009, 02:27 PM
سلام

اشکالی مشابه در هر دوی کامپوننت های اکوکامنت و کام کامنت وجود دارد!

وقتی بر روی لینک ارسال یادداشت کلیک می کنی به لینک ثابت همان مطلب منتقل می شود و این در صورتی است که باید به بخش انتهایی مطلب یعنی فرم ارسال مطلب منتقل شود ، به نظر می رسد انتهای لینک ارسال یادداشت ، این دستور: comment# و یا دستوری مشابه را کم دارد ، در کجا باید این دستور به لینک افزوده شود؟

emad_67
03-31-2009, 08:24 PM
برای akocomment رو میگم:
در فولدر components\com_akocomment فایل akocomment.php رو باز کن. در خط 226 اینو نوشته:

if ( $ac_openingmode ){
mosRedirect("index2.php?option=com_content&task=vi ew&id=$contentid&pop=1&page=0", $msg );
} else {
mosRedirect("index.php?option=com_content&task=vie w&id=$contentid&Itemid=$acitemid", $msg );
}
اونو به این شکل تغییر بده:

$query3 = ("SELECT max(id) FROM #__akocomment");
$database->setQuery( $query3 );
$maxid = $database->loadResult();

if ( $ac_openingmode ){
header("location:$mosConfig_live_site/index2.php?option=com_content&task=view&id=$conten tid&pop=1&page=0".$msg."#akocomment".$maxid );
} else {
header("location:$mosConfig_live_site/index.php?option=com_content&task=view&id=$content id&Itemid=$acitemid&mosmsg=".$msg."#akocomment".$m axid);
}
موفق باشید ;)

myparsa
03-31-2009, 10:26 PM
برای akocomment رو میگم:
در فولدر components\com_akocomment فایل akocomment.php رو باز کن. در خط 226 اینو نوشته:

if ( $ac_openingmode ){
mosRedirect("index2.php?option=com_content&task=vi ew&id=$contentid&pop=1&page=0", $msg );
} else {
mosRedirect("index.php?option=com_content&task=vie w&id=$contentid&Itemid=$acitemid", $msg );
}
اونو به این شکل تغییر بده:

$query3 = ("SELECT max(id) FROM #__akocomment");
$database->setQuery( $query3 );
$maxid = $database->loadResult();

if ( $ac_openingmode ){
header("location:$mosConfig_live_site/index2.php?option=com_content&task=view&id=$conten tid&pop=1&page=0".$msg."#akocomment".$maxid );
} else {
header("location:$mosConfig_live_site/index.php?option=com_content&task=view&id=$content id&Itemid=$acitemid&mosmsg=".$msg."#akocomment".$m axid);
}
موفق باشید ;)


کد معرفی شده بدرستی جایگزین شد اما تغییری دیده نمی شود!
نشانی سایت:
w ww.rezayat.artparsa.ir

emad_67
04-01-2009, 06:10 AM
من اینو جوری تنظیم کردم که وقتی کامنت ثبت شد صفحه از ابتدای اون کامنت شروع میشه. توی سایت شما کامنت ها با صورت اتوماتیک منتشر نمیشن بنابراین چون کامنت بعد از ثبت در صفحه نشون داده نمیشه بنابراین تغییری هم ایجاد نمیشه.

myparsa
04-01-2009, 02:32 PM
من اینو جوری تنظیم کردم که وقتی کامنت ثبت شد صفحه از ابتدای اون کامنت شروع میشه. توی سایت شما کامنت ها با صورت اتوماتیک منتشر نمیشن بنابراین چون کامنت بعد از ثبت در صفحه نشون داده نمیشه بنابراین تغییری هم ایجاد نمیشه.


بله البته این هم موثر است اما نه برای سایتی هایی که تائید کامنت را اصلح می دانند ، اما اشکال اساسی این کامپوننت ها این است که مخاطب پس از کلیک بر روی لینک ارسال یادداشت باید بصورت دستی به انتهای مطلب برود ، اما صحیح این است که بصورت اتوماتیک به انتهای مطلب و ابتدای فرم نظر سنجی منتقل گردد ، من دستور comment# رو وقتی دستی به لینک ثابت اضافه می کنم این اتفاق می افتد! چطور می شه این دستور رو به انتهای لینک ارسال یاد داشت افزود؟

سپاس

emad_67
04-03-2009, 07:22 AM
من اینو جوری تنظیم کردم که وقتی کامنت ثبت شد صفحه از ابتدای اون کامنت شروع میشه. توی سایت شما کامنت ها با صورت اتوماتیک منتشر نمیشن بنابراین چون کامنت بعد از ثبت در صفحه نشون داده نمیشه بنابراین تغییری هم ایجاد نمیشه.


بله البته این هم موثر است اما نه برای سایتی هایی که تائید کامنت را اصلح می دانند ، اما اشکال اساسی این کامپوننت ها این است که مخاطب پس از کلیک بر روی لینک ارسال یادداشت باید بصورت دستی به انتهای مطلب برود ، اما صحیح این است که بصورت اتوماتیک به انتهای مطلب و ابتدای فرم نظر سنجی منتقل گردد ، من دستور comment# رو وقتی دستی به لینک ثابت اضافه می کنم این اتفاق می افتد! چطور می شه این دستور رو به انتهای لینک ارسال یاد داشت افزود؟

سپاس

بر این کار:
در فولدر components\com_akocomment فایل akocomment.php رو باز کن. در خط 226 اینو نوشته:

if ( $ac_openingmode ){
mosRedirect("index2.php?option=com_content&task=vi ew&id=$contentid&pop=1&page=0", $msg );
} else {
mosRedirect("index.php?option=com_content&task=vie w&id=$contentid&Itemid=$acitemid", $msg );
}
اونو به این شکل تغییر بده:

if ( $ac_openingmode ){
header("location:$mosConfig_live_site/index2.php?option=com_content&task=view&id=$conten tid&pop=1&page=0&mosmsg=".$msg."#akocomment" );
} else {
header("location:$mosConfig_live_site/index.php?option=com_content&task=view&id=$content id&Itemid=$acitemid&mosmsg=".$msg."#akocomment" );
}
بعد از مسیر mambots\content فایل akocommentbot.php رو باز کن.
این خط رو پیدا کن:

$akoinputforum .= "<table align='center' width='100%' cellpadding='2' cellspacing='0' border='0'>";
در بالای این خط اینو اضافه کن:

$akoinputforum .= "<a name='akocomment'></a>";
موفق باشید

myparsa
04-03-2009, 01:45 PM
من اینو جوری تنظیم کردم که وقتی کامنت ثبت شد صفحه از ابتدای اون کامنت شروع میشه. توی سایت شما کامنت ها با صورت اتوماتیک منتشر نمیشن بنابراین چون کامنت بعد از ثبت در صفحه نشون داده نمیشه بنابراین تغییری هم ایجاد نمیشه.


بله البته این هم موثر است اما نه برای سایتی هایی که تائید کامنت را اصلح می دانند ، اما اشکال اساسی این کامپوننت ها این است که مخاطب پس از کلیک بر روی لینک ارسال یادداشت باید بصورت دستی به انتهای مطلب برود ، اما صحیح این است که بصورت اتوماتیک به انتهای مطلب و ابتدای فرم نظر سنجی منتقل گردد ، من دستور comment# رو وقتی دستی به لینک ثابت اضافه می کنم این اتفاق می افتد! چطور می شه این دستور رو به انتهای لینک ارسال یاد داشت افزود؟

سپاس

بر این کار:
در فولدر components\com_akocomment فایل akocomment.php رو باز کن. در خط 226 اینو نوشته:

if ( $ac_openingmode ){
mosRedirect("index2.php?option=com_content&task=vi ew&id=$contentid&pop=1&page=0", $msg );
} else {
mosRedirect("index.php?option=com_content&task=vie w&id=$contentid&Itemid=$acitemid", $msg );
}
اونو به این شکل تغییر بده:

if ( $ac_openingmode ){
header("location:$mosConfig_live_site/index2.php?option=com_content&task=view&id=$conten tid&pop=1&page=0&mosmsg=".$msg."#akocomment" );
} else {
header("location:$mosConfig_live_site/index.php?option=com_content&task=view&id=$content id&Itemid=$acitemid&mosmsg=".$msg."#akocomment" );
}
بعد از مسیر mambots\content فایل akocommentbot.php رو باز کن.
این خط رو پیدا کن:

$akoinputforum .= "<table align='center' width='100%' cellpadding='2' cellspacing='0' border='0'>";
در بالای این خط اینو اضافه کن:

$akoinputforum .= "<a name='akocomment'></a>";
موفق باشید


سلام
تشکر از زحمات شما ، تغییرات صورت گرفت اما نتیجه ای در بر نداشت!

کد تغییر یافته ی: akocomment.php - لاین 226



<?php
/**
* AkoComment - A User Comments Component
* @version 2.0 (v1.13) security fix BEAT
* @package AkoComment
* Tweaked version Modified by Artistworks.net
* Removed alert message by Artistworks.net
* Hacks by - Benjamin Samson - <b><font color=red>فقط کاربران عضو انجمن می توانند لینک ها را مشاهده کنند</font></b>
* Spamfix by Dominik Paulus - <b><font color=red>فقط کاربران عضو انجمن می توانند لینک ها را مشاهده کنند</font></b>
* Wrong Security code by Mike H - //forum.joomla.org/index.php/topic,28644.120.html
* @copyright (C) 2004 by Arthur Konze - All rights reserved!
* @license <b><font color=red>فقط کاربران عضو انجمن می توانند لینک ها را مشاهده کنند</font></b> Copyrighted Commercial Software
**/

/**
*
* AkoComment Tweaked Special Edition - by visualclinic.fr
* ADD :
* - RSS on comments
* - Quote this article by copy/paste code
* - some features for layout
* - Favoured
*
**/

# Don&#039;t allow direct linking
defined( &#039;_VALID_MOS&#039; ) or die( &#039;Direct Access to this location is not allowed.&#039; );

# Get the right language if it exists
if (file_exists($mosConfig_absolute_path.&#039;/components/com_akocomment/languages/&#039;.$mosConfig_lang.&#039;.php&#039;)) {
include($mosConfig_absolute_path.&#039;/components/com_akocomment/languages/&#039;.$mosConfig_lang.&#039;.php&#039;);
} else {
include($mosConfig_absolute_path.&#039;/components/com_akocomment/languages/english.php&#039;);
}

$limitmore = intval( mosGetParam( $_GET, &quot;limit&quot;, 30 ));
$fid = intval( mosGetParam( $_GET, &quot;favid&quot;, 0 ));
$id = intval( mosGetParam( $_GET, &quot;id&quot;, 0 ));
$cid = intval( mosGetParam( $_GET, &quot;cid&quot;, 0 ));

switch ($task) {

case &quot;quote&quot;:
showQuote( $option ) ;
break;

case &#039;feed&#039;:
loadFeed( $option ) ;
break;

case &#039;favoured&#039;:
saveFavoured( $option ) ;
break;

case &#039;removefav&#039;:
removeFavoured( $option, $fid ) ;
break;

case &#039;myfavoured&#039;:
myFavoured ( $option, $limitmore ) ;
break;

case &#039;morefav&#039;:
// Call by module &quot;ac_mostfavoured&quot; or by menu link url : ex. index.php?option=akocomment&amp;task=morefav
moreFavoured ( $option, $limitmore ) ;
break;

case &#039;report&#039;:
report( $option, $id, $cid ) ;
break;

default:
comment( $option );
break;

}

function comment($option){
global $database, $mosConfig_live_site, $mosConfig_absolute_path, $mosConfig_fromname, $my, $mainframe;

//BBTEMPFIX:
$acitemid = intval( mosGetParam( $_POST, &#039;acitemid&#039;, 999999 ) );
$contentid = intval( mosGetParam( $_POST, &#039;contentid&#039;, 0 ) );
$title = mosGetParam( $_POST, &#039;title&#039; );
$comment = mosGetParam( $_POST, &#039;comment&#039;, &#039;&#039; );
$acname = mosGetParam( $_POST, &#039;acname&#039; );
$email = mosGetParam( $_POST, &#039;email&#039;, &#039;&#039; );
$web = trim( mosGetParam( $_POST, &#039;web&#039;, &#039;&#039; ) );
$func = trim( mosGetParam( $_POST, &#039;func&#039;, &#039;&#039; ) );

$subscribe = intval( mosGetParam( $_POST, &#039;subscribe&#039;, 0 ) );

//$acname = $database-&gt;getEscaped( trim( $acname ) );
//$title = $database-&gt;getEscaped( trim( $title ) );
$web = $database-&gt;getEscaped( trim( strtolower( $web ) ) );
$email = $database-&gt;getEscaped( trim( strtolower( $email ) ) );
$iduser = (int) mosGetParam( $_POST, &quot;iduser&quot;, &#039;0&#039; );

# Added following one extra line to make the security images solution by DPaulus to work - Reind Dooyeweerd
$akocode = mosGetParam( $_POST, &quot;akocode&quot; );
//end of BBTEMPFIX

# Variables - Don&#039;t change anything here!!!
require_once($mosConfig_absolute_path.&quot;/administrator/components/com_akocomment/config.akocomment.php&quot;);

# Check if email adress is right
function is_email($email){
$rBool=false;
if(preg_match(&quot;/[\w\.\-]+@\w+[\w\.\-]*?\.\w{1,4}/&quot;, $email)) {
$rBool=true;
}
return $rBool;
}

# Check for Editor rights
$is_editor = (strtolower($my-&gt;usertype) == &#039;editor&#039; || strtolower($my-&gt;usertype) == &#039;publisher&#039; || strtolower($my-&gt;usertype) == &#039;manager&#039; || strtolower($my-&gt;usertype) == &#039;administrator&#039; || strtolower($my-&gt;usertype) == &#039;super administrator&#039; );
$is_user = (strtolower($my-&gt;usertype) &lt;&gt; &#039;&#039;);

# Spamfix session
session_start(&#039;akocomcode&#039;);
$_SESSION[&#039;akocomment&#039;] = $comment;

# Spamfix: check for cookie and right code
if( (isset($_SESSION[&#039;code&#039;]) &amp;&amp; ($_SESSION[&#039;code&#039;] != &quot;&quot;) &amp;&amp; ($_SESSION[&#039;code&#039;] == $akocode)) || $ac_disable_securitycode==&#039;1&#039; ) {

# Check if timeout
$ac_timeout = ($ac_timeout==&#039;&#039;) ? 0 : intval($ac_timeout);
if ( $ac_timeout &gt; 0 ){
$date = date( &quot;Y-m-d H:i:s&quot; );
$ts = strtotime( $date );
$ip = getenv(&#039;REMOTE_ADDR&#039;);
$query = (&quot;SELECT ip, date FROM #__akocomment WHERE ip=&#039;$ip&#039; ORDER BY date DESC LIMIT 1&quot;);
$database-&gt;setQuery( $query );
$rows = $database-&gt;loadObjectList();
if ( $rows ) {
$row = $rows[0];
$lasttime = strtotime($row-&gt;date) + $ac_timeout;
if ( $lasttime &gt; $ts ){
$rest = $lasttime - $ts;
echo &quot;&lt;script&gt; alert(&#039;Wait... &quot;.$rest.&quot; seconds&#039;); history.back();&lt;/script&gt;&quot;;
exit();
}
}
}

# Check if Registered Users only
if ( $ac_anonentry==&#039;0&#039; &amp;&amp; $is_user==&#039;&#039; ) {
echo &quot;&lt;script&gt;alert(&#039;&quot;._AKOCOMMENT_ONLYREGISTERED.&quot; &#039;); document.location.href=&#039;&quot;.sefRelToAbs(&quot;index.php?o ption=content&amp;task=view&amp;id=$contentid&quot;).&quot;&#039;;&lt;/script&gt;&quot;;
} else {

if (!ereg(&#039;<b><font color=red>فقط کاربران عضو انجمن می توانند لینک ها را مشاهده کنند</font></b>;, $web) &amp;&amp; $web!=&#039;&#039;){
$web = &#039;<b><font color=red>فقط کاربران عضو انجمن می توانند لینک ها را مشاهده کنند</font></b>;.$web;
}

# Send out admin mail
if ($ac_notify &amp;&amp; is_email($ac_notify_email) ) {

$query1 = (&quot;SELECT title FROM #__content WHERE id=&#039;$contentid&#039;&quot;);
$database-&gt;setQuery( $query1 );
$rowTitle = $database-&gt;loadResult();

$articlelink = sefRelToAbs($mosConfig_live_site.&#039;/index.php?option=com_content&amp;task=view&amp;id=&#039;.$conte ntid.&#039;&amp;Itemid=&#039;.$acitemid);
$acmailtext = _AKOCOMMENT_ADMINMAIL . &#039;&lt;br/&gt;&lt;br/&gt;&#039;;
$acmailtext .= &#039;&lt;b&gt;&#039;._AKOCOMMENT_ENTERNAME.&#039;: &lt;/b&gt;&#039;.$acname.&#039;&lt;br/&gt;&#039;;
if ($email != &#039;&#039;) $acmailtext .= &#039;&lt;b&gt;&#039;._AKOCOMMENT_ENTERMAIL.&#039;: &lt;/b&gt;&lt;a href=&quot;mailto:&#039;.$email.&#039;&quot;&gt;&#039;.$email.&#039;&lt;/a&gt;&lt;br/&gt;&#039;;
if ($web != &#039;&#039;) $acmailtext .= &#039;&lt;b&gt;Web: &lt;/b&gt;&lt;a href=&quot;&#039;.$web.&#039;&quot;&gt;&#039;.$web.&#039;&lt;/a&gt;&lt;br/&gt;&#039;;
$acmailtext .= &#039;&lt;b&gt;&#039; . _AKOCOMMENT_ENTERTITLE . &#039; &lt;/b&gt;&#039;.$title.&#039;&lt;br/&gt;&#039;;
$acmailtext .= &#039;&lt;b&gt;&#039; ._AKOCOMMENT_ENTERTEXT . &#039; &lt;/b&gt;&#039;.$comment.&#039;&lt;br/&gt;&lt;br/&gt;&#039;;
$acmailtext .= &#039;&lt;b&gt;&#039; . $rowTitle . &#039; &lt;/b&gt;&lt;br/&gt;&#039;;
$acmailtext .= &#039;&lt;a href=&quot;&#039; . $articlelink.&#039;&quot;&gt;&#039; . $articlelink . &#039;&lt;/a&gt;&lt;br/&gt;&lt;br/&gt;&#039;;
$acmailtext .= _AKOCOMMENT_ADMINMAILFOOTER;

$headers = &#039;MIME-Version: 1.0&#039; . &#039;\n&#039;;
//$headers .= &#039;Content-type: text/html; charset=iso-8859-1&#039; . &#039;\n&#039;;
$headers .= &#039;Content-type: text/html; &#039; . utf-8 . &#039;\n&#039;;
$headers .= &#039;From: &#039; . $ac_notify_email;
mail($ac_notify_email,_AKOCOMMENT_ADMINMAILHEADER, $acmailtext,$headers);
}

# Clear any HTML and SQL injections
$title = strip_tags($title);
$comment = strip_tags($comment);
$title = mysql_escape_string($title);
$comment = mysql_escape_string($comment);

# Perform database query
$date = date( &quot;Y-m-d H:i:s&quot; );
$ip = getenv(&#039;REMOTE_ADDR&#039;);
$query2 = &quot;INSERT INTO #__akocomment SET contentid=&#039;$contentid&#039;, ip=&#039;$ip&#039;, name=&#039;$acname&#039;, web=&#039;$web&#039;, email=&#039;$email&#039;, title=&#039;$title&#039;, comment=&#039;$comment&#039;, date=&#039;$date&#039;, published=&#039;$ac_autopublish&#039;, iduser=&#039;$iduser&#039;, subscribe=&#039;$subscribe&#039;;&quot;; // modify by bpixel (add &quot;web=&#039;$web&#039;, email=&#039;$email&#039;,&quot; ) Modified by visualclinic.fr (add &quot;, iduser=&#039;$iduser&#039;, subscribe=&#039;$subscribe&#039;&quot;)
$database-&gt;setQuery( $query2 );
$database-&gt;query();

unset($_SESSION[&#039;akocomment&#039;]);

if ( $ac_displaycheckboxcontact ){
// SUBSCRIBES ALERT NEW COMMENT /////////////////////////////////////////////////
// Check if item article have comments with alert mail
$query = &quot;SELECT DISTINCTROW email FROM #__akocomment WHERE contentid = &#039;$contentid &#039; AND subscribe=&#039;1&#039; AND email &lt;&gt; &#039;$email&#039; ORDER BY date DESC&quot;;
$database-&gt;setQuery( $query );
$rows = $database-&gt;loadObjectList();
if ( $rows ){
// build mail
$acmailtext = &quot;&quot;;
$acmailtext = _AKOCOMMENT_SUBSCRIBEMAILHEADER . &quot;&lt;br /&gt;&quot; ;
$articlelink = sefRelToAbs($mosConfig_live_site.&#039;/index.php?option=com_content&amp;task=view&amp;id=&#039;.$conte ntid.&#039;&amp;Itemid=&#039;.$acitemid);
$acmailtext .= &#039;&lt;a href=&quot;&#039;.$articlelink.&#039;&quot;&gt;&#039;.$articlelink.&#039;&lt;/a&gt;&lt;br/&gt;&lt;br/&gt;&#039;;
$acmailtext .= _AKOCOMMENT_SUBSCRIBEMAILFOOTER;

$headers = &#039;MIME-Version: 1.0&#039; . &quot;\n&quot;;
//$headers .= &#039;Content-type: text/html; charset=iso-8859-1&#039; . &quot;\n&quot;;
$headers .= &#039;Content-type: text/html; &#039; . utf-8 . &#039;\n&#039;;
$headers .= &#039;From: &#039; . $ac_notify_email; //$mosConfig_fromname;

foreach ( $rows as $row ) {
// send email
mail( $row-&gt;email, _AKOCOMMENT_SUBSCRIBEMAILHEADER, $acmailtext, $headers );
}
}
}
# Check if new window or not
$msg = ( $ac_autopublish ) ? _AKOCOMMENT_SAVED : _AKOCOMMENT_SAVED4UNPUBLISHED ;

mosCache::cleanCache( &quot;com_content&quot; );
mosCache::cleanCache( &quot;com_alphacontent&quot; );

if ( $ac_openingmode ){
header(&quot;location:$mosConfig_live_site/index2.php?option=com_content&amp;task=view&amp;id=$conten tid&amp;pop=1&amp;page=0&amp;mosmsg=&quot;.$msg.&quot;#akocomment&quot; );
} else {
header(&quot;location:$mosConfig_live_site/index.php?option=com_content&amp;task=view&amp;id=$content id&amp;Itemid=$acitemid&amp;mosmsg=&quot;.$msg.&quot;#akocomment&quot; );
}
}
# Spamfix: wrong code
}else {
echo &quot;&lt;script&gt; alert(&#039;&quot;._AKOCOMMENT_CODEWRONG.&quot;&#039;); history.back();&lt;/script&gt;&quot;;
}
}


// Add by visualclinic.fr
function showquote( $option ){
global $database, $mosConfig_live_site, $mosConfig_sitename, $mainframe, $Itemid, $_VERSION;

$id = trim( mosGetParam( $_REQUEST, &#039;id&#039;, 0 ) );
$thequote = sefRelToAbs(&quot;index.php?option=com_content&amp;task=vie w&amp;id=$id&amp;Itemid=$Itemid&quot;);
$copyNow = date(&#039;Y&#039;);

$query = &quot;SELECT title FROM #__content WHERE id = &#039;$id&#039;&quot;;
$database-&gt;setQuery( $query );
$title = $database-&gt;loadResult();

// look for images in template if available
$img = &quot;&quot;;
if ( $_VERSION-&gt;PRODUCT == &#039;Joomla!&#039; ){
$ImageArrow = mosAdminMenus::ImageCheck( &#039;arrow.png&#039;, &#039;/images/M_images/&#039; );
}else{
// FOR COMPLIANCE WITH MAMBO
$ImageArrow = $mainframe-&gt;ImageCheck( &#039;arrow.png&#039;, &#039;/images/M_images/&#039; );
}
$img .= $ImageArrow;

$ac_style4quote = &quot;&lt;style type=\&quot;text/css\&quot;&gt;&quot;
.&quot;\n&lt;!--&quot;
.&quot;\n.quote {width:350px; padding: 6px; border: solid 1px #456B8F; font: 10px helvetica, verdana, sans-serif; color: #222222; background-color: #ffffff}&quot;
.&quot;\n.quote a {font: 13px arial, serif; color: #003399; text-decoration: underline}&quot;
.&quot;\n.quote a:hover {color: #FF9900; }&quot;
.&quot;\n--&gt;&quot;
.&quot;\n&lt;/style&gt;&quot;;

echo _AKOCOMMENT_QUOTETHISARTICLE;
echo &quot;&lt;br /&gt;&lt;br /&gt;&quot;;
echo &quot;&lt;div class=&#039;contentheading&#039;&gt;&quot;.$title.&quot;&lt;/div&gt;&quot;;
echo &quot;&lt;br /&gt;&quot;;
echo &quot;&lt;strong&gt;&quot;._AKOCOMMENT_CREATELINK.&quot;&lt;/strong&gt;&quot;;
echo &quot;&lt;br /&gt;&lt;br /&gt;&quot;;
?&gt;
&lt;textarea name=&quot;textarea&quot; cols=&quot;60&quot; rows=&quot;6&quot;&gt;&lt;?php echo $ac_style4quote; ?&gt;&lt;div class=&quot;quote&quot;&gt;&lt;a href=&quot;&lt;?php echo $thequote; ?&gt;&quot; target=&quot;_blank&quot;&gt;&lt;?php echo $title; ?&gt;&lt;/a&gt;&lt;br /&gt;&lt;?php echo $mosConfig_sitename; ?&gt; - &lt;?php echo mosCurrentDate(); ?&gt;&lt;br /&gt;&lt;div align=&quot;right&quot;&gt;&amp;copy; &lt;a href=&quot;&lt;?php echo $mosConfig_live_site; ?&gt;&quot; target=&quot;_blank&quot;&gt;&lt;?php echo $mosConfig_sitename; ?&gt;&lt;/a&gt;&lt;/div&gt;&lt;/div&gt;
&lt;/textarea&gt;
&lt;?php
echo &quot;&lt;br /&gt;&lt;br /&gt;&quot;;
echo _AKOCOMMENT_PREVIEWQUOTE;
echo &quot;&lt;br /&gt;&lt;br /&gt;&quot;;
$thedate = mosCurrentDate();
echo $ac_style4quote;
echo &quot;\n&lt;div class=\&quot;quote\&quot;&gt;&lt;a href=\&quot;$thequote\&quot; target=\&quot;_blank\&quot;&gt;$title&lt;/a&gt;&quot;
.&quot;\n&lt;br /&gt;$mosConfig_sitename - $thedate&lt;br /&gt;&quot;
.&quot;\n&lt;div align=\&quot;right\&quot;&gt;$copyNow &amp;copy; &lt;a href=\&quot;$mosConfig_live_site\&quot; target=\&quot;_blank\&quot;&gt;$mosConfig_sitename&lt;/a&gt;&lt;/div&gt;&lt;/div&gt;&quot;;
echo &quot;&lt;br /&gt;&quot;;
echo $img;
echo &quot; &lt;a href=\&quot;javascript:onclick=history.back();\&quot; &gt;&quot; . _AKOCOMMENT_GOBACKITEM . &quot;&lt;/a&gt;&quot;;
}

// Add by visualclinic.fr
function saveFavoured( $option ){
global $database, $mosConfig_live_site, $mosConfig_sitename, $mosConfig_absolute_path, $mainframe, $my, $limitmore, $Itemid, $_VERSION;

require_once($mosConfig_absolute_path.&quot;/administrator/components/com_akocomment/config.akocomment.php&quot;);

$is_user = (strtolower($my-&gt;usertype) &lt;&gt; &#039;&#039;);

$id = intval( mosGetParam( $_REQUEST, &#039;id&#039;, 0 ) );
$goItem = sefRelToAbs(&quot;index.php?option=com_content&amp;task=vie w&amp;id=&quot;);
$ip = getenv(&#039;REMOTE_ADDR&#039;);

// Check already favoured
$query = &quot;SELECT * FROM #__akocomment_favoured WHERE id_content = &#039;$id&#039; AND ip=&#039;$ip&#039;&quot;;
$database-&gt;setQuery( $query );
$alreadyfav = $database-&gt;loadResult();

if ( $alreadyfav ) {
$msg = _AKOCOMMENT_YOUHAVEFAVOUREDTHISARTICLE;
} elseif ( $ac_favoured_user==&#039;1&#039; &amp;&amp; $is_user==&#039;&#039; ) {
$msg = _AKOCOMMENT_FAVOUREDONLYREGISTERED;
} else {
$id_user = $my-&gt;id;
$date = date( &quot;Y-m-d H:i:s&quot; );
$query = &quot;INSERT INTO #__akocomment_favoured SET id_content=&#039;$id&#039;, id_user=&#039;$id_user&#039;, ip=&#039;$ip&#039;, date=&#039;$date&#039;&quot;;
$database-&gt;setQuery( $query );
$database-&gt;query();
$msg = _AKOCOMMENT_THANKFAVOURED;
}

// look for images in template if available
$img = &quot;&quot;;
if ( $_VERSION-&gt;PRODUCT == &#039;Joomla!&#039; ){
$ImageArrow = mosAdminMenus::ImageCheck( &#039;arrow.png&#039;, &#039;/images/M_images/&#039; );
}else{
// FOR COMPLIANCE WITH MAMBO
$ImageArrow = $mainframe-&gt;ImageCheck( &#039;arrow.png&#039;, &#039;/images/M_images/&#039; );
}
$img .= $ImageArrow;

// DISPLAY FAVOURED
echo &quot;&lt;div class=&#039;contentheading&#039;&gt;&quot;.$msg .&quot;&lt;/div&gt;&quot;;
echo &quot;&lt;br /&gt;&quot;;
echo _AKOCOMMENT_WHATYOUWANT;
echo &quot;&lt;br /&gt;&lt;br /&gt;&quot;;
echo $img;
echo &quot; &lt;a href=\&quot;javascript:onclick=history.back();\&quot; &gt;&quot; . _AKOCOMMENT_GOBACKITEM . &quot;&lt;/a&gt;&quot;;
echo &quot;&lt;br /&gt;&quot;;
echo $img;
echo &quot; &lt;a href=\&quot;index.php\&quot; &gt;&quot; . _AKOCOMMENT_GOHOME . &quot;&lt;/a&gt;&quot;;
echo &quot;&lt;br /&gt;&lt;br /&gt;&quot;;
echo _AKOCOMMENT_YOURFAVOURED;
echo &quot;&lt;br /&gt;&quot;;

$query = &quot;SELECT COUNT(af.id) AS favourite, af.id_content, c.title AS title, c.sectionid AS sectionid FROM #__akocomment_favoured AS af, #__content AS c WHERE c.id = af.id_content AND (c.state = &#039;1&#039; OR c.state = &#039;-1&#039;) GROUP BY af.id_content ORDER BY favourite DESC LIMIT $ac_numfavoured&quot;;
$database-&gt;setQuery( $query );
$rows = $database-&gt;loadObjectList();
if ( count($rows) ){
foreach ( $rows as $row ) {
# Get Itemid
if ( $row-&gt;sectionid ) {
$bs = $mainframe-&gt;getBlogSectionCount();
$bc = $mainframe-&gt;getBlogCategoryCount();
$gbs = $mainframe-&gt;getGlobalBlogSectionCount();
$Itemid = $mainframe-&gt;getItemid( $row-&gt;id_content, 0, 0, $bs, $bc, $gbs );
} else {
$query = &quot;SELECT id&quot;
. &quot;\n FROM #__menu&quot;
. &quot;\n WHERE type = &#039;content_typed&#039;&quot;
. &quot;\n AND componentid = $row-&gt;id_content&quot;
;
$database-&gt;setQuery( $query );
$Itemid = $database-&gt;loadResult();
}
// Blank itemid checker for SEF
if ($Itemid == NULL) {
$Itemid = &#039;&#039;;
} else {
$Itemid = &#039;&amp;amp;Itemid=&#039;. $Itemid;
}
echo &quot;&lt;br /&gt;&quot;;
echo $img;
echo &quot; &lt;a href=&#039;&quot;.$goItem.$row-&gt;id_content.$Itemid.&quot;&#039;&gt;&quot;.$row-&gt;title.&quot;&lt;/a&gt;&quot;;
}
}

if ( $my-&gt;id ) {
# Get Itemid for my favourites
$database-&gt;setQuery(&quot;SELECT id FROM #__menu&quot;
. &quot;\nWHERE link=&#039;index.php?option=com_akocomment&amp;task=myfavou red&#039;&quot;
. &quot;\nAND type=&#039;url&#039;&quot;
. &quot;\nAND published=&#039;1&#039;&quot;
. &quot;\nLIMIT 1&quot;);
$Itemid = $database-&gt;loadResult();
// Blank itemid checker for SEF
if ($Itemid == NULL) {
$Itemid = &#039;&#039;;
} else {
$Itemid = &#039;&amp;amp;Itemid=&#039;. $Itemid;
}
echo &quot;&lt;br /&gt;&lt;br /&gt;&quot;;
echo _AKOCOMMENT_YOURFAVOUREDUSER . &quot; ( &lt;a href=&#039;index.php?option=com_akocomment&amp;task=myfavou red$Itemid&#039;&gt;&quot; . $my-&gt;name . &quot;&lt;/a&gt; )&quot;;
}

}

// Add by visualclinic.fr
// Call by module &quot;ac_mostfavoured&quot; or by menu url : ex. index.php?option=akocomment&amp;task=morefav
function moreFavoured( $option, $limitmore ){
global $database, $mosConfig_live_site, $mosConfig_sitename, $mosConfig_absolute_path, $mainframe, $my, $Itemid, $_VERSION;

require_once($mosConfig_absolute_path.&quot;/administrator/components/com_akocomment/config.akocomment.php&quot;);

//$goItem = sefRelToAbs(&quot;index.php?option=com_content&amp;task=vie w&amp;id=&quot;);
$goItem = &quot;index.php?option=com_content&amp;task=view&amp;id=&quot;;

// look for images in template if available
$img = &quot;&quot;;
if ( $_VERSION-&gt;PRODUCT == &#039;Joomla!&#039; ){
$ImageArrow = mosAdminMenus::ImageCheck( &#039;arrow.png&#039;, &#039;/images/M_images/&#039; );
}else{
// FOR COMPLIANCE WITH MAMBO
$ImageArrow = $mainframe-&gt;ImageCheck( &#039;arrow.png&#039;, &#039;/images/M_images/&#039; );
}
$img .= $ImageArrow;

// DISPLAY MORE FAVOURED
echo &quot;&lt;div class=&#039;contentheading&#039;&gt;&quot; . _AKOCOMMENT_YOURFAVOURED . &quot;&lt;/div&gt;&quot;;
echo &quot;&lt;br /&gt;&quot;;

$query = &quot;SELECT COUNT(af.id) AS favourite, af.id_content, c.title AS title, c.sectionid AS sectionid FROM #__akocomment_favoured AS af, #__content AS c WHERE c.id = af.id_content AND (c.state = &#039;1&#039; OR c.state = &#039;-1&#039;) GROUP BY af.id_content ORDER BY favourite DESC LIMIT $limitmore&quot;;
$database-&gt;setQuery( $query );
$rows = $database-&gt;loadObjectList();
if ( count($rows) ){
foreach ( $rows as $row ) {
# Get Itemid
if ( $row-&gt;sectionid ) {
$bs = $mainframe-&gt;getBlogSectionCount();
$bc = $mainframe-&gt;getBlogCategoryCount();
$gbs = $mainframe-&gt;getGlobalBlogSectionCount();
$Itemid = $mainframe-&gt;getItemid( $row-&gt;id_content, 0, 0, $bs, $bc, $gbs );
} else {
$query = &quot;SELECT id&quot;
. &quot;\n FROM #__menu&quot;
. &quot;\n WHERE type = &#039;content_typed&#039;&quot;
. &quot;\n AND componentid = $row-&gt;id_content&quot;
;
$database-&gt;setQuery( $query );
$Itemid = $database-&gt;loadResult();
}
// Blank itemid checker for SEF
if ($Itemid == NULL) {
$Itemid = &#039;&#039;;
} else {
$Itemid = &#039;&amp;amp;Itemid=&#039;. $Itemid;
}
echo $img;
echo &quot; &lt;a href=&#039;&quot;.sefRelToAbs($goItem.$row-&gt;id_content.$Itemid).&quot;&#039;&gt;&quot;.$row-&gt;title.&quot;&lt;/a&gt;&lt;br /&gt;&quot;;
}
}

if ( $my-&gt;id ) {
# Get Itemid for my favourites
$database-&gt;setQuery(&quot;SELECT id FROM #__menu&quot;
. &quot;\nWHERE link=&#039;index.php?option=com_akocomment&amp;task=myfavou red&#039;&quot;
. &quot;\nAND type=&#039;url&#039;&quot;
. &quot;\nAND published=&#039;1&#039;&quot;
. &quot;\nLIMIT 1&quot;);
$Itemid = $database-&gt;loadResult();
// Blank itemid checker for SEF
if ($Itemid == NULL) {
$Itemid = &#039;&#039;;
} else {
$Itemid = &#039;&amp;amp;Itemid=&#039;. $Itemid;
}
echo &quot;&lt;br /&gt;&lt;br /&gt;&quot;;
echo _AKOCOMMENT_YOURFAVOUREDUSER . &quot; ( &lt;a href=&#039;index.php?option=com_akocomment&amp;task=myfavou red$Itemid&#039;&gt;&quot; . $my-&gt;name . &quot;&lt;/a&gt; )&quot;;
}

}

// Add by visualclinic.fr
function myFavoured( $option, $limitmore ){
global $database, $mosConfig_live_site, $mosConfig_sitename, $mosConfig_absolute_path, $mainframe, $my, $Itemid, $_VERSION;

require_once($mosConfig_absolute_path.&quot;/administrator/components/com_akocomment/config.akocomment.php&quot;);
$Itemid4myfavoured = $Itemid;

// Call menu url : ex. index.php?option=akocomment&amp;task=myfavoured

// DISPLAY MY FAVOURED
echo &quot;&lt;div class=&#039;contentheading&#039;&gt;&quot; . _AKOCOMMENT_YOURFAVOUREDUSER . &quot;&lt;/div&gt;&quot;;
echo &quot;&lt;br /&gt;&quot;;

if ( $my-&gt;id ) {
//$goItem = sefRelToAbs(&quot;index.php?option=com_content&amp;task=vie w&amp;id=&quot;);
$goItem = &quot;index.php?option=com_content&amp;task=view&amp;id=&quot;;

// look for images in template if available
$img = &quot;&quot;;
if ( $_VERSION-&gt;PRODUCT == &#039;Joomla!&#039; ){
$ImageArrow = mosAdminMenus::ImageCheck( &#039;arrow.png&#039;, &#039;/images/M_images/&#039; );
}else{
// FOR COMPLIANCE WITH MAMBO
$ImageArrow = $mainframe-&gt;ImageCheck( &#039;arrow.png&#039;, &#039;/images/M_images/&#039; );
}
$img .= $ImageArrow;

$query = &quot;SELECT af.id AS favid, af.id_content, c.title AS title, c.sectionid AS sectionid FROM #__akocomment_favoured AS af, #__content AS c WHERE c.id = af.id_content AND af.id_user = &#039;$my-&gt;id&#039; AND (c.state = &#039;1&#039; OR c.state = &#039;-1&#039;) ORDER BY date DESC&quot;;
$database-&gt;setQuery( $query );
$rows = $database-&gt;loadObjectList();
if ( count($rows) ) {
foreach ( $rows as $row )
{
# Get Itemid
if ( $row-&gt;sectionid ) {
$bs = $mainframe-&gt;getBlogSectionCount();
$bc = $mainframe-&gt;getBlogCategoryCount();
$gbs = $mainframe-&gt;getGlobalBlogSectionCount();
$Itemid = $mainframe-&gt;getItemid( $row-&gt;id_content, 0, 0, $bs, $bc, $gbs );
} else {
$query = &quot;SELECT id&quot;
. &quot;\n FROM #__menu&quot;
. &quot;\n WHERE type = &#039;content_typed&#039;&quot;
. &quot;\n AND componentid = $row-&gt;id_content&quot;
;
$database-&gt;setQuery( $query );
$Itemid = $database-&gt;loadResult();
}
// Blank itemid checker for SEF
if ($Itemid == NULL) {
$Itemid = &#039;&#039;;
} else {
$Itemid = &#039;&amp;amp;Itemid=&#039;. $Itemid;
}

echo $img;
echo &quot; &lt;a href=&#039;&quot;.sefRelToAbs($goItem.$row-&gt;id_content.$Itemid).&quot;&#039;&gt;&quot;.$row-&gt;title.&quot;&lt;/a&gt; (&lt;a href=&#039;index.php?option=com_akocomment&amp;task=removef av&amp;favid=&quot;.$row-&gt;favid.&quot;&amp;Itemid=$Itemid4myfavoured&#039;&gt;&quot;._AKOCOMMENT_ FAVOUREDREMOVE.&quot;&lt;/a&gt;)&lt;br /&gt;&quot;;
}
}else{
echo _AKOCOMMENT_NOFAVOURED;
}
} else {
// if menu url... and not login
echo _AKOCOMMENT_FAVOUREDUSERMUSTLOGIN;
}
}

// Add by visualclinic.fr
function removeFavoured( $option, $fid ){
global $database, $Itemid;

$query = &quot;DELETE FROM #__akocomment_favoured&quot;
. &quot;\n WHERE id = &#039;$fid&#039;&quot;
;
$database-&gt;setQuery( $query );
if (!$database-&gt;query()) {
echo &quot;&lt;script&gt; alert(&#039;&quot;.$database-&gt;getErrorMsg().&quot;&#039;); window.history.go(-1); &lt;/script&gt;\n&quot;;
}

mosRedirect( &quot;index.php?option=$option&amp;task=myfavoured&amp;Itemid=$ Itemid&quot; );

}

// Add by visualclinic.fr
function loadFeed( $option ){
global $database, $mosConfig_live_site, $mosConfig_absolute_path, $mosConfig_sitename, $mosConfig_cachepath, $mosConfig_MetaDesc, $mainframe;

// Load feed creator class
require_once( $mosConfig_absolute_path .&#039;/includes/feedcreator.class.php&#039; );
// Load variables
require_once($mosConfig_absolute_path.&quot;/administrator/components/com_akocomment/config.akocomment.php&quot;);

$iso = split( &#039;=&#039;, _ISO );

$rssfile = $mosConfig_cachepath .&#039;/comments.xml&#039;;

$rss = new UniversalFeedCreator();
$rss-&gt;title = $mosConfig_sitename . &quot; - &quot; . _AKOCOMMENT_RSS_LASTCOMMENTS;
$rss-&gt;description = $mosConfig_MetaDesc;
$rss-&gt;link = htmlspecialchars( $mosConfig_live_site );
$rss-&gt;syndicationURL = htmlspecialchars( $mosConfig_live_site );
$rss-&gt;cssStyleSheet = NULL;
$rss-&gt;encoding = $iso[1];

$database-&gt;setQuery( &quot;SELECT ak.*, UNIX_TIMESTAMP( ak.date ) AS created_ts, c.id AS id_content, c.title AS titlearticle, c.sectionid AS sectionid&quot;
. &quot;\nFROM #__akocomment AS ak&quot;
. &quot;\nLEFT JOIN #__content AS c ON c.id = ak.contentid&quot;
. &quot;\nWHERE ak.published=&#039;1&#039;&quot;
. &quot;\nORDER BY ak.id DESC&quot;
. &quot;\nLIMIT $ac_numrssfeed&quot;
);

$rows = $database-&gt;loadObjectList();

foreach ( $rows as $row ) {
if ( $row-&gt;sectionid ) {
$bs = $mainframe-&gt;getBlogSectionCount();
$bc = $mainframe-&gt;getBlogCategoryCount();
$gbs = $mainframe-&gt;getGlobalBlogSectionCount();
$Itemid = $mainframe-&gt;getItemid( $row-&gt;id_content, 0, 0, $bs, $bc, $gbs );
} else {
$query = &quot;SELECT id&quot;
. &quot;\n FROM #__menu&quot;
. &quot;\n WHERE type = &#039;content_typed&#039;&quot;
. &quot;\n AND componentid = $row-&gt;id_content&quot;
;
$database-&gt;setQuery( $query );
$Itemid = $database-&gt;loadResult();
}
// Blank itemid checker for SEF
if ($Itemid == NULL) {
$Itemid = &#039;&#039;;
} else {
$Itemid = &#039;&amp;amp;Itemid=&#039;. $Itemid;
}
$item = new FeedItem();
$item-&gt;title = htmlspecialchars( $row-&gt;titlearticle );
$item-&gt;title = html_entity_decode( $item-&gt;title );
$item-&gt;title = _AKOCOMMENT_RSS_COMMENTON . &quot; &quot; . $item-&gt;title . &quot; (&quot; . _AKOCOMMENT_WRITTENBY . &quot; &quot; . $row-&gt;name . &quot;)&quot;;
$item-&gt;link = sefRelToAbs(&quot;index.php?option=com_content&amp;task=vie w&amp;id=$row-&gt;contentid$Itemid#akocomment$row-&gt;id&quot;);
$item-&gt;description = ( $row-&gt;title!=&#039;&#039; ) ? $row-&gt;title : $row-&gt;comment ;
$item-&gt;description = mosHTML::cleanText( $item-&gt;description );
$item-&gt;description = html_entity_decode( $item-&gt;description );
// limits description text to 10 words
$item_description_array = split( &#039; &#039;, $item-&gt;description );
$count = count( $item_description_array );
if ( $count &gt; 10 ){
$item-&gt;description = &#039;&#039;;
for ( $a = 0; $a &lt; $info[ &#039;text_length&#039; ]; $a++ ) {
$item-&gt;description .= $item_description_array[$a]. &#039; &#039;;
}
$item-&gt;description = trim( $item-&gt;description );
$item-&gt;description .= &#039;...&#039;;
}
$item-&gt;description = $row-&gt;name . &quot; &gt; &quot; . $item-&gt;description . &quot; &lt;a href=&#039;&quot;. sefRelToAbs(&quot;index.php?option=com_content&amp;task=vie w&amp;id=$row-&gt;contentid$Itemid#akocomment$row-&gt;id&quot;).&quot;&#039;&gt;&quot; . _AKOCOMMENT_RSS_VIEWCOMMENT . &quot;&lt;/a&gt;&quot;;
$item-&gt;date = date( &#039;r&#039;, $row-&gt;created_ts );
$item-&gt;source = htmlspecialchars( $mosConfig_live_site );

$rss-&gt;addItem($item);
}
// save feed file
$rss-&gt;saveFeed(&#039;RSS2.0&#039;, $rssfile, 1);
}

// Add by visualclinic.fr
function report( $option, $id, $cid ){
global $database, $mosConfig_live_site, $mosConfig_absolute_path, $mainframe, $Itemid;

# Variables - Don&#039;t change anything here!!!
require_once($mosConfig_absolute_path.&quot;/administrator/components/com_akocomment/config.akocomment.php&quot;);

# Check if email adress is right
function is_email($email){
$rBool=false;
if(preg_match(&quot;/[\w\.\-]+@\w+[\w\.\-]*?\.\w{1,4}/&quot;, $email)) {
$rBool=true;
}
return $rBool;
}

if ( $_POST ){
$reportname = mosGetParam( $_POST, &#039;reportname&#039; );
$reportemail = mosGetParam( $_POST, &#039;reportemail&#039;, &#039;&#039; );
$reason = mosGetParam( $_POST, &#039;reason&#039; );
if ( is_email( $ac_report_email ) ){
// send email to administrator
$articlelink = $mosConfig_live_site.&#039;/index.php?option=com_content&amp;task=view&amp;id=&#039;.$id.&#039;&amp; Itemid=&#039;.$Itemid.&#039;#akocomment&#039;.$cid;
$acmailtext =_AKOCOMMENT_REPORTADMINEMAIL.&#039;&lt;br/&gt;&lt;br/&gt;&#039;;
if ($reportname != &#039;&#039;) $acmailtext .= &#039;&lt;b&gt;&#039;._AKOCOMMENT_ENTERNAME.&#039;: &lt;/b&gt;&#039;.$reportname.&#039;&lt;br/&gt;&#039;;
if ($reportemail != &#039;&#039;) $acmailtext .= &#039;&lt;b&gt;&#039;._AKOCOMMENT_ENTERMAIL.&#039;: &lt;/b&gt;&lt;a href=&quot;mailto:&#039;.$reportemail.&#039;&quot;&gt;&#039;.$reportemail.&#039;&lt;/a&gt;&lt;br/&gt;&#039;;
$acmailtext .= &#039;&lt;b&gt;&#039;._AKOCOMMENT_REASON_REPORT.&#039;: &lt;/b&gt;&#039;.$reason.&#039;&lt;br/&gt;&lt;br/&gt;&#039;;
$acmailtext .= &#039;&lt;b&gt;Article: &lt;/b&gt;&lt;a href=&quot;&#039;.$articlelink.&#039;&quot;&gt;&#039;.$articlelink.&#039;&lt;/a&gt;&lt;br/&gt;&lt;br/&gt;&#039;;
$headers = &#039;MIME-Version: 1.0&#039; . &quot;\r\n&quot;;
//$headers .= &#039;Content-type: text/html; charset=iso-8859-1&#039; . &quot;\r\n&quot;;
$headers .= &#039;Content-type: text/html; &#039; . _ISO . &#039;\n&#039;;
$headers .= &#039;From: &#039; . $ac_report_email;

mail ( $ac_report_email, _AKOCOMMENT_REPORTONCOMMENT, $acmailtext, $headers );
}
echo &quot;&lt;div class=&#039;contentheading&#039;&gt;&quot;._AKOCOMMENT_REPORTACOMMEN T.&quot;&lt;/div&gt;&lt;br /&gt;&quot;;
echo _AKOCOMMENT_THANKS4UREPORT .&quot;&lt;br /&gt;&lt;br /&gt;&quot;;
$gobackitem = sefRelToAbs(&quot;index.php?option=com_content&amp;task=vie w&amp;id=$id&amp;Itemid=$Itemid#akocomment$cid&quot;);
echo &quot;&lt;a href=&#039;$gobackitem&#039;&gt;&quot;. _AKOCOMMENT_GOBACKITEM . &quot;&lt;/a&gt;&quot;;
}else{
?&gt;
&lt;script language=&quot;JavaScript&quot; type=&quot;text/JavaScript&quot;&gt;
function validate(){
if (document.akocommentformreport.reason.value==&#039;&#039;){
alert(&quot;&lt;?php echo _AKOCOMMENT_FORMREPORTVALIDATE; ?&gt;&quot;);
} else {
document.akocommentformreport.submit();
}
}
&lt;/script&gt;
&lt;div class=&quot;contentheading&quot;&gt;&lt;?php echo _AKOCOMMENT_REPORTACOMMENT; ?&gt;&lt;/div&gt;&lt;br /&gt;
&lt;?php echo _AKOCOMMENT_REPORTINTRO; ?&gt;&lt;br /&gt;
&lt;?php echo _AKOCOMMENT_REPORTINTRO2; ?&gt;&lt;br /&gt;&lt;br /&gt;
&lt;form name=&quot;akocommentformreport&quot; method=&quot;post&quot; action=&quot;&quot;&gt;
&lt;table width=&quot;100%&quot; border=&quot;0&quot; cellspacing=&quot;2&quot; cellpadding=&quot;0&quot;&gt;
&lt;tr&gt;
&lt;td width=&quot;420&quot;&gt;&lt;div align=&quot;right&quot;&gt;&lt;?php echo _AKOCOMMENT_ENTERNAME; ?&gt;&lt;/div&gt;&lt;/td&gt;
&lt;td width=&quot;32&quot;&gt;&amp;nbsp;&lt;/td&gt;
&lt;td width=&quot;785&quot;&gt;&lt;input type=&quot;text&quot; name=&quot;reportname&quot; class=&quot;inputbox&quot;&gt;&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;&lt;div align=&quot;right&quot;&gt;&lt;?php echo _AKOCOMMENT_ENTERMAIL; ?&gt;&lt;/div&gt;&lt;/td&gt;
&lt;td&gt;&amp;nbsp;&lt;/td&gt;
&lt;td&gt;&lt;input type=&quot;text&quot; name=&quot;reportemail&quot; class=&quot;inputbox&quot;&gt;&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td valign=&quot;top&quot;&gt;&lt;div align=&quot;right&quot;&gt;&lt;?php echo _AKOCOMMENT_REASON_REPORT; ?&gt;&lt;/div&gt;&lt;/td&gt;
&lt;td&gt;&amp;nbsp;&lt;/td&gt;
&lt;td&gt;&lt;textarea name=&quot;reason&quot; cols=&quot;30&quot; rows=&quot;5&quot; class=&quot;inputbox&quot;&gt;&lt;/textarea&gt;&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;&lt;div align=&quot;right&quot;&gt;&lt;/div&gt;&lt;/td&gt;
&lt;td&gt;&amp;nbsp;&lt;/td&gt;
&lt;td&gt;&lt;input type=&quot;hidden&quot; name=&quot;task&quot; value=&quot;report&quot;&gt;
&lt;input type=&quot;hidden&quot; name=&quot;cid&quot; value=&quot;&lt;?php echo $cid; ?&gt;&quot;&gt;&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;&lt;div align=&quot;right&quot;&gt;&lt;/div&gt;&lt;/td&gt;
&lt;td&gt;&amp;nbsp;&lt;/td&gt;
&lt;td&gt;&lt;input type=&quot;button&quot; name=&quot;Submit&quot; value=&quot;&lt;?php echo _AKOCOMMENT_BUTTON_REPORT; ?&gt;&quot; class=&quot;button&quot; onClick=&quot;validate()&quot;&gt;&lt;/td&gt;
&lt;/tr&gt;
&lt;/table&gt;
&lt;/form&gt;
&lt;?php
# Load function library
require_once($mosConfig_absolute_path.&#039;/components/com_akocomment/functions.akocomment.php&#039;);
# Prepare smiley array
$smiley[&#039;:)&#039;] = &quot;sm_smile.gif&quot;; $smiley[&#039;:grin&#039;] = &quot;sm_biggrin.gif&quot;;
$smiley[&#039;;)&#039;] = &quot;sm_wink.gif&quot;; $smiley[&#039;8)&#039;] = &quot;sm_cool.gif&quot;;
$smiley[&#039;:p&#039;] = &quot;sm_razz.gif&quot;; $smiley[&#039;:roll&#039;] = &quot;sm_rolleyes.gif&quot;;
$smiley[&#039;:eek&#039;] = &quot;sm_bigeek.gif&quot;; $smiley[&#039;:upset&#039;] = &quot;sm_upset.gif&quot;;
$smiley[&#039;:zzz&#039;] = &quot;sm_sleep.gif&quot;; $smiley[&#039;:sigh&#039;] = &quot;sm_sigh.gif&quot;;
$smiley[&#039;:?&#039;] = &quot;sm_confused.gif&quot;; $smiley[&#039;:cry&#039;] = &quot;sm_cry.gif&quot;;
$smiley[&#039;:(&#039;] = &quot;sm_mad.gif&quot;; $smiley[&#039;:x&#039;] = &quot;sm_dead.gif&quot;;

$query = &quot;SELECT * FROM #__akocomment WHERE id = &#039;$cid&#039;&quot;;
$database-&gt;setQuery( $query );
$rows = $database-&gt;loadObjectList();


echo &quot;&lt;br /&gt;&lt;b&gt;&quot;._AKOCOMMENT_COMMENTINQUESTION.&quot;&lt;/b&gt;&quot;;

if ( $ac_showsinfieldset == &#039;0&#039; || $ac_showsinfieldset == &#039;1&#039; ) {
$fieldset = &quot;&quot;;
$endfieldset = &quot;&quot;;
$theclass = &quot;sectiontableentry1&quot;;
$linktoreport = &quot;&quot;;
foreach ( $rows as $row ) {
// if show in fieldset...
if ( $ac_showsinfieldset ) {
$fieldset = &quot;&lt;fieldset&gt;&quot;;
$endfieldset = &quot;&lt;/fieldset&gt;&quot;;
$theclass = &quot;&quot;;
}
$akocomments .= &quot;&lt;table width=&#039;100%&#039; border=&#039;0&#039; cellspacing=&#039;3&#039; cellpadding=&#039;3&#039;&gt;&quot;;
$akocomments .= &quot;&lt;tr class=&#039;&quot;.$theclass.&quot;&#039;&gt;&lt;td valign=&#039;top&#039;&gt;&quot;.$fieldset;

if ($row-&gt;title) {
$row-&gt;title = stripslashes($row-&gt;title);
$akocomments .= &quot;&lt;b&gt;$row-&gt;title&lt;/b&gt;&lt;br /&gt;&quot;;
}
$name = stripslashes($row-&gt;name);
// check if comment has an email
if ($row-&gt;email != &#039;&#039;){
$name = &quot;&lt;a href=\&quot;mailto:&quot;.$row-&gt;email.&quot;NOSPAM! \&quot;&gt;&quot;.$name.&quot;&lt;/a&gt;&quot;;
}
// check if comment has a website
if ($row-&gt;web != &#039;&#039;){
$name .= &quot; &lt;a href=&#039;&quot;.$row-&gt;web.&quot;&#039; target=&#039;_blank&#039;&gt;&lt;img src=&#039;components/com_akocomment/images/home.gif&#039; style=&#039;vertical-align:middle;&#039; border=&#039;0&#039; alt=&#039;website&#039; /&gt;&lt;/a&gt;&quot;;
}
$showIP = ( $ac_showip ) ? &quot;, IP: $row-&gt;ip&quot; : &quot;&quot; ;

$akocomments .= &quot;&lt;span class=&#039;small&#039;&gt;&quot;._AKOCOMMENT_WRITTENBY.&quot; &lt;b&gt;&quot;.$name.&quot;&lt;/b&gt;, &quot;._AKOCOMMENT_ON.&quot; &quot; . mosFormatDate( $row-&gt;date, $ac_fdate ) . &quot; &quot; . $showIP . &quot;&lt;/span&gt;&lt;br /&gt;&quot;;
$parsedcomment= AkoParse($row-&gt;comment, $smiley, $ac_bbcodesupport, $ac_picsupport, $ac_smiliesupport, $mosConfig_live_site);
$parsedcomment= textwrap($parsedcomment, $width = 60);
$akocomments .= &quot;$parsedcomment&quot;;
$akocomments .= $endfieldset.&quot;&lt;/td&gt;&lt;/tr&gt;&lt;/table&gt;&quot;;
echo $akocomments;
}

} else {

foreach ( $rows as $row ) {
// show comments in template
// CSS
echo &quot;&lt;link href=&#039;$mosConfig_live_site/components/com_akocomment/templates/$ac_showsinfieldset/css/template_css.css&#039; rel=&#039;stylesheet&#039; type=&#039;text/css&#039; /&gt;&quot;;
$web = &quot;&quot;;
$showIP = &quot;&quot;;
$type_user = &quot;&quot;;
$type_user = ( $row-&gt;iduser ) ? _AKOCOMMENT_REGISTERED : _AKOCOMMENT_GUEST ;
$shownumber = 0;
$statutUser = $ac_statutUser;
$date = mosFormatDate( $row-&gt;date, $ac_fdate );
$linecolor = 1;
$parsedcomment = AkoParse($row-&gt;comment, $smiley, $ac_bbcodesupport, $ac_picsupport, $ac_smiliesupport, $mosConfig_live_site);
$parsedcomment = textwrap($parsedcomment, $width = 60);
if ($row-&gt;title) {
$title = stripslashes($row-&gt;title);
}
$name = stripslashes($row-&gt;name);
if ($row-&gt;email != &#039;&#039;){
$name = &quot;&lt;a href=\&quot;mailto:&quot;.$row-&gt;email.&quot;NOSPAM! \&quot;&gt;&quot;.$name.&quot;&lt;/a&gt;&quot;;
}
if ($row-&gt;web != &#039;&#039;){
$web = &quot; &lt;a href=&#039;&quot;.$row-&gt;web.&quot;&#039; target=&#039;_blank&#039;&gt;&quot;.$row-&gt;web.&quot;&lt;/a&gt;&quot;;
}
$showIP = ( $ac_showip ) ? &quot;IP: $row-&gt;ip&quot; : &quot;&quot; ;
$report = &quot;&quot; ;
$akocomments = &quot;&quot;;
// include template
require($mosConfig_absolute_path.&quot;/components/com_akocomment/templates/$ac_showsinfieldset/index.php&quot;);
echo $akocomments;
}
}
}
}

?&gt;




ادامه در پست بعدی --&gt;&gt;

myparsa
04-03-2009, 01:45 PM
کد تغییر یافته ی: akocommentbot.php - لاین 508





&lt;?php
/**
* AkoComment - A User Comments Component
* @version 2.0
* @package AkoComment
* Tweaked version Modified by Artistworks.net
* Hacks by - Benjamin Samson - <b><font color=red>فقط کاربران عضو انجمن می توانند لینک ها را مشاهده کنند</font></b>
* Hacks by Arnaud Bonneville - <b><font color=red>فقط کاربران عضو انجمن می توانند لینک ها را مشاهده کنند</font></b>
* Spamfix &amp; Pagination by Dominik Paulus - <b><font color=red>فقط کاربران عضو انجمن می توانند لینک ها را مشاهده کنند</font></b>
* Wrong Security code by Mike H - //forum.joomla.org/index.php/topic,28644.120.html* Hack by Raffie - Updated code to work properly in Joomla 1.1.10 - <b><font color=red>فقط کاربران عضو انجمن می توانند لینک ها را مشاهده کنند</font></b>
* @copyright (C) 2004 by Arthur Konze - All rights reserved!
* @license <b><font color=red>فقط کاربران عضو انجمن می توانند لینک ها را مشاهده کنند</font></b> Copyrighted Commercial Software
**/

/**
*
* AkoComment Tweaked Special Edition - by visualclinic.fr
* ADD :
* - RSS on comments
* - Quote this article by copy/paste code
* - some features for layout
*
**/

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

global $_MAMBOTS;

$_MAMBOTS-&gt;registerFunction( &#039;onPrepareContent&#039;, &#039;botAkoComment&#039; );

function botAkoComment( $published, &amp;$row, &amp;$params, $page=0 ) {

if (@$row-&gt;content){
return;
}

if (!$published) {
$row-&gt;text = str_replace( &quot;{moscomment}&quot;, &quot;&quot;, $row-&gt;text );
return;
}

# Variables - Don&#039;t change anything here!!!
global $database, $mainframe, $option, $task, $mosConfig_lang, $mosConfig_absolute_path, $mosConfig_live_site, $my;

# Get the right language if it exists
if (file_exists($mosConfig_absolute_path.&#039;/components/com_akocomment/languages/&#039;.$mosConfig_lang.&#039;.php&#039;)) {
include_once($mosConfig_absolute_path.&#039;/components/com_akocomment/languages/&#039;.$mosConfig_lang.&#039;.php&#039;);
} else {
include_once($mosConfig_absolute_path.&#039;/components/com_akocomment/languages/english.php&#039;);
}

# Load configuration file
require($mosConfig_absolute_path.&quot;/administrator/components/com_akocomment/config.akocomment.php&quot;);
require( $mosConfig_absolute_path.&quot;/administrator/components/com_akocomment/version.php&quot; );

# Get Itemid
if ( $row-&gt;sectionid ) {
$bs = $mainframe-&gt;getBlogSectionCount();
$bc = $mainframe-&gt;getBlogCategoryCount();
$gbs = $mainframe-&gt;getGlobalBlogSectionCount();
$Itemid = $mainframe-&gt;getItemid( $row-&gt;id, 0, 0, $bs, $bc, $gbs );
} else {
$query = &quot;SELECT id&quot;
. &quot;\n FROM #__menu&quot;
. &quot;\n WHERE type = &#039;content_typed&#039;&quot;
. &quot;\n AND componentid = $row-&gt;id&quot;
;
$database-&gt;setQuery( $query );
$Itemid = $database-&gt;loadResult();
}
// Blank itemid checker for SEF
if ($Itemid == NULL) {
$Itemid = &#039;&#039;;
$uniqItemid = &#039;&#039;;
} else {
$uniqItemid = $Itemid;
$Itemid = &#039;&amp;amp;Itemid=&#039;. $Itemid;

}

# STOP! THE REMOVAL OF THE POWERED BY LINE IS NOT ALLOWED.
# IF YOU WANT TO REMOVE IT, CONTACT ME AT <b><font color=red>فقط کاربران عضو انجمن می توانند لینک ها را مشاهده کنند</font></b> FOR DETAILS!
$akocpversion = &quot;&lt;p align=&#039;center&#039;&gt;&lt;span class=&#039;small&#039;&gt;Powered by AkoComment Tweaked &lt;a href=&#039;<b><font color=red>فقط کاربران عضو انجمن می توانند لینک ها را مشاهده کنند</font></b>; target=&#039;_blank&#039; &gt;Special Edition&lt;/a&gt; v.&quot; . _AKOCOMMENT_TW_SE_VERSION;
$akocpversion .= &quot;&lt;br/&gt;AkoComment &amp;copy; Copyright 2004 by Arthur Konze - &lt;a href=&#039;<b><font color=red>فقط کاربران عضو انجمن می توانند لینک ها را مشاهده کنند</font></b>; target=&#039;_blank&#039;&gt;<b><font color=red>فقط کاربران عضو انجمن می توانند لینک ها را مشاهده کنند</font></b> right reserved&lt;/span&gt;&lt;/p&gt;&quot;;

$seclistarray = explode (&quot;,&quot;, $ac_sectionlist);

$ac = trim( mosGetParam( $_REQUEST, &#039;ac&#039;, 0 ) );
$ac_numcomments = ( $ac_numcomments!=&#039;&#039; &amp;&amp; $ac_numcomments*0 == 0 ) ? $ac_numcomments : &#039;10&#039; ;
$ac_fdate = ( $ac_fdate!=&#039;&#039; ) ? $ac_fdate : _DATE_FORMAT_LC2 ;

// prepare show link print, send email, read more...
// ADDING OPTIONS BY Bernard Gilly - Visualclinic.fr
$ac_character = ( $ac_character_separate!=&#039;&#039; ) ? &quot; &quot;.$ac_character_separate.&quot; &quot; : &quot; &quot;;
$showextralinks = &quot;&quot;;
if ($ac_showfavouredlink){
$query = &quot;SELECT COUNT(*) AS favourite FROM #__akocomment_favoured WHERE id_content = &#039;&quot;.$row-&gt;id.&quot;&#039;&quot;;
$database-&gt;setQuery( $query );
$favorite = $database-&gt;loadResult();
$showextralinks .= $ac_character.&quot;&lt;img src=&#039;&quot;.$mosConfig_live_site.&quot;/components/com_akocomment/images/favoured.gif&#039; hspace=&#039;2&#039; style=&#039;vertical-align:middle;&#039; alt=&#039;&#039; /&gt;&quot;;
$showextralinks .= &quot;&lt;a class=\&quot;\&quot; href=\&quot;&quot;.sefRelToAbs(&quot;index.php?option=com_akocomm ent&amp;task=favoured&amp;id=$row-&gt;id$Itemid&quot;).&quot;\&quot;&gt;&quot;. _AKOCOMMENT_ADDFAVOURED . &quot;&lt;/a&gt; (&quot;.$favorite.&quot;)&quot;;
}
if ($ac_showquotelink){
$showextralinks .= $ac_character.&quot;&lt;img src=&#039;&quot;.$mosConfig_live_site.&quot;/components/com_akocomment/images/quotethis.gif&#039; hspace=&#039;2&#039; style=&#039;vertical-align:middle;&#039; alt=&#039;&#039; /&gt;&quot;;
$showextralinks .= &quot;&lt;a class=\&quot;\&quot; href=\&quot;&quot;.sefRelToAbs(&quot;index.php?option=com_akocomm ent&amp;task=quote&amp;id=$row-&gt;id$Itemid&quot;).&quot;\&quot;&gt;&quot;. _AKOCOMMENT_QUOTETHISARTICLE . &quot;&lt;/a&gt;&quot;;
}
if ($ac_showhits){
$query = &quot;SELECT hits FROM #__content WHERE id = &#039;&quot;.$row-&gt;id.&quot;&#039;&quot;;
$database-&gt;setQuery( $query );
$numhits = $database-&gt;loadResult();
$showextralinks .= $ac_character . _AKOCOMMENT_HITS_VIEWS . $numhits;
}
if ($ac_showprintlink){
$showextralinks .= $ac_character.&quot;&lt;a class=\&quot;\&quot; href=\&quot;javascript:void window.open(&#039;&quot;.sefRelToAbs(&quot;index2.php?option=com_ content&amp;task=view&amp;id=$row-&gt;id&amp;pop=1&amp;page=0&amp;ac=1&quot;).&quot;&#039;, &#039;win2&#039;, &#039;status=no,toolbar=no,scrollbars=yes,titlebar=no,m enubar=no,resizable=yes,width=640,height=480,direc tories=no,location=no&#039;);\&quot;&gt;&quot; . _CMN_PRINT . &quot;&lt;/a&gt;&quot;;
}
if ($ac_showsendemaillink){
$showextralinks .= $ac_character.&quot;&lt;a class=\&quot;\&quot; href=\&quot;javascript:void window.open(&#039;&quot;.sefRelToAbs(&quot;index2.php?option=com_ content&amp;task=emailform&amp;id=$row-&gt;id&quot;).&quot;&#039;, &#039;win2&#039;, &#039;status=no,toolbar=no,scrollbars=yes,titlebar=no,m enubar=no,resizable=yes,width=400,height=280,direc tories=no,location=no&#039;);\&quot;&gt;&quot; . _CMN_EMAIL . &quot;&lt;/a&gt;&quot;;
}
if ($ac_showreadmorelink &amp;&amp; !( ( $option==&#039;com_content&#039; || $option==&#039;com_alphacontent&#039; ) &amp;&amp; $task==&#039;view&#039;) ){
$showextralinks .= $ac_character.&quot;&lt;a class=\&quot;\&quot; href=\&quot;&quot;.sefRelToAbs(&quot;index.php?option=com_content &amp;task=view&amp;id=$row-&gt;id&amp;ac=$ac_show_commentreadmore$Itemid&quot;).&quot;\&quot;&gt;&quot; . _READ_MORE . &quot;&lt;/a&gt;&quot;;
}


if ( $row-&gt;state ==&#039;1&#039; || ( $row-&gt;state==&#039;-1&#039; &amp;&amp; $ac_showonarchives==&#039;1&#039;) ) {

if ((($ac_mainmode == &quot;0&quot;) &amp;&amp; (strpos($row-&gt;text, &quot;{moscomment}&quot;) !== false) &amp;&amp; $ac!=&#039;1&#039; ) || (($ac_mainmode == &quot;1&quot;) &amp;&amp; (in_array (isset($row-&gt;sectionid), $seclistarray)) &amp;&amp; $ac!=&#039;1&#039; )) {


# Prepare smiley array
$smiley[&#039;:)&#039;] = &quot;sm_smile.gif&quot;; $smiley[&#039;:grin&#039;] = &quot;sm_biggrin.gif&quot;;
$smiley[&#039;;)&#039;] = &quot;sm_wink.gif&quot;; $smiley[&#039;8)&#039;] = &quot;sm_cool.gif&quot;;
$smiley[&#039;:p&#039;] = &quot;sm_razz.gif&quot;; $smiley[&#039;:roll&#039;] = &quot;sm_rolleyes.gif&quot;;
$smiley[&#039;:eek&#039;] = &quot;sm_bigeek.gif&quot;; $smiley[&#039;:upset&#039;] = &quot;sm_upset.gif&quot;;
$smiley[&#039;:zzz&#039;] = &quot;sm_sleep.gif&quot;; $smiley[&#039;:sigh&#039;] = &quot;sm_sigh.gif&quot;;
$smiley[&#039;:?&#039;] = &quot;sm_confused.gif&quot;; $smiley[&#039;:cry&#039;] = &quot;sm_cry.gif&quot;;
$smiley[&#039;:(&#039;] = &quot;sm_mad.gif&quot;; $smiley[&#039;:x&#039;] = &quot;sm_dead.gif&quot;;


# Load function library
require_once($mosConfig_absolute_path.&#039;/components/com_akocomment/functions.akocomment.php&#039;);

$limitout = ( $ac_numautolimit &gt; 0 ) ? &quot;LIMIT $ac_numautolimit&quot; : &quot;&quot; ;

# Check number of comments
$database-&gt;setQuery( &quot;SELECT count(*) FROM #__akocomment WHERE contentid=&#039;$row-&gt;id&#039; AND published=&#039;1&#039;&quot; );
$total = $database-&gt;loadResult();

if ( $ac_numautolimit ) {
if ( $total &gt; $ac_numautolimit ) { $total = $ac_numautolimit; }
}

echo $database-&gt;getErrorMsg();
if ( ( $option==&#039;com_content&#039; || $option==&#039;com_alphacontent&#039; ) &amp;&amp; $task==&#039;view&#039;) {

# Check for Editor rights
$is_editor = (strtolower($my-&gt;usertype) == &#039;editor&#039; || strtolower($my-&gt;usertype) == &#039;publisher&#039; || strtolower($my-&gt;usertype) == &#039;manager&#039; || strtolower($my-&gt;usertype) == &#039;administrator&#039; || strtolower($my-&gt;usertype) == &#039;super administrator&#039; );
$is_user = (strtolower($my-&gt;usertype) &lt;&gt; &#039;&#039;);

$len_character = ($ac_character);
$deb = $len_character + 2;
$showextralinks = substr($showextralinks, $deb);
$akocomments = &quot;&lt;br /&gt;&quot;.$showextralinks.&quot;&lt;br /&gt;&quot;;

$showrssfeed = ( $ac_showrssfeed ) ? &quot;&lt;a href=&#039;index.php?option=com_akocomment&amp;task=feed&#039;&gt;&lt; img src=&#039;$mosConfig_live_site/components/com_akocomment/images/rss.gif&#039; border=&#039;0&#039; style=&#039;vertical-align:middle;&#039; alt=&#039;&quot;._AKOCOMMENT_RSS.&quot;&#039; /&gt;&lt;/a&gt;&quot; : &quot;&quot; ;
$quotesimgtop = ( $ac_showsinfieldset == &#039;0&#039; || $ac_showsinfieldset == &#039;1&#039; ) ? &quot;&lt;img src=\&quot;$mosConfig_live_site/components/com_akocomment/images/quotetop.gif\&quot; align=\&quot;baseline\&quot; alt=\&quot;\&quot; /&gt;&amp;nbsp;&amp;nbsp;&quot; : &quot;&quot;;
$quotesimgbottom = ( $ac_showsinfieldset == &#039;0&#039; || $ac_showsinfieldset == &#039;1&#039; ) ? &quot;&lt;img src=\&quot;$mosConfig_live_site/components/com_akocomment/images/quotebottom.gif\&quot; alt=\&quot;\&quot; /&gt;&quot; : &quot;&quot;;

// Bug fix CSS if num comment = 0
if ( $ac_showsinfieldset != &#039;0&#039; &amp;&amp; $ac_showsinfieldset != &#039;1&#039; ) {
echo &quot;&lt;link href=&#039;$mosConfig_live_site/components/com_akocomment/templates/$ac_showsinfieldset/css/template_css.css&#039; rel=&#039;stylesheet&#039; type=&#039;text/css&#039; /&gt;&quot;;
}

if ($total&gt;0) {
# Show Comments if exist
$akocomments .= &quot;&lt;br /&gt;&lt;table width=&#039;100%&#039; border=&#039;0&#039; cellspacing=&#039;0&#039; cellpadding=&#039;0&#039;&gt;&quot;;
$akocomments .= &quot;&lt;tr&gt;&lt;td&gt;&lt;div align=&#039;left&#039; class=&#039;commenttop&#039;&gt;$quotesimgtop&quot;._AKOCOMMENT_COMM ENTS.&quot; (&quot;.$total.&quot;)&lt;/div&gt;&lt;/td&gt;&quot;;
$akocomments .= &quot;&lt;td&gt;&lt;div align=&#039;right&#039; &gt;&quot; . $showrssfeed . &quot;&lt;/div&gt;&lt;/td&gt;&lt;/tr&gt;&quot;;
$akocomments .= &quot;&lt;/table&gt;&quot;;

$line=1;
$database-&gt;setQuery( &quot;SELECT id as acid, contentid as contentid, title as actitle, email as email, web as web, name as acname, date as acdate, ip as ip, comment as accomment, iduser as iduser FROM #__akocomment WHERE contentid=&#039;$row-&gt;id&#039; AND published=&#039;1&#039; ORDER BY id $ac_sorting $limitout&quot; ); // added by bpixel - modified by visualclinic.fr
$acrows = $database-&gt;loadObjectList();
if ($database-&gt;getErrorNum()) {
echo $database-&gt;stderr();
return false;
}

$fieldset = &quot;&quot;;
$endfieldset = &quot;&quot;;

if ( $ac_showsinfieldset == &#039;0&#039; || $ac_showsinfieldset == &#039;1&#039; ) {

for ($i=1, $n=count( $acrows ); $i &lt;= $n; $i++) {
$acrow = &amp;$acrows[$i-1];
$linecolor = ($line % 2) + 1;
$theclass = &quot;sectiontableentry&quot;.$linecolor;
// if report
if ( $ac_report ) {
$link4report = &quot;index.php?option=com_akocomment&amp;task=report&amp;id=$a crow-&gt;contentid&amp;cid=$acrow-&gt;acid$Itemid&quot;;
$linktoreport = &quot;&lt;a href=&#039;&quot;.sefRelToAbs($link4report).&quot;&#039;&gt;&quot; . _AKOCOMMENT_REPORT . &quot;&lt;/a&gt;&quot;;
}else{ $linktoreport=&quot;&quot;; }

// if show in fieldset...
if ( $ac_showsinfieldset ) {
$fieldset = &quot;&lt;fieldset&gt;&quot;;
if ( $ac_showcommentnumber ) {
$fieldset .= &quot;&lt;legend&gt;&amp;nbsp;&quot;. ($i). &quot;&amp;nbsp;&lt;/legend&gt;&quot;;
}
$endfieldset = &quot;&lt;/fieldset&gt;&quot;;
$linecolor = &quot;3&quot;;
$theclass = &quot;&quot;;
}
$akocomments .= &quot;&lt;a name=&#039;akocomment&quot;.$acrow-&gt;acid.&quot;&#039;&gt;&lt;/a&gt;&quot;;
$akocomments .= &quot;&lt;table width=&#039;100%&#039; border=&#039;0&#039; cellspacing=&#039;3&#039; cellpadding=&#039;3&#039;&gt;&quot;;
$akocomments .= &quot;&lt;tr class=&#039;&quot;.$theclass.&quot;&#039;&gt;&lt;td valign=&#039;top&#039;&gt;&quot;.$fieldset;
if ( $ac_showsinfieldset==&#039;0&#039; &amp;&amp; $ac_showcommentnumber==&#039;1&#039; ) {
$akocomments .= &quot;&lt;b&gt;&quot;.($i).&quot;. &lt;/b&gt;&quot;;
}
if ($acrow-&gt;actitle) {
$acrow-&gt;actitle = stripslashes($acrow-&gt;actitle);
$akocomments .= &quot;&lt;b&gt;$acrow-&gt;actitle&lt;/b&gt;&lt;br /&gt;&quot;;
}
$name = stripslashes($acrow-&gt;acname);

// *** begin hack by bpixel
// check if comment has an email
if ( $acrow-&gt;email != &#039;&#039; ){
$name = &quot;&lt;a href=\&quot;mailto:&quot;.$acrow-&gt;email.&quot;NOSPAM! \&quot;&gt;&quot;.$name.&quot;&lt;/a&gt;&quot;; //NoSpam Mail Hack added by MartinCZ
}

if ( $ac_LinkCBProfile ) {
// Check if CB component exist
$pathFileCB = $mosConfig_absolute_path . &quot;/components/com_comprofiler/comprofiler.php&quot;;
if ( file_exists( $pathFileCB ) ) {
$akoBotCheckCBcomponent = 1;
} else $akoBotCheckCBcomponent = 0;

// Link to CB profile
if( $akoBotCheckCBcomponent &amp;&amp; $acrow-&gt;iduser ){
$name = &quot;&lt;a href=\&quot;&quot;
. sefRelToAbs( &#039;index.php?option=com_comprofiler&amp;amp;task=userPro file&amp;amp;user=&#039; . $acrow-&gt;iduser . AkoCBAuthorItemidBot() )
. &quot;\&quot;&gt;&quot;
. stripslashes($acrow-&gt;acname)
. &quot;&lt;/a&gt;&quot;;
}
}
// check if comment has a website
if ( $acrow-&gt;web != &#039;&#039; ){
$name .= &quot; &lt;a href=&#039;&quot;.$acrow-&gt;web.&quot;&#039; target=&#039;_blank&#039;&gt;&lt;img src=&#039;components/com_akocomment/images/home.gif&#039; style=&#039;vertical-align:middle;&#039; border=&#039;0&#039; alt=&#039;website&#039; /&gt;&lt;/a&gt;&quot;;
}
// *** end hack by bpixel

//Show IP of User Hack added by MartinCZ - Modified by visualclinic.fr
$showIP = ( $ac_showip ) ? &quot;, IP: $acrow-&gt;ip&quot; : &quot;&quot; ;

$akocomments .= &quot;&lt;span class=&#039;small&#039;&gt;&quot;._AKOCOMMENT_WRITTENBY.&quot; &lt;b&gt;&quot;.$name.&quot;&lt;/b&gt;, &quot;._AKOCOMMENT_ON.&quot; &quot; . mosFormatDate( $acrow-&gt;acdate, $ac_fdate ) . &quot; &quot; . $showIP . &quot;&lt;/span&gt;&lt;br /&gt;&quot;;
$parsedcomment= AkoParse($acrow-&gt;accomment, $smiley, $ac_bbcodesupport, $ac_picsupport, $ac_smiliesupport, $mosConfig_live_site);
$parsedcomment= textwrap($parsedcomment, $width = 60);
$akocomments .= &quot;$parsedcomment&quot;;

// if report
if ( $ac_report ) {
$akocomments .= &quot;&lt;br /&gt;&quot;;
$akocomments .= &quot;&lt;div align=&#039;right&#039;&gt;$linktoreport&lt;/div&gt;&quot;;
}

/* AkoComment Pagination by Dominik Paulus - modified by Bernard Gilly */
// 10 comments per page by default
if(($i%($ac_numcomments)) == 0 &amp;&amp; $i != $n ) {
$akocomments .= $endfieldset.&quot;&lt;/td&gt;&lt;/tr&gt;&lt;/table&gt;&quot;;
$akocomments .= &quot;&lt;table width=\&quot;100%\&quot; border=\&quot;0\&quot; cellspacing=\&quot;0\&quot; cellpadding=\&quot;0\&quot;&gt;&lt;tr&gt;&lt;td&gt;&quot;;
$akocomments .= &quot;&lt;div align=\&quot;right\&quot; class=&#039;commentbottom&#039;&gt;$quotesimgbottom&quot;;
$akocomments .= &quot;&lt;/div&gt;&lt;/td&gt;&lt;/tr&gt;&lt;/table&gt;&quot;;
$akocomments .= &quot;{mospagebreak}&quot;;
$akocomments .= str_replace( &quot;{moscomment}&quot;, &quot;&quot;, $row-&gt;text );
$akocomments .= &quot;&lt;br /&gt;&quot;.$showextralinks.&quot;&lt;br /&gt;&quot;;
$akocomments .= &quot;&lt;br /&gt;&lt;table width=&#039;100%&#039; border=&#039;0&#039; cellspacing=&#039;0&#039; cellpadding=&#039;0&#039;&gt;&quot;;
$akocomments .= &quot;&lt;tr&gt;&lt;td&gt;&lt;div align=&#039;left&#039; class=&#039;commenttop&#039;&gt;$quotesimgtop&quot;._AKOCOMMENT_COMM ENTS.&quot; (&quot;.$total.&quot;)&lt;/div&gt;&lt;/td&gt;&quot;;
$akocomments .= &quot;&lt;td&gt;&lt;div align=&#039;right&#039; &gt;&quot; . $showrssfeed . &quot;&lt;/div&gt;&lt;/td&gt;&lt;/tr&gt;&lt;/table&gt;&quot;;
$line=0;
}else {
$akocomments .= $endfieldset.&quot;&lt;/td&gt;&lt;/tr&gt;&lt;/table&gt;&quot;;
}
$line++;
}
} else {
// show comments in template
// CSS
//echo &quot;&lt;link href=&#039;$mosConfig_live_site/components/com_akocomment/templates/$ac_showsinfieldset/css/template_css.css&#039; rel=&#039;stylesheet&#039; type=&#039;text/css&#039; /&gt;&quot;;

for ($i=1, $n=count( $acrows ); $i &lt;= $n; $i++) {
$acrow = &amp;$acrows[$i-1];
// if report
if ( $ac_report ) {
$link4report = &quot;index.php?option=com_akocomment&amp;task=report&amp;id=$a crow-&gt;contentid&amp;cid=$acrow-&gt;acid$Itemid&quot;;
$linktoreport = &quot;&lt;a href=&#039;&quot;.sefRelToAbs($link4report).&quot;&#039;&gt;&quot; . _AKOCOMMENT_REPORT . &quot;&lt;/a&gt;&quot;;
} else { $linktoreport = &quot;&quot;; }
$web = &quot;&quot;;
$showIP = &quot;&quot;;
$type_user = &quot;&quot;;
$report = &quot;&quot;;
$type_user = ( $acrow-&gt;iduser ) ? _AKOCOMMENT_REGISTERED : _AKOCOMMENT_GUEST ;
$shownumber = $ac_showcommentnumber;
$statutUser = $ac_statutUser;
$date = mosFormatDate( $acrow-&gt;acdate, $ac_fdate );
$linecolor = ($line % 2) + 1;
$parsedcomment = AkoParse($acrow-&gt;accomment, $smiley, $ac_bbcodesupport, $ac_picsupport, $ac_smiliesupport, $mosConfig_live_site);
$parsedcomment = textwrap($parsedcomment, $width = 60);
if ($acrow-&gt;actitle) {
$title = stripslashes($acrow-&gt;actitle);
}
$name = stripslashes($acrow-&gt;acname);
if ($acrow-&gt;email != &#039;&#039;){
$name = &quot;&lt;a href=\&quot;mailto:&quot;.$acrow-&gt;email.&quot;NOSPAM! \&quot;&gt;&quot;.$name.&quot;&lt;/a&gt;&quot;; //NoSpam Mail Hack added by MartinCZ
}
if ( $ac_LinkCBProfile ) {
// Check if CB component exist
$pathFileCB = $mosConfig_absolute_path . &quot;/components/com_comprofiler/comprofiler.php&quot;;
if ( file_exists( $pathFileCB ) ) {
$akoBotCheckCBcomponent = 1;
} else $akoBotCheckCBcomponent = 0;

// Link to CB profile
if( $akoBotCheckCBcomponent &amp;&amp; $acrow-&gt;iduser ){
$name = &quot;&lt;a href=\&quot;&quot;
. sefRelToAbs( &#039;index.php?option=com_comprofiler&amp;amp;task=userPro file&amp;amp;user=&#039; . $acrow-&gt;iduser . AkoCBAuthorItemidBot() )
. &quot;\&quot;&gt;&quot;
. stripslashes($acrow-&gt;acname)
. &quot;&lt;/a&gt;&quot;;
}
}
if ($acrow-&gt;web != &#039;&#039;){
$web = &quot; &lt;a href=&#039;&quot;.$acrow-&gt;web.&quot;&#039; target=&#039;_blank&#039;&gt;&quot;.$acrow-&gt;web.&quot;&lt;/a&gt;&quot;;
}
$showIP = ( $ac_showip ) ? &quot;IP: $acrow-&gt;ip&quot; : &quot;&quot; ;
// if report
if ( $ac_report ) {
$report = $linktoreport ;
}
// anchor
$akocomments .= &quot;&lt;a name=&#039;akocomment$acrow-&gt;acid&#039;&gt;&lt;/a&gt;&quot; ;

// include template
require($mosConfig_absolute_path.&quot;/components/com_akocomment/templates/$ac_showsinfieldset/index.php&quot;);

/* AkoComment Pagination by Dominik Paulus - modified by Bernard Gilly */
// 10 comments per page by default
if(($i%($ac_numcomments)) == 0 &amp;&amp; $i != $n ) {
$akocomments .= &quot;&lt;table width=\&quot;100%\&quot; border=\&quot;0\&quot; cellspacing=\&quot;0\&quot; cellpadding=\&quot;0\&quot;&gt;&lt;tr&gt;&lt;td&gt;&quot;;
$akocomments .= &quot;&lt;div align=\&quot;right\&quot; class=&#039;commentbottom&#039;&gt;$quotesimgbottom&quot;;
$akocomments .= &quot;&lt;/div&gt;&lt;/td&gt;&lt;/tr&gt;&lt;/table&gt;&quot;;
$akocomments .= &quot;{mospagebreak}&quot;;
$akocomments .= str_replace( &quot;{moscomment}&quot;, &quot;&quot;, $row-&gt;text );
$akocomments .= &quot;&lt;br /&gt;&quot;.$showextralinks.&quot;&lt;br /&gt;&quot;;
$akocomments .= &quot;&lt;br /&gt;&lt;table width=&#039;100%&#039; border=&#039;0&#039; cellspacing=&#039;0&#039; cellpadding=&#039;0&#039;&gt;&quot;;
$akocomments .= &quot;&lt;tr&gt;&lt;td&gt;&lt;div align=&#039;left&#039; class=&#039;commenttop&#039;&gt;$quotesimgtop&quot;._AKOCOMMENT_COMM ENTS.&quot; (&quot;.$total.&quot;)&lt;/div&gt;&lt;/td&gt;&quot;;
$akocomments .= &quot;&lt;td&gt;&lt;div align=&#039;right&#039; &gt;&quot; . $showrssfeed . &quot;&lt;/div&gt;&lt;/td&gt;&lt;/tr&gt;&lt;/table&gt;&quot;;
$line=0;
}
$line++;
}
}

$akocomments .= &quot;&lt;table width=\&quot;100%\&quot; border=\&quot;0\&quot; cellspacing=\&quot;0\&quot; cellpadding=\&quot;0\&quot;&gt;&lt;tr&gt;&lt;td&gt;&quot;;
$akocomments .= &quot;&lt;div align=\&quot;right\&quot; class=&#039;commentbottom&#039;&gt;$quotesimgbottom&quot;;
$akocomments .= &quot;&lt;/div&gt;&lt;/td&gt;&lt;/tr&gt;&lt;/table&gt;&quot;;

}else{
$akocomments .= &quot;&lt;br /&gt;&lt;table width=\&quot;100%\&quot; border=\&quot;0\&quot; cellspacing=\&quot;0\&quot; cellpadding=\&quot;0\&quot;&gt;&lt;tr&gt;&lt;td&gt;&quot;;
$akocomments .= &quot;&lt;div align=\&quot;left\&quot; class=&#039;commenttop&#039;&gt;$quotesimgtop&quot;._AKOCOMMENT_WRIT EFIRSTCOMMENT;
$akocomments .= &quot;&lt;/div&gt;&lt;/td&gt;&lt;td&gt;&lt;div align=&#039;right&#039; &gt;&quot; . $showrssfeed . &quot;&lt;/div&gt;&lt;/td&gt;&lt;/tr&gt;&lt;/table&gt;&quot;;
$akocomments .= &quot;&lt;table width=\&quot;100%\&quot; border=\&quot;0\&quot; cellspacing=\&quot;0\&quot; cellpadding=\&quot;0\&quot;&gt;&lt;tr&gt;&lt;td&gt;&quot;;
$akocomments .= &quot;&lt;div align=\&quot;right\&quot; class=&#039;commentbottom&#039;&gt;$quotesimgbottom&quot;;
$akocomments .= &quot;&lt;/div&gt;&lt;/td&gt;&lt;/tr&gt;&lt;/table&gt;&quot;;
}

$akoinputforum = &quot;&quot;;

if ( $row-&gt;state ==&#039;1&#039; || ( $row-&gt;state==&#039;-1&#039; &amp;&amp; $ac_showonarchives==&#039;1&#039; &amp;&amp; $ac_addonarchives==&#039;1&#039; ) ) {

# Check if Registered Users only
if (!$ac_anonentry &amp;&amp; !$is_user) {
$akoinputforum = &quot;&lt;p&gt;&quot;._AKOCOMMENT_ONLYREGISTERED.&quot;&lt;/p&gt;&quot;;
} else {
# Javascript for Form Check
$akoinputforum = &quot;&lt;p&gt;&quot;;
$akoinputforum .= &quot;&lt;script language=\&quot;Javascript\&quot;&gt;&quot;;
$akoinputforum .= &quot; function x () {&quot;;
$akoinputforum .= &quot; return;&quot;;
$akoinputforum .= &quot; }&quot;;
$akoinputforum .= &quot; function ac_smilie(thesmile) {&quot;;
$akoinputforum .= &quot; document.akocommentform.comment.value += \&quot; \&quot;+thesmile+\&quot; \&quot;;&quot;;
$akoinputforum .= &quot; document.akocommentform.comment.focus();&quot;;
$akoinputforum .= &quot; }&quot;;
$akoinputforum .= &quot; function validate(){&quot;;
$akoinputforum .= &quot; if (document.akocommentform.comment.value==&#039;&#039;){&quot;;
$akoinputforum .= &quot; alert(\&quot;&quot;._AKOCOMMENT_FORMVALIDATE.&quot;\&quot;);&quot;;
$akoinputforum .= &quot; } else if (document.akocommentform.acname.value==&#039;&#039;){&quot;; // added by bpixel
$akoinputforum .= &quot; alert(\&quot;&quot;._AKOCOMMENT_FORMVALIDATENAME.&quot;\&quot;);&quot;; // added by bpixel
$akoinputforum .= &quot; }else {&quot;;
$akoinputforum .= &quot; document.akocommentform.action = &#039;index.php&#039;;&quot;;
$akoinputforum .= &quot; document.akocommentform.submit();&quot;;
$akoinputforum .= &quot; }&quot;;
$akoinputforum .= &quot; }&quot;;
if ($ac_bbcodesupport) {
$akoinputforum .= &quot;function DoPrompt(action) {&quot;;
$akoinputforum .= &quot; var revisedMessage;&quot;;
$akoinputforum .= &quot; var currentMessage = document.akocommentform.comment.value;&quot;;
$akoinputforum .= &quot; if (action == \&quot;url\&quot;) {&quot;;
$akoinputforum .= &quot; var thisURL = prompt(\&quot;Enter the URL for the link you want to add.\&quot;, \&quot;<b><font color=red>فقط کاربران عضو انجمن می توانند لینک ها را مشاهده کنند</font></b>);&quot;;
$akoinputforum .= &quot; var thisTitle = prompt(\&quot;Enter the web site title\&quot;, \&quot;Page Title\&quot;);&quot;;
$akoinputforum .= &quot; var urlBBCode = \&quot;\&quot;+thisTitle+\&quot; (\&quot;+thisURL+\&quot;)\&quot;;&quot;;
$akoinputforum .= &quot; revisedMessage = currentMessage+urlBBCode;&quot;;
$akoinputforum .= &quot; document.akocommentform.comment.value=revisedMessa ge;&quot;;
$akoinputforum .= &quot; document.akocommentform.comment.focus();&quot;;
$akoinputforum .= &quot; return;&quot;;
$akoinputforum .= &quot; }&quot;;
$akoinputforum .= &quot; if (action == \&quot;email\&quot;) {&quot;;
$akoinputforum .= &quot; var thisEmail = prompt(\&quot;Enter the email address you want to add.\&quot;, \&quot;\&quot;);&quot;;
$akoinputforum .= &quot; var emailBBCode = \&quot;\&quot;+thisEmail+\&quot;\&quot;;&quot;;
$akoinputforum .= &quot; revisedMessage = currentMessage+emailBBCode;&quot;;
$akoinputforum .= &quot; document.akocommentform.comment.value=revisedMessa ge;&quot;;
$akoinputforum .= &quot; document.akocommentform.comment.focus();&quot;;
$akoinputforum .= &quot; return;&quot;;
$akoinputforum .= &quot; }&quot;;
$akoinputforum .= &quot; if (action == \&quot;bold\&quot;) {&quot;;
$akoinputforum .= &quot; var thisBold = prompt(\&quot;Enter the text that you want to make bold.\&quot;, \&quot;\&quot;);&quot;;
$akoinputforum .= &quot; var boldBBCode = \&quot;\&quot;+thisBold+\&quot;\&quot;;&quot;;
$akoinputforum .= &quot; revisedMessage = currentMessage+boldBBCode;&quot;;
$akoinputforum .= &quot; document.akocommentform.comment.value=revisedMessa ge;&quot;;
$akoinputforum .= &quot; document.akocommentform.comment.focus();&quot;;
$akoinputforum .= &quot; return;&quot;;
$akoinputforum .= &quot; }&quot;;
$akoinputforum .= &quot; if (action == \&quot;italic\&quot;) {&quot;;
$akoinputforum .= &quot; var thisItal = prompt(\&quot;Enter the text that you want to make italic.\&quot;, \&quot;\&quot;);&quot;;
$akoinputforum .= &quot; var italBBCode = \&quot;\&quot;+thisItal+\&quot;\&quot;;&quot;;
$akoinputforum .= &quot; revisedMessage = currentMessage+italBBCode;&quot;;
$akoinputforum .= &quot; document.akocommentform.comment.value=revisedMessa ge;&quot;;
$akoinputforum .= &quot; document.akocommentform.comment.focus();&quot;;
$akoinputforum .= &quot; return;&quot;;
$akoinputforum .= &quot; }&quot;;
$akoinputforum .= &quot; if (action == \&quot;underline\&quot;) {&quot;;
$akoinputforum .= &quot; var thisUndl = prompt(\&quot;Enter the text that you want to be undelined.\&quot;, \&quot;\&quot;);&quot;;
$akoinputforum .= &quot; var undlBBCode = \&quot;\&quot;+thisUndl+\&quot;\&quot;;&quot;;
$akoinputforum .= &quot; revisedMessage = currentMessage+undlBBCode;&quot;;
$akoinputforum .= &quot; document.akocommentform.comment.value=revisedMessa ge;&quot;;
$akoinputforum .= &quot; document.akocommentform.comment.focus();&quot;;
$akoinputforum .= &quot; return;&quot;;
$akoinputforum .= &quot; }&quot;;
$akoinputforum .= &quot; if (action == \&quot;image\&quot;) {&quot;;
$akoinputforum .= &quot; var thisImage = prompt(\&quot;Enter the URL for the image you want to display.\&quot;, \&quot;<b><font color=red>فقط کاربران عضو انجمن می توانند لینک ها را مشاهده کنند</font></b>);&quot;;
$akoinputforum .= &quot; var imageBBCode = \&quot;\&quot;+thisImage+\&quot;\&quot;;&quot;;
$akoinputforum .= &quot; revisedMessage = currentMessage+imageBBCode;&quot;;
$akoinputforum .= &quot; document.akocommentform.comment.value=revisedMessa ge;&quot;;
$akoinputforum .= &quot; document.akocommentform.comment.focus();&quot;;
$akoinputforum .= &quot; return;&quot;;
$akoinputforum .= &quot; }&quot;;
$akoinputforum .= &quot; if (action == \&quot;quote\&quot;) {&quot;;
$akoinputforum .= &quot; var quoteBBCode = \&quot;
\&quot;;&quot;;
$akoinputforum .= &quot; revisedMessage = currentMessage+quoteBBCode;&quot;;
$akoinputforum .= &quot; document.akocommentform.comment.value=revisedMessa ge;&quot;;
$akoinputforum .= &quot; document.akocommentform.comment.focus();&quot;;
$akoinputforum .= &quot; return;&quot;;
$akoinputforum .= &quot; }&quot;;
$akoinputforum .= &quot; if (action == \&quot;code\&quot;) {&quot;;
$akoinputforum .= &quot; var codeBBCode = \&quot;
\&quot;;&quot;;
$akoinputforum .= &quot; revisedMessage = currentMessage+codeBBCode;&quot;;
$akoinputforum .= &quot; document.akocommentform.comment.value=revisedMessa ge;&quot;;
$akoinputforum .= &quot; document.akocommentform.comment.focus();&quot;;
$akoinputforum .= &quot; return;&quot;;
$akoinputforum .= &quot; }&quot;;
$akoinputforum .= &quot; if (action == \&quot;listopen\&quot;) {&quot;;
$akoinputforum .= &quot; var liststartBBCode = \&quot;\&quot;;&quot;;
$akoinputforum .= &quot; revisedMessage = currentMessage+liststartBBCode;&quot;;
$akoinputforum .= &quot; document.akocommentform.comment.value=revisedMessa ge;&quot;;
$akoinputforum .= &quot; document.akocommentform.comment.focus();&quot;;
$akoinputforum .= &quot; return;&quot;;
$akoinputforum .= &quot; }&quot;;
$akoinputforum .= &quot; if (action == \&quot;listclose\&quot;) {&quot;;
$akoinputforum .= &quot; var listendBBCode = \&quot;\&quot;;&quot;;
$akoinputforum .= &quot; revisedMessage = currentMessage+listendBBCode;&quot;;
$akoinputforum .= &quot; document.akocommentform.comment.value=revisedMessa ge;&quot;;
$akoinputforum .= &quot; document.akocommentform.comment.focus();&quot;;
$akoinputforum .= &quot; return;&quot;;
$akoinputforum .= &quot; }&quot;;
$akoinputforum .= &quot; if (action == \&quot;listitem\&quot;) {&quot;;
$akoinputforum .= &quot; var thisItem = prompt(\&quot;Enter the new list item. Note that each list group must be preceeded by a List Close and must be ended with List Close.\&quot;, \&quot;\&quot;);&quot;;
$akoinputforum .= &quot; var itemBBCode = \&quot; \&quot;+thisItem;&quot;;
$akoinputforum .= &quot; revisedMessage = currentMessage+itemBBCode;&quot;;
$akoinputforum .= &quot; document.akocommentform.comment.value=revisedMessa ge;&quot;;
$akoinputforum .= &quot; document.akocommentform.comment.focus();&quot;;
$akoinputforum .= &quot; return;&quot;;
$akoinputforum .= &quot; }&quot;;
$akoinputforum .= &quot;}&quot;;
}
$akoinputforum .= &quot;&lt;/script&gt;&quot;;

$contentid = $row-&gt;id;
$the_username = ( $ac_use_name ) ? $my-&gt;name : $my-&gt;username ;


if ( $ac_showsinfieldset != &#039;0&#039; &amp;&amp; $ac_showsinfieldset != &#039;1&#039; ) { // if show in template...
$akoinputforum .= &quot;&lt;div id=&#039;commentform&#039;&gt;&quot;;
$akoinputforum .= &quot;&lt;div id=&#039;writecomment&#039;&gt;&quot;._AKOCOMMENT_WRITECOMMENT.&quot;&lt;/div&gt;&quot;;
}

//startform
$akoinputforum .= &quot;&lt;a name=&#039;akocomment&#039;&gt;&lt;/a&gt;&quot;;
$akoinputforum .= &quot;&lt;table align=&#039;center&#039; width=&#039;100%&#039; cellpadding=&#039;2&#039; cellspacing=&#039;0&#039; border=&#039;0&#039;&gt;&quot;;
if ( $ac_showsinfieldset == &#039;0&#039; || $ac_showsinfieldset == &#039;1&#039; ) {
$akoinputforum .= &quot;&lt;tr&gt;&lt;td colspan=&#039;2&#039; class=&#039;sectiontableheader&#039;&gt;&quot;._AKOCOMMENT_WRITECOMM ENT.&quot;&lt;/td&gt;&lt;/tr&gt;&quot;;
}
if ( _AKOCOMMENT_WRITEPOLICY !=&#039;&#039; ){
$akoinputforum .= &quot;&lt;tr&gt;&lt;td colspan=&#039;2&#039;&gt;&quot;._AKOCOMMENT_WRITEPOLICY.&quot;&lt;/td&gt;&lt;/tr&gt;&quot;;
}
$akoinputforum .= &quot;&lt;form name=&#039;akocommentform&#039; action=&#039;index.php&#039; target=_top method=&#039;post&#039;&gt;&quot;;
$akoinputforum .= &quot;&lt;input type=&#039;hidden&#039; name=&#039;option&#039; value=&#039;com_akocomment&#039;&gt;&quot;;
$akoinputforum .= &quot;&lt;input type=&#039;hidden&#039; name=&#039;acitemid&#039; value=&#039;$uniqItemid&#039;&gt;&quot;;
$akoinputforum .= &quot;&lt;input type=&#039;hidden&#039; name=&#039;contentid&#039; value=&#039;$row-&gt;id&#039;&gt;&quot;;
$akoinputforum .= &quot;&lt;input type=&#039;hidden&#039; name=&#039;func&#039; value=&#039;entry&#039;&gt;&quot;;
$akoinputforum .= &quot;&lt;tr&gt;&lt;td&gt;&quot;._AKOCOMMENT_ENTERNAME.&quot;&lt;/td&gt;&lt;td&gt;&quot;;
if ($my-&gt;username) {
$akoinputforum .= &quot;$the_username&lt;input type=&#039;hidden&#039; name=&#039;acname&#039; value=&#039;$the_username&#039;&gt;&quot;;
} else {
//$akoinputforum .= _AKOCOMMENT_GUESTNAME.&quot;&lt;input type=&#039;hidden&#039; name=&#039;acname&#039; value=&#039;&quot;._AKOCOMMENT_GUESTNAME.&quot;&#039;&gt;&quot;; // comment by bpixel
$akoinputforum .= &quot;&lt;input type=&#039;text&#039; name=&#039;acname&#039; style=&#039;width:75%;&#039; class=&#039;inputbox&#039; value=&#039;&#039; alt=&#039;&quot;._AKOCOMMENT_ENTERNAME.&quot;&#039; title=&#039;&quot;._AKOCOMMENT_ENTERNAME.&quot;&#039; &gt;&quot;; // added by bpixel
}
$akoinputforum .= &quot;&lt;input type=&#039;hidden&#039; name=&#039;iduser&#039; value=&#039;$my-&gt;id&#039;&gt;&quot;; // added by visualclinic.fr
$akoinputforum .= &quot;&lt;/td&gt;&lt;/tr&gt;&quot;;

if ( $ac_displayfieldmail ) {
$akoinputforum .= &quot;&lt;tr&gt;&lt;td&gt;&quot;._AKOCOMMENT_ENTERMAIL.&quot;&lt;/td&gt;&lt;td&gt;&lt;input type=&#039;text&#039; name=&#039;email&#039; style=&#039;width:75%;&#039; class=&#039;inputbox&#039; alt=&#039;&quot;._AKOCOMMENT_ENTERMAIL.&quot;&#039; title=&#039;&quot;._AKOCOMMENT_ENTERMAIL.&quot;&#039; &gt;&lt;/td&gt;&lt;/tr&gt;&quot;; // added by bpixel
}else echo &quot;&lt;input type=&#039;hidden&#039; name=&#039;email&#039; id=&#039;email&#039; value=&#039;&#039;&gt;&quot;;

if ( $ac_displayfieldweb ) {
$akoinputforum .= &quot;&lt;tr&gt;&lt;td&gt;&quot;._AKOCOMMENT_ENTERSITE.&quot;&lt;/td&gt;&lt;td&gt;&lt;input type=&#039;text&#039; name=&#039;web&#039; style=&#039;width:75%;&#039; class=&#039;inputbox&#039; alt=&#039;&quot;._AKOCOMMENT_ENTERSITE.&quot;&#039; title=&#039;&quot;._AKOCOMMENT_ENTERSITE.&quot;&#039; &gt;&lt;/td&gt;&lt;/tr&gt;&quot;; // added by bpixel
}else echo &quot;&lt;input type=&#039;hidden&#039; name=&#039;web&#039; value=&#039;&#039;&gt;&quot;;

if ( $ac_displayfieldtitle ) {
$akoinputforum .= &quot;&lt;tr&gt;&lt;td&gt;&quot;._AKOCOMMENT_ENTERTITLE.&quot;&lt;/td&gt;&lt;td&gt;&lt;input type=&#039;text&#039; name=&#039;title&#039; style=&#039;width:75%;&#039; class=&#039;inputbox&#039; alt=&#039;&quot;._AKOCOMMENT_ENTERTITLE.&quot;&#039; title=&#039;&quot;._AKOCOMMENT_ENTERTITLE.&quot;&#039; &gt;&lt;/td&gt;&lt;/tr&gt;&quot;;
}else echo &quot;&lt;input type=&#039;hidden&#039; name=&#039;title&#039; value=&#039;&#039;&gt;&quot;;

# Switch for BB Code support
if ($ac_bbcodesupport) {
$akoinputforum .= &quot;&lt;tr&gt;&lt;td&gt;BBCode:&lt;/td&gt;&lt;td&gt;&quot;;
$akoinputforum .= &quot;&lt;a href=&#039;javascript: x()&#039; onClick=&#039;DoPrompt(\&quot;url\&quot;);&#039;&gt;&lt;img src=&#039;components/com_akocomment/images/bburl.gif&#039; hspace=&#039;1&#039; border=&#039;0&#039; alt=&#039;Web Address&#039; /&gt;&lt;/a&gt;&quot;;
$akoinputforum .= &quot;&lt;a href=&#039;javascript: x()&#039; onClick=&#039;DoPrompt(\&quot;email\&quot;);&#039;&gt;&lt;img src=&#039;components/com_akocomment/images/bbemail.gif&#039; hspace=&#039;1&#039; border=&#039;0&#039; alt=&#039;Email Address&#039; /&gt;&lt;/a&gt;&quot;;
if ($ac_picsupport) $akoinputforum .= &quot;&lt;a href=&#039;javascript: x()&#039; onClick=&#039;DoPrompt(\&quot;image\&quot;);&#039;&gt;&lt;img src=&#039;components/com_akocomment/images/bbimgsrc.gif&#039; hspace=&#039;1&#039; border=&#039;0&#039; alt=&#039;Load Image from Web&#039; /&gt;&lt;/a&gt;&quot;;
$akoinputforum .= &quot;&lt;a href=&#039;javascript: x()&#039; onClick=&#039;DoPrompt(\&quot;bold\&quot;);&#039;&gt;&lt;img src=&#039;components/com_akocomment/images/bbbold.gif&#039; hspace=&#039;1&#039; border=&#039;0&#039; alt=&#039;Bold Text&#039; /&gt;&lt;/a&gt;&quot;;
$akoinputforum .= &quot;&lt;a href=&#039;javascript: x()&#039; onClick=&#039;DoPrompt(\&quot;italic\&quot;);&#039;&gt;&lt;img src=&#039;components/com_akocomment/images/bbitalic.gif&#039; hspace=&#039;1&#039; border=&#039;0&#039; alt=&#039;Italic Text&#039; /&gt;&lt;/a&gt;&quot;;
$akoinputforum .= &quot;&lt;a href=&#039;javascript: x()&#039; onClick=&#039;DoPrompt(\&quot;underline\&quot;);&#039;&gt;&lt;img src=&#039;components/com_akocomment/images/bbunderline.gif&#039; hspace=&#039;1&#039; border=&#039;0&#039; alt=&#039;Underlined Text&#039; /&gt;&lt;/a&gt;&quot;;
$akoinputforum .= &quot;&lt;a href=&#039;javascript: x()&#039; onClick=&#039;DoPrompt(\&quot;quote\&quot;);&#039;&gt;&lt;img src=&#039;components/com_akocomment/images/bbquote.gif&#039; hspace=&#039;1&#039; border=&#039;0&#039; alt=&#039;Quote&#039; /&gt;&lt;/a&gt;&quot;;
$akoinputforum .= &quot;&lt;a href=&#039;javascript: x()&#039; onClick=&#039;DoPrompt(\&quot;code\&quot;);&#039;&gt;&lt;img src=&#039;components/com_akocomment/images/bbcode.gif&#039; hspace=&#039;1&#039; border=&#039;0&#039; alt=&#039;Code&#039; /&gt;&lt;/a&gt;&quot;;
$akoinputforum .= &quot;&lt;a href=&#039;javascript: x()&#039; onClick=&#039;DoPrompt(\&quot;listopen\&quot;);&#039;&gt;&lt;img src=&#039;components/com_akocomment/images/bblistopen.gif&#039; hspace=&#039;1&#039; border=&#039;0&#039; alt=&#039;Open List&#039; /&gt;&lt;/a&gt;&quot;;
$akoinputforum .= &quot;&lt;a href=&#039;javascript: x()&#039; onClick=&#039;DoPrompt(\&quot;listitem\&quot;);&#039;&gt;&lt;img src=&#039;components/com_akocomment/images/bblistitem.gif&#039; hspace=&#039;1&#039; border=&#039;0&#039; alt=&#039;List Item&#039; /&gt;&lt;/a&gt;&quot;;
$akoinputforum .= &quot;&lt;a href=&#039;javascript: x()&#039; onClick=&#039;DoPrompt(\&quot;listclose\&quot;);&#039;&gt;&lt;img src=&#039;components/com_akocomment/images/bblistclose.gif&#039; hspace=&#039;1&#039; border=&#039;0&#039; alt=&#039;Close List&#039; /&gt;&lt;/a&gt;&quot;;
$akoinputforum .= &quot;&lt;/td&gt;&lt;/tr&gt;&quot;;
}
$akoinputforum .= &quot;&lt;tr&gt;&lt;td valign=&#039;top&#039;&gt;&quot;._AKOCOMMENT_ENTERTEXT.&quot;&lt;br /&gt;&lt;br /&gt;&quot;;
# Switch for Smilie Support
if ($ac_smiliesupport) {
//echo &quot;&lt;table align=\&quot;center\&quot;&gt;&lt;tr&gt;&lt;td&gt;&quot;;
$count=1;
foreach ($smiley as $i=&gt;$sm) {
$akoinputforum .= &quot;&lt;a href=\&quot;javascript:ac_smilie(&#039;$i&#039;)\&quot; title=&#039;$i&#039;&gt;&lt;img src=&#039;$mosConfig_live_site/components/com_akocomment/images/$sm&#039; border=&#039;0&#039; /&gt;&lt;/a&gt; &quot;;
if ($count%5==0) $akoinputforum .= &quot;&lt;br&gt;&quot;;
$count++;
}
//echo &quot;&lt;td&gt;&lt;tr&gt;&lt;/table&gt;&quot;;
}
$akoinputforum .= &quot;&lt;/td&gt;&lt;td valign=&#039;top&#039;&gt;&lt;textarea style=&#039;width:75%;&#039; rows=&#039;8&#039; name=&#039;comment&#039; class=&#039;inputbox&#039; wrap=&#039;virtual&#039; title=&#039;&quot;._AKOCOMMENT_ENTERTEXT.&quot;&#039;&gt;&quot;;
@session_start();
if(isset($_SESSION[&#039;akocomment&#039;])) {
$akoinputforum .= $_SESSION[&#039;akocomment&#039;];
}
$akoinputforum .= &quot;&lt;/textarea&gt;&lt;/td&gt;&lt;/tr&gt;&quot;;

# Spamfix: codefield
if ( $ac_disable_securitycode==&#039;0&#039; ) {
$akoinputforum .= &quot;&lt;tr&gt;&lt;td width=&#039;125&#039; align=&#039;left&#039;&gt;&quot;._AKOCOMMENT_ENTERCODE.&quot;&lt;span class=&#039;small&#039;&gt;*&lt;/span&gt;&lt;/td&gt;&lt;td valign=&#039;absmiddle&#039; style=&#039;vertical-align:middle&#039;&gt;&lt;input type=&#039;text&#039; name=&#039;akocode&#039; maxlength=&#039;5&#039; style=&#039;width:60px;vertical-align:middle;&#039; class=&#039;inputbox&#039; alt=&#039;&quot;._AKOCOMMENT_CODEDESCRIPTION.&quot;&#039; title=&#039;&quot;._AKOCOMMENT_CODEDESCRIPTION.&quot;&#039; &gt; &lt;img src=&#039;./components/com_akocomment/img.php?bgc=&quot;.$ac_bgcolor_code.&quot;&amp;fc=&quot;.$ac_fontcolo r_code.&quot;&amp;lc=&quot;.$ac_linecolor_code.&quot;&amp;bc=&quot;.$ac_border color_code.&quot;&#039; border=&#039;0&#039; title=&#039;&quot;._AKOCOMMENT_CODEIMAGE.&quot;&#039; alt=&#039;Code&#039; style=&#039;vertical-align:middle&#039;/&gt;&lt;/td&gt;&lt;/tr&gt;&quot;;
}
if ( $ac_displaycheckboxcontact==&#039;1&#039; ) {
$akoinputforum .= &quot;&lt;tr&gt;&lt;td&gt;&lt;/td&gt;&lt;td align=&#039;left&#039; class=&#039;small&#039;&gt;&lt;input type=&#039;checkbox&#039; name=&#039;subscribe&#039; id=&#039;subscribe&#039; class=&#039;inputbox&#039; value=&#039;1&#039; /&gt; &quot;._AKOCOMMENT_MAILMENEWADDCOMMENT.&quot;&lt;/td&gt;&lt;/tr&gt;&quot;;
}
$akoinputforum .= &quot;&lt;tr&gt;&lt;td&gt;&quot;;
if ( $ac_displaycheckboxcontact==&#039;0&#039; ) {
$akoinputforum .= &quot;&lt;input type=&#039;hidden&#039; name=&#039;subscribe&#039; id=&#039;subscribe&#039; value=&#039;0&#039;&gt;&quot;;
}
$akoinputforum .= &quot;&lt;/td&gt;&lt;td align=&#039;left&#039;&gt;&lt;input type=&#039;button&#039; name=&#039;send&#039; value=&#039;&quot;._AKOCOMMENT_SENDFORM.&quot;&#039; class=&#039;button&#039; onClick=&#039;validate()&#039; alt=&#039;&quot;._AKOCOMMENT_SENDFORM.&quot;&#039; title=&#039;&quot;._AKOCOMMENT_SENDFORM.&quot;&#039; &gt;&lt;/td&gt;&lt;/tr&gt;&lt;/form&gt;&lt;/table&gt;&quot;;
$akoinputforum .= &quot;&lt;/p&gt;&quot;;
}

} // end if add comment on archives

// if show in template...
if ( $ac_showsinfieldset != &#039;0&#039; &amp;&amp; $ac_showsinfieldset != &#039;1&#039; ) {
$akoinputforum .= &quot;&lt;div id=&#039;footerform&#039;&gt;&lt;/div&gt;&quot;;
$akoinputforum .= &quot;&lt;/div&gt;&quot;;
}

// autolimit for add
if ( ( $total == $ac_numautolimit ) &amp;&amp; $ac_autolimit4add == &#039;1&#039; ) { $akoinputforum = &quot;&quot; ; }

# Check for right placement
if ($ac_formposition) {
$akocomreplace = &quot;$akoinputforum$akocomments$akocpversion&quot;;
} else {
$akocomreplace = &quot;$akocomments$akoinputforum$akocpversion&quot;;
}

if ($ac_mainmode == &quot;0&quot;) {
$row-&gt;text = str_replace( &quot;{moscomment}&quot;, $akocomreplace, $row-&gt;text );
} elseif (in_array ($row-&gt;sectionid, $seclistarray)) {
$row-&gt;text = str_replace( &quot;{moscomment}&quot;, &quot;&quot;, $row-&gt;text );
$row-&gt;text = $row-&gt;text.$akocomreplace;
}

# If we are not on the content page
} else {
$replacementlink = ($ac_openingmode) ? &quot;&lt;a class=\&quot;\&quot; href=\&quot;javascript:void window.open(&#039;&quot;.sefRelToAbs(&quot;index2.php?option=com_ content&amp;task=view&amp;id=$row-&gt;id&amp;pop=1&amp;page=0&quot;).&quot;&#039;, &#039;win2&#039;, &#039;status=no,toolbar=no,scrollbars=yes,titlebar=no,m enubar=no,resizable=yes,width=640,height=480,direc tories=no,location=no&#039;);\&quot;&gt;&quot; : &quot;&lt;a class=\&quot;\&quot; href=&#039;&quot;.sefRelToAbs(&quot;index.php?option=com_content&amp; task=view&amp;id=$row-&gt;id$Itemid&quot;).&quot;&#039;&gt;&quot;;

/////////******************************************///////////
if ($ac_mainmode == &quot;0&quot;) {
$row-&gt;text = str_replace( &quot;{moscomment}&quot;, &quot;&lt;p&gt;&lt;img src=&#039;&quot;.$mosConfig_live_site.&quot;/components/com_akocomment/images/comment.gif&#039; hspace=&#039;2&#039; style=&#039;vertical-align:middle;&#039; alt=&#039;&#039; /&gt;$replacementlink&quot;._AKOCOMMENT_COMMENTS.&quot; ($total)&lt;/a&gt;&quot;.$showextralinks.&quot;&lt;/p&gt;&quot;, $row-&gt;text );
} elseif (in_array ($row-&gt;sectionid, $seclistarray)) {
$row-&gt;text = str_replace( &quot;{moscomment}&quot;, &quot;&quot;, $row-&gt;text );
// Changed by Arnaud Bonneville, 25/08/2005
// If Zero comments are posted we dont show &quot;0 comments&quot;
if ($total&gt;0) {
$row-&gt;text = $row-&gt;text.&quot;&lt;p&gt;&lt;img src=&#039;&quot;.$mosConfig_live_site.&quot;/components/com_akocomment/images/comment.gif&#039; hspace=&#039;2&#039; style=&#039;vertical-align:middle;&#039; alt=&#039;&#039; /&gt;$replacementlink&quot;._AKOCOMMENT_COMMENTS.&quot;&lt;/a&gt; ($total)&quot;;
} else {
$row-&gt;text = $row-&gt;text.&quot;&lt;p&gt;&lt;img src=&#039;&quot;.$mosConfig_live_site.&quot;/components/com_akocomment/images/comment.gif&#039; hspace=&#039;2&#039; style=&#039;vertical-align:middle;&#039; alt=&#039;&#039; /&gt;$replacementlink&quot;._AKOCOMMENT_WRITEFIRSTCOMMENT.&quot; &lt;/a&gt;&quot;;
}
// End of change

// END ADDING OPTIONS BY Bernard Gilly
$row-&gt;text .= $showextralinks.&quot;&lt;/p&gt;&quot;;
}
}

}

} // if state

return true;
}

function AkoCBAuthorItemidBot() {
global $_CBAuthorbot__Cache_ProfileItemid, $database;

if ( !$_CBAuthorbot__Cache_ProfileItemid ) {
if ( !isset( $_REQUEST[&#039;Itemid&#039;] ) ) {
$database-&gt;setQuery( &quot;SELECT id FROM #__menu WHERE link = &#039;index.php?option=com_comprofiler&#039; AND published=1&quot; );
$Itemid = (int) $database-&gt;loadResult();
} else {
$Itemid = (int) $_REQUEST[&#039;Itemid&#039;];
}
if ( ! $Itemid ) {
$query = &quot;SELECT id&quot;
. &quot;\n FROM #__menu&quot;
. &quot;\n WHERE menutype = &#039;mainmenu&#039;&quot;
. &quot;\n AND published = 1&quot;
. &quot;\n ORDER BY parent, ordering&quot;
. &quot;\n LIMIT 1&quot;
;
$database-&gt;setQuery( $query );
$Itemid = (int) $database-&gt;loadResult();
}
$_CBAuthorbot__Cache_ProfileItemid = $Itemid;
}
if ($_CBAuthorbot__Cache_ProfileItemid) {
return &quot;&amp;amp;Itemid=&quot; . $_CBAuthorbot__Cache_ProfileItemid;
} else {
return null;
}
}
?&gt;


اگر چنین تغییری روی کامپوننت شما جواب داده است ، ممنون می شوم دو فایل مذکور را برای من آپلود و لینکش رو ارسال کنید.

ممنون از لطف شما

emad_67
04-03-2009, 04:54 PM
من که الان یه کامنت گذاشتم توی سایتت درست عمل کرد!
کش مرورگرت رو پاک کن و دوباره تست کن. احتمالا حل میشه.

ضمنا security code کامپوننت akocomment توی firefox نشون داده نمیشه.

myparsa
04-03-2009, 11:32 PM
من که الان یه کامنت گذاشتم توی سایتت درست عمل کرد!
کش مرورگرت رو پاک کن و دوباره تست کن. احتمالا حل میشه.

ضمنا security code کامپوننت akocomment توی firefox نشون داده نمیشه.


عماد جان سلام

&gt;&gt; تصور می کنم سوء برداشتی صورت گرفته ، فرمایش شما صحیح است با تغییرات صورت گرفته هنگامی کامنت گذاری می کنی اکوکامنت به فرم نظر برمی گرده ، اما عرض بنده چیز دیگری است ، منظورم این بود:
در صفحه ی نخست ، زیر مطالب ارسالی لینکی وجود دارد به نام &quot; ارسال یادداشت&quot; که متعلق به کاموننت اکو کامت یا کام کامنت هست ، هنگامی که مخاطب در همان صفحه ی اصلی قصد ارسال یاد داشت یا نظر را دارد و روی لینک ارسال یاد داشت کلیک می کند ، بجای اینکه به فرم ارسال یاد داشت در انتهای مطلب مذکور منتقل شود به ابتدای مطلب (ابتدای صفحه) منتقل می شود! و باید خودش به به انتهای صفحه و فرم ارسال یاد داشت برود که این موضوع یاعث سردرگمی مخاطب می شود ، درست این است که مخاطب پس از کلیک بر روی ارسال یاد داشت در صفحه ی نخست مستقیمن به انتهای مطلب مذکور و فرم ارسال یاد داشت منتقل شود... ، قبلن هم عرض کردم با افزودن دستور comment# یا دستوری مشابه به لینک ارسال یاد داشت می توان به این خواسته دست یافت...

&gt;&gt; سوال دیگری هم دارم
چگونه می شود در اکو کامنت لینک ارسال یاد داشت رو در صفحه ی اول اختیاری کرد؟ مثل لینک بازدید ، لینک ارسال به دوست ، لینک اضافه به علاقه مندی ها که قابل نشر یا عدم نشر هستند...

ممنون از لطف شما

myparsa
04-04-2009, 12:07 AM
برای مثال این لینک رو چک کن: h ttp://rezayat.artparsa.ir/content/view/107/1/#comment
وقتی دستور comment# رو به انتهای لینک اضافه می کنی هنگام باز شدن صفحه به انتهای صفحه یعنی محل ارسال یاد داشت می ره ، البته به نظرم این دستور هم ایراد داره چرا که خیلی پایین و روی فیلد پیام می ایسته ، اگر روی فیلد نام و یا حتی بالاتر بایسته خیلی عالی می شه ...

بازم ممنون

myparsa
04-04-2009, 12:45 AM
سلام مجدد

دستور صحیح این هست: acname#

با این لینک دقیقن ابتدای فرم ارسال یاد داشت می ایسته...

<b><font color=red>فقط کاربران عضو انجمن می توانند لینک ها را مشاهده کنند</font></b>

emad_67
04-04-2009, 07:53 AM
برای مثال این لینک رو چک کن: h ttp://rezayat.artparsa.ir/content/view/107/1/#comment
وقتی دستور comment# رو به انتهای لینک اضافه می کنی هنگام باز شدن صفحه به انتهای صفحه یعنی محل ارسال یاد داشت می ره ، البته به نظرم این دستور هم ایراد داره چرا که خیلی پایین و روی فیلد پیام می ایسته ، اگر روی فیلد نام و یا حتی بالاتر بایسته خیلی عالی می شه ...


دستور صحیح این هست: acname#

با این لینک دقیقن ابتدای فرم ارسال یاد داشت می ایسته...
اینی که شما میگی وقتی comment# یا acname# رو به انتهای لینک اضافه میکنی به قسمت یاداشت ها میره فقط توی ie درست کار میکنه و اونم اصلا برای اینکار در نظر گرفته نشده و به خاطر باگ های مزخرف ie هست که این اتفاق می افته( به خاطر خاصیت name=&#039;commnet&#039; تگ textarea و name=&#039;acname&#039; در تگ input)
اما برای کار شما:
بعد از مسیر mambots\content فایل akocommentbot.php رو باز کن.
این خط رو پیدا کن:

$akoinputforum .= &quot;&lt;table align=&#039;center&#039; width=&#039;100%&#039; cellpadding=&#039;2&#039; cellspacing=&#039;0&#039; border=&#039;0&#039;&gt;&quot;;
در بالای این خط اینو اضافه کن:

$akoinputforum .= &quot;&lt;a name=&#039;akocomment&#039;&gt;&lt;/a&gt;&quot;;
سپس این خط رو پیدا کن:

$replacementlink = ($ac_openingmode) ? &quot;&lt;a class=\&quot;\&quot; href=\&quot;javascript:void window.open(&#039;&quot;.sefRelToAbs(&quot;index2.php?option=com_ content&amp;task=view&amp;id=$row-&gt;id&amp;pop=1&amp;page=0&quot;).&quot;&#039;, &#039;win2&#039;, &#039;status=no,toolbar=no,scrollbars=yes,titlebar=no,m enubar=no,resizable=yes,width=640,height=480,direc tories=no,location=no&#039;);\&quot;&gt;&quot; : &quot;&lt;a class=\&quot;\&quot; href=&#039;&quot;.sefRelToAbs(&quot;index.php?option=com_content&amp; task=view&amp;id=$row-&gt;id$Itemid&quot;).&quot;&#039;&gt;&quot;;
و به این تغییر بده:

$replacementlink = ($ac_openingmode) ? &quot;&lt;a class=\&quot;\&quot; href=\&quot;javascript:void window.open(&#039;&quot;.sefRelToAbs(&quot;index2.php?option=com_ content&amp;task=view&amp;id=$row-&gt;id&amp;pop=1&amp;page=0#akocomment&quot;).&quot;&#039;, &#039;win2&#039;, &#039;status=no,toolbar=no,scrollbars=yes,titlebar=no,m enubar=no,resizable=yes,width=640,height=480,direc tories=no,location=no&#039;);\&quot;&gt;&quot; : &quot;&lt;a class=\&quot;\&quot; href=&#039;&quot;.sefRelToAbs(&quot;index.php?option=com_content&amp; task=view&amp;id=$row-&gt;id$Itemid#akocomment&quot;).&quot;&#039;&gt;&quot;;

چگونه می شود در اکو کامنت لینک ارسال یاد داشت رو در صفحه ی اول اختیاری کرد؟ مثل لینک بازدید ، لینک ارسال به دوست ، لینک اضافه به علاقه مندی ها که قابل نشر یا عدم نشر هستند...
برای اینکار باید کد نویسی اضافه یه مقدار انجام بشه.

myparsa
04-04-2009, 04:48 PM
عماد جان

بسیار ممنون ، عالی بود و کارا... درست همون چیزی شد که می خواستم...

باز هم سپاس