Anyone hacked com_recommend?

13 years 10 months ago #5231 by bulldogsay
i am currently waiting to see whether nant can help me get a function sorted so that it will perform php code after say the user has registered, otherwise nothing will happen unless it is like a referral module i have made.

for your problem, you would have to look for the variable that is for sending the address, it will probably be after something like:

if ($recommend_from_sender == 0)
{

blah blah blah

just add a new variable before it following this

$variable = "your domain what ever";
13 years 7 months ago #12122 by luriaseo@hotmail.com
I made this...

global $my, $database;

function obtener_name($id) {
global $database;
$users = array();
$database->setQuery( "SELECT name FROM #__users WHERE #__users.id=".$id);
$users = $database->loadObjectList();
$user = $users[0];
echo $user->name;
return $user->name;
}

function obtener_email($id) {
global $database;
$users = array();
$database->setQuery( "SELECT email FROM #__users WHERE #__users.id=".$id);
$users = $database->loadObjectList();
$user = $users[0];
echo $user->email;
return $user->email;
}


And at the form
<form name="recommend" method="post" action="<? echo $base_url; ?>" onsubmit="return recommendvalidate()">
<table border="0" cellspacing="0" cellpadding="0">
<?
if ($my->id == "0") {
?>
<tr>
<td nowrap="nowrap"><?php echo _RMC_YOUR_NAME; ?> </td>
<td><input name="recommend_from_name" type="text" class="inputbox" value=""/></td>
</tr>
<tr>
<td nowrap="nowrap">* <?php echo _RMC_YOUR_EMAIL; ?> </td>
<td><input name="recommend_from_email" type="text" class="inputbox" value=""/></td>
</tr>
<?
}
else {
?>
<tr>
<td nowrap="nowrap"><?php echo _RMC_YOUR_NAME; ?> </td>
<td><input name="recommend_from_name" type="text" class="inputbox" readonly="true" value="<? obtener_name($my->id) ?>"/></td>
</tr>
<tr>
<td nowrap="nowrap">* <?php echo _RMC_YOUR_EMAIL; ?> </td>
<td><input name="recommend_from_email" type="text" class="inputbox" readonly="true" value="<? obtener_email($my->id) ?>"/></td>
</tr>
<?
}
?>

I hope that this helps you...
13 years 7 months ago #12149 by natsirtm
so is this a CB specific component or generic joomla?
point me to the extension, i'll have a look - that shouldn't be too tough.

edit: nm, i never notice when threads have multiple pages :blush:

Post edited by: natsirtm, at: 2006/05/11 16:03

userwrittenresources.com
>> content based revenue sharing member community
>> Joomla! + Community Builder + Community Builder Google AdSense Revenue Sharing module
>> home of the rswring
Moderators: beatnantkrileon
Time to create page: 0.410 seconds

Facebook Twitter LinkedIn