زمان کنونی: ۱۷-۲-۱۴۰۳, ۰۳:۰۰ عصر درود مهمان گرامی! (ورودثبت نام)


ارسال پاسخ 
 
امتیاز موضوع:
  • 0 رأی - میانگین امتیازات: 0
  • 1
  • 2
  • 3
  • 4
  • 5
مشکل در پلاگین CB Author Plug
۲۹-۱۱-۱۳۹۰, ۰۸:۲۳ عصر
ارسال: #1
مشکل در پلاگین CB Author Plug
سلام
من وقتی پلاگین CB Author Plug رو نصب می کنم نمی دونم چرا در مدیریت رسانه های جوملا این ارور می یاد.
کسی می تونه بفهمه چرا این ارور می یاد
Fatal error: Call to undefined method JAdministrator::getPageParameters() in /home/gamentec/public_html/plugins/content/cbauthorplug/cbauthorplug.php on line 81
دیدن لینک ها برای شما امکان پذیر نیست. لطفا ثبت نام کنید یا وارد حساب خود شوید تا بتوانید لینک ها را ببینید.

اگه کسی کمکم کنه یک دنیا ممنون می شم.RoseRoseInlove
مشاهده‌ی وب‌سایت کاربر یافتن تمامی ارسال‌های این کاربر
نقل قول این ارسال در یک پاسخ بازگشت به بالا
۳۰-۱۱-۱۳۹۰, ۰۲:۴۰ صبح
ارسال: #2
RE: مشکل در پلاگین CB Author Plug
کدهای زیر را در فایل cbauthorplug.php کنید و تست کنید !
بک اپ از این فایل فراموش نشود !!!

<?php
/**
* @version SVN: $Id$
* @package    CBAuthorPlug
* @subpackage Base
* @author     Tony Korologos {@link http://www.tkserver.com}
* @author     Created on 10-Sept-2011  updated 11-Sept-11
*/

//-- No direct access
defined('_JEXEC') or die('=;)');


jimport( 'joomla.plugin.plugin' );

jimport( 'joomla.html.parameter' );
        

            

class plgContentCBAuthorPlug extends JPlugin
{
    

    
    function plgContentCBAuthorPlug( &$subject, $params )
    {
        parent::__construct( $subject, $params );
        
            
    }
    
             
    function onPrepareContent( &$article, &$params, $limitstart )
    
