morid

عدم نمایش محتوا به صورت لیست درون ماژول اسلایدر

21 پست در این موضوع

سلام دوستان

مشکلی که بر خوردم اینه که توی یه ماژول اسلایدر تاتیل محتوا میاد متن درون محتوا به جای اینکه به صورت لیست عمودی بیاد پشت سر هم میاد.

توی فایل helper.php اومده ...

<?php
defined('_JEXEC') or die('Restricted access');

JHTML::_('behavior.mootools');
require_once (JPATH_SITE.DS.'components'.DS.'com_content'.DS.'h elpers'.DS.'route.php');
require_once('modules/mod_youstorage_slider/lib/slike.php');

class modYJYouStorageSliderhHelper
{
function getYouStorageSliderItems(&$params)
{

$who = strtolower($_SERVER['HTTP_USER_AGENT']);
$get_items = $params->get ('get_items',1);
$nitems = $params->get ('nitems',4);
$chars = $params->get ('chars',40);
$chars_nav = $params->get ('chars_nav',40);
$ordering = $params->get ('ordering',3);// 1 = ordering | 2 = popular | 3 = random
$getspecific = $params->get ('getspecific');


$slider_width = $params->get ('slider_width','980px');
$slider_height = $params->get ('slider_height','331px');
$slider_intro_width = $params->get ('slider_intro_width','415px');
$slider_image_width = $params->get ('slider_image_width','565px');
$slider_image_ptop = $params->get ('slider_image_ptop','110px');
$slider_image_pleft = $params->get ('slider_image_pleft','150px');

$txtDelay = $params->get ('txtDelay','10');
$imgOutDist = $params->get ('imgOutDist','500');
$txtOutDist = $params->get ('txtOutDist','300');
$txtFx = $params->get ('txtFx','Fx.Transitions.Pow.easeInOut');
$imgFx = $params->get ('imgFx','Fx.Transitions.Cubic.easeOut');
$txtFxDuration = $params->get ('txtFxDuration','800');
$imgFxDuration = $params->get ('imgFxDuration','800');
$autoslide = $params->get ('autoslide','0');

$document = &JFactory::getDocument();
if (JPluginHelper::getPlugin('system', 'mtupgrade')) :
$moo_v = '12';
else:
$moo_v = '';
endif;
$document->addStyleSheet(JURI::base() . 'modules/mod_youstorage_slider/css/stylesheet.css');
$document->addScript(JURI::base() . 'modules/mod_youstorage_slider/src/youstorage_slider'.$moo_v.'.js');



if (preg_match( "/msie/",$who)){
if (preg_match("/msie 7/",$who) || preg_match("/msie 8/",$who)) {
echo '';
}else{
$document->addStyleSheet(JURI::base() . 'modules/mod_youstorage_slider/css/ifie.php');
}
}

$document->addScriptDeclaration("
window.addEvent('domready', function(){
new YouStorageSlider({

container:'slides',
slides:{
selector:'.slide',
texts:'.texts',
images:'.img_container'
},
navs:{
prev:'left',
next:'right'
},
txtDelay:".$txtDelay.",
imgOutDist:".$imgOutDist.",
txtOutDist:".$txtOutDist.",
txtFx: ".$txtFx.",
imgFx: ".$imgFx.",
txtFxDuration:".$txtFxDuration.",
imgFxDuration:".$imgFxDuration.",
autoslide:".$autoslide."
});
})
");

/* prepare database */
$db =& JFactory::getDBO();
$user =& JFactory::getUser();
$userId = (int) $user->get('id');
$aid = $user->get('aid', 0);
$contentConfig = &JComponentHelper::getParams( 'com_content' );
$access = !$contentConfig->get('shownoauth');
$nullDate = $db->getNullDate();
$date = & JFactory::getDate();
$now = $date->toMySQL(); //date('Y-m-d H:i:s');


$where = 'a.state = 1'
. ' AND ( a.publish_up = '.$db->Quote($nullDate).' OR a.publish_up <= '.$db->Quote($now).' )'
. ' AND ( a.publish_down = '.$db->Quote($nullDate).' OR a.publish_down >= '.$db->Quote($now).' )'
;
// select specific items
if(!empty($getspecific)){
$countitems = count($getspecific);
}
if(!empty($getspecific) && $countitems > 1 ){
$specificitems = implode(",", $getspecific);
$specific_order= 'field(a.id,'.$specificitems.')';
$where .= ' AND a.id IN ('.$specificitems.')';
}elseif(!empty($getspecific) && $countitems == 1 ){
$specificitems = $getspecific;
$specific_order= 'field(a.id,'.$specificitems.')';
$where .= ' AND a.id IN ('.$specificitems.')';
}else{
$specificitems='';
$specific_order='NULL';
$where .= ' AND cc.id = '.$get_items.'';
}
/* set items order */
$ord = array(
1=>'ordering',
2=>'hits',
3=>'RAND()',
4=>'created ASC',
5=>'created DESC',
6=>$specific_order
);
$order = $ord[$ordering];
/* get items */
$sql = 'SELECT a.*, ' .
' CASE WHEN CHAR_LENGTH(a.alias) THEN CONCAT_WS(":", a.id, a.alias) ELSE a.id END as slug,'.
' CASE WHEN CHAR_LENGTH(cc.alias) THEN CONCAT_WS(":", cc.id, cc.alias) ELSE cc.id END as catslug,'.
'cc.title as cattitle,'.
's.title as sectitle'.

' FROM #__content AS a' .
' INNER JOIN #__categories AS cc ON cc.id = a.catid' .
' INNER JOIN #__sections AS s ON s.id = a.sectionid' .
' WHERE '. $where .'' .
($access ? ' AND a.access <= ' .(int) $aid. ' AND cc.access <= ' .(int) $aid. ' AND s.access <= ' .(int) $aid : '').
' AND s.published = 1' .
' AND cc.published = 1' .
' ORDER BY '.$order .' LIMIT 0,'.$nitems.'';

$db->setQuery( $sql );
$load_items = $db->loadObjectList();


$youstorage_slides = array();
foreach ( $load_items as $row ) {
$youstorage_slide = array(
'intro' => substr(strip_tags($row->introtext),0,$chars),
'link' => ContentHelperRoute::getArticleRoute($row->slug, $row->catslug, $row->sectionid),
'title' => $row->title,
'img_url' => $img_url = article_imageyoustor($row),
'img_out' => "<img src=\"".$img_url."\" title=\"".$row->title." \" alt=\"\"/>"
);
$youstorage_slides[] = $youstorage_slide;
}

return $youstorage_slides;
}
}
?> 

چیکارش باید بکنم که محتوای لیست شده به شکل لیست بیاد یعنی همون شکلی که توی ادیتور تعیین میشه یعنی این طوری

* عنوان اول

* عنوان دوم

* عنوان سوم

Share this post


Link to post
Share on other sites
آموزش ووکامرس قالب جوملا قالب وردپرس قالب رایگان وردپرس قالب رایگان جوملا هاست نامحدود هاست جوملا هاست لاراول هاست وردپرس هاست ارزان هاست ربات تلگرام خرید دامنه آموزش ساخت ربات تلگرام با php آموزش html و css آموزش لاراول آموزش cPanel آموزش php آموزش سئو وردپرس آموزش امنیت وردپرس آموزش وردپرس آموزش فرم ساز RSform آموزش سئو جوملا آموزش فروشگاه ساز Hikashop آموزش فروشگاه ساز ویرچومارت آموزش طراحی سایت آگهی تبلیغاتی آموزش امنیت جوملا آموزش طراحی سایت فروش فایل آموزش طراحی قالب ریسپانسیو با Helix آموزش جوملا 3 آموزش ساخت ربات دکمه ی شیشه ای آموزش ساخت ربات همکاری در فروش آموزش ساخت ربات جذب ممبر آموزش ساخت ربات ضد اسپم آموزش ساخت ربات پیوست فایل سورس ربات مدیر گروه | ربات مدیر گروه همسریابی
سلام دوستان

مشکلی که بر خوردم اینه که توی یه ماژول اسلایدر تاتیل محتوا میاد متن درون محتوا به جای اینکه به صورت لیست عمودی بیاد پشت سر هم میاد.

توی فایل helper.php اومده ...

<?php
defined('_JEXEC') or die('Restricted access');

JHTML::_('behavior.mootools');
require_once (JPATH_SITE.DS.'components'.DS.'com_content'.DS.'h elpers'.DS.'route.php');
require_once('modules/mod_youstorage_slider/lib/slike.php');

class modYJYouStorageSliderhHelper
{
function getYouStorageSliderItems(&$params)
{

$who = strtolower($_SERVER['HTTP_USER_AGENT']);
$get_items = $params->get ('get_items',1);
$nitems = $params->get ('nitems',4);
$chars = $params->get ('chars',40);
$chars_nav = $params->get ('chars_nav',40);
$ordering = $params->get ('ordering',3);// 1 = ordering | 2 = popular | 3 = random
$getspecific = $params->get ('getspecific');


$slider_width = $params->get ('slider_width','980px');
$slider_height = $params->get ('slider_height','331px');
$slider_intro_width = $params->get ('slider_intro_width','415px');
$slider_image_width = $params->get ('slider_image_width','565px');
$slider_image_ptop = $params->get ('slider_image_ptop','110px');
$slider_image_pleft = $params->get ('slider_image_pleft','150px');

$txtDelay = $params->get ('txtDelay','10');
$imgOutDist = $params->get ('imgOutDist','500');
$txtOutDist = $params->get ('txtOutDist','300');
$txtFx = $params->get ('txtFx','Fx.Transitions.Pow.easeInOut');
$imgFx = $params->get ('imgFx','Fx.Transitions.Cubic.easeOut');
$txtFxDuration = $params->get ('txtFxDuration','800');
$imgFxDuration = $params->get ('imgFxDuration','800');
$autoslide = $params->get ('autoslide','0');

$document = &JFactory::getDocument();
if (JPluginHelper::getPlugin('system', 'mtupgrade')) :
$moo_v = '12';
else:
$moo_v = '';
endif;
$document->addStyleSheet(JURI::base() . 'modules/mod_youstorage_slider/css/stylesheet.css');
$document->addScript(JURI::base() . 'modules/mod_youstorage_slider/src/youstorage_slider'.$moo_v.'.js');



if (preg_match( "/msie/",$who)){
if (preg_match("/msie 7/",$who) || preg_match("/msie 8/",$who)) {
echo '';
}else{
$document->addStyleSheet(JURI::base() . 'modules/mod_youstorage_slider/css/ifie.php');
}
}

$document->addScriptDeclaration("
window.addEvent('domready', function(){
new YouStorageSlider({

container:'slides',
slides:{
selector:'.slide',
texts:'.texts',
images:'.img_container'
},
navs:{
prev:'left',
next:'right'
},
txtDelay:".$txtDelay.",
imgOutDist:".$imgOutDist.",
txtOutDist:".$txtOutDist.",
txtFx: ".$txtFx.",
imgFx: ".$imgFx.",
txtFxDuration:".$txtFxDuration.",
imgFxDuration:".$imgFxDuration.",
autoslide:".$autoslide."
});
})
");

/* prepare database */
$db =& JFactory::getDBO();
$user =& JFactory::getUser();
$userId = (int) $user->get('id');
$aid = $user->get('aid', 0);
$contentConfig = &JComponentHelper::getParams( 'com_content' );
$access = !$contentConfig->get('shownoauth');
$nullDate = $db->getNullDate();
$date = & JFactory::getDate();
$now = $date->toMySQL(); //date('Y-m-d H:i:s');


$where = 'a.state = 1'
. ' AND ( a.publish_up = '.$db->Quote($nullDate).' OR a.publish_up <= '.$db->Quote($now).' )'
. ' AND ( a.publish_down = '.$db->Quote($nullDate).' OR a.publish_down >= '.$db->Quote($now).' )'
;
// select specific items
if(!empty($getspecific)){
$countitems = count($getspecific);
}
if(!empty($getspecific) && $countitems > 1 ){
$specificitems = implode(",", $getspecific);
$specific_order= 'field(a.id,'.$specificitems.')';
$where .= ' AND a.id IN ('.$specificitems.')';
}elseif(!empty($getspecific) && $countitems == 1 ){
$specificitems = $getspecific;
$specific_order= 'field(a.id,'.$specificitems.')';
$where .= ' AND a.id IN ('.$specificitems.')';
}else{
$specificitems='';
$specific_order='NULL';
$where .= ' AND cc.id = '.$get_items.'';
}
/* set items order */
$ord = array(
1=>'ordering',
2=>'hits',
3=>'RAND()',
4=>'created ASC',
5=>'created DESC',
6=>$specific_order
);
$order = $ord[$ordering];
/* get items */
$sql = 'SELECT a.*, ' .
' CASE WHEN CHAR_LENGTH(a.alias) THEN CONCAT_WS(":", a.id, a.alias) ELSE a.id END as slug,'.
' CASE WHEN CHAR_LENGTH(cc.alias) THEN CONCAT_WS(":", cc.id, cc.alias) ELSE cc.id END as catslug,'.
'cc.title as cattitle,'.
's.title as sectitle'.

' FROM #__content AS a' .
' INNER JOIN #__categories AS cc ON cc.id = a.catid' .
' INNER JOIN #__sections AS s ON s.id = a.sectionid' .
' WHERE '. $where .'' .
($access ? ' AND a.access <= ' .(int) $aid. ' AND cc.access <= ' .(int) $aid. ' AND s.access <= ' .(int) $aid : '').
' AND s.published = 1' .
' AND cc.published = 1' .
' ORDER BY '.$order .' LIMIT 0,'.$nitems.'';

$db->setQuery( $sql );
$load_items = $db->loadObjectList();


$youstorage_slides = array();
foreach ( $load_items as $row ) {
$youstorage_slide = array(
'intro' => substr(strip_tags($row->introtext),0,$chars),
'link' => ContentHelperRoute::getArticleRoute($row->slug, $row->catslug, $row->sectionid),
'title' => $row->title,
'img_url' => $img_url = article_imageyoustor($row),
'img_out' => "<img src=\"".$img_url."\" title=\"".$row->title." \" alt=\"\"/>"
);
$youstorage_slides[] = $youstorage_slide;
}

return $youstorage_slides;
}
}
?> 

چیکارش باید بکنم که محتوای لیست شده به شکل لیست بیاد یعنی همون شکلی که توی ادیتور تعیین میشه یعنی این طوری

* عنوان اول

* عنوان دوم

* عنوان سوم

با سلام،

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

پیروز باشید

Share this post


Link to post
Share on other sites

ارسال شده در (ویرایش شده)

ممنون از توجهتون

دارم روی لوکال روی این قالب کار میکنم .

مشکل اینجاست که توی اسلایدری که وسط صفحه کار شده بعد از عنوان ، محتوای مطلب ی که من دارم به شکل لیست هست اما توی ماژول به صورت لیست نشون نمیده.

اینم CSS ماژول

.YSS_container {
display:block;
position:relative;
background:#F1F1F1 url(../images/overall_bg.jpg) repeat-x left top;
overflow:hidden;
margin:0 auto;
}
.YSS_container .inner-container {
display:block;
position:relative;
margin:0px auto;
}
/* NAVIGATION*/
.YSS_container div.navs {
display:block;
position:absolute;
height:52px;
left:20px;
bottom:0px;
z-index:1000;
background:url(../images/overall_bg.jpg) repeat-x left bottom;
}
.YSS_container div.navs a {
display:block;
position:relative;
float:left;
width:44px;
height:28px;
background-position:top left;
background-repeat:no-repeat;
}
.YSS_container div.navs #left {
background-image:url(../images/sliderarrows.png);
}
.YSS_container div.navs #right {
background-image:url(../images/sliderarrows.png);
background-position:top right;
}
.YSS_container div.navs #left:hover {
background-position:bottom left;
}
.YSS_container div.navs #right:hover {
background-position:bottom right;
}
/* END NAVIGATION*/
/* SLIDES*/
.YSS_container .slides {
display:block;
position:relative;
z-index:1;
}
.YSS_container .slide {
display:block;
position:relative;
clear:both;
z-index:1;
}
/* INTRO HOLDER */
.YSS_container .texts {
display:block;
float:left;
z-index:1;
}
.YSS_container .texts h3 {
display:block;
margin:50px 20px 20px;
font-weight:normal;
font-size:36px;
}
.YSS_container .texts p {
display:block;
color:#FFF;
margin:10px 20px 10px;
padding:0px;

}
.YSS_container .image-container, .YSS_container .inner-image {
display:block;
float:right;
}
.YSS_container .inner-image {
background:url(../images/cloud.png) center top no-repeat;
}
.YSS_container .inner-image .img_container {
display:block;
}
/* READ MORE*/
.YSS_container .slider_button {
width:136px;
height:40px;
display:block;
float:right;
margin:0 30px 0 0;
line-height:40px;
text-align:center;
text-transform:uppercase;
background:url(../images/slider_button.png) no-repeat;
}
/* MODULE HOLDER RESET */
.yjsquare_youstorage_slider, .yjsquare_youstorage_slider .yjsquare_in, .yjround_youstorage_slider, .yjround_youstorage_slider .yjround_in, .module_youstorage_slider, .moduletable_youstorage_slider {
margin:0;
padding:0;
}

