Elxis CMS Forum

Extensions => Bots and plugins => Topic started by: ipghmagnet on April 22, 2015, 18:21:20

Title: Plugin in content category
Post by: ipghmagnet on April 22, 2015, 18:21:20
Dear Heros,

I try to add content in content category's description.

I use plugins: elxis link and download, tab

But they all failed.

<a href="blog/buying-tips/sintered-neodymium-magnet-magnetic.html">sintered neodymium magnet magnetic property</a>&nbsp;or download it <code>{download}1{/download}</code></p>

and in front end i got"  download it {download}1{/download}""

For elxis link, tab , same problem.

Pls kindly support.

Best regards.

IP GH MAGNET

 
Title: Re: Plugin in content category
Post by: datahell on April 22, 2015, 18:33:13
Running plugins in content category's description is not supported. However you can easily add this functionality.

Open file: components/com_content/category.php (wrong) components/com_content/controllers/category.php
Go to line 73:
unset($n, $segs, $last, $seotitle);

Add below:
$ePlugin = eFactory::getPlugin();
$row->text = $row->description;
$ePlugin->process($row);
$row->description = $row->text;
unset($row->text);

That's it!

Note: Some plugins may not work properly on category description areas as they were built for articles, not for categories.
Title: Re: Plugin in content category
Post by: ipghmagnet on April 22, 2015, 19:00:04
Dear Datahell,

Thanks for your quick support.
But i cannot find the file. There is no such file in this category..

components/com_content/category.php

There is only components/com_content/content.php

I also cannot find 73 line

Sorry i am poor in php and codes.

Best regards.

IP GH MAGNET
Title: Re: Plugin in content category
Post by: datahell on April 22, 2015, 21:08:29
Sorry, it is this one: components/com_content/controllers/category.php
Title: Re: Plugin in content category
Post by: ipghmagnet on April 23, 2015, 06:19:42
Dear Datahell,

I followed your idea. I settle down the problem. the line is not 73, it is 59 ..

But i got another problem, when i want to use " {contact}sales@nbvsmagnetic.com{/contact}"
I got nothing..

It is so strange..

IP GH MAGNET
Title: Re: Plugin in content category
Post by: datahell on April 23, 2015, 08:55:38
I told you that some plugins run only inside articles, Contact is one of them.

Open file components/com_content/plugins/contact/contact.plugin.php
Comment lines 41 and 47:

//if (!$eURI->isDir()) {
....
//}
Title: Re: Plugin in content category
Post by: ipghmagnet on April 23, 2015, 10:45:16
Dear Datehell,
Thanks a lot.

For content category description, i meet another question.
The description cannot be found in mobile version.

I am sorry to bother you again.

Best regards.

IP GH MAGNET

Title: Re: Plugin in content category
Post by: ipghmagnet on April 24, 2015, 18:32:15
Dear datahell,

Can the category description be shown in mobile version?

I am struggling about it  because i make generic information in "category description." ..

In Desktop device, it can show well . But in mobile version, i cannot see them..

I P GH MAGNET
Title: Re: Plugin in content category
Post by: ipghmagnet on April 27, 2015, 19:07:35
Hello Guo,
We use responsive templates as we want to be compatible with tablets and mobiles instead of the mobile version of the
website. So as far as i can see you should disable the mobile version from the global settings of your Elxis installation.
The default template you use support responsive design so you will be able to view the category's description.

Please avoid sending PM. You can create posts as for your questions and with this way we could help other users as
well in future instead only one.

Thank you for your time and your understanding.