9 years ago
8
Topic

Hi all, 

I was posting before this problem but I was thinking to do a new clear topic so everyone can easily get the info. 

What I'm asking for is : How can I do on my website a page with list&search users like here "http://www.seblod.com/community/users"? I mean grouped by Group User, and in the detail page, his Latest Post ?

Spec: Joomla 3.3.6 - Seblod 3.5.0

Thank you very much, and have a nice day!!

Get a VIP membership
4229 Posts
Kadministrator
9 years ago
1
Level 1

Hi,

except from the custom template, users list is nothing special, you can easily add usergroup search field in the default users search&list search form.

Latest posts is a list module, doing a search on forum items and filtering by post author field. As id you get when linking from the users list to the profile is the one from article and not the one from user, you need to add "user id" field with storage Standard-user-id to the hidden position of the users search list, then add user_id variable to the custom variables in the link (pulling value from user id field - e.g. user_id=$cck->getValue('user_id') - see guide bellow for details).

Last step is to put live value Variable->user_id on the author search field in the latest posts search&list type.

9 years ago
0
Level 2

Hi , 

For the list of articles created by a user, i try first to put the field Article Author - live value to his ID and i get the next eror : 

1064 

You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near 'GROUP BY t0.pk ORDER BY t1.hits DESC' at line 6 SQL=SELECT t0.id AS pid,t0.pk AS pk,t0.pkb AS pkb,t0.cck AS cck,t0.storage_location AS loc,tt.id AS type_id,tt.alias AS type_alias FROM `jos_cck_core` AS t0 LEFT JOIN `jos_content` AS t1 ON t1.id = t0.pk LEFT JOIN `jos_cck_core_types` AS tt ON tt.name = t0.cck WHERE t1.state = 1 AND t1.access IN (1,1,2,3) AND ( t1.publish_up = '0000-00-00 00:00:00' OR t1.publish_up <= '2014-12-11 13:25:01' ) AND ( t1.publish_down = '0000-00-00 00:00:00' OR t1.publish_down >= '2014-12-11 13:25:01' ) AND t0.cck = 'article' AND GROUP BY t0.pk ORDER BY t1.hits DESC

For the users search i added the User Groups (JForm - User Groups) - live value to the group I created before. And I get this error : 

1054

Unknown column 't1.groups' in 'where clause' SQL=SELECT t0.id AS pid,t0.pk AS pk,t0.pkb AS pkb,t0.cck AS cck,t0.storage_location AS loc,tt.id AS type_id,tt.alias AS type_alias FROM `jos_cck_core` AS t0 LEFT JOIN `jos_users` AS t1 ON t1.id = t0.pk LEFT JOIN `jos_content` AS t2 ON t2.id = t0.pk LEFT JOIN `jos_cck_core_types` AS tt ON tt.name = t0.cck WHERE t2.state = 1 AND t2.access IN (1,1,2,3) AND ( t2.publish_up = '0000-00-00 00:00:00' OR t2.publish_up <= '2014-12-11 13:33:30' ) AND ( t2.publish_down = '0000-00-00 00:00:00' OR t2.publish_down >= '2014-12-11 13:33:30' ) AND t0.cck = 'article' AND t1.groups LIKE '%%' GROUP BY t0.pk ORDER BY t2.hits DESC

Thank you very much for helping me!

9 years ago
3
Level 1

Hi

I try on another server, a clean one the same steps and the error is the same for both of them.

Have a nice day!

4229 Posts
Kadministrator
9 years ago
2
Level 2

Hi,

For first problem

Field that is already there is called "Article created by". As live value you need to use id, not user name.

For second problem:

  • Create a select dynamic field in free mode with the following query and add it to the search form instead of Jform field:
    SELECT id as value, title as text from #__usergroups
    Set its storage to Standard - Free - group_id and select #__user_usergroup_map as table bellow
  • Add Search Join plugin to the search and put this setting in it:
    #__user_usergroup_map - user_id - id - #__users
9 years ago
1
Level 3

Hei everything is ok now thank you very much for help. 

Now for the 

"

Latest posts is a list module, doing a search on forum items and filtering by post author field. As id you get when linking from the users list to the profile is the one from article and not the one from user, you need to add "user id" field with storage Standard-user-id to the hidden position of the users search list, then add user_id variable to the custom variables in the link (pulling value from user id field - e.g. user_id=$cck->getValue('user_id') - see guide bellow for details).

Last step is to put live value Variable->user_id on the author search field in the latest posts search&list type.

"

So i go to my List Search for USERS. In Search tab i added User ID Variation-hidden -- Btn 2 - Live:Variable- Live Value:configure/ Type String Variable user_id .  MATCH permissive

In Article Search list - SEARCH tab I added (CCK + Button Search) Article Created by, -Btn2 - Live:variable - Live Value:configure/ Type String - Variable user_id. MATCH permissive

But is still showing all of my articles, what I did wrong ?

Thank you very very much Sir !

9 years ago
0
Level 4

PS: Match Exact did not solve the problem.

188 Posts
uriel
9 years ago
1
Level 1

use my field (in article)

http://www.seblod.com/community/forums/fields-plug-ins/new-field-get-author-data-joomla-user-default#post21404

create a list, use field created by > number 2, author Id > configure > id 

use module list.

9 years ago
0
Level 2

Thank you very much!! Is perfect now.

Get a Book for SEBLOD