Skip to Content Skip to Menu

[SOLVED] CB Lastview - Display list ? and Same for relation

  • chanteur94
  • chanteur94
  • OFFLINE
  • Posts: 302
  • Thanks: 13
  • Karma: 1
9 years 9 months ago - 9 years 8 months ago #258356 by chanteur94
Hi

I would like to display a list of lastview and not only shows the list on a tab.
(in fact, how to create a list of lastviewer and lastviewed ?)

I would like also to do a list with the users who 'ask relation'

How can i do that ?


Best regards.
Last edit: 9 years 8 months ago by chanteur94.

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

  • krileon
  • krileon
  • ONLINE
  • Posts: 48479
  • Thanks: 8283
  • Karma: 1443
9 years 9 months ago #258375 by krileon
CB LastViews displays user boxes, it's not a list anymore. It can't be turned into a list without modifying its template file found below.

components/com_comprofiler/plugin/user/plug_cblastviewstab/templates/default/tab.php

No, you can't create more last view tabs as plugin tabs can't be duplicated nor can the tab be filtered. You can create a CB Userlist within CB > List Management though for a list of users and various criteria.


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.

  • chanteur94
  • chanteur94
  • OFFLINE
  • Posts: 302
  • Thanks: 13
  • Karma: 1
9 years 9 months ago #258388 by chanteur94
"You can create a CB Userlist within CB > List Management though for a list of users and various criteria."

It's what i want to do, but i don't know how to use fields from #__comprofiler_views. I know only how to use substitution with field from #__comprofiler or #__users.



Thank you

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

  • krileon
  • krileon
  • ONLINE
  • Posts: 48479
  • Thanks: 8283
  • Karma: 1443
9 years 8 months ago - 9 years 8 months ago #258492 by krileon
You can filter a CB Userlist to show only the users that last viewed your profile by using an Advanced Filter in your userlist. Example as follows.

Code:
( ( COUNT (*) FROM `#__comprofiler_views` AS v WHERE v.`viewer_id` = u.`id` AND v.`profile_id` = '[user_id]' ) > 0 )

That should filter the list down to only users that have viewed your profile. You can then essentially use a userlist and all its features for last views display.

Aside from that you'll need to modify the CB Last Views plugin to fit your needs.


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.
Last edit: 9 years 8 months ago by krileon.

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

  • chanteur94
  • chanteur94
  • OFFLINE
  • Posts: 302
  • Thanks: 13
  • Karma: 1
9 years 8 months ago - 9 years 8 months ago #258651 by chanteur94
Thank you..just miss the end of the select :

(( SELECT  COUNT(*) FROM `#__comprofiler_views` AS v WHERE v.`viewer_id`= u.`id` AND v.`profile_id` = '[user_id]' ) > 0 )
Last edit: 9 years 8 months ago by chanteur94.

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

Moderators: beatnantkrileon
Powered by Kunena Forum