    {
    
    }
    
    
function onAfterDisplayTitle( &$article, &$params, $limitstart )
    {
            //$plugin = & JPluginHelper::getPlugin('content', 'cbauthorplug');
            //$pluginParams   = new JParameter( $plugin->params );
            
            //$disablejauthor = $this->params->def('disablejauthor');
            $disablejauthor = $this->params->def('disablejauthor');
            
            
            $exclude_authors = explode(',',$exclude_authors1);
            foreach ($exclude_authors as $id) {
                if ($row->created_by == (int)trim($id)) {
                    return;
                }
            }
            
            
            $exclude_cats = explode(',',$exclude_cats1);
            foreach ($exclude_cats as $id) {
                if ($row->catid == (int)trim($id)) {
                    return;
                }
            }    
                            if ($disablejauthor == "yes" ) {
                            $article->author = "";
                                        
                            }

    }
    
    
public function onContentBeforeDisplay($context, &$row, &$params, $page=0)
    {

        // fix j1.6 media manager bug
        $curoption = JRequest::getVar('option');
        if ($curoption != "com_media"){
        
        $app = JFactory::getApplication();
        $parameter = new JParameter($row->attribs);
        
        $displayposition = $this->params->def('displayposition');
        $mainframe = JFactory::getApplication();
            
        $global_page_show_author = $mainframe->getPageParameters()->get('show_author');
        $article_show_author = $parameter->get('show_author',null);    

    
        if     ($displayposition == 'After'){ return; }

            $exclude_authors1 = $this->params->def('exclude_authors');
            $exclude_cats1 = $this->params->def('exclude_cats');
            $showfrontpage = $this->params->def('showfrontpage');
            $showavatar = $this->params->def('showavatar');
            $avatarwidth = $this->params->def('avatarwidth');
            $avatarmarginleft = $this->params->def('avatarmarginleft');
            $avatarmarginright = $this->params->def('avatarmarginright');
            $avatarfloat = $this->params->def('avatarfloat');
            $introtext = $this->params->def('introtext', '');
            $outrotext = $this->params->def('outrotext', '');
            $showname = $this->params->def('showname', 'name');
            $textfloat = $this->params->def('textfloat');
            $fontsize = $this->params->def('fontsize');
            $textcolor = $this->params->def('textcolor');
            $linkcolor = $this->params->def('linkcolor');
            $disablejauthor = $this->params->def('disablejauthor');
            
                    $exclude_authors = explode(',',$exclude_authors1);
                    foreach ($exclude_authors as $id) {
                        if ($row->created_by == (int)trim($id)) {
                            return;
                        }
                    }
                    
                    
                    $exclude_cats = explode(',',$exclude_cats1);
                    foreach ($exclude_cats as $id) {
                        if ($row->catid == (int)trim($id)) {
                            return;
                        }
                    }        
    
    if ($disablejauthor == "no" ) {
            
            
            $database = &JFactory::getDbo();
            $uri = & JFactory::getURI();
            $sql = "SELECT $showname from #__users where id = '$row->created_by' LIMIT 1";
            $database->setQuery($sql);
            $cbname = $database->loadResult();
            $sql2 = "SELECT avatar FROM #__comprofiler WHERE user_id = '$row->created_by' AND avatarapproved = 1 LIMIT 1";
            $database->setQuery($sql2);
            $avatar = $database->loadResult();    
            $sql4 = "SELECT * FROM #__content_frontpage WHERE content_id = '$row->id' LIMIT 1";
            $database->setQuery($sql4);
            $onfrontpage = $database->loadResult();        
            
            $tn = 'tn';
        
        if(($showfrontpage == 'no') && ($onfrontpage)) { return; }
                
        if($showavatar == 0) {$avatar = '';}
        if(strstr($avatar,'gallery'))
            {
            $tn = '';
            }
    
        $createdbyauthor     = $row->created_by_alias;
        $createdby_id = $row->created_by;
        
        return '<!-- CSS STYLES -->

                <style type="text/css">
                <!--

                div.idcbauthorplug {'. '
                font-size: ' . $fontsize . 'px;
                color: ' . $textcolor . ';
                float: ' . $textfloat . ';
                
                }
                
                div.idcbauthorplug a {'. '
                font-size: ' . $fontsize . 'px;
                color: ' . $linkcolor . ';
                
                }
            
                div.cbauthorplug img {
                border-style: none;
                width: ' . $avatarwidth . 'px;
                margin-right: ' . $avatarmarginright . 'px;
                margin-left: ' . $avatarmarginleft . 'px;
                float: ' . $avatarfloat . ';
            }
            
            --></style>'
            . '<div class="cbauthorplug"><a href="index.php?option=com_comprofiler&task=userProfile&user=' . $createdby_id
            . '"><img src="images/comprofiler/' . $tn . $avatar . '"></a><div class="idcbauthorplug">' . $introtext
            . '<a href="index.php?option=com_comprofiler&task=userProfile&user=' . $createdby_id . '"> '. $cbname . '</a> ' . $outrotext . '</div></div>';
            
             }
            
             // end if $disablejauthor no
            
    if ($disablejauthor == "yes" ) {
        

        if($article_show_author == "1") {$showcbap = 'yes';}        
        if($article_show_author == "0") {$showcbap = 'no';}
        if($global_page_show_author == "1" && $article_show_author == NULL){$showcbap = 'yes';}
        if($global_page_show_author == "0" && $article_show_author == NULL){$showcbap = 'no';}
                
        if($showcbap == 'yes'){
        $database = &JFactory::getDbo();
        $uri = & JFactory::getURI();
        $sql = "SELECT $showname from #__users where id = '$row->created_by' LIMIT 1";
        $database->setQuery($sql);
        $cbname = $database->loadResult();
        $sql2 = "SELECT avatar FROM #__comprofiler WHERE user_id = '$row->created_by' AND avatarapproved = 1 LIMIT 1";
        $database->setQuery($sql2);
        $avatar = $database->loadResult();    
        $sql3 = "SELECT state FROM #__content WHERE id = '$row->id' LIMIT 1";
        $database->setQuery($sql3);
        $pubstate = $database->loadResult();
        $sql4 = "SELECT * FROM #__content_frontpage WHERE content_id = '$row->id' LIMIT 1";
        $database->setQuery($sql4);
        $onfrontpage = $database->loadResult();    
            
        $tn = 'tn';
                
        if(($showfrontpage == 'no') && ($onfrontpage)) {
        
        return; }
        
                                
        if($showavatar == 0) {$avatar = '';}
        if(strstr($avatar,'gallery'))
            {
            $tn = '';
            }
    
        $createdbyauthor     = $row->created_by_alias;
        $createdby_id = $row->created_by;
        
        return '<!-- CSS STYLES -->

                <style type="text/css">
                <!--

                dd.createdby {display: none;}
                
                div.idcbauthorplug {'. '
                font-size: ' . $fontsize . 'px;
                color: ' . $textcolor . ';
                float: ' . $textfloat . ';
                
                }
                
                div.idcbauthorplug a {'. '
                font-size: ' . $fontsize . 'px;
                color: ' . $linkcolor . ';
                
                }
            
                div.cbauthorplug img {
                border-style: none;
                width: ' . $avatarwidth . 'px;
                margin-right: ' . $avatarmarginright . 'px;
                margin-left: ' . $avatarmarginleft . 'px;
                float: ' . $avatarfloat . ';
            }
            
            --></style>'
            . '<div class="cbauthorplug"><a href="index.php?option=com_comprofiler&task=userProfile&user=' . $createdby_id
            . '"><img src="images/comprofiler/' . $tn . $avatar . '"></a><div class="idcbauthorplug">' . $introtext
            . '<a href="index.php?option=com_comprofiler&task=userProfile&user=' . $createdby_id . '"> '. $cbname . '</a> ' . $outrotext
            .  '</div></div>';
            }
       }
      
       }  // end if curoption
    }  
  
public function onContentAfterDisplay($context, &$row, &$params, $page=0) {

        // fix j1.6 media manager bug
            $curoption = JRequest::getVar('option');
            if ($curoption != "com_media"){

            $app = JFactory::getApplication();
            $parameter = new JParameter($row->attribs);
            
            $displayposition = $this->params->def('displayposition');
            $mainframe = JFactory::getApplication();
                
            $global_page_show_author = $mainframe->getPageParameters()->get('show_author');
            $article_show_author = $parameter->get('show_author',null);    

            
            //$plugin = & JPluginHelper::getPlugin('content', 'cbauthorplug');
            //$pluginParams   = new JParameter( $plugin->params );
            $displayposition = $this->params->def('displayposition');
        
            if     ($displayposition == 'Before'){ return; }

            $exclude_authors1 = $this->params->def('exclude_authors');
            $exclude_cats1 = $this->params->def('exclude_cats');
            $showfrontpage = $this->params->def('showfrontpage');
            $showavatar = $this->params->def('showavatar');
            $avatarwidth = $this->params->def('avatarwidth');
            $avatarmarginleft = $this->params->def('avatarmarginleft');
            $avatarmarginright = $this->params->def('avatarmarginright');
            $avatarfloat = $this->params->def('avatarfloat');
            $introtext = $this->params->def('introtext', '');
            $outrotext = $this->params->def('outrotext', '');
            $showname = $this->params->def('showname', 'name');
            $textfloat = $this->params->def('textfloat');
            $fontsize = $this->params->def('fontsize');
            $textcolor = $this->params->def('textcolor');
            $linkcolor = $this->params->def('linkcolor');
            $disablejauthor = $this->params->def('disablejauthor');
            
            
            $exclude_authors = explode(',',$exclude_authors1);
            foreach ($exclude_authors as $id) {
                if ($row->created_by == (int)trim($id)) {
                    return;
                }
            }
            
            
            $exclude_cats = explode(',',$exclude_cats1);
            foreach ($exclude_cats as $id) {
                if ($row->catid == (int)trim($id)) {
                    return;
                }
            }    
    
            if ($disablejauthor == "no" ) {
            
        $database = &JFactory::getDbo();
        $uri = & JFactory::getURI();
        $sql = "SELECT $showname from #__users where id = '$row->created_by' LIMIT 1";
        $database->setQuery($sql);
        $cbname = $database->loadResult();
        $sql2 = "SELECT avatar FROM #__comprofiler WHERE user_id = '$row->created_by' AND avatarapproved = 1 LIMIT 1";
        $database->setQuery($sql2);
        $avatar = $database->loadResult();    
        $sql4 = "SELECT * FROM #__content_frontpage WHERE content_id = '$row->id' LIMIT 1";
        $database->setQuery($sql4);
        $onfrontpage = $database->loadResult();        
        
        $tn = 'tn';
        
        if(($showfrontpage == 'no') && ($onfrontpage)) { return; }
                
        if($showavatar == 0) {$avatar = '';}
        if(strstr($avatar,'gallery'))
            {
            $tn = '';
            }
    
        $createdbyauthor     = $row->created_by_alias;
        $createdby_id = $row->created_by;
        
        return '<!-- CSS STYLES -->

                <style type="text/css">
                <!--

                div.idcbauthorplug {'. '
                font-size: ' . $fontsize . 'px;
                color: ' . $textcolor . ';
                float: ' . $textfloat . ';
                
                }
                
                div.idcbauthorplug a {'. '
                font-size: ' . $fontsize . 'px;
                color: ' . $linkcolor . ';
                
                }
            
                div.cbauthorplug img {
                border-style: none;
                width: ' . $avatarwidth . 'px;
                margin-right: ' . $avatarmarginright . 'px;
                margin-left: ' . $avatarmarginleft . 'px;
                float: ' . $avatarfloat . ';
            }
            
            --></style>'
            . '<div class="cbauthorplug"><a href="index.php?option=com_comprofiler&task=userProfile&user=' . $createdby_id
            . '"><img src="images/comprofiler/' . $tn . $avatar . '"></a><div class="idcbauthorplug">' . $introtext
            . '<a href="index.php?option=com_comprofiler&task=userProfile&user=' . $createdby_id . '"> '. $cbname . '</a> ' . $outrotext . '</div></div>';
            
             }
            
             // end if $disablejauthor no
            
    if ($disablejauthor == "yes" ) {
        

        if($article_show_author == "1") {$showcbap = 'yes';}        
        if($article_show_author == "0") {$showcbap = 'no';}
        if($global_page_show_author == "1" && $article_show_author == NULL){$showcbap = 'yes';}
        if($global_page_show_author == "0" && $article_show_author == NULL){$showcbap = 'no';}
                
        if($showcbap == 'yes'){
        $database = &JFactory::getDbo();
        $uri = & JFactory::getURI();
        $sql = "SELECT $showname from #__users where id = '$row->created_by' LIMIT 1";
        $database->setQuery($sql);
        $cbname = $database->loadResult();
        $sql2 = "SELECT avatar FROM #__comprofiler WHERE user_id = '$row->created_by' AND avatarapproved = 1 LIMIT 1";
        $database->setQuery($sql2);
        $avatar = $database->loadResult();    
        $sql3 = "SELECT state FROM #__content WHERE id = '$row->id' LIMIT 1";
        $database->setQuery($sql3);
        $pubstate = $database->loadResult();
        $sql4 = "SELECT * FROM #__content_frontpage WHERE content_id = '$row->id' LIMIT 1";
        $database->setQuery($sql4);
        $onfrontpage = $database->loadResult();    
            
        $tn = 'tn';
                
        if(($showfrontpage == 'no') && ($onfrontpage)) {
        
        return; }
        
                                
        if($showavatar == 0) {$avatar = '';}
        if(strstr($avatar,'gallery'))
            {
            $tn = '';
            }
    
        $createdbyauthor     = $row->created_by_alias;
        $createdby_id = $row->created_by;
        
        return '<!-- CSS STYLES -->

                <style type="text/css">
                <!--

                dd.createdby {display: none;}
                
                div.idcbauthorplug {'. '
                font-size: ' . $fontsize . 'px;
                color: ' . $textcolor . ';
                float: ' . $textfloat . ';
                
                }
                
                div.idcbauthorplug a {'. '
                font-size: ' . $fontsize . 'px;
                color: ' . $linkcolor . ';
                
                }
            
                div.cbauthorplug img {
                border-style: none;
                width: ' . $avatarwidth . 'px;
                margin-right: ' . $avatarmarginright . 'px;
                margin-left: ' . $avatarmarginleft . 'px;
                float: ' . $avatarfloat . ';
            }
            
            --></style>'
            . '<div class="cbauthorplug"><a href="index.php?option=com_comprofiler&task=userProfile&user=' . $createdby_id
            . '"><img src="images/comprofiler/' . $tn . $avatar . '"></a><div class="idcbauthorplug">' . $introtext
            . '<a href="index.php?option=com_comprofiler&task=userProfile&user=' . $createdby_id . '"> '. $cbname . '</a> ' . $outrotext
            .  '</div></div>';
            }
       }
       } // end J1.6 media manager bug
}  

    


}//class
امضاء Reza Ganji
انجمن پارس جوم
مشاهده‌ی وب‌سایت کاربر یافتن تمامی ارسال‌های این کاربر
نقل قول این ارسال در یک پاسخ بازگشت به بالا
 سپاس شده توسط صدرا حسابی ، gamentech ، Pourdaryaei ، شاهین سمیع عادل
