Issue with Community Builder Plugin in 3.x

MILxDOT

New Member
I can get specific table rows to show for a specific user by putting this in my Fabrik tab in the Community Builder plugin text area:
Code:
{fabrik view=list id=3 ipaddr___user={$my->id} resetfilters=1}

I would like the functionality of being able to view a user's profile and then if I add a record for that profile it applies his userid to the hidden user element.

According to this forum post it is possible:
http://fabrikar.com/forums/showthread.php?t=10044&highlight=jos_users&page=7

Problem is when I add this to the CB plugin text area, the table gets ugly and it also does not allow me to add records for that user that will be tied to that user by the user element:

Code:
{fabrik view=table id=3 ipaddr___user=[user||{$my->id}] resetfilters=1}

I think we just need to address what this should be in J! 1.7 and Fabrik 3.x:
Code:
[user]

Any help would be much appreciated.
 
bump...

Can anyone else comment on or confirm that this doesn't work in J! 1.7.x and Fabrik 3.x with the CB plugin in github:

Code:
[user||{$my->id}]

Thanks!
 
I believe the cb plugin is fairly new in Fab 3.x, I'm not too sure if it would have caught those changes Hugh made in his post for 2.x.

the table gets ugly and it also does not allow me to add records for that user

Any errors messages? what do you actually see, or not see?
 
Thanks for the reply felix.

No errors...I can add records without errors but what I need is the functionality of where if a manager type person adds a record for that community member...then that record is tagged with the proper user element. That way when the user logs in, he still sees his own records.

I am going to try the latest git pull here today and see if that changes anything.
 
For testing I created a Joomla 1.5.25 - CB 1.7.1 - Fabrik 2.1.1 w SVN updates.

With this environment I was able to set things up so that if I login as like a manager who can see/search the entire Community Builder list called "Customers" then I can view only the records for that customer. If I add a new record for that customer, then it sets the userid of that customer in my hidden user element. Perfect! This way a manager can add records for the customer...but then if the customer logs in they can still see any records that belong to them. Cool!

To do this there are two key requirements.
1. Make sure when you create the hidden user element you select the option "Use Social Profile"
2. Then go into Community Builder, Tab Management, Fabrik and add this to the "plugin text" box on the right:

Code:
{fabrik view=table id=3 tablename___userelementname=[user||{$my->id}] resetfilters=1}
Note: change tablename to your exact tablename then also change userelementname to your exact userelementname.

So now that I have it working in J! 1.5 and Fabrik 2.x I went to try to do the same thing in J! 1.7 and Fabrik 3.x. Well, one key thing that I see as missing is in the user element there is no option for "Use Social Profile" so until the devs get to that I don't think that this is possible in Fabrik 3.x.
 
Bump...

Can we get a "Use Social Profile" option in user element in Fabrik 3.x

Either that or can you further explain how to user the session thing in this post to make something like this possible:
http://fabrikar.com/forums/showthread.php?t=23317&page=2

I have a requirement where if you view another user's profile, look at his fabrik records, then click Add...it will tie that record to that user's profile. I have this working perfectly in J! 1.5 and Fabrik 2.x but unfortunately I need different community builder lists which use Joomla user groups so J! 1.7 and Fabrik 3.x is just what I need for this.

I am willing to make a paypal donation to the project if it helps escalate this. I know you guys are super busy and I really appreciate your hard work.

Thanks!
 
I just spoke with felixcat, and whilst I've not really had time to test it I have updated the user element plugin and the community builder plugin with the changes that were in fabrik 2.
These were added by Hugh - so I'll leave him a message for when he gets up asking about to check what ive done.
 
I spoke briefly to Rob and he has made a change but neither of us have tested it. I believe it's to add the social option you spoke of.


Please use this thread for now for any updates regarding the CB plugin.


Let us know how you get on.



EDIT:- Oops didn't see Rob's reply. Note to myself, refresh posts before replying!
 
Thanks Rob, you are the man! It works great!

I just sent a paypal donation via the Donate link at the top of the forums.

We really appreciate your efforts!
 
The changes Rob made enabled me to add records for other users but it doesn't address the issue of not being able to fall back on the variable.

This was discussed in Fabrik 2.x here:
[URL]http://fabrikar.com/forums/showthread.php?t=10044&highlight=jos_users&page=7[/URL]

In Fabrik 2.x here is how I have it working the way I want it in the plugin text area of the CB tab plugin:
[CODE]{fabrik view=table id=3 tablename___userelementname=[user||{$my->id}] resetfilters=1}[/CODE]If I try to use the above string in the "plugin text" box in Fabrik 3.x I get this odd looking view no matter which template I use:
[IMG]http://www3.prowessnetworks.com/bad-w-user.png[/IMG]

But if I use this string I get this view that is what we should be seeing but then it won't fall back on [user] :

[CODE]{fabrik view=table id=3 tablename___userelementname={$my->id} resetfilters=1}[/CODE]

[IMG]http://www3.prowessnetworks.com/good-wo-user.png[/IMG]
 
I was playing around and managed to get the results that I wanted by creating a prefilter in my table like this:

join: where
field: userelementname
condition: equals

Code:
$session =& JFactory::getSession();
return $session->get('fabrik.plugin.profile_id');

type: eval

apply to: registered

Then, in your CB Fabrik Tab plugin text area use:
Code:
{fabrik view=table id=3 tablename___userelementname={$my->id} resetfilters=1}

This makes it so that you can search your CB list for a user and then see his records. If you add records for that user...it will tag it with his/her userid so that when they login...they still see their records. Cool!

I would guess that cheesegrits will probably add the ability to use the placeholder eventually...but this will get us by for now.

I got this hint from a post rob made here:
[URL]http://fabrikar.com/forums/showthread.php?t=23317[/URL]

[QUOTE]the cb plugin stores the current user id that you are viewing in the session so you can set up each of your prefilters as follows:[/QUOTE]

[CODE]$session =& JFactory::getSession();
return $session->get('fabrik.plugin.profile_id');[/CODE]
 
I didn't realise the session thing was necessary, so my bad on that one.

Thanks for the updates and explanations though.... will need to put this into the wiki once it's working as we get loads of requests on this one.


I think Hugh will have to make a few tweaks, it's probably not much, just a few Fab 3.x things........ famous last words! ;)
 
I?m fighting with a similar problem... I have Joomla 1.7.5, Community Builder 1.7.1, Fabrik 3.0.3 installed and imported old lists from Fabrik 2. I use the CB Fabrik Plugin to show only the records of this user in his profile. And all other users should also see the records of this user. This code works for me:

Code:
{fabrik view=list id=11 listname___user_raw=[user||{$my->id}] resetfilters=1}

I don?t use a pre-filter in this list. The only problem is, that if I call another user profile I see the same records (of the user before)... Strange...? I thought resetfilters=1 should set it to reset, but this doesn?t seem to happen.

Tried to use a pre-filter as described above, but after that I don?t see any record (empty table with empty message)...

Help really apprechiated - thanks in advance!
 
hi first update to Joomla 2.5.1
then update fabrik from github
then see if it works

-Rob
 
Thanks Rob for your answer! Actually can?t update to 2.5.1 because of my other components... Detected another strange issue: I imported an old table from Fabrik 2.0 - this works with the code above. Only the new tables are not operating!
 
Rob or Hugh,

I have a new Joomla 2.5.2 - Community Builder 1.8 - Fabrik 3.0.4 with the Git pull from March 6th.

I zipped up the contents of today's Git path:
Code:
fabrik/components/com_comprofiler/plugin/user/plug_fabrik/
and then installed that via the CB 1.8 plugin installer

I have these versions all working except for one thing: If I as a Super User pull up a CB profile of another user and then edit on of their records...it changes the cbuser user hidden element data for that record which is not how the other versions worked.

Other than that though I was pleased to be able to show only records tied to the CB Profile that you are viewing or if that user logs in they only see their records with this J!2.5.2-CB1.8-Fabrik3.0.4Git build.

In the Joomla 1.7 - Community Builder 1.7 - Fabrik 3.0.x sandbox that I have running as long as a super users first browses to another user's CB profile via the CB List and they then edit another user's record...it does not change the value of the hidden cbuser user element.

I also have an older J! 1.5 - CB 1.7 - Fabrik 2.x setup that works properly as well.

Let me know if I am just missing something but I have triple checked all my parameters and bounced them off of two other working builds with older versions.
 
Interesting find:

Last week I did a Joomla 2.5.1-CB 1.8-Fabrik 3.0.4 install on another persons older Ubuntu 9.10 server and this issue where when you browse to the CB List, view a persons profile and records pertaining to his profile, then edit a record and it is changing the hidden user element Use Social Profile doesn't happen.

I will do another fresh build with today's Git and report back with my findings.
 
After doing more testing, I have found that the issue is with the current Git version of Fabrik or the current Git version of Fabrik CB plugin

I took the working Joomla 2.5.1 - CB 1.8 - Fabrik 3.0.4 mentioned above and moved it from my friends Ubuntu 9.10 server and onto my Ubuntu 11.10 server and it works fine there so no issues with PHP versions etc.

I then performed a Git pull from today March 7th 5pm and applied those updates to this J!2.5.1 CB 1.8 Fabrik 3.x build. Now whenever I login as a super user, browse the CB List, view a CB member's records, edit a CB member's record, that record's hidden cbuser user type element is updated with the id of the super user that is logged in which is not how the CB plugin is supposed to work.

This is something that we will need Rob or Hugh to look into.

For now we will stick to an older Fabrik 3.0.4 and/or older Git version.
 
We are in need of some funding.
More details.

Thank you.

Members online

No members online now.
Back
Top