This repository has been archived by the owner on Feb 1, 2023. It is now read-only.
forked from phpbbireland/stargate-portal
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathinstall.xml
2314 lines (2125 loc) · 96.2 KB
/
install.xml
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
<?xml version="1.0" encoding="UTF-8" standalone="yes"?>
<?xml-stylesheet type="text/xsl" href="modx.prosilver.en.xsl"?>
<!--NOTICE: Please open this file in your web browser. If presented with a security warning, you may safely tell it to allow the blocked content.-->
<!--For security purposes, please check: http://www.phpbb.com/mods/ for the latest version of this MOD.\nAlthough MODs are checked before being allowed in the MODs Database there is no guarantee that there are no security problems within the MOD.\nNo support will be given for MODs not found within the MODs Database which can be found at http://www.phpbb.com/mods/-->
<mod xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns="http://www.phpbb.com/mods/xml/modx-1.2.5.xsd">
<header>
<license><![CDATA[http://opensource.org/licenses/gpl-license.php GNU General Public License v2]]></license>
<title lang="en"><![CDATA[Stargate Portal (aka Kiss Portal)]]></title>
<description lang="en"><![CDATA[An advanced, fully integrated, portal for phpBB 3.0.9]]></description>
<author-notes lang="en"><![CDATA[Stargate Portal (aka Kiss Portal) is an advanced, fully integrated, portal for phpBB3.
The portal is packed with a host of features all of which are configurable via portal tab in the ACP.
Editing your site files:
The installation is designed for use with AutoMod, it will modify all files automatically saving you a lot of time...
After completing the edits, point your browser to your_site/portal and follow instructions to add the database entries...
Remember to delete or rename the portal folder after installing the database entries...
Features:
For a complete list see: http://www.stargate-portal.com/forum/web_pages.php?mode=features (Available end of December 2010)
Style Support:
A substantial number of the more popular styles have already been updated to support the Stargate Portal, should your favorite style require updating please contact stargate-portal.com and request a port...
Additional copyright information:
Please read the license agreement: portal/license.txt
The portal copyright must be maintained in all page footers... Should you choose to remove this copyright notice, do not expect support as none will be given...
Many thanks to everyone who supported the portal and a special thanks to the development team: JohnnyTheOne, livewirestu, NeXur, HelterSkelter and Mitch and Tyler...
Please note the change log does not include non public (development) releases... See site for more information.]]></author-notes>
<author-group>
<author>
<realname><![CDATA[Michael O'Toole]]></realname>
<username><![CDATA[michaelo]]></username>
<homepage><![CDATA[http://www.stargate-portal.com/]]></homepage>
<email><![CDATA[[email protected]]]></email>
</author>
</author-group>
<mod-version>3.2.1</mod-version>
<installation>
<level>intermediate</level>
<time>2460</time>
<target-version>3.0.10</target-version>
</installation>
<history>
<entry>
<date>2011-02-22</date>
<rev-version>3.2.0</rev-version>
<changelog lang="en">
<change><![CDATA[Please note, development release are not identified here.]]></change>
<change><![CDATA[Change the name of the portal common folder (just added a leading underscore).]]></change>
<change><![CDATA[The centre blocks corrected if style is not prosilver standard layout.]]></change>
<change><![CDATA[Updated get group id, data is now cached for speed and reduced sql queries.]]></change>
<change><![CDATA[For detailed information see: http://www.stargate-portal.com/forum/viewforum.php?f=10]]></change>
</changelog>
</entry>
<entry>
<date>2010-09-30</date>
<rev-version>3.0.0</rev-version>
<changelog lang="en">
<change><![CDATA[Covering 2.0.4 to 3.0.9.]]></change>
<change><![CDATA[Mod validation fixes...]]></change>
</changelog>
</entry>
<entry>
<date>2010-08-17</date>
<rev-version>2.0.4</rev-version>
<changelog lang="en">
<change><![CDATA[Mod validation report (first draft) fixes.]]></change>
<change><![CDATA[Lots of corrections as per coding guidelines...]]></change>
</changelog>
</entry>
<entry>
<date>2010-03-17</date>
<rev-version>2.0.0</rev-version>
<changelog lang="en">
<change><![CDATA[Updated to support common file sharing mod...]]></change>
<change><![CDATA[Removed pips images.]]></change>
<change><![CDATA[Moved bbcode images to images folder.]]></change>
<change><![CDATA[Portal html files identical for subsilver and prosilver based styles.]]></change>
<change><![CDATA[Arrange blocks and move/hide 100% working all browsers.]]></change>
<change><![CDATA[portal.css file now loaded via functions.php.]]></change>
<change><![CDATA[Portal Poll and Newsfeeds mods installed automatically.]]></change>
<change><![CDATA[New 3.0.6/7 Quick Reply extras.]]></change>
<change><![CDATA[Post can be designated as Local News or Global News.]]></change>
<change><![CDATA[Standardised for css fix files (Opera/Mac/IE)]]></change>
<change><![CDATA[Removed the size css files, all work is carried out in the portal header file]]></change>
<change><![CDATA[Left and right layout files loaded via overall_header and overall_footer]]></change>
<change><![CDATA[New UMIL based installation]]></change>
<change><![CDATA[AutoMod Supported]]></change>
<change><![CDATA[Removed Portal definitions form config.php]]></change>
<change><![CDATA[Portal can now be enabled/disabled via APC]]></change>
<change><![CDATA[Block visibility can be set to one or more groups...]]></change>
</changelog>
</entry>
<entry>
<date>2008-06-06</date>
<rev-version>1.0.0</rev-version>
<changelog lang="en">
<change><![CDATA[Released for testing only...]]></change>
<change><![CDATA[Several additional blocks.]]></change>
<change><![CDATA[Introduced additional ACP control.]]></change>
<change><![CDATA[Added Mini-modules...]]></change>
<change><![CDATA[Added portal youtube mod...]]></change>
<change><![CDATA[Added web pages...]]></change>
</changelog>
</entry>
<entry>
<date>2005-06-06</date>
<rev-version>0.0.1</rev-version>
<changelog lang="en">
<change><![CDATA[Original name: KISS Portal]]></change>
<change><![CDATA[Not released to public (testing only)...]]></change>
<change><![CDATA[Contained a handful of blocks and ACP controls.]]></change>
</changelog>
</entry>
</history>
<link-group>
<link type="template" href="subsilver2.xml" lang="en">subsilver2</link>
</link-group>
</header>
<action-group>
<copy>
<file from="root/basic_rules.php" to="basic_rules.php"/>
<file from="root/inprogress.php" to="inprogress.php"/>
<file from="root/portal.php" to="portal.php"/>
<file from="root/portal_page.php" to="portal_page.php"/>
<file from="root/sgp_refresh.php" to="sgp_refresh.php"/>
<file from="root/web_page.php" to="web_page.php"/>
<file from="root/web_page_utube.php" to="web_page_utube.php"/>
<file from="root/favicon.ico" to="favicon.ico"/>
<file from="root/adm/swatch2.php" to="adm/swatch2.php"/>
<file from="root/adm/images/vars_edit.gif" to="adm/images/vars_edit.gif"/>
<file from="root/adm/images/*.*" to="adm/images/*.*"/>
<file from="root/adm/style/*.*" to="adm/style/*.*"/>
<file from="root/blocks/*.*" to="blocks/*.*"/>
<file from="root/images/*.*" to="images/*.*"/>
<file from="root/includes/*.*" to="includes/*.*"/>
<file from="root/language/*.*" to="language/*.*"/>
<file from="root/mp3/*.*" to="mp3/*.*"/>
<file from="root/portal/*.*" to="portal/*.*"/>
<file from="root/js/*.*" to="js/*.*"/>
<file from="root/umil/*.*" to="umil/*.*"/>
<file from="root/styles/_portal_common/*.*" to="styles/_portal_common/*.*"/>
<file from="root/styles/prosilver/imageset/*.*" to="styles/prosilver/imageset/*.*"/>
<file from="root/styles/prosilver/imageset/en/*.*" to="styles/prosilver/imageset/en/*.*"/>
<file from="root/styles/prosilver/template/*.*" to="styles/prosilver/template/*.*"/>
<file from="root/styles/prosilver/template/blocks/*.*" to="styles/prosilver/template/blocks/*.*"/>
<file from="root/styles/prosilver/theme/*.*" to="styles/prosilver/theme/*.*"/>
<file from="root/styles/prosilver/theme/images/*.*" to="styles/prosilver/theme/images/*.*"/>
</copy>
<open src="common.php">
<edit>
<find><![CDATA[// Grab global variables, re-cache if necessary
$config = $cache->obtain_config();
]]></find>
<action type="after-add"><![CDATA[
@define('STARGATE', ($config['portal_enabled']));
if (STARGATE)
{
@define('DEBUG_QUERIES', false);
$k_config = $cache->obtain_k_config(); // 1 query
$k_resources = $cache->obtain_k_resources(); // 1 query
$k_groups = $cache->obtain_k_groups(); // 1 query
$k_blocks = $cache->obtain_block_data(); // 1 query
$k_pages = $cache->obtain_k_pages(); // 1 query
}
]]></action>
</edit>
<edit>
<find><![CDATA[foreach ($cache->obtain_hooks() as $hook)
{
@include($phpbb_root_path . 'includes/hooks/' . $hook . '.' . $phpEx);
}]]></find>
<action type="after-add"><![CDATA[/* Stargate functions start... copyright phpbbireland.com 2005-2010 */
/*
** This function returns a random image preprocessed with html tags and an option link...
** The link is based on the image name... example www.phpbb.com.png
** or even: sourceforge.net+project+project_donations.php@group_id=156802.gif
** A token can be sent to filter images, for example all images containing menu_
*/
function get_random_image($dir_path, $add_link = false, $token = '', $raw = false)
{
if (defined('IN_ADMIN') || (!STARGATE))
{
return;
}
// The $token can be used to filter image types...
// initialise vars
//$phpbb_root_path = (defined('PHPBB_ROOT_PATH')) ? PHPBB_ROOT_PATH : './';
$lnk = '';
$rand_image = '';
$imglist = "";
mt_srand((double)microtime()*1000001);
$handle = @opendir($dir_path);
// 01 January 2009 Just return for now as this can cause an error report if uses is Admin as the path will be incorrect //
// quick report because people forget to add the image directory //
if (!$handle)
{
return;
}
if (!$token)
{
$token = '.';
}
while (($file = readdir($handle)) !== false)
{
if (strpos($file, ".gif") || strpos($file, ".jpg") || strpos($file, ".png") && strpos($file ,$token))
{
$imglist .= "$file ";
}
}
closedir($handle);
$imglist = explode(" ", $imglist);
$a = sizeof($imglist)-2;
$random = mt_rand(0, $a);
$image = $imglist[$random];
if (strpos($image, 'www') || strpos($image, 'http'))
{
$add_link = true;
}
if ($add_link)
{
if (strstr($image, 'gif'))
{
$lnk = explode(".gif", $image);
}
else if (strstr($image, 'png'))
{
$lnk = explode(".png", $image);
}
else if (strstr($image, 'jpg'))
{
$lnk = explode(".jpg", $image);
}
$lnk[0] = str_replace('+','/', $lnk[0]);
$lnk[0] = str_replace('@','?', $lnk[0]);
$rand_image = "<a href=\"http://$lnk[0]\"><img src=\"$dir_path/$image\" alt=\"$lnk[0]\" /></a>";
}
else if (!$raw)
{
$rand_image .= "<img src=\"$dir_path/$image\" alt=\"\" />";
}
else
{
$rand_image .= "$dir_path/$image";
}
$imgs = '';
return($rand_image);
}
/**
* Get user avatar Note! To avoid conflict copied and renamed for portal
*
* @param string $avatar Users assigned avatar name
* @param int $avatar_type Type of avatar
* @param string $avatar_width Width of users avatar
* @param string $avatar_height Height of users avatar
* @param string $alt Optional language string for alt tag within image, can be a language key or text
*
* @return string Avatar image (if avatars are enabled in ACP and a member has not selected an avatar).
*/
function sgp_get_user_avatar($avatar, $avatar_type, $avatar_width = '80', $avatar_height = '80', $alt = 'USER_AVATAR')
{
if (!STARGATE)
{
return;
}
global $user, $config, $phpbb_root_path, $phpEx;
// 18 August 2010 //
// if avatars are disabled in acp return //
if (!$config['allow_avatar'])
{
return;
}
if (empty($avatar) || !$avatar_type)
{
$poster_avatar = get_random_image($phpbb_root_path . 'images/avatars/no_avitar', false, '');
// do we wish to resize? 28 January 2010 should not require else...? will look later //
if ($avatar_width || $avatar_height)
{
if (strpos($poster_avatar, '/>"'))
{
$poster_avatar = str_replace('/>"', '" height="' . $avatar_height . '" width="' . $avatar_width . '" />', $poster_avatar);
}
elseif (strpos($poster_avatar, '/>'))
{
$poster_avatar = str_replace('/>', ' height="' . $avatar_height . '" width="' . $avatar_width . '" />', $poster_avatar);
}
}
return($poster_avatar);
}
$avatar_img = '';
switch ($avatar_type)
{
case AVATAR_UPLOAD:
$avatar_img = $phpbb_root_path . "download/file.$phpEx?avatar=";
break;
case AVATAR_GALLERY:
$avatar_img = $phpbb_root_path . $config['avatar_gallery_path'] . '/';
break;
}
$avatar_img .= $avatar;
return '<img src="' . (str_replace(' ', '%20', $avatar_img)) . '" width="' . $avatar_width . '" height="' . $avatar_height . '" alt="' . ((!empty($user->lang[$alt])) ? $user->lang[$alt] : $alt) . '" />';
}
/* Stargate functions ends */
]]></action>
</edit>
</open>
<open src="mcp.php">
<edit>
<comment lang="en"><![CDATA[Line ~117]]></comment>
<find><![CDATA[ 'make_global' => 'f_announce',]]></find>
<action type="after-add"><![CDATA[ 'make_news' => 'f_announce',
'make_news_global' => 'f_announce',]]></action>
</edit>
<edit>
<find><![CDATA[ case 'make_global':]]></find>
<action type="after-add"><![CDATA[ case 'make_news':
case 'make_news_global':]]></action>
</edit>
<edit>
<find><![CDATA[function mcp_sorting($mode, &$sort_days, &$sort_key, &$sort_dir, &$sort_by_sql, &$sort_order_sql, &$total, $forum_id = 0, $topic_id = 0, $where_sql = 'WHERE')
{
global $db, $user, $auth, $template;
$sort_days = request_var('st', 0);
$min_time = ($sort_days) ? time() - ($sort_days * 86400) : 0;
switch ($mode)
{
case 'viewforum':
$type = 'topics';
$default_key = 't';
$default_dir = 'd';
$sql = 'SELECT COUNT(topic_id) AS total
FROM ' . TOPICS_TABLE . "
$where_sql forum_id = $forum_id
AND topic_type NOT IN (" . POST_ANNOUNCE . ', ' . POST_GLOBAL . ")]]></find>
<inline-edit>
<inline-find><![CDATA[. POST_GLOBAL .]]></inline-find>
<inline-action type="after-add"><![CDATA[ ' , ' . POST_NEWS . ' , ' . POST_NEWS_GLOBAL .]]></inline-action>
</inline-edit>
</edit>
</open>
<open src="posting.php">
<edit>
<comment lang="en"><![CDATA[News Posts]]></comment>
<find><![CDATA[ case POST_ANNOUNCE:]]></find>
<action type="after-add"><![CDATA[
case POST_NEWS:
case POST_NEWS_GLOBAL:]]></action>
</edit>
</open>
<open src="search.php">
<edit>
<find><![CDATA[ $sql_select .= ', tt.mark_time, ft.mark_time as f_mark_time';
}
}]]></find>
<action type="after-add"><![CDATA[ if (STARGATE)
{
global $k_config;
// move to databse in next revision //
$k_config['tooltips_active'] = true;
$k_config['tooltips_first'] = false;
$k_config['tooltips_last'] = true;
// Improved sql thanks to Rich McGirr and his Topic Text Hover Mod //
if ($k_config['tooltips_active'])
{
if ($k_config['tooltips_first'])
{
$sql_from .= ' LEFT JOIN ' . POSTS_TABLE . ' p ON (p.post_id = t.topic_first_post_id)';
$sql_select .= ', p.post_text AS first_message_tooltip';
}
if ($k_config['tooltips_last'])
{
$sql_from .= ' LEFT JOIN ' . POSTS_TABLE . ' pt ON (pt.post_id = t.topic_last_post_id)';
$sql_select .= ', pt.post_text AS last_message_tooltip';
}
}
}
]]></action>
</edit>
<edit>
<find><![CDATA[ $u_mcp_queue = ($topic_unapproved || $posts_unapproved) ? append_sid("{$phpbb_root_path}mcp.$phpEx", 'i=queue&mode=' . (($topic_unapproved) ? 'approve_details' : 'unapproved_posts') . "&t=$result_topic_id", true, $user->session_id) : '';]]></find>
<action type="after-add"><![CDATA[ if (STARGATE)
{
$tool_tips = $row['topic_title'] . ' : ' . sgp_truncate_message(bbcode_strip($row[ ('last_message_tooltip') ? 'last_message_tooltip': 'first_message_tooltip']), 400) . ' ... ';
}]]></action>
</edit>
<edit>
<find><![CDATA[ $tpl_ary = array(]]></find>
<action type="after-add"><![CDATA[ 'TOOLTIP' => $tool_tips,]]></action>
</edit>
</open>
<open src="viewforum.php">
<edit>
<find><![CDATA[ 'U_MARK_TOPICS' => ($user->data['is_registered'] || $config['load_anon_lastread']) ? append_sid("{$phpbb_root_path}viewforum.$phpEx", 'hash=' . generate_link_hash('global') . "&f=$forum_id&mark=topics") : '',]]></find>
<action type="after-add"><![CDATA[ 'FOLDER_NEWS_IMG' => $user->img('news_read', 'NEW_POST_NEWS'),
'FOLDER_NEWS_NEW_IMG' => $user->img('news_unread', 'NO_NEW_POST_NEWS'),]]></action>
</edit>
<edit>
<find><![CDATA[ $sql_array['LEFT_JOIN'][] = array('FROM' => array(FORUMS_TRACK_TABLE => 'ft'), 'ON' => 'ft.forum_id = t.forum_id AND ft.user_id = ' . $user->data['user_id']);
$sql_array['SELECT'] .= ', ft.mark_time AS forum_mark_time';
}
}
}]]></find>
<action type="after-add"><![CDATA[if (STARGATE)
{
// move to databse in next revision //
$k_config['tooltips_active'] = true;
$k_config['tooltips_which'] = 'last';
// Improved sql thank to Rich McGirr and his Topic Text Hover Mod //
if ($k_config['tooltips_active'])
{
if ($k_config['tooltips_which'] == 'first')
{
$sql_array['LEFT_JOIN'][] = array('FROM' => array(POSTS_TABLE => 'pt'), 'ON' => 'pt.post_id = t.topic_first_post_id');
$sql_array['SELECT'] .= ', pt.post_text AS message_tooltip';
}
else if ($k_config['tooltips_which'] == 'last')
{
$sql_array['LEFT_JOIN'][] = array('FROM' => array(POSTS_TABLE => 'ptl'), 'ON' => 'ptl.post_id = t.topic_last_post_id');
$sql_array['SELECT'] .= ', ptl.post_text AS message_tooltip';
}
}
}]]></action>
</edit>
<edit>
<comment lang="en"><![CDATA[Line ~362]]></comment>
<find><![CDATA[AND t.topic_type IN (' . POST_ANNOUNCE . ', ' . POST_GLOBAL . ')',]]></find>
<inline-edit>
<inline-find><![CDATA[ ')',]]></inline-find>
<inline-action type="before-add"><![CDATA[', ' . POST_NEWS . ', ' . POST_NEWS_GLOBAL . ]]></inline-action>
</inline-edit>
</edit>
<edit>
<find><![CDATA[ $s_type_switch_test = ($row['topic_type'] == POST_ANNOUNCE || $row['topic_type'] == POST_GLOBAL) ? 1 : 0;]]></find>
<inline-edit>
<inline-find><![CDATA[$row['topic_type'] == POST_GLOBAL]]></inline-find>
<inline-action type="after-add"><![CDATA[ || $row['topic_type'] == POST_NEWS || $row['topic_type'] == POST_NEWS_GLOBAL ]]></inline-action>
</inline-edit>
</edit>
<edit>
<find><![CDATA[ 'S_TOPIC_TYPE_SWITCH' => ($s_type_switch == $s_type_switch_test) ? -1 : $s_type_switch_test)
);]]></find>
<action type="replace-with"><![CDATA[ 'S_TOPIC_TYPE_SWITCH' => ($s_type_switch == $s_type_switch_test) ? -1 : $s_type_switch_test,
'TOOLTIP' => (STARGATE && isset($row['message_tooltip'])) ? sgp_truncate_message(bbcode_strip(($row['message_tooltip'])), 500) : '',
'TOPIC_ICON_IMG_GROUP' => (!empty($icons[$row['icon_id']])) ? $icons[$row['icon_id']]['group'] : '',
'S_POST_NEWS' => ($row['topic_type'] == POST_NEWS) ? true : false,
'S_POST_NEWS_GLOBAL' => ($row['topic_type'] == POST_NEWS_GLOBAL) ? true : false,
));]]></action>
</edit>
<edit>
<find><![CDATA[ $s_type_switch = ($row['topic_type'] == POST_ANNOUNCE || $row['topic_type'] == POST_GLOBAL) ? 1 : 0;]]></find>
<inline-edit>
<inline-find><![CDATA[$row['topic_type'] == POST_GLOBAL]]></inline-find>
<inline-action type="after-add"><![CDATA[ || $row['topic_type'] == POST_NEWS || $row['topic_type'] == POST_NEWS_GLOBAL]]></inline-action>
</inline-edit>
</edit>
</open>
<open src="viewonline.php">
<edit>
<find><![CDATA[ $location_url = append_sid("{$phpbb_root_path}index.$phpEx");
break;]]></find>
<action type="after-add"><![CDATA[
case 'portal':
if (STARGATE)
{
$location = $user->lang['PORTAL'];
$location_url = append_sid("{$phpbb_root_path}portal.$phpEx");
break;
}
]]></action>
</edit>
</open>
<open src="viewtopic.php">
<edit>
<find><![CDATA[if (($topic_data['topic_type'] == POST_STICKY || $topic_data['topic_type'] == POST_ANNOUNCE) && $topic_data['topic_time_limit'] && ($topic_data['topic_time'] + $topic_data['topic_time_limit']) < time())]]></find>
<inline-edit>
<inline-find><![CDATA[$topic_data['topic_type'] == POST_ANNOUNCE]]></inline-find>
<inline-action type="after-add"><![CDATA[ || $topic_data['topic_type'] == POST_NEWS || $topic_data['topic_type'] == POST_NEWS_GLOBAL]]></inline-action>
</inline-edit>
</edit>
<edit>
<find><![CDATA[$topic_mod .= ($allow_change_type && $auth->acl_get('f_announce', $forum_id) && $topic_data['topic_type'] != POST_GLOBAL) ? '<option value="make_global">' . $user->lang['MAKE_GLOBAL'] . '</option>' : '';]]></find>
<action type="after-add"><![CDATA[if (STARGATE)
{
$topic_mod .= ($allow_change_type && $auth->acl_get('f_announce', $forum_id) && $topic_data['topic_type'] != POST_NEWS) ? '<option value="make_news">' . $user->lang['MAKE_NEWS'] . '</option>' : '';
$topic_mod .= ($allow_change_type && $auth->acl_get('f_announce', $forum_id) && $topic_data['topic_type'] != POST_NEWS_GLOBAL) ? '<option value="make_news_global">' . $user->lang['MAKE_NEWS_GLOBAL'] . '</option>' : '';
}]]></action>
</edit>
<edit>
<find><![CDATA[ $message = censor_text($row['post_text']);]]></find>
<action type="after-add"><![CDATA[ if (STARGATE)
{
$message = acronym_pass($message);
}
]]></action>
</edit>
<edit>
<comment lang="en"><![CDATA[Line ~1496]]></comment>
<find><![CDATA[ $s_first_unread = false;
if (!$first_unread && $post_unread)
{
$s_first_unread = $first_unread = true;
}]]></find>
<action type="after-add"><![CDATA[
if (STARGATE)
{
$message = sgp_local_acronyms($message);
}
]]></action>
</edit>
<edit>
<comment lang="en"><![CDATA[Line ~1751]]></comment>
<find><![CDATA[ 'S_QUICK_REPLY' => true,]]></find>
<action type="after-add"><![CDATA[ 'S_SGP_QUICK_REPLY' => (isset($k_config)) ? ($k_config['sgp_quick_reply']) ? true : false : '',]]></action>
</edit>
</open>
<open src="adm/index.php">
<edit>
<find><![CDATA[ 'S_CONTENT_FLOW_END' => ($user->lang['DIRECTION'] == 'ltr') ? 'right' : 'left',
));]]></find>
<action type="after-add"><![CDATA[ // Stargate Portal
if (STARGATE)
{
$template->assign_vars(array(
'STARGATE' => true,
'U_PORTAL' => append_sid("{$phpbb_root_path}portal.$phpEx")
));
}
// Stargate Portal
]]></action>
</edit>
</open>
<open src="adm/style/acp_forums.html">
<edit>
<find><![CDATA[<!-- INCLUDE overall_header.html -->]]></find>
<action type="after-add"><![CDATA[<!-- Start: Edit #1 : Small mod to show all available icon images in images/forum_images directory, copyright 2007 phpbbireland.com Mike -->
<script>
function set_image(data)
{
var path = 'images/forum_icons/' + data;
document.getElementById('forum_image').value=path;
}
function ShowHide(id1, id2, id3)
{
var onoff = expMenu(id1);
if (id2 != '') expMenu(id2);
if (id3 != '') SetCookie(id3, onoff, expire);
}
function expMenu(id)
{
var element = null;
if (document.getElementById)
{
element = document.getElementById(id);
}
else if (document.all)
{
element = document.all[id];
}
else if (document.layers)
{
element = document.layers[id];
}
if (!element)
{
// do nothing
}
else if (element.style)
{
if (element.style.display == "none")
{
element.style.display = "";
return 1;
}
else
{
element.style.display = "none";
return 2;
}
}
else
{
element.visibility = "show";
return 1;
}
}
</script>
<!-- END: Edit #1 -->]]></action>
</edit>
<edit>
<find><![CDATA[ <!-- IF FORUM_IMAGE_SRC -->
<dd><img src="{FORUM_IMAGE_SRC}" alt="{L_FORUM_IMAGE}" /></dd>
<!-- ENDIF -->
</dl>]]></find>
<action type="after-add"><![CDATA[ <!-- Start: Edit #2 -->
<div style="position:absolute; top:0; right:0; width:0px; visibility: hidden"><input id="namex" type="text"><input id="pw" type="password"></div>
<dl>
<dt><label for="forum_images">{L_AVAILABLE_FORUM_IMAGE}:</label><br /><span>{L_AVAILABLE_FORUM_IMAGE_EXPLAIN}</span></dt>
<div style="display:" id="show">
<div class="k_show_images_yes-icon">
<a href="#" onclick="ShowHide('side'); ShowHide('hide'); ShowHide('show'); return(false);"><span>{L_SHOW_FORUM_IMAGES}</span></a>
</div>
</div>
<div style="display:none" id="hide">
<div class="k_show_images_no-icon">
<a href="#" onclick="ShowHide('side'); ShowHide('show'); ShowHide('hide'); return(false);"><span>{L_SHOW_FORUM_IMAGES}</span></a>
</div>
</div>
<div align="left" style="display: none;" id="side">
<span class="imageline"><br /><br /><br />
<!-- BEGIN forum_img_file_name -->
<!-- IF forum_img_file_name.FORUM_IMAGE_OPT -->
<!--<img src='{FORUM_IMAGE_SRC_PATH}{forum_img_file_name.FORUM_IMAGE_OPT}' title="{FORUM_IMAGE_PATH}{forum_img_file_name.FORUM_IMAGE_OPT}">-->
<a href="#" onclick="set_image('{forum_img_file_name.FORUM_IMAGE_OPT}', true, true); return false;"><img src='{FORUM_IMAGE_SRC_PATH}{forum_img_file_name.FORUM_IMAGE_OPT}' title="{FORUM_IMAGE_PATH}{forum_img_file_name.FORUM_IMAGE_OPT}"></a>
<!-- ENDIF -->
<!-- END forum_img_file_name -->
<br /><br /><br />
</span>
</div>
</dl>
<!-- END: Edit #2 -->]]></action>
</edit>
</open>
<open src="adm/style/admin.css">
<edit>
<find><![CDATA[.phpinfo td, .phpinfo th, .phpinfo h2, .phpinfo h1 {
text-align: left;
}]]></find>
<action type="after-add"><![CDATA[/* Added by Stargate Portal
---------------------------------------- */
.imageline { width:auto; height:auto; border:none; float:left; padding-top: 5px;}
.row5 { background-color: #F9EDBD; }
.row6 { background-color: #E8DFC0; }
/* Additional reply bbcode for sgp simple editor ...
-------------------------------------------------- */
.bbb-bold, .bbb-bold a{ background : transparent; border:none; background-image: url("./../../images/bbcode/bbb-icon-bold.gif"); width:22px; height:22px; }
.bbb-bold:hover{ background-position: 0px -23px;}.bbb-quote,
.bbb-italic, .bbb-italic a{ background : transparent; border:none; background-image: url("./../../images/bbcode/bbb-icon-italic.gif");width:22px; height:22px;}
.bbb-italic:hover{ background-position: 0px -23px;}.bbb-quote,
.bbb-quote a{ background : transparent; border:none; background-image: url("./../../images/bbcode/bbb-icon-quote.gif"); width:22px; height:22px;}
.bbb-quote:hover{ background-position: 0px -23px;}.bbb-code,
.bbb-code a{ background : transparent; border:none; background-image: url("./../../images/bbcode/bbb-icon-code.gif");width:22px; height:22px;}
.bbb-code:hover{ background-position: 0px -23px;}.bbb-list,
.bbb-list a{ background : transparent; border:none; background-image: url("./../../images/bbcode/bbb-icon-list.gif");width:22px; height:22px;}
.bbb-list:hover{ background-position: 0px -23px;}.bbb-flash,
.bbb-flash a{ background : transparent; border:none; background-image: url("./../../images/bbcode/bbb-icon-flash.gif"); width:22px; height:22px;}
.bbb-flash:hover{ background-position: 0px -23px;}.bbb-image,
.bbb-image a{ background : transparent; border:none; background-image: url("./../../images/bbcode/bbb-icon-image.gif"); width:22px; height:22px;}
.bbb-image:hover{ background-position: 0px -23px;}
.bbb-url, .bbb-url a{ background : transparent; border:none; background-image: url("./../../images/bbcode/bbb-icon-url.gif"); width:22px; height:22px;}
.bbb-url:hover{ background-position: 0px -23px;}
.bbb-under_line, .bbb-under_line a { background : transparent; border:none; background-image: url("./../../images/bbcode/bbb-icon-under_line.gif");width:22px; height:22px;}
.bbb-under_line:hover{ background-position: 0px -23px;}
.bbb-align_center, .bbb-align_center a { background : transparent; border:none; background-image: url("./../../images/bbcode/bbb-icon-align_center.gif");width:22px; height:22px;}
.bbb-align_center:hover{ background-position: 0px -23px;}
.bbb-align_left, .bbb-align_left a { background : transparent; border:none; background-image: url("./../../images/bbcode/bbb-icon-align_left.gif");width:22px; height:22px;}
.bbb-align_left:hover{ background-position: 0px -23px;}
.bbb-align_right, .bbb-align_right a { background : transparent; border:none; background-image: url("./../../images/bbcode/bbb-icon-align_right.gif");width:22px; height:22px;}
.bbb-align_right:hover { background-position: 0px -23px;}
.bbb-ordered_list, .bbb-ordered_list a { background : transparent; border:none; background-image: url("./../../images/bbcode/bbb-icon-ordered_list.gif");width:22px; height:22px;}
.bbb-ordered_list:hover{ background-position: 0px -23px;}
.bbb-add_list_item, .bbb-add_list_item a { background : transparent; border:none; background-image: url("./../../images/bbcode/bbb-icon-add_list_item.gif"); width:22px; height:22px;}
.bbb-add_list_item:hover { background-position: 0px -23px;}
.bbb-note, .bbb-note a{ background : transparent; border:none; background-image: url("./../../images/bbcode/bbb-icon-note.gif");width:22px; height:22px;}
.bbb-note:hover { background-position: 0px -23px;}
.bbb-spoiler, .bbb-spoiler a{ background : transparent; border:none; background-image: url("./../../images/bbcode/bbb-icon-spoiler.gif"); width:22px; height:22px;}
.bbb-spoiler:hover{ background-position: 0px -23px;}
.bbb-tab, .bbb-tab a{ background : transparent; border:none; background-image: url("./../../images/bbcode/bbb-icon-tab.gif"); width:22px; height:22px;}
.bbb-tab:hover{ background-position: 0px -23px;}
.bbb-sup, .bbb-sup a{ background : transparent; border:none; background-image: url("./../../images/bbcode/bbb-icon-sup.gif"); width:22px; height:22px;}
.bbb-sup:hover{ background-position: 0px -23px;}
.bbb-sub, .bbb-sub a{ background : transparent; border:none; background-image: url("./../../images/bbcode/bbb-icon-sub.gif"); width:22px; height:22px;}
.bbb-sub:hover{ background-position: 0px -23px;}
.bbb-strike, .bbb-strike a{ background : transparent; border:none; background-image: url("./../../images/bbcode/bbb-icon-strike.gif");width:22px; height:22px;}
.bbb-strike:hover { background-position: 0px -23px;}
.bbb-link, .bbb-link a{ background : transparent; border:none; background-image: url("./../../images/bbcode/bbb-icon-link.gif");width:22px; height:22px;}
.bbb-link:hover { background-position: 0px -23px;}
.rollover, .rollover a { display: inline; float:left; } .rollover a:hover { background-position: 0 -23px; }
.bbb-icon-spacer {background : transparent; border:none; background-image: url("./../../images/bbcode/bbb-icon-spacer.gif"); width:3px; height:22px;}
button {border: solid 3px;}]]></action>
</edit>
</open>
<open src="adm/style/overall_header.html">
<edit>
<find><![CDATA[ <p><a href="{U_ADM_INDEX}">{L_ADMIN_INDEX}</a> • <a href="{U_INDEX}">{L_FORUM_INDEX}</a></p>]]></find>
<action type="replace-with"><![CDATA[ <p><a href="{U_ADM_INDEX}">{L_ADMIN_INDEX}</a> • <a href="{U_INDEX}">{L_FORUM_INDEX}</a><!-- IF STARGATE --> • <a href="{U_PORTAL}">{L_PORTAL}</a><!-- ENDIF --></p>]]></action>
</edit>
</open>
<open src="includes/cache.php">
<edit>
<find><![CDATA[ /**
* Obtain list of naughty words and build preg style replacement arrays for use by the
* calling script
*/]]></find>
<action type="before-add"><![CDATA[ function obtain_k_config()
{
global $db;
if (($k_config = $this->get('k_config')) !== false)
{
$sql = 'SELECT config_name, config_value
FROM ' . K_BLOCKS_CONFIG_VAR_TABLE . '
WHERE is_dynamic = 1';
$result = $db->sql_query($sql);
while ($row = $db->sql_fetchrow($result))
{
$k_config[$row['config_name']] = $row['config_value'];
}
$db->sql_freeresult($result);
}
else
{
$k_config = $k_cached_config = array();
$sql = 'SELECT config_name, config_value, is_dynamic
FROM ' . K_BLOCKS_CONFIG_VAR_TABLE;
$result = $db->sql_query($sql);
while ($row = $db->sql_fetchrow($result))
{
if (!$row['is_dynamic'])
{
$k_cached_config[$row['config_name']] = $row['config_value'];
}
$k_config[$row['config_name']] = $row['config_value'];
}
$db->sql_freeresult($result);
$this->put('k_config', $k_cached_config);
}
return $k_config;
}
function obtain_block_data()
{
global $db;
if (($k_blocks = $this->get('k_blocks')) !== false)
{
$sql = 'SELECT *
FROM ' . K_BLOCKS_TABLE . '
WHERE active = 1 AND is_static = 0 ORDER BY ndx ASC';
$result = $db->sql_query($sql);
while ($row = $db->sql_fetchrow($result))
{
if (!$row['is_static'])
{
$k_blocks[$row['id']]['id'] = $row['id'];
$k_blocks[$row['id']]['ndx'] = $row['ndx'];
$k_blocks[$row['id']]['title'] = $row['title'];
$k_blocks[$row['id']]['position'] = $row['position'];
$k_blocks[$row['id']]['type'] = $row['type'];
$k_blocks[$row['id']]['view_by'] = $row['view_by'];
$k_blocks[$row['id']]['scroll'] = $row['scroll'];
$k_blocks[$row['id']]['block_height'] = $row['block_height'];
$k_blocks[$row['id']]['html_file_name'] = $row['html_file_name'];
$k_blocks[$row['id']]['html_file_name'] = $row['html_file_name'];
$k_blocks[$row['id']]['img_file_name'] = $row['img_file_name'];
$k_blocks[$row['id']]['block_cache_time'] = $row['block_cache_time'];
}
}
$db->sql_freeresult($result);
}
else
{
$k_blocks = $k_cached_blocks = array();
$sql = 'SELECT *
FROM ' . K_BLOCKS_TABLE . '
WHERE active = 1 ORDER BY ndx ASC';
$result = $db->sql_query($sql);
while ($row = $db->sql_fetchrow($result))
{
if ($row['is_static'])
{
$k_cached_blocks[$row['id']]['id'] = $row['id'];
$k_cached_blocks[$row['id']]['ndx'] = $row['ndx'];
$k_cached_blocks[$row['id']]['title'] = $row['title'];
$k_cached_blocks[$row['id']]['position'] = $row['position'];
$k_cached_blocks[$row['id']]['active'] = $row['active'];
$k_cached_blocks[$row['id']]['type'] = $row['type'];
$k_cached_blocks[$row['id']]['view_by'] = $row['view_by'];
$k_cached_blocks[$row['id']]['scroll'] = $row['scroll'];
$k_cached_blocks[$row['id']]['block_height'] = $row['block_height'];
$k_cached_blocks[$row['id']]['html_file_name'] = $row['html_file_name'];
$k_cached_blocks[$row['id']]['img_file_name'] = $row['img_file_name'];
$k_cached_blocks[$row['id']]['block_cache_time'] = $row['block_cache_time'];
}
$k_blocks[$row['id']]['id'] = $row['id'];
$k_blocks[$row['id']]['ndx'] = $row['ndx'];
$k_blocks[$row['id']]['title'] = $row['title'];
$k_blocks[$row['id']]['position'] = $row['position'];
$k_blocks[$row['id']]['type'] = $row['type'];
$k_blocks[$row['id']]['view_by'] = $row['view_by'];
$k_blocks[$row['id']]['scroll'] = $row['scroll'];
$k_blocks[$row['id']]['block_height'] = $row['block_height'];
$k_blocks[$row['id']]['html_file_name'] = $row['html_file_name'];
$k_blocks[$row['id']]['html_file_name'] = $row['html_file_name'];
$k_blocks[$row['id']]['img_file_name'] = $row['img_file_name'];
$k_blocks[$row['id']]['block_cache_time'] = $row['block_cache_time'];
}
$db->sql_freeresult($result);
$this->put('k_blocks', $k_cached_blocks);
}
return $k_blocks;
}
function obtain_k_pages()
{
global $db;
if (($k_pages = $this->get('k_pages')) !== false)
{
$sql = 'SELECT page_id, page_name
FROM ' . K_PAGES_TABLE;
$result = $db->sql_query($sql);
while ($row = $db->sql_fetchrow($result))
{
$k_pages[$row['page_id']]['page_id'] = $row['page_id'];
$k_pages[$row['page_id']]['page_name'] = $row['page_name'];
}
$db->sql_freeresult($result);
}
else
{
$k_pages = $k_pages_cache = array();
$sql = 'SELECT page_id, page_name
FROM ' . K_PAGES_TABLE;
$result = $db->sql_query($sql);
while ($row = $db->sql_fetchrow($result))
{
$k_pages[$row['page_id']]['page_id'] = $row['page_id'];
$k_pages[$row['page_id']]['page_name'] = $row['page_name'];
}
$db->sql_freeresult($result);
$this->put('k_pages', $k_pages_cache);
}
return $k_pages;
}
//
// get all group names/id's (used to avoid problems with group ID's changing)
//
function obtain_k_groups()
{
global $db;
if (($k_groups = $this->get('k_groups')) !== false)
{
// Get us all the groups
$sql = 'SELECT group_id, group_name
FROM ' . GROUPS_TABLE . '
ORDER BY group_id ASC, group_name';
$result = $db->sql_query($sql);
while ($row = $db->sql_fetchrow($result))
{
$k_groups[$row['group_id']]['group_id'] = $row['group_id'];
$k_groups[$row['group_id']]['group_name'] = $row['group_name'];
}
$db->sql_freeresult($result);
}
else
{
$k_groups = $k_cached_groups = array();
// Get us all the groups
$sql = 'SELECT group_id, group_name
FROM ' . GROUPS_TABLE . '
ORDER BY group_id ASC, group_name';
$result = $db->sql_query($sql);
while ($row = $db->sql_fetchrow($result))
{
$k_cached_groups[$row['group_id']]['group_id'] = $row['group_id'];
$k_cached_groups[$row['group_id']]['group_name'] = $row['group_name'];
}
$db->sql_freeresult($result);
$this->put('k_groups', $k_cached_groups);
}
return $k_groups;
}
function obtain_k_resources()
{
global $db;
if (($k_resources = $this->get('k_resources')) !== false)
{
$sql = 'SELECT *
FROM ' . K_RESOURCES_TABLE . '
ORDER BY word ASC';
$result = $db->sql_query($sql);
while ($row = $db->sql_fetchrow($result))
{
/*
$k_resources['id'] = $row['id'];
$k_resources['word'] = $row['word'];
$k_resources['type'] = $row['type'];
*/
$k_resources[] = $row['word'];
}
$db->sql_freeresult($result);
}
else
{
$k_resources = $k_cached_resources = array();
$sql = 'SELECT *
FROM ' . K_RESOURCES_TABLE . '
ORDER BY word ASC';
$result = $db->sql_query($sql);
while ($row = $db->sql_fetchrow($result))
{
/*
$k_resources['id'] = $row['id'];
$k_resources['word'] = $row['word'];
$k_resources['type'] = $row['type'];
*/
$k_resources[] = $row['word'];
}
$db->sql_freeresult($result);
$this->put('k_resources', $k_cached_resources);
}
return $k_resources;
}
]]></action>
</edit>
<edit>
<find><![CDATA[ $icons[$row['icons_id']]['display'] = (bool) $row['display_on_posting'];]]></find>
<action type="after-add"><![CDATA[ $icons[$row['icons_id']]['group'] = (bool) $row['icons_group'];]]></action>
</edit>
</open>
<open src="includes/constants.php">
<edit>
<find><![CDATA[define('POST_GLOBAL', 3);]]></find>
<action type="after-add"><![CDATA[define('POST_NEWS', 4);