ChronoEngine.com homepage

Forums

Please write a review for the extension you are using on the Joomla extensions directory before posting a new question as we are being spammed by many negative reviews.

Thank you for your support!

How to add a link to dynamically access chrono connectivity

chucho 05 Sep, 2011
I am wanting to put a link to a connectivity menu item in community builder so that when someone searches for and finds a comunity builder profile they can click a link in the profile and they can view that specific users records in connectivity or add I could have their records to a tab in their profile. I was thinking if I could do a search based uopn the url web address there is a setting in community builder that could dynamically load the connectivity based on the profile being viewed (Substitute username in url) but I cannot figure out how to do a search where the query is in the url address, I'm not a coder but have managed to make it this far. Or how could I pass the profile being viewed username to change the where code? This is a public search and has nothing to do with the currently loggeed in user unly the profile that was searched for.

Thank in advance for any help that anyone can provide,
Julio (Chucho)
GreyHead 06 Sep, 2011
Hi Chucho,

If you can add a value to the URL in Community Builder like &uid=999 then you can get that value in the ChronoConnectivity WHERE box with
<?php
$uid = JRequest::getInt('uid', '', 'get');
?>
Bob
chucho 13 Sep, 2011
I added
&userid=[user_id]
to the link
http://example.com/somefolder/index.php?option=com_chronoconnectivity&connectionname=mywritings
that I put as a delimiter field inside of a community builder tab when someone searches and views someone else's profile I get the user searched for in a link which is what I want like
http://example.com/somefolder/index.php?option=com_chronoconnectivity&connectionname=mywritings&userid=82&lang=en
Bob said
Hi Chucho,
If you can add a value to the URL in Community Builder like &uid=999 then you can get that value in the ChronoConnectivity WHERE box with
<?php
$uid = JRequest::getInt('uid', '', 'get');
?>
I tried this and combining with others like
<?php
$user =& JFactory::getUser();
echo "WHERE `cf_user_id` = " $uid = JRequest::getInt('uid', '', 'get')?>
;
?>
I am not as coder but have made it this far. What am I doing wrong I got the user id into the url like Bob suggested but I need connectivity to only show results based upon user id. Do I need a chronoforms field and some code to place into that field to add the user id if so what code or is it already embedded into the database by default when someone fills out the form? P.s. I have different forms for multi language and one menu item that switches connection names with joomfish... would this be possible? Also how would this work if I have to use sef urls in joomla?

Thank's for all your help
Chucho
GreyHead 16 Sep, 2011
Hi chucho,

Hmmm . . . this code is a bit broken
<?php
$user =& JFactory::getUser();
echo "WHERE `cf_user_id` = " $uid = JRequest::getInt('uid', '', 'get')?>
;
?>
Please try this version
<?php
$user =& JFactory::getUser();
echo " WHERE `cf_user_id` = '{$user->id}' ";
?>
Bob
This topic is locked and no more replies can be posted.

2Checkout.com

2CheckOut.com Inc. (Ohio, USA) is an authorized retailer for goods and services provided by ChronoEngine.com