This repository has been archived by the owner on Oct 11, 2020. It is now read-only.
/
view.php
1315 lines (1135 loc) · 69.4 KB
/
view.php
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
327
328
329
330
331
332
333
334
335
336
337
338
339
340
341
342
343
344
345
346
347
348
349
350
351
352
353
354
355
356
357
358
359
360
361
362
363
364
365
366
367
368
369
370
371
372
373
374
375
376
377
378
379
380
381
382
383
384
385
386
387
388
389
390
391
392
393
394
395
396
397
398
399
400
401
402
403
404
405
406
407
408
409
410
411
412
413
414
415
416
417
418
419
420
421
422
423
424
425
426
427
428
429
430
431
432
433
434
435
436
437
438
439
440
441
442
443
444
445
446
447
448
449
450
451
452
453
454
455
456
457
458
459
460
461
462
463
464
465
466
467
468
469
470
471
472
473
474
475
476
477
478
479
480
481
482
483
484
485
486
487
488
489
490
491
492
493
494
495
496
497
498
499
500
501
502
503
504
505
506
507
508
509
510
511
512
513
514
515
516
517
518
519
520
521
522
523
524
525
526
527
528
529
530
531
532
533
534
535
536
537
538
539
540
541
542
543
544
545
546
547
548
549
550
551
552
553
554
555
556
557
558
559
560
561
562
563
564
565
566
567
568
569
570
571
572
573
574
575
576
577
578
579
580
581
582
583
584
585
586
587
588
589
590
591
592
593
594
595
596
597
598
599
600
601
602
603
604
605
606
607
608
609
610
611
612
613
614
615
616
617
618
619
620
621
622
623
624
625
626
627
628
629
630
631
632
633
634
635
636
637
638
639
640
641
642
643
644
645
646
647
648
649
650
651
652
653
654
655
656
657
658
659
660
661
662
663
664
665
666
667
668
669
670
671
672
673
674
675
676
677
678
679
680
681
682
683
684
685
686
687
688
689
690
691
692
693
694
695
696
697
698
699
700
701
702
703
704
705
706
707
708
709
710
711
712
713
714
715
716
717
718
719
720
721
722
723
724
725
726
727
728
729
730
731
732
733
734
735
736
737
738
739
740
741
742
743
744
745
746
747
748
749
750
751
752
753
754
755
756
757
758
759
760
761
762
763
764
765
766
767
768
769
770
771
772
773
774
775
776
777
778
779
780
781
782
783
784
785
786
787
788
789
790
791
792
793
794
795
796
797
798
799
800
801
802
803
804
805
806
807
808
809
810
811
812
813
814
815
816
817
818
819
820
821
822
823
824
825
826
827
828
829
830
831
832
833
834
835
836
837
838
839
840
841
842
843
844
845
846
847
848
849
850
851
852
853
854
855
856
857
858
859
860
861
862
863
864
865
866
867
868
869
870
871
872
873
874
875
876
877
878
879
880
881
882
883
884
885
886
887
888
889
890
891
892
893
894
895
896
897
898
899
900
901
902
903
904
905
906
907
908
909
910
911
912
913
914
915
916
917
918
919
920
921
922
923
924
925
926
927
928
929
930
931
932
933
934
935
936
937
938
939
940
941
942
943
944
945
946
947
948
949
950
951
952
953
954
955
956
957
958
959
960
961
962
963
964
965
966
967
968
969
970
971
972
973
974
975
976
977
978
979
980
981
982
983
984
985
986
987
988
989
990
991
992
993
994
995
996
997
998
999
1000
<?php
/**
* @version $Id: view.php 377 2009-02-12 08:52:32Z mahagr $
* Kunena Component
* @package Kunena
*
* @Copyright (C) 2008 - 2009 Kunena Team All rights reserved
* @license http://www.gnu.org/copyleft/gpl.html GNU/GPL
* @link http://www.kunena.com
*
* Based on FireBoard Component
* @Copyright (C) 2006 - 2007 Best Of Joomla All rights reserved
* @license http://www.gnu.org/copyleft/gpl.html GNU/GPL
* @link http://www.bestofjoomla.com
*
* Based on Joomlaboard Component
* @copyright (C) 2000 - 2004 TSMF / Jan de Graaff / All Rights Reserved
* @license http://www.gnu.org/copyleft/gpl.html GNU/GPL
* @author TSMF & Jan de Graaff
**/
// Dont allow direct linking
defined ('_VALID_MOS') or die('Direct Access to this location is not allowed.');
$fbConfig =& CKunenaConfig::getInstance();
$fbSession =& CKunenaSession::getInstance();
function KunenaViewPagination($catid, $threadid, $page, $totalpages, $maxpages) {
$fbConfig =& CKunenaConfig::getInstance();
$startpage = ($page - floor($maxpages/2) < 1) ? 1 : $page - floor($maxpages/2);
$endpage = $startpage + $maxpages;
if ($endpage > $totalpages) {
$startpage = ($totalpages-$maxpages) < 1 ? 1 : $totalpages-$maxpages;
$endpage = $totalpages;
}
$output = '<span class="fb_pagination">'._PAGE;
if ($startpage > 1)
{
if ($endpage < $totalpages) $endpage--;
$output .= CKunenaLink::GetThreadPageLink($fbConfig, 'view', $catid, $threadid, 1, $fbConfig->messages_per_page, 1, '', $rel='follow');
if ($startpage > 2)
{
$output .= "...";
}
}
for ($i = $startpage; $i <= $endpage && $i <= $totalpages; $i++)
{
if ($page == $i) {
$output .= "<strong>$i</strong>";
}
else {
$output .= CKunenaLink::GetThreadPageLink($fbConfig, 'view', $catid, $threadid, $i, $fbConfig->messages_per_page, $i, '', $rel='follow');
}
}
if ($endpage < $totalpages)
{
if ($endpage < $totalpages-1)
{
$output .= "...";
}
$output .= CKunenaLink::GetThreadPageLink($fbConfig, 'view', $catid, $threadid, $totalpages, $fbConfig->messages_per_page, $totalpages, '', $rel='follow');
}
$output .= '</span>';
return $output;
}
global $is_Moderator;
global $acl;
//securing form elements
$catid = (int)$catid;
$id = (int)$id;
$smileyList = smile::getEmoticons(0);
//ob_start();
$showedEdit = 0;
require_once (KUNENA_ABSSOURCESPATH . 'kunena.authentication.php');
require_once (KUNENA_ABSSOURCESPATH . 'kunena.statsbar.php');
//get the allowed forums and turn it into an array
$allow_forum = ($fbSession->allowed <> '')?explode(',', $fbSession->allowed):array();
$forumLocked = 0;
$topicLocked = 0;
$database->setQuery("SELECT * FROM #__fb_messages AS a LEFT JOIN #__fb_messages_text AS b ON a.id=b.mesid WHERE a.id={$id} and a.hold=0");
unset($this_message);
$database->loadObject($this_message);
check_dberror('Unable to load message.');
if ((in_array($catid, $allow_forum)) || (isset($this_message->catid) && in_array($this_message->catid, $allow_forum)))
{
$view = $view == "" ? $settings[current_view] : $view;
setcookie("fboard_settings[current_view]", $view, time() + 31536000, '/');
$topicLocked = $this_message->locked;
$topicSticky = $this_message->ordering;
if (count($this_message) < 1) {
echo '<p align="center">' . _MODERATION_INVALID_ID . '</p>';
}
else
{
$thread = $this_message->parent == 0 ? $this_message->id : $this_message->thread;
// Test if this is a valid SEO URL if not we should redirect using a 301 - permanent redirect
if ($view == "flat" && ($thread != $this_message->id || $catid != $this_message->catid))
{
// Invalid SEO URL detected!
// Create permanent re-direct and quit
// This query to calculate the page this reply is sitting on within this thread
$query = "SELECT count(*)
FROM #__fb_messages AS a
WHERE a.thread=$thread
AND a.id<=$this_message->id";
$database->setQuery($query);
$replyCount = $database->loadResult();
check_dberror('Unable to calculate replyCount.');
$replyPage = $replyCount > $fbConfig->messages_per_page ? ceil($replyCount / $fbConfig->messages_per_page) : 1;
header("HTTP/1.1 301 Moved Permanently");
header("Location: " . htmlspecialchars_decode(CKunenaLink::GetThreadPageURL($fbConfig, 'view', $this_message->catid, $thread, $replyPage, $fbConfig->messages_per_page, $this_message->id)));
die();
}
if ($my->id)
{
//mark this topic as read
$database->setQuery("SELECT readtopics FROM #__fb_sessions WHERE userid={$my->id}");
$readTopics = $database->loadResult();
if ($readTopics == "")
{
$readTopics = $thread;
}
else
{
//get all readTopics in an array
$_read_topics = @explode(',', $readTopics);
if (!@in_array($thread, $_read_topics)) {
$readTopics .= "," . $thread;
}
}
$database->setQuery("UPDATE #__fb_sessions set readtopics='{$readTopics}' WHERE userid={$my->id}");
$database->query();
}
//update the hits counter for this topic & exclude the owner
if ($my->id > 0 && $this_message->userid != $my->id) {
$database->setQuery("UPDATE #__fb_messages SET hits=hits+1 WHERE id=$thread AND parent=0");
$database->query();
}
// changed to 0 to fix the missing post when the thread splits over multiple pages
$i = 0;
$ordering = ($fbConfig->default_sort == 'desc' ? 'desc' : 'asc'); // Just to make sure only valid options make it
// Get messages of current thread
$database->setQuery("(SELECT * FROM #__fb_messages AS a "
."\n LEFT JOIN #__fb_messages_text AS b ON a.id=b.mesid WHERE a.id='$thread' AND a.hold=0 AND a.catid='$catid') UNION (SELECT * FROM #__fb_messages AS a "
."\n LEFT JOIN #__fb_messages_text AS b ON a.id=b.mesid WHERE a.thread='$thread' AND a.hold=0 AND a.catid='$catid') ORDER BY time $ordering");
$flat_messages = array();
if ($view != "flat") $flat_messages[] = $this_message;
foreach ($database->loadObjectList()as $message)
{
if (1) // if ($view == "flat")
{
$flat_messages[] = $message;
if ($id == $message->id) {
$idmatch = $i;
}
$i++;
}
else {
$messages[$message->parent][] = $message;
}
}
if ($ordering=='desc')
{
$idmatch = $i - $idmatch;
}
if (1) // if ($view == "flat")
{
//prepare threading
$limit = $fbConfig->messages_per_page;
if ($idmatch > $limit) {
$limitstart = (floor($idmatch / $limit)) * $limit;
}
else {
$limitstart = 0;
}
$limitstart = intval(mosGetParam($_REQUEST, 'limitstart', $limitstart));
$total = count($flat_messages);
$maxpages = 9 - 2; // odd number here (show - 2)
$page = floor($limitstart / $limit)+1;
$totalpages = ceil($total / $limit);
$pagination = KunenaViewPagination($catid, $thread, $page, $totalpages, $maxpages);
$flat_messages = array_slice($flat_messages, ($page-1)*$limit, $limit);
}
//Get the category name for breadcrumb
unset($objCatInfo, $objCatParentInfo);
$database->setQuery("SELECT * from #__fb_categories where id='$catid'");
$database->loadObject($objCatInfo);
//Get Parent's cat.name for breadcrumb
$database->setQuery("SELECT name,id from #__fb_categories WHERE id='$objCatInfo->parent'");
$database->loadObject($objCatParentInfo);
$forumLocked = $objCatInfo->locked;
//meta description and keywords
$metaKeys=kunena_htmlspecialchars(stripslashes("{$this_message->subject}, {$objCatParentInfo->name}, {$fbConfig->board_title}, " ._GEN_FORUM. ', ' .$GLOBALS['mosConfig_sitename']));
$metaDesc=kunena_htmlspecialchars(stripslashes("{$this_message->subject} ({$page}/{$totalpages}) - {$objCatParentInfo->name} - {$objCatInfo->name} - {$fbConfig->board_title} " ._GEN_FORUM));
if( CKunenaTools::isJoomla15() )
{
$document =& JFactory::getDocument();
$cur = $document->get( 'description' );
$metaDesc = $cur .'. ' . $metaDesc;
$document =& JFactory::getDocument();
$document->setMetadata( 'keywords', $metaKeys );
$document->setDescription($metaDesc);
}
else
{
$mainframe->appendMetaTag( 'keywords',$metaKeys );
$mainframe->appendMetaTag( 'description' ,$metaDesc );
}
//Perform subscriptions check only once
$fb_cansubscribe = 0;
if ($fbConfig->allowsubscriptions && ("" != $my_id || 0 != $my_id))
{
$database->setQuery("SELECT thread from #__fb_subscriptions where userid=$my_id and thread='$thread'");
$fb_subscribed = $database->loadResult();
if ($fb_subscribed == "") {
$fb_cansubscribe = 1;
}
}
//Perform favorites check only once
$fb_canfavorite = 0;
if ($fbConfig->allowfavorites && ("" != $my_id || 0 != $my_id))
{
$database->setQuery("SELECT thread from #__fb_favorites where userid=$my_id and thread='$thread'");
$fb_favorited = $database->loadResult();
if ($fb_favorited == "") {
$fb_canfavorite = 1;
}
}
//data ready display now
if ($is_Moderator || (($forumLocked == 0 && $topicLocked == 0) && ($my->id > 0 || $fbConfig->pubwrite)))
{
//this user is allowed to reply to this topic
$thread_reply = CKunenaLink::GetTopicPostReplyLink('reply', $catid, $thread, isset($fbIcons['topicreply']) ? '<img src="' . KUNENA_URLICONSPATH . '' . $fbIcons['topicreply'] . '" alt="' . _GEN_POST_REPLY . '" title="' . _GEN_POST_REPLY . '" border="0" />' : _GEN_POST_REPLY);
}
if ($fb_cansubscribe == 1)
{
// this user is allowed to subscribe - check performed further up to eliminate duplicate checks
// for top and bottom navigation
$thread_subscribe = CKunenaLink::GetTopicPostLink('subscribe', $catid, $id, isset($fbIcons['subscribe']) ? '<img src="' . KUNENA_URLICONSPATH . '' . $fbIcons['subscribe'] . '" alt="' . _VIEW_SUBSCRIBETXT . '" title="' . _VIEW_SUBSCRIBETXT . '" border="0" />' : _VIEW_SUBSCRIBETXT);
}
//START: FAVORITES
if ($my_id != 0 && $fbConfig->allowsubscriptions && $fb_cansubscribe == 0)
{
// this user is allowed to unsubscribe
$thread_subscribe = CKunenaLink::GetTopicPostLink('unsubscribe', $catid, $id, isset($fbIcons['unsubscribe']) ? '<img src="' . KUNENA_URLICONSPATH . '' . $fbIcons['unsubscribe'] . '" alt="' . _VIEW_UNSUBSCRIBETXT . '" title="' . _VIEW_UNSUBSCRIBETXT . '" border="0" />' : _VIEW_UNSUBSCRIBETXT);
}
if ($fb_canfavorite == 1)
{
// this user is allowed to add a favorite - check performed further up to eliminate duplicate checks
// for top and bottom navigation
$thread_favorite = CKunenaLink::GetTopicPostLink('favorite', $catid, $id, isset($fbIcons['favorite']) ? '<img src="' . KUNENA_URLICONSPATH . '' . $fbIcons['favorite'] . '" alt="' . _VIEW_FAVORITETXT . '" title="' . _VIEW_FAVORITETXT . '" border="0" />' : _VIEW_FAVORITETXT);
}
if ($my_id != 0 && $fbConfig->allowfavorites && $fb_canfavorite == 0)
{
// this user is allowed to unfavorite
$thread_favorite = CKunenaLink::GetTopicPostLink('unfavorite', $catid, $id, isset($fbIcons['unfavorite']) ? '<img src="' . KUNENA_URLICONSPATH . '' . $fbIcons['unfavorite'] . '" alt="' . _VIEW_UNFAVORITETXT . '" title="' . _VIEW_UNFAVORITETXT . '" border="0" />' : _VIEW_UNFAVORITETXT);
}
// FINISH: FAVORITES
if ($is_Moderator || ($forumLocked == 0 && ($my->id > 0 || $fbConfig->pubwrite)))
{
//this user is allowed to post a new topic
$thread_new = CKunenaLink::GetPostNewTopicLink($catid, isset($fbIcons['new_topic']) ? '<img src="' . KUNENA_URLICONSPATH . '' . $fbIcons['new_topic'] . '" alt="' . _GEN_POST_NEW_TOPIC . '" title="' . _GEN_POST_NEW_TOPIC . '" border="0" />' : _GEN_POST_NEW_TOPIC);
}
if ($is_Moderator)
{
// offer the moderator always the move link to relocate a topic to another forum
// and the (un)sticky bit links
// and the (un)lock links
$thread_move = CKunenaLink::GetTopicPostLink('move', $catid, $id, isset($fbIcons['move']) ? '<img src="' . KUNENA_URLICONSPATH . $fbIcons['move'] . '" alt="Move" border="0" title="' . _VIEW_MOVE . '" />':_GEN_MOVE);
if ($topicSticky == 0)
{
$thread_sticky = CKunenaLink::GetTopicPostLink('sticky', $catid, $id, isset($fbIcons['sticky']) ? '<img src="' . KUNENA_URLICONSPATH . $fbIcons['sticky'] . '" alt="Sticky" border="0" title="' . _VIEW_STICKY . '" />':_GEN_STICKY);
}
else
{
$thread_sticky = CKunenaLink::GetTopicPostLink('unsticky', $catid, $id, isset($fbIcons['unsticky']) ? '<img src="' . KUNENA_URLICONSPATH . $fbIcons['unsticky'] . '" alt="Unsticky" border="0" title="' . _VIEW_UNSTICKY . '" />':_GEN_UNSTICKY);
}
if ($topicLocked == 0)
{
$thread_lock = CKunenaLink::GetTopicPostLink('lock', $catid, $id, isset($fbIcons['lock']) ? '<img src="' . KUNENA_URLICONSPATH . $fbIcons['lock'] . '" alt="Lock" border="0" title="' . _VIEW_LOCK . '" />':_GEN_LOCK);
}
else
{
$thread_lock = CKunenaLink::GetTopicPostLink('unlock', $catid, $id, isset($fbIcons['unlock']) ? '<img src="' . KUNENA_URLICONSPATH . $fbIcons['unlock'] . '" alt="Unlock" border="0" title="' . _VIEW_UNLOCK . '" />':_GEN_UNLOCK);
}
$thread_delete = CKunenaLink::GetTopicPostLink('delete', $catid, $id, isset($fbIcons['delete']) ? '<img src="' . KUNENA_URLICONSPATH . $fbIcons['delete'] . '" alt="Delete" border="0" title="' . _VIEW_DELETE . '" />':_GEN_DELETE);
$thread_merge = CKunenaLink::GetTopicPostLink('merge', $catid, $id, isset($fbIcons['merge']) ? '<img src="' . KUNENA_URLICONSPATH . $fbIcons['merge'] . '" alt="Merge" border="0" title="' . _VIEW_MERGE . '" />':_GEN_MERGE);
}
?>
<script type = "text/javascript">
jQuery(function()
{
jQuery(".fb_qr_fire").click(function()
{
jQuery("#sc" + (jQuery(this).attr("id").split("__")[1])).toggle();
});
jQuery(".fb_qm_cncl_btn").click(function()
{
jQuery("#sc" + (jQuery(this).attr("id").split("__")[1])).toggle();
});
});
</script>
<div>
<?php
if (file_exists(KUNENA_ABSTMPLTPATH . '/fb_pathway.php')) {
require_once (KUNENA_ABSTMPLTPATH . '/fb_pathway.php');
}
else {
require_once (KUNENA_ABSPATH . '/template/default/fb_pathway.php');
}
?>
</div>
<?php if($objCatInfo->headerdesc) { ?>
<table class="fb_forum-headerdesc" border="0" cellpadding="0" cellspacing="0" width="100%">
<tr>
<td>
<?php
$headerdesc = stripslashes(smile::smileReplace($objCatInfo->headerdesc, 0, $fbConfig->disemoticons, $smileyList));
$headerdesc = nl2br($headerdesc);
//wordwrap:
$headerdesc = smile::htmlwrap($headerdesc, $fbConfig->wrap);
echo $headerdesc;
?>
</td>
</tr>
</table>
<?php } ?>
<!-- B: List Actions -->
<table class="fb_list_actions" border = "0" cellspacing = "0" cellpadding = "0" width="100%">
<tr>
<td class = "fb_list_actions_goto">
<?php
//go to bottom
echo '<a name="forumtop" /> ';
echo CKunenaLink::GetSamePageAnkerLink('forumbottom', isset($fbIcons['bottomarrow']) ? '<img src="' . KUNENA_URLICONSPATH . '' . $fbIcons['bottomarrow'] . '" border="0" alt="' . _GEN_GOTOBOTTOM . '" title="' . _GEN_GOTOBOTTOM . '"/>' : _GEN_GOTOBOTTOM);
echo '</td>';
if ($is_Moderator || isset($thread_reply) || isset($thread_subscribe) || isset($thread_favorite))
{
echo '<td class="fb_list_actions_forum">';
echo '<div class="fb_message_buttons_row" style="text-align: center;">';
if (isset($thread_reply)) echo $thread_reply;
if (isset($thread_subscribe)) echo ' '.$thread_subscribe;
if (isset($thread_favorite)) echo ' '.$thread_favorite;
echo '</div>';
if ($is_Moderator)
{
echo '<div class="fb_message_buttons_row" style="text-align: center;">';
echo $thread_delete;
echo ' '.$thread_move;
echo ' '.$thread_sticky;
echo ' '.$thread_lock;
echo '</div>';
}
echo '</td>';
}
echo '<td class="fb_list_actions_forum" width="100%">';
if (isset($thread_new))
{
echo '<div class="fb_message_buttons_row" style="text-align: left;">';
echo $thread_new;
echo '</div>';
}
if (isset($thread_merge))
{
echo '<div class="fb_message_buttons_row" style="text-align: left;">';
echo $thread_merge;
echo '</div>';
}
echo '</td>';
//pagination 1
echo '<td class="fb_list_pages_all" nowrap="nowrap">';
echo $pagination;
echo '</td>';
?>
</tr>
</table>
<!-- F: List Actions -->
<!-- <table border = "0" cellspacing = "0" cellpadding = "0" width = "100%" align = "center"> -->
<table class = "fb_blocktable<?php echo $objCatInfo->class_sfx; ?>" id="fb_views" cellpadding = "0" cellspacing = "0" border = "0" width = "100%">
<thead>
<tr>
<th align="left">
<div class = "fb_title_cover fbm">
<span class = "fb_title fbl"><b><?php echo _KUNENA_TOPIC; ?></b> <?php echo $jr_topic_title; ?></span>
</div>
<!-- B: FORUM TOOLS -->
<?php
//(JJ) BEGIN: RECENT POSTS
if (file_exists(KUNENA_ABSTMPLTPATH . '/plugin/forumtools/forumtools.php')) {
include (KUNENA_ABSTMPLTPATH . '/plugin/forumtools/forumtools.php');
}
else {
include (KUNENA_ABSPATH . '/template/default/plugin/forumtools/forumtools.php');
}
//(JJ) FINISH: RECENT POSTS
?>
<!-- F: FORUM TOOLS -->
<!-- Begin: Total Favorite -->
<?php
$database->setQuery("SELECT COUNT(*) FROM #__fb_favorites where thread='$thread'");
$fb_totalfavorited = $database->loadResult();
echo '<div class="fb_totalfavorite">';
if ($fbIcons['favoritestar']) {
if ($fb_totalfavorited>=1) echo '<img src="'.KUNENA_URLICONSPATH . $fbIcons['favoritestar'].'" alt="*" border="0" title="' . _KUNENA_FAVORITE . '" />';
if ($fb_totalfavorited>=3) echo '<img src="'.KUNENA_URLICONSPATH . $fbIcons['favoritestar'].'" alt="*" border="0" title="' . _KUNENA_FAVORITE . '" />';
if ($fb_totalfavorited>=6) echo '<img src="'.KUNENA_URLICONSPATH . $fbIcons['favoritestar'].'" alt="*" border="0" title="' . _KUNENA_FAVORITE . '" />';
if ($fb_totalfavorited>=10) echo '<img src="'.KUNENA_URLICONSPATH . $fbIcons['favoritestar'].'" alt="*" border="0" title="' . _KUNENA_FAVORITE . '" />';
if ($fb_totalfavorited>=15) echo '<img src="'.KUNENA_URLICONSPATH . $fbIcons['favoritestar'].'" alt="*" border="0" title="' . _KUNENA_FAVORITE . '" />';
} else {
echo _KUNENA_TOTALFAVORITE;
echo $fb_totalfavorited;
}
echo '</div>';
?>
<!-- Finish: Total Favorite -->
</th>
</tr>
</thead>
<tr>
<td>
<?php
$tabclass = array
(
"sectiontableentry1",
"sectiontableentry2"
);
$mmm = 0;
$k = 0;
// Set up a list of moderators for this category (limits amount of queries)
$database->setQuery("SELECT a.userid FROM #__fb_users AS a" . "\n LEFT JOIN #__fb_moderation AS b" . "\n ON b.userid=a.userid" . "\n WHERE b.catid='$catid'");
$catModerators = $database->loadResultArray();
/**
* note: please check if this routine is fine. there is no need to see for all messages if they are locked or not, either the thread or cat can be locked anyway
*/
//check if topic is locked
$_lockTopicID = $this_message->thread;
$topicLocked = $this_message->locked;
if ($_lockTopicID) // prev UNDEFINED $topicID!!
{
$lockedWhat = _TOPIC_NOT_ALLOWED; // UNUSED
}
else
{ //topic not locked; check if forum is locked
$database->setQuery("select locked from #__fb_categories where id={$this_message->catid}");
$topicLocked = $database->loadResult();
$lockedWhat = _FORUM_NOT_ALLOWED; // UNUSED
}
// END TOPIC LOCK
if (count($flat_messages) > 0)
{
foreach ($flat_messages as $fmessage)
{
$k = 1 - $k;
$mmm++;
if ($fmessage->parent == 0) {
$fb_thread = $fmessage->id;
}
else {
$fb_thread = $fmessage->thread;
}
//filter out clear html
$fmessage->name = kunena_htmlspecialchars($fmessage->name);
$fmessage->email = kunena_htmlspecialchars($fmessage->email);
$fmessage->subject = kunena_htmlspecialchars($fmessage->subject);
//Get userinfo needed later on, this limits the amount of queries
unset($userinfo);
$database->setQuery("SELECT a.*,b.name,b.username,b.gid FROM #__fb_users as a LEFT JOIN #__users as b on b.id=a.userid where a.userid='$fmessage->userid'");
$database->loadObject($userinfo);
if ($userinfo == NULL) {
$userinfo = new stdClass();
$userinfo->userid = 0;
$userinfo->name = '';
$userinfo->username = '';
$userinfo->avatar = '';
$userinfo->gid = 0;
$userinfo->rank = 0;
$userinfo->posts = 0;
$userinfo->karma = 0;
$userinfo->gender = _KUNENA_NOGENDER;
$userinfo->personalText = '';
$userinfo->ICQ = '';
$userinfo->location = '';
$userinfo->birthdate = '';
$userinfo->AIM = '';
$userinfo->MSN = '';
$userinfo->YIM = '';
$userinfo->SKYPE = '';
$userinfo->GTALK = '';
$userinfo->websiteurl = '';
$userinfo->signature = '';
}
if ($fbConfig->fb_profile == 'cb')
{
$triggerParams = array( 'userid'=> $fmessage->userid,
'userinfo'=> &$userinfo );
$kunenaProfile->trigger( 'profileIntegration', $triggerParams );
}
//get the username:
if ($fbConfig->username) {
$fb_queryName = "username";
}
else {
$fb_queryName = "name";
}
$fb_username = $userinfo->$fb_queryName;
if ($fb_username == "" || $fbConfig->changename) {
$fb_username = stripslashes($fmessage->name);
}
$fb_username = kunena_htmlspecialchars($fb_username);
$msg_id = $fmessage->id;
$lists["userid"] = $userinfo->userid;
$msg_username = $fmessage->email != "" && $my_id > 0 && $fbConfig->showemail ? CKunenaLink::GetEmailLink(kunena_htmlspecialchars(stripslashes($fmessage->email)), $fb_username) : $fb_username;
if ($fbConfig->allowavatar)
{
$Avatarname = $userinfo->username;
if ($fbConfig->avatar_src == "jomsocial")
{
// Get CUser object
$jsuser =& CFactory::getUser($userinfo->userid);
$msg_avatar = '<span class="fb_avatar"><img src="' . $jsuser->getThumbAvatar() . '" alt=" " /></span>';
}
else if ($fbConfig->avatar_src == "clexuspm") {
$msg_avatar = '<span class="fb_avatar"><img src="' . MyPMSTools::getAvatarLinkWithID($userinfo->userid) . '" /></span>';
}
else if ($fbConfig->avatar_src == "cb")
{
$msg_avatar = '<span class="fb_avatar">'.$kunenaProfile->showAvatar($userinfo->userid).'</span>';
}
else
{
$avatar = $userinfo->avatar;
if (!empty($avatar)) {
$msg_avatar = '<span class="fb_avatar"><img border="0" src="' . KUNENA_LIVEUPLOADEDPATH . '/avatars/' . $avatar . '" alt="" /></span>';
}
else
{
$msg_avatar = '<span class="fb_avatar"><img border="0" src="' . KUNENA_LIVEUPLOADEDPATH . '/avatars/s_nophoto.jpg" alt="" /></span>';
}
}
}
if ($fbConfig->showuserstats)
{
//user type determination
$ugid = $userinfo->gid;
$uIsMod = 0;
$uIsAdm = 0;
$uIsMod = in_array($userinfo->userid, $catModerators);
if ($ugid > 0) { //only get the groupname from the ACL if we're sure there is one
$agrp = strtolower($acl->get_group_name($ugid, 'ARO'));
}
if ($ugid == 0) {
$msg_usertype = _VIEW_VISITOR;
}
else
{
if (strtolower($agrp) == "administrator" || strtolower($agrp) == "superadministrator" || strtolower($agrp) == "super administrator")
{
$msg_usertype = _VIEW_ADMIN;
$uIsAdm = 1;
}
elseif ($uIsMod) {
$msg_usertype = _VIEW_MODERATOR;
}
else {
$msg_usertype = _VIEW_USER;
}
}
//done usertype determination, phew...
//# of post for this user and ranking
if ($userinfo->userid)
{
$numPosts = (int)$userinfo->posts;
//ranking
$rText = ''; $showSpRank = false;
if ($fbConfig->showranking)
{
if ($showSpRank = $userinfo->rank != '0')
{
//special rank
$database->setQuery("SELECT * FROM #__fb_ranks WHERE rank_id = '$userinfo->rank'");
} else {
//post count rank
$database->setQuery("SELECT * FROM #__fb_ranks WHERE ((rank_min <= $numPosts) AND (rank_special = 0)) ORDER BY rank_min DESC LIMIT 1");
}
$database->loadObject($rank);
$rText = $rank->rank_title;
$rImg = KUNENA_URLRANKSPATH . $rank->rank_image;
}
if ($uIsMod and !$showSpRank)
{
$rText = _RANK_MODERATOR;
$rImg = KUNENA_URLRANKSPATH . 'rankmod.gif';
}
if ($uIsAdm and !$showSpRank)
{
$rText = _RANK_ADMINISTRATOR;
$rImg = KUNENA_URLRANKSPATH . 'rankadmin.gif';
}
if ($fbConfig->rankimages && isset($rImg)) {
$msg_userrankimg = '<img src="' . $rImg . '" alt="" />';
}
$msg_userrank = $rText;
$useGraph = 0; //initialization
if (!$fbConfig->poststats)
{
$msg_posts = '<div class="viewcover">' .
"<strong>" . _POSTS . " $numPosts" . "</strong>" .
"</div>";
}
else
{
$myGraph = new phpGraph;
//$myGraph->SetGraphTitle(_POSTS);
$myGraph->AddValue(_POSTS, $numPosts);
$myGraph->SetRowSortMode(0);
$myGraph->SetBarImg(KUNENA_URLGRAPHPATH . "col" . $fbConfig->statscolor . "m.png");
$myGraph->SetBarImg2(KUNENA_URLEMOTIONSPATH . "graph.gif");
$myGraph->SetMaxVal($maxPosts);
$myGraph->SetShowCountsMode(2);
$myGraph->SetBarWidth(4); //height of the bar
$myGraph->SetBorderColor("#333333");
$myGraph->SetBarBorderWidth(0);
$myGraph->SetGraphWidth(64); //should match column width in the <TD> above -5 pixels
//$myGraph->BarGraphHoriz();
$useGraph = 1;
}
}
}
//karma points and buttons
if ($fbConfig->showkarma && $userinfo->userid != 0)
{
$karmaPoints = $userinfo->karma;
$karmaPoints = (int)$karmaPoints;
$msg_karma = "<strong>" . _KARMA . ":</strong> $karmaPoints";
if ($my->id != '0' && $my->id != $userinfo->userid)
{
$msg_karmaminus = CKunenaLink::GetKarmaLink('decrease', $catid, $fmessage->id, $userinfo->userid, '<img src="'.(isset($fbIcons['karmaminus'])?(KUNENA_URLICONSPATH . "" . $fbIcons['karmaminus']):(KUNENA_URLEMOTIONSPATH . "karmaminus.gif")).'" alt="Karma-" border="0" title="' . _KARMA_SMITE . '" align="middle" />' );
$msg_karmaplus = CKunenaLink::GetKarmaLink('increase', $catid, $fmessage->id, $userinfo->userid, '<img src="'.(isset($fbIcons['karmaplus'])?(KUNENA_URLICONSPATH . "" . $fbIcons['karmaplus']):(KUNENA_URLEMOTIONSPATH . "karmaplus.gif")).'" alt="Karma+" border="0" title="' . _KARMA_APPLAUD . '" align="middle" />' );
}
}
/*let's see if we should use Missus integration */
if ($fbConfig->pm_component == "missus" && $userinfo->userid && $my->id)
{
//we should offer the user a Missus link
//first get the username of the user to contact
$PMSName = $userinfo->username;
$msg_pms
= "<a href=\"" . sefRelToAbs('index.php?option=com_missus&func=newmsg&user=' . $userinfo->userid . '&subject=' . _GEN_FORUM . ': ' . urlencode(utf8_encode($fmessage->subject))) . "\"><img src='";
if ($fbIcons['pms']) {
$msg_pms .= KUNENA_URLICONSPATH . "" . $fbIcons['pms'];
}
else {
$msg_pms .= KUNENA_URLICONSPATH . $fbIcons['pms'];;
}
$msg_pms .= "' alt=\"" . _VIEW_PMS . "\" border=\"0\" title=\"" . _VIEW_PMS . "\" /></a>";
}
/*let's see if we should use JIM integration */
if ($fbConfig->pm_component == "jim" && $userinfo->userid && $my->id)
{
//we should offer the user a JIM link
//first get the username of the user to contact
$PMSName = $userinfo->username;
$msg_pms = "<a href=\"" . sefRelToAbs('index.php?option=com_jim&page=new&id=' . $PMSName . '&title=' . $fmessage->subject) . "\"><img src='";
if ($fbIcons['pms']) {
$msg_pms .= KUNENA_URLICONSPATH . "" . $fbIcons['pms'];
}
else {
$msg_pms .= KUNENA_URLICONSPATH . $fbIcons['pms'];;
}
$msg_pms .= "' alt=\"" . _VIEW_PMS . "\" border=\"0\" title=\"" . _VIEW_PMS . "\" /></a>";
}
/*let's see if we should use uddeIM integration */
if ($fbConfig->pm_component == "uddeim" && $userinfo->userid && $my->id)
{
//we should offer the user a PMS link
//first get the username of the user to contact
$PMSName = $userinfo->username;
$msg_pms = "<a href=\"" . sefRelToAbs('index.php?option=com_uddeim&task=new&recip=' . $userinfo->userid) . "\"><img src=\"";
if ($fbIcons['pms']) {
$msg_pms .= KUNENA_URLICONSPATH . '' . $fbIcons['pms'];
}
else {
$msg_pms .= KUNENA_URLEMOTIONSPATH . "sendpm.gif";
}
$msg_pms .= "\" alt=\"" . _VIEW_PMS . "\" border=\"0\" title=\"" . _VIEW_PMS . "\" /></a>";
}
/*let's see if we should use myPMS2 integration */
if ($fbConfig->pm_component == "pms" && $userinfo->userid && $my->id)
{
//we should offer the user a PMS link
//first get the username of the user to contact
$PMSName = $userinfo->username;
$msg_pms = "<a href=\"" . sefRelToAbs('index.php?option=com_pms&page=new&id=' . $PMSName . '&title=' . $fmessage->subject) . "\"><img src=\"";
if ($fbIcons['pms']) {
$msg_pms .= KUNENA_URLICONSPATH . "" . $fbIcons['pms'];
}
else {
$msg_pms .= KUNENA_URLEMOTIONSPATH . "sendpm.gif";
}
$msg_pms .= "\" alt=\"" . _VIEW_PMS . "\" border=\"0\" title=\"" . _VIEW_PMS . "\" /></a>";
}
// online - ofline status
if ($userinfo->userid > 0)
{
$sql = "SELECT count(userid) FROM #__session WHERE userid=" . $userinfo->userid;
$database->setQuery($sql);
$isonline = $database->loadResult();
if ($isonline && $userinfo->showOnline ==1 ) {
$msg_online = isset($fbIcons['onlineicon']) ? '<img src="'
. KUNENA_URLICONSPATH . '' . $fbIcons['onlineicon'] . '" border="0" alt="' . _MODLIST_ONLINE . '" />' : ' <img src="' . KUNENA_URLEMOTIONSPATH . 'onlineicon.gif" border="0" alt="' . _MODLIST_ONLINE . '" />';
}
else {
$msg_online = isset($fbIcons['offlineicon']) ? '<img src="'
. KUNENA_URLICONSPATH . '' . $fbIcons['offlineicon'] . '" border="0" alt="' . _MODLIST_OFFLINE . '" />' : ' <img src="' . KUNENA_URLEMOTIONSPATH . 'offlineicon.gif" border="0" alt="' . _MODLIST_OFFLINE . '" />';
}
}
/* PM integration */
if ($fbConfig->pm_component == "jomsocial" && $userinfo->userid && $my->id)
{
$onclick = CMessaging::getPopup($userinfo->userid);
$msg_pms = '<a href="javascript:void(0)" onclick="'. $onclick . "\">";
if ($fbIcons['pms']) {
$msg_pms .= "<img src=\"".KUNENA_URLICONSPATH."".$fbIcons['pms']."\" alt=\""._VIEW_PMS."\" border=\"0\" title=\""._VIEW_PMS."\" />";
}
else
{
$msg_pms .= _VIEW_PMS;
}
$msg_pms .= "</a>";
//$msg_pms = '<a href="javascript:void(0)" onclick="'. $onclick .'">Send message</a>';
}
else if ($fbConfig->pm_component == "clexuspm" && $userinfo->userid && $my->id)
{
//we should offer the user a PMS link
//first get the username of the user to contact
$PMSName = $userinfo->aid;
$msg_pms = "<a href=\"" . sefRelToAbs('index.php?option=com_mypms&task=new&to=' . $userinfo->userid . '&title=' . $fmessage->subject) . "\"><img src=\"";
if ($fbIcons['pms']) {
$msg_pms .= KUNENA_URLICONSPATH . "" . $fbIcons['pms'];
}
else {
$msg_pms .= KUNENA_JLIVEURL . "/components/com_mypms/images/icons/message_12px.gif";
}
$msg_pms .= "\" alt=\"" . _VIEW_PMS . "\" border=\"0\" title=\"" . _VIEW_PMS . "\" /></a>";
//mypms pro profile link
$msg_profile = "<a href=\"" . MyPMSTools::getProfileLink($userinfo->userid) . "\"><img src=\"";
if ($fbIcons['userprofile']) {
$msg_profile .= KUNENA_URLICONSPATH . '' . $fbIcons['userprofile'];
}
else {
$msg_profile .= KUNENA_JLIVEURL . "/components/com_mypms/images/managecontact_icon.gif";
}
$msg_profile .= "\" alt=\"" . _VIEW_PROFILE . "\" border=\"0\" title=\"" . _VIEW_PROFILE . "\" /></a>";
//mypms add buddy link
$msg_buddy = "<a href=\"" . sefRelToAbs('index.php?option=com_mypms&user=' . $PMSName . '&task=addbuddy') . "\"><img src=\"";
if ($fbIcons['pms2buddy']) {
$msg_buddy .= KUNENA_URLICONSPATH . "" . $fbIcons['pms2buddy'];
}
else {
$msg_buddy .= KUNENA_JLIVEURL . "/components/com_mypms/images/messages/addbuddy.gif";
}
$msg_buddy .= "\" alt=\"" . _VIEW_ADDBUDDY . "\" border=\"0\" title=\"" . _VIEW_ADDBUDDY . "\" /></a>";
$database->setQuery("SELECT icq,ym,msn,aim,website,location FROM #__mypms_profiles WHERE user='" . $PMSName . "'");
$mostables = $database->loadObjectList();
check_dberror("Unable to load mypms profile.");
foreach ($mostables as $mostables)
{
if ($mostables->aim)
$msg_aim = "<a href=\"aim:goim?screenname=" . str_replace(" ", "+", kunena_htmlspecialchars($mostables->aim)) . "\"><img src=\"" . KUNENA_URLEMOTIONSPATH . "aim.png\" border=0 alt=\"\" /></a>";
if ($mostables->icq)
$msg_icq = "<a href=\"http://www.icq.com/whitepages/wwp.php?uin=" . kunena_htmlspecialchars($mostables->icq) . "\"><img src=\"" . KUNENA_URLEMOTIONSPATH . "icq.png\" border=0 alt=\"\" /></a>";
if ($mostables->msn)
$msg_msn = "<a href=\"" . sefRelToAbs('index.php?option=com_mypms&task=showprofile&user=' . $PMSName) . "\"><img src=\"" . KUNENA_URLEMOTIONSPATH . "msn.png\" border=0 alt=\"\" /></a>";
if ($mostables->ym)
$msg_yahoo = "<a href=\"http://edit.yahoo.com/config/send_webmesg?.target=" . kunena_htmlspecialchars($mostables->ym) . "&.src=pg\"><img src=\"http://opi.yahoo.com/online?u=" . kunena_htmlspecialchars(stripslashes($mostables->ym)) . "&m=g&t=0\" border=0 alt=\"\" /></a>";
if ($mostables->location)
$msg_loc = kunena_htmlspecialchars($mostables->location);
}
unset ($mostables);
}
//Check if the Integration settings are on, and set the variables accordingly.
if ($fbConfig->fb_profile == "cb")
{
if ($fbConfig->fb_profile == 'cb' && $userinfo->userid > 0)
{
$msg_prflink = CKunenaCBProfile::getProfileURL($userinfo->userid);
$msg_profile = "<a href=\"" . $msg_prflink . "\"> <img src=\"";
if ($fbIcons['userprofile']) {
$msg_profile .= KUNENA_URLICONSPATH . "" . $fbIcons['userprofile'];
}
else {
$msg_profile .= KUNENA_JLIVEURL . "/components/com_comprofiler/images/profiles.gif";
}
$msg_profile .= "\" alt=\"" . _VIEW_PROFILE . "\" border=\"0\" title=\"" . _VIEW_PROFILE . "\" /></a>";
}
}
else if ($fbConfig->fb_profile == "clexuspm")
{
//mypms pro profile link
$msg_prflink = MyPMSTools::getProfileLink($userinfo->userid);
$msg_profile = "<a href=\"" . MyPMSTools::getProfileLink($userinfo->userid) . "\"><img src=\"";
if ($fbIcons['userprofile']) {
$msg_profile .= KUNENA_URLICONSPATH . '' . $fbIcons['userprofile'];
}
else {
$msg_profile .= KUNENA_JLIVEURL . "/components/com_mypms/images/managecontact_icon.gif";
}
$msg_profile .= "\" alt=\"" . _VIEW_PROFILE . "\" border=\"0\" title=\"" . _VIEW_PROFILE . "\" /></a>";
}
else if ($userinfo->gid > 0)
{
//Kunena Profile link.
$msg_prflink = sefRelToAbs(KUNENA_LIVEURLREL.'&func=fbprofile&task=showprf&userid=' . $userinfo->userid);
$msg_profileicon = "<img src=\"";
if ($fbIcons['userprofile']) {
$msg_profileicon .= KUNENA_URLICONSPATH . "" . $fbIcons['userprofile'];
}
else {
$msg_profileicon .= KUNENA_URLICONSPATH . "profile.gif";
}
$msg_profileicon .= "\" alt=\"" . _VIEW_PROFILE . "\" border=\"0\" title=\"" . _VIEW_PROFILE . "\" />";
$msg_profile = CKunenaLink::GetProfileLink($fbConfig, $userinfo->userid, $msg_profileicon);
}
// Begin: Additional Info //
if ($userinfo->gender != '') {
$gender = _KUNENA_NOGENDER;
if ($userinfo->gender ==1) {
$gender = ''._KUNENA_MYPROFILE_MALE.'';
$msg_gender = isset($fbIcons['msgmale']) ? '<img src="'. KUNENA_URLICONSPATH . '' . $fbIcons['msgmale'] . '" border="0" alt="'._KUNENA_MYPROFILE_GENDER.': '.$gender.'" title="'._KUNENA_MYPROFILE_GENDER.': '.$gender.'" />' : ''._KUNENA_MYPROFILE_GENDER.': '.$gender.'';
}
if ($userinfo->gender ==2) {
$gender = ''._KUNENA_MYPROFILE_FEMALE.'';
$msg_gender = isset($fbIcons['msgfemale']) ? '<img src="'. KUNENA_URLICONSPATH . '' . $fbIcons['msgfemale'] . '" border="0" alt="'._KUNENA_MYPROFILE_GENDER.': '.$gender.'" title="'._KUNENA_MYPROFILE_GENDER.': '.$gender.'" />' : ''._KUNENA_MYPROFILE_GENDER.': '.$gender.'';
}
}
if ($userinfo->personalText != '') {
$msg_personal = kunena_htmlspecialchars(stripslashes($userinfo->personalText));
}
if ($userinfo->ICQ != '') {
$msg_icq = '<a href="http://www.icq.com/people/cmd.php?uin='.kunena_htmlspecialchars(stripslashes($userinfo->ICQ)).'&action=message"><img src="http://status.icq.com/online.gif?icq='.kunena_htmlspecialchars(stripslashes($userinfo->ICQ)).'&img=5" title="ICQ#: '.kunena_htmlspecialchars(stripslashes($userinfo->ICQ)).'" alt="ICQ#: '.kunena_htmlspecialchars(stripslashes($userinfo->ICQ)).'" /></a>';
}
if ($userinfo->location != '') {
$msg_location = isset($fbIcons['msglocation']) ? '<img src="'. KUNENA_URLICONSPATH . '' . $fbIcons['msglocation'] . '" border="0" alt="'._KUNENA_MYPROFILE_LOCATION.': '.kunena_htmlspecialchars(stripslashes($userinfo->location)).'" title="'._KUNENA_MYPROFILE_LOCATION.': '.kunena_htmlspecialchars(stripslashes($userinfo->location)).'" />' : ' '._KUNENA_MYPROFILE_LOCATION.': '.kunena_htmlspecialchars(stripslashes($userinfo->location)).'';
}
if ($userinfo->birthdate !='0001-01-01' AND $userinfo->birthdate !='0000-00-00' and $userinfo->birthdate !='') {
$birthday = strftime(_KUNENA_DT_MONTHDAY_FMT, strtotime($userinfo->birthdate));
$msg_birthdate = isset($fbIcons['msgbirthdate']) ? '<img src="'. KUNENA_URLICONSPATH . '' . $fbIcons['msgbirthdate'] . '" border="0" alt="'._KUNENA_PROFILE_BIRTHDAY.': '.$birthday.'" title="'._KUNENA_PROFILE_BIRTHDAY.': '.$birthday.'" />' : ' '._KUNENA_PROFILE_BIRTHDAY.': '.$birthday.''; }
if ($userinfo->AIM != '') {
$msg_aim = isset($fbIcons['msgaim']) ? '<img src="'. KUNENA_URLICONSPATH . '' . $fbIcons['msgaim'] . '" border="0" alt="'.kunena_htmlspecialchars(stripslashes($userinfo->AIM)).'" title="AIM: '.kunena_htmlspecialchars(stripslashes($userinfo->AIM)).'" />' : 'AIM: '.kunena_htmlspecialchars(stripslashes($userinfo->AIM)).'';
}
if ($userinfo->MSN != '') {
$msg_msn = isset($fbIcons['msgmsn']) ? '<img src="'. KUNENA_URLICONSPATH . '' . $fbIcons['msgmsn'] . '" border="0" alt="'.kunena_htmlspecialchars(stripslashes($userinfo->MSN)).'" title="MSN: '.kunena_htmlspecialchars(stripslashes($userinfo->MSN)).'" />' : 'MSN: '.kunena_htmlspecialchars(stripslashes($userinfo->MSN)).'';
}
if ($userinfo->YIM != '') {
$msg_yim = isset($fbIcons['msgyim']) ? '<img src="'. KUNENA_URLICONSPATH . '' . $fbIcons['msgyim'] . '" border="0" alt="'.kunena_htmlspecialchars(stripslashes($userinfo->YIM)).'" title="YIM: '.kunena_htmlspecialchars(stripslashes($userinfo->YIM)).'" />' : ' YIM: '.kunena_htmlspecialchars(stripslashes($userinfo->YIM)).'';
}
if ($userinfo->SKYPE != '') {