Anyone hacked com_recommend?

18 years 2 months ago #5231 by bulldogsay
Replied by bulldogsay on topic Re:Anyone hacked com_recommend?
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";

Please Log in to join the conversation.

17 years 11 months ago #12122 by luriaseo@hotmail.com
Replied by luriaseo@hotmail.com on topic Re:Anyone hacked com_recommend?
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; ?>&nbsp;</td>
<td><input name="recommend_from_name" type="text" class="inputbox" value=""/></td>
</tr>
<tr>
<td nowrap="nowrap">*&nbsp;<?php echo _RMC_YOUR_EMAIL; ?>&nbsp;</td>
<td><input name="recommend_from_email" type="text" class="inputbox" value=""/></td>
</tr>
<?
}
else {
?>
<tr>
<td nowrap="nowrap"><?php echo _RMC_YOUR_NAME; ?>&nbsp;</td>
<td><input name="recommend_from_name" type="text" class="inputbox" readonly="true" value="<? obtener_name($my->id) ?>"/></td>
</tr>
<tr>
<td nowrap="nowrap">*&nbsp;<?php echo _RMC_YOUR_EMAIL; ?>&nbsp;</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...

Please Log in to join the conversation.

17 years 11 months ago #12149 by natsirtm
Replied by natsirtm on topic Re:Anyone hacked com_recommend?
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

Please Log in to join the conversation.

Moderators: beatnantkrileon
Time to create page: 0.177 seconds

Facebook Twitter LinkedIn