]> git.mxchange.org Git - friendica.git/blob - object/Item.php
Merge pull request #557 from fermionic/20121224-installer-check-for-smarty3
[friendica.git] / object / Item.php
1 <?php
2 if(class_exists('Item'))
3         return;
4
5 require_once('object/BaseObject.php');
6 require_once('include/text.php');
7 require_once('boot.php');
8
9 /**
10  * An item
11  */
12 class Item extends BaseObject {
13         private $data = array();
14         private $template = null;
15         private $available_templates = array(
16                 'wall' => 'wall_thread.tpl',
17                 'wall2wall' => 'wallwall_thread.tpl'
18         );
19         private $comment_box_template = 'comment_item.tpl';
20         private $toplevel = false;
21         private $writable = false;
22         private $children = array();
23         private $parent = null;
24         private $conversation = null;
25         private $redirect_url = null;
26         private $owner_url = '';
27         private $owner_photo = '';
28         private $owner_name = '';
29         private $wall_to_wall = false;
30         private $threaded = false;
31         private $visiting = false;
32
33         public function __construct($data) {
34                 $a = $this->get_app();
35                 
36                 $this->data = $data;
37                 $this->set_template('wall');
38                 $this->toplevel = ($this->get_id() == $this->get_data_value('parent'));
39
40                 if(is_array($_SESSION['remote'])) {
41                         foreach($_SESSION['remote'] as $visitor) {
42                                 if($visitor['cid'] == $this->get_data_value('contact-id')) {
43                                         $this->visiting = true;
44                                         break;
45                                 }
46                         }
47                 }
48                 
49                 $this->writable = ($this->get_data_value('writable') || $this->get_data_value('self'));
50
51                 $ssl_state = ((local_user()) ? true : false);
52                 $this->redirect_url = $a->get_baseurl($ssl_state) . '/redir/' . $this->get_data_value('cid') ;
53
54                 if(get_config('system','thread_allow') && $a->theme_thread_allow && !$this->is_toplevel())
55                         $this->threaded = true;
56
57                 // Prepare the children
58                 if(count($data['children'])) {
59                         foreach($data['children'] as $item) {
60                                 /*
61                                  * Only add will be displayed
62                                  */
63                                 if($item['network'] === NETWORK_MAIL && local_user() != $item['uid']) {
64                                         continue;
65                                 }
66                                 if(! visible_activity($item)) {
67                                         continue;
68                                 }
69                                 $child = new Item($item);
70                                 $this->add_child($child);
71                         }
72                 }
73         }
74
75         /**
76          * Get data in a form usable by a conversation template
77          *
78          * Returns:
79          *      _ The data requested on success
80          *      _ false on failure
81          */
82         public function get_template_data($alike, $dlike, $thread_level=1) {
83                 $result = array();
84
85                 $a = $this->get_app();
86
87                 $item = $this->get_data();
88
89                 $commentww = '';
90                 $sparkle = '';
91                 $buttons = '';
92                 $dropping = false;
93                 $star = false;
94                 $isstarred = "unstarred";
95                 $indent = '';
96                 $shiny = '';
97                 $osparkle = '';
98                 $total_children = $this->count_descendants();
99
100                 $conv = $this->get_conversation();
101
102
103                 $lock = ((($item['private'] == 1) || (($item['uid'] == local_user()) && (strlen($item['allow_cid']) || strlen($item['allow_gid']) 
104                         || strlen($item['deny_cid']) || strlen($item['deny_gid']))))
105                         ? t('Private Message')
106                         : false);
107                 $shareable = ((($conv->get_profile_owner() == local_user()) && ($item['private'] != 1)) ? true : false);
108                 if(local_user() && link_compare($a->contact['url'],$item['author-link']))
109                         $edpost = array($a->get_baseurl($ssl_state)."/editpost/".$item['id'], t("Edit"));
110                 else
111                         $edpost = false;
112                 if(($this->get_data_value('uid') == local_user()) || $this->is_visiting())
113                         $dropping = true;
114
115                 $drop = array(
116                         'dropping' => $dropping,
117                         'pagedrop' => ((feature_enabled($conv->get_profile_owner(),'multi_delete')) ? $item['pagedrop'] : ''),
118                         'select' => t('Select'), 
119                         'delete' => t('Delete'),
120                 );
121                 
122                 $filer = (($conv->get_profile_owner() == local_user()) ? t("save to folder") : false);
123
124                 $diff_author    = ((link_compare($item['url'],$item['author-link'])) ? false : true);
125                 $profile_name   = (((strlen($item['author-name']))   && $diff_author) ? $item['author-name']   : $item['name']);
126                 if($item['author-link'] && (! $item['author-name']))
127                         $profile_name = $item['author-link'];
128
129                 $sp = false;
130                 $profile_link = best_link_url($item,$sp);
131                 if($profile_link === 'mailbox')
132                         $profile_link = '';
133                 if($sp)
134                         $sparkle = ' sparkle';
135                 else
136                         $profile_link = zrl($profile_link);                 
137
138                 $normalised = normalise_link((strlen($item['author-link'])) ? $item['author-link'] : $item['url']);
139                 if(($normalised != 'mailbox') && (x($a->contacts,$normalised)))
140                         $profile_avatar = $a->contacts[$normalised]['thumb'];
141                 else
142                         $profile_avatar = (((strlen($item['author-avatar'])) && $diff_author) ? $item['author-avatar'] : $a->get_cached_avatar_image($this->get_data_value('thumb')));
143
144                 $locate = array('location' => $item['location'], 'coord' => $item['coord'], 'html' => '');
145                 call_hooks('render_location',$locate);
146                 $location = ((strlen($locate['html'])) ? $locate['html'] : render_location_google($locate));
147
148                 $tags=array();
149                 $hashtags = array();
150                 $mentions = array();
151                 foreach(explode(',',$item['tag']) as $tag){
152                         $tag = trim($tag);
153                         if ($tag!="") {
154                                 $t = bbcode($tag);
155                                 $tags[] = $t;
156                                 if($t[0] == '#')
157                                         $hashtags[] = $t;
158                                 elseif($t[0] == '@')
159                                         $mentions[] = $t;
160                         }
161
162                 }        
163
164                 $like    = ((x($alike,$item['uri'])) ? format_like($alike[$item['uri']],$alike[$item['uri'] . '-l'],'like',$item['uri']) : '');
165                 $dislike = ((x($dlike,$item['uri'])) ? format_like($dlike[$item['uri']],$dlike[$item['uri'] . '-l'],'dislike',$item['uri']) : '');
166
167                 /*
168                  * We should avoid doing this all the time, but it depends on the conversation mode
169                  * And the conv mode may change when we change the conv, or it changes its mode
170                  * Maybe we should establish a way to be notified about conversation changes
171                  */
172                 $this->check_wall_to_wall();
173                 
174                 if($this->is_wall_to_wall() && ($this->get_owner_url() == $this->get_redirect_url()))
175                         $osparkle = ' sparkle';
176                 
177                 if($this->is_toplevel()) {
178                         if($conv->get_profile_owner() == local_user()) {
179                                 $isstarred = (($item['starred']) ? "starred" : "unstarred");
180
181                                 $star = array(
182                                         'do' => t("add star"),
183                                         'undo' => t("remove star"),
184                                         'toggle' => t("toggle star status"),
185                                         'classdo' => (($item['starred']) ? "hidden" : ""),
186                                         'classundo' => (($item['starred']) ? "" : "hidden"),
187                                         'starred' =>  t('starred'),
188                                 );
189                                 $tagger = '';
190                                 if(feature_enabled($conv->get_profile_owner(),'commtag')) {
191                                         $tagger = array(
192                                                 'add' => t("add tag"),
193                                                 'class' => "",
194                                         );
195                                 }
196                         }
197                 } else {
198                         $indent = 'comment';
199                 }
200
201                 if($conv->is_writable()) {
202                         $buttons = array(
203                                 'like' => array( t("I like this \x28toggle\x29"), t("like")),
204                                 'dislike' => ((feature_enabled($conv->get_profile_owner(),'dislike')) ? array( t("I don't like this \x28toggle\x29"), t("dislike")) : ''),
205                         );
206                         if ($shareable) $buttons['share'] = array( t('Share this'), t('share'));
207                 }
208
209                 if(strcmp(datetime_convert('UTC','UTC',$item['created']),datetime_convert('UTC','UTC','now - 12 hours')) > 0){
210                         $shiny = 'shiny';
211                 }
212
213                 localize_item($item);
214
215                 $body = prepare_body($item,true);
216
217         list($categories, $folders) = get_cats_and_terms($item);
218
219                 if($a->theme['template_engine'] === 'internal') {
220                         $body_e = template_escape($body);
221                         $text_e = strip_tags(template_escape($body));
222                         $name_e = template_escape($profile_name);
223                         $title_e = template_escape($item['title']);
224                         $location_e = template_escape($location);
225                         $owner_name_e = template_escape($this->get_owner_name());
226                 }
227                 else {
228                         $body_e = $body;
229                         $text_e = strip_tags($body);
230                         $name_e = $profile_name;
231                         $title_e = $item['title'];
232                         $location_e = $location;
233                         $owner_name_e = $this->get_owner_name();
234                 }
235
236                 $tmp_item = array(
237                         'template' => $this->get_template(),
238                         
239                         'type' => implode("",array_slice(explode("/",$item['verb']),-1)),
240                         'tags' => $tags,
241             'hashtags' => $hashtags,
242             'mentions' => $mentions,
243                         'txt_cats' => t('Categories:'),
244                         'txt_folders' => t('Filed under:'),
245                         'has_cats' => ((count($categories)) ? 'true' : ''),
246                         'has_folders' => ((count($folders)) ? 'true' : ''),
247             'categories' => $categories,
248             'folders' => $folders,            
249                         'body' => $body_e,
250                         'text' => $text_e,
251                         'id' => $this->get_id(),
252                         'linktitle' => sprintf( t('View %s\'s profile @ %s'), $profile_name, ((strlen($item['author-link'])) ? $item['author-link'] : $item['url'])),
253                         'olinktitle' => sprintf( t('View %s\'s profile @ %s'), $this->get_owner_name(), ((strlen($item['owner-link'])) ? $item['owner-link'] : $item['url'])),
254                         'to' => t('to'),
255                         'via' => t('via'),
256                         'wall' => t('Wall-to-Wall'),
257                         'vwall' => t('via Wall-To-Wall:'),
258                         'profile_url' => $profile_link,
259                         'item_photo_menu' => item_photo_menu($item),
260                         'name' => $name_e,
261                         'thumb' => $profile_avatar,
262                         'osparkle' => $osparkle,
263                         'sparkle' => $sparkle,
264                         'title' => $title_e,
265                         'localtime' => datetime_convert('UTC', date_default_timezone_get(), $item['created'], 'r'),
266                         'ago' => (($item['app']) ? sprintf( t('%s from %s'),relative_date($item['created']),$item['app']) : relative_date($item['created'])),
267                         'lock' => $lock,
268                         'location' => $location_e,
269                         'indent' => $indent,
270                         'shiny' => $shiny,
271                         'owner_url' => $this->get_owner_url(),
272                         'owner_photo' => $this->get_owner_photo(),
273                         'owner_name' => $owner_name_e,
274                         'plink' => get_plink($item),
275                         'edpost'    => ((feature_enabled($conv->get_profile_owner(),'edit_posts')) ? $edpost : ''),
276                         'isstarred' => $isstarred,
277                         'star'      => ((feature_enabled($conv->get_profile_owner(),'star_posts')) ? $star : ''),
278                         'tagger'        => $tagger,
279                         'filer'     => ((feature_enabled($conv->get_profile_owner(),'filing')) ? $filer : ''),
280                         'drop' => $drop,
281                         'vote' => $buttons,
282                         'like' => $like,
283                         'dislike'   => $dislike,
284                         'switchcomment' => t('Comment'),
285                         'comment' => $this->get_comment_box($indent),
286                         'previewing' => ($conv->is_preview() ? ' preview ' : ''),
287                         'wait' => t('Please wait'),
288                         'thread_level' => $thread_level
289                 );
290
291                 $arr = array('item' => $item, 'output' => $tmp_item);
292                 call_hooks('display_item', $arr);
293
294                 $result = $arr['output'];
295
296                 $result['children'] = array();
297                 $children = $this->get_children();
298                 $nb_children = count($children);
299                 if($nb_children > 0) {
300                         foreach($children as $child) {
301                                 $result['children'][] = $child->get_template_data($alike, $dlike, $thread_level + 1);
302                         }
303                         // Collapse
304                         if(($nb_children > 2) || ($thread_level > 1)) {
305                                 $result['children'][0]['comment_firstcollapsed'] = true;
306                                 $result['children'][0]['num_comments'] = sprintf( tt('%d comment','%d comments',$total_children),$total_children );
307                                 $result['children'][0]['hidden_comments_num'] = $total_children;
308                                 $result['children'][0]['hidden_comments_text'] = tt('comment', 'comments', $total_children);
309                                 $result['children'][0]['hide_text'] = t('show more');
310                                 if($thread_level > 1) {
311                                         $result['children'][$nb_children - 1]['comment_lastcollapsed'] = true;
312                                 }
313                                 else {
314                                         $result['children'][$nb_children - 3]['comment_lastcollapsed'] = true;
315                                 }
316                         }
317                 }
318                 
319         if ($this->is_toplevel()) {
320             $result['total_comments_num'] = "$total_children";
321             $result['total_comments_text'] = tt('comment', 'comments', $total_children);
322         }
323         
324                 $result['private'] = $item['private'];
325                 $result['toplevel'] = ($this->is_toplevel() ? 'toplevel_item' : '');
326
327                 if($this->is_threaded()) {
328                         $result['flatten'] = false;
329                         $result['threaded'] = true;
330                 }
331                 else {
332                         $result['flatten'] = true;
333                         $result['threaded'] = false;
334                 }
335
336                 return $result;
337         }
338         
339         public function get_id() {
340                 return $this->get_data_value('id');
341         }
342
343         public function is_threaded() {
344                 return $this->threaded;
345         }
346
347         /**
348          * Add a child item
349          */
350         public function add_child($item) {
351                 $item_id = $item->get_id();
352                 if(!$item_id) {
353                         logger('[ERROR] Item::add_child : Item has no ID!!', LOGGER_DEBUG);
354                         return false;
355                 }
356                 if($this->get_child($item->get_id())) {
357                         logger('[WARN] Item::add_child : Item already exists ('. $item->get_id() .').', LOGGER_DEBUG);
358                         return false;
359                 }
360                 /*
361                  * Only add what will be displayed
362                  */
363                 if($item->get_data_value('network') === NETWORK_MAIL && local_user() != $item->get_data_value('uid')) {
364                         return false;
365                 }
366                 if(activity_match($item->get_data_value('verb'),ACTIVITY_LIKE) || activity_match($item->get_data_value('verb'),ACTIVITY_DISLIKE)) {
367                         return false;
368                 }
369                 
370                 $item->set_parent($this);
371                 $this->children[] = $item;
372                 return end($this->children);
373         }
374
375         /**
376          * Get a child by its ID
377          */
378         public function get_child($id) {
379                 foreach($this->get_children() as $child) {
380                         if($child->get_id() == $id)
381                                 return $child;
382                 }
383                 return null;
384         }
385
386         /**
387          * Get all ou children
388          */
389         public function get_children() {
390                 return $this->children;
391         }
392
393         /**
394          * Set our parent
395          */
396         protected function set_parent($item) {
397                 $parent = $this->get_parent();
398                 if($parent) {
399                         $parent->remove_child($this);
400                 }
401                 $this->parent = $item;
402                 $this->set_conversation($item->get_conversation());
403         }
404
405         /**
406          * Remove our parent
407          */
408         protected function remove_parent() {
409                 $this->parent = null;
410                 $this->conversation = null;
411         }
412
413         /**
414          * Remove a child
415          */
416         public function remove_child($item) {
417                 $id = $item->get_id();
418                 foreach($this->get_children() as $key => $child) {
419                         if($child->get_id() == $id) {
420                                 $child->remove_parent();
421                                 unset($this->children[$key]);
422                                 // Reindex the array, in order to make sure there won't be any trouble on loops using count()
423                                 $this->children = array_values($this->children);
424                                 return true;
425                         }
426                 }
427                 logger('[WARN] Item::remove_child : Item is not a child ('. $id .').', LOGGER_DEBUG);
428                 return false;
429         }
430
431         /**
432          * Get parent item
433          */
434         protected function get_parent() {
435                 return $this->parent;
436         }
437
438         /**
439          * set conversation
440          */
441         public function set_conversation($conv) {
442                 $previous_mode = ($this->conversation ? $this->conversation->get_mode() : '');
443                 
444                 $this->conversation = $conv;
445
446                 // Set it on our children too
447                 foreach($this->get_children() as $child)
448                         $child->set_conversation($conv);
449         }
450
451         /**
452          * get conversation
453          */
454         public function get_conversation() {
455                 return $this->conversation;
456         }
457
458         /**
459          * Get raw data
460          *
461          * We shouldn't need this
462          */
463         public function get_data() {
464                 return $this->data;
465         }
466
467         /**
468          * Get a data value
469          *
470          * Returns:
471          *      _ value on success
472          *      _ false on failure
473          */
474         public function get_data_value($name) {
475                 if(!isset($this->data[$name])) {
476                         logger('[ERROR] Item::get_data_value : Item has no value name "'. $name .'".', LOGGER_DEBUG);
477                         return false;
478                 }
479
480                 return $this->data[$name];
481         }
482
483         /**
484          * Set template
485          */
486         private function set_template($name) {
487                 $a = get_app();
488
489                 if(!x($this->available_templates, $name)) {
490                         logger('[ERROR] Item::set_template : Template not available ("'. $name .'").', LOGGER_DEBUG);
491                         return false;
492                 }
493
494                 if($a->theme['template_engine'] === 'smarty3') {
495                         $template_file = get_template_file($a, 'smarty3/' . $this->available_templates[$name]);
496                 }
497                 else {
498                         $template_file = $this->available_templates[$name];
499                 }
500                 $this->template = $template_file;
501         }
502
503         /**
504          * Get template
505          */
506         private function get_template() {
507                 return $this->template;
508         }
509
510         /**
511          * Check if this is a toplevel post
512          */
513         private function is_toplevel() {
514                 return $this->toplevel;
515         }
516
517         /**
518          * Check if this is writable
519          */
520         private function is_writable() {
521                 $conv = $this->get_conversation();
522
523                 if($conv) {
524                         // This will allow us to comment on wall-to-wall items owned by our friends
525                         // and community forums even if somebody else wrote the post.
526
527                         // bug #517 - this fixes for conversation owner
528                         if($conv->get_mode() == 'profile' && $conv->get_profile_owner() == local_user())
529                                 return true; 
530
531                         // this fixes for visitors
532                         return ($this->writable || ($this->is_visiting() && $conv->get_mode() == 'profile'));
533                 }
534                 return $this->writable;
535         }
536
537         /**
538          * Count the total of our descendants
539          */
540         private function count_descendants() {
541                 $children = $this->get_children();
542                 $total = count($children);
543                 if($total > 0) {
544                         foreach($children as $child) {
545                                 $total += $child->count_descendants();
546                         }
547                 }
548                 return $total;
549         }
550
551         /**
552          * Get the template for the comment box
553          */
554         private function get_comment_box_template() {
555                 return $this->comment_box_template;
556         }
557
558         /**
559          * Get the comment box
560          *
561          * Returns:
562          *      _ The comment box string (empty if no comment box)
563          *      _ false on failure
564          */
565         private function get_comment_box($indent) {
566                 $a = $this->get_app();
567                 if(!$this->is_toplevel() && !(get_config('system','thread_allow') && $a->theme_thread_allow)) {
568                         return '';
569                 }
570                 
571                 $comment_box = '';
572                 $conv = $this->get_conversation();
573                 $template = get_markup_template($this->get_comment_box_template());
574                 $ww = '';
575                 if( ($conv->get_mode() === 'network') && $this->is_wall_to_wall() )
576                         $ww = 'ww';
577
578                 if($conv->is_writable() && $this->is_writable()) {
579                         $qc = $qcomment =  null;
580
581                         /*
582                          * Hmmm, code depending on the presence of a particular plugin?
583                          * This should be better if done by a hook
584                          */
585                         if(in_array('qcomment',$a->plugins)) {
586                                 $qc = ((local_user()) ? get_pconfig(local_user(),'qcomment','words') : null);
587                                 $qcomment = (($qc) ? explode("\n",$qc) : null);
588                         }
589                         $comment_box = replace_macros($template,array(
590                                 '$return_path' => '',
591                                 '$threaded' => $this->is_threaded(),
592 //                              '$jsreload' => (($conv->get_mode() === 'display') ? $_SESSION['return_url'] : ''),
593                                 '$jsreload' => '',
594                                 '$type' => (($conv->get_mode() === 'profile') ? 'wall-comment' : 'net-comment'),
595                                 '$id' => $this->get_id(),
596                                 '$parent' => $this->get_id(),
597                                 '$qcomment' => $qcomment,
598                                 '$profile_uid' =>  $conv->get_profile_owner(),
599                                 '$mylink' => $a->contact['url'],
600                                 '$mytitle' => t('This is you'),
601                                 '$myphoto' => $a->contact['thumb'],
602                                 '$comment' => t('Comment'),
603                                 '$submit' => t('Submit'),
604                                 '$edbold' => t('Bold'),
605                                 '$editalic' => t('Italic'),
606                                 '$eduline' => t('Underline'),
607                                 '$edquote' => t('Quote'),
608                                 '$edcode' => t('Code'),
609                                 '$edimg' => t('Image'),
610                                 '$edurl' => t('Link'),
611                                 '$edvideo' => t('Video'),
612                                 '$preview' => ((feature_enabled($conv->get_profile_owner(),'preview')) ? t('Preview') : ''),
613                                 '$indent' => $indent,
614                                 '$sourceapp' => t($a->sourcename),
615                                 '$ww' => (($conv->get_mode() === 'network') ? $ww : ''),
616                                 '$rand_num' => random_digits(12)
617                         ));
618                 }
619
620                 return $comment_box;
621         }
622
623         private function get_redirect_url() {
624                 return $this->redirect_url;
625         }
626
627         /**
628          * Check if we are a wall to wall item and set the relevant properties
629          */
630         protected function check_wall_to_wall() {
631                 $a = $this->get_app();
632                 $conv = $this->get_conversation();
633                 $this->wall_to_wall = false;
634                 
635                 if($this->is_toplevel()) {
636                         if( (! $this->get_data_value('self')) && ($conv->get_mode() !== 'profile')) {
637                                 if($this->get_data_value('wall')) {
638
639                                         // On the network page, I am the owner. On the display page it will be the profile owner.
640                                         // This will have been stored in $a->page_contact by our calling page.
641                                         // Put this person as the wall owner of the wall-to-wall notice.
642
643                                         $this->owner_url = zrl($a->page_contact['url']);
644                                         $this->owner_photo = $a->page_contact['thumb'];
645                                         $this->owner_name = $a->page_contact['name'];
646                                         $this->wall_to_wall = true;
647                                 }
648                                 else if($this->get_data_value('owner-link')) {
649
650                                         $owner_linkmatch = (($this->get_data_value('owner-link')) && link_compare($this->get_data_value('owner-link'),$this->get_data_value('author-link')));
651                                         $alias_linkmatch = (($this->get_data_value('alias')) && link_compare($this->get_data_value('alias'),$this->get_data_value('author-link')));
652                                         $owner_namematch = (($this->get_data_value('owner-name')) && $this->get_data_value('owner-name') == $this->get_data_value('author-name'));
653                                         if((! $owner_linkmatch) && (! $alias_linkmatch) && (! $owner_namematch)) {
654
655                                                 // The author url doesn't match the owner (typically the contact)
656                                                 // and also doesn't match the contact alias. 
657                                                 // The name match is a hack to catch several weird cases where URLs are 
658                                                 // all over the park. It can be tricked, but this prevents you from
659                                                 // seeing "Bob Smith to Bob Smith via Wall-to-wall" and you know darn
660                                                 // well that it's the same Bob Smith. 
661
662                                                 // But it could be somebody else with the same name. It just isn't highly likely. 
663                                                 
664
665                                                 $this->owner_photo = $this->get_data_value('owner-avatar');
666                                                 $this->owner_name = $this->get_data_value('owner-name');
667                                                 $this->wall_to_wall = true;
668                                                 // If it is our contact, use a friendly redirect link
669                                                 if((link_compare($this->get_data_value('owner-link'),$this->get_data_value('url'))) 
670                                                         && ($this->get_data_value('network') === NETWORK_DFRN)) {
671                                                         $this->owner_url = $this->get_redirect_url();
672                                                 }
673                                                 else
674                                                         $this->owner_url = zrl($this->get_data_value('owner-link'));
675                                         }
676                                 }
677                         }
678                 }
679
680                 if(!$this->wall_to_wall) {
681                         $this->set_template('wall');
682                         $this->owner_url = '';
683                         $this->owner_photo = '';
684                         $this->owner_name = '';
685                 }
686         }
687
688         private function is_wall_to_wall() {
689                 return $this->wall_to_wall;
690         }
691
692         private function get_owner_url() {
693                 return $this->owner_url;
694         }
695
696         private function get_owner_photo() {
697                 return $this->owner_photo;
698         }
699
700         private function get_owner_name() {
701                 return $this->owner_name;
702         }
703
704         private function is_visiting() {
705                 return $this->visiting;
706         }
707
708
709
710
711 }
712 ?>