Skip to Content Skip to Menu

[SOLVED] Stuck with creating userlist which list all user h

12 years 9 months ago - 12 years 9 months ago #186637 by jnetsolution
Dear support team,

First, I try to create a user list which list all users have newest post from ProfileBlog plugin/tab. In Filter option of List Management i can't find any way to add ProfileBlog's filed name for filter (may be we can do it with Advanced option i think but how)

Second, how can we make ProfileBlog Title field and ProfileBlog entry field be visible on the users-list.

Follow I attached ProfileBlog tab picture. I am using local host for coding so can't give you access to admin.
Please show me the way to solve this problem. I am looking forward and waiting for you.

Best Regard.
John.P

Attachments:
Last edit: 12 years 9 months ago by krileon.

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

  • krileon
  • krileon
  • ONLINE
  • Posts: 48437
  • Thanks: 8275
  • Karma: 1443
12 years 9 months ago #186647 by krileon

First, I try to create a user list which list all users have newest post from ProfileBlog plugin/tab. In Filter option of List Management i can't find any way to add ProfileBlog's filed name for filter (may be we can do it with Advanced option i think but how)

The amount of blog posts a user has isn't stored to a field. I would need more details on how you want the userlist to function in order to supply a query to be used in the Advanced Filter. For example do you want the users who made the last 5 most recent posts for example? Please understand filtering is not sorting, it simply allows removal or addition of users based off the criteria specified. It will not sort them based off their last blog post for example.

Second, how can we make ProfileBlog Title field and ProfileBlog entry field be visible on the users-list.

You'd need incubator project CB Query Field to perform a database query and retrieve the users blogs. Please keep in mind they could have multiple blogs so this isn't really reliable. I suppose you could only retrieve the most recent blog and assume that's perhaps what you're wanting. Please note CB ProfileBook is not a field and does not store blogs, walls, etc.. to a users profile data; it's stored to a separate database table.


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.

12 years 9 months ago #186704 by jnetsolution
Hi krileon, i appreciate your fast response.

You are right, CB ProfileBook use separate database table with CB profile data.

create a user list which list all users have newest post from ProfileBlog plugin/tab.

1. I would like to create a list of all user have their post in their CB ProfileBlog tab( each member can has many blog post but who ever has will be include to the list). The list will be sort from user has earliest post.

how can we make ProfileBlog Title field and ProfileBlog entry field be visible on the users-list.

2.I did tried incubator project CB Query Field before i make question but it doesn't work for me, i think i wrote wrong command. My solution was create a cb_blogtitle and cb_blogentry fields by perform a database query from ProfileBlog database table. And then i add 2 these fields to list column for visible in list front end.
If we could only retrieve the most recent blog for display in list will be good enought.

The command query use in CB Query Field i can't make it. Could you show me how to do it? If you have other solution i love to learn from you.

Thank in advanced.
John.P

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

  • krileon
  • krileon
  • ONLINE
  • Posts: 48437
  • Thanks: 8275
  • Karma: 1443
12 years 9 months ago #186712 by krileon

1. I would like to create a list of all user have their post in their CB ProfileBlog tab( each member can has many blog post but who ever has will be include to the list).

That's possible with the below Advanced Filter.
Code:
( ( SELECT COUNT(*) FROM `#__comprofiler_plug_profilebook` AS blgs WHERE blgs.`userid` = u.`id` AND blgs.`mode` = 'b' ) > 0 )

The list will be sort from user has earliest post.

Not possible, sorry.

2.I did tried incubator project CB Query Field before i make question but it doesn't work for me, i think i wrote wrong command. My solution was create a cb_blogtitle and cb_blogentry fields by perform a database query from ProfileBlog database table. And then i add 2 these fields to list column for visible in list front end.
If we could only retrieve the most recent blog for display in list will be good enought.

Below queries will get the most recent blog information of the user.

Title
Code:
SELECT `postertitle` FROM `#__comprofiler_plug_profilebook` WHERE `userid` = [user_id] AND `mode` = 'b' ORDER BY `date` DESC LIMIT 1

Entry
Code:
SELECT `postercomment` FROM `#__comprofiler_plug_profilebook` WHERE `userid` = [user_id] AND `mode` = 'b' ORDER BY `date` DESC LIMIT 1


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

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

12 years 9 months ago #186722 by jnetsolution
They work just perfectly, Krileon. You are a real genius man. Thank you very much.
I realize you are the author of a lot CB plugin also a very active support team member.

Happy new year, Krileon.

John.P
The following user(s) said Thank You: krileon

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

Moderators: beatnantkrileon
Powered by Kunena Forum