PDA

توجه ! این یک نسخه آرشیو شده میباشد و در این حالت شما عکسی را مشاهده نمیکنید برای مشاهده کامل متن و عکسها بر روی لینک مقابل کلیک کنید : تگ های سایت http://www.joomlafarsi.com/last-steps-to-joomla-25-20111130230/



mohammad3690
12-01-2011, 06:18 PM
سلام در لینک زیر یک
<b><font color=red>فقط کاربران عضو انجمن می توانند لینک ها را مشاهده کنند</font></b>
(<b><font color=red>فقط کاربران عضو انجمن می توانند لینک ها را مشاهده کنند</font></b>) یک قسمت تگ وجود دارد چطور اون تگ ها را در جوملا درست کنم؟؟؟؟؟؟؟؟؟؟؟
10 آذر 1390فف

safajuy
12-01-2011, 06:33 PM
سلام
با استفاده از اين كامپوننت مي تونيد بر چسب براي مطالبتون تعيين كنيد:
<b><font color=red>فقط کاربران عضو انجمن می توانند لینک ها را مشاهده کنند</font></b>

موفق باشيد

mohammad3690
12-18-2011, 06:09 PM
سپاس من ا ز این کامپونت استفاده کردم ولی می خواهم مثل این سایت بک گراند اش ابی واون عکس ابی تگ هم داشته باشه
<b><font color=red>فقط کاربران عضو انجمن می توانند لینک ها را مشاهده کنند</font></b>

safajuy
12-18-2011, 07:13 PM
سلام

مي تونيد براي اين كامپوننت استايل بسازيد و تغييرش بديد.

به پوشه Components بريد و com_tag رو پيدا كنيد و دنبال فايل CSS اون بگيريد وتغييرش بديد.

مي تونيد همون استايل هاي كامپوننت رو توي CSS قالب پياده كنيد

موفق باشيد

mohammad3690
02-09-2012, 05:55 PM
سلام من از این کامپونت استفاده کردم ولی وقتی می خواهم به یک مطالب که در یک بلاگ است تگ بدهم به اون مطالب تگ نمی دهد فقط به مطالب صفحه اول میشه تگ داد میشه یک کامپونت معرفی کنید که به تمام مطالب تگ بدهد

safajuy
02-09-2012, 06:56 PM
اين كامپوننت بهمراه پلاگين هستش.

پلاگينش رو فعال كنيد

در ضمن اين كامپوننت تگ ها رو بصورت دستي قرار ميده و شما خودتون تعيين ميكنيد كه چه تگي بذاريد

البته امكان واردكردن تگ ها از متا كي ها هست

موفق باشيد

mohammad3690
02-11-2012, 10:18 AM
سلام وقتی من گزینه مقالاب مشابه در قسمت تنظیمات این کامپونت فعلا می کنم ارور زیر را می دهم
Notice: Undefined variable: relatedArticlesCount in C:\wamp\<b><font color=red>فقط کاربران عضو انجمن می توانند لینک ها را مشاهده کنند</font></b> on line149

$article->text=$tagResult.$article->text.$tagResult; }else{
$article->text.=$tagResult;
}
}


}
$showAddTagButton=JoomlaTagsHelper::param('ShowAdd TagButton');
if($showAddTagButton){
$user =& JFactory::getUser();


$canEdit=$this->canUserAddTags($user,$article->id);
if($canEdit){
$Itemid = JRequest::getVar( 'Itemid', false);
if ( is_numeric($Itemid) ){
$Itemid = intval($Itemid);
}
else{
$Itemid = 1;
}
$article->text.=$this->addTagsButtonsHTML($article->id,$Itemid,$havingTags);
}
}


if($showRelatedArticles&&!empty($termIds)&&($view=='article')){
$article->text.=$this->showReleatedArticlesByTags($article->id,$termIds);
}
return true;
}


function showReleatedArticlesByTags($articleId,$termIds){
$count=JoomlaTagsHelper::param('RelatedArticlesCou ntByTags',10);
$relatedArticlesTitle=JoomlaTagsHelper::param('Rel atedArticlesTitleByTags',"Related Articles");
//$max=max(intval($relatedArticlesCount),array_count _values($termIds));
$max=max(intval($relatedArticlesCount),count($term Ids));
$termIds=array_slice($termIds,0,$max);
$termIdsCondition=@implode(',',$termIds);
//find the unique article ids
$query=' select distinct cid from #__tag_term_content where tid in ('.$termIdsCondition.') and cid<>'.$articleId;
$db =& JFactory::getDBO();
$db ->setQuery($query);


$cids=$db->loadResultArray(0);


$nullDate = $db->getNullDate();
$date =& JFactory::getDate();
$now = $date->toMySQL();


$where = ' a.id in('.@implode(',',$cids).') AND 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).' )'
;


// Content Items only
$query = 'SELECT a.id,a.title, a.alias,a.access,a.sectionid, ' .
' 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'.
' 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 .' AND s.id > 0' .
' AND s.published = 1' .
' AND cc.published = 1';
$db->setQuery($query, 0, $count);
$rows = $db->loadObjectList();


if(empty($rows)){
return '';
}
$user =& JFactory::getUser();
$aid = $user->get('aid', 0);

$html='<div class="relateditemsbytags"><h3>'.$relatedArticlesTitle.'</h3><ul class="relateditems">';
$link;
foreach ( $rows as $row )
{


if($row->access <= $aid)
{
$link = JRoute::_(ContentHelperRoute::getArticleRoute($row->slug, $row->catslug, $row->sectionid));
} else {
$link = JRoute::_('index.php?option=com_user&view=login');
}
$html.='<li> <a href="'.$link.'">'.htmlspecialchars( $row->title ).'</a></li>';
}
$html.='</ul></div>';
return $html;


}




function canUserAddTags($user, $article_id)
{
// A user must be logged in to add attachments
if ( $user->get('username') == '' ) {
return false;
}


// If the user generally has permissions to add content, they qualify.
// (editor, publisher, admin, etc)
// NOTE: Exclude authors since they need to be handled separately.
$user_type = $user->get('usertype', false);
if ( ($user_type != 'Author') &&
$user->authorize('com_content', 'add', 'content', 'all') ) {
return true;
}


// Make sure the article is valid and load its info
if ( $article_id == null || $article_id == '' || !is_numeric($article_id) ) {
return false;
}
$db =& JFactory::getDBO();
$query = "SELECT created_by from #__content WHERE id='" . $article_id . "'";
$db->setQuery($query);
$rows = $db->loadObjectList();
if ( count($rows) == 0 ) {
return false;
}
$created_by = $rows[0]->created_by;


//the created author can add tags.
if($user->get('id') == $created_by){
return true;
}




// No one else is allowed to add articles
return false;
}
function addTagsButtonsHTML($article_id, $Itemid, $havingTags)
{
$document = & JFactory::getDocument();
$document->addScript( JURI::root(true).'/media/system/js/modal.js' );
JHTML::_('behavior.modal', 'a.modal');


// Generate the HTML for a button for the user to click to get to a form to add an attachment
$url = "index.php?option=com_tag&task=add&refresh=1&article_id=".$article_id;


$url = JRoute::_($url);
$icon_url = JURI::Base() . 'components/com_tag/images/logo.png';


$add_tag_txt;
if($havingTags){
$add_tag_txt = JText::_('EDIT TAGS');
}else{
$add_tag_txt = JText::_('ADD TAGS');
}
$ahead = '<a class="modal" type="button" href="' . $url . '" ';اين خط 149 است
$ahead .= "rel=\"{handler: 'iframe', size: {x: 500, y: 260}}\">";
$links = "$ahead<img src=\"$icon_url\" /></a>";
$links .= $ahead.$add_tag_txt."</a>";
return "\n<div class=\"addtags\">$links</div>\n";


}
/**
* Auto extract meta keywords as tags
*
* @param $article
* @param $isNew
* @return unknown_type
*/
function onAfterContentSave( &$article, $isNew )
{
$autoMetaKeywordsExtractor=$FrontPageTag=JoomlaTag sHelper::param('autoMetaKeywordsExtractor');
if($autoMetaKeywordsExtractor){


if($isNew){
$tags=$article->metakey;
$id = $article->id;
$combined = array();
$combined[$id]=$tags;


require_once(JPATH_ADMINISTRATOR.DS.'components'.D S.'com_tag'.DS.'models'.DS.'tag.php');
$tmodel = new TagModelTag();
$tmodel->batchUpdate($combined);
}
}


return true;
}






}
//end class

?>
$ahead = '<a class="modal" type="button" href="' . $url . '" ';اين خط 149 است

mohammad3690
02-12-2012, 10:57 AM
کسی نبود جواب مرا بدهد

shmata
02-12-2012, 11:42 AM
بنده این قسمت
سلام وقتی من گزینه مقالاب مشابه در قسمت تنظیمات این کامپونت فعلا می کنم ارور زیر را می دهم را متوجه نشدم
ولی این Notice با غیر فعال کردن
display_error در تنظیمات php.ini محو خواهد شد.