۳۰-۱۱-۱۳۹۰, ۱۰:۰۱ عصر
ارسال: #3
RE: مشکل در پلاگین CB Author Plug
منظورتون این هست که کل متن تو cbauthorplug.php رو پاک کنم و متن بالا رو جایرگزین کنم؟
اقا رضا درست شد.
ممنون.RoseRoseRoseRoseInloveInlove
مشاهده‌ی وب‌سایت کاربر یافتن تمامی ارسال‌های این کاربر
نقل قول این ارسال در یک پاسخ بازگشت به بالا
۳-۱۲-۱۳۹۰, ۰۳:۴۵ صبح
ارسال: #4
RE: مشکل در پلاگین CB Author Plug
مشکل من تو مدیریت رسانه ها حل شد.
اما تو صفحه اول کنترل پنل منو ها در هم برهم شدند.
راهی نسیت که هم مشکل مدیریت رسانه ها حل بشه و هم کنترل پنل در هم برهم نشه.
[تصویر:  13482025260312030701.jpg]
مشاهده‌ی وب‌سایت کاربر یافتن تمامی ارسال‌های این کاربر
نقل قول این ارسال در یک پاسخ بازگشت به بالا
۳-۱۲-۱۳۹۰, ۰۴:۳۴ صبح
ارسال: #5
RE: مشکل در پلاگین CB Author Plug
این مشکل فکر میکنم با ویرایش سی اس اس حل بشه !
ممکن است دوستانی که سی اس اس بلد هستند به شما کمک کنند ولی فکر میکنم باید به مدیریت دسترسی داشته باشند !
امضاء Reza Ganji
انجمن پارس جوم
مشاهده‌ی وب‌سایت کاربر یافتن تمامی ارسال‌های این کاربر
نقل قول این ارسال در یک پاسخ بازگشت به بالا
 سپاس شده توسط gamentech ، ehsansabet
