PDA

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



webpen
01-24-2007, 08:20 PM
یه ماژول خیلی خوب هست به اسم mod_latestnewslink که توسط تیم مامبولرن تهیه شده من الان خواستم یک سری تغییرات جزئی توش بدم دیدم کد شده. ممکنه این ماژول رو کد نشده برای دانلود بگذارید؟!

firoozmandan
01-25-2007, 08:29 AM
مهدي اين ماژول مربوط ميشه به خيلي وقت قبل ...
اينجا نسخه Decodesh رو ندارم اما ميتوني توي mamboxchange پيداش كني ...

يا علي

webpen
01-25-2007, 09:27 AM
توی پروژه های مامبو لرن؟

firoozmandan
01-25-2007, 09:32 AM
نه توي خود mamboxchange بايد نسخه انگليسيش باشه ...

webpen
01-25-2007, 11:45 AM
نه نیست. ظاهرا این ماژول رو احمد زاده نوشته. توی ایکس ام ال که اینطور نوشته.
من یه ماژول دیگه پیدا کردم که عکس رو با لینک نمایش میده. به شرطی که از mosimage استفاده شده باشه.
ولی یه اشکال کوچیک داره که فکر میکنم قابل حل بشه. اونم اینه که عکس رو به جای اینکه سمت راست لینک نمایش بده بالای لینک نمایش میده. من کدش رو میزارم اینجا اگه ممکنه راهنمایی کنید.


<?php

/**

* @version $Id: mod_latestnews.php,v 1.16 2004/09/14 14:20:43 stingrey Exp $

* @package Mambo_4.5.1

* @copyright (C) 2000 - 2004 Miro International Pty Ltd

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

* Mambo is Free Software

* Modified to display first image in images field of item

* Christian Meichtry (drcorbeille) chris@mambosphere.com

*/



/** ensure this file is being included by a parent file */

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



global $mosConfig_offset, $mosConfig_live_site, $mainframe;



$count = intval( $params-&gt;get( &#039;count&#039;, 5 ) );

$catid = trim( $params-&gt;get( &#039;catid&#039; ) );

$secid = trim( $params-&gt;get( &#039;secid&#039; ) );

$show_front = $params-&gt;get( &#039;show_front&#039;, 1 );

$moduleclass_sfx = $params-&gt;get( &#039;moduleclass_sfx&#039; );



$imageWidth = intval($params-&gt;get(&#039;imageWidth&#039;, 0)) ;



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



$query = &quot;SELECT a.id, a.title, a.sectionid, a.catid, a.images&quot;

. &quot;\n FROM #__content AS a&quot;

. &quot;\n LEFT JOIN #__content_frontpage AS f ON f.content_id = a.id&quot;

. &quot;\n WHERE ( a.state = &#039;1&#039; AND a.checked_out = &#039;0&#039; AND a.sectionid &gt; &#039;0&#039; )&quot;

. &quot;\n AND ( a.publish_up = &#039;0000-00-00 00:00:00&#039; OR a.publish_up &lt;= &#039;&quot;. $now .&quot;&#039; )&quot;

. &quot;\n AND ( a.publish_down = &#039;0000-00-00 00:00:00&#039; OR a.publish_down &gt;= &#039;&quot;. $now .&quot;&#039; )&quot;

. ( $catid ? &quot;\n AND ( a.catid IN (&quot;. $catid .&quot;) )&quot; : &#039;&#039; )

. ( $secid ? &quot;\n AND ( a.sectionid IN (&quot;. $secid .&quot;) )&quot; : &#039;&#039; )

. ( $show_front == &quot;0&quot; ? &quot;\n AND f.content_id IS NULL&quot; : &#039;&#039; )

. &quot;\n ORDER BY a.created DESC LIMIT $count&quot;

;

$database-&gt;setQuery( $query );

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



// needed to reduce queries used by getItemid

$bs = $mainframe-&gt;getBlogSectionCount();

$bc = $mainframe-&gt;getBlogCategoryCount();

$gbs = $mainframe-&gt;getGlobalBlogSectionCount();



// Output

echo &#039;&lt;ul&gt;&#039;;

foreach ( $rows as $row ) {

// get Itemid

$Itemid = $mainframe-&gt;getItemid( $row-&gt;id, 0, 0, $bs, $bc, $gbs );

// Blank itemid checker for SEF

if ($Itemid == NULL) {

$Itemid = &#039;&#039;;

} else {

$Itemid = &#039;&amp;amp;Itemid=&#039;. $Itemid;

}



if ($row-&gt;images)

{

$width = ($imageWidth &gt; 0) ? &#039; width=&quot;&#039;.$imageWidth.&#039;&quot;&#039; : &#039;&#039; ;

$image = explode(&quot;|&quot;, $row-&gt;images) ;



echo &#039;&lt;li&gt;&lt;a href=&quot;&#039;. sefRelToAbs( &#039;index.php?option=com_content&amp;amp;task=view&amp;amp;id =&#039;. $row-&gt;id . $Itemid ) .&#039;&quot;&gt;&lt;img src=&quot;&#039;.$mosConfig_live_site.&#039;/images/stories/&#039;.$image[0].&#039;&quot; alt=&quot;&#039;.$image[2].&#039;&quot; border=&quot;0&quot;&#039;.$width.&#039;/&gt;&lt;br/&gt;&#039;. $row-&gt;title .&#039;&lt;/a&gt;&lt;/li&gt;&#039;;

}

else

echo &#039;&lt;li&gt;&lt;a href=&quot;&#039;. sefRelToAbs( &#039;index.php?option=com_content&amp;amp;task=view&amp;amp;id =&#039;. $row-&gt;id . $Itemid ) .&#039;&quot;&gt;&#039;. $row-&gt;title .&#039;&lt;/a&gt;&lt;/li&gt;&#039;;



}

echo &#039;&lt;/ul&gt;&#039;;

?&gt;