Smiddler
Newbie
Karma: 0
Posts: 7
|
 |
« on: February 08, 2011, 05:03:59 PM » |
|
Hello I have a request to display the phone number as well as the user name in the schedule view , the information is available when the reservation is clicked on but I need it displayed as the schedule will be printed and given to a user without online access , any help greatly appreciated
|
|
|
|
|
Logged
|
|
|
|
Nick
Administrator
Hero Member
   
Karma: 15
Posts: 5419
|
 |
« Reply #1 on: February 14, 2011, 02:03:42 PM » |
|
Within lib/Schedule.class.php write_reservation(), you can get $rs['phone'] and set it on the Summary or something. You could also pass it in to write_reservation() in templates/schedule.template.php from there and do whatever you want with it.
|
|
|
|
|
Logged
|
|
|
|
Smiddler
Newbie
Karma: 0
Posts: 7
|
 |
« Reply #2 on: February 23, 2011, 02:28:23 AM » |
|
Thanks Nick for the reply , I have almost zero knowledge on php but gave it a try I am not sure I was editing the correct file as it seemed to be affecting a different view than I was expecting attached is a link of what I would like to achieve ,if its easy I can give it a go otherwise if anyone can do it for a reasonable cost (its for a volunteer organization) can they let me know http://cid-d376f6be36fb1e04.office.live.com/self.aspx/Public/Php%20image/screen%20shot.jpg
|
|
|
|
|
Logged
|
|
|
|
Nick
Administrator
Hero Member
   
Karma: 15
Posts: 5419
|
 |
« Reply #3 on: February 28, 2011, 01:40:36 PM » |
|
Sorry, I misunderstood. This is even easier since the data is already coming back. You can add this right before line 186 of templates/rescalendar.template.php echo "{$res['phone']}<br/>";
|
|
|
|
|
Logged
|
|
|
|
Smiddler
Newbie
Karma: 0
Posts: 7
|
 |
« Reply #4 on: March 05, 2011, 10:57:50 PM » |
|
Hi Nick thanks for your reply unfortunately I tried that it didn't work , As a test I replaced the variable with some text and that printed out where I expected it to so its close but adding the code didnt display the phone number.
echo "{$res['phone']}<br/>";
|
|
|
|
|
Logged
|
|
|
|
Nick
Administrator
Hero Member
   
Karma: 15
Posts: 5419
|
 |
« Reply #5 on: March 07, 2011, 01:29:00 PM » |
|
Sorry, I thought that data was being returned but it is not. Change line 41 of lib\db\rescalendardb.class.php to: $sql = 'SELECT res.*, res_users.*, resources.name, resources.location, users.fname, users.lname, users.phone'
|
|
|
|
|
Logged
|
|
|
|
Smiddler
Newbie
Karma: 0
Posts: 7
|
 |
« Reply #6 on: March 07, 2011, 04:20:26 PM » |
|
Thanks Heaps that works perfectly , I will let you know when we roll it out !!
|
|
|
|
|
Logged
|
|
|
|
georkame
Newbie
Karma: 0
Posts: 4
|
 |
« Reply #7 on: March 21, 2011, 12:53:17 PM » |
|
I've tried adding (sperately and together)
echo "{$res['phone']}<br/>";
and
$sql = 'SELECT res.*, res_users.*, resources.name, resources.location, users.fname, users.lname, users.phone'
but when i hover the mouse over the reservation it does not show the Phone, nor the phone is shown in the reservation box; but once you click on the box the phone info are there.
Did I miss something?
thx for your responses in advance.
|
|
|
|
|
Logged
|
|
|
|
Nick
Administrator
Hero Member
   
Karma: 15
Posts: 5419
|
 |
« Reply #8 on: March 21, 2011, 01:35:00 PM » |
|
What page are you referring to?
|
|
|
|
|
Logged
|
|
|
|
georkame
Newbie
Karma: 0
Posts: 4
|
 |
« Reply #9 on: March 21, 2011, 04:31:46 PM » |
|
On the Booking page and/or the schedule page.
|
|
|
|
|
Logged
|
|
|
|
Nick
Administrator
Hero Member
   
Karma: 15
Posts: 5419
|
 |
« Reply #10 on: March 28, 2011, 02:07:42 PM » |
|
Sorry, I thought you meant that weekly calendar view. There are a couple of layers that need to change for this.
In lib\schedule.class.php, change line 514 to
write_reservation($colspan, $color_select, $mod_view, $rs['resid'], $summary, $viewable, $this->scheduleType == READ_ONLY, $is_pending, $rs['phone']);
In templates\schedule.template.php, change line 225 to
function write_reservation($colspan, $color_select, $mod_view, $resid, $summary = '', $viewable = false, $read_only = false, $pending = 0, $phone = '') {
And then change that function to write it out wherever you want.
|
|
|
|
|
Logged
|
|
|
|
|