تشکر

ویرایش شده در توسط morid

Share this post


Link to post
Share on other sites

بله،

الان قالب رو دیدم و حتما اسلایدر بالای صفحه که تو موقعیت adv1 هست مد نظرتون باید باشه:

http://joomla1.5.youjoomla.info/youstorage/?tp=1

اما من متوجه نمیشم دقیقا چه شکلی نشون میده دوست من؟

یه اسکرین شات می تونید بگیرید ببینیم وضعیت چه طور به هم ریخته؟

Share this post


Link to post
Share on other sites

بله دقیقا

[ATTACH=CONFIG]316[/ATTACH]

[ATTACH=CONFIG]315[/ATTACH]

مشکل اینجاست که توی اسلایدری که وسط صفحه کار شده بعد از عنوان ، محتوای مطلب ی که من دارم به شکل لیست هست اما توی ماژول به صورت لیست نشون نمیده.

Share this post


Link to post
Share on other sites
بله دقیقا

مشکل اینجاست که توی اسلایدری که وسط صفحه کار شده بعد از عنوان ، محتوای مطلب ی که من دارم به شکل لیست هست اما توی ماژول به صورت لیست نشون نمیده.

morid جان،

حقیقا نظر دادن در مورد این اینجوری خیلی سخته. چون احتمالات متفاوتی هست که باید هرکدم آزمایش و خطا بشه. تنها چیزی که تو حالت local و این عکس ها می تونم بگم اینه که:

1) جاوا اسکریپت مورد استفاده ممکنه درست لود نشده باشه.

2) ممکنه پیشوند ماژول مورد استفاده درست نباشه.

3) ممکنه ماژول توی جای مناسبش نباشه.

4) ممکنه css یا js ای توی صفحه با این اسلایدر تداخل داشته باشه.

در نهایت اگه روی لوکال هستی، می تونی بسته easy-setup این قالب رو نصب کنی و این مقایسه ها رو انجام بدی و به نتیجه برسی یا روی یه جای قابل دسترس ببری که همه مشکلات رو بتونین ببینن.

پیروز باشید

Share this post


Link to post
Share on other sites

ارسال شده در (ویرایش شده)

ممنون از وقتی که گذاشتید .

به نظرم میرسه طوری کدنویسی شده که فقط متن رو در محتوای اسلایدر نمایش میده و کاری به ساختاری که از طریق ادیتور به محتوا می دیم نداره در واقع تگ </ br> رو اجرا نمی کنه برای اینکه هر کدوم از محتوا بره سطر بعد

در واقع من میخوام به شکل زیر نمایش بده

  • سطر یک
  • سطر دو
  • سطر سه

اما پشت سرهم نشون میده ...

.سطر یک .سطر دو.سطر سه

مثل تصاویری که ضمیمه پست قبل کردم.

ویرایش شده در توسط morid

Share this post


Link to post
Share on other sites
ممنون از وقتی که گذاشتید .

به نظرم میرسه طوری کدنویسی شده که فقط متن رو در محتوای اسلایدر نمایش میده و کاری به ساختاری که از طریق ادیتور به محتوا می دیم نداره در واقع تگ </ br> رو اجرا نمی کنه برای اینکه هر کدوم از محتوا بره سطر بعد

در واقع من میخوام به شکل زیر نمایش بده

  • سطر یک
  • سطر دو
  • سطر سه

اما پشت سرهم نشون میده ...

.سطر یک .سطر دو.سطر سه

مثل تصاویری که ضمیمه پست قبل کردم.

آها، الان متوجه منظورتون از عکس ها شدم. من فکر کردم گزینه های اسلاید ها رو نشون نمیده و لیست می کنه. شما محتوای داخل هر اسلاید مدنظرتون بود. بله همین طوره. دلیلش استفاده از تابع strip_tags() هست که روی $row->introtext اعمال شده.

شما این کد رو جایگزین کنید:

strip_tags($row->introtext,'<br>')

که صورت کلی فایل helper میشه:

<?php
defined('_JEXEC') or die('Restricted access');

JHTML::_('behavior.mootools');
require_once (JPATH_SITE.DS.'components'.DS.'com_content'.DS.'h elpers'.DS.'route.php');
require_once('modules/mod_youstorage_slider/lib/slike.php');

class modYJYouStorageSliderhHelper
{
function getYouStorageSliderItems(&$params)
{

$who = strtolower($_SERVER['HTTP_USER_AGENT']);
$get_items = $params->get ('get_items',1);
$nitems = $params->get ('nitems',4);
$chars = $params->get ('chars',40);
$chars_nav = $params->get ('chars_nav',40);
$ordering = $params->get ('ordering',3);// 1 = ordering | 2 = popular | 3 = random
$getspecific = $params->get ('getspecific');


$slider_width = $params->get ('slider_width','980px');
$slider_height = $params->get ('slider_height','331px');
$slider_intro_width = $params->get ('slider_intro_width','415px');
$slider_image_width = $params->get ('slider_image_width','565px');
$slider_image_ptop = $params->get ('slider_image_ptop','110px');
$slider_image_pleft = $params->get ('slider_image_pleft','150px');

$txtDelay = $params->get ('txtDelay','10');
$imgOutDist = $params->get ('imgOutDist','500');
$txtOutDist = $params->get ('txtOutDist','300');
$txtFx = $params->get ('txtFx','Fx.Transitions.Pow.easeInOut');
$imgFx = $params->get ('imgFx','Fx.Transitions.Cubic.easeOut');
$txtFxDuration = $params->get ('txtFxDuration','800');
$imgFxDuration = $params->get ('imgFxDuration','800');
$autoslide = $params->get ('autoslide','0');

$document = &JFactory::getDocument();
if (JPluginHelper::getPlugin('system', 'mtupgrade')) :
$moo_v = '12';
else:
$moo_v = '';
endif;
$document->addStyleSheet(JURI::base() . 'modules/mod_youstorage_slider/css/stylesheet.css');
$document->addScript(JURI::base() . 'modules/mod_youstorage_slider/src/youstorage_slider'.$moo_v.'.js');



if (preg_match( "/msie/",$who)){
if (preg_match("/msie 7/",$who) || preg_match("/msie 8/",$who)) {
echo '';
}else{
$document->addStyleSheet(JURI::base() . 'modules/mod_youstorage_slider/css/ifie.php');
}
}

$document->addScriptDeclaration("
window.addEvent('domready', function(){
new YouStorageSlider({

container:'slides',
slides:{
selector:'.slide',
texts:'.texts',
images:'.img_container'
},
navs:{
prev:'left',
next:'right'
},
txtDelay:".$txtDelay.",
imgOutDist:".$imgOutDist.",
txtOutDist:".$txtOutDist.",
txtFx: ".$txtFx.",
imgFx: ".$imgFx.",
txtFxDuration:".$txtFxDuration.",
imgFxDuration:".$imgFxDuration.",
autoslide:".$autoslide."
});
})
");

/* prepare database */
$db =& JFactory::getDBO();
$user =& JFactory::getUser();
$userId = (int) $user->get('id');
$aid = $user->get('aid', 0);
$contentConfig = &JComponentHelper::getParams( 'com_content' );
$access = !$contentConfig->get('shownoauth');
$nullDate = $db->getNullDate();
$date = & JFactory::getDate();
$now = $date->toMySQL(); //date('Y-m-d H:i:s');


$where = 'a.state = 1'
. ' AND ( a.publish_up = '.$db->Quote($nullDate).' OR a.publish_up <= '.$db->Quote($now).' )'
. ' AND ( a.publish_down = '.$db->Quote($nullDate).' OR a.publish_down >= '.$db->Quote($now).' )'
;
// select specific items
if(!empty($getspecific)){
$countitems = count($getspecific);
}
if(!empty($getspecific) && $countitems > 1 ){
$specificitems = implode(",", $getspecific);
$specific_order= 'field(a.id,'.$specificitems.')';
$where .= ' AND a.id IN ('.$specificitems.')';
}elseif(!empty($getspecific) && $countitems == 1 ){
$specificitems = $getspecific;
$specific_order= 'field(a.id,'.$specificitems.')';
$where .= ' AND a.id IN ('.$specificitems.')';
}else{
$specificitems='';
$specific_order='NULL';
$where .= ' AND cc.id = '.$get_items.'';
}
/* set items order */
$ord = array(
1=>'ordering',
2=>'hits',
3=>'RAND()',
4=>'created ASC',
5=>'created DESC',
6=>$specific_order
);
$order = $ord[$ordering];
/* get items */
$sql = 'SELECT a.*, ' .
' CASE WHEN CHAR_LENGTH(a.alias) THEN CONCAT_WS(":", a.id, a.alias) ELSE a.id END as slug,'.
' CASE WHEN CHAR_LENGTH(cc.alias) THEN CONCAT_WS(":", cc.id, cc.alias) ELSE cc.id END as catslug,'.
'cc.title as cattitle,'.
's.title as sectitle'.

' FROM #__content AS a' .
' INNER JOIN #__categories AS cc ON cc.id = a.catid' .
' INNER JOIN #__sections AS s ON s.id = a.sectionid' .
' WHERE '. $where .'' .
($access ? ' AND a.access <= ' .(int) $aid. ' AND cc.access <= ' .(int) $aid. ' AND s.access <= ' .(int) $aid : '').
' AND s.published = 1' .
' AND cc.published = 1' .
' ORDER BY '.$order .' LIMIT 0,'.$nitems.'';

$db->setQuery( $sql );
$load_items = $db->loadObjectList();


$youstorage_slides = array();
foreach ( $load_items as $row ) {
$youstorage_slide = array(
'intro' => substr(strip_tags($row->introtext,'<br>'),0,$chars),
'link' => ContentHelperRoute::getArticleRoute($row->slug, $row->catslug, $row->sectionid),
'title' => $row->title,
'img_url' => $img_url = article_imageyoustor($row),
'img_out' => "<img src=\"".$img_url."\" title=\"".$row->title." \" alt=\"\"/>"
);
$youstorage_slides[] = $youstorage_slide;
}

return $youstorage_slides;
}
}
?>

پیروز باشید

Share this post


Link to post
Share on other sites

البته به نظر میاد کد html ای که اونجا فیلتر شده لیست باشه، اگه این طور باشه، تابع رو این شکلی تغییر بدید:

strip_tags($row->introtext,'<br><ul><li>')

Share this post


Link to post
Share on other sites

آیا میشه طوری تنظیم کرد که بدون </ br> این اتفاق بیفته یعنی با ساخت سطر توی ادیتور

Share this post


Link to post
Share on other sites
آیا میشه طوری تنظیم کرد که بدون </ br> این اتفاق بیفته یعنی با ساخت سطر توی ادیتور

دقیقا متوجه منظورتون نشدم. ولی دقیق تر بگم شما هر تگی که در پارامتر دومتون اعلام کنید حذف نخواهد شد و به غیر از اون تگ(های) اعلام شده، هر تگی هست حذف خواهد شد:

http://php.net/manual/en/function.strip-tags.php

Share this post


Link to post
Share on other sites

خیلی عالی ، سپاسگزارم

مشکل حل شد.

فقط متن از رنگ سفید(رنگ متن اسلایدر) به رنگ خاکستری (رنگ پیش فرض محتوا) تغییر رنگ میده

Share this post


Link to post
Share on other sites
خیلی عالی ، سپاسگزارم

مشکل حل شد.

فقط متن از رنگ سفید(رنگ متن اسلایدر) به رنگ خاکستری (رنگ پیش فرض محتوا) تغییر رنگ میده

خدا رو شکر که مشکلتون حل شد.

اگه اون رنگ براتون خیلی مهم هست، می تونین نگاه کنید که کدوم تگ html یا کلاس css حاوی اون رنگ یا استایل مربوطه است و اون رو آزاد کنید. البته یادتون نگه دارید که اگه هر تگی رو آزاد کنید، ممکنه استایل ماژول شما رو به هم بریزه

پیروز باشید

Share this post


Link to post
Share on other sites

از طریق CSS اومدم و به .YSS_container .texts رنگ سفید تخصیص دادم

از لطف و عنایت شما تشکر می کنم. :)

Share this post


Link to post
Share on other sites

سلام

اگر بخوام توی اسلایدر "ادامه مطلب" یا در واقع "More info" به جای ادامه همون مطلب به یک مطلب دیگه لینک بشه باید چیکار کنم ؟

Share this post


Link to post
Share on other sites

مطلبش ثابت ه ... من هشت تا مطلب رو برای خوراک اسلایدر انتخاب کردم، از این طریق عکس و متن اسلایدر تغذیه میشه .

نکته اینجاست که نمیخوام با کلیک روی More info برم به صفحه این مطالب میخوام برم به صفحه ثابتی که در نظر گرفتم یعنی هر هشت More info ی که هست بره به هشت تا مطلب دیگه که ثابت و ایجاد شده هستن

ممنون از توجهتون

Share this post


Link to post
Share on other sites

با سلام،

لطفا به قوانین احترام بگذارید و نظم انجمن رو با مطالب غیرمرتبط با یکدیگر به صورت یک موضوع به هم نریزید. این به نفع همه است.

با تشکر از توجه شما،

نوین فرد

Share this post


Link to post
Share on other sites

برای ارسال نظر یک حساب کاربری ایجاد کنید یا وارد حساب خود شوید

برای اینکه بتوانید نظر ارسال کنید نیاز دارید که کاربر سایت شوید

ایجاد یک حساب کاربری

برای حساب کاربری جدید در انجمن ما ثبت نام کنید. عضویت خیلی ساده است !


ثبت نام یک حساب کاربری جدید

ورود به حساب کاربری

دارای حساب کاربری هستید؟ از اینجا وارد شوید


ورود به حساب کاربری