Skip to Content Skip to Menu

🌟Discover the Joomla AI Plugin that wrote its own story! - CB Editor Assistant 1.1, now for Joomla 3, 4 & 5!
✍️ 5-Day Free Trial, then 🎯 save up to 30% with our 🛍️ Intro Offer (First 50 users, ends Dec. 25th)
🌲 Merry Christmas! Great savings on Professional and Developer Memberships! Get 25% off now with code XMAS-2024!

[SOLVED] Cant install new 2.0

  • nant
  • nant
  • OFFLINE
  • Posts: 12339
  • Thanks: 1467
  • Karma: 877
9 years 9 months ago - 9 years 9 months ago #260141 by nant
Replied by nant on topic Cant install new 2.0

bigk wrote: I've traced the pagination issue to a custom plugin created (by a freelancer) to show number of articles per person. Whenever this plugin is enabled , pagination goes away. Challenge now is to find which aspect of that plugin creates the conflict.

If you can help debug, I'll donate the plugin to the community :)


I would throw that plugin away :angry: it is not a clean solution as it appears to be a copy paste of one of the core xml files of CB (no wonder you are having issues).

I would just use the CB Query field to execute a simple query to count and show the number of articles you want.

Also you should check-out the CB Articles plugin (part of CB 2.0+) as it can be used to show article links for each profile.
Last edit: 9 years 9 months ago by nant.
The following user(s) said Thank You: bigk

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

  • bigk
  • bigk
  • OFFLINE
  • Posts: 22
  • Thanks: 3
  • Karma: 0
9 years 9 months ago #260142 by bigk
Replied by bigk on topic Cant install new 2.0
Very very helpful. Thanks.

Next challenge is to get the right sql query.

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

  • krileon
  • krileon
  • ONLINE
  • Posts: 48616
  • Thanks: 8302
  • Karma: 1446
9 years 9 months ago #260152 by krileon
Replied by krileon on topic Cant install new 2.0
If you just want to count the number of Joomla articles the user has then the below would work.

Count Users Articles:
Code:
SELECT COUNT(*) FROM `#__content` WHERE `created_by` = '[user_id]'

Count Users Published Articles:
Code:
SELECT COUNT(*) FROM `#__content` WHERE `created_by` = '[user_id]' AND `state` = 1

Count Users Unpublished Articles:
Code:
SELECT COUNT(*) FROM `#__content` WHERE `created_by` = '[user_id]' AND `state` = 0

Note these are all copy-paste ready for CB Query Field and its Query fieldtype usage.


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: bigk

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

  • bigk
  • bigk
  • OFFLINE
  • Posts: 22
  • Thanks: 3
  • Karma: 0
9 years 9 months ago #260158 by bigk
Replied by bigk on topic Cant install new 2.0
PERFECTO! Works great.

Can this field be made sortable in members list?

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

  • krileon
  • krileon
  • ONLINE
  • Posts: 48616
  • Thanks: 8302
  • Karma: 1446
9 years 9 months ago #260161 by krileon
Replied by krileon on topic Cant install new 2.0
As it's a calculated field, no. However, you can use Advanced mode in the sorting of your userlist. Edit your userlist within CB > List Management then click Sorting then select "Advanced" and supply it the below query (whichever you're wanting).

Sort By Total Articles:
Code:
( SELECT COUNT(*) FROM `#__content` AS cont WHERE cont.`created_by` = u.`id` ) DESC

Sort By Total Published Articles:
Code:
( SELECT COUNT(*) FROM `#__content` AS cont WHERE cont.`created_by` = u.`id` AND cont.`state` = 1 ) DESC

Sort By Total Unpublished Articles:
Code:
( SELECT COUNT(*) FROM `#__content` AS cont WHERE cont.`created_by` = u.`id` AND cont.`state` = 0 ) DESC


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: bigk

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

  • bigk
  • bigk
  • OFFLINE
  • Posts: 22
  • Thanks: 3
  • Karma: 0
9 years 9 months ago #260164 by bigk
Replied by bigk on topic Cant install new 2.0
ZIGACKLY!!!

I simply added DESC at the end, and I'm good to go.

You guys ROCK!!! and this tool is much more powerful than I thought. All it needs is packaging and marketing.
The following user(s) said Thank You: nant, krileon

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

Moderators: beatnantkrileon
Powered by Kunena Forum