-
Notifications
You must be signed in to change notification settings - Fork 2
/
Copy pathsociallinks.php
1082 lines (1060 loc) · 45.2 KB
/
sociallinks.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
/* Social Links on Bio Page module by Tifa Zabat
An optional module for PHP versions of Legend of the Green Dragon.
This module adds social links to the bio page.
Allows users to link to their Social Accounts from their Bio Pages with addition of a new field in the user profile.
To get the icons for the various social media profiles, I reccomend using a site such as Simple Icons https://simpleicons.org/ or Font Awesome https://fontawesome.com/
The Social Links can be added to the user's bio by Navigating to the set location in Tavern Street in the Village Square.
CC-BY-SA 4.0 github:tifasnow https://github.com/tifasnow/logd_sociallinks/
*/
function sociallinks_getmoduleinfo(){
$info = array (
"name" => "Social Links on Bio Page",
"version" => "2022.11.05",
"author" => "<a href='https://github.com/tifasnow/' target=_new>Tifa Zabat</a>",
"category" => "User",
"description" => "Allows users to link to their Social Accounts from their Bio Pages with addition of a new field in the user profile.",
"download" => "https://github.com/tifasnow/logd_sociallinks",
"prefs" => array(
"Social Links,title",
"showarea" => "Show Social Links on Village?,bool|0",
"user_500px" => "500px Username|",
"user_ao3" => "AO3 Username|",
"user_applemusic" => "Apple Music Username|",
"user_applepodcasts" => "Apple Podcasts Username|",
"user_askfm" => "Ask.fm Username|",
"user_bandcamp" => "Bandcamp Username|",
"user_behance" => "Behance Username|",
"user_battlenet" => "Battle.net Username|",
"user_blogger" => "Blogger Username|",
"user_canva" => "Canva Username|",
"user_cashapp" => "CashApp Username|",
"user_codepen" => "CodePen Username|",
"user_curseforge" => "CurseForge Username|",
"user_deviantart" => "DeviantArt Username|",
"user_devto" => "Dev.to Username|",
"user_digg" => "Digg Username|",
"user_discord" => "Discord Username|",
"user_dribbble" => "Dribbble Username|",
"user_duolingo" => "Duolingo Username|",
"user_epicgames" => "Epic Games Username|",
"user_etsy" => "Etsy Username|",
"user_facebook" => "Facebook Username|",
"user_fanfiction" => "FanFiction Username|",
"user_fandom" => "Fandom Username|",
"user_fivem" => "FiveM Username|",
"user_fiverr" => "Fiverr Username|",
"user_flickr" => "Flickr Username|",
"user_flist" => "F-List Username|",
"user_furaffinity" => "FurAffinity Username|",
"user_furrynetwork" => "Furry Network Username|",
"user_github" => "GitHub Username|",
"user_gitlab" => "GitLab Username|",
"user_goodreads" => "Goodreads Username|",
"user_googlepodcasts" => "Google Podcasts Username|",
"user_hey" => "Hey Username|",
"user_icq" => "ICQ Username|",
"user_imdb" => "IMDb Username|",
"user_imgur" => "Imgur Username|",
"user_instagram" => "Instagram Username|",
"user_itchio" => "Itch.io Username|",
"user_keybase" => "Keybase Username|",
"user_kickstarter" => "Kickstarter Username|",
"user_kik" => "Kik Username|",
"user_ko-fi" => "Ko-fi Username|",
"user_lastfm" => "Last.fm Username|",
"user_LINE" => "LINE Username|",
"user_linkedin" => "LinkedIn Username|",
"user_livejournal" => "LiveJournal Username|",
"user_mastodon" => "Mastodon URL|",
"user_medium" => "Medium Username|",
"user_messenger" => "Messenger Username|",
"user_minecraft" => "Minecraft Username|",
"user_nextdoor" => "Nextdoor Username|",
"user_nintendo3ds" => "Nintendo 3DS Friend Code|",
"user_nintendoswitch" => "Nintendo Switch Friend Code|",
"user_onlyfans" => "OnlyFans Username|",
"user_openstreetmap" => "OpenStreetMap Username|",
"user_origin" => "Origin Username|",
"user_pandora" => "Pandora Username|",
"user_patreon" => "Patreon Username|",
"user_paypal" => "PayPal Username|",
"user_pinterest" => "Pinterest Username|",
"user_pixiv" => "Pixiv Username|",
"user_playstation" => "PlayStation Network Username|",
"user_quora" => "Quora Username|",
"user_reddit" => "Reddit Username|",
"user_roblox" => "Roblox Username|",
"user_rocketleague" => "Rocket League Username|",
"user_scp" => "SCP Wiki Username|",
"user_scratch" => "Scratch Username|",
"user_skype" => "Skype Username|",
"user_snapchat" => "Snapchat Username|",
"user_sofurry" => "SoFurry Username|",
"user_soundcloud" => "SoundCloud Username|",
"user_spotify" => "Spotify Username|",
"user_stackoverflow" => "Stack Overflow Username|",
"user_steam" => "Steam Username|",
"user_strava" => "Strava Username|",
"user_substack" => "Substack Username|",
"user_swarm" => "Swarm Username|",
"user_telegram" => "Telegram Username|",
"user_tiktok" => "TikTok Username|",
"user_tumblr" => "Tumblr Username|",
"user_twitter" => "Twitter Username|",
"user_twitch" => "Twitch Username|",
"user_ubisoft" => "Ubisoft Username|",
"user_unsplash" => "Unsplash Username|",
"user_vero" => "Vero Username|",
"user_venmo" => "Venmo Username|",
"user_viber" => "Viber Username|",
"user_vimeo" => "Vimeo Username|",
"user_vk" => "VK Username|",
"user_VSCO" => "VSCO Username|",
"user_wattpad" => "WattPad Username|",
"user_weasyl" => "Weasyl Username|",
"user_wechat" => "WeChat Username|",
"user_whatsapp" => "WhatsApp Username|",
"user_wikipedia" => "Wikipedia Username|",
"user_wikidot" => "Wikidot Username|",
"user_wikimedia" => "Wikimedia Username|",
"user_wordpress" => "WordPress Username|",
"user_xbox" => "Xbox Live Gamertag|",
"user_xda" => "XDA Developers Username|",
"user_yahoo" => "Yahoo Username|",
"user_youtube" => "YouTube Username|",
"user_website" => "Website URL|",
),
"settings" => array(
"Social Links Settings,title",
"social_nav_name" => "What do you want to call the social links navigation?|Social Links",
"show_500px" => "Show 500px Icon?,bool|1",
"show_ao3" => "Show AO3 icon?,bool|1",
"show_applemusic" => "Show Apple Music icon?,bool|1",
"show_applepodcasts" => "Show Apple Podcasts icon?,bool|1",
"show_askfm" => "Show Ask.fm icon?,bool|1",
"show_bandcamp" => "Show Bandcamp icon?,bool|1",
"show_behance" => "Show Behance icon?,bool|1",
"show_battlenet" => "Show Battle.net icon?,bool|1",
"show_blogger" => "Show Blogger icon?,bool|1",
"show_canva" => "Show Canva icon?,bool|1",
"show_cashapp" => "Show CashApp icon?,bool|1",
"show_codepen" => "Show CodePen icon?,bool|1",
"show_curseforge" => "Show CurseForge icon?,bool|1",
"show_deviantart" => "Show DeviantArt icon?,bool|1",
"show_devto" => "Show Dev.to icon?,bool|1",
"show_discord" => "Show Discord icon?,bool|1",
"show_digg" => "Show Digg icon?,bool|1",
"show_dribbble" => "Show Dribbble icon?,bool|1",
"show_duolingo" => "Show Duolingo icon?,bool|1",
"show_epicgames" => "Show Epic Games icon?,bool|1",
"show_etsy" => "Show Etsy icon?,bool|1",
"show_facebook" => "Show Facebook icon?,bool|1",
"show_fanfiction" => "Show FanFiction icon?,bool|1",
"show_fandom" => "Show Fandom icon?,bool|1",
"show_fivem" => "Show FiveM icon?,bool|1",
"show_fiverr" => "Show Fiverr icon?,bool|1",
"show_flickr" => "Show Flickr icon?,bool|1",
"show_flist" => "Show F-List icon?,bool|1",
"show_furaffinity" => "Show FurAffinity icon?,bool|1",
"show_furrynetwork" => "Show Furry Network icon?,bool|1",
"show_goodreads" => "Show Goodreads icon?,bool|1",
"show_googlepodcasts" => "Show Google Podcasts icon?,bool|1",
"show_github" => "Show GitHub icon?,bool|1",
"show_gitlab" => "Show GitLab icon?,bool|1",
"show_hey" => "Show Hey icon?,bool|1",
"show_icq" => "Show ICQ icon?,bool|1",
"show_imdb" => "Show IMDb icon?,bool|1",
"show_imgur" => "Show Imgur icon?,bool|1",
"show_instagram" => "Show Instagram icon?,bool|1",
"show_itchio" => "Show Itch.io icon?,bool|1",
"show_keybase" => "Show Keybase icon?,bool|1",
"show_kickstarter" => "Show Kickstarter icon?,bool|1",
"show_kik" => "Show Kik icon?,bool|1",
"show_ko-fi" => "Show Ko-fi icon?,bool|1",
"show_lastfm" => "Show Last.fm icon?,bool|1",
"show_LINE" => "Show LINE icon?,bool|1",
"show_linkedin" => "Show LinkedIn icon?,bool|1",
"show_livejournal" => "Show LiveJournal icon?,bool|1",
"show_mastodon" => "Show Mastodon icon?,bool|1",
"show_medium" => "Show Medium icon?,bool|1",
"show_messenger" => "Show Messenger icon?,bool|1",
"show_minecraft" => "Show Minecraft icon?,bool|1",
"show_nextdoor" => "Show Nextdoor icon?,bool|1",
"show_nintendo3ds" => "Show Nintendo 3DS icon?,bool|1",
"show_nintendoswitch" => "Show Nintendo Switch icon?,bool|1",
"show_onlyfans" => "Show OnlyFans icon?,bool|1",
"show_openstreetmap" => "Show OpenStreetMap icon?,bool|1",
"show_origin" => "Show Origin icon?,bool|1",
"show_pandora" => "Show Pandora icon?,bool|1",
"show_patreon" => "Show Patreon icon?,bool|1",
"show_paypal" => "Show PayPal icon?,bool|1",
"show_pinterest" => "Show Pinterest icon?,bool|1",
"show_pixiv" => "Show Pixiv icon?,bool|1",
"show_playstation" => "Show PlayStation Network icon?,bool|1",
"show_quora" => "Show Quora icon?,bool|1",
"show_reddit" => "Show Reddit icon?,bool|1",
"show_roblox" => "Show Roblox icon?,bool|1",
"show_rocketleague" => "Show Rocket League icon?,bool|1",
"show_scp" => "Show SCP Wiki icon?,bool|1",
"show_scratch" => "Show Scratch icon?,bool|1",
"show_skype" => "Show Skype icon?,bool|1",
"show_snapchat" => "Show Snapchat icon?,bool|1",
"show_sofurry" => "Show SoFurry icon?,bool|1",
"show_soundcloud" => "Show SoundCloud icon?,bool|1",
"show_spotify" => "Show Spotify icon?,bool|1",
"show_stackoverflow" => "Show Stack Overflow icon?,bool|1",
"show_steam" => "Show Steam icon?,bool|1",
"show_strava" => "Show Strava icon?,bool|1",
"show_substack" => "Show Substack icon?,bool|1",
"show_swarm" => "Show Swarm icon?,bool|1",
"show_telegram" => "Show Telegram icon?,bool|1",
"show_tiktok" => "Show TikTok icon?,bool|1",
"show_tumblr" => "Show Tumblr icon?,bool|1",
"show_twitter" => "Show Twitter icon?,bool|1",
"show_twitch" => "Show Twitch icon?,bool|1",
"show_ubisoft" => "Show Ubisoft icon?,bool|1",
"show_unsplash" => "Show Unsplash icon?,bool|1",
"show_vero" => "Show Vero icon?,bool|1",
"show_venmo" => "Show Venmo icon?,bool|1",
"show_viber" => "Show Viber icon?,bool|1",
"show_vimeo" => "Show Vimeo icon?,bool|1",
"show_vk" => "Show VK icon?,bool|1",
"show_VSCO" => "Show VSCO icon?,bool|1",
"show_wattpad" => "Show Wattpad icon?,bool|1",
"show_weasyl" => "Show Weasyl icon?,bool|1",
"show_wechat" => "Show WeChat icon?,bool|1",
"show_whatsapp" => "Show WhatsApp icon?,bool|1",
"show_wikipedia" => "Show Wikipedia icon?,bool|1",
"show_wikidot" => "Show Wikidot icon?,bool|1",
"show_wikimedia" => "Show Wikimedia icon?,bool|1",
"show_wordpress" => "Show WordPress icon?,bool|1",
"show_xbox" => "Show Xbox Live icon?,bool|1",
"show_xda" => "Show XDA Developers icon?,bool|1",
"show_yahoo" => "Show Yahoo icon?,bool|1",
"user_youtube" => "YouTube Username|",
"show_website" => "Show Website icon?,bool|1",
),
);
return $info;
}
function sociallinks_install(){
debug("Installing Social Links on Bio Page module");
module_addhook_priority("bioinfo",80);
module_addhook("footer-prefs");
module_addhook("village");
return true;
}
function sociallinks_uninstall(){
debug("Uninstalling Social Links on Bio Page module");
return true;
}
function sociallinks_dohook($hookname, $args){
global $session;
switch ($hookname) {
case "village":
tlschema($args['schemas']['tavernnav']);
addnav($args['tavernnav']);
tlschema();
if (get_module_pref("showarea") == 1) {
addnav(get_module_setting("social_nav_name"), "runmodule.php?module=sociallinks");
}
/*
addnav("Social Links", "runmodule.php?module=sociallinks&op=edit");*/
break;
case "bioinfo":
rawoutput("<table border='0' cellpadding='2' cellspacing='0' align='center'><tr><td valign='top'>");
output("`n`n`c`b`@Social Links`0`b`c`n");
output_link("500px", $args['acctid']);
output_link("ao3", $args['acctid']);
output_link("applemusic", $args['acctid']);
output_link("applepodcasts", $args['acctid']);
output_link("askfm", $args['acctid']);
output_link("bandcamp", $args['acctid']);
output_link("behance", $args['acctid']);
output_link("battlenet",$args['acctid']);
output_link("blogger", $args['acctid']);
output_link("canva", $args['acctid']);
output_link("cashapp", $args['acctid']);
output_link("codepen", $args['acctid']);
output_link("curseforge", $args['acctid']);
output_link("digg", $args['acctid']);
output_link("discord",$args['acctid']);
output_link("deviantart",$args['acctid']);
output_link("devto",$args['acctid']);
output_link("dribbble",$args['acctid']);
output_link("duolingo",$args['acctid']);
output_link("epicgames",$args['acctid']);
output_link("etsy",$args['acctid']);
output_link("facebook",$args['acctid']);
output_link("fandom",$args['acctid']);
output_link("fanfiction",$args['acctid']);
output_link("fivem",$args['acctid']);
output_link("fiverr",$args['acctid']);
output_link("flickr",$args['acctid']);
output_link("flist",$args['acctid']);
output_link("furaffinity",$args['acctid']);
output_link("furrynetwork",$args['acctid']);
output_link("goodreads",$args['acctid']);
output_link("googlepodcasts",$args['acctid']);
output_link("github",$args['acctid']);
output_link("gitlab",$args['acctid']);
output_link("hey",$args['acctid']);
output_link("icq",$args['acctid']);
output_link("imdb",$args['acctid']);
output_link("imgur",$args['acctid']);
output_link("instagram",$args['acctid']);
output_link("itchio",$args['acctid']);
output_link("keybase",$args['acctid']);
output_link("kickstarter",$args['acctid']);
output_link("kik",$args['acctid']);
output_link("ko-fi",$args['acctid']);
output_link("lastfm",$args['acctid']);
output_link("LINE",$args['acctid']);
output_link("linkedin",$args['acctid']);
output_link("livejournal",$args['acctid']);
output_link("mastodon",$args['acctid']);
output_link("medium",$args['acctid']);
output_link("messenger",$args['acctid']);
output_link("minecraft",$args['acctid']);
output_link("nextdoor",$args['acctid']);
output_link("nintendo3ds",$args['acctid']);
output_link("nintendoswitch",$args['acctid']);
output_link("onlyfans",$args['acctid']);
output_link("openstreetmap",$args['acctid']);
output_link("origin",$args['acctid']);
output_link("pandora",$args['acctid']);
output_link("patreon",$args['acctid']);
output_link("paypal",$args['acctid']);
output_link("pinterest",$args['acctid']);
output_link("pixiv",$args['acctid']);
output_link("playstation",$args['acctid']);
output_link("quora",$args['acctid']);
output_link("reddit",$args['acctid']);
output_link("roblox",$args['acctid']);
output_link("rocketleague",$args['acctid']);
output_link("scp",$args['acctid']);
output_link("scratch",$args['acctid']);
output_link("skype",$args['acctid']);
output_link("snapchat",$args['acctid']);
output_link("sofurry",$args['acctid']);
output_link("soundcloud",$args['acctid']);
output_link("spotify",$args['acctid']);
output_link("stackoverflow",$args['acctid']);
output_link("steam",$args['acctid']);
output_link("strava",$args['acctid']);
output_link("substack",$args['acctid']);
output_link("Swarm",$args['acctid']);
output_link("telegram",$args['acctid']);
output_link("tiktok",$args['acctid']);
output_link("tumblr",$args['acctid']);
output_link("twitter",$args['acctid']);
output_link("twitch",$args['acctid']);
output_link("ubisoft",$args['acctid']);
output_link("unsplash",$args['acctid']);
output_link("vero",$args['acctid']);
output_link("venmo",$args['acctid']);
output_link("viber",$args['acctid']);
output_link("vimeo",$args['acctid']);
output_link("vk",$args['acctid']);
output_link("VSCO",$args['acctid']);
output_link("wattpad",$args['acctid']);
output_link("weasyl",$args['acctid']);
output_link("wechat",$args['acctid']);
output_link("whatsapp",$args['acctid']);
output_link("wikipedia",$args['acctid']);
output_link("wikidot",$args['acctid']);
output_link("wikimedia",$args['acctid']);
output_link("wordpress",$args['acctid']);
output_link("xbox",$args['acctid']);
output_link("xda",$args['acctid']);
output_link("yahoo",$args['acctid']);
output_link("youtube",$args['acctid']);
output_link("website",$args['acctid']);
rawoutput("</td></tr></table>");
break;
case "footer-prefs":
$args['prefs']['prefs-sociallinks'] = array(
"title" => translate_inline("Social Links"),
"label" => translate_inline("Add your Social Links to your Bio Page"),
"setting" => "prefs-sociallinks",
"type" => "prefs-sociallinks",
);
break;
}
return $args;
}
function get_link_data() {
return array(
"500px" => array (
"image" => "modules/sociallinks/500px.svg",
"url" => "https://500px.com/_USER_",
"title" => "500px",
),
'ao3' => array (
'link' => "https://archiveofourown.org/users/__USER__",
'image' => "modules/sociallinks/images/ao3.svg",
'title' => 'Archive of Our Own'
),
'applemusic' => array (
'link' => "https://music.apple.com/profile/__USER__",
'image' => "modules/sociallinks/images/applemusic.svg",
'title' => 'Apple Music'
),
'applepodcasts' => array (
'link' => "https://podcasts.apple.com/profile/__USER__",
'image' => "modules/sociallinks/images/applepodcasts.svg",
'title' => 'Apple Podcasts'
),
'askfm' => array (
'link' => "https://ask.fm/__USER__",
'image' => "modules/sociallinks/images/askfm.svg",
'title' => 'Ask.fm'
),
'bandcamp' => array (
'link' => "https://__USER__.bandcamp.com/",
'image' => "modules/sociallinks/images/bandcamp.svg",
'title' => 'Bandcamp'
),
'behance' => array (
'link' => "https://www.behance.net/__USER__",
'image' => "modules/sociallinks/images/behance.svg",
'title' => 'Behance'
),
'battlenet' => array(
'link' => "https://battle.net/__USER__",
'image' => "modules/sociallinks/images/battledotnet.svg",
'title' => 'Battle.Net'
),
'blogger' => array(
'link' => "https://__USER__.blogspot.com",
'image' => "modules/sociallinks/images/blogger.svg",
'title' => 'Blogger'
),
'canva' => array(
'link' => "https://www.canva.com/__USER__",
'image' => "modules/sociallinks/images/canva.svg",
'title' => 'Canva'
),
'cashapp' => array(
'link' => "https://cash.app/__USER__",
'image' => "modules/sociallinks/images/cashapp.svg",
'title' => 'CashApp'
),
'codepen' => array(
'link' => "https://codepen.io/__USER__",
'image' => "modules/sociallinks/images/codepen.svg",
'title' => 'CodePen'
),
'curseforge' => array(
'link' => "https://www.curseforge.com/members/__USER__",
'image' => "modules/sociallinks/images/curseforge.svg",
'title' => 'CurseForge'
),
'digg' => array(
'link' => "https://digg.com/u/__USER__",
'image' => "modules/sociallinks/images/digg.svg",
'title' => 'Digg'
),
'discord' => array(
'image'=>'modules/sociallinks/images/discord.svg',
'title' =>'Discord',
),
'deviantart' => array(
'link' => "https://__USER__.deviantart.com",
'image' => "modules/sociallinks/images/deviantart.svg",
'title' => 'DeviantArt'
),
'devto' => array(
'link' => "https://dev.to/__USER__",
'image' => "modules/sociallinks/images/devdotto.svg",
'title' => 'Dev.to'
),
'dribbble' => array(
'link' => "https://dribbble.com/__USER__",
'image' => "modules/sociallinks/images/dribbble.svg",
'title' => 'Dribbble'
),
'duolingo' => array(
'link' => "https://www.duolingo.com/profile/__USER__",
'image' => "modules/sociallinks/images/duolingo.svg",
'title' => 'Duolingo'
),
'epicgames' => array(
'link' => "https://www.epicgames.com/id/__USER__",
'image' => "modules/sociallinks/images/epicgames.svg",
'title' => 'Epic Games'
),
'etsy' => array(
'link' => "https://www.etsy.com/shop/__USER__",
'image' => "modules/sociallinks/images/etsy.svg",
'title' => 'Etsy'
),
'facebook' => array(
'link' => "https://www.facebook.com/__USER__",
'image' => "modules/sociallinks/images/facebook.svg",
'title' => 'Facebook'
),
'fandom' => array(
'link' => "https://__USER__.fandom.com",
'image' => "modules/sociallinks/images/fandom.svg",
'title' => 'Fandom'
),
'fanfiction' => array(
'link' => "https://www.fanfiction.net/u/__USER__",
'image' => "modules/sociallinks/images/fanfiction.svg",
'title' => 'FanFiction'
),
'fivem' => array(
'link' => "https://forum.fivem.net/u/__USER__",
'image' => "modules/sociallinks/images/fivem.svg",
'title' => 'FiveM'
),
'fiverr' => array(
'link' => "https://www.fiverr.com/__USER__",
'image' => "modules/sociallinks/images/fiverr.svg",
'title' => 'Fiverr'
),
'flickr' => array(
'link' => "https://www.flickr.com/photos/__USER__",
'image' => "modules/sociallinks/images/flickr.svg",
'title' => 'Flickr'
),
'flist' => array(
'link' => "https://www.f-list.net/c/__USER__",
'image' => "modules/sociallinks/images/flist.svg",
'title' => 'F-List'
),
'furaffinity' => array(
'link' => "https://www.furaffinity.net/user/__USER__",
'image' => "modules/sociallinks/images/furaffinity.svg",
'title' => 'FurAffinity'
),
'furrynetwork' => array(
'link' => "https://www.furrynetwork.com/__USER__",
'image' => "modules/sociallinks/images/furrynetwork.svg",
'title' => 'Furry Network'
),
'goodreads' => array(
'link' => "https://www.goodreads.com/__USER__",
'image' => "modules/sociallinks/images/goodreads.svg",
'title' => 'Goodreads'
),
'googlepodcasts' => array(
'link' => "https://podcasts.google.com/u/__USER__",
'image' => "modules/sociallinks/images/googlepodcasts.svg",
'title' => 'Google Podcasts'
),
'github' => array(
'link' => "https://www.github.com/__USER__",
'image' => "modules/sociallinks/images/github.svg",
'title' => 'GitHub'
),
'gitlab' => array(
'link' => "https://www.gitlab.com/__USER__",
'image' => "modules/sociallinks/images/gitlab.svg",
'title' => 'GitLab'
),
'hey' => array(
'link' => "https://hey.com/__USER__",
'image' => "modules/sociallinks/images/hey.svg",
'title' => 'Hey'
),
'icq' => array(
'link' => "https://icq.com/people/__USER__",
'image' => "modules/sociallinks/images/icq.svg",
'title' => 'ICQ'
),
'imdb' => array(
'link' => "https://www.imdb.com/name/__USER__",
'image' => "modules/sociallinks/images/imdb.svg",
'title' => 'IMDb'
),
'imgur' => array(
'link' => "https://imgur.com/user/__USER__",
'image' => "modules/sociallinks/images/imgur.svg",
'title' => 'Imgur'
),
'instagram' => array(
'link' => "https://www.instagram.com/__USER__",
'image' => "modules/sociallinks/images/instagram.svg",
'title' => 'Instagram'
),
'itchio' => array(
'link' => "https://__USER__.itch.io",
'image' => "modules/sociallinks/images/itchdotio.svg",
'title' => 'Itch.io'
),
'keybase' => array(
'link' => "https://keybase.io/__USER__",
'image' => "modules/sociallinks/images/keybase.svg",
'title' => 'Keybase'
),
'kickstarter' => array(
'link' => "https://www.kickstarter.com/profile/__USER__",
'image' => "modules/sociallinks/images/kickstarter.svg",
'title' => 'Kickstarter'
),
'kik' => array(
'link' => "https://www.kik.com/__USER__",
'image' => "modules/sociallinks/images/kik.svg",
'title' => 'Kik'
),
'ko-fi' => array(
'link' => "https://ko-fi.com/__USER__",
'image' => "modules/sociallinks/images/kofi.svg",
'title' => 'Ko-Fi'
),
'lastfm' => array(
'link' => "https://www.last.fm/user/__USER__",
'image' => "modules/sociallinks/images/lastdotfm.svg",
'title' => 'Last.fm'
),
'LINE' => array(
'link' => "https://line.me/ti/p/__USER__",
'image' => "modules/sociallinks/images/line.svg",
'title' => 'LINE'
),
'linkedin' => array(
'link' => "https://www.linkedin.com/in/__USER__",
'image' => "modules/sociallinks/images/linkedin.svg",
'title' => 'LinkedIn'
),
'livejournal' => array(
'link' => "https://__USER__.livejournal.com",
'image' => "modules/sociallinks/images/livejournal.svg",
'title' => 'LiveJournal'
),
'mastodon' => array(
'link' => "__USER__",
'image' => "modules/sociallinks/images/mastodon.svg",
'title' => 'Mastodon'
),
'medium' => array(
'link' => "https://medium.com/@__USER__",
'image' => "modules/sociallinks/images/medium.svg",
'title' => 'Medium'
),
'messenger' => array(
'link' => "https://m.me/__USER__",
'image' => "modules/sociallinks/images/messenger.svg",
'title' => 'Messenger'
),
'minecraft' => array(
'link' => "https://namemc.com/profile/__USER__",
'image' => "modules/sociallinks/images/minecraft.svg",
'title' => 'Minecraft'
),
'nextdoor' => array(
'link' => "https://nextdoor.com/__USER__",
'image' => "modules/sociallinks/images/nextdoor.svg",
'title' => 'Nextdoor'
),
'nintendo3ds' => array(
'image' => "modules/sociallinks/images/nintendo3ds.svg",
'title' => 'Nintendo 3DS'
),
'nintendoswitch' => array(
'image' => "modules/sociallinks/images/nintendoswitch.svg",
'title' => 'Nintendo Switch'
),
'onlyfans' => array(
'link' => "https://onlyfans.com/__USER__",
'image' => "modules/sociallinks/images/onlyfans.svg",
'title' => 'OnlyFans'
),
'openstreetmap' => array(
'link' => "https://www.openstreetmap.org/user/__USER__",
'image' => "modules/sociallinks/images/openstreetmap.svg",
'title' => 'OpenStreetMap'
),
'origin' => array(
'link' => "https://www.origin.com/__USER__",
'image' => "modules/sociallinks/images/origin.svg",
'title' => 'Origin'
),
'pandora' => array(
'link' => "https://www.pandora.com/profile/__USER__",
'image' => "modules/sociallinks/images/pandora.svg",
'title' => 'Pandora'
),
'patreon' => array(
'link' => "https://www.patreon.com/__USER__",
'image' => "modules/sociallinks/images/patreon.svg",
'title' => 'Patreon'
),
'paypal' => array(
'link' => "https://www.paypal.me/__USER__",
'image' => "modules/sociallinks/images/paypal.svg",
'title' => 'PayPal'
),
'pinterest' => array(
'link' => "https://www.pinterest.com/__USER__",
'image' => "modules/sociallinks/images/pinterest.svg",
'title' => 'Pinterest'
),
'pixiv' => array(
'link' => "https://www.pixiv.net/member.php?id=__USER__",
'image' => "modules/sociallinks/images/pixiv.svg",
'title' => 'Pixiv'
),
'playstation' => array(
'link' => "https://my.playstation.com/__USER__",
'image' => "modules/sociallinks/images/playstation.svg",
'title' => 'PlayStation'
),
'qoura' => array(
'link' => "https://www.qoura.com/__USER__",
'image' => "modules/sociallinks/images/qoura.svg",
'title' => 'Qoura'
),
'reddit' => array(
'link' => "https://www.reddit.com/user/__USER__",
'image' => "modules/sociallinks/images/reddit.svg",
'title' => 'Reddit'
),
'roblox' => array(
'link' => "https://www.roblox.com/user.aspx?username=__USER__",
'image' => "modules/sociallinks/images/roblox.svg",
'title' => 'Roblox'
),
'rocketleague' => array(
'link' => "https://rocketleague.tracker.network/profile/__USER__",
'image' => "modules/sociallinks/images/rocketleague.svg",
'title' => 'Rocket League'
),
'scp' => array(
'link' => "http://scp-wiki.wikidot.com/__USER__",
'image' => "modules/sociallinks/images/scp.svg",
'title' => 'SCP Wiki'
),
'scratch' => array(
'link' => "https://scratch.mit.edu/users/__USER__",
'image' => "modules/sociallinks/images/scratch.svg",
'title' => 'Scratch'
),
'skype' => array(
'link' => "skype:__USER__?chat",
'image' => "modules/sociallinks/images/skype.svg",
'title' => 'Skype'
),
'snapchat' => array(
'link' => "https://www.snapchat.com/add/__USER__",
'image' => "modules/sociallinks/images/snapchat.svg",
'title' => 'Snapchat'
),
'sofurry' => array(
'link' => "https://www.sofurry.com/__USER__",
'image' => "modules/sociallinks/images/sofurry.svg",
'title' => 'SoFurry'
),
'soundcloud' => array(
'link' => "https://www.soundcloud.com/__USER__",
'image' => "modules/sociallinks/images/soundcloud.svg",
'title' => 'SoundCloud'
),
'spotify' => array(
'link' => "https://open.spotify.com/user/__USER__",
'image' => "modules/sociallinks/images/spotify.svg",
'title' => 'Spotify'
),
'stackoverflow' => array(
'link' => "https://stackoverflow.com/users/__USER__",
'image' => "modules/sociallinks/images/stackoverflow.svg",
'title' => 'Stack Overflow'
),
'steam' => array(
'link' => "https://steamcommunity.com/id/__USER__",
'image' => "modules/sociallinks/images/steam.svg",
'title' => 'Steam'
),
'strava' => array(
'link' => "https://www.strava.com/athletes/__USER__",
'image' => "modules/sociallinks/images/strava.svg",
'title' => 'Strava'
),
'substack' => array(
'link' => "https://__USER__.substack.com",
'image' => "modules/sociallinks/images/substack.svg",
'title' => 'Substack'
),
'swarm' => array(
'link' => "https://foursquare.com/__USER__",
'image' => "modules/sociallinks/images/swarm.svg",
'title' => 'Swarm'
),
'telegram' => array(
'link' => "https://t.me/__USER__",
'image' => "modules/sociallinks/images/telegram.svg",
'title' => 'Telegram'
),
'tiktok' => array(
'link' => "https://www.tiktok.com/@__USER__",
'image' => "modules/sociallinks/images/tiktok.svg",
'title' => 'TikTok'
),
'tumblr' => array(
'link' => "https://__USER__.tumblr.com",
'image' => "modules/sociallinks/images/tumblr.svg",
'title' => 'Tumblr'
),
'twitch' => array(
'link' => "https://www.twitch.tv/__USER__",
'image' => "modules/sociallinks/images/twitch.svg",
'title' => 'Twitch'
),
'twitter' => array(
'link' => "https://twitter.com/__USER__",
'image' => "modules/sociallinks/images/twitter.svg",
'title' => 'Twitter'
),
'ubisoft' => array(
'link' => "https://club.ubisoft.com/en-GB/profile/__USER__",
'image' => "modules/sociallinks/images/ubisoft.svg",
'title' => 'Ubisoft'
),
'unsplash' => array(
'link' => "https://unsplash.com/@__USER__",
'image' => "modules/sociallinks/images/unsplash.svg",
'title' => 'Unsplash'
),
'vero' => array(
'link' => "https://vero.co/__USER__",
'image' => "modules/sociallinks/images/vero.svg",
'title' => 'Vero'
),
'venmo' => array(
'link' => "https://venmo.com/__USER__",
'image' => "modules/sociallinks/images/venmo.svg",
'title' => 'Venmo'
),
'viber' => array(
'link' => "viber://chat?number=__USER__",
'image' => "modules/sociallinks/images/viber.svg",
'title' => 'Viber'
),
'vimeo' => array(
'link' => "https://vimeo.com/__USER__",
'image' => "modules/sociallinks/images/vimeo.svg",
'title' => 'Vimeo'
),
'vk' => array(
'link' => "https://vk.com/__USER__",
'image' => "modules/sociallinks/images/vk.svg",
'title' => 'VK'
),
'VSCO' => array(
'link' => "https://vsco.co/__USER__/images/1",
'image' => "modules/sociallinks/images/vsco.svg",
'title' => 'VSCO'
),
'wattpad' => array(
'link' => "https://www.wattpad.com/user/__USER__",
'image' => "modules/sociallinks/images/wattpad.svg",
'title' => 'Wattpad'
),
'weasyl' => array(
'link' => "https://www.weasyl.com/~__USER__",
'image' => "modules/sociallinks/images/weasyl.svg",
'title' => 'Weasyl'
),
'wechat' => array(
'link' => "weixin://dl/chat?__USER__",
'image' => "modules/sociallinks/images/wechat.svg",
'title' => 'WeChat'
),
'whatsapp' => array(
'link' => "https://wa.me/__USER__",
'image' => "modules/sociallinks/images/whatsapp.svg",
'title' => 'WhatsApp'
),
'wikipedia' => array(
'link' => "https://en.wikipedia.org/wiki/User:__USER__",
'image' => "modules/sociallinks/images/wikipedia.svg",
'title' => 'Wikipedia'
),
'wikidot' => array(
'link' => "https://__USER__.wikidot.com",
'image' => "modules/sociallinks/images/wikidot.svg",
'title' => 'Wikidot'
),
'wikimedia' => array(
'link' => "https://commons.wikimedia.org/wiki/User:__USER__",
'image' => "modules/sociallinks/images/wikimediacommons.svg",
'title' => 'Wikimedia'
),
'wordpress' => array(
'link' => "https://__USER__.wordpress.com",
'image' => "modules/sociallinks/images/wordpress.svg",
'title' => 'WordPress'
),
'xbox' => array(
'link' => "https://account.xbox.com/en-US/Profile?Gamertag=__USER__",
'image' => "modules/sociallinks/images/xbox.svg",
'title' => 'Xbox'
),
'xda' => array(
'link' => "https://forum.xda-developers.com/member.php?u=__USER__",
'image' => "modules/sociallinks/images/xdadevelopers.svg",
'title' => 'XDA'
),
'yahoo' => array(
'link' => "https://answers.yahoo.com/dir/index?sid=396545433",
'image' => "modules/sociallinks/images/yahoo.svg",
'title' => 'Yahoo'
),
'youtube' => array(
'link' => "https://www.youtube.com/user/__USER__",
'image' => "modules/sociallinks/images/youtube.svg",
'title' => 'YouTube'
),
'website' => array(
'link' => "__USER__",
'image' => "modules/sociallinks/images/website.svg",
'title' => 'Website'
),
);
}
/**
* @param string $user_ao3
* @return void
*/
function output_link(string $linktype, int $acctid): void
{
$links_arr=get_link_data();
$uservar="user_$linktype";
$var = get_module_pref($uservar, "sociallinks", $acctid);
$var = stripslashes($var);
if(isset($links_arr[$linktype])) {
$link_details = $links_arr[$linktype];
if(isset($link_details['link'])) {
$link = $link_details['link'];
$link = str_replace("__USER__", $var, $link);
if ($var > "" && (get_module_setting("show_$linktype") == 1)) {
$image = $link_details['image'];
$title = $link_details['title'];
rawoutput("<a href='$link' target='_blank'><img src='$image' alt='$title' title='$title' style='width: 32px; height: 32px;'></a>");
}
} else if ($var > "" && (get_module_setting("show_$linktype") == 1)) {
$image = $link_details['image'];
$title = $link_details['title'];
rawoutput("<span><img src='$image' alt='$title' title='$title' style='width: 32px; height: 32px;'>$var</span>");
}
}
}
function searchbox($linkType) {
if($linkType===false) {
$linkType="NANONE";
}
$jsScript = <<<TAG
<select id="social-links-$linkType" class="social-links-$linkType" name="social-links-$linkType" style=width:100%>
__data__
</select>
<script>
function formatSocial(social) {
if(!social.id)
return social.text;
var baseUrl = "modules/sociallinks/images/";
var ssocial = $(
'<span><img class="img-flag" /> <span></span></span>'
);
// Use .text() instead of HTML string concatenation to avoid script injection issues
ssocial.find("span").text(social.text);
ssocial.find("img").attr("src", baseUrl + "/" + social.element.value.toLowerCase() + ".svg");
return ssocial;
}
$('.social-links-$linkType').select2(
{
templateSelection: formatSocial
}
);
</script>
TAG;
$dat="";
if($linkType==="NANONE")
{
$dat.="<option value=\"none\" selected>None</option>";
}
foreach (get_link_data() as $key=>$value) {
$imagesrc=$value['image'];
$val=$value['title'];
$selected = $key===$linkType ? "selected": "";
$dat.="<option value=\"$key\" $selected>$val</option>";
}