Skip to Content Skip to Menu

🎃 Happy Halloween! Treat yourself with an awesome discount on memberships! Get 20% off now with code SPOOKY-2024!

Disable category link CB Articles

  • jpdenny1
  • jpdenny1
  • OFFLINE
  • Posts: 195
  • Thanks: 25
  • Karma: 5
9 years 1 month ago #270538 by jpdenny1
Disable category link CB Articles was created by jpdenny1
Hello CB,

As a solution to my database limitation issue I devised a plan to erase some fields/tabs, and to compensate for them by using CB Articles. The user profile looks cleaner now actually, with a character limited 'Overview' as a rounded div with title - only on that row. Great.

I would prefer if CB articles didn't have a link on the category though and for it to just show 'Information' (the assigned category title) under category.
I realise this may be tied to CB Blogs and I don't mind the category link not showing here either if necessary.

I use K2 integration. I tried adjusting K2 settings. I also tried hiding it through css but it hides the article title too (which has a link). With these being tied together here, I suppose makes the job more difficult i.e. maybe they are not separated.

A solution I do see is creating personal categories for each user, but that would be many and how many can it take I wonder.

Any advice appreciated. Looking to hide the 'category' row or ideally unlink the category title in CB Articles.

Kind regards

Joomla 3.6.2
CB 2.0.15 Latest Nightly
GJ 3.0.1 nightly
Php version 5.5.35
Auto actions nightly
Activity nightly
Privacy nightly
Conditions nightly
CB Gallery 2.0
.....all nightly!
Uddeim 3.9

Please Log in or Create an account to join the conversation.

  • krileon
  • krileon
  • ONLINE
  • Posts: 48466
  • Thanks: 8280
  • Karma: 1443
9 years 1 month ago #270558 by krileon
Replied by krileon on topic Disable category link CB Articles
You'll have to modify the template files of CB Articles to remove that column from its HTML output. To do this make a copy of the below folder.

components/com_comprofiler/plugin/user/plug_cbarticles/templates/default

Now rename the copied folder to something like "mytemplate". Next within CB Activity > Paramaters select "mytemplate" as the CB Activity template. Now you can edit the below without losing your changes on each CB update.

components/com_comprofiler/plugin/user/plug_cbarticles/templates/mytemplate/tab.php


Kyle (Krileon)
Community Builder Team Member
Before posting on forums: Read FAQ thoroughly + Read our Documentation + Search the forums
CB links: Documentation - Localization - CB Quickstart - CB Paid Subscriptions - Add-Ons - Forge
--
If you are a Professional, Developer, or CB Paid Subscriptions subscriber and have a support issue please always post in your respective support forums for best results!
--
If I've missed your support post with a delay of 3 days or greater and are a Professional, Developer, or CBSubs subscriber please send me a private message with your thread and will reply when possible!
--
Please note I am available Monday - Friday from 8:00 AM CST to 4:00 PM CST. I am away on weekends (Saturday and Sunday) and if I've missed your post on or before a weekend after business hours please wait for the next following business day (Monday) and will get to your issue as soon as possible, thank you.
--
My role here is to provide guidance and assistance. I cannot provide custom code for each custom requirement. Please do not inquire me about custom development.

Please Log in or Create an account to join the conversation.

  • jpdenny1
  • jpdenny1
  • OFFLINE
  • Posts: 195
  • Thanks: 25
  • Karma: 5
9 years 1 month ago #270570 by jpdenny1
Replied by jpdenny1 on topic Disable category link CB Articles
Hi, thanks Kyle. Got that done as far as editing the tab.php.

I changed something and the site page wouldn't load, reverted back - so best ask.

This may be the area to edit I think, I tried doing various things with it:

. '<td style="width: 25%;" class="text-left hidden-xs">' . ( $row->get( 'category' ) ? '<a href="' . cbarticlesModel::getUrl( $row, true, 'category' ) . '">' . $row->get( 'category_title' ) . '</a>' : CBTxt::T( 'None' ) ) . '</td>'

What should I take out to remove the url link on category title?

Really appreciate the help.

Joomla 3.6.2
CB 2.0.15 Latest Nightly
GJ 3.0.1 nightly
Php version 5.5.35
Auto actions nightly
Activity nightly
Privacy nightly
Conditions nightly
CB Gallery 2.0
.....all nightly!
Uddeim 3.9

Please Log in or Create an account to join the conversation.

  • krileon
  • krileon
  • ONLINE
  • Posts: 48466
  • Thanks: 8280
  • Karma: 1443
9 years 1 month ago #270610 by krileon
Replied by krileon on topic Disable category link CB Articles
If you just don't want it linked then you'd remove the <a element surrounding the category title. If you don't want category displayed at all then you need to remove its <td and its header <th.


Kyle (Krileon)
Community Builder Team Member
Before posting on forums: Read FAQ thoroughly + Read our Documentation + Search the forums
CB links: Documentation - Localization - CB Quickstart - CB Paid Subscriptions - Add-Ons - Forge
--
If you are a Professional, Developer, or CB Paid Subscriptions subscriber and have a support issue please always post in your respective support forums for best results!
--
If I've missed your support post with a delay of 3 days or greater and are a Professional, Developer, or CBSubs subscriber please send me a private message with your thread and will reply when possible!
--
Please note I am available Monday - Friday from 8:00 AM CST to 4:00 PM CST. I am away on weekends (Saturday and Sunday) and if I've missed your post on or before a weekend after business hours please wait for the next following business day (Monday) and will get to your issue as soon as possible, thank you.
--
My role here is to provide guidance and assistance. I cannot provide custom code for each custom requirement. Please do not inquire me about custom development.

Please Log in or Create an account to join the conversation.

  • jpdenny1
  • jpdenny1
  • OFFLINE
  • Posts: 195
  • Thanks: 25
  • Karma: 5
9 years 1 month ago #270624 by jpdenny1
Replied by jpdenny1 on topic Disable category link CB Articles
Thanks again Kyle, I tried numerous variations of deleting parts in the <a element

Apologies for not being able to do it through your clear instructions, I assume it's within here:
( $row->get( 'category' ) ? '<a href="' . cbarticlesModel::getUrl( $row, true, 'category' ) . '">' . $row->get( 'category_title' ) . '</a>' :

Any chance you'd pinpoint it, highlighting what to delete, I feel a bit simple having to ask. This is really cool to know though i.e. you can add 'mytemplate' to various plugins.

Kind regards

Joomla 3.6.2
CB 2.0.15 Latest Nightly
GJ 3.0.1 nightly
Php version 5.5.35
Auto actions nightly
Activity nightly
Privacy nightly
Conditions nightly
CB Gallery 2.0
.....all nightly!
Uddeim 3.9

Please Log in or Create an account to join the conversation.

  • krileon
  • krileon
  • ONLINE
  • Posts: 48466
  • Thanks: 8280
  • Karma: 1443
9 years 1 month ago #270637 by krileon
Replied by krileon on topic Disable category link CB Articles
Please see the below for removing the linking to category. Additional example for removing category display entirely.

Remove Linking:
IN: components/com_comprofiler/plugin/user/plug_cbarticles/templates/default/tab.php
ON: Line 72
FROM:
Code:
. '<td style="width: 25%;" class="text-left hidden-xs">' . ( $row->get( 'category' ) ? '<a href="' . cbarticlesModel::getUrl( $row, true, 'category' ) . '">' . $row->get( 'category_title' ) . '</a>' : CBTxt::T( 'None' ) ) . '</td>'
TO:
Code:
. '<td style="width: 25%;" class="text-left hidden-xs">' . ( $row->get( 'category' ) ? $row->get( 'category_title' ) : CBTxt::T( 'None' ) ) . '</td>'

Remove Category:
IN: components/com_comprofiler/plugin/user/plug_cbarticles/templates/default/tab.php
ON: Delete Lines 63 and 72

If you're using a custom template be sure to edit tab.php in it instead of in the default.


Kyle (Krileon)
Community Builder Team Member
Before posting on forums: Read FAQ thoroughly + Read our Documentation + Search the forums
CB links: Documentation - Localization - CB Quickstart - CB Paid Subscriptions - Add-Ons - Forge
--
If you are a Professional, Developer, or CB Paid Subscriptions subscriber and have a support issue please always post in your respective support forums for best results!
--
If I've missed your support post with a delay of 3 days or greater and are a Professional, Developer, or CBSubs subscriber please send me a private message with your thread and will reply when possible!
--
Please note I am available Monday - Friday from 8:00 AM CST to 4:00 PM CST. I am away on weekends (Saturday and Sunday) and if I've missed your post on or before a weekend after business hours please wait for the next following business day (Monday) and will get to your issue as soon as possible, thank you.
--
My role here is to provide guidance and assistance. I cannot provide custom code for each custom requirement. Please do not inquire me about custom development.
The following user(s) said Thank You: jpdenny1

Please Log in or Create an account to join the conversation.

Moderators: beatnantkrileon
Powered by Kunena Forum