Hi
This is a continuation from a previous post about adding a connection and remove connection button to the user list page, which only show depending on whether a connection has been made.
The previous posts can be found here:
www.joomlapolis.com/forum/146-general/219309-purchasing-if-i-can-achieve-connect-button-on-user-list?start=6
I have installed CB Pro and CB Query Field.
Update:
.........................................................................................
Ok I have figured out I need to put the code below in the CB Query Field called cb_checkconn.
Code:
SELECT COUNT(*) FROM `#__comprofiler_members` WHERE `referenceid` = '[cb:userdata field="user_id" user="#me" /]' AND `memberid` = '[user_id]'
I then used the code below in a Delimiter Field to output the buttons.
Code:
[cb:if cb_checkconn>"0"]
[menu style="color:black;" caption="Remove Connection" img=""] _UE_MENU_CONNECTIONS : _UE_REVOKECONNECTIONREQUEST [/menu]
[/cb:if]
[cb:if cb_checkconn="0"]
[menu style="color:black;" caption="Add Connection" img=""] _UE_MENU_CONNECTIONS : _UE_ADDCONNECTIONREQUEST [/menu]
[/cb:if]
This works in the profiles perfectly but in the user list the links don't show. What am I doing wrong here. Is there some header code required in the user list to show menu items? Or should I be outputting the connect and remove links differently?