Elxis CMS Forum
Extensions => Components => Topic started by: Davide on February 06, 2011, 11:21:42
-
If i want to publish in the home page:
Last reseration was made by (user) in (hotel) on (date).
using (hotel) as a link to the hotels' owner page.
How can i do that?
-
This is against privacy data and is against several countries.
I suggest not to use such a thing.
-
Why? If i said that
Last reservation was made by babbonatale81 for Von Casa Falco on 21/11/2011
Or if the users register its name:
Last Reservation was made by Davide I. (surname not showing) for Von Casa Falco on 21/11/2011
that's similar to booking.com it is using this phrases actually.
-
Booking.com don't post username or name or surname just the following:
Most recent booking for this hotel was today at 11:19 from Italy
-
wow that's right i remembered wrong. sorry
So how can i do only this phrase?
I tried to make a new post published in the home Page after installing php module:
<?php
if ($data->lastreserv) {
$lastd = mosFormatDate($data->lastreserv['resdate'], _GEM_DATE_FORMLC2);
$lrLink = $resmaster->secureURL($mainframe->getCfg('live_site').'/index2.php?option=com_reservations&task=cpanel&act=resdetails&resid='.$data->lastreserv['resid'].'&Itemid='.$Itemid);
echo '<tr class="irrow'.$k.'">'."\n".'<td colspan="2">';
printf($resmaster->lng->LASTRESBYON, $data->lastreserv['ofirstname'].' '.$data->lastreserv['olastname'], $lastd);
echo " \n";
echo '<a href="'.$lrLink.'" title="'.$data->lastreserv['rescode'].'" class="resmaplink">'.$resmaster->lng->RESDETAILS."</a>\n";
echo "</td>\n</tr>\n";
$k = 1 - $k;
}
?>
I think there's to many code and it is wrong.
-
There are a lot of parameters that affects the final result.
Where did you write that code ?
-
I have create a new page .php saved it and with this bot (http://www.elxis-downloads.com/it/downloads/content/219.html) included. the path was correct but no message display. maybe because i don't have made any reservation after ;D Will work for you?
-
It's a wrong process that.
Delete this Bot. PHP Bot give us the option to add source code non relative with elxis components .
You must create a module on which you will include specific file of IOSR Component, database query etc.
-
ah ok... thanks