۳-۱۲-۱۳۹۰, ۰۷:۳۷ عصر
ارسال: #6
RE: مشکل در پلاگین CB Author Plug
حالا اگه این طوری باشه مشکلی که برای خود سایت پیش نمی یاد که؟Rose
مشاهده‌ی وب‌سایت کاربر یافتن تمامی ارسال‌های این کاربر
نقل قول این ارسال در یک پاسخ بازگشت به بالا
۳-۱۲-۱۳۹۰, ۰۸:۱۲ عصر
ارسال: #7
RE: مشکل در پلاگین CB Author Plug
(۳-۱۲-۱۳۹۰ ۰۷:۳۷ عصر)gamentech نوشته شده توسط: دیدن لینک ها برای شما امکان پذیر نیست. لطفا ثبت نام کنید یا وارد حساب خود شوید تا بتوانید لینک ها را ببینید.
حالا اگه این طوری باشه مشکلی که برای خود سایت پیش نمی یاد که؟Rose

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

اگرم هم مایل بودی یه دسترسی موقت بده تا یه نیگاهی بندازم و درستش کنم.
امضاء ehsansabet
دیدن لینک ها برای شما امکان پذیر نیست. لطفا ثبت نام کنید یا وارد حساب خود شوید تا بتوانید لینک ها را ببینید.
| دیدن لینک ها برای شما امکان پذیر نیست. لطفا ثبت نام کنید یا وارد حساب خود شوید تا بتوانید لینک ها را ببینید.
| دیدن لینک ها برای شما امکان پذیر نیست. لطفا ثبت نام کنید یا وارد حساب خود شوید تا بتوانید لینک ها را ببینید.

طراحی ، اجرا و بهینه سازی وب سایت های جوملایی
دیدن لینک ها برای شما امکان پذیر نیست. لطفا ثبت نام کنید یا وارد حساب خود شوید تا بتوانید لینک ها را ببینید.


مشاهده‌ی وب‌سایت کاربر یافتن تمامی ارسال‌های این کاربر
نقل قول این ارسال در یک پاسخ بازگشت به بالا
 سپاس شده توسط gamentech ، Reza Ganji ، محمدرضا بهارلو
ارسال پاسخ 


پرش به انجمن:


کاربرانِ درحال بازدید از این موضوع: 1 مهمان