Compare commits

...
Sign in to create a new pull request.

253 commits

Author SHA1 Message Date
a888947b67 Merge pull request 'AT-Protocol: Configurable web frontend' (#1644) from heluecht/friendica-addons:atproto2 into develop
Reviewed-on: friendica/friendica-addons#1644
2026-04-04 08:21:35 +02:00
7ffd587819 AT-Protocol: Configurable web frontend 2026-03-29 13:31:47 +00:00
52f7242247 Merge pull request '"bluesky" is now "AT Protocol"' (#1642) from heluecht/friendica-addons:bluesky into develop
Reviewed-on: friendica/friendica-addons#1642
2026-03-29 11:40:23 +02:00
ea16229e27 Merge branch 'develop' into bluesky 2026-03-29 11:40:08 +02:00
3d199ba7d7 Setting for preferred web front end added 2026-03-18 13:21:21 +00:00
5a099deded Renamed function 2026-03-17 21:30:07 +00:00
d7a380bad5 "bluesky" is now "AT Protocol" 2026-03-15 23:17:04 +00:00
f552fff6b8 Merge pull request 'Add QuickPhoto Addon: Elegant BBCode simplification for images' (#1639) from loma-one/friendica-addons:loma-one-patch-1 into develop
Reviewed-on: friendica/friendica-addons#1639
Reviewed-by: Hypolite Petovan <hypolite@mrpetovan.com>
2026-03-07 17:20:56 +01:00
2e9f640724 quickphoto/quickphoto.php aktualisiert
DI::l10n()->t inserted
2026-03-07 17:09:57 +01:00
59ece8856c Translation file 2026-03-07 15:13:03 +01:00
aa47cc6e04 quickphoto/quickphoto.js aktualisiert
Make sure the translation is applied.
2026-03-07 15:13:03 +01:00
4a133456ce quickphoto/quickphoto.php aktualisiert
Provides a translation
2026-03-07 15:13:03 +01:00
22026ed533 quickphoto/quickphoto.js aktualisiert
"Description" instead of "Bildbeschreibung"
2026-03-07 15:13:03 +01:00
29e8c2875c quickphoto/README.md aktualisiert
Inserted | in `[img]|filename description[/img]`
2026-03-07 15:13:03 +01:00
0ae86dafa0 quickphoto/README.md hinzugefügt 2026-03-07 15:13:03 +01:00
ec3b0c5941 Add QuickPhoto Addon: Elegant BBCode simplification for images
This PR introduces the QuickPhoto addon, designed to improve the user experience within the Friendica editor. It addresses the issue of long, cluttered BBCodes (monster-links) that appear when images are inserted via drag-and-drop or the image uploader.
Key Features

- Automatic Simplification: Replaces complex [url=...][img=...]...[/img][/url] structures with a human-readable shorthand: [img]filename|description[/img].
- Seamless Reconstruction: Automatically restores the full, valid Friendica BBCode before previewing or submitting a post, ensuring 100% compatibility with the server.
- Enhanced Readability: Keeps the editor clean and focus-oriented while writing long posts with multiple images.

Technical Highlights & Optimizations

- Resource Efficient: The JavaScript is strictly scoped. It only becomes active if a textarea is present and visible in the DOM.
- Zero Latency Typing: Implements requestIdleCallback and throttling (500ms) to ensure that the simplification process never interferes with the user's typing flow or causes UI lag.
- Background Throttling: Logic is suspended when the browser tab is inactive (document.hidden) to save CPU and battery life.
- LocalStorage Cache: Uses a local cache for image data (auto-cleaned after 12 hours) to ensure reliability during a single editing session.

Testing performed

- Tested with the standard "Jot" editor and the newer Compose/Comment templates.
- Verified that image previews render correctly (reconstruction triggers on preview click).
- Verified that the final post contains the correct full BBCode on the server side.
- Confirmed that Drag & Drop inserts are handled immediately.
2026-03-07 15:13:03 +01:00
3509144228 Add QuickPhoto Addon: Elegant BBCode simplification for images
This PR introduces the QuickPhoto addon, designed to improve the user experience within the Friendica editor. It addresses the issue of long, cluttered BBCodes (monster-links) that appear when images are inserted via drag-and-drop or the image uploader.
Key Features

- Automatic Simplification: Replaces complex [url=...][img=...]...[/img][/url] structures with a human-readable shorthand: [img]filename|description[/img].
- Seamless Reconstruction: Automatically restores the full, valid Friendica BBCode before previewing or submitting a post, ensuring 100% compatibility with the server.
- Enhanced Readability: Keeps the editor clean and focus-oriented while writing long posts with multiple images.

Technical Highlights & Optimizations

- Resource Efficient: The JavaScript is strictly scoped. It only becomes active if a textarea is present and visible in the DOM.
- Zero Latency Typing: Implements requestIdleCallback and throttling (500ms) to ensure that the simplification process never interferes with the user's typing flow or causes UI lag.
- Background Throttling: Logic is suspended when the browser tab is inactive (document.hidden) to save CPU and battery life.
- LocalStorage Cache: Uses a local cache for image data (auto-cleaned after 12 hours) to ensure reliability during a single editing session.

Testing performed

- Tested with the standard "Jot" editor and the newer Compose/Comment templates.
- Verified that image previews render correctly (reconstruction triggers on preview click).
- Verified that the final post contains the correct full BBCode on the server side.
- Confirmed that Drag & Drop inserts are handled immediately.
2026-03-07 15:13:03 +01:00
ade3c6b22e Merge pull request 'IRC: Use friendica nickname as suggested IRC nickname, when signed in' (#1637) from marcusxs/friendica-addons:default_irc_nickname_to_friendica_nickname into develop
Reviewed-on: friendica/friendica-addons#1637
2026-03-07 15:07:09 +01:00
Marcus F.
31c130436c IRC: Use friendica nickname as suggested IRC nickname, when signed in 2026-03-07 13:31:50 +01:00
8a4715271c Merge pull request 'Mailstream: respect blocked/ignored/collapsed contact settings' (#1640) from mexon/friendica-addons:mat/mailstream-block into develop
Reviewed-on: friendica/friendica-addons#1640
Reviewed-by: Hypolite Petovan <hypolite@mrpetovan.com>
2026-03-07 04:12:30 +01:00
Matthew Exon
ed70b2ca27 Mailstream: respect blocked/ignored/collapsed contact settings 2026-03-02 18:13:28 +01:00
2c75b00b16 Merge pull request 'Smileybutton Add-on Upgrade (github PR 1380)' (#1638) from tobias/friendica-addons:rp-smileybutton into develop
Reviewed-on: friendica/friendica-addons#1638
Reviewed-by: Hypolite Petovan <hypolite@mrpetovan.com>
2026-02-13 16:56:19 +01:00
Random Penguin
6d3dd9b8b2 Update smileybutton.php
- Enabling for Quattro. Enabled for Mobile because it may have emoji mobile devices do not have. Switched structure from <table> to <div> to make layout more flexible.
- Switched to DIV layout
- Also fixes button and position appearance.
- Also fixes button alignment and appearance issues
- Adding support for Quattro theme
2026-02-10 21:22:03 -05:00
cfbc6676f0 merged stable into develop 2026-01-27 08:40:49 +01:00
62e71da0d7 Merge branch '2025.07-rc' into stable 2026-01-27 08:31:23 +01:00
d8673f9011 Merge pull request 'audon/audon.php aktualisiert' (#1631) from loma-one/friendica-addons:2025.07-rc into 2025.07-rc
Reviewed-on: friendica/friendica-addons#1631
2026-01-18 19:00:47 +01:00
e95dd66b2b audon/audon.php aktualisiert
The Audon project has been discontinued.
2026-01-18 19:00:47 +01:00
ce97294546 Merge pull request 'Update markdown translations for da-dk' (#1636) from marcusxs/friendica-addons:update_markdown_da_dk_translations into 2025.07-rc
Reviewed-on: friendica/friendica-addons#1636
2026-01-18 18:55:38 +01:00
Marcus F.
d2123c9b87 Update markdown translations for da-dk 2026-01-18 15:01:55 +01:00
eb8255c40d Merge pull request 'updated translations' (#1635) from tobias/friendica-addons:20260108-lng into 2025.07-rc
Reviewed-on: friendica/friendica-addons#1635
2026-01-11 18:59:10 +01:00
b4fdbdcadc updated translations 2026-01-08 09:43:41 +01:00
fb0816eb39 Merge pull request 'New converse.js based XMPP addon' (#1621) from heluecht/friendica-addons:xmpp-converse into 2025.07-rc
Reviewed-on: friendica/friendica-addons#1621
Reviewed-by: Hypolite Petovan <hypolite@mrpetovan.com>
2025-12-16 16:02:57 +01:00
f31047f3c8 XMPP addon is created 2025-12-16 16:02:57 +01:00
51c0b11287 Merge pull request 'Fix PHPStan error' (#1625) from heluecht/friendica-addons:phpstan into 2025.07-rc
Reviewed-on: friendica/friendica-addons#1625
Reviewed-by: Hypolite Petovan <hypolite@mrpetovan.com>
2025-12-16 15:58:54 +01:00
b060be281f Fix PHPStan error 2025-12-16 15:58:54 +01:00
ff7025d852 Merge pull request 'Add references header for more robust threading in mail clients' (#1624) from mexon/friendica-addons:mat/mailstream-references into 2025.07-rc
Reviewed-on: friendica/friendica-addons#1624
2025-12-14 12:02:18 +01:00
Matthew Exon
cfc7193122 Add references header for more robust threading in mail clients 2025-12-13 11:29:59 +01:00
0bf1d3eec9 Merge pull request 'Increased speed for "follow" requests' (#1622) from heluecht/friendica-addons:follow-speed into 2025.07-rc
Reviewed-on: friendica/friendica-addons#1622
2025-12-01 18:09:41 +01:00
53ca699b16 Increased speed for "follow" requests 2025-12-01 18:09:41 +01:00
cf8c798c76 Merge pull request 'tesseract/tesseract.php aktualisiert' (#1609) from loma-one/friendica-addons:develop into develop
Reviewed-on: friendica/friendica-addons#1609
2025-12-01 18:08:39 +01:00
324bc97c52 tesseract/tesseract.php aktualisiert
Modified addon.
The addon used to generate a large system load and led to the server being unavailable. The changes help to make better use of system resources.

- Creates and removes tesseract-limited.sh to limit the system resources for tesseract (timeout/resource limits).
- Checks permitted formats to avoid wasting resources.
2025-12-01 18:08:39 +01:00
633c6799d8 Merge pull request '[CI] Add All-In-One Archive' (#1616) from nupplaPhil/friendica-addons:ci/full-archive into 2025.07-rc
Reviewed-on: friendica/friendica-addons#1616
2025-11-21 23:51:36 +01:00
d47e20b0d4 Enable CI Pipeline 2025-11-21 23:51:36 +01:00
38dcc81d3c Merge pull request 'GitHub Issue 14872: Change Ratioed default sort order' (#1619) from haheute/friendica-addons:ratioed-sort-order into 2025.07-rc
Reviewed-on: friendica/friendica-addons#1619
2025-11-21 23:49:43 +01:00
1fdc6d9794 GitHub Issue 14872: Change Ratioed default sort order 2025-11-20 15:46:44 +01:00
9b3278ffd9 Merge pull request 'add messages.po file for ratioed addon' (#1618) from mexon/friendica-addons:mat/ratioed-translation into 2025.07-rc
Reviewed-on: friendica/friendica-addons#1618
Reviewed-by: Hypolite Petovan <hypolite@mrpetovan.com>
2025-11-12 14:36:34 +01:00
Matthew Exon
427f39ad57 add messages.po file for ratioed addon 2025-11-10 07:26:04 +01:00
0562623117 Merge pull request 'Update Link to Transifex Friendica page' (#1617) from haheute/friendica-addons:update-transifex-url into 2025.07-rc
Reviewed-on: friendica/friendica-addons#1617
2025-11-09 19:57:26 +01:00
8d42f99aff Update Link to Transifex Friendica page 2025-11-08 12:34:47 +01:00
6a342088a5 Merge pull request 'Avoid sending group posts through connectors' (#1615) from heluecht/friendica-addons:no-group-posts into 2025.07-rc
Reviewed-on: friendica/friendica-addons#1615
2025-09-14 18:07:56 +02:00
6dcf3cbf5c Avoid sending group posts through connectors 2025-09-01 01:45:44 +00:00
28fcccd9d5 Merge pull request 'Fix several warnings' (#1613) from heluecht/friendica-addons:warnings into 2025.07-rc
Reviewed-on: friendica/friendica-addons#1613
2025-08-07 21:08:38 +02:00
1cc54a83a9 Fix several warnings 2025-08-04 20:48:06 +00:00
e76575eb52 Merge pull request 'Issue 15048: Support addon filters via API' (#1612) from heluecht/friendica-addons:issue-15048 into 2025.07-rc
Reviewed-on: friendica/friendica-addons#1612
2025-07-30 22:40:55 +02:00
b39ab36cee Issue 15048: Support addon filters via API 2025-07-29 21:23:57 +00:00
ea41e2f1b6 Merge pull request 'update PHPMailer' (#1611) from 20250710-phpmailer into 2025.07-rc
Reviewed-on: friendica/friendica-addons#1611
2025-07-23 23:09:06 +02:00
9387db358c update PHPMailer 2025-07-10 06:30:21 +02:00
715f700323 Merge pull request '[Fix] reset Dice calls for LoggerFactory' (#1610) from Art4/friendica-addons:fix-monolog-addon into 2025.07-rc
Reviewed-on: friendica/friendica-addons#1610
2025-07-08 07:10:24 +02:00
Art4
8a8639b07e reset Dice calls for LoggerFactory 2025-06-05 07:56:53 +00:00
97b09d34e9 Merge pull request 'Issue 14667: Pinned Bluesky feeds are fetched again' (#1605) from heluecht/friendica-addons:bluesky-pinned into develop
Reviewed-on: friendica/friendica-addons#1605
2025-05-03 22:02:16 +02:00
2289fdc97e Issue 14667: Pinned Bluesky feeds are fetched again 2025-05-03 22:02:16 +02:00
d95137ce6b Merge pull request 'Bluesky: Support for mentions' (#1606) from heluecht/friendica-addons:bluesky-mentions into develop
Reviewed-on: friendica/friendica-addons#1606
2025-05-03 22:01:06 +02:00
cd4f102d02 Bluesky: Support for mentions 2025-05-03 22:01:06 +02:00
4daaf17110 Merge pull request 'Replace Addon class with AddonHelper' (#1607) from Art4/friendica-addons:replace-addon-class-with-addonhelper into develop
Reviewed-on: friendica/friendica-addons#1607
2025-05-03 21:59:14 +02:00
Art4
48ff761bdb Replace Addon class with AddonHelper 2025-04-28 13:01:41 +00:00
45d3a6fb74 Merge pull request '[CI] Bump PHP versions in woodpecker' (#1604) from nupplaPhil/friendica-addons:feat/woodpecker into develop
Reviewed-on: friendica/friendica-addons#1604
2025-04-27 02:18:37 +02:00
97a3b5815b [CI] Bump PHP versions in woodpecker 2025-04-27 02:18:37 +02:00
95a9f7038a Merge pull request 'PHPStan level 3' (#1603) from Art4/friendica-addons:phpstan-level-3 into develop
Reviewed-on: friendica/friendica-addons#1603
2025-04-27 02:17:41 +02:00
Art4
06b4f164f5 cast db stmt object to array 2025-03-14 08:21:08 +00:00
Art4
38a8e9a169 remove obvious type cast 2025-03-14 08:15:02 +00:00
Art4
db875bc755 Remove type casting to int 2025-03-14 07:49:20 +00:00
Art4
dd58b000d9 Fix error in bluesky addon 2025-03-13 11:57:28 +00:00
Art4
cdeaa433a1 Fix error in diaspora addon 2025-03-13 11:55:34 +00:00
Art4
ad31685237 Fix error in js_upload addon 2025-03-13 11:51:53 +00:00
Art4
2667b4d78e Fix error in libravatar addon 2025-03-13 11:38:18 +00:00
Art4
c56ec7c7c4 Fix error in mailstream addon 2025-03-13 10:29:47 +00:00
Art4
417a3a8198 Fix error in membersince addon 2025-03-13 09:49:18 +00:00
Art4
dda6710b10 Fix error in notifyall addon 2025-03-13 09:36:34 +00:00
Art4
21a7529a0e fix PHPStan error in phpmailer addon 2025-02-26 15:21:19 +00:00
Art4
bbce8c345f Fix PHPStan errors in phpnut addon 2025-02-26 15:12:25 +00:00
Art4
512ad63dbf Fix PHPStan errors in statusnet addon 2025-02-26 14:35:00 +00:00
Art4
cfe27582ee Fix PHPStan error in tumblr addon 2025-02-26 08:47:06 +00:00
Art4
d488c1907a Fix PHPStan error in webdav_storage addon 2025-02-25 15:24:00 +00:00
81b4d3cab4 Merge pull request '[tumblr] Skip empty tags when saving user-defined tags' (#1602) from MrPetovan/friendica-addons:bug/fatal-errors into develop
Reviewed-on: friendica/friendica-addons#1602
2025-02-24 19:23:47 +01:00
ec718ea294 [tumblr] Skip empty tags when saving user-defined tags
- Skip empty tags when fetching them
↪ Empty tags were triggering a Tumblr API error
- Address https://github.com/friendica/friendica/issues/14646#issuecomment-2628090487
- Using log output from https://github.com/friendica/friendica/issues/14646#issuecomment-2665000962
2025-02-20 23:03:27 -05:00
8411a0f5ed Merge pull request 'Improve accessibility with showmore and rendertime' (#1600) from heluecht/friendica-addons:accessibility into develop
Reviewed-on: friendica/friendica-addons#1600
2025-02-16 11:05:52 +01:00
859d92ab02 Improve accessibility with showmore and rendertime 2025-02-16 11:05:52 +01:00
73d4bed31c Merge pull request 'Bluesky: Avoid duplicated reshares' (#1601) from heluecht/friendica-addons:double-reshare into develop
Reviewed-on: friendica/friendica-addons#1601
2025-02-16 11:05:18 +01:00
07008af9c1 Bluesky: Avoid duplicated reshares 2025-02-16 06:12:49 +00:00
0fb2c05244 Merge pull request '[tumblr] Ward against unexpected response format in tumblr_fetch_tags()' (#1599) from MrPetovan/friendica-addons:bug/fatal-errors into develop
Reviewed-on: friendica/friendica-addons#1599
2025-02-08 16:57:13 +01:00
373c30b5d0 [tumblr] Ward against unexpected response format in tumblr_fetch_tags()
- Adress https://github.com/friendica/friendica/issues/14646#issuecomment-2628090487
2025-02-08 16:57:13 +01:00
4454ce5883 Merge pull request 'Implement monolog addon as LoggerFactory' (#1598) from Art4/friendica-addons:loggerfactory-in-monolog-addon into develop
Reviewed-on: friendica/friendica-addons#1598
Reviewed-by: Hypolite Petovan <hypolite@mrpetovan.com>
2025-02-08 04:16:47 +01:00
Art4
5701853d29 Remove config docs, format syntax 2025-02-06 11:35:10 +00:00
Art4
ed75360eb4 Setting the logger_config config is no longer needed 2025-02-06 09:27:22 +00:00
Art4
c4f8c65817 Remove wrong phpdoc 2025-02-05 15:32:24 +00:00
Art4
f7ec934893 bump version to 1.1 2025-02-05 15:20:22 +00:00
Art4
0bafcc78f8 Add READMD.md for monolog addon 2025-02-05 15:20:06 +00:00
Art4
e6d92cc94a Rewrite Monolog factory to implement LoggerFactory 2025-02-05 15:11:14 +00:00
16a8172c37 Merge pull request 'Accessibility: Use different id values for options' (#1597) from heluecht/friendica-addons:accessibility into develop
Reviewed-on: friendica/friendica-addons#1597
Reviewed-by: Hypolite Petovan <hypolite@mrpetovan.com>
2025-01-28 23:09:04 +01:00
16127854dd Accessibility: Use different id values for options 2025-01-28 20:27:52 +00:00
7e1bcbdedb Merge pull request 'Add additional theme-filter for disabling/enabling divs.' (#1596) from jakob/friendica-addons:fix-saml-display-settings into develop
Reviewed-on: friendica/friendica-addons#1596
Reviewed-by: Hypolite Petovan <hypolite@mrpetovan.com>
2025-01-25 14:06:07 +01:00
Jakobus Schürz
8384b74696 add condition for selected theme 2025-01-25 08:05:32 -05:00
c5e3d1f047 Merge pull request 'Issue 14692: Avoid loop situation' (#1595) from heluecht/friendica-addons:issue-14692 into develop
Reviewed-on: friendica/friendica-addons#1595
Reviewed-by: Hypolite Petovan <hypolite@mrpetovan.com>
2025-01-25 13:59:52 +01:00
cbfcfb3349 Issue 14692: Avoid loop situation 2025-01-25 02:44:54 +00:00
cdba300c7b Merge pull request 'Replace Logger class with DI::logger()' (#1594) from Art4/friendica-addons:replace-logger-with-loggerinterface into develop
Reviewed-on: friendica/friendica-addons#1594
Reviewed-by: Hypolite Petovan <hypolite@mrpetovan.com>
2025-01-24 14:34:43 +01:00
Art4
4c8c262b07 fix in googlemaps addon 2025-01-24 12:10:58 +00:00
Art4
dd775645d4 Replace call for Logger with DI::logger() in wppost addon 2025-01-24 11:58:32 +00:00
Art4
e4d14cab62 Replace call for Logger with DI::logger() in twitter addon 2025-01-24 11:58:10 +00:00
Art4
a7b26f6453 Replace call for Logger with DI::logger() in tesseract addon 2025-01-24 11:57:34 +00:00
Art4
763c5026f2 Replace call for Logger with DI::logger() in tumblr addon 2025-01-24 11:57:12 +00:00
Art4
bfdccb451c Replace call for Logger with DI::logger() in statusnet addon 2025-01-24 11:56:45 +00:00
Art4
ac6c1d7a49 Replace call for Logger with DI::logger() in saml addon 2025-01-24 11:56:29 +00:00
Art4
32a3160445 Replace call for Logger with DI::logger() in randplace addon 2025-01-24 11:56:09 +00:00
Art4
d50650b8cf Replace call for Logger with DI::logger() in pumpio addon 2025-01-24 11:55:13 +00:00
Art4
e32ba1ce7b Replace call for Logger with DI::logger() in public_server addon 2025-01-24 11:54:34 +00:00
Art4
119ba0a78e Replace call for Logger with DI::logger() in pnut addon 2025-01-24 11:48:21 +00:00
Art4
469d3e6d61 Replace call for Logger with DI::logger() in planets addon 2025-01-24 11:47:40 +00:00
Art4
757d72c360 Replace call for Logger with DI::logger() in openstreetmap addon 2025-01-24 11:47:24 +00:00
Art4
9ceff8f592 Replace call for Logger with DI::logger() in nominatim addon 2025-01-24 11:46:58 +00:00
Art4
9a91bae363 Replace call for Logger with DI::logger() in mailstream addon 2025-01-24 11:46:30 +00:00
Art4
9ed02034f1 Replace call for Logger with DI::logger() in ljpost addon 2025-01-24 11:46:04 +00:00
Art4
f08750199d Replace call for Logger with DI::logger() in libertree addon 2025-01-24 11:45:25 +00:00
Art4
a488f25131 Replace call for Logger with DI::logger() in ldapauth addon 2025-01-24 11:44:48 +00:00
Art4
5d51c5b56e Replace call for Logger with DI::logger() in js_upload addon 2025-01-24 11:42:25 +00:00
Art4
5002318089 Replace call for Logger with DI::logger() in ijpost addon 2025-01-24 11:41:02 +00:00
Art4
15a951235f Replace call for Logger with DI::logger() in ifttt addon 2025-01-24 11:40:32 +00:00
Art4
e7755584cb Replace call for Logger with DI::logger() in geocoordinates addon 2025-01-24 11:40:12 +00:00
Art4
1db552ead9 Replace call for Logger with DI::logger() in dwpost addon 2025-01-24 11:39:11 +00:00
Art4
b38c2d18be Replace call for Logger with DI::logger() in discourse addon 2025-01-24 11:38:48 +00:00
Art4
4881e6004a Replace call for Logger with DI::logger() in diaspora addon 2025-01-24 11:38:27 +00:00
Art4
1d1a00df27 Replace call for Logger with DI::logger() in cld addon 2025-01-24 11:37:58 +00:00
Art4
77ebaca281 Replace call for Logger with DI::logger() in ratioed addon 2025-01-24 11:37:28 +00:00
Art4
d78ea50516 Replace call for Logger with DI::logger() in bluesky addon 2025-01-24 11:36:23 +00:00
Art4
41f280f0c7 Replace call for Logger with DI::logger() in blockbot addon 2025-01-24 11:34:33 +00:00
Art4
4310c1355d Replace call for Logger with DI::logger() 2025-01-24 10:53:01 +00:00
1cc5a6688e Merge pull request 'rework saml addon' (#1588) from jakob/friendica-addons:fix-saml-display-settings into develop
Reviewed-on: friendica/friendica-addons#1588
Reviewed-by: Hypolite Petovan <hypolite@mrpetovan.com>
2025-01-23 14:31:49 +01:00
Jakobus Schürz
0b4aaac9fd translation for saml-hint 2025-01-23 14:31:49 +01:00
Jakobus Schürz
c506367273 replace password-handling with hint
also add hint to email-field
2025-01-23 14:31:49 +01:00
Jakobus Schürz
792f50f835 fix view in vier and frio 2025-01-23 14:31:49 +01:00
Jakobus Schürz
2b5764c132 rework saml addon
fix #1587
remove css-side hiding of elements, which was broken.
remove them or make them readonly via javascript
2025-01-23 14:31:49 +01:00
69e75ef88b Merge pull request 'Check PHPStan in addons' (#1592) from Art4/friendica-addons:fix-phpstan-error into develop
Reviewed-on: friendica/friendica-addons#1592
Reviewed-by: Hypolite Petovan <hypolite@mrpetovan.com>
2025-01-23 14:29:59 +01:00
Art4
7a7940a8ed Fix PHPStan errors 2025-01-23 08:29:13 -05:00
Art4
2741227bfa Add phpstan in woodpacker 2025-01-23 08:27:48 -05:00
13cffd76db Merge pull request 'Clean up phpstan warning' (#1591) from mexon/friendica-addons:mat/ratioed-fix-warning into develop
Reviewed-on: friendica/friendica-addons#1591
Reviewed-by: Hypolite Petovan <hypolite@mrpetovan.com>
2025-01-23 14:26:41 +01:00
Matthew Exon
0d0aae36cd Clean up phpstan warning 2025-01-23 08:26:23 -05:00
28d3041694 Merge pull request 'Fix codestyle' (#1590) from heluecht/friendica-addons:ratiod-fix into develop
Reviewed-on: friendica/friendica-addons#1590
2025-01-22 08:49:57 +01:00
cb70a4eaff Fix codestyle 2025-01-18 15:25:50 +00:00
0c96d0f4bb Merge pull request 'Ratioed: add statistics about reply likes and reply guy score' (#1589) from mexon/friendica-addons:mat/reply-guy-score into develop
Reviewed-on: friendica/friendica-addons#1589
2025-01-16 06:43:41 +01:00
Matthew Exon
ee8c852d38 Ratioed: remove action buttons 2025-01-15 19:33:11 +01:00
Matthew Exon
807598dbd0 Ratioed: wrap long lines 2025-01-15 19:32:55 +01:00
Matthew Exon
8ba4cd5f61 Ratioed: bump version number 2025-01-12 14:33:21 +01:00
Matthew Exon
3441c9bd0e Ratioed: add statistics about reply likes and reply guy score 2025-01-12 14:33:21 +01:00
44d2079da2 Merge pull request 'Ratioed: several fixes to functionality' (#1586) from mexon/friendica-addons:mat/ratioed-fixes into develop
Reviewed-on: friendica/friendica-addons#1586
2025-01-12 12:03:00 +01:00
Matthew Exon
b360b553ed Ratioed: remove actions 2025-01-12 12:03:00 +01:00
Matthew Exon
46b3836720 Ratioed: remove create user button 2025-01-12 12:03:00 +01:00
Matthew Exon
81639ff615 Ratioed: fix sorting by columns 2025-01-12 12:03:00 +01:00
Matthew Exon
d495810b2d Ratioed: allow both sorting directions 2025-01-12 12:03:00 +01:00
Matthew Exon
2ef9cb8add Ratioed: fill in zeroes for empty values 2025-01-12 12:03:00 +01:00
Matthew Exon
8e65141cb5 Ratioed: bump version number 2025-01-12 12:03:00 +01:00
Matthew Exon
d034e311cb Ratioed: add help link 2025-01-12 12:03:00 +01:00
db10da2f02 Merge pull request '[CI] Fix releaser' (#1585) from nupplaPhil/friendica-addons:ci/stable_pick into develop
Reviewed-on: friendica/friendica-addons#1585
2025-01-02 08:37:19 +01:00
995e81e951
[CI] Fix releaser 2025-01-01 20:22:42 +01:00
f0999a1e46
[CI] Fix releaser 2025-01-01 20:06:43 +01:00
cb2ab0684e Merge branch 'stable' into develop 2024-12-31 18:57:15 +01:00
Art4
5f557ed0ab Merge branch '2024.09-rc' into merge-2024.09-rc-into-develop 2024-12-23 10:15:53 +00:00
a63fb08525 Merge remote-tracking branch '2024.09-rc' into develop
# Conflicts:
#	bluesky/bluesky.php
2024-12-16 09:12:09 -05:00
6cf388f141 Merge remote-tracking branch 'Art4/remove-app-usage' into develop 2024-12-16 09:04:45 -05:00
Art4
c4bea164c7 Merge branch 'develop' into remove-app-usage 2024-12-15 15:55:54 +00:00
04c402607b Merge branch 'Art4/fix-phpstan-error-level-2' into develop 2024-12-15 09:18:47 -05:00
Artur Weigandt
68ee5260b0
Merge branch 'develop' into fix-phpstan-error-level-2 2024-12-13 10:28:15 +01:00
81a84fb895 Merge pull request 'fix-phpstan-error-level-1' (#1579) from MrPetovan/friendica-addons:fix-phpstan-error-level-1 into develop
Reviewed-on: friendica/friendica-addons#1579
2024-12-12 22:37:42 +01:00
Artur Weigandt
729b6e5210 Update mailstream/phpmailer/class.phpmailer.php
Co-authored-by: Hypolite Petovan <hypolite@mrpetovan.com>
2024-12-12 22:37:42 +01:00
Art4
a71db771d9 Fix errors in wppost addon 2024-12-12 22:37:42 +01:00
Art4
2f89827dea fix errors in tictac addon 2024-12-12 22:37:42 +01:00
Art4
8e778593ca fix errors in statusnet addon 2024-12-12 22:37:42 +01:00
Art4
5b623c8368 fix errors in ratioed addon 2024-12-12 22:37:42 +01:00
Art4
bda683c56b fix errors in pumpio addon 2024-12-12 22:37:42 +01:00
Art4
7fa2dfc608 Fix errors in pnut addon 2024-12-12 22:37:42 +01:00
Art4
c0971779c6 Fix errors in nsfw addon 2024-12-12 22:37:42 +01:00
Art4
6b1b043dd8 fix errors in mailstream addon 2024-12-12 22:37:42 +01:00
Art4
984e7c5e5d Fix errors in ljpost addon 2024-12-12 22:37:42 +01:00
Art4
d08a280ba6 Fix errors in libravatar addon 2024-12-12 22:37:42 +01:00
Art4
ee1a917612 Fix errors in leistungsschutzrecht addon 2024-12-12 22:37:42 +01:00
Art4
a53d5ae29b Fix errors in langfilter addon 2024-12-12 22:37:42 +01:00
Art4
3cf53a334d Fix errors in keycloakpassword addon 2024-12-12 22:37:42 +01:00
Art4
81f232d57e Fix errors in js_upload addon 2024-12-12 22:37:42 +01:00
Art4
1860e732ae Fix errors in convert addon 2024-12-12 22:37:42 +01:00
Art4
cf8a7870f3 Fix errors in bluesky addon 2024-12-12 22:37:42 +01:00
Art4
31198294c7 Fix error in bluesky addon 2024-12-12 22:37:42 +01:00
Art4
84659fc1ad Replace DI::app() with DI::appHelper() 2024-12-11 21:47:10 +00:00
Art4
5f7482d081 Remove unused use statements for App 2024-12-11 21:42:48 +00:00
Art4
fff140ad43 Fix last 3 errors 2024-12-09 23:08:31 +00:00
Art4
cfb6b3123f Fix errors in statusnet addon 2024-12-08 23:06:51 +00:00
Art4
b99ac65c0b Fix errors in membersince addon 2024-12-08 22:49:23 +00:00
Art4
89a673cc11 Fix typo 2024-12-08 22:19:58 +00:00
Art4
2fe37c6d4a Fix errors in pnut addon 2024-12-08 21:24:03 +00:00
Art4
5b13274bed Fix class name collision 2024-12-08 21:02:07 +00:00
Art4
82ed43f507 Fix errors 2024-12-07 22:08:59 +00:00
Art4
43c71412e4 Merge branch 'develop' into fix-phpstan-error-level-1 2024-12-01 07:41:27 +00:00
fb9c10f8c5 Merge pull request 'Fix phpstan error level 0 part2' (#1577) from fix-phpstan-error-level-0-part2 into develop
Reviewed-on: friendica/friendica-addons#1577
Reviewed-by: Hypolite Petovan <hypolite@mrpetovan.com>
2024-12-01 03:20:18 +01:00
Art4
1e68417278 Fix classes in s3_storage addon 2024-12-01 03:20:18 +01:00
Art4
7d02c9b53c Fix errors in pumpio addon 2024-12-01 03:20:18 +01:00
Art4
b5c647bd5d fix errors in pnut addon, add support for PHP 7.4 2024-12-01 03:20:18 +01:00
Art4
1bd7cd6e71 fix error in PHPMailer 2024-12-01 03:20:18 +01:00
Art4
def43f3167 Fix errors in mailstream addon 2024-12-01 03:20:18 +01:00
Art4
b661448344 Fix errors in libravatar addon 2024-12-01 03:20:18 +01:00
Art4
922bace555 Fix errors in diaspora addon 2024-12-01 03:20:18 +01:00
Art4
4a2fc7884c remove wrong return tag 2024-12-01 03:20:18 +01:00
Art4
9d172b7082 refactor convert addon, replace each() calls with foreach loop 2024-12-01 03:20:18 +01:00
Art4
4527df602f Add checks for CLD2Detector ans CLD2Encoding classes 2024-12-01 03:20:18 +01:00
Art4
15c21cebb1 Fix errors in wppost addon 2024-11-30 20:36:58 +00:00
Art4
b6a47699bf fix errors in tictac addon 2024-11-30 20:36:07 +00:00
Art4
a41f8c13fe fix errors in statusnet addon 2024-11-30 20:27:57 +00:00
Art4
fccf361ef1 fix errors in ratioed addon 2024-11-30 20:13:41 +00:00
Art4
43ee267d38 fix errors in pumpio addon 2024-11-30 20:12:23 +00:00
Art4
3f89aa1806 Fix errors in pnut addon 2024-11-30 19:51:18 +00:00
Art4
50912fdc17 Fix errors in nsfw addon 2024-11-30 19:50:06 +00:00
Art4
c04016b7d3 fix errors in mailstream addon 2024-11-30 19:48:49 +00:00
Art4
5f6f374f09 Fix errors in ljpost addon 2024-11-30 19:42:40 +00:00
Art4
e86d15993b Fix errors in libravatar addon 2024-11-30 19:41:11 +00:00
Art4
ace19814d7 Fix errors in leistungsschutzrecht addon 2024-11-30 19:37:58 +00:00
Art4
fcec1a3d83 Fix errors in langfilter addon 2024-11-30 19:35:19 +00:00
Art4
04afbe36e3 Fix errors in keycloakpassword addon 2024-11-30 19:32:07 +00:00
Art4
07993f7098 Fix errors in js_upload addon 2024-11-30 19:30:39 +00:00
Art4
bee780552d Fix errors in convert addon 2024-11-30 19:28:38 +00:00
Art4
5664bc84fb Fix errors in bluesky addon 2024-11-30 19:27:50 +00:00
Art4
7246f3deda Merge branch 'fix-phpstan-error-level-0-part2' into fix-phpstan-error-level-1 2024-11-30 19:23:00 +00:00
Art4
0204f54b0e Merge branch 'develop' into fix-phpstan-error-level-0-part2 2024-11-30 06:51:49 +00:00
72e7e2a5b7 Merge remote-tracking branch 'friendica/2024.09-rc' into develop 2024-11-29 21:15:25 -05:00
Art4
5f2a9e9891 Fix error in bluesky addon 2024-11-29 22:36:09 +00:00
Art4
a6de4225c6 Merge branch 'port-rc-branch-into-develop' into fix-phpstan-error-level-0-part2 2024-11-27 23:19:19 +00:00
Art4
23227e5b0f Fix classes in s3_storage addon 2024-11-27 23:18:20 +00:00
Art4
7872400467 Fix errors in pumpio addon 2024-11-27 23:14:01 +00:00
Art4
a5aaea5211 fix errors in pnut addon, add support for PHP 7.4 2024-11-27 22:55:15 +00:00
Art4
7453c6f41a fix error in PHPMailer 2024-11-27 22:33:12 +00:00
Art4
9cb728d19a Merge branch 'develop' into fix-phpstan-error-level-0-part2 2024-11-27 22:25:42 +00:00
Art4
e488f597be Fix errors in mailstream addon 2024-11-27 11:52:59 +00:00
Art4
1346a92505 Fix errors in libravatar addon 2024-11-27 11:43:21 +00:00
Art4
9117626c6a Fix errors in diaspora addon 2024-11-27 11:40:45 +00:00
Art4
90ffd40d58 remove wrong return tag 2024-11-27 11:38:55 +00:00
93a91a95e9 Merge pull request 'Fix PHPStan errors on level 0' (#1575) from MrPetovan/friendica-addons:bug/Art4-1367 into develop
Reviewed-on: friendica/friendica-addons#1575
2024-11-27 08:36:08 +01:00
Art4
fc0dda0cd9 refactor convert addon, replace each() calls with foreach loop 2024-11-26 08:23:27 +00:00
Art4
d7d6a43655 Add checks for CLD2Detector ans CLD2Encoding classes 2024-11-26 07:55:01 +00:00
Art4
c58ca7dcc9 Merge branch '2024.09-rc' into port-rc-branch-into-develop 2024-11-26 07:33:57 +00:00
Art4
6df91dd37b Fix errors in statusnet addon 2024-11-24 19:55:54 +00:00
Art4
e9d3afb483 Fix errors in tictac addon 2024-11-24 19:51:37 +00:00
Art4
348c44c972 inline slim routes and middlewares into advancedcontentfilter addon 2024-11-24 15:36:37 +00:00
58180bd732 Merge pull request 'Remove unused parameter in saml addon' (#1572) from MrPetovan/friendica-addons:bug/Art4-1366 into develop
Reviewed-on: friendica/friendica-addons#1572
2024-11-24 10:17:44 +01:00
Artur Weigandt
bf679262b0 Remove unused parameter in saml addon 2024-11-24 10:17:44 +01:00
c4e24833eb Merge pull request 'Remove unused parameter webdav_storage addon' (#1570) from MrPetovan/friendica-addons:bug/Art4-1364 into develop
Reviewed-on: friendica/friendica-addons#1570
2024-11-24 10:16:47 +01:00
Artur Weigandt
ecf0edb520 Remove unused parameter webdav_storage addon 2024-11-24 10:16:47 +01:00
3a5acf95f7 Merge pull request 'Remove unused App paramter in securemail addon' (#1571) from MrPetovan/friendica-addons:bug/Art4-1365 into develop
Reviewed-on: friendica/friendica-addons#1571
2024-11-24 10:16:25 +01:00
Artur Weigandt
2ea40dc897 Remove unused App paramter in securemail addon 2024-11-23 21:24:34 -05:00
857 changed files with 24641 additions and 2701 deletions

View file

@ -1,6 +1,6 @@
skip_clone: true
pipeline:
steps:
clone_friendica_base:
image: alpine/git
commands:
@ -56,6 +56,10 @@ pipeline:
- /tmp/drone-cache:/tmp/cache
when:
event: pull_request
phpstan:
image: friendicaci/php8.3:php8.3.3
commands:
- ./bin/composer.phar run phpstan;
check:
image: friendicaci/php-cs
commands:

View file

@ -0,0 +1,115 @@
# This prevents executing this pipeline at other servers than ci.friendi.ca
labels:
location: friendica
type: releaser
skip_clone: true
steps:
clone_friendica_base:
image: alpine/git
commands:
- git config --global user.email "no-reply@friendi.ca"
- git config --global user.name "Friendica"
- git config --global --add safe.directory $CI_WORKSPACE
- git clone https://github.com/friendica/friendica.git .
- git checkout $CI_COMMIT_BRANCH
when:
repo: friendica/friendica-addons
branch: [ develop, '*-rc' ]
event: push
clone_friendica_addon:
image: alpine/git
commands:
- git config --global user.email "no-reply@friendi.ca"
- git config --global user.name "Friendica"
- git clone $CI_REPO_CLONE_URL addon
- cd addon/
- git checkout $CI_COMMIT_BRANCH
- git fetch origin $CI_COMMIT_REF
- git merge $CI_COMMIT_SHA
when:
repo: friendica/friendica-addons
branch: [ develop, '*-rc' ]
event: push
restore_cache:
image: meltwater/drone-cache:dev
settings:
backend: "filesystem"
restore: true
cache_key: "{{ .Repo.Name }}_php7.4_{{ arch }}_{{ os }}"
archive_format: "gzip"
mount:
- '.composer'
volumes:
- /tmp/drone-cache:/tmp/cache
when:
repo: friendica/friendica-addons
branch: [ develop, '*-rc' ]
event: push
composer_install:
image: friendicaci/php8.2:php8.2.28
commands:
- export COMPOSER_HOME=.composer
- composer validate
- composer install --no-dev --optimize-autoloader
volumes:
- /etc/hosts:/etc/hosts
when:
repo: friendica/friendica-addons
branch: [ develop, '*-rc' ]
event: push
create_artifacts:
image: debian
commands:
- apt-get update
- apt-get install bzip2
- mkdir ./build
- export VERSION="$(cat VERSION)"
- export RELEASE="friendica-all-in-one-$VERSION"
- export ARTIFACT="$RELEASE.tar.gz"
- tar
--exclude='.tx'
--exclude='.git'
--exclude='.editorconfig'
--exclude='.gitattributes'
--exclude='.gitignore'
--exclude='.woodpecker'
--exclude='**/*/messages.po'
-cvzf ./build/$ARTIFACT /
- cd ./build
- sha256sum "$ARTIFACT" > "$ARTIFACT.sum256"
- chmod 664 ./*
- ls -lh
- cat "$ARTIFACT.sum256"
- sha256sum "$ARTIFACT"
when:
repo: friendica/friendica-addons
branch: [ develop, '*-rc' ]
event: push
sign_artifacts:
image: plugins/gpgsign
settings:
key:
from_secret: gpg_key
passphrase:
from_secret: gpg_password
files:
- build/*
exclude:
- build/*.sum256
detach_sign: true
when:
repo: friendica/friendica-addons
branch: [ develop, '*-rc' ]
event: push
publish_artifacts:
image: alpine
commands:
- cp -fr build/* /tmp/friendica_files/
volumes:
- files:/tmp/friendica_files
when:
repo: friendica/friendica-addons
branch: [ develop, '*-rc' ]
event: push

View file

@ -5,7 +5,7 @@ labels:
skip_clone: true
pipeline:
steps:
clone_friendica_base:
image: alpine/git
commands:
@ -48,7 +48,7 @@ pipeline:
branch: [ develop, '*-rc' ]
event: push
composer_install:
image: friendicaci/php8.2:php8.2.16
image: friendicaci/php8.2:php8.2.28
commands:
- export COMPOSER_HOME=.composer
- composer validate

View file

@ -1,6 +1,6 @@
skip_clone: true
pipeline:
steps:
clone_friendica_base:
image: alpine/git
commands:

View file

@ -5,11 +5,13 @@ matrix:
- PHP_MAJOR_VERSION: 8.0
PHP_VERSION: 8.0.30
- PHP_MAJOR_VERSION: 8.1
PHP_VERSION: 8.1.27
PHP_VERSION: 8.1.31
- PHP_MAJOR_VERSION: 8.2
PHP_VERSION: 8.2.16
PHP_VERSION: 8.2.28
- PHP_MAJOR_VERSION: 8.3
PHP_VERSION: 8.3.3
PHP_VERSION: 8.3.17
- PHP_MAJOR_VERSION: 8.4
PHP_VERSION: 8.4.5
# This forces PHP Unit executions at the "opensocial" labeled location (because of much more power...)
labels:
@ -17,7 +19,7 @@ labels:
skip_clone: true
pipeline:
steps:
clone_friendica_base:
image: alpine/git
commands:

View file

@ -5,7 +5,7 @@ labels:
skip_clone: true
pipeline:
steps:
clone_friendica_base:
image: alpine/git
commands:
@ -45,7 +45,7 @@ pipeline:
repo: friendica/friendica-addons
event: tag
composer_install:
image: friendicaci/php8.2:php8.2.16
image: friendicaci/php8.2:php8.2.28
commands:
- export COMPOSER_HOME=.composer
- composer validate

View file

@ -24,6 +24,6 @@ See the [documentation](https://github.com/friendica/friendica/blob/stable/doc/A
## Translation
Addons can be translated like any other part of Friendica.
Translation for addons is done at [the Transifex Friendica page](https://www.transifex.com/Friendica/friendica/dashboard/).
Translation for addons is done at [the Transifex Friendica page](https://app.transifex.com/Friendica/friendica/dashboard/).
Read more about the workflow in the [Friendica translation documentation](https://github.com/friendica/friendica/blob/stable/doc/translations.md#addon).

View file

@ -33,16 +33,13 @@
*
*/
use Friendica\App;
use Friendica\BaseModule;
use Friendica\Content\Text\Markdown;
use Friendica\Core\Hook;
use Friendica\Core\Logger;
use Friendica\Core\Renderer;
use Friendica\Database\DBA;
use Friendica\Database\DBStructure;
use Friendica\DI;
use Friendica\Model\Item;
use Friendica\Model\Post;
use Friendica\Model\Tag;
use Friendica\Model\User;
@ -64,7 +61,7 @@ function advancedcontentfilter_install()
Hook::add('dbstructure_definition' , __FILE__, 'advancedcontentfilter_dbstructure_definition');
DBStructure::performUpdate();
Logger::notice('installed advancedcontentfilter');
DI::logger()->notice('installed advancedcontentfilter');
}
/*
@ -123,21 +120,22 @@ function advancedcontentfilter_prepare_body_content_filter(&$hook_data)
$expressionLanguage = new ExpressionLanguage\ExpressionLanguage();
}
if (!DI::userSession()->getLocalUserId()) {
$uid = $hook_data['uid'] ?? DI::userSession()->getLocalUserId();
if (!$uid) {
return;
}
$vars = advancedcontentfilter_get_filter_fields($hook_data['item']);
$rules = DI::cache()->get('rules_' . DI::userSession()->getLocalUserId());
$rules = DI::cache()->get('rules_' . $uid);
if (!isset($rules)) {
$rules = DBA::toArray(DBA::select(
'advancedcontentfilter_rules',
['name', 'expression', 'serialized'],
['uid' => DI::userSession()->getLocalUserId(), 'active' => true]
['uid' => $uid, 'active' => true]
));
DI::cache()->set('rules_' . DI::userSession()->getLocalUserId(), $rules);
DI::cache()->set('rules_' . $uid, $rules);
}
if ($rules) {
@ -192,9 +190,30 @@ function advancedcontentfilter_init()
if (DI::args()->getArgc() > 1 && DI::args()->getArgv()[1] == 'api') {
$slim = \Slim\Factory\AppFactory::create();
require __DIR__ . '/src/middlewares.php';
/**
* The routing middleware should be added before the ErrorMiddleware
* Otherwise exceptions thrown from it will not be handled
*/
$slim->addRoutingMiddleware();
$slim->addErrorMiddleware(true, true, true, DI::logger());
// register routes
$slim->group('/advancedcontentfilter/api', function (\Slim\Routing\RouteCollectorProxy $app) {
$app->group('/rules', function (\Slim\Routing\RouteCollectorProxy $app) {
$app->get('', 'advancedcontentfilter_get_rules');
$app->post('', 'advancedcontentfilter_post_rules');
$app->get('/{id}', 'advancedcontentfilter_get_rules_id');
$app->put('/{id}', 'advancedcontentfilter_put_rules_id');
$app->delete('/{id}', 'advancedcontentfilter_delete_rules_id');
});
$app->group('/variables', function (\Slim\Routing\RouteCollectorProxy $app) {
$app->get('/{guid}', 'advancedcontentfilter_get_variables_guid');
});
});
require __DIR__ . '/src/routes.php';
$slim->run();
exit;
@ -252,7 +271,7 @@ function advancedcontentfilter_content()
'rule_expression' => DI::l10n()->t('Rule Expression'),
'cancel' => DI::l10n()->t('Cancel'),
],
'$current_theme' => DI::app()->getCurrentTheme(),
'$current_theme' => DI::appHelper()->getCurrentTheme(),
'$rules' => DBA::toArray(DBA::select('advancedcontentfilter_rules', [], ['uid' => DI::userSession()->getLocalUserId()])),
'$form_security_token' => BaseModule::getFormSecurityToken()
]);

View file

@ -0,0 +1,161 @@
# ADDON advancedcontentfilter
# Copyright (C)
# This file is distributed under the same license as the Friendica advancedcontentfilter addon package.
#
#
#, fuzzy
msgid ""
msgstr ""
"Project-Id-Version: \n"
"Report-Msgid-Bugs-To: \n"
"POT-Creation-Date: 2022-05-11 08:54-0400\n"
"PO-Revision-Date: 2018-05-24 06:41+0000\n"
"Language-Team: Bulgarian (https://app.transifex.com/Friendica/teams/12172/bg/)\n"
"MIME-Version: 1.0\n"
"Content-Type: text/plain; charset=UTF-8\n"
"Content-Transfer-Encoding: 8bit\n"
"Language: bg\n"
"Plural-Forms: nplurals=2; plural=(n != 1);\n"
#: advancedcontentfilter.php:154
#, php-format
msgid "Filtered by rule: %s"
msgstr ""
#: advancedcontentfilter.php:170 advancedcontentfilter.php:225
msgid "Advanced Content Filter"
msgstr ""
#: advancedcontentfilter.php:224
msgid "Back to Addon Settings"
msgstr ""
#: advancedcontentfilter.php:226
msgid "Add a Rule"
msgstr ""
#: advancedcontentfilter.php:227
msgid "Help"
msgstr ""
#: advancedcontentfilter.php:228
msgid ""
"Add and manage your personal content filter rules in this screen. Rules have"
" a name and an arbitrary expression that will be matched against post data. "
"For a complete reference of the available operations and variables, check "
"the help page."
msgstr ""
#: advancedcontentfilter.php:229
msgid "Your rules"
msgstr ""
#: advancedcontentfilter.php:230
msgid ""
"You have no rules yet! Start adding one by clicking on the button above next"
" to the title."
msgstr ""
#: advancedcontentfilter.php:231
msgid "Disabled"
msgstr ""
#: advancedcontentfilter.php:232
msgid "Enabled"
msgstr ""
#: advancedcontentfilter.php:233
msgid "Disable this rule"
msgstr ""
#: advancedcontentfilter.php:234
msgid "Enable this rule"
msgstr ""
#: advancedcontentfilter.php:235
msgid "Edit this rule"
msgstr ""
#: advancedcontentfilter.php:236
msgid "Edit the rule"
msgstr ""
#: advancedcontentfilter.php:237
msgid "Save this rule"
msgstr ""
#: advancedcontentfilter.php:238
msgid "Delete this rule"
msgstr ""
#: advancedcontentfilter.php:239
msgid "Rule"
msgstr ""
#: advancedcontentfilter.php:240
msgid "Close"
msgstr ""
#: advancedcontentfilter.php:241
msgid "Add new rule"
msgstr ""
#: advancedcontentfilter.php:242
msgid "Rule Name"
msgstr ""
#: advancedcontentfilter.php:243
msgid "Rule Expression"
msgstr ""
#: advancedcontentfilter.php:244
msgid "Cancel"
msgstr ""
#: advancedcontentfilter.php:295
msgid "This addon requires this node having at least one post"
msgstr ""
#: advancedcontentfilter.php:325 advancedcontentfilter.php:336
#: advancedcontentfilter.php:347 advancedcontentfilter.php:383
#: advancedcontentfilter.php:414 advancedcontentfilter.php:437
msgid "You must be logged in to use this method"
msgstr ""
#: advancedcontentfilter.php:351 advancedcontentfilter.php:387
#: advancedcontentfilter.php:418
msgid "Invalid form security token, please refresh the page."
msgstr ""
#: advancedcontentfilter.php:363
msgid "The rule name and expression are required."
msgstr ""
#: advancedcontentfilter.php:377
msgid "Rule successfully added"
msgstr ""
#: advancedcontentfilter.php:391 advancedcontentfilter.php:422
msgid "Rule doesn't exist or doesn't belong to you."
msgstr ""
#: advancedcontentfilter.php:408
msgid "Rule successfully updated"
msgstr ""
#: advancedcontentfilter.php:431
msgid "Rule successfully deleted"
msgstr ""
#: advancedcontentfilter.php:441
msgid "Missing argument: guid."
msgstr ""
#: advancedcontentfilter.php:449
#, php-format
msgid "Unknown post with guid: %s"
msgstr ""
#: src/middlewares.php:49
msgid "Method not found"
msgstr ""

View file

@ -0,0 +1,7 @@
<?php
if(! function_exists("string_plural_select_bg")) {
function string_plural_select_bg($n){
$n = intval($n);
return intval($n != 1);
}}

View file

@ -0,0 +1,161 @@
# ADDON advancedcontentfilter
# Copyright (C)
# This file is distributed under the same license as the Friendica advancedcontentfilter addon package.
#
#
#, fuzzy
msgid ""
msgstr ""
"Project-Id-Version: \n"
"Report-Msgid-Bugs-To: \n"
"POT-Creation-Date: 2022-05-11 08:54-0400\n"
"PO-Revision-Date: 2018-05-24 06:41+0000\n"
"Language-Team: Esperanto (https://app.transifex.com/Friendica/teams/12172/eo/)\n"
"MIME-Version: 1.0\n"
"Content-Type: text/plain; charset=UTF-8\n"
"Content-Transfer-Encoding: 8bit\n"
"Language: eo\n"
"Plural-Forms: nplurals=2; plural=(n != 1);\n"
#: advancedcontentfilter.php:154
#, php-format
msgid "Filtered by rule: %s"
msgstr ""
#: advancedcontentfilter.php:170 advancedcontentfilter.php:225
msgid "Advanced Content Filter"
msgstr ""
#: advancedcontentfilter.php:224
msgid "Back to Addon Settings"
msgstr ""
#: advancedcontentfilter.php:226
msgid "Add a Rule"
msgstr ""
#: advancedcontentfilter.php:227
msgid "Help"
msgstr ""
#: advancedcontentfilter.php:228
msgid ""
"Add and manage your personal content filter rules in this screen. Rules have"
" a name and an arbitrary expression that will be matched against post data. "
"For a complete reference of the available operations and variables, check "
"the help page."
msgstr ""
#: advancedcontentfilter.php:229
msgid "Your rules"
msgstr ""
#: advancedcontentfilter.php:230
msgid ""
"You have no rules yet! Start adding one by clicking on the button above next"
" to the title."
msgstr ""
#: advancedcontentfilter.php:231
msgid "Disabled"
msgstr ""
#: advancedcontentfilter.php:232
msgid "Enabled"
msgstr ""
#: advancedcontentfilter.php:233
msgid "Disable this rule"
msgstr ""
#: advancedcontentfilter.php:234
msgid "Enable this rule"
msgstr ""
#: advancedcontentfilter.php:235
msgid "Edit this rule"
msgstr ""
#: advancedcontentfilter.php:236
msgid "Edit the rule"
msgstr ""
#: advancedcontentfilter.php:237
msgid "Save this rule"
msgstr ""
#: advancedcontentfilter.php:238
msgid "Delete this rule"
msgstr ""
#: advancedcontentfilter.php:239
msgid "Rule"
msgstr ""
#: advancedcontentfilter.php:240
msgid "Close"
msgstr ""
#: advancedcontentfilter.php:241
msgid "Add new rule"
msgstr ""
#: advancedcontentfilter.php:242
msgid "Rule Name"
msgstr ""
#: advancedcontentfilter.php:243
msgid "Rule Expression"
msgstr ""
#: advancedcontentfilter.php:244
msgid "Cancel"
msgstr ""
#: advancedcontentfilter.php:295
msgid "This addon requires this node having at least one post"
msgstr ""
#: advancedcontentfilter.php:325 advancedcontentfilter.php:336
#: advancedcontentfilter.php:347 advancedcontentfilter.php:383
#: advancedcontentfilter.php:414 advancedcontentfilter.php:437
msgid "You must be logged in to use this method"
msgstr ""
#: advancedcontentfilter.php:351 advancedcontentfilter.php:387
#: advancedcontentfilter.php:418
msgid "Invalid form security token, please refresh the page."
msgstr ""
#: advancedcontentfilter.php:363
msgid "The rule name and expression are required."
msgstr ""
#: advancedcontentfilter.php:377
msgid "Rule successfully added"
msgstr ""
#: advancedcontentfilter.php:391 advancedcontentfilter.php:422
msgid "Rule doesn't exist or doesn't belong to you."
msgstr ""
#: advancedcontentfilter.php:408
msgid "Rule successfully updated"
msgstr ""
#: advancedcontentfilter.php:431
msgid "Rule successfully deleted"
msgstr ""
#: advancedcontentfilter.php:441
msgid "Missing argument: guid."
msgstr ""
#: advancedcontentfilter.php:449
#, php-format
msgid "Unknown post with guid: %s"
msgstr ""
#: src/middlewares.php:49
msgid "Method not found"
msgstr ""

View file

@ -0,0 +1,7 @@
<?php
if(! function_exists("string_plural_select_eo")) {
function string_plural_select_eo($n){
$n = intval($n);
return intval($n != 1);
}}

View file

@ -0,0 +1,161 @@
# ADDON advancedcontentfilter
# Copyright (C)
# This file is distributed under the same license as the Friendica advancedcontentfilter addon package.
#
#
#, fuzzy
msgid ""
msgstr ""
"Project-Id-Version: \n"
"Report-Msgid-Bugs-To: \n"
"POT-Creation-Date: 2022-05-11 08:54-0400\n"
"PO-Revision-Date: 2018-05-24 06:41+0000\n"
"Language-Team: Estonian (https://app.transifex.com/Friendica/teams/12172/et/)\n"
"MIME-Version: 1.0\n"
"Content-Type: text/plain; charset=UTF-8\n"
"Content-Transfer-Encoding: 8bit\n"
"Language: et\n"
"Plural-Forms: nplurals=2; plural=(n != 1);\n"
#: advancedcontentfilter.php:154
#, php-format
msgid "Filtered by rule: %s"
msgstr ""
#: advancedcontentfilter.php:170 advancedcontentfilter.php:225
msgid "Advanced Content Filter"
msgstr ""
#: advancedcontentfilter.php:224
msgid "Back to Addon Settings"
msgstr ""
#: advancedcontentfilter.php:226
msgid "Add a Rule"
msgstr ""
#: advancedcontentfilter.php:227
msgid "Help"
msgstr ""
#: advancedcontentfilter.php:228
msgid ""
"Add and manage your personal content filter rules in this screen. Rules have"
" a name and an arbitrary expression that will be matched against post data. "
"For a complete reference of the available operations and variables, check "
"the help page."
msgstr ""
#: advancedcontentfilter.php:229
msgid "Your rules"
msgstr ""
#: advancedcontentfilter.php:230
msgid ""
"You have no rules yet! Start adding one by clicking on the button above next"
" to the title."
msgstr ""
#: advancedcontentfilter.php:231
msgid "Disabled"
msgstr ""
#: advancedcontentfilter.php:232
msgid "Enabled"
msgstr ""
#: advancedcontentfilter.php:233
msgid "Disable this rule"
msgstr ""
#: advancedcontentfilter.php:234
msgid "Enable this rule"
msgstr ""
#: advancedcontentfilter.php:235
msgid "Edit this rule"
msgstr ""
#: advancedcontentfilter.php:236
msgid "Edit the rule"
msgstr ""
#: advancedcontentfilter.php:237
msgid "Save this rule"
msgstr ""
#: advancedcontentfilter.php:238
msgid "Delete this rule"
msgstr ""
#: advancedcontentfilter.php:239
msgid "Rule"
msgstr ""
#: advancedcontentfilter.php:240
msgid "Close"
msgstr ""
#: advancedcontentfilter.php:241
msgid "Add new rule"
msgstr ""
#: advancedcontentfilter.php:242
msgid "Rule Name"
msgstr ""
#: advancedcontentfilter.php:243
msgid "Rule Expression"
msgstr ""
#: advancedcontentfilter.php:244
msgid "Cancel"
msgstr ""
#: advancedcontentfilter.php:295
msgid "This addon requires this node having at least one post"
msgstr ""
#: advancedcontentfilter.php:325 advancedcontentfilter.php:336
#: advancedcontentfilter.php:347 advancedcontentfilter.php:383
#: advancedcontentfilter.php:414 advancedcontentfilter.php:437
msgid "You must be logged in to use this method"
msgstr ""
#: advancedcontentfilter.php:351 advancedcontentfilter.php:387
#: advancedcontentfilter.php:418
msgid "Invalid form security token, please refresh the page."
msgstr ""
#: advancedcontentfilter.php:363
msgid "The rule name and expression are required."
msgstr ""
#: advancedcontentfilter.php:377
msgid "Rule successfully added"
msgstr ""
#: advancedcontentfilter.php:391 advancedcontentfilter.php:422
msgid "Rule doesn't exist or doesn't belong to you."
msgstr ""
#: advancedcontentfilter.php:408
msgid "Rule successfully updated"
msgstr ""
#: advancedcontentfilter.php:431
msgid "Rule successfully deleted"
msgstr ""
#: advancedcontentfilter.php:441
msgid "Missing argument: guid."
msgstr ""
#: advancedcontentfilter.php:449
#, php-format
msgid "Unknown post with guid: %s"
msgstr ""
#: src/middlewares.php:49
msgid "Method not found"
msgstr ""

View file

@ -0,0 +1,7 @@
<?php
if(! function_exists("string_plural_select_et")) {
function string_plural_select_et($n){
$n = intval($n);
return intval($n != 1);
}}

View file

@ -0,0 +1,161 @@
# ADDON advancedcontentfilter
# Copyright (C)
# This file is distributed under the same license as the Friendica advancedcontentfilter addon package.
#
#
#, fuzzy
msgid ""
msgstr ""
"Project-Id-Version: \n"
"Report-Msgid-Bugs-To: \n"
"POT-Creation-Date: 2022-05-11 08:54-0400\n"
"PO-Revision-Date: 2018-05-24 06:41+0000\n"
"Language-Team: Gaelic, Scottish (https://app.transifex.com/Friendica/teams/12172/gd/)\n"
"MIME-Version: 1.0\n"
"Content-Type: text/plain; charset=UTF-8\n"
"Content-Transfer-Encoding: 8bit\n"
"Language: gd\n"
"Plural-Forms: nplurals=4; plural=(n==1 || n==11) ? 0 : (n==2 || n==12) ? 1 : (n > 2 && n < 20) ? 2 : 3;\n"
#: advancedcontentfilter.php:154
#, php-format
msgid "Filtered by rule: %s"
msgstr ""
#: advancedcontentfilter.php:170 advancedcontentfilter.php:225
msgid "Advanced Content Filter"
msgstr ""
#: advancedcontentfilter.php:224
msgid "Back to Addon Settings"
msgstr ""
#: advancedcontentfilter.php:226
msgid "Add a Rule"
msgstr ""
#: advancedcontentfilter.php:227
msgid "Help"
msgstr ""
#: advancedcontentfilter.php:228
msgid ""
"Add and manage your personal content filter rules in this screen. Rules have"
" a name and an arbitrary expression that will be matched against post data. "
"For a complete reference of the available operations and variables, check "
"the help page."
msgstr ""
#: advancedcontentfilter.php:229
msgid "Your rules"
msgstr ""
#: advancedcontentfilter.php:230
msgid ""
"You have no rules yet! Start adding one by clicking on the button above next"
" to the title."
msgstr ""
#: advancedcontentfilter.php:231
msgid "Disabled"
msgstr ""
#: advancedcontentfilter.php:232
msgid "Enabled"
msgstr ""
#: advancedcontentfilter.php:233
msgid "Disable this rule"
msgstr ""
#: advancedcontentfilter.php:234
msgid "Enable this rule"
msgstr ""
#: advancedcontentfilter.php:235
msgid "Edit this rule"
msgstr ""
#: advancedcontentfilter.php:236
msgid "Edit the rule"
msgstr ""
#: advancedcontentfilter.php:237
msgid "Save this rule"
msgstr ""
#: advancedcontentfilter.php:238
msgid "Delete this rule"
msgstr ""
#: advancedcontentfilter.php:239
msgid "Rule"
msgstr ""
#: advancedcontentfilter.php:240
msgid "Close"
msgstr ""
#: advancedcontentfilter.php:241
msgid "Add new rule"
msgstr ""
#: advancedcontentfilter.php:242
msgid "Rule Name"
msgstr ""
#: advancedcontentfilter.php:243
msgid "Rule Expression"
msgstr ""
#: advancedcontentfilter.php:244
msgid "Cancel"
msgstr ""
#: advancedcontentfilter.php:295
msgid "This addon requires this node having at least one post"
msgstr ""
#: advancedcontentfilter.php:325 advancedcontentfilter.php:336
#: advancedcontentfilter.php:347 advancedcontentfilter.php:383
#: advancedcontentfilter.php:414 advancedcontentfilter.php:437
msgid "You must be logged in to use this method"
msgstr ""
#: advancedcontentfilter.php:351 advancedcontentfilter.php:387
#: advancedcontentfilter.php:418
msgid "Invalid form security token, please refresh the page."
msgstr ""
#: advancedcontentfilter.php:363
msgid "The rule name and expression are required."
msgstr ""
#: advancedcontentfilter.php:377
msgid "Rule successfully added"
msgstr ""
#: advancedcontentfilter.php:391 advancedcontentfilter.php:422
msgid "Rule doesn't exist or doesn't belong to you."
msgstr ""
#: advancedcontentfilter.php:408
msgid "Rule successfully updated"
msgstr ""
#: advancedcontentfilter.php:431
msgid "Rule successfully deleted"
msgstr ""
#: advancedcontentfilter.php:441
msgid "Missing argument: guid."
msgstr ""
#: advancedcontentfilter.php:449
#, php-format
msgid "Unknown post with guid: %s"
msgstr ""
#: src/middlewares.php:49
msgid "Method not found"
msgstr ""

View file

@ -0,0 +1,7 @@
<?php
if(! function_exists("string_plural_select_gd")) {
function string_plural_select_gd($n){
$n = intval($n);
if (($n==1 || $n==11)) { return 0; } else if (($n==2 || $n==12)) { return 1; } else if (($n > 2 && $n < 20)) { return 2; } else { return 3; }
}}

View file

@ -0,0 +1,161 @@
# ADDON advancedcontentfilter
# Copyright (C)
# This file is distributed under the same license as the Friendica advancedcontentfilter addon package.
#
#
#, fuzzy
msgid ""
msgstr ""
"Project-Id-Version: \n"
"Report-Msgid-Bugs-To: \n"
"POT-Creation-Date: 2022-05-11 08:54-0400\n"
"PO-Revision-Date: 2018-05-24 06:41+0000\n"
"Language-Team: Icelandic (https://app.transifex.com/Friendica/teams/12172/is/)\n"
"MIME-Version: 1.0\n"
"Content-Type: text/plain; charset=UTF-8\n"
"Content-Transfer-Encoding: 8bit\n"
"Language: is\n"
"Plural-Forms: nplurals=2; plural=(n % 10 != 1 || n % 100 == 11);\n"
#: advancedcontentfilter.php:154
#, php-format
msgid "Filtered by rule: %s"
msgstr ""
#: advancedcontentfilter.php:170 advancedcontentfilter.php:225
msgid "Advanced Content Filter"
msgstr ""
#: advancedcontentfilter.php:224
msgid "Back to Addon Settings"
msgstr ""
#: advancedcontentfilter.php:226
msgid "Add a Rule"
msgstr ""
#: advancedcontentfilter.php:227
msgid "Help"
msgstr ""
#: advancedcontentfilter.php:228
msgid ""
"Add and manage your personal content filter rules in this screen. Rules have"
" a name and an arbitrary expression that will be matched against post data. "
"For a complete reference of the available operations and variables, check "
"the help page."
msgstr ""
#: advancedcontentfilter.php:229
msgid "Your rules"
msgstr ""
#: advancedcontentfilter.php:230
msgid ""
"You have no rules yet! Start adding one by clicking on the button above next"
" to the title."
msgstr ""
#: advancedcontentfilter.php:231
msgid "Disabled"
msgstr ""
#: advancedcontentfilter.php:232
msgid "Enabled"
msgstr ""
#: advancedcontentfilter.php:233
msgid "Disable this rule"
msgstr ""
#: advancedcontentfilter.php:234
msgid "Enable this rule"
msgstr ""
#: advancedcontentfilter.php:235
msgid "Edit this rule"
msgstr ""
#: advancedcontentfilter.php:236
msgid "Edit the rule"
msgstr ""
#: advancedcontentfilter.php:237
msgid "Save this rule"
msgstr ""
#: advancedcontentfilter.php:238
msgid "Delete this rule"
msgstr ""
#: advancedcontentfilter.php:239
msgid "Rule"
msgstr ""
#: advancedcontentfilter.php:240
msgid "Close"
msgstr ""
#: advancedcontentfilter.php:241
msgid "Add new rule"
msgstr ""
#: advancedcontentfilter.php:242
msgid "Rule Name"
msgstr ""
#: advancedcontentfilter.php:243
msgid "Rule Expression"
msgstr ""
#: advancedcontentfilter.php:244
msgid "Cancel"
msgstr ""
#: advancedcontentfilter.php:295
msgid "This addon requires this node having at least one post"
msgstr ""
#: advancedcontentfilter.php:325 advancedcontentfilter.php:336
#: advancedcontentfilter.php:347 advancedcontentfilter.php:383
#: advancedcontentfilter.php:414 advancedcontentfilter.php:437
msgid "You must be logged in to use this method"
msgstr ""
#: advancedcontentfilter.php:351 advancedcontentfilter.php:387
#: advancedcontentfilter.php:418
msgid "Invalid form security token, please refresh the page."
msgstr ""
#: advancedcontentfilter.php:363
msgid "The rule name and expression are required."
msgstr ""
#: advancedcontentfilter.php:377
msgid "Rule successfully added"
msgstr ""
#: advancedcontentfilter.php:391 advancedcontentfilter.php:422
msgid "Rule doesn't exist or doesn't belong to you."
msgstr ""
#: advancedcontentfilter.php:408
msgid "Rule successfully updated"
msgstr ""
#: advancedcontentfilter.php:431
msgid "Rule successfully deleted"
msgstr ""
#: advancedcontentfilter.php:441
msgid "Missing argument: guid."
msgstr ""
#: advancedcontentfilter.php:449
#, php-format
msgid "Unknown post with guid: %s"
msgstr ""
#: src/middlewares.php:49
msgid "Method not found"
msgstr ""

View file

@ -0,0 +1,7 @@
<?php
if(! function_exists("string_plural_select_is")) {
function string_plural_select_is($n){
$n = intval($n);
return intval($n % 10 != 1 || $n % 100 == 11);
}}

View file

@ -6,7 +6,7 @@
# Translators:
# Waldemar Stoczkowski, 2018
# Joe Doe, 2021
# Piotr Strębski <strebski@gmail.com>, 2022
# Bartosz Kozień, 2025
#
#, fuzzy
msgid ""
@ -15,8 +15,8 @@ msgstr ""
"Report-Msgid-Bugs-To: \n"
"POT-Creation-Date: 2022-05-11 08:54-0400\n"
"PO-Revision-Date: 2018-05-24 06:41+0000\n"
"Last-Translator: Piotr Strębski <strebski@gmail.com>, 2022\n"
"Language-Team: Polish (https://www.transifex.com/Friendica/teams/12172/pl/)\n"
"Last-Translator: Bartosz Kozień, 2025\n"
"Language-Team: Polish (https://app.transifex.com/Friendica/teams/12172/pl/)\n"
"MIME-Version: 1.0\n"
"Content-Type: text/plain; charset=UTF-8\n"
"Content-Transfer-Encoding: 8bit\n"
@ -126,7 +126,7 @@ msgstr "Anuluj"
#: advancedcontentfilter.php:295
msgid "This addon requires this node having at least one post"
msgstr "Ten dodatek wymaga, aby ten węzeł miał co najmniej jeden wpis"
msgstr "Ten dodatek wymaga, aby ta instancja miała co najmniej jeden wpis"
#: advancedcontentfilter.php:325 advancedcontentfilter.php:336
#: advancedcontentfilter.php:347 advancedcontentfilter.php:383

View file

@ -27,7 +27,7 @@ $a->strings['Add new rule'] = 'Dodaj nową regułę';
$a->strings['Rule Name'] = 'Nazwa reguły';
$a->strings['Rule Expression'] = 'Wyrażanie reguły';
$a->strings['Cancel'] = 'Anuluj';
$a->strings['This addon requires this node having at least one post'] = 'Ten dodatek wymaga, aby ten węzeł miał co najmniej jeden wpis';
$a->strings['This addon requires this node having at least one post'] = 'Ten dodatek wymaga, aby ta instancja miała co najmniej jeden wpis';
$a->strings['You must be logged in to use this method'] = 'Musisz być zalogowany, aby skorzystać z tej metody';
$a->strings['Invalid form security token, please refresh the page.'] = 'Nieprawidłowy token zabezpieczający formularz, odśwież stronę.';
$a->strings['The rule name and expression are required.'] = 'Nazwa reguły i wyrażenie są wymagane.';

View file

@ -1,32 +0,0 @@
<?php
/**
* @copyright Copyright (C) 2020, Friendica
*
* @license GNU AGPL version 3 or any later version
*
* This program is free software: you can redistribute it and/or modify
* it under the terms of the GNU Affero General Public License as
* published by the Free Software Foundation, either version 3 of the
* License, or (at your option) any later version.
*
* This program is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU Affero General Public License for more details.
*
* You should have received a copy of the GNU Affero General Public License
* along with this program. If not, see <https://www.gnu.org/licenses/>.
*
*/
use Friendica\DI;
/** @var $slim \Slim\App */
/**
* The routing middleware should be added before the ErrorMiddleware
* Otherwise exceptions thrown from it will not be handled
*/
$slim->addRoutingMiddleware();
$errorMiddleware = $slim->addErrorMiddleware(true, true, true, DI::logger());

View file

@ -1,36 +0,0 @@
<?php
/**
* @copyright Copyright (C) 2020, Friendica
*
* @license GNU AGPL version 3 or any later version
*
* This program is free software: you can redistribute it and/or modify
* it under the terms of the GNU Affero General Public License as
* published by the Free Software Foundation, either version 3 of the
* License, or (at your option) any later version.
*
* This program is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU Affero General Public License for more details.
*
* You should have received a copy of the GNU Affero General Public License
* along with this program. If not, see <https://www.gnu.org/licenses/>.
*
*/
/* @var $slim Slim\App */
$slim->group('/advancedcontentfilter/api', function (\Slim\Routing\RouteCollectorProxy $app) {
$app->group('/rules', function (\Slim\Routing\RouteCollectorProxy $app) {
$app->get('', 'advancedcontentfilter_get_rules');
$app->post('', 'advancedcontentfilter_post_rules');
$app->get('/{id}', 'advancedcontentfilter_get_rules_id');
$app->put('/{id}', 'advancedcontentfilter_put_rules_id');
$app->delete('/{id}', 'advancedcontentfilter_delete_rules_id');
});
$app->group('/variables', function (\Slim\Routing\RouteCollectorProxy $app) {
$app->get('/{guid}', 'advancedcontentfilter_get_variables_guid');
});
});

View file

@ -6,6 +6,7 @@
* Author: Stephen Mahood <https://friends.mayfirst.org/profile/marxistvegan>
* Author: Tobias Diekershoff <https://f.diekershoff.de/profile/tobias>
* Author: Matthias Ebers <https://loma.ml/profile/feb>
* Status: Unsupported
*/
use Friendica\Core\Hook;

View file

@ -6,9 +6,7 @@
* Author: Fabio <https://kirgroup.com/profile/fabrixxm>
*/
use Friendica\App;
use Friendica\Core\Hook;
use Friendica\Core\Logger;
use Friendica\Core\Renderer;
use Friendica\Database\DBA;
use Friendica\DI;
@ -28,7 +26,7 @@ function birdavatar_install()
Hook::register('addon_settings', __FILE__, 'birdavatar_addon_settings');
Hook::register('addon_settings_post', __FILE__, 'birdavatar_addon_settings_post');
Logger::info('registered birdavatar');
DI::logger()->info('registered birdavatar');
}
/**

View file

@ -44,9 +44,7 @@
* THE SOFTWARE.
*/
use Friendica\App;
use Friendica\Core\Hook;
use Friendica\Core\Logger;
use Friendica\Core\Renderer;
use Friendica\Core\System;
use Friendica\DI;
@ -78,7 +76,7 @@ function blackout_redirect ($b)
}
if (( $date1 <= $now ) && ( $now <= $date2 )) {
Logger::notice('redirecting user to blackout page');
DI::logger()->notice('redirecting user to blackout page');
System::externalRedirect($myurl);
}
}

View file

@ -0,0 +1,66 @@
# ADDON blackout
# Copyright (C)
# This file is distributed under the same license as the Friendica blackout addon package.
#
#
# Translators:
msgid ""
msgstr ""
"Project-Id-Version: friendica\n"
"Report-Msgid-Bugs-To: \n"
"POT-Creation-Date: 2021-02-01 18:15+0100\n"
"PO-Revision-Date: 2014-06-22 11:19+0000\n"
"Last-Translator: FULL NAME <EMAIL@ADDRESS>\n"
"Language-Team: Bulgarian (http://app.transifex.com/Friendica/friendica/language/bg/)\n"
"MIME-Version: 1.0\n"
"Content-Type: text/plain; charset=UTF-8\n"
"Content-Transfer-Encoding: 8bit\n"
"Language: bg\n"
"Plural-Forms: nplurals=2; plural=(n != 1);\n"
#: blackout.php:97
msgid ""
"The end-date is prior to the start-date of the blackout, you should fix "
"this."
msgstr ""
#: blackout.php:99
#, php-format
msgid ""
"Please double check the current settings for the blackout. It will begin on "
"<strong>%s</strong> and end on <strong>%s</strong>."
msgstr ""
#: blackout.php:102
msgid "Save Settings"
msgstr ""
#: blackout.php:103
msgid "Redirect URL"
msgstr ""
#: blackout.php:103
msgid "All your visitors from the web will be redirected to this URL."
msgstr ""
#: blackout.php:104
msgid "Begin of the Blackout"
msgstr ""
#: blackout.php:104
msgid ""
"Format is <tt>YYYY-MM-DD hh:mm</tt>; <em>YYYY</em> year, <em>MM</em> month, "
"<em>DD</em> day, <em>hh</em> hour and <em>mm</em> minute."
msgstr ""
#: blackout.php:105
msgid "End of the Blackout"
msgstr ""
#: blackout.php:107
msgid ""
"<strong>Note</strong>: The redirect will be active from the moment you press"
" the submit button. Users currently logged in will <strong>not</strong> be "
"thrown out but can't login again after logging out while the blackout is "
"still in place."
msgstr ""

View file

@ -0,0 +1,7 @@
<?php
if(! function_exists("string_plural_select_bg")) {
function string_plural_select_bg($n){
$n = intval($n);
return intval($n != 1);
}}

View file

@ -0,0 +1,66 @@
# ADDON blackout
# Copyright (C)
# This file is distributed under the same license as the Friendica blackout addon package.
#
#
# Translators:
msgid ""
msgstr ""
"Project-Id-Version: friendica\n"
"Report-Msgid-Bugs-To: \n"
"POT-Creation-Date: 2021-02-01 18:15+0100\n"
"PO-Revision-Date: 2014-06-22 11:19+0000\n"
"Last-Translator: FULL NAME <EMAIL@ADDRESS>\n"
"Language-Team: Esperanto (http://app.transifex.com/Friendica/friendica/language/eo/)\n"
"MIME-Version: 1.0\n"
"Content-Type: text/plain; charset=UTF-8\n"
"Content-Transfer-Encoding: 8bit\n"
"Language: eo\n"
"Plural-Forms: nplurals=2; plural=(n != 1);\n"
#: blackout.php:97
msgid ""
"The end-date is prior to the start-date of the blackout, you should fix "
"this."
msgstr ""
#: blackout.php:99
#, php-format
msgid ""
"Please double check the current settings for the blackout. It will begin on "
"<strong>%s</strong> and end on <strong>%s</strong>."
msgstr ""
#: blackout.php:102
msgid "Save Settings"
msgstr ""
#: blackout.php:103
msgid "Redirect URL"
msgstr ""
#: blackout.php:103
msgid "All your visitors from the web will be redirected to this URL."
msgstr ""
#: blackout.php:104
msgid "Begin of the Blackout"
msgstr ""
#: blackout.php:104
msgid ""
"Format is <tt>YYYY-MM-DD hh:mm</tt>; <em>YYYY</em> year, <em>MM</em> month, "
"<em>DD</em> day, <em>hh</em> hour and <em>mm</em> minute."
msgstr ""
#: blackout.php:105
msgid "End of the Blackout"
msgstr ""
#: blackout.php:107
msgid ""
"<strong>Note</strong>: The redirect will be active from the moment you press"
" the submit button. Users currently logged in will <strong>not</strong> be "
"thrown out but can't login again after logging out while the blackout is "
"still in place."
msgstr ""

View file

@ -1,3 +1,7 @@
<?php
$a->strings["Submit"] = "Sendi";
<?php
if(! function_exists("string_plural_select_eo")) {
function string_plural_select_eo($n){
$n = intval($n);
return intval($n != 1);
}}

View file

@ -0,0 +1,66 @@
# ADDON blackout
# Copyright (C)
# This file is distributed under the same license as the Friendica blackout addon package.
#
#
# Translators:
msgid ""
msgstr ""
"Project-Id-Version: friendica\n"
"Report-Msgid-Bugs-To: \n"
"POT-Creation-Date: 2021-02-01 18:15+0100\n"
"PO-Revision-Date: 2014-06-22 11:19+0000\n"
"Last-Translator: FULL NAME <EMAIL@ADDRESS>\n"
"Language-Team: Estonian (http://app.transifex.com/Friendica/friendica/language/et/)\n"
"MIME-Version: 1.0\n"
"Content-Type: text/plain; charset=UTF-8\n"
"Content-Transfer-Encoding: 8bit\n"
"Language: et\n"
"Plural-Forms: nplurals=2; plural=(n != 1);\n"
#: blackout.php:97
msgid ""
"The end-date is prior to the start-date of the blackout, you should fix "
"this."
msgstr ""
#: blackout.php:99
#, php-format
msgid ""
"Please double check the current settings for the blackout. It will begin on "
"<strong>%s</strong> and end on <strong>%s</strong>."
msgstr ""
#: blackout.php:102
msgid "Save Settings"
msgstr ""
#: blackout.php:103
msgid "Redirect URL"
msgstr ""
#: blackout.php:103
msgid "All your visitors from the web will be redirected to this URL."
msgstr ""
#: blackout.php:104
msgid "Begin of the Blackout"
msgstr ""
#: blackout.php:104
msgid ""
"Format is <tt>YYYY-MM-DD hh:mm</tt>; <em>YYYY</em> year, <em>MM</em> month, "
"<em>DD</em> day, <em>hh</em> hour and <em>mm</em> minute."
msgstr ""
#: blackout.php:105
msgid "End of the Blackout"
msgstr ""
#: blackout.php:107
msgid ""
"<strong>Note</strong>: The redirect will be active from the moment you press"
" the submit button. Users currently logged in will <strong>not</strong> be "
"thrown out but can't login again after logging out while the blackout is "
"still in place."
msgstr ""

View file

@ -0,0 +1,7 @@
<?php
if(! function_exists("string_plural_select_et")) {
function string_plural_select_et($n){
$n = intval($n);
return intval($n != 1);
}}

View file

@ -0,0 +1,66 @@
# ADDON blackout
# Copyright (C)
# This file is distributed under the same license as the Friendica blackout addon package.
#
#
# Translators:
msgid ""
msgstr ""
"Project-Id-Version: friendica\n"
"Report-Msgid-Bugs-To: \n"
"POT-Creation-Date: 2021-02-01 18:15+0100\n"
"PO-Revision-Date: 2014-06-22 11:19+0000\n"
"Last-Translator: FULL NAME <EMAIL@ADDRESS>\n"
"Language-Team: Gaelic, Scottish (http://app.transifex.com/Friendica/friendica/language/gd/)\n"
"MIME-Version: 1.0\n"
"Content-Type: text/plain; charset=UTF-8\n"
"Content-Transfer-Encoding: 8bit\n"
"Language: gd\n"
"Plural-Forms: nplurals=4; plural=(n==1 || n==11) ? 0 : (n==2 || n==12) ? 1 : (n > 2 && n < 20) ? 2 : 3;\n"
#: blackout.php:97
msgid ""
"The end-date is prior to the start-date of the blackout, you should fix "
"this."
msgstr ""
#: blackout.php:99
#, php-format
msgid ""
"Please double check the current settings for the blackout. It will begin on "
"<strong>%s</strong> and end on <strong>%s</strong>."
msgstr ""
#: blackout.php:102
msgid "Save Settings"
msgstr ""
#: blackout.php:103
msgid "Redirect URL"
msgstr ""
#: blackout.php:103
msgid "All your visitors from the web will be redirected to this URL."
msgstr ""
#: blackout.php:104
msgid "Begin of the Blackout"
msgstr ""
#: blackout.php:104
msgid ""
"Format is <tt>YYYY-MM-DD hh:mm</tt>; <em>YYYY</em> year, <em>MM</em> month, "
"<em>DD</em> day, <em>hh</em> hour and <em>mm</em> minute."
msgstr ""
#: blackout.php:105
msgid "End of the Blackout"
msgstr ""
#: blackout.php:107
msgid ""
"<strong>Note</strong>: The redirect will be active from the moment you press"
" the submit button. Users currently logged in will <strong>not</strong> be "
"thrown out but can't login again after logging out while the blackout is "
"still in place."
msgstr ""

View file

@ -0,0 +1,7 @@
<?php
if(! function_exists("string_plural_select_gd")) {
function string_plural_select_gd($n){
$n = intval($n);
if (($n==1 || $n==11)) { return 0; } else if (($n==2 || $n==12)) { return 1; } else if (($n > 2 && $n < 20)) { return 2; } else { return 3; }
}}

View file

@ -11,7 +11,6 @@
use Friendica\Core\Hook;
use Friendica\DI;
use Jaybizzle\CrawlerDetect\CrawlerDetect;
use Friendica\Core\Logger;
use Friendica\Core\Renderer;
use Friendica\Core\System;
use Friendica\Network\HTTPException\ForbiddenException;
@ -70,7 +69,7 @@ function blockbot_init_1()
}
if (empty($parts)) {
Logger::debug('Known frontend found - accept', $logdata);
DI::logger()->debug('Known frontend found - accept', $logdata);
if ($isCrawler) {
blockbot_save('badly-parsed-agents', $_SERVER['HTTP_USER_AGENT']);
}
@ -80,66 +79,66 @@ function blockbot_init_1()
blockbot_log_activitypub($_SERVER['REQUEST_URI'], $_SERVER['HTTP_USER_AGENT']);
if (blockbot_is_crawler($parts)) {
Logger::debug('Crawler found - reject', $logdata);
DI::logger()->debug('Crawler found - reject', $logdata);
blockbot_reject();
}
if (blockbot_is_searchbot($parts)) {
Logger::debug('Search bot found - reject', $logdata);
DI::logger()->debug('Search bot found - reject', $logdata);
blockbot_reject();
}
if (blockbot_is_unwanted($parts)) {
Logger::debug('Uncategorized unwanted agent found - reject', $logdata);
DI::logger()->debug('Uncategorized unwanted agent found - reject', $logdata);
blockbot_reject();
}
if (blockbot_is_security_checker($parts)) {
if (!DI::config()->get('blockbot', 'security_checker')) {
Logger::debug('Security checker found - reject', $logdata);
DI::logger()->debug('Security checker found - reject', $logdata);
blockbot_reject();
}
Logger::debug('Security checker found - accept', $logdata);
DI::logger()->debug('Security checker found - accept', $logdata);
return;
}
if (blockbot_is_social_media($parts)) {
Logger::debug('Social media service found - accept', $logdata);
DI::logger()->debug('Social media service found - accept', $logdata);
return;
}
if (blockbot_is_fediverse_client($parts)) {
Logger::debug('Fediverse client found - accept', $logdata);
DI::logger()->debug('Fediverse client found - accept', $logdata);
return;
}
if (blockbot_is_feed_reader($parts)) {
Logger::debug('Feed reader found - accept', $logdata);
DI::logger()->debug('Feed reader found - accept', $logdata);
return;
}
if (blockbot_is_fediverse_tool($parts)) {
Logger::debug('Fediverse tool found - accept', $logdata);
DI::logger()->debug('Fediverse tool found - accept', $logdata);
return;
}
if (blockbot_is_service_agent($parts)) {
Logger::debug('Service agent found - accept', $logdata);
DI::logger()->debug('Service agent found - accept', $logdata);
return;
}
if (blockbot_is_monitor($parts)) {
Logger::debug('Monitoring service found - accept', $logdata);
DI::logger()->debug('Monitoring service found - accept', $logdata);
return;
}
if (blockbot_is_validator($parts)) {
Logger::debug('Validation service found - accept', $logdata);
DI::logger()->debug('Validation service found - accept', $logdata);
return;
}
if (blockbot_is_good_tool($parts)) {
Logger::debug('Uncategorized helpful service found - accept', $logdata);
DI::logger()->debug('Uncategorized helpful service found - accept', $logdata);
return;
}
@ -147,10 +146,10 @@ function blockbot_init_1()
if (blockbot_is_http_library($parts)) {
blockbot_check_login_attempt($_SERVER['REQUEST_URI'], $logdata);
if (!DI::config()->get('blockbot', 'http_libraries')) {
Logger::debug('HTTP Library found - reject', $logdata);
DI::logger()->debug('HTTP Library found - reject', $logdata);
blockbot_reject();
}
Logger::debug('HTTP Library found - accept', $logdata);
DI::logger()->debug('HTTP Library found - accept', $logdata);
return;
}
@ -161,12 +160,12 @@ function blockbot_init_1()
if (!$isCrawler) {
blockbot_save('good-agents', $_SERVER['HTTP_USER_AGENT']);
Logger::debug('Non-bot user agent detected', $logdata);
DI::logger()->debug('Non-bot user agent detected', $logdata);
return;
}
blockbot_save('bad-agents', $_SERVER['HTTP_USER_AGENT']);
Logger::notice('Possible bot found - reject', $logdata);
DI::logger()->notice('Possible bot found - reject', $logdata);
blockbot_reject();
}
@ -209,7 +208,7 @@ function blockbot_log_activitypub(string $url, string $agent)
blockbot_save('activitypub-inbox-agents', $agent);
}
if (!empty($_SERVER['HTTP_SIGNATURE']) && !empty(HTTPSignature::getSigner('', $_SERVER))) {
if (!empty($_SERVER['HTTP_SIGNATURE']) && !empty(HTTPSignature::getSigner('', $_SERVER, false))) {
blockbot_save('activitypub-signature-agents', $agent);
}
}
@ -217,7 +216,7 @@ function blockbot_log_activitypub(string $url, string $agent)
function blockbot_check_login_attempt(string $url, array $logdata)
{
if (in_array(trim(parse_url($url, PHP_URL_PATH), '/'), ['login', 'lostpass', 'register'])) {
Logger::debug('Login attempt detected - reject', $logdata);
DI::logger()->debug('Login attempt detected - reject', $logdata);
blockbot_reject();
}
}
@ -443,7 +442,7 @@ function blockbot_is_monitor(array $parts): bool
}
/**
* Services in the centralized and decentralized social media environment
* Services in the centralized and decentralized social media environment
*
* @param array $parts
* @return boolean

View file

@ -1,7 +1,7 @@
<?php
/**
* Name: Bluesky Connector
* Description: Post to Bluesky, import timelines and feeds
* Name: AT Protocol Connector (Bluesky, Eurosky, Blacksky, ...)
* Description: Post via AT Protocol, import timelines and feeds
* Version: 1.1
* Author: Michael Vogel <https://pirati.ca/profile/heluecht>
*
@ -30,7 +30,6 @@ use Friendica\Content\Text\Plaintext;
use Friendica\Core\Cache\Enum\Duration;
use Friendica\Core\Config\Util\ConfigFileManager;
use Friendica\Core\Hook;
use Friendica\Core\Logger;
use Friendica\Core\Protocol;
use Friendica\Core\Renderer;
use Friendica\Core\Worker;
@ -47,6 +46,7 @@ use Friendica\Protocol\Activity;
use Friendica\Protocol\ATProtocol;
use Friendica\Protocol\Relay;
use Friendica\Util\DateTimeFormat;
use Friendica\Util\ParseUrl;
use Friendica\Util\Strings;
const BLUESKY_DEFAULT_POLL_INTERVAL = 10; // given in minutes
@ -73,7 +73,7 @@ function bluesky_install()
function bluesky_load_config(ConfigFileManager $loader)
{
DI::app()->getConfigCache()->load($loader->loadAddonConfig('bluesky'), \Friendica\Core\Config\ValueObject\Cache::SOURCE_STATIC);
DI::appHelper()->getConfigCache()->load($loader->loadAddonConfig('bluesky'), \Friendica\Core\Config\ValueObject\Cache::SOURCE_STATIC);
}
function bluesky_check_item_notification(array &$notification_data)
@ -82,6 +82,8 @@ function bluesky_check_item_notification(array &$notification_data)
return;
}
DI::atProtocol()->setApiForUser($notification_data['uid']);
$did = DI::atProtocol()->getUserDid($notification_data['uid']);
if (empty($did)) {
return;
@ -97,25 +99,17 @@ function bluesky_item_by_link(array &$hookData)
return;
}
if (substr($hookData['uri'], 0, 5) != 'at://') {
if (!preg_match('#^' . ATProtocol::WEB . '/profile/(.+)/post/(.+)#', $hookData['uri'], $matches)) {
return;
}
DI::atProtocol()->setApiForUser($hookData['uid']);
$did = DI::atProtocol()->getDid($matches[1]);
if (empty($did)) {
return;
}
Logger::debug('Found bluesky post', ['uri' => $hookData['uri'], 'did' => $did, 'cid' => $matches[2]]);
$uri = 'at://' . $did . '/app.bsky.feed.post/' . $matches[2];
if (!str_starts_with($hookData['uri'], 'at://')) {
$data = ParseUrl::getSiteinfoCached($hookData['uri']);
$uri = $data['atprotocol']['uri'] ?? '';
} else {
$uri = $hookData['uri'];
}
$uri = DI::atpProcessor()->fetchMissingPost($uri, $hookData['uid'], Item::PR_FETCHED, 0, 0);
Logger::debug('Got post', ['uri' => $uri]);
$uri = DI::atpProcessor()->fetchMissingPost($uri, $hookData['uid'], Item::PR_FETCHED, 0, 0, '', false, Conversation::PARCEL_CONNECTOR);
DI::logger()->debug('Got post', ['uri' => $uri]);
if (!empty($uri)) {
$item = Post::selectFirst(['id'], ['uri' => $uri, 'uid' => $hookData['uid']]);
if (!empty($item['id'])) {
@ -126,20 +120,22 @@ function bluesky_item_by_link(array &$hookData)
function bluesky_support_follow(array &$data)
{
if ($data['protocol'] == Protocol::BLUESKY) {
if ($data['protocol'] == Protocol::ATPROTO) {
$data['result'] = true;
}
}
function bluesky_follow(array &$hook_data)
{
DI::atProtocol()->setApiForUser($hook_data['uid']);
$token = DI::atProtocol()->getUserToken($hook_data['uid']);
if (empty($token)) {
return;
}
Logger::debug('Check if contact is bluesky', ['data' => $hook_data]);
$contact = DBA::selectFirst('contact', [], ['network' => Protocol::BLUESKY, 'url' => $hook_data['url'], 'uid' => [0, $hook_data['uid']]]);
DI::logger()->debug('Check if contact is AT Protocol', ['data' => $hook_data]);
$contact = DBA::selectFirst('contact', [], ['network' => Protocol::ATPROTO, 'nurl' => Strings::normaliseLink($hook_data['url']), 'uid' => [0, $hook_data['uid']]]);
if (empty($contact)) {
return;
}
@ -159,18 +155,20 @@ function bluesky_follow(array &$hook_data)
$activity = DI::atProtocol()->XRPCPost($hook_data['uid'], 'com.atproto.repo.createRecord', $post);
if (!empty($activity->uri)) {
$hook_data['contact'] = $contact;
Logger::debug('Successfully start following', ['url' => $contact['url'], 'uri' => $activity->uri]);
DI::logger()->debug('Successfully start following', ['url' => $contact['url'], 'uri' => $activity->uri]);
}
}
function bluesky_unfollow(array &$hook_data)
{
DI::atProtocol()->setApiForUser($hook_data['uid']);
$token = DI::atProtocol()->getUserToken($hook_data['uid']);
if (empty($token)) {
return;
}
if ($hook_data['contact']['network'] != Protocol::BLUESKY) {
if ($hook_data['contact']['network'] != Protocol::ATPROTO) {
return;
}
@ -186,12 +184,14 @@ function bluesky_unfollow(array &$hook_data)
function bluesky_block(array &$hook_data)
{
DI::atProtocol()->setApiForUser($hook_data['uid']);
$token = DI::atProtocol()->getUserToken($hook_data['uid']);
if (empty($token)) {
return;
}
if ($hook_data['contact']['network'] != Protocol::BLUESKY) {
if ($hook_data['contact']['network'] != Protocol::ATPROTO) {
return;
}
@ -213,18 +213,20 @@ function bluesky_block(array &$hook_data)
if ($ucid) {
Contact::remove($ucid);
}
Logger::debug('Successfully blocked contact', ['url' => $hook_data['contact']['url'], 'uri' => $activity->uri]);
DI::logger()->debug('Successfully blocked contact', ['url' => $hook_data['contact']['url'], 'uri' => $activity->uri]);
}
}
function bluesky_unblock(array &$hook_data)
{
DI::atProtocol()->setApiForUser($hook_data['uid']);
$token = DI::atProtocol()->getUserToken($hook_data['uid']);
if (empty($token)) {
return;
}
if ($hook_data['contact']['network'] != Protocol::BLUESKY) {
if ($hook_data['contact']['network'] != Protocol::ATPROTO) {
return;
}
@ -244,7 +246,7 @@ function bluesky_addon_admin(string &$o)
$o = Renderer::replaceMacros($t, [
'$submit' => DI::l10n()->t('Save Settings'),
'$friendica_handles' => ['friendica_handles', DI::l10n()->t('Allow your users to use your hostname for their Bluesky handles'), DI::config()->get('bluesky', 'friendica_handles'), DI::l10n()->t('Before enabling this option, you have to setup a wildcard domain configuration and you have to enable wildcard requests in your webserver configuration. On Apache this is done by adding "ServerAlias *.%s" to your HTTP configuration. You don\'t need to change the HTTPS configuration.', DI::baseUrl()->getHost())],
'$friendica_handles' => ['friendica_handles', DI::l10n()->t('Allow your users to use your hostname for their AT Protocol handles'), DI::config()->get('bluesky', 'friendica_handles'), DI::l10n()->t('Before enabling this option, you have to setup a wildcard domain configuration and you have to enable wildcard requests in your webserver configuration. On Apache this is done by adding "ServerAlias *.%s" to your HTTP configuration. You don\'t need to change the HTTPS configuration.', DI::baseUrl()->getHost())],
]);
}
@ -259,10 +261,13 @@ function bluesky_settings(array &$data)
return;
}
DI::atProtocol()->setApiForUser(DI::userSession()->getLocalUserId());
$enabled = DI::pConfig()->get(DI::userSession()->getLocalUserId(), 'bluesky', 'post') ?? false;
$def_enabled = DI::pConfig()->get(DI::userSession()->getLocalUserId(), 'bluesky', 'post_by_default') ?? false;
$pds = DI::pConfig()->get(DI::userSession()->getLocalUserId(), 'bluesky', 'pds');
$handle = DI::pConfig()->get(DI::userSession()->getLocalUserId(), 'bluesky', 'handle');
$web = DI::pConfig()->get(DI::userSession()->getLocalUserId(), 'bluesky', 'web');
$did = DI::atProtocol()->getUserDid(DI::userSession()->getLocalUserId());
$token = DI::pConfig()->get(DI::userSession()->getLocalUserId(), 'bluesky', 'access_token');
$import = DI::pConfig()->get(DI::userSession()->getLocalUserId(), 'bluesky', 'import') ?? false;
@ -273,7 +278,7 @@ function bluesky_settings(array &$data)
if (DI::config()->get('bluesky', 'friendica_handles')) {
$self = User::getById(DI::userSession()->getLocalUserId(), ['nickname']);
$host_handle = $self['nickname'] . '.' . DI::baseUrl()->getHost();
$friendica_handle = ['bluesky_friendica_handle', DI::l10n()->t('Allow to use %s as your Bluesky handle.', $host_handle), $custom_handle, DI::l10n()->t('When enabled, you can use %s as your Bluesky handle. After you enabled this option, please go to https://bsky.app/settings and select to change your handle. Select that you have got your own domain. Then enter %s and select "No DNS Panel". Then select "Verify Text File".', $host_handle, $host_handle)];
$friendica_handle = ['bluesky_friendica_handle', DI::l10n()->t('Allow to use %s as your AT Protocol handle.', $host_handle), $custom_handle, DI::l10n()->t('When enabled, you can use %s as your AT Protocol handle. After you enabled this option, please go to https://bsky.app/settings and select to change your handle. Select that you have got your own domain. Then enter %s and select "No DNS Panel". Then select "Verify Text File".', $host_handle, $host_handle)];
if ($custom_handle) {
$handle = $host_handle;
}
@ -281,25 +286,31 @@ function bluesky_settings(array &$data)
$friendica_handle = [];
}
$web_frontend = ['' => 'System Default'];
foreach (DI::config()->get('atprotocol', 'frontends') as $key => $frontend) {
$web_frontend[$key] = $frontend[0];
}
$t = Renderer::getMarkupTemplate('connector_settings.tpl', 'addon/bluesky/');
$html = Renderer::replaceMacros($t, [
'$enable' => ['bluesky', DI::l10n()->t('Enable Bluesky Post Addon'), $enabled],
'$bydefault' => ['bluesky_bydefault', DI::l10n()->t('Post to Bluesky by default'), $def_enabled],
'$enable' => ['bluesky', DI::l10n()->t('Enable AT Protocol Addon'), $enabled],
'$bydefault' => ['bluesky_bydefault', DI::l10n()->t('Post via AT Protocol by default'), $def_enabled],
'$import' => ['bluesky_import', DI::l10n()->t('Import the remote timeline'), $import],
'$import_feeds' => ['bluesky_import_feeds', DI::l10n()->t('Import the pinned feeds'), $import_feeds, DI::l10n()->t('When activated, Posts will be imported from all the feeds that you pinned in Bluesky.')],
'$import_feeds' => ['bluesky_import_feeds', DI::l10n()->t('Import the pinned feeds'), $import_feeds, DI::l10n()->t('When activated, Posts will be imported from all the feeds that you pinned in AT Protocol.')],
'$complete_threads' => ['bluesky_complete_threads', DI::l10n()->t('Complete the threads'), $complete_threads, DI::l10n()->t('When activated, the system fetches additional replies for the posts in the timeline. This leads to more complete threads.')],
'$custom_handle' => $friendica_handle,
'$pds' => ['bluesky_pds', DI::l10n()->t('Personal Data Server'), $pds, DI::l10n()->t('The personal data server (PDS) is the system that hosts your profile.'), '', 'readonly'],
'$handle' => ['bluesky_handle', DI::l10n()->t('Bluesky handle'), $handle, '', '', $custom_handle ? 'readonly' : ''],
'$did' => ['bluesky_did', DI::l10n()->t('Bluesky DID'), $did, DI::l10n()->t('This is the unique identifier. It will be fetched automatically, when the handle is entered.'), '', 'readonly'],
'$password' => ['bluesky_password', DI::l10n()->t('Bluesky app password'), '', DI::l10n()->t("Please don't add your real password here, but instead create a specific app password in the Bluesky settings.")],
'$handle' => ['bluesky_handle', DI::l10n()->t('AT Protocol handle'), $handle, '', '', $custom_handle ? 'readonly' : ''],
'$did' => ['bluesky_did', DI::l10n()->t('AT Protocol DID'), $did, DI::l10n()->t('This is the unique identifier. It will be fetched automatically, when the handle is entered.'), '', 'readonly'],
'$password' => ['bluesky_password', DI::l10n()->t('AT Protocol app password'), '', DI::l10n()->t("Please don't add your real password here, but instead create a specific app password in the settings of your AT Protocol system.")],
'$web' => ['bluesky_web', DI::l10n()->t('Web front end'), $web, DI::l10n()->t('Choose your preferred external web front end for displaying posts and profiles.'), $web_frontend, ''],
'$status' => bluesky_get_status($handle, $did, $pds, $token),
]);
$data = [
'connector' => 'bluesky',
'title' => DI::l10n()->t('Bluesky Import/Export'),
'image' => 'images/bluesky.jpg',
'title' => DI::l10n()->t('AT Protocol (Bluesky, Eurosky, Blacksky, ...) Import/Export'),
'image' => 'images/500px-AT_Protocol_logo.png',
'enabled' => $enabled,
'html' => $html,
];
@ -329,7 +340,7 @@ function bluesky_get_status(string $handle = null, string $did = null, string $p
switch ($status) {
case ATProtocol::STATUS_TOKEN_OK:
return DI::l10n()->t("You are authenticated to Bluesky. For security reasons the password isn't stored.");
return DI::l10n()->t("You are authenticated to the AT Protocol PDS. For security reasons the password isn't stored.");
case ATProtocol::STATUS_SUCCESS:
return DI::l10n()->t('The communication with the personal data server service (PDS) is established.');
case ATProtocol::STATUS_API_FAIL;
@ -351,6 +362,8 @@ function bluesky_settings_post(array &$b)
return;
}
DI::atProtocol()->setApiForUser(DI::userSession()->getLocalUserId());
$old_pds = DI::pConfig()->get(DI::userSession()->getLocalUserId(), 'bluesky', 'pds');
$old_handle = DI::pConfig()->get(DI::userSession()->getLocalUserId(), 'bluesky', 'handle');
$old_did = DI::pConfig()->get(DI::userSession()->getLocalUserId(), 'bluesky', 'did');
@ -364,6 +377,11 @@ function bluesky_settings_post(array &$b)
DI::pConfig()->set(DI::userSession()->getLocalUserId(), 'bluesky', 'import_feeds', intval($_POST['bluesky_import_feeds']));
DI::pConfig()->set(DI::userSession()->getLocalUserId(), 'bluesky', 'complete_threads', intval($_POST['bluesky_complete_threads']));
DI::pConfig()->set(DI::userSession()->getLocalUserId(), 'bluesky', 'friendica_handle', intval($_POST['bluesky_friendica_handle'] ?? false));
if ($_POST['bluesky_web'] <> '') {
DI::pConfig()->set(DI::userSession()->getLocalUserId(), 'bluesky', 'web', $_POST['bluesky_web']);
} else {
DI::pConfig()->delete(DI::userSession()->getLocalUserId(), 'bluesky', 'web');
}
if (!empty($handle)) {
$did = DI::atProtocol()->getUserDid(DI::userSession()->getLocalUserId(), empty($old_did) || $old_handle != $handle);
@ -402,7 +420,7 @@ function bluesky_jot_nets(array &$jotnets_fields)
'type' => 'checkbox',
'field' => [
'bluesky_enable',
DI::l10n()->t('Post to Bluesky'),
DI::l10n()->t('Post via the AT Protocol'),
DI::pConfig()->get(DI::userSession()->getLocalUserId(), 'bluesky', 'post_by_default')
]
];
@ -421,11 +439,11 @@ function bluesky_cron()
if ($last) {
$next = $last + ($poll_interval * 60);
if ($next > time()) {
Logger::notice('poll interval not reached');
DI::logger()->notice('poll interval not reached');
return;
}
}
Logger::notice('cron_start');
DI::logger()->notice('cron_start');
$abandon_days = intval(DI::config()->get('system', 'account_abandon_days'));
if ($abandon_days < 1) {
@ -436,20 +454,22 @@ function bluesky_cron()
$pconfigs = DBA::selectToArray('pconfig', [], ["`cat` = ? AND `k` IN (?, ?) AND `v`", 'bluesky', 'import', 'import_feeds']);
foreach ($pconfigs as $pconfig) {
DI::atProtocol()->setApiForUser($pconfig['uid']);
if (empty(DI::atProtocol()->getUserDid($pconfig['uid']))) {
Logger::debug('User has got no valid DID', ['uid' => $pconfig['uid']]);
DI::logger()->debug('User has got no valid DID', ['uid' => $pconfig['uid']]);
continue;
}
if ($abandon_days != 0) {
if (!DBA::exists('user', ["`uid` = ? AND `login_date` >= ?", $pconfig['uid'], $abandon_limit])) {
Logger::notice('abandoned account: timeline from user will not be imported', ['user' => $pconfig['uid']]);
DI::logger()->notice('abandoned account: timeline from user will not be imported', ['user' => $pconfig['uid']]);
continue;
}
}
// Refresh the token now, so that it doesn't need to be refreshed in parallel by the following workers
Logger::debug('Refresh the token', ['uid' => $pconfig['uid']]);
DI::logger()->debug('Refresh the token', ['uid' => $pconfig['uid']]);
DI::atProtocol()->getUserToken($pconfig['uid']);
$last_sync = DI::pConfig()->get($pconfig['uid'], 'bluesky', 'last_contact_sync');
@ -463,32 +483,32 @@ function bluesky_cron()
Worker::add(['priority' => Worker::PRIORITY_MEDIUM, 'force_priority' => true], 'addon/bluesky/bluesky_timeline.php', $pconfig['uid']);
}
if (DI::pConfig()->get($pconfig['uid'], 'bluesky', 'import_feeds')) {
Logger::debug('Fetch feeds for user', ['uid' => $pconfig['uid']]);
DI::logger()->debug('Fetch feeds for user', ['uid' => $pconfig['uid']]);
$feeds = bluesky_get_feeds($pconfig['uid']);
foreach ($feeds as $feed) {
Worker::add(['priority' => Worker::PRIORITY_MEDIUM, 'force_priority' => true], 'addon/bluesky/bluesky_feed.php', $pconfig['uid'], $feed);
}
}
Logger::debug('Polling done for user', ['uid' => $pconfig['uid']]);
DI::logger()->debug('Polling done for user', ['uid' => $pconfig['uid']]);
}
Logger::notice('Polling done for all users');
DI::logger()->notice('Polling done for all users');
DI::keyValue()->set('bluesky_last_poll', time());
$last_clean = DI::keyValue()->get('bluesky_last_clean');
if (empty($last_clean) || ($last_clean + 86400 < time())) {
Logger::notice('Start contact cleanup');
$contacts = DBA::select('account-user-view', ['id', 'pid'], ["`network` = ? AND `uid` != ? AND `rel` = ?", Protocol::BLUESKY, 0, Contact::NOTHING]);
DI::logger()->notice('Start contact cleanup');
$contacts = DBA::select('account-user-view', ['id', 'pid'], ["`network` = ? AND `uid` != ? AND `rel` = ?", Protocol::ATPROTO, 0, Contact::NOTHING]);
while ($contact = DBA::fetch($contacts)) {
Worker::add(Worker::PRIORITY_LOW, 'MergeContact', $contact['pid'], $contact['id'], 0);
}
DBA::close($contacts);
DI::keyValue()->set('bluesky_last_clean', time());
Logger::notice('Contact cleanup done');
DI::logger()->notice('Contact cleanup done');
}
Logger::notice('cron_end');
DI::logger()->notice('cron_end');
}
function bluesky_hook_fork(array &$b)
@ -506,9 +526,9 @@ function bluesky_hook_fork(array &$b)
}
if (DI::pConfig()->get($post['uid'], 'bluesky', 'import')) {
// Don't post if it isn't a reply to a bluesky post
if (($post['gravity'] != Item::GRAVITY_PARENT) && !Post::exists(['id' => $post['parent'], 'network' => Protocol::BLUESKY])) {
Logger::notice('No bluesky parent found', ['item' => $post['id']]);
// Don't post if it isn't a reply to an AT Protocol post
if (($post['gravity'] != Item::GRAVITY_PARENT) && !Post::exists(['id' => $post['parent'], 'network' => Protocol::ATPROTO])) {
DI::logger()->notice('No AT Protocol parent found', ['item' => $post['id']]);
$b['execute'] = false;
return;
}
@ -550,17 +570,23 @@ function bluesky_post_local(array &$b)
function bluesky_send(array &$b)
{
DI::atProtocol()->setApiForUser($b['uid']);
if (($b['created'] !== $b['edited']) && !$b['deleted']) {
return;
}
if (Item::isGroupPost($b['uri-id'])) {
return;
}
if ($b['gravity'] != Item::GRAVITY_PARENT) {
Logger::debug('Got comment', ['item' => $b]);
DI::logger()->debug('Got comment', ['item' => $b]);
if ($b['deleted']) {
$uri = DI::atpProcessor()->getUriClass($b['uri']);
if (empty($uri)) {
Logger::debug('Not a bluesky post', ['uri' => $b['uri']]);
DI::logger()->debug('Not an AT Protocol post', ['uri' => $b['uri']]);
return;
}
bluesky_delete_post($b['uri'], $b['uid']);
@ -571,12 +597,12 @@ function bluesky_send(array &$b)
$parent = DI::atpProcessor()->getUriClass($b['thr-parent']);
if (empty($root) || empty($parent)) {
Logger::debug('No bluesky post', ['parent' => $b['parent'], 'thr-parent' => $b['thr-parent']]);
DI::logger()->debug('No AT Protocol post', ['parent' => $b['parent'], 'thr-parent' => $b['thr-parent']]);
return;
}
if ($b['gravity'] == Item::GRAVITY_COMMENT) {
Logger::debug('Posting comment', ['root' => $root, 'parent' => $parent]);
DI::logger()->debug('Posting comment', ['root' => $root, 'parent' => $parent]);
bluesky_create_post($b, $root, $parent);
return;
} elseif (in_array($b['verb'], [Activity::LIKE, Activity::ANNOUNCE])) {
@ -590,9 +616,11 @@ function bluesky_send(array &$b)
bluesky_create_post($b);
}
function bluesky_create_activity(array $item, stdClass $parent = null)
function bluesky_create_activity(array $item, ?stdClass $parent = null)
{
$uid = $item['uid'];
DI::atProtocol()->setApiForUser($uid);
$token = DI::atProtocol()->getUserToken($uid);
if (empty($token)) {
return;
@ -603,6 +631,8 @@ function bluesky_create_activity(array $item, stdClass $parent = null)
return;
}
$post = [];
if ($item['verb'] == Activity::LIKE) {
$record = [
'subject' => $parent,
@ -633,15 +663,17 @@ function bluesky_create_activity(array $item, stdClass $parent = null)
if (empty($activity->uri)) {
return;
}
Logger::debug('Activity done', ['return' => $activity]);
DI::logger()->debug('Activity done', ['return' => $activity]);
$uri = DI::atpProcessor()->getUri($activity);
Item::update(['extid' => $uri], ['guid' => $item['guid']]);
Logger::debug('Set extid', ['id' => $item['id'], 'extid' => $activity]);
DI::logger()->debug('Set extid', ['id' => $item['id'], 'extid' => $activity]);
}
function bluesky_create_post(array $item, stdClass $root = null, stdClass $parent = null)
{
$uid = $item['uid'];
DI::atProtocol()->setApiForUser($uid);
$token = DI::atProtocol()->getUserToken($uid);
if (empty($token)) {
return;
@ -671,10 +703,12 @@ function bluesky_create_post(array $item, stdClass $root = null, stdClass $paren
}
}
$item['body'] = bluesky_set_mentions($item['body']);
$urls = bluesky_get_urls($item['body']);
$item['body'] = $urls['body'];
$msg = Plaintext::getPost($item, 300, false, BBCode::BLUESKY);
$msg = Plaintext::getPost($item, 300, false, BBCode::ATPROTOCOL);
foreach ($msg['parts'] as $key => $part) {
$facets = bluesky_get_facets($part, $urls['urls']);
@ -720,26 +754,53 @@ function bluesky_create_post(array $item, stdClass $root = null, stdClass $paren
}
return;
}
Logger::debug('Posting done', ['return' => $parent]);
DI::logger()->debug('Posting done', ['return' => $parent]);
if (empty($root)) {
$root = $parent;
}
if (($key == 0) && ($item['gravity'] != Item::GRAVITY_PARENT)) {
$uri = DI::atpProcessor()->getUri($parent);
Item::update(['extid' => $uri], ['guid' => $item['guid']]);
Logger::debug('Set extid', ['id' => $item['id'], 'extid' => $uri]);
DI::logger()->debug('Set extid', ['id' => $item['id'], 'extid' => $uri]);
}
}
}
function bluesky_get_urls(string $body): array
function bluesky_set_mentions(string $body): string
{
// Remove all hashtag and mention links
// Remove all url based mention links
$body = preg_replace("/([@!])\[url\=(.*?)\](.*?)\[\/url\]/ism", '$1$3', $body);
if (!preg_match_all("/[@!]\[url\=(did:.*?)\](.*?)\[\/url\]/ism", $body, $matches, PREG_SET_ORDER)) {
return $body;
}
foreach ($matches as $match) {
$contact = Contact::selectFirst(['addr'], ['nurl' => $match[1]]);
if (!empty($contact['addr'])) {
$body = str_replace($match[0], '@[url=' . $match[1] . ']' . $contact['addr'] . '[/url]', $body);
} else {
$body = str_replace($match[0], '@' . $match[2], $body);
}
}
return $body;
}
function bluesky_get_urls(string $body): array
{
$body = BBCode::expandVideoLinks($body);
$urls = [];
// Search for Mentions
if (preg_match_all("/[@!]\[url\=(did:.*?)\](.*?)\[\/url\]/ism", $body, $matches, PREG_SET_ORDER)) {
foreach ($matches as $match) {
$text = '@' . $match[2];
$urls[strpos($body, $match[0])] = ['mention' => $match[1], 'text' => $text, 'hash' => $text];
$body = str_replace($match[0], $text, $body);
}
}
// Search for hash tags
if (preg_match_all("/#\[url\=(https?:.*?)\](.*?)\[\/url\]/ism", $body, $matches, PREG_SET_ORDER)) {
foreach ($matches as $match) {
@ -824,6 +885,9 @@ function bluesky_get_facets(string $body, array $urls): array
} elseif (!empty($url['url'])) {
$feature->uri = $url['url'];
$feature->$type = 'app.bsky.richtext.facet#link';
} elseif (!empty($url['mention'])) {
$feature->did = $url['mention'];
$feature->$type = 'app.bsky.richtext.facet#mention';
} else {
continue;
}
@ -897,20 +961,20 @@ function bluesky_upload_blob(int $uid, array $photo): ?stdClass
$new_size = strlen($content);
if (($size != 0) && ($new_size == 0) && ($retrial == 0)) {
Logger::warning('Size is empty after resize, uploading original file', ['uid' => $uid, 'retrial' => $retrial, 'height' => $new_height, 'width' => $new_width, 'size' => $new_size, 'orig-height' => $height, 'orig-width' => $width, 'orig-size' => $size]);
DI::logger()->warning('Size is empty after resize, uploading original file', ['uid' => $uid, 'retrial' => $retrial, 'height' => $new_height, 'width' => $new_width, 'size' => $new_size, 'orig-height' => $height, 'orig-width' => $width, 'orig-size' => $size]);
$content = Photo::getImageForPhoto($photo);
} else {
Logger::info('Uploading', ['uid' => $uid, 'retrial' => $retrial, 'height' => $new_height, 'width' => $new_width, 'size' => $new_size, 'orig-height' => $height, 'orig-width' => $width, 'orig-size' => $size]);
DI::logger()->info('Uploading', ['uid' => $uid, 'retrial' => $retrial, 'height' => $new_height, 'width' => $new_width, 'size' => $new_size, 'orig-height' => $height, 'orig-width' => $width, 'orig-size' => $size]);
}
$data = DI::atProtocol()->post($uid, '/xrpc/com.atproto.repo.uploadBlob', $content, ['Content-type' => $photo['type'], 'Authorization' => ['Bearer ' . DI::atProtocol()->getUserToken($uid)]]);
if (empty($data) || empty($data->blob)) {
Logger::info('Uploading failed', ['uid' => $uid, 'retrial' => $retrial, 'height' => $new_height, 'width' => $new_width, 'size' => $new_size, 'orig-height' => $height, 'orig-width' => $width, 'orig-size' => $size]);
DI::logger()->info('Uploading failed', ['uid' => $uid, 'retrial' => $retrial, 'height' => $new_height, 'width' => $new_width, 'size' => $new_size, 'orig-height' => $height, 'orig-width' => $width, 'orig-size' => $size]);
return null;
}
Item::incrementOutbound(Protocol::BLUESKY);
Logger::debug('Uploaded blob', ['return' => $data, 'uid' => $uid, 'retrial' => $retrial, 'height' => $new_height, 'width' => $new_width, 'size' => $new_size, 'orig-height' => $height, 'orig-width' => $width, 'orig-size' => $size]);
Item::incrementOutbound(Protocol::ATPROTO);
DI::logger()->debug('Uploaded blob', ['return' => $data, 'uid' => $uid, 'retrial' => $retrial, 'height' => $new_height, 'width' => $new_width, 'size' => $new_size, 'orig-height' => $height, 'orig-width' => $width, 'orig-size' => $size]);
return $data->blob;
}
@ -918,15 +982,17 @@ function bluesky_delete_post(string $uri, int $uid)
{
$parts = DI::atpProcessor()->getUriParts($uri);
if (empty($parts)) {
Logger::debug('No uri delected', ['uri' => $uri]);
DI::logger()->debug('No uri delected', ['uri' => $uri]);
return;
}
DI::atProtocol()->XRPCPost($uid, 'com.atproto.repo.deleteRecord', $parts);
Logger::debug('Deleted', ['parts' => $parts]);
DI::logger()->debug('Deleted', ['parts' => $parts]);
}
function bluesky_fetch_timeline(int $uid)
{
DI::atProtocol()->setApiForUser($uid);
$data = DI::atProtocol()->XRPCGet('app.bsky.feed.getTimeline', [], $uid);
if (empty($data)) {
return;
@ -983,7 +1049,7 @@ function bluesky_process_reason(stdClass $reason, string $uri, int $uid)
$contact = DI::atpActor()->getContactByDID($reason->by->did, $uid, 0);
$item = [
'network' => Protocol::BLUESKY,
'network' => Protocol::ATPROTO,
'protocol' => Conversation::PARCEL_CONNECTOR,
'uid' => $uid,
'wall' => false,
@ -1004,6 +1070,10 @@ function bluesky_process_reason(stdClass $reason, string $uri, int $uid)
return;
}
if (Post::exists(['uid' => $item['uid'], 'thr-parent' => $item['thr-parent'], 'verb' => $item['verb'], 'contact-id' => $item['contact-id']])) {
return;
}
$item['guid'] = Item::guidFromUri($item['uri'], $contact['alias']);
$item['owner-name'] = $item['author-name'];
$item['owner-link'] = $item['author-link'];
@ -1016,6 +1086,8 @@ function bluesky_process_reason(stdClass $reason, string $uri, int $uid)
function bluesky_fetch_notifications(int $uid)
{
DI::atProtocol()->setApiForUser($uid);
$data = DI::atProtocol()->XRPCGet('app.bsky.notification.listNotifications', [], $uid);
if (empty($data->notifications)) {
return;
@ -1024,10 +1096,10 @@ function bluesky_fetch_notifications(int $uid)
foreach ($data->notifications as $notification) {
$uri = DI::atpProcessor()->getUri($notification);
if (Post::exists(['uri' => $uri, 'uid' => $uid]) || Post::exists(['extid' => $uri, 'uid' => $uid])) {
Logger::debug('Notification already processed', ['uid' => $uid, 'reason' => $notification->reason, 'uri' => $uri, 'indexedAt' => $notification->indexedAt]);
DI::logger()->debug('Notification already processed', ['uid' => $uid, 'reason' => $notification->reason, 'uri' => $uri, 'indexedAt' => $notification->indexedAt]);
continue;
}
Logger::debug('Process notification', ['uid' => $uid, 'reason' => $notification->reason, 'uri' => $uri, 'indexedAt' => $notification->indexedAt]);
DI::logger()->debug('Process notification', ['uid' => $uid, 'reason' => $notification->reason, 'uri' => $uri, 'indexedAt' => $notification->indexedAt]);
switch ($notification->reason) {
case 'like':
$item = DI::atpProcessor()->getHeaderFromPost($notification, $uri, $uid, Conversation::PARCEL_CONNECTOR);
@ -1037,9 +1109,9 @@ function bluesky_fetch_notifications(int $uid)
$item['thr-parent'] = DI::atpProcessor()->fetchMissingPost($item['thr-parent'], $uid, Item::PR_FETCHED, $item['contact-id'], 0);
if (!empty($item['thr-parent'])) {
$data = Item::insert($item);
Logger::debug('Got like', ['uid' => $uid, 'result' => $data, 'uri' => $uri]);
DI::logger()->debug('Got like', ['uid' => $uid, 'result' => $data, 'uri' => $uri]);
} else {
Logger::info('Thread parent not found', ['uid' => $uid, 'parent' => $item['thr-parent'], 'uri' => $uri]);
DI::logger()->info('Thread parent not found', ['uid' => $uid, 'parent' => $item['thr-parent'], 'uri' => $uri]);
}
break;
@ -1051,37 +1123,37 @@ function bluesky_fetch_notifications(int $uid)
$item['thr-parent'] = DI::atpProcessor()->fetchMissingPost($item['thr-parent'], $uid, Item::PR_FETCHED, $item['contact-id'], 0);
if (!empty($item['thr-parent'])) {
$data = Item::insert($item);
Logger::debug('Got repost', ['uid' => $uid, 'result' => $data, 'uri' => $uri]);
DI::logger()->debug('Got repost', ['uid' => $uid, 'result' => $data, 'uri' => $uri]);
} else {
Logger::info('Thread parent not found', ['uid' => $uid, 'parent' => $item['thr-parent'], 'uri' => $uri]);
DI::logger()->info('Thread parent not found', ['uid' => $uid, 'parent' => $item['thr-parent'], 'uri' => $uri]);
}
break;
case 'follow':
$contact = DI::atpActor()->getContactByDID($notification->author->did, $uid, $uid);
Logger::debug('New follower', ['uid' => $uid, 'nick' => $contact['nick'], 'uri' => $uri]);
DI::logger()->debug('New follower', ['uid' => $uid, 'nick' => $contact['nick'], 'uri' => $uri]);
break;
case 'mention':
$contact = DI::atpActor()->getContactByDID($notification->author->did, $uid, 0);
$result = DI::atpProcessor()->fetchMissingPost($uri, $uid, Item::PR_TO, $contact['id'], 0);
Logger::debug('Got mention', ['uid' => $uid, 'nick' => $contact['nick'], 'result' => $result, 'uri' => $uri]);
DI::logger()->debug('Got mention', ['uid' => $uid, 'nick' => $contact['nick'], 'result' => $result, 'uri' => $uri]);
break;
case 'reply':
$contact = DI::atpActor()->getContactByDID($notification->author->did, $uid, 0);
$result = DI::atpProcessor()->fetchMissingPost($uri, $uid, Item::PR_COMMENT, $contact['id'], 0);
Logger::debug('Got reply', ['uid' => $uid, 'nick' => $contact['nick'], 'result' => $result, 'uri' => $uri]);
DI::logger()->debug('Got reply', ['uid' => $uid, 'nick' => $contact['nick'], 'result' => $result, 'uri' => $uri]);
break;
case 'quote':
$contact = DI::atpActor()->getContactByDID($notification->author->did, $uid, 0);
$result = DI::atpProcessor()->fetchMissingPost($uri, $uid, Item::PR_PUSHED, $contact['id'], 0);
Logger::debug('Got quote', ['uid' => $uid, 'nick' => $contact['nick'], 'result' => $result, 'uri' => $uri]);
DI::logger()->debug('Got quote', ['uid' => $uid, 'nick' => $contact['nick'], 'result' => $result, 'uri' => $uri]);
break;
default:
Logger::notice('Unhandled reason', ['reason' => $notification->reason, 'uri' => $uri]);
DI::logger()->notice('Unhandled reason', ['reason' => $notification->reason, 'uri' => $uri]);
break;
}
}
@ -1089,6 +1161,8 @@ function bluesky_fetch_notifications(int $uid)
function bluesky_fetch_feed(int $uid, string $feed)
{
DI::atProtocol()->setApiForUser($uid);
$data = DI::atProtocol()->XRPCGet('app.bsky.feed.getFeed', ['feed' => $feed], $uid);
if (empty($data)) {
return;
@ -1112,16 +1186,16 @@ function bluesky_fetch_feed(int $uid, string $feed)
$languages = $entry->post->record->langs ?? [];
if (!Relay::isWantedLanguage($entry->post->record->text, 0, $contact['id'] ?? 0, $languages)) {
Logger::debug('Unwanted language detected', ['languages' => $languages, 'text' => $entry->post->record->text]);
DI::logger()->debug('Unwanted language detected', ['languages' => $languages, 'text' => $entry->post->record->text]);
continue;
}
$causer = DI::atpActor()->getContactByDID($entry->post->author->did, $uid, 0);
$uri_id = bluesky_complete_post($entry->post, $uid, Item::PR_TAG, $causer['id'], Conversation::PARCEL_CONNECTOR);
if (!empty($uri_id)) {
$stored = Post\Category::storeFileByURIId($uri_id, $uid, Post\Category::SUBCRIPTION, $feedname, $feedurl);
Logger::debug('Stored tag subscription for user', ['uri-id' => $uri_id, 'uid' => $uid, 'name' => $feedname, 'url' => $feedurl, 'stored' => $stored]);
DI::logger()->debug('Stored tag subscription for user', ['uri-id' => $uri_id, 'uid' => $uid, 'name' => $feedname, 'url' => $feedurl, 'stored' => $stored]);
} else {
Logger::notice('Post not found', ['entry' => $entry]);
DI::logger()->notice('Post not found', ['entry' => $entry]);
}
if (!empty($entry->reason)) {
bluesky_process_reason($entry->reason, DI::atpProcessor()->getUri($entry->post), $uid);
@ -1137,8 +1211,14 @@ function bluesky_get_feeds(int $uid): array
return [];
}
foreach ($preferences->preferences as $preference) {
if ($preference->$type == 'app.bsky.actor.defs#savedFeedsPref') {
return $preference->pinned ?? [];
if ($preference->$type == 'app.bsky.actor.defs#savedFeedsPrefV2') {
$pinned = [];
foreach ($preference->items as $item) {
if (($item->type == 'feed') && $item->pinned) {
$pinned[] = $item->value;
}
}
return $pinned;
}
}
return [];

View file

@ -1,6 +1,6 @@
<?php
use Friendica\Core\Logger;
use Friendica\DI;
function bluesky_feed_run($argv, $argc)
{
@ -10,7 +10,7 @@ function bluesky_feed_run($argv, $argc)
return;
}
Logger::debug('Importing feed - start', ['user' => $argv[1], 'feed' => $argv[2]]);
DI::logger()->debug('Importing feed - start', ['user' => $argv[1], 'feed' => $argv[2]]);
bluesky_fetch_feed($argv[1], $argv[2]);
Logger::debug('Importing feed - done', ['user' => $argv[1], 'feed' => $argv[2]]);
DI::logger()->debug('Importing feed - done', ['user' => $argv[1], 'feed' => $argv[2]]);
}

View file

@ -1,6 +1,6 @@
<?php
use Friendica\Core\Logger;
use Friendica\DI;
function bluesky_notifications_run($argv, $argc)
{
@ -10,7 +10,7 @@ function bluesky_notifications_run($argv, $argc)
return;
}
Logger::notice('importing notifications - start', ['user' => $argv[1]]);
DI::logger()->notice('importing notifications - start', ['user' => $argv[1]]);
bluesky_fetch_notifications($argv[1]);
Logger::notice('importing notifications - done', ['user' => $argv[1]]);
DI::logger()->notice('importing notifications - done', ['user' => $argv[1]]);
}

View file

@ -1,6 +1,6 @@
<?php
use Friendica\Core\Logger;
use Friendica\DI;
function bluesky_timeline_run($argv, $argc)
{
@ -10,7 +10,7 @@ function bluesky_timeline_run($argv, $argc)
return;
}
Logger::notice('importing timeline - start', ['user' => $argv[1]]);
DI::logger()->notice('importing timeline - start', ['user' => $argv[1]]);
bluesky_fetch_timeline($argv[1]);
Logger::notice('importing timeline - done', ['user' => $argv[1]]);
DI::logger()->notice('importing timeline - done', ['user' => $argv[1]]);
}

View file

@ -8,7 +8,7 @@ msgid ""
msgstr ""
"Project-Id-Version: \n"
"Report-Msgid-Bugs-To: \n"
"POT-Creation-Date: 2024-09-29 18:16+0000\n"
"POT-Creation-Date: 2026-03-18 13:20+0000\n"
"PO-Revision-Date: YEAR-MO-DA HO:MI+ZONE\n"
"Last-Translator: FULL NAME <EMAIL@ADDRESS>\n"
"Language-Team: LANGUAGE <LL@li.org>\n"
@ -17,117 +17,126 @@ msgstr ""
"Content-Type: text/plain; charset=UTF-8\n"
"Content-Transfer-Encoding: 8bit\n"
#: bluesky.php:335
#: bluesky.php:248
msgid "Save Settings"
msgstr ""
#: bluesky.php:336
msgid "Allow your users to use your hostname for their Bluesky handles"
#: bluesky.php:249
msgid "Allow your users to use your hostname for their AT Protocol handles"
msgstr ""
#: bluesky.php:336
#: bluesky.php:249
#, php-format
msgid "Before enabling this option, you have to setup a wildcard domain configuration and you have to enable wildcard requests in your webserver configuration. On Apache this is done by adding \"ServerAlias *.%s\" to your HTTP configuration. You don't need to change the HTTPS configuration."
msgstr ""
#: bluesky.php:365
#: bluesky.php:281
#, php-format
msgid "Allow to use %s as your Bluesky handle."
msgid "Allow to use %s as your AT Protocol handle."
msgstr ""
#: bluesky.php:365
#: bluesky.php:281
#, php-format
msgid "When enabled, you can use %s as your Bluesky handle. After you enabled this option, please go to https://bsky.app/settings and select to change your handle. Select that you have got your own domain. Then enter %s and select \"No DNS Panel\". Then select \"Verify Text File\"."
msgid "When enabled, you can use %s as your AT Protocol handle. After you enabled this option, please go to https://bsky.app/settings and select to change your handle. Select that you have got your own domain. Then enter %s and select \"No DNS Panel\". Then select \"Verify Text File\"."
msgstr ""
#: bluesky.php:375
msgid "Enable Bluesky Post Addon"
#: bluesky.php:298
msgid "Enable AT Protocol Addon"
msgstr ""
#: bluesky.php:376
msgid "Post to Bluesky by default"
#: bluesky.php:299
msgid "Post via AT Protocol by default"
msgstr ""
#: bluesky.php:377
#: bluesky.php:300
msgid "Import the remote timeline"
msgstr ""
#: bluesky.php:378
#: bluesky.php:301
msgid "Import the pinned feeds"
msgstr ""
#: bluesky.php:378
msgid "When activated, Posts will be imported from all the feeds that you pinned in Bluesky."
#: bluesky.php:301
msgid "When activated, Posts will be imported from all the feeds that you pinned in AT Protocol."
msgstr ""
#: bluesky.php:379
#: bluesky.php:302
msgid "Complete the threads"
msgstr ""
#: bluesky.php:379
#: bluesky.php:302
msgid "When activated, the system fetches additional replies for the posts in the timeline. This leads to more complete threads."
msgstr ""
#: bluesky.php:381
#: bluesky.php:304
msgid "Personal Data Server"
msgstr ""
#: bluesky.php:381
#: bluesky.php:304
msgid "The personal data server (PDS) is the system that hosts your profile."
msgstr ""
#: bluesky.php:382
msgid "Bluesky handle"
#: bluesky.php:305
msgid "AT Protocol handle"
msgstr ""
#: bluesky.php:383
msgid "Bluesky DID"
#: bluesky.php:306
msgid "AT Protocol DID"
msgstr ""
#: bluesky.php:383
#: bluesky.php:306
msgid "This is the unique identifier. It will be fetched automatically, when the handle is entered."
msgstr ""
#: bluesky.php:384
msgid "Bluesky app password"
#: bluesky.php:307
msgid "AT Protocol app password"
msgstr ""
#: bluesky.php:384
msgid "Please don't add your real password here, but instead create a specific app password in the Bluesky settings."
#: bluesky.php:307
msgid "Please don't add your real password here, but instead create a specific app password in the settings of your AT Protocol system."
msgstr ""
#: bluesky.php:390
msgid "Bluesky Import/Export"
#: bluesky.php:308
msgid "Web front end"
msgstr ""
#: bluesky.php:400
#: bluesky.php:308
msgid "Choose your preferred external web front end for displaying posts and profiles."
msgstr ""
#: bluesky.php:314
msgid "AT Protocol (Bluesky, Eurosky, Blacksky, ...) Import/Export"
msgstr ""
#: bluesky.php:324
msgid "You are not authenticated. Please enter your handle and the app password."
msgstr ""
#: bluesky.php:420
msgid "You are authenticated to Bluesky. For security reasons the password isn't stored."
#: bluesky.php:345
msgid "You are authenticated to the AT Protocol PDS. For security reasons the password isn't stored."
msgstr ""
#: bluesky.php:422
#: bluesky.php:347
msgid "The communication with the personal data server service (PDS) is established."
msgstr ""
#: bluesky.php:424
msgid "Communication issues with the personal data server service (PDS)."
#: bluesky.php:349
#, php-format
msgid "Communication issues with the personal data server service (PDS): %s"
msgstr ""
#: bluesky.php:426
#: bluesky.php:351
msgid "The DID for the provided handle could not be detected. Please check if you entered the correct handle."
msgstr ""
#: bluesky.php:428
#: bluesky.php:353
msgid "The personal data server service (PDS) could not be detected."
msgstr ""
#: bluesky.php:430
#: bluesky.php:355
msgid "The authentication with the provided handle and password failed. Please check if you entered the correct password."
msgstr ""
#: bluesky.php:492
msgid "Post to Bluesky"
#: bluesky.php:425
msgid "Post via the AT Protocol"
msgstr ""

View file

@ -10,4 +10,5 @@
{{include file="field_input.tpl" field=$pds}}
{{include file="field_input.tpl" field=$handle}}
{{include file="field_input.tpl" field=$did}}
{{include file="field_input.tpl" field=$password}}
{{include file="field_input.tpl" field=$password}}
{{include file="field_select.tpl" field=$web}}

View file

@ -6,7 +6,6 @@
* Author: Mike Macgirvin <mike@macgirvin.com>
*/
use Friendica\App;
use Friendica\Core\Hook;
use Friendica\DI;

View file

@ -0,0 +1,23 @@
# ADDON buglink
# Copyright (C)
# This file is distributed under the same license as the Friendica buglink addon package.
#
#
# Translators:
msgid ""
msgstr ""
"Project-Id-Version: friendica\n"
"Report-Msgid-Bugs-To: \n"
"POT-Creation-Date: 2021-02-01 18:15+0100\n"
"PO-Revision-Date: 2014-06-22 11:27+0000\n"
"Last-Translator: FULL NAME <EMAIL@ADDRESS>\n"
"Language-Team: Bulgarian (http://app.transifex.com/Friendica/friendica/language/bg/)\n"
"MIME-Version: 1.0\n"
"Content-Type: text/plain; charset=UTF-8\n"
"Content-Transfer-Encoding: 8bit\n"
"Language: bg\n"
"Plural-Forms: nplurals=2; plural=(n != 1);\n"
#: buglink.php:20
msgid "Report Bug"
msgstr ""

View file

@ -0,0 +1,7 @@
<?php
if(! function_exists("string_plural_select_bg")) {
function string_plural_select_bg($n){
$n = intval($n);
return intval($n != 1);
}}

View file

@ -0,0 +1,23 @@
# ADDON buglink
# Copyright (C)
# This file is distributed under the same license as the Friendica buglink addon package.
#
#
# Translators:
msgid ""
msgstr ""
"Project-Id-Version: friendica\n"
"Report-Msgid-Bugs-To: \n"
"POT-Creation-Date: 2021-02-01 18:15+0100\n"
"PO-Revision-Date: 2014-06-22 11:27+0000\n"
"Last-Translator: FULL NAME <EMAIL@ADDRESS>\n"
"Language-Team: Esperanto (http://app.transifex.com/Friendica/friendica/language/eo/)\n"
"MIME-Version: 1.0\n"
"Content-Type: text/plain; charset=UTF-8\n"
"Content-Transfer-Encoding: 8bit\n"
"Language: eo\n"
"Plural-Forms: nplurals=2; plural=(n != 1);\n"
#: buglink.php:20
msgid "Report Bug"
msgstr ""

View file

@ -1,3 +1,7 @@
<?php
$a->strings["Report Bug"] = "Skribi cimraporton";
<?php
if(! function_exists("string_plural_select_eo")) {
function string_plural_select_eo($n){
$n = intval($n);
return intval($n != 1);
}}

View file

@ -0,0 +1,23 @@
# ADDON buglink
# Copyright (C)
# This file is distributed under the same license as the Friendica buglink addon package.
#
#
# Translators:
msgid ""
msgstr ""
"Project-Id-Version: friendica\n"
"Report-Msgid-Bugs-To: \n"
"POT-Creation-Date: 2021-02-01 18:15+0100\n"
"PO-Revision-Date: 2014-06-22 11:27+0000\n"
"Last-Translator: FULL NAME <EMAIL@ADDRESS>\n"
"Language-Team: Estonian (http://app.transifex.com/Friendica/friendica/language/et/)\n"
"MIME-Version: 1.0\n"
"Content-Type: text/plain; charset=UTF-8\n"
"Content-Transfer-Encoding: 8bit\n"
"Language: et\n"
"Plural-Forms: nplurals=2; plural=(n != 1);\n"
#: buglink.php:20
msgid "Report Bug"
msgstr ""

View file

@ -0,0 +1,7 @@
<?php
if(! function_exists("string_plural_select_et")) {
function string_plural_select_et($n){
$n = intval($n);
return intval($n != 1);
}}

View file

@ -6,7 +6,6 @@
* Author: Mike Macgirvin <http://macgirvin.com/profile/mike>
*/
use Friendica\App;
use Friendica\Core\Hook;
use Friendica\DI;
@ -16,7 +15,7 @@ function calc_install() {
function calc_app_menu(array &$b)
{
$b['app_menu'][] = '<div class="app-title"><a href="calc">Calculator</a></div>';
$b['app_menu'][] = '<div class="app-title"><a href="calc">Calculator</a></div>';
}
/**
@ -296,7 +295,7 @@ $o .= <<< EOT
<h3>Calculator</h3>
<br /><br />
<table>
<tbody><tr><td>
<tbody><tr><td>
<table bgcolor="#af9999" border="1">
<tbody><tr><td>
<table border="1" cellpadding="2" cellspacing="2">
@ -323,7 +322,7 @@ $o .= <<< EOT
<td><input name="multiplication" value="&nbsp;&nbsp;*&nbsp;&nbsp;&nbsp;&nbsp;" onclick="multiplyNumbers()" type="button"></td>
</tr><tr align="left" valign="middle">
<td><input name="zero" value="&nbsp;&nbsp;0&nbsp;&nbsp;&nbsp;" onclick="addDisplay(0)" type="button"></td>
<td><input name="pi" value="&nbsp;Pi&nbsp;&nbsp;" onclick="addDisplay(Math.PI)" type="button"> </td>
<td><input name="pi" value="&nbsp;Pi&nbsp;&nbsp;" onclick="addDisplay(Math.PI)" type="button"> </td>
<td><input name="dot" value="&nbsp;&nbsp;&nbsp;.&nbsp;&nbsp;&nbsp;" onclick='addDisplay(".")' type="button"></td>
<td><input name="division" value="&nbsp;&nbsp;&nbsp;/&nbsp;&nbsp;&nbsp;" onclick="divideNumbers()" type="button"></td>
</tr><tr align="left" valign="middle">
@ -345,13 +344,13 @@ $o .= <<< EOT
</form>
<!--
<TD VALIGN=top>
<TD VALIGN=top>
<B>NOTE:</B> All sine and cosine calculations are
<br>done in radians. Remember to convert first
<br>if using degrees.
</TD>
-->
</td></tr></tbody></table>

View file

@ -6,11 +6,8 @@
* Author: Fabio <https://kirgroup.com/profile/fabrixxm>
*/
use Friendica\App;
use Friendica\Core\Hook;
use Friendica\Core\Logger;
use Friendica\Core\Renderer;
use Friendica\Core\Worker;
use Friendica\Database\DBA;
use Friendica\DI;
use Friendica\Model\Contact;
@ -29,7 +26,7 @@ function catavatar_install()
Hook::register('addon_settings', __FILE__, 'catavatar_addon_settings');
Hook::register('addon_settings_post', __FILE__, 'catavatar_addon_settings_post');
Logger::notice('registered catavatar');
DI::logger()->notice('registered catavatar');
}
/**

View file

@ -0,0 +1,54 @@
# ADDON catavatar
# Copyright (C)
# This file is distributed under the same license as the Friendica catavatar addon package.
#
#
#, fuzzy
msgid ""
msgstr ""
"Project-Id-Version: \n"
"Report-Msgid-Bugs-To: \n"
"POT-Creation-Date: 2021-11-21 19:14-0500\n"
"PO-Revision-Date: 2018-04-07 05:23+0000\n"
"Language-Team: Bulgarian (https://app.transifex.com/Friendica/teams/12172/bg/)\n"
"MIME-Version: 1.0\n"
"Content-Type: text/plain; charset=UTF-8\n"
"Content-Transfer-Encoding: 8bit\n"
"Language: bg\n"
"Plural-Forms: nplurals=2; plural=(n != 1);\n"
#: catavatar.php:48
msgid "Set default profile avatar or randomize the cat."
msgstr ""
#: catavatar.php:53
msgid "Cat Avatar Settings"
msgstr ""
#: catavatar.php:56
msgid "Use Cat as Avatar"
msgstr ""
#: catavatar.php:57
msgid "Another random Cat!"
msgstr ""
#: catavatar.php:58
msgid "Reset to email Cat"
msgstr ""
#: catavatar.php:77
msgid "The cat hadn't found itself."
msgstr ""
#: catavatar.php:86
msgid "There was an error, the cat ran away."
msgstr ""
#: catavatar.php:92
msgid "Profile Photos"
msgstr ""
#: catavatar.php:102
msgid "Meow!"
msgstr ""

View file

@ -0,0 +1,7 @@
<?php
if(! function_exists("string_plural_select_bg")) {
function string_plural_select_bg($n){
$n = intval($n);
return intval($n != 1);
}}

View file

@ -0,0 +1,54 @@
# ADDON catavatar
# Copyright (C)
# This file is distributed under the same license as the Friendica catavatar addon package.
#
#
#, fuzzy
msgid ""
msgstr ""
"Project-Id-Version: \n"
"Report-Msgid-Bugs-To: \n"
"POT-Creation-Date: 2021-11-21 19:14-0500\n"
"PO-Revision-Date: 2018-04-07 05:23+0000\n"
"Language-Team: Esperanto (https://app.transifex.com/Friendica/teams/12172/eo/)\n"
"MIME-Version: 1.0\n"
"Content-Type: text/plain; charset=UTF-8\n"
"Content-Transfer-Encoding: 8bit\n"
"Language: eo\n"
"Plural-Forms: nplurals=2; plural=(n != 1);\n"
#: catavatar.php:48
msgid "Set default profile avatar or randomize the cat."
msgstr ""
#: catavatar.php:53
msgid "Cat Avatar Settings"
msgstr ""
#: catavatar.php:56
msgid "Use Cat as Avatar"
msgstr ""
#: catavatar.php:57
msgid "Another random Cat!"
msgstr ""
#: catavatar.php:58
msgid "Reset to email Cat"
msgstr ""
#: catavatar.php:77
msgid "The cat hadn't found itself."
msgstr ""
#: catavatar.php:86
msgid "There was an error, the cat ran away."
msgstr ""
#: catavatar.php:92
msgid "Profile Photos"
msgstr ""
#: catavatar.php:102
msgid "Meow!"
msgstr ""

View file

@ -0,0 +1,7 @@
<?php
if(! function_exists("string_plural_select_eo")) {
function string_plural_select_eo($n){
$n = intval($n);
return intval($n != 1);
}}

View file

@ -0,0 +1,54 @@
# ADDON catavatar
# Copyright (C)
# This file is distributed under the same license as the Friendica catavatar addon package.
#
#
#, fuzzy
msgid ""
msgstr ""
"Project-Id-Version: \n"
"Report-Msgid-Bugs-To: \n"
"POT-Creation-Date: 2021-11-21 19:14-0500\n"
"PO-Revision-Date: 2018-04-07 05:23+0000\n"
"Language-Team: Estonian (https://app.transifex.com/Friendica/teams/12172/et/)\n"
"MIME-Version: 1.0\n"
"Content-Type: text/plain; charset=UTF-8\n"
"Content-Transfer-Encoding: 8bit\n"
"Language: et\n"
"Plural-Forms: nplurals=2; plural=(n != 1);\n"
#: catavatar.php:48
msgid "Set default profile avatar or randomize the cat."
msgstr ""
#: catavatar.php:53
msgid "Cat Avatar Settings"
msgstr ""
#: catavatar.php:56
msgid "Use Cat as Avatar"
msgstr ""
#: catavatar.php:57
msgid "Another random Cat!"
msgstr ""
#: catavatar.php:58
msgid "Reset to email Cat"
msgstr ""
#: catavatar.php:77
msgid "The cat hadn't found itself."
msgstr ""
#: catavatar.php:86
msgid "There was an error, the cat ran away."
msgstr ""
#: catavatar.php:92
msgid "Profile Photos"
msgstr ""
#: catavatar.php:102
msgid "Meow!"
msgstr ""

View file

@ -0,0 +1,7 @@
<?php
if(! function_exists("string_plural_select_et")) {
function string_plural_select_et($n){
$n = intval($n);
return intval($n != 1);
}}

View file

@ -0,0 +1,54 @@
# ADDON catavatar
# Copyright (C)
# This file is distributed under the same license as the Friendica catavatar addon package.
#
#
#, fuzzy
msgid ""
msgstr ""
"Project-Id-Version: \n"
"Report-Msgid-Bugs-To: \n"
"POT-Creation-Date: 2021-11-21 19:14-0500\n"
"PO-Revision-Date: 2018-04-07 05:23+0000\n"
"Language-Team: Gaelic, Scottish (https://app.transifex.com/Friendica/teams/12172/gd/)\n"
"MIME-Version: 1.0\n"
"Content-Type: text/plain; charset=UTF-8\n"
"Content-Transfer-Encoding: 8bit\n"
"Language: gd\n"
"Plural-Forms: nplurals=4; plural=(n==1 || n==11) ? 0 : (n==2 || n==12) ? 1 : (n > 2 && n < 20) ? 2 : 3;\n"
#: catavatar.php:48
msgid "Set default profile avatar or randomize the cat."
msgstr ""
#: catavatar.php:53
msgid "Cat Avatar Settings"
msgstr ""
#: catavatar.php:56
msgid "Use Cat as Avatar"
msgstr ""
#: catavatar.php:57
msgid "Another random Cat!"
msgstr ""
#: catavatar.php:58
msgid "Reset to email Cat"
msgstr ""
#: catavatar.php:77
msgid "The cat hadn't found itself."
msgstr ""
#: catavatar.php:86
msgid "There was an error, the cat ran away."
msgstr ""
#: catavatar.php:92
msgid "Profile Photos"
msgstr ""
#: catavatar.php:102
msgid "Meow!"
msgstr ""

View file

@ -0,0 +1,7 @@
<?php
if(! function_exists("string_plural_select_gd")) {
function string_plural_select_gd($n){
$n = intval($n);
if (($n==1 || $n==11)) { return 0; } else if (($n==2 || $n==12)) { return 1; } else if (($n > 2 && $n < 20)) { return 2; } else { return 3; }
}}

View file

@ -7,7 +7,6 @@
*/
use Friendica\Core\Hook;
use Friendica\Core\Logger;
use Friendica\DI;
function cld_install()
@ -18,7 +17,17 @@ function cld_install()
function cld_detect_languages(array &$data)
{
if (!in_array('cld2', get_loaded_extensions())) {
Logger::warning('CLD2 is not installed.');
DI::logger()->warning('CLD2 is not installed.');
return;
}
if (!class_exists('CLD2Detector')) {
DI::logger()->warning('CLD2Detector class does not exist.');
return;
}
if (!class_exists('CLD2Encoding')) {
DI::logger()->warning('CLD2Encoding class does not exist.');
return;
}
@ -43,7 +52,7 @@ function cld_detect_languages(array &$data)
}
if (!$result['is_reliable']) {
Logger::debug('Unreliable detection', ['uri-id' => $data['uri-id'], 'original' => $original, 'detected' => $detected, 'name' => $result['language_name'], 'probability' => $result['language_probability'], 'text' => $data['text']]);
DI::logger()->debug('Unreliable detection', ['uri-id' => $data['uri-id'], 'original' => $original, 'detected' => $detected, 'name' => $result['language_name'], 'probability' => $result['language_probability'], 'text' => $data['text']]);
if (($original == $detected) && ($data['detected'][$original] < $result['language_probability'] / 100)) {
$data['detected'][$original] = $result['language_probability'] / 100;
}
@ -53,12 +62,12 @@ function cld_detect_languages(array &$data)
$available = array_keys(DI::l10n()->getLanguageCodes());
if (!in_array($detected, $available)) {
Logger::debug('Unsupported language', ['uri-id' => $data['uri-id'], 'original' => $original, 'detected' => $detected, 'name' => $result['language_name'], 'probability' => $result['language_probability'], 'text' => $data['text']]);
DI::logger()->debug('Unsupported language', ['uri-id' => $data['uri-id'], 'original' => $original, 'detected' => $detected, 'name' => $result['language_name'], 'probability' => $result['language_probability'], 'text' => $data['text']]);
return;
}
if ($original != $detected) {
Logger::debug('Detected different language', ['uri-id' => $data['uri-id'], 'original' => $original, 'detected' => $detected, 'name' => $result['language_name'], 'probability' => $result['language_probability'], 'text' => $data['text']]);
DI::logger()->debug('Detected different language', ['uri-id' => $data['uri-id'], 'original' => $original, 'detected' => $detected, 'name' => $result['language_name'], 'probability' => $result['language_probability'], 'text' => $data['text']]);
}
$length = count($data['detected']);

View file

@ -169,7 +169,6 @@ class UnitConvertor
* @param string name of the source unit from which to convert
* @param string name of the target unit to which we are converting
* @param integer double precision of the end result
* @return void
* @access public
*/
function convert($value, $from_unit, $to_unit, $precision)
@ -280,4 +279,4 @@ class UnitConvertor
} // end func getConvSpecs
} // end class UnitConvertor
?>
?>

View file

@ -6,7 +6,6 @@
* Author: Mike Macgirvin <http://macgirvin.com/profile/mike>
*/
use Friendica\App;
use Friendica\Core\Hook;
function convert_install() {
@ -26,7 +25,7 @@ function convert_content() {
// @TODO Let's one day rewrite this to a modern composer package
include 'UnitConvertor.php';
class TP_Converter extends UnitConvertor
$conv = new class('en') extends UnitConvertor
{
public function __construct(string $lang = 'en')
{
@ -43,7 +42,7 @@ function convert_content() {
private function findBaseUnit($from, $to)
{
while (list($skey, $sval) = each($this->bases)) {
foreach ($this->bases as $skey => $sval) {
if ($skey == $from || $to == $skey || in_array($to, $sval) || in_array($from, $sval)) {
return $skey;
}
@ -63,7 +62,7 @@ function convert_content() {
$cells[] = $cell;
// We now have the base unit and value now lets produce the table;
while (list($key, $val) = each($this->bases[$base_unit])) {
foreach ($this->bases[$base_unit] as $val) {
$cell ['value'] = $this->convert($value, $from_unit, $val, $precision) . ' ' . $val;
$cell ['class'] = ($val == $from_unit || $val == $to_unit) ? 'framedred' : '';
$cells[] = $cell;
@ -86,9 +85,7 @@ function convert_content() {
return $string;
}
}
$conv = new TP_Converter('en');
};
$conversions = [
'Temperature' => ['base' => 'Celsius',
@ -176,15 +173,15 @@ function convert_content() {
]
];
while (list($key, $val) = each($conversions)) {
foreach ($conversions as $key => $val) {
$conv->addConversion($val['base'], $val['conv']);
$list[$key][] = $val['base'];
while (list($ukey, $uval) = each($val['conv'])) {
foreach ($val['conv'] as $ukey => $uval) {
$list[$key][] = $ukey;
}
}
$o .= '<h3>Unit Conversions</h3>';
$o = '<h3>Unit Conversions</h3>';
if (isset($_POST['from_unit']) && isset($_POST['value'])) {
$o .= ($conv->getTable(intval($_POST['value']), $_POST['from_unit'], $_POST['to_unit'], 5)) . '</p>';
@ -202,10 +199,9 @@ function convert_content() {
$o .= '<input name="value" type="text" id="value" value="' . $value . '" size="10" maxlength="10" />';
$o .= '<select name="from_unit" size="12">';
reset($list);
while(list($key, $val) = each($list)) {
foreach ($list as $key => $val) {
$o .= "\n\t<optgroup label=\"$key\">";
while(list($ukey, $uval) = each($val)) {
foreach ($val as $ukey => $uval) {
$selected = (($uval == $_POST['from_unit']) ? ' selected="selected" ' : '');
$o .= "\n\t\t<option value=\"$uval\" $selected >$uval</option>";
}

View file

@ -7,7 +7,6 @@
* Author: Peter Liebetrau <https://socivitas/profile/peerteer>
*/
use Friendica\App;
use Friendica\Core\Hook;
use Friendica\Core\Renderer;
use Friendica\DI;

View file

@ -0,0 +1,53 @@
# ADDON cookienotice
# Copyright (C)
# This file is distributed under the same license as the Friendica cookienotice addon package.
#
#
#, fuzzy
msgid ""
msgstr ""
"Project-Id-Version: \n"
"Report-Msgid-Bugs-To: \n"
"POT-Creation-Date: 2021-02-01 18:15+0100\n"
"PO-Revision-Date: 2019-01-23 16:01+0000\n"
"Language-Team: Bulgarian (https://app.transifex.com/Friendica/teams/12172/bg/)\n"
"MIME-Version: 1.0\n"
"Content-Type: text/plain; charset=UTF-8\n"
"Content-Transfer-Encoding: 8bit\n"
"Language: bg\n"
"Plural-Forms: nplurals=2; plural=(n != 1);\n"
#: cookienotice.php:42
msgid ""
"This website uses cookies. If you continue browsing this website, you agree "
"to the usage of cookies."
msgstr ""
#: cookienotice.php:43 cookienotice.php:108
msgid "OK"
msgstr ""
#: cookienotice.php:47
msgid ""
"<b>Configure your cookie usage notice.</b> It should just be a notice, "
"saying that the website uses cookies. It is shown as long as a user didnt "
"confirm clicking the OK button."
msgstr ""
#: cookienotice.php:48
msgid "Cookie Usage Notice"
msgstr ""
#: cookienotice.php:49
msgid "OK Button Text"
msgstr ""
#: cookienotice.php:50
msgid "Save Settings"
msgstr ""
#: cookienotice.php:107
msgid ""
"This website uses cookies to recognize revisiting and logged in users. You "
"accept the usage of these cookies by continue browsing this website."
msgstr ""

View file

@ -0,0 +1,7 @@
<?php
if(! function_exists("string_plural_select_bg")) {
function string_plural_select_bg($n){
$n = intval($n);
return intval($n != 1);
}}

View file

@ -0,0 +1,53 @@
# ADDON cookienotice
# Copyright (C)
# This file is distributed under the same license as the Friendica cookienotice addon package.
#
#
#, fuzzy
msgid ""
msgstr ""
"Project-Id-Version: \n"
"Report-Msgid-Bugs-To: \n"
"POT-Creation-Date: 2021-02-01 18:15+0100\n"
"PO-Revision-Date: 2019-01-23 16:01+0000\n"
"Language-Team: Esperanto (https://app.transifex.com/Friendica/teams/12172/eo/)\n"
"MIME-Version: 1.0\n"
"Content-Type: text/plain; charset=UTF-8\n"
"Content-Transfer-Encoding: 8bit\n"
"Language: eo\n"
"Plural-Forms: nplurals=2; plural=(n != 1);\n"
#: cookienotice.php:42
msgid ""
"This website uses cookies. If you continue browsing this website, you agree "
"to the usage of cookies."
msgstr ""
#: cookienotice.php:43 cookienotice.php:108
msgid "OK"
msgstr ""
#: cookienotice.php:47
msgid ""
"<b>Configure your cookie usage notice.</b> It should just be a notice, "
"saying that the website uses cookies. It is shown as long as a user didnt "
"confirm clicking the OK button."
msgstr ""
#: cookienotice.php:48
msgid "Cookie Usage Notice"
msgstr ""
#: cookienotice.php:49
msgid "OK Button Text"
msgstr ""
#: cookienotice.php:50
msgid "Save Settings"
msgstr ""
#: cookienotice.php:107
msgid ""
"This website uses cookies to recognize revisiting and logged in users. You "
"accept the usage of these cookies by continue browsing this website."
msgstr ""

View file

@ -0,0 +1,7 @@
<?php
if(! function_exists("string_plural_select_eo")) {
function string_plural_select_eo($n){
$n = intval($n);
return intval($n != 1);
}}

View file

@ -0,0 +1,53 @@
# ADDON cookienotice
# Copyright (C)
# This file is distributed under the same license as the Friendica cookienotice addon package.
#
#
#, fuzzy
msgid ""
msgstr ""
"Project-Id-Version: \n"
"Report-Msgid-Bugs-To: \n"
"POT-Creation-Date: 2021-02-01 18:15+0100\n"
"PO-Revision-Date: 2019-01-23 16:01+0000\n"
"Language-Team: Estonian (https://app.transifex.com/Friendica/teams/12172/et/)\n"
"MIME-Version: 1.0\n"
"Content-Type: text/plain; charset=UTF-8\n"
"Content-Transfer-Encoding: 8bit\n"
"Language: et\n"
"Plural-Forms: nplurals=2; plural=(n != 1);\n"
#: cookienotice.php:42
msgid ""
"This website uses cookies. If you continue browsing this website, you agree "
"to the usage of cookies."
msgstr ""
#: cookienotice.php:43 cookienotice.php:108
msgid "OK"
msgstr ""
#: cookienotice.php:47
msgid ""
"<b>Configure your cookie usage notice.</b> It should just be a notice, "
"saying that the website uses cookies. It is shown as long as a user didnt "
"confirm clicking the OK button."
msgstr ""
#: cookienotice.php:48
msgid "Cookie Usage Notice"
msgstr ""
#: cookienotice.php:49
msgid "OK Button Text"
msgstr ""
#: cookienotice.php:50
msgid "Save Settings"
msgstr ""
#: cookienotice.php:107
msgid ""
"This website uses cookies to recognize revisiting and logged in users. You "
"accept the usage of these cookies by continue browsing this website."
msgstr ""

View file

@ -0,0 +1,7 @@
<?php
if(! function_exists("string_plural_select_et")) {
function string_plural_select_et($n){
$n = intval($n);
return intval($n != 1);
}}

View file

@ -6,6 +6,7 @@
# Translators:
# Vladimir Núñez <lapoubelle111@gmail.com>, 2019
# bob lebonche <lebonche@tutanota.com>, 2021
# cracrayol, 2025
#
#, fuzzy
msgid ""
@ -14,8 +15,8 @@ msgstr ""
"Report-Msgid-Bugs-To: \n"
"POT-Creation-Date: 2021-02-01 18:15+0100\n"
"PO-Revision-Date: 2019-01-23 16:01+0000\n"
"Last-Translator: bob lebonche <lebonche@tutanota.com>, 2021\n"
"Language-Team: French (https://www.transifex.com/Friendica/teams/12172/fr/)\n"
"Last-Translator: cracrayol, 2025\n"
"Language-Team: French (https://app.transifex.com/Friendica/teams/12172/fr/)\n"
"MIME-Version: 1.0\n"
"Content-Type: text/plain; charset=UTF-8\n"
"Content-Transfer-Encoding: 8bit\n"
@ -55,7 +56,7 @@ msgstr "Bouton OK Texte "
#: cookienotice.php:50
msgid "Save Settings"
msgstr "Sauvegarder les réglages"
msgstr "Sauvegarder les paramètres "
#: cookienotice.php:107
msgid ""
@ -63,5 +64,5 @@ msgid ""
"accept the usage of these cookies by continue browsing this website."
msgstr ""
"Ce site utilise des cookies pour reconnaître les visiteurs et les "
"utilisateurs connectés. Vous accepter l'utilisation de ces cookies en "
"utilisateurs connectés. Vous acceptez l'utilisation de ces cookies en "
"continuant sur ce site."

View file

@ -10,5 +10,5 @@ $a->strings['OK'] = 'Ok';
$a->strings['<b>Configure your cookie usage notice.</b> It should just be a notice, saying that the website uses cookies. It is shown as long as a user didnt confirm clicking the OK button.'] = '<b>Configurez votre politique d\'utilisation des cookies.</b> Cela devrait juste être un avertissement, signalant l\'utilisation de cookies par le site. Cela sera affiché tant que l\'utilisateur n\'aura pas confirmé en cliquant sur le bouton OK.';
$a->strings['Cookie Usage Notice'] = 'Politique d\'utilisation des cookies.';
$a->strings['OK Button Text'] = 'Bouton OK Texte ';
$a->strings['Save Settings'] = 'Sauvegarder les réglages';
$a->strings['This website uses cookies to recognize revisiting and logged in users. You accept the usage of these cookies by continue browsing this website.'] = 'Ce site utilise des cookies pour reconnaître les visiteurs et les utilisateurs connectés. Vous accepter l\'utilisation de ces cookies en continuant sur ce site.';
$a->strings['Save Settings'] = 'Sauvegarder les paramètres ';
$a->strings['This website uses cookies to recognize revisiting and logged in users. You accept the usage of these cookies by continue browsing this website.'] = 'Ce site utilise des cookies pour reconnaître les visiteurs et les utilisateurs connectés. Vous acceptez l\'utilisation de ces cookies en continuant sur ce site.';

View file

@ -0,0 +1,53 @@
# ADDON cookienotice
# Copyright (C)
# This file is distributed under the same license as the Friendica cookienotice addon package.
#
#
#, fuzzy
msgid ""
msgstr ""
"Project-Id-Version: \n"
"Report-Msgid-Bugs-To: \n"
"POT-Creation-Date: 2021-02-01 18:15+0100\n"
"PO-Revision-Date: 2019-01-23 16:01+0000\n"
"Language-Team: Gaelic, Scottish (https://app.transifex.com/Friendica/teams/12172/gd/)\n"
"MIME-Version: 1.0\n"
"Content-Type: text/plain; charset=UTF-8\n"
"Content-Transfer-Encoding: 8bit\n"
"Language: gd\n"
"Plural-Forms: nplurals=4; plural=(n==1 || n==11) ? 0 : (n==2 || n==12) ? 1 : (n > 2 && n < 20) ? 2 : 3;\n"
#: cookienotice.php:42
msgid ""
"This website uses cookies. If you continue browsing this website, you agree "
"to the usage of cookies."
msgstr ""
#: cookienotice.php:43 cookienotice.php:108
msgid "OK"
msgstr ""
#: cookienotice.php:47
msgid ""
"<b>Configure your cookie usage notice.</b> It should just be a notice, "
"saying that the website uses cookies. It is shown as long as a user didnt "
"confirm clicking the OK button."
msgstr ""
#: cookienotice.php:48
msgid "Cookie Usage Notice"
msgstr ""
#: cookienotice.php:49
msgid "OK Button Text"
msgstr ""
#: cookienotice.php:50
msgid "Save Settings"
msgstr ""
#: cookienotice.php:107
msgid ""
"This website uses cookies to recognize revisiting and logged in users. You "
"accept the usage of these cookies by continue browsing this website."
msgstr ""

View file

@ -0,0 +1,7 @@
<?php
if(! function_exists("string_plural_select_gd")) {
function string_plural_select_gd($n){
$n = intval($n);
if (($n==1 || $n==11)) { return 0; } else if (($n==2 || $n==12)) { return 1; } else if (($n > 2 && $n < 20)) { return 2; } else { return 3; }
}}

View file

@ -0,0 +1,53 @@
# ADDON cookienotice
# Copyright (C)
# This file is distributed under the same license as the Friendica cookienotice addon package.
#
#
#, fuzzy
msgid ""
msgstr ""
"Project-Id-Version: \n"
"Report-Msgid-Bugs-To: \n"
"POT-Creation-Date: 2021-02-01 18:15+0100\n"
"PO-Revision-Date: 2019-01-23 16:01+0000\n"
"Language-Team: Icelandic (https://app.transifex.com/Friendica/teams/12172/is/)\n"
"MIME-Version: 1.0\n"
"Content-Type: text/plain; charset=UTF-8\n"
"Content-Transfer-Encoding: 8bit\n"
"Language: is\n"
"Plural-Forms: nplurals=2; plural=(n % 10 != 1 || n % 100 == 11);\n"
#: cookienotice.php:42
msgid ""
"This website uses cookies. If you continue browsing this website, you agree "
"to the usage of cookies."
msgstr ""
#: cookienotice.php:43 cookienotice.php:108
msgid "OK"
msgstr ""
#: cookienotice.php:47
msgid ""
"<b>Configure your cookie usage notice.</b> It should just be a notice, "
"saying that the website uses cookies. It is shown as long as a user didnt "
"confirm clicking the OK button."
msgstr ""
#: cookienotice.php:48
msgid "Cookie Usage Notice"
msgstr ""
#: cookienotice.php:49
msgid "OK Button Text"
msgstr ""
#: cookienotice.php:50
msgid "Save Settings"
msgstr ""
#: cookienotice.php:107
msgid ""
"This website uses cookies to recognize revisiting and logged in users. You "
"accept the usage of these cookies by continue browsing this website."
msgstr ""

View file

@ -0,0 +1,7 @@
<?php
if(! function_exists("string_plural_select_is")) {
function string_plural_select_is($n){
$n = intval($n);
return intval($n % 10 != 1 || $n % 100 == 11);
}}

View file

@ -0,0 +1,53 @@
# ADDON cookienotice
# Copyright (C)
# This file is distributed under the same license as the Friendica cookienotice addon package.
#
#
#, fuzzy
msgid ""
msgstr ""
"Project-Id-Version: \n"
"Report-Msgid-Bugs-To: \n"
"POT-Creation-Date: 2021-02-01 18:15+0100\n"
"PO-Revision-Date: 2019-01-23 16:01+0000\n"
"Language-Team: Russian (https://app.transifex.com/Friendica/teams/12172/ru/)\n"
"MIME-Version: 1.0\n"
"Content-Type: text/plain; charset=UTF-8\n"
"Content-Transfer-Encoding: 8bit\n"
"Language: ru\n"
"Plural-Forms: nplurals=4; plural=(n%10==1 && n%100!=11 ? 0 : n%10>=2 && n%10<=4 && (n%100<12 || n%100>14) ? 1 : n%10==0 || (n%10>=5 && n%10<=9) || (n%100>=11 && n%100<=14)? 2 : 3);\n"
#: cookienotice.php:42
msgid ""
"This website uses cookies. If you continue browsing this website, you agree "
"to the usage of cookies."
msgstr ""
#: cookienotice.php:43 cookienotice.php:108
msgid "OK"
msgstr ""
#: cookienotice.php:47
msgid ""
"<b>Configure your cookie usage notice.</b> It should just be a notice, "
"saying that the website uses cookies. It is shown as long as a user didnt "
"confirm clicking the OK button."
msgstr ""
#: cookienotice.php:48
msgid "Cookie Usage Notice"
msgstr ""
#: cookienotice.php:49
msgid "OK Button Text"
msgstr ""
#: cookienotice.php:50
msgid "Save Settings"
msgstr ""
#: cookienotice.php:107
msgid ""
"This website uses cookies to recognize revisiting and logged in users. You "
"accept the usage of these cookies by continue browsing this website."
msgstr ""

View file

@ -0,0 +1,7 @@
<?php
if(! function_exists("string_plural_select_ru")) {
function string_plural_select_ru($n){
$n = intval($n);
if ($n%10==1 && $n%100!=11) { return 0; } else if ($n%10>=2 && $n%10<=4 && ($n%100<12 || $n%100>14)) { return 1; } else if ($n%10==0 || ($n%10>=5 && $n%10<=9) || ($n%100>=11 && $n%100<=14)) { return 2; } else { return 3; }
}}

View file

@ -29,10 +29,10 @@ function getWeather($loc, $units = 'metric', $lang = 'en', $appid = '', $cacheti
$now = new DateTime();
if (!is_null($cached)) {
$cdate = DI::pConfig()->get(DI::userSession()->getLocalUserId(), 'curweather', 'last');
$cdate = (int) DI::pConfig()->get(DI::userSession()->getLocalUserId(), 'curweather', 'last');
$cached = unserialize($cached);
if ($cdate + $cachetime > $now->getTimestamp()) {
if ($cdate + (int) $cachetime > $now->getTimestamp()) {
return $cached;
}
}

View file

@ -0,0 +1,123 @@
# ADDON curweather
# Copyright (C)
# This file is distributed under the same license as the Friendica curweather addon package.
#
#
# Translators:
msgid ""
msgstr ""
"Project-Id-Version: friendica\n"
"Report-Msgid-Bugs-To: \n"
"POT-Creation-Date: 2021-11-21 19:14-0500\n"
"PO-Revision-Date: 2014-06-22 11:34+0000\n"
"Last-Translator: FULL NAME <EMAIL@ADDRESS>\n"
"Language-Team: Bulgarian (http://app.transifex.com/Friendica/friendica/language/bg/)\n"
"MIME-Version: 1.0\n"
"Content-Type: text/plain; charset=UTF-8\n"
"Content-Transfer-Encoding: 8bit\n"
"Language: bg\n"
"Plural-Forms: nplurals=2; plural=(n != 1);\n"
#: curweather.php:47
msgid "Error fetching weather data. Error was: "
msgstr ""
#: curweather.php:130
msgid "Current Weather"
msgstr ""
#: curweather.php:137
msgid "Relative Humidity"
msgstr ""
#: curweather.php:138
msgid "Pressure"
msgstr ""
#: curweather.php:139
msgid "Wind"
msgstr ""
#: curweather.php:140
msgid "Last Updated"
msgstr ""
#: curweather.php:141
msgid "Data by"
msgstr ""
#: curweather.php:142
msgid "Show on map"
msgstr ""
#: curweather.php:147
msgid "There was a problem accessing the weather data. But have a look"
msgstr ""
#: curweather.php:149
msgid "at OpenWeatherMap"
msgstr ""
#: curweather.php:178
msgid "No APPID found, please contact your admin to obtain one."
msgstr ""
#: curweather.php:188
msgid "Enter either the name of your location or the zip code."
msgstr ""
#: curweather.php:189
msgid "Your Location"
msgstr ""
#: curweather.php:189
msgid ""
"Identifier of your location (name or zip code), e.g. <em>Berlin,DE</em> or "
"<em>14476,DE</em>."
msgstr ""
#: curweather.php:190
msgid "Units"
msgstr ""
#: curweather.php:190
msgid "select if the temperature should be displayed in &deg;C or &deg;F"
msgstr ""
#: curweather.php:191
msgid "Show weather data"
msgstr ""
#: curweather.php:196
msgid "Current Weather Settings"
msgstr ""
#: curweather.php:227
msgid "Save Settings"
msgstr ""
#: curweather.php:230
msgid "Caching Interval"
msgstr ""
#: curweather.php:232
msgid ""
"For how long should the weather data be cached? Choose according your "
"OpenWeatherMap account type."
msgstr ""
#: curweather.php:233
msgid "no cache"
msgstr ""
#: curweather.php:234 curweather.php:235 curweather.php:236 curweather.php:237
msgid "minutes"
msgstr ""
#: curweather.php:240
msgid "Your APPID"
msgstr ""
#: curweather.php:240
msgid "Your API key provided by OpenWeatherMap"
msgstr ""

View file

@ -0,0 +1,7 @@
<?php
if(! function_exists("string_plural_select_bg")) {
function string_plural_select_bg($n){
$n = intval($n);
return intval($n != 1);
}}

View file

@ -0,0 +1,123 @@
# ADDON curweather
# Copyright (C)
# This file is distributed under the same license as the Friendica curweather addon package.
#
#
# Translators:
msgid ""
msgstr ""
"Project-Id-Version: friendica\n"
"Report-Msgid-Bugs-To: \n"
"POT-Creation-Date: 2021-11-21 19:14-0500\n"
"PO-Revision-Date: 2014-06-22 11:34+0000\n"
"Last-Translator: FULL NAME <EMAIL@ADDRESS>\n"
"Language-Team: Esperanto (http://app.transifex.com/Friendica/friendica/language/eo/)\n"
"MIME-Version: 1.0\n"
"Content-Type: text/plain; charset=UTF-8\n"
"Content-Transfer-Encoding: 8bit\n"
"Language: eo\n"
"Plural-Forms: nplurals=2; plural=(n != 1);\n"
#: curweather.php:47
msgid "Error fetching weather data. Error was: "
msgstr ""
#: curweather.php:130
msgid "Current Weather"
msgstr ""
#: curweather.php:137
msgid "Relative Humidity"
msgstr ""
#: curweather.php:138
msgid "Pressure"
msgstr ""
#: curweather.php:139
msgid "Wind"
msgstr ""
#: curweather.php:140
msgid "Last Updated"
msgstr ""
#: curweather.php:141
msgid "Data by"
msgstr ""
#: curweather.php:142
msgid "Show on map"
msgstr ""
#: curweather.php:147
msgid "There was a problem accessing the weather data. But have a look"
msgstr ""
#: curweather.php:149
msgid "at OpenWeatherMap"
msgstr ""
#: curweather.php:178
msgid "No APPID found, please contact your admin to obtain one."
msgstr ""
#: curweather.php:188
msgid "Enter either the name of your location or the zip code."
msgstr ""
#: curweather.php:189
msgid "Your Location"
msgstr ""
#: curweather.php:189
msgid ""
"Identifier of your location (name or zip code), e.g. <em>Berlin,DE</em> or "
"<em>14476,DE</em>."
msgstr ""
#: curweather.php:190
msgid "Units"
msgstr ""
#: curweather.php:190
msgid "select if the temperature should be displayed in &deg;C or &deg;F"
msgstr ""
#: curweather.php:191
msgid "Show weather data"
msgstr ""
#: curweather.php:196
msgid "Current Weather Settings"
msgstr ""
#: curweather.php:227
msgid "Save Settings"
msgstr ""
#: curweather.php:230
msgid "Caching Interval"
msgstr ""
#: curweather.php:232
msgid ""
"For how long should the weather data be cached? Choose according your "
"OpenWeatherMap account type."
msgstr ""
#: curweather.php:233
msgid "no cache"
msgstr ""
#: curweather.php:234 curweather.php:235 curweather.php:236 curweather.php:237
msgid "minutes"
msgstr ""
#: curweather.php:240
msgid "Your APPID"
msgstr ""
#: curweather.php:240
msgid "Your API key provided by OpenWeatherMap"
msgstr ""

View file

@ -1,3 +1,7 @@
<?php
$a->strings["Submit"] = "Sendi";
<?php
if(! function_exists("string_plural_select_eo")) {
function string_plural_select_eo($n){
$n = intval($n);
return intval($n != 1);
}}

View file

@ -0,0 +1,123 @@
# ADDON curweather
# Copyright (C)
# This file is distributed under the same license as the Friendica curweather addon package.
#
#
# Translators:
msgid ""
msgstr ""
"Project-Id-Version: friendica\n"
"Report-Msgid-Bugs-To: \n"
"POT-Creation-Date: 2021-11-21 19:14-0500\n"
"PO-Revision-Date: 2014-06-22 11:34+0000\n"
"Last-Translator: FULL NAME <EMAIL@ADDRESS>\n"
"Language-Team: Estonian (http://app.transifex.com/Friendica/friendica/language/et/)\n"
"MIME-Version: 1.0\n"
"Content-Type: text/plain; charset=UTF-8\n"
"Content-Transfer-Encoding: 8bit\n"
"Language: et\n"
"Plural-Forms: nplurals=2; plural=(n != 1);\n"
#: curweather.php:47
msgid "Error fetching weather data. Error was: "
msgstr ""
#: curweather.php:130
msgid "Current Weather"
msgstr ""
#: curweather.php:137
msgid "Relative Humidity"
msgstr ""
#: curweather.php:138
msgid "Pressure"
msgstr ""
#: curweather.php:139
msgid "Wind"
msgstr ""
#: curweather.php:140
msgid "Last Updated"
msgstr ""
#: curweather.php:141
msgid "Data by"
msgstr ""
#: curweather.php:142
msgid "Show on map"
msgstr ""
#: curweather.php:147
msgid "There was a problem accessing the weather data. But have a look"
msgstr ""
#: curweather.php:149
msgid "at OpenWeatherMap"
msgstr ""
#: curweather.php:178
msgid "No APPID found, please contact your admin to obtain one."
msgstr ""
#: curweather.php:188
msgid "Enter either the name of your location or the zip code."
msgstr ""
#: curweather.php:189
msgid "Your Location"
msgstr ""
#: curweather.php:189
msgid ""
"Identifier of your location (name or zip code), e.g. <em>Berlin,DE</em> or "
"<em>14476,DE</em>."
msgstr ""
#: curweather.php:190
msgid "Units"
msgstr ""
#: curweather.php:190
msgid "select if the temperature should be displayed in &deg;C or &deg;F"
msgstr ""
#: curweather.php:191
msgid "Show weather data"
msgstr ""
#: curweather.php:196
msgid "Current Weather Settings"
msgstr ""
#: curweather.php:227
msgid "Save Settings"
msgstr ""
#: curweather.php:230
msgid "Caching Interval"
msgstr ""
#: curweather.php:232
msgid ""
"For how long should the weather data be cached? Choose according your "
"OpenWeatherMap account type."
msgstr ""
#: curweather.php:233
msgid "no cache"
msgstr ""
#: curweather.php:234 curweather.php:235 curweather.php:236 curweather.php:237
msgid "minutes"
msgstr ""
#: curweather.php:240
msgid "Your APPID"
msgstr ""
#: curweather.php:240
msgid "Your API key provided by OpenWeatherMap"
msgstr ""

View file

@ -0,0 +1,7 @@
<?php
if(! function_exists("string_plural_select_et")) {
function string_plural_select_et($n){
$n = intval($n);
return intval($n != 1);
}}

View file

@ -0,0 +1,123 @@
# ADDON curweather
# Copyright (C)
# This file is distributed under the same license as the Friendica curweather addon package.
#
#
# Translators:
msgid ""
msgstr ""
"Project-Id-Version: friendica\n"
"Report-Msgid-Bugs-To: \n"
"POT-Creation-Date: 2021-11-21 19:14-0500\n"
"PO-Revision-Date: 2014-06-22 11:34+0000\n"
"Last-Translator: FULL NAME <EMAIL@ADDRESS>\n"
"Language-Team: Gaelic, Scottish (http://app.transifex.com/Friendica/friendica/language/gd/)\n"
"MIME-Version: 1.0\n"
"Content-Type: text/plain; charset=UTF-8\n"
"Content-Transfer-Encoding: 8bit\n"
"Language: gd\n"
"Plural-Forms: nplurals=4; plural=(n==1 || n==11) ? 0 : (n==2 || n==12) ? 1 : (n > 2 && n < 20) ? 2 : 3;\n"
#: curweather.php:47
msgid "Error fetching weather data. Error was: "
msgstr ""
#: curweather.php:130
msgid "Current Weather"
msgstr ""
#: curweather.php:137
msgid "Relative Humidity"
msgstr ""
#: curweather.php:138
msgid "Pressure"
msgstr ""
#: curweather.php:139
msgid "Wind"
msgstr ""
#: curweather.php:140
msgid "Last Updated"
msgstr ""
#: curweather.php:141
msgid "Data by"
msgstr ""
#: curweather.php:142
msgid "Show on map"
msgstr ""
#: curweather.php:147
msgid "There was a problem accessing the weather data. But have a look"
msgstr ""
#: curweather.php:149
msgid "at OpenWeatherMap"
msgstr ""
#: curweather.php:178
msgid "No APPID found, please contact your admin to obtain one."
msgstr ""
#: curweather.php:188
msgid "Enter either the name of your location or the zip code."
msgstr ""
#: curweather.php:189
msgid "Your Location"
msgstr ""
#: curweather.php:189
msgid ""
"Identifier of your location (name or zip code), e.g. <em>Berlin,DE</em> or "
"<em>14476,DE</em>."
msgstr ""
#: curweather.php:190
msgid "Units"
msgstr ""
#: curweather.php:190
msgid "select if the temperature should be displayed in &deg;C or &deg;F"
msgstr ""
#: curweather.php:191
msgid "Show weather data"
msgstr ""
#: curweather.php:196
msgid "Current Weather Settings"
msgstr ""
#: curweather.php:227
msgid "Save Settings"
msgstr ""
#: curweather.php:230
msgid "Caching Interval"
msgstr ""
#: curweather.php:232
msgid ""
"For how long should the weather data be cached? Choose according your "
"OpenWeatherMap account type."
msgstr ""
#: curweather.php:233
msgid "no cache"
msgstr ""
#: curweather.php:234 curweather.php:235 curweather.php:236 curweather.php:237
msgid "minutes"
msgstr ""
#: curweather.php:240
msgid "Your APPID"
msgstr ""
#: curweather.php:240
msgid "Your API key provided by OpenWeatherMap"
msgstr ""

View file

@ -0,0 +1,7 @@
<?php
if(! function_exists("string_plural_select_gd")) {
function string_plural_select_gd($n){
$n = intval($n);
if (($n==1 || $n==11)) { return 0; } else if (($n==2 || $n==12)) { return 1; } else if (($n > 2 && $n < 20)) { return 2; } else { return 3; }
}}

View file

@ -0,0 +1,123 @@
# ADDON curweather
# Copyright (C)
# This file is distributed under the same license as the Friendica curweather addon package.
#
#
# Translators:
msgid ""
msgstr ""
"Project-Id-Version: friendica\n"
"Report-Msgid-Bugs-To: \n"
"POT-Creation-Date: 2021-11-21 19:14-0500\n"
"PO-Revision-Date: 2014-06-22 11:34+0000\n"
"Last-Translator: FULL NAME <EMAIL@ADDRESS>\n"
"Language-Team: Icelandic (http://app.transifex.com/Friendica/friendica/language/is/)\n"
"MIME-Version: 1.0\n"
"Content-Type: text/plain; charset=UTF-8\n"
"Content-Transfer-Encoding: 8bit\n"
"Language: is\n"
"Plural-Forms: nplurals=2; plural=(n % 10 != 1 || n % 100 == 11);\n"
#: curweather.php:47
msgid "Error fetching weather data. Error was: "
msgstr ""
#: curweather.php:130
msgid "Current Weather"
msgstr ""
#: curweather.php:137
msgid "Relative Humidity"
msgstr ""
#: curweather.php:138
msgid "Pressure"
msgstr ""
#: curweather.php:139
msgid "Wind"
msgstr ""
#: curweather.php:140
msgid "Last Updated"
msgstr ""
#: curweather.php:141
msgid "Data by"
msgstr ""
#: curweather.php:142
msgid "Show on map"
msgstr ""
#: curweather.php:147
msgid "There was a problem accessing the weather data. But have a look"
msgstr ""
#: curweather.php:149
msgid "at OpenWeatherMap"
msgstr ""
#: curweather.php:178
msgid "No APPID found, please contact your admin to obtain one."
msgstr ""
#: curweather.php:188
msgid "Enter either the name of your location or the zip code."
msgstr ""
#: curweather.php:189
msgid "Your Location"
msgstr ""
#: curweather.php:189
msgid ""
"Identifier of your location (name or zip code), e.g. <em>Berlin,DE</em> or "
"<em>14476,DE</em>."
msgstr ""
#: curweather.php:190
msgid "Units"
msgstr ""
#: curweather.php:190
msgid "select if the temperature should be displayed in &deg;C or &deg;F"
msgstr ""
#: curweather.php:191
msgid "Show weather data"
msgstr ""
#: curweather.php:196
msgid "Current Weather Settings"
msgstr ""
#: curweather.php:227
msgid "Save Settings"
msgstr ""
#: curweather.php:230
msgid "Caching Interval"
msgstr ""
#: curweather.php:232
msgid ""
"For how long should the weather data be cached? Choose according your "
"OpenWeatherMap account type."
msgstr ""
#: curweather.php:233
msgid "no cache"
msgstr ""
#: curweather.php:234 curweather.php:235 curweather.php:236 curweather.php:237
msgid "minutes"
msgstr ""
#: curweather.php:240
msgid "Your APPID"
msgstr ""
#: curweather.php:240
msgid "Your API key provided by OpenWeatherMap"
msgstr ""

View file

@ -1,3 +1,7 @@
<?php
$a->strings["Submit"] = "Senda inn";
<?php
if(! function_exists("string_plural_select_is")) {
function string_plural_select_is($n){
$n = intval($n);
return intval($n % 10 != 1 || $n % 100 == 11);
}}

View file

@ -33,7 +33,6 @@ class Diaspora_Connection {
}
$this->cookiejar = tempnam(System::getTempPath(), 'cookies');
return $this;
}
public function __destruct() {

View file

@ -9,6 +9,8 @@ use Friendica\Core\System;
class Diasphp {
private $cookiejar;
private $token_regex;
private $pod;
function __construct($pod) {
$this->token_regex = '/content="(.*?)" name="csrf-token/';

View file

@ -9,10 +9,8 @@
require_once 'addon/diaspora/Diaspora_Connection.php';
use Friendica\App;
use Friendica\Content\Text\BBCode;
use Friendica\Core\Hook;
use Friendica\Core\Logger;
use Friendica\Core\Renderer;
use Friendica\Database\DBA;
use Friendica\Core\Worker;
@ -187,7 +185,7 @@ function diaspora_send(array &$b)
{
$hostname = DI::baseUrl()->getHost();
Logger::notice('diaspora_send: invoked');
DI::logger()->notice('diaspora_send: invoked');
if ($b['deleted'] || ($b['private'] == Item::PRIVATE) || ($b['created'] !== $b['edited'])) {
return;
@ -197,6 +195,10 @@ function diaspora_send(array &$b)
return;
}
if (Item::isGroupPost($b['uri-id'])) {
return;
}
if ($b['parent'] != $b['id']) {
return;
}
@ -211,14 +213,14 @@ function diaspora_send(array &$b)
return;
}
Logger::info('diaspora_send: prepare posting');
DI::logger()->info('diaspora_send: prepare posting');
$handle = DI::pConfig()->get($b['uid'], 'diaspora', 'handle');
$password = DI::pConfig()->get($b['uid'], 'diaspora', 'password');
$aspect = DI::pConfig()->get($b['uid'], 'diaspora', 'aspect');
if ($handle && $password) {
Logger::info('diaspora_send: all values seem to be okay');
DI::logger()->info('diaspora_send: all values seem to be okay');
$title = $b['title'];
$body = $b['body'];
@ -249,20 +251,20 @@ function diaspora_send(array &$b)
require_once "addon/diaspora/diasphp.php";
try {
Logger::info('diaspora_send: prepare');
DI::logger()->info('diaspora_send: prepare');
$conn = new Diaspora_Connection($handle, $password);
Logger::info('diaspora_send: try to log in ' . $handle);
DI::logger()->info('diaspora_send: try to log in ' . $handle);
$conn->logIn();
Logger::info('diaspora_send: try to send ' . $body);
DI::logger()->info('diaspora_send: try to send ' . $body);
$conn->provider = $hostname;
$conn->postStatusMessage($body, $aspect);
Logger::notice('diaspora_send: success');
DI::logger()->notice('diaspora_send: success');
} catch (Exception $e) {
Logger::notice("diaspora_send: Error submitting the post: " . $e->getMessage());
DI::logger()->notice("diaspora_send: Error submitting the post: " . $e->getMessage());
Logger::info('diaspora_send: requeueing ' . $b['uid']);
DI::logger()->info('diaspora_send: requeueing ' . $b['uid']);
Worker::defer();
}

View file

@ -0,0 +1,101 @@
# ADDON diaspora
# Copyright (C)
# This file is distributed under the same license as the Friendica diaspora addon package.
#
#
# Translators:
msgid ""
msgstr ""
"Project-Id-Version: friendica\n"
"Report-Msgid-Bugs-To: \n"
"POT-Creation-Date: 2023-06-03 15:48-0400\n"
"PO-Revision-Date: 2014-06-22 11:39+0000\n"
"Last-Translator: FULL NAME <EMAIL@ADDRESS>\n"
"Language-Team: Bulgarian (http://app.transifex.com/Friendica/friendica/language/bg/)\n"
"MIME-Version: 1.0\n"
"Content-Type: text/plain; charset=UTF-8\n"
"Content-Transfer-Encoding: 8bit\n"
"Language: bg\n"
"Plural-Forms: nplurals=2; plural=(n != 1);\n"
#: diaspora.php:43
msgid "Post to Diaspora"
msgstr ""
#: diaspora.php:66
#, php-format
msgid ""
"Please remember: You can always be reached from Diaspora with your Friendica"
" handle <strong>%s</strong>. "
msgstr ""
#: diaspora.php:67
msgid ""
"This connector is only meant if you still want to use your old Diaspora "
"account for some time. "
msgstr ""
#: diaspora.php:68
#, php-format
msgid ""
"However, it is preferred that you tell your Diaspora contacts the new handle"
" <strong>%s</strong> instead."
msgstr ""
#: diaspora.php:78
msgid "All aspects"
msgstr ""
#: diaspora.php:79
msgid "Public"
msgstr ""
#: diaspora.php:85
msgid "Post to aspect:"
msgstr ""
#: diaspora.php:86
#, php-format
msgid "Connected with your Diaspora account <strong>%s</strong>"
msgstr ""
#: diaspora.php:89
msgid ""
"Can't login to your Diaspora account. Please check handle (in the format "
"user@domain.tld) and password."
msgstr ""
#: diaspora.php:96
msgid "Information"
msgstr ""
#: diaspora.php:97
msgid "Error"
msgstr ""
#: diaspora.php:103
msgid "Enable Diaspora Post Addon"
msgstr ""
#: diaspora.php:104
msgid "Diaspora handle"
msgstr ""
#: diaspora.php:105
msgid "Diaspora password"
msgstr ""
#: diaspora.php:105
msgid ""
"Privacy notice: Your Diaspora password will be stored unencrypted to "
"authenticate you with your Diaspora pod. This means your Friendica node "
"administrator can have access to it."
msgstr ""
#: diaspora.php:107
msgid "Post to Diaspora by default"
msgstr ""
#: diaspora.php:112
msgid "Diaspora Export"
msgstr ""

View file

@ -0,0 +1,7 @@
<?php
if(! function_exists("string_plural_select_bg")) {
function string_plural_select_bg($n){
$n = intval($n);
return intval($n != 1);
}}

View file

@ -0,0 +1,101 @@
# ADDON diaspora
# Copyright (C)
# This file is distributed under the same license as the Friendica diaspora addon package.
#
#
# Translators:
msgid ""
msgstr ""
"Project-Id-Version: friendica\n"
"Report-Msgid-Bugs-To: \n"
"POT-Creation-Date: 2023-06-03 15:48-0400\n"
"PO-Revision-Date: 2014-06-22 11:39+0000\n"
"Last-Translator: FULL NAME <EMAIL@ADDRESS>\n"
"Language-Team: Esperanto (http://app.transifex.com/Friendica/friendica/language/eo/)\n"
"MIME-Version: 1.0\n"
"Content-Type: text/plain; charset=UTF-8\n"
"Content-Transfer-Encoding: 8bit\n"
"Language: eo\n"
"Plural-Forms: nplurals=2; plural=(n != 1);\n"
#: diaspora.php:43
msgid "Post to Diaspora"
msgstr ""
#: diaspora.php:66
#, php-format
msgid ""
"Please remember: You can always be reached from Diaspora with your Friendica"
" handle <strong>%s</strong>. "
msgstr ""
#: diaspora.php:67
msgid ""
"This connector is only meant if you still want to use your old Diaspora "
"account for some time. "
msgstr ""
#: diaspora.php:68
#, php-format
msgid ""
"However, it is preferred that you tell your Diaspora contacts the new handle"
" <strong>%s</strong> instead."
msgstr ""
#: diaspora.php:78
msgid "All aspects"
msgstr ""
#: diaspora.php:79
msgid "Public"
msgstr ""
#: diaspora.php:85
msgid "Post to aspect:"
msgstr ""
#: diaspora.php:86
#, php-format
msgid "Connected with your Diaspora account <strong>%s</strong>"
msgstr ""
#: diaspora.php:89
msgid ""
"Can't login to your Diaspora account. Please check handle (in the format "
"user@domain.tld) and password."
msgstr ""
#: diaspora.php:96
msgid "Information"
msgstr ""
#: diaspora.php:97
msgid "Error"
msgstr ""
#: diaspora.php:103
msgid "Enable Diaspora Post Addon"
msgstr ""
#: diaspora.php:104
msgid "Diaspora handle"
msgstr ""
#: diaspora.php:105
msgid "Diaspora password"
msgstr ""
#: diaspora.php:105
msgid ""
"Privacy notice: Your Diaspora password will be stored unencrypted to "
"authenticate you with your Diaspora pod. This means your Friendica node "
"administrator can have access to it."
msgstr ""
#: diaspora.php:107
msgid "Post to Diaspora by default"
msgstr ""
#: diaspora.php:112
msgid "Diaspora Export"
msgstr ""

View file

@ -0,0 +1,7 @@
<?php
if(! function_exists("string_plural_select_eo")) {
function string_plural_select_eo($n){
$n = intval($n);
return intval($n != 1);
}}

View file

@ -0,0 +1,101 @@
# ADDON diaspora
# Copyright (C)
# This file is distributed under the same license as the Friendica diaspora addon package.
#
#
# Translators:
msgid ""
msgstr ""
"Project-Id-Version: friendica\n"
"Report-Msgid-Bugs-To: \n"
"POT-Creation-Date: 2023-06-03 15:48-0400\n"
"PO-Revision-Date: 2014-06-22 11:39+0000\n"
"Last-Translator: FULL NAME <EMAIL@ADDRESS>\n"
"Language-Team: Estonian (http://app.transifex.com/Friendica/friendica/language/et/)\n"
"MIME-Version: 1.0\n"
"Content-Type: text/plain; charset=UTF-8\n"
"Content-Transfer-Encoding: 8bit\n"
"Language: et\n"
"Plural-Forms: nplurals=2; plural=(n != 1);\n"
#: diaspora.php:43
msgid "Post to Diaspora"
msgstr ""
#: diaspora.php:66
#, php-format
msgid ""
"Please remember: You can always be reached from Diaspora with your Friendica"
" handle <strong>%s</strong>. "
msgstr ""
#: diaspora.php:67
msgid ""
"This connector is only meant if you still want to use your old Diaspora "
"account for some time. "
msgstr ""
#: diaspora.php:68
#, php-format
msgid ""
"However, it is preferred that you tell your Diaspora contacts the new handle"
" <strong>%s</strong> instead."
msgstr ""
#: diaspora.php:78
msgid "All aspects"
msgstr ""
#: diaspora.php:79
msgid "Public"
msgstr ""
#: diaspora.php:85
msgid "Post to aspect:"
msgstr ""
#: diaspora.php:86
#, php-format
msgid "Connected with your Diaspora account <strong>%s</strong>"
msgstr ""
#: diaspora.php:89
msgid ""
"Can't login to your Diaspora account. Please check handle (in the format "
"user@domain.tld) and password."
msgstr ""
#: diaspora.php:96
msgid "Information"
msgstr ""
#: diaspora.php:97
msgid "Error"
msgstr ""
#: diaspora.php:103
msgid "Enable Diaspora Post Addon"
msgstr ""
#: diaspora.php:104
msgid "Diaspora handle"
msgstr ""
#: diaspora.php:105
msgid "Diaspora password"
msgstr ""
#: diaspora.php:105
msgid ""
"Privacy notice: Your Diaspora password will be stored unencrypted to "
"authenticate you with your Diaspora pod. This means your Friendica node "
"administrator can have access to it."
msgstr ""
#: diaspora.php:107
msgid "Post to Diaspora by default"
msgstr ""
#: diaspora.php:112
msgid "Diaspora Export"
msgstr ""

View file

@ -0,0 +1,7 @@
<?php
if(! function_exists("string_plural_select_et")) {
function string_plural_select_et($n){
$n = intval($n);
return intval($n != 1);
}}

View file

@ -0,0 +1,101 @@
# ADDON diaspora
# Copyright (C)
# This file is distributed under the same license as the Friendica diaspora addon package.
#
#
# Translators:
msgid ""
msgstr ""
"Project-Id-Version: friendica\n"
"Report-Msgid-Bugs-To: \n"
"POT-Creation-Date: 2023-06-03 15:48-0400\n"
"PO-Revision-Date: 2014-06-22 11:39+0000\n"
"Last-Translator: FULL NAME <EMAIL@ADDRESS>\n"
"Language-Team: Gaelic, Scottish (http://app.transifex.com/Friendica/friendica/language/gd/)\n"
"MIME-Version: 1.0\n"
"Content-Type: text/plain; charset=UTF-8\n"
"Content-Transfer-Encoding: 8bit\n"
"Language: gd\n"
"Plural-Forms: nplurals=4; plural=(n==1 || n==11) ? 0 : (n==2 || n==12) ? 1 : (n > 2 && n < 20) ? 2 : 3;\n"
#: diaspora.php:43
msgid "Post to Diaspora"
msgstr ""
#: diaspora.php:66
#, php-format
msgid ""
"Please remember: You can always be reached from Diaspora with your Friendica"
" handle <strong>%s</strong>. "
msgstr ""
#: diaspora.php:67
msgid ""
"This connector is only meant if you still want to use your old Diaspora "
"account for some time. "
msgstr ""
#: diaspora.php:68
#, php-format
msgid ""
"However, it is preferred that you tell your Diaspora contacts the new handle"
" <strong>%s</strong> instead."
msgstr ""
#: diaspora.php:78
msgid "All aspects"
msgstr ""
#: diaspora.php:79
msgid "Public"
msgstr ""
#: diaspora.php:85
msgid "Post to aspect:"
msgstr ""
#: diaspora.php:86
#, php-format
msgid "Connected with your Diaspora account <strong>%s</strong>"
msgstr ""
#: diaspora.php:89
msgid ""
"Can't login to your Diaspora account. Please check handle (in the format "
"user@domain.tld) and password."
msgstr ""
#: diaspora.php:96
msgid "Information"
msgstr ""
#: diaspora.php:97
msgid "Error"
msgstr ""
#: diaspora.php:103
msgid "Enable Diaspora Post Addon"
msgstr ""
#: diaspora.php:104
msgid "Diaspora handle"
msgstr ""
#: diaspora.php:105
msgid "Diaspora password"
msgstr ""
#: diaspora.php:105
msgid ""
"Privacy notice: Your Diaspora password will be stored unencrypted to "
"authenticate you with your Diaspora pod. This means your Friendica node "
"administrator can have access to it."
msgstr ""
#: diaspora.php:107
msgid "Post to Diaspora by default"
msgstr ""
#: diaspora.php:112
msgid "Diaspora Export"
msgstr ""

View file

@ -0,0 +1,7 @@
<?php
if(! function_exists("string_plural_select_gd")) {
function string_plural_select_gd($n){
$n = intval($n);
if (($n==1 || $n==11)) { return 0; } else if (($n==2 || $n==12)) { return 1; } else if (($n > 2 && $n < 20)) { return 2; } else { return 3; }
}}

View file

@ -4,100 +4,101 @@
#
#
# Translators:
# Piotr Strębski <strebski@gmail.com>, 2022
# Bartosz Kozień, 2025
# Piotr Strebski <strebski@gmail.com>, 2022
# Waldemar Stoczkowski, 2018,2020
msgid ""
msgstr ""
"Project-Id-Version: friendica\n"
"Report-Msgid-Bugs-To: \n"
"POT-Creation-Date: 2021-11-21 19:17-0500\n"
"POT-Creation-Date: 2023-06-03 15:48-0400\n"
"PO-Revision-Date: 2014-06-22 11:39+0000\n"
"Last-Translator: Piotr Strębski <strebski@gmail.com>, 2022\n"
"Language-Team: Polish (http://www.transifex.com/Friendica/friendica/language/pl/)\n"
"Last-Translator: Bartosz Kozień, 2025\n"
"Language-Team: Polish (http://app.transifex.com/Friendica/friendica/language/pl/)\n"
"MIME-Version: 1.0\n"
"Content-Type: text/plain; charset=UTF-8\n"
"Content-Transfer-Encoding: 8bit\n"
"Language: pl\n"
"Plural-Forms: nplurals=4; plural=(n==1 ? 0 : (n%10>=2 && n%10<=4) && (n%100<12 || n%100>14) ? 1 : n!=1 && (n%10>=0 && n%10<=1) || (n%10>=5 && n%10<=9) || (n%100>=12 && n%100<=14) ? 2 : 3);\n"
#: diaspora.php:44
#: diaspora.php:43
msgid "Post to Diaspora"
msgstr "Napisz do Diaspory"
#: diaspora.php:67
#: diaspora.php:66
#, php-format
msgid ""
"Please remember: You can always be reached from Diaspora with your Friendica"
" handle <strong>%s</strong>. "
msgstr "Pamiętaj: Zawsze można do Ciebie dotrzeć z Diaspory za pomocą uchwytu Friendica <strong>%s</strong>. "
#: diaspora.php:68
#: diaspora.php:67
msgid ""
"This connector is only meant if you still want to use your old Diaspora "
"account for some time. "
msgstr "Ten łącznik jest przeznaczony do tego, gdy nadal chcesz korzystać ze starego konta Diaspora przez jakiś czas."
#: diaspora.php:69
#: diaspora.php:68
#, php-format
msgid ""
"However, it is preferred that you tell your Diaspora contacts the new handle"
" <strong>%s</strong> instead."
msgstr "Jednak zaleca się, aby zamiast tego poinformować swoją Diasporę o kontakt z nowym uchwytem <strong>%s</strong>."
#: diaspora.php:79
#: diaspora.php:78
msgid "All aspects"
msgstr "Wszystkie aspekty"
#: diaspora.php:80
#: diaspora.php:79
msgid "Public"
msgstr "Publiczny"
#: diaspora.php:86
#: diaspora.php:85
msgid "Post to aspect:"
msgstr "Napisz do aspektu:"
#: diaspora.php:87
#: diaspora.php:86
#, php-format
msgid "Connected with your Diaspora account <strong>%s</strong>"
msgstr "Połączony ze swoim kontem Diaspora <strong>%s</strong>"
#: diaspora.php:90
#: diaspora.php:89
msgid ""
"Can't login to your Diaspora account. Please check handle (in the format "
"user@domain.tld) and password."
msgstr "Nie można zalogować się na Twoje konto w Diasporze. Sprawdź uchwyt (w formacie użytkownik@domena.tld) i hasło."
#: diaspora.php:97
#: diaspora.php:96
msgid "Information"
msgstr "Informacja"
#: diaspora.php:98
#: diaspora.php:97
msgid "Error"
msgstr "Błąd"
#: diaspora.php:104
#: diaspora.php:103
msgid "Enable Diaspora Post Addon"
msgstr "Włącz dodatek Diaspora"
#: diaspora.php:105
#: diaspora.php:104
msgid "Diaspora handle"
msgstr "Uchwyt Diaspory"
#: diaspora.php:106
#: diaspora.php:105
msgid "Diaspora password"
msgstr "Hasło Diaspora"
#: diaspora.php:106
#: diaspora.php:105
msgid ""
"Privacy notice: Your Diaspora password will be stored unencrypted to "
"authenticate you with your Diaspora pod. This means your Friendica node "
"administrator can have access to it."
msgstr "Informacja o ochronie prywatności: Twoje hasło Diaspora będzie przechowywane w postaci niezaszyfrowanej w celu uwierzytelnienia użytkownika za pomocą Diaspora. Oznacza to, że administrator węzła Friendica może mieć do niego dostęp."
msgstr "Informacja o prywatności: Twoje hasło Diaspora będzie przechowywane w postaci niezaszyfrowanej w celu uwierzytelnienia użytkownika w instancji Diaspora. Oznacza to, że administrator instancji Friendica może mieć do niego dostęp."
#: diaspora.php:108
#: diaspora.php:107
msgid "Post to Diaspora by default"
msgstr "Wyślij domyślnie do Diaspory"
#: diaspora.php:113
#: diaspora.php:112
msgid "Diaspora Export"
msgstr "Eksportuj do Diaspory"

View file

@ -19,6 +19,6 @@ $a->strings['Error'] = 'Błąd';
$a->strings['Enable Diaspora Post Addon'] = 'Włącz dodatek Diaspora';
$a->strings['Diaspora handle'] = 'Uchwyt Diaspory';
$a->strings['Diaspora password'] = 'Hasło Diaspora';
$a->strings['Privacy notice: Your Diaspora password will be stored unencrypted to authenticate you with your Diaspora pod. This means your Friendica node administrator can have access to it.'] = 'Informacja o ochronie prywatności: Twoje hasło Diaspora będzie przechowywane w postaci niezaszyfrowanej w celu uwierzytelnienia użytkownika za pomocą Diaspora. Oznacza to, że administrator węzła Friendica może mieć do niego dostęp.';
$a->strings['Privacy notice: Your Diaspora password will be stored unencrypted to authenticate you with your Diaspora pod. This means your Friendica node administrator can have access to it.'] = 'Informacja o prywatności: Twoje hasło Diaspora będzie przechowywane w postaci niezaszyfrowanej w celu uwierzytelnienia użytkownika w instancji Diaspora. Oznacza to, że administrator instancji Friendica może mieć do niego dostęp.';
$a->strings['Post to Diaspora by default'] = 'Wyślij domyślnie do Diaspory';
$a->strings['Diaspora Export'] = 'Eksportuj do Diaspory';

View file

@ -8,10 +8,8 @@
*
*/
use Friendica\App;
use Friendica\Content\Text\Markdown;
use Friendica\Core\Hook;
use Friendica\Core\Logger;
use Friendica\Core\Protocol;
use Friendica\Core\Renderer;
use Friendica\Database\DBA;
@ -80,13 +78,13 @@ function discourse_email_getmessage(&$message)
// We do assume that all Discourse servers are running with SSL
if (preg_match('=topic/(.*\d)/(.*\d)@(.*)=', $message['item']['uri'], $matches) &&
discourse_fetch_post_from_api($message, $matches[2], $matches[3])) {
Logger::info('Fetched comment via API (message-id mode)', ['host' => $matches[3], 'topic' => $matches[1], 'post' => $matches[2]]);
DI::logger()->info('Fetched comment via API (message-id mode)', ['host' => $matches[3], 'topic' => $matches[1], 'post' => $matches[2]]);
return;
}
if (preg_match('=topic/(.*\d)@(.*)=', $message['item']['uri'], $matches) &&
discourse_fetch_topic_from_api($message, 'https://' . $matches[2], $matches[1], 1)) {
Logger::info('Fetched starting post via API (message-id mode)', ['host' => $matches[2], 'topic' => $matches[1]]);
DI::logger()->info('Fetched starting post via API (message-id mode)', ['host' => $matches[2], 'topic' => $matches[1]]);
return;
}
@ -96,16 +94,16 @@ function discourse_email_getmessage(&$message)
}
if (empty($message['item']['plink']) || !preg_match('=(http.*)/t/.*/(.*\d)/(.*\d)=', $message['item']['plink'], $matches)) {
Logger::info('This is no Discourse post');
DI::logger()->info('This is no Discourse post');
return;
}
if (discourse_fetch_topic_from_api($message, $matches[1], $matches[2], $matches[3])) {
Logger::info('Fetched post via API (plink mode)', ['host' => $matches[1], 'topic' => $matches[2], 'id' => $matches[3]]);
DI::logger()->info('Fetched post via API (plink mode)', ['host' => $matches[1], 'topic' => $matches[2], 'id' => $matches[3]]);
return;
}
Logger::info('Fallback mode', ['plink' => $message['item']['plink']]);
DI::logger()->info('Fallback mode', ['plink' => $message['item']['plink']]);
// Search in the HTML part for the discourse entry and the author profile
if (!empty($message['html'])) {
$message = discourse_get_html($message);
@ -122,7 +120,7 @@ function discourse_fetch_post($host, $topic, $pid)
$url = $host . '/t/' . $topic . '/' . $pid . '.json';
$curlResult = DI::httpClient()->get($url);
if (!$curlResult->isSuccess()) {
Logger::info('No success', ['url' => $url]);
DI::logger()->info('No success', ['url' => $url]);
return false;
}
@ -134,11 +132,11 @@ function discourse_fetch_post($host, $topic, $pid)
/// @todo Possibly fetch missing posts here
continue;
}
Logger::info('Got post data from topic', $post);
DI::logger()->info('Got post data from topic', $post);
return $post;
}
Logger::info('Post not found', ['host' => $host, 'topic' => $topic, 'pid' => $pid]);
DI::logger()->info('Post not found', ['host' => $host, 'topic' => $topic, 'pid' => $pid]);
return false;
}
@ -170,7 +168,7 @@ function discourse_fetch_post_from_api(&$message, $post, $host)
$message = discourse_process_post($message, $data, $hostaddr);
Logger::info('Got API data', $message);
DI::logger()->info('Got API data', $message);
return true;
}
@ -203,7 +201,7 @@ function discourse_get_user($post, $hostaddr)
$contact['url'] = $hostaddr . '/u/' . $contact['nick'];
$contact['nurl'] = Strings::normaliseLink($contact['url']);
$contact['baseurl'] = $hostaddr;
Logger::info('Contact', $contact);
DI::logger()->info('Contact', $contact);
$contact['id'] = Contact::getIdForURL($contact['url'], 0, false, $contact);
if (!empty($contact['id'])) {
$avatar = $contact['photo'];
@ -269,11 +267,11 @@ function discourse_get_html($message)
$div = $doc2->importNode($result->item(0), true);
$doc2->appendChild($div);
$message['html'] = $doc2->saveHTML();
Logger::info('Found html body', ['html' => $message['html']]);
DI::logger()->info('Found html body', ['html' => $message['html']]);
$profile = discourse_get_profile($xpath);
if (!empty($profile['url'])) {
Logger::info('Found profile', $profile);
DI::logger()->info('Found profile', $profile);
$message['item']['author-id'] = Contact::getIdForURL($profile['url'], 0, false, $profile);
$message['item']['author-link'] = $profile['url'];
$message['item']['author-name'] = $profile['name'];
@ -289,21 +287,21 @@ function discourse_get_text($message)
$text = str_replace("\r", '', $text);
$pos = strpos($text, "\n---\n");
if ($pos == 0) {
Logger::info('No separator found', ['text' => $text]);
DI::logger()->info('No separator found', ['text' => $text]);
return $message;
}
$message['text'] = trim(substr($text, 0, $pos));
Logger::info('Found text body', ['text' => $message['text']]);
DI::logger()->info('Found text body', ['text' => $message['text']]);
$message['text'] = Markdown::toBBCode($message['text']);
$text = substr($text, $pos);
Logger::info('Found footer', ['text' => $text]);
DI::logger()->info('Found footer', ['text' => $text]);
if (preg_match('=\((http.*/t/.*/.*\d/.*\d)\)=', $text, $link)) {
$message['item']['plink'] = $link[1];
Logger::info('Found plink', ['plink' => $message['item']['plink']]);
DI::logger()->info('Found plink', ['plink' => $message['item']['plink']]);
}
return $message;
}

View file

@ -8,10 +8,8 @@
* Author: Cat Gray <https://free-haven.org/profile/catness>
*/
use Friendica\App;
use Friendica\Content\Text\BBCode;
use Friendica\Core\Hook;
use Friendica\Core\Logger;
use Friendica\Core\Renderer;
use Friendica\DI;
use Friendica\Model\Item;
@ -127,6 +125,10 @@ function dwpost_send(array &$b)
return;
}
if (Item::isGroupPost($b['uri-id'])) {
return;
}
if ($b['parent'] != $b['id']) {
return;
}
@ -186,12 +188,12 @@ function dwpost_send(array &$b)
EOT;
Logger::debug('dwpost: data: ' . $xml);
DI::logger()->debug('dwpost: data: ' . $xml);
if ($dw_blog !== 'test') {
$x = DI::httpClient()->post($dw_blog, $xml, ['Content-Type' => 'text/xml'])->getBodyString();
}
Logger::info('posted to dreamwidth: ' . ($x) ? $x : '');
DI::logger()->info('posted to dreamwidth: ' . ($x) ? $x : '');
}
}

View file

@ -0,0 +1,43 @@
# ADDON dwpost
# Copyright (C)
# This file is distributed under the same license as the Friendica dwpost addon package.
#
#
# Translators:
msgid ""
msgstr ""
"Project-Id-Version: friendica\n"
"Report-Msgid-Bugs-To: \n"
"POT-Creation-Date: 2021-11-21 19:17-0500\n"
"PO-Revision-Date: 2014-06-22 11:41+0000\n"
"Last-Translator: FULL NAME <EMAIL@ADDRESS>\n"
"Language-Team: Bulgarian (http://app.transifex.com/Friendica/friendica/language/bg/)\n"
"MIME-Version: 1.0\n"
"Content-Type: text/plain; charset=UTF-8\n"
"Content-Transfer-Encoding: 8bit\n"
"Language: bg\n"
"Plural-Forms: nplurals=2; plural=(n != 1);\n"
#: dwpost.php:43
msgid "Post to Dreamwidth"
msgstr ""
#: dwpost.php:63
msgid "Enable Dreamwidth Post Addon"
msgstr ""
#: dwpost.php:64
msgid "Dreamwidth username"
msgstr ""
#: dwpost.php:65
msgid "Dreamwidth password"
msgstr ""
#: dwpost.php:66
msgid "Post to Dreamwidth by default"
msgstr ""
#: dwpost.php:71
msgid "Dreamwidth Export"
msgstr ""

View file

@ -0,0 +1,7 @@
<?php
if(! function_exists("string_plural_select_bg")) {
function string_plural_select_bg($n){
$n = intval($n);
return intval($n != 1);
}}

View file

@ -0,0 +1,43 @@
# ADDON dwpost
# Copyright (C)
# This file is distributed under the same license as the Friendica dwpost addon package.
#
#
# Translators:
msgid ""
msgstr ""
"Project-Id-Version: friendica\n"
"Report-Msgid-Bugs-To: \n"
"POT-Creation-Date: 2021-11-21 19:17-0500\n"
"PO-Revision-Date: 2014-06-22 11:41+0000\n"
"Last-Translator: FULL NAME <EMAIL@ADDRESS>\n"
"Language-Team: Esperanto (http://app.transifex.com/Friendica/friendica/language/eo/)\n"
"MIME-Version: 1.0\n"
"Content-Type: text/plain; charset=UTF-8\n"
"Content-Transfer-Encoding: 8bit\n"
"Language: eo\n"
"Plural-Forms: nplurals=2; plural=(n != 1);\n"
#: dwpost.php:43
msgid "Post to Dreamwidth"
msgstr ""
#: dwpost.php:63
msgid "Enable Dreamwidth Post Addon"
msgstr ""
#: dwpost.php:64
msgid "Dreamwidth username"
msgstr ""
#: dwpost.php:65
msgid "Dreamwidth password"
msgstr ""
#: dwpost.php:66
msgid "Post to Dreamwidth by default"
msgstr ""
#: dwpost.php:71
msgid "Dreamwidth Export"
msgstr ""

View file

@ -1,9 +1,7 @@
<?php
$a->strings["Post to Dreamwidth"] = "Afiŝi al Dreamwidth";
$a->strings["Dreamwidth Post Settings"] = "Agordoj por Afiŝoj al Dreamwidth";
$a->strings["Enable dreamwidth Post Addon"] = "Ŝalti la Dreamwidth Kromprogramon";
$a->strings["dreamwidth username"] = "Dreamwidth salutnomo";
$a->strings["dreamwidth password"] = "Dreamwidth pasvorto";
$a->strings["Post to dreamwidth by default"] = "Defaŭlte afiŝi al Dreamwidth";
$a->strings["Submit"] = "Sendi";
<?php
if(! function_exists("string_plural_select_eo")) {
function string_plural_select_eo($n){
$n = intval($n);
return intval($n != 1);
}}

View file

@ -0,0 +1,44 @@
# ADDON dwpost
# Copyright (C)
# This file is distributed under the same license as the Friendica dwpost addon package.
#
#
# Translators:
# Rain Hawk, 2020
msgid ""
msgstr ""
"Project-Id-Version: friendica\n"
"Report-Msgid-Bugs-To: \n"
"POT-Creation-Date: 2021-11-21 19:17-0500\n"
"PO-Revision-Date: 2014-06-22 11:41+0000\n"
"Last-Translator: Rain Hawk, 2020\n"
"Language-Team: Estonian (http://app.transifex.com/Friendica/friendica/language/et/)\n"
"MIME-Version: 1.0\n"
"Content-Type: text/plain; charset=UTF-8\n"
"Content-Transfer-Encoding: 8bit\n"
"Language: et\n"
"Plural-Forms: nplurals=2; plural=(n != 1);\n"
#: dwpost.php:43
msgid "Post to Dreamwidth"
msgstr ""
#: dwpost.php:63
msgid "Enable Dreamwidth Post Addon"
msgstr ""
#: dwpost.php:64
msgid "Dreamwidth username"
msgstr ""
#: dwpost.php:65
msgid "Dreamwidth password"
msgstr ""
#: dwpost.php:66
msgid "Post to Dreamwidth by default"
msgstr ""
#: dwpost.php:71
msgid "Dreamwidth Export"
msgstr ""

View file

@ -0,0 +1,7 @@
<?php
if(! function_exists("string_plural_select_et")) {
function string_plural_select_et($n){
$n = intval($n);
return intval($n != 1);
}}

View file

@ -0,0 +1,43 @@
# ADDON dwpost
# Copyright (C)
# This file is distributed under the same license as the Friendica dwpost addon package.
#
#
# Translators:
msgid ""
msgstr ""
"Project-Id-Version: friendica\n"
"Report-Msgid-Bugs-To: \n"
"POT-Creation-Date: 2021-11-21 19:17-0500\n"
"PO-Revision-Date: 2014-06-22 11:41+0000\n"
"Last-Translator: FULL NAME <EMAIL@ADDRESS>\n"
"Language-Team: Gaelic, Scottish (http://app.transifex.com/Friendica/friendica/language/gd/)\n"
"MIME-Version: 1.0\n"
"Content-Type: text/plain; charset=UTF-8\n"
"Content-Transfer-Encoding: 8bit\n"
"Language: gd\n"
"Plural-Forms: nplurals=4; plural=(n==1 || n==11) ? 0 : (n==2 || n==12) ? 1 : (n > 2 && n < 20) ? 2 : 3;\n"
#: dwpost.php:43
msgid "Post to Dreamwidth"
msgstr ""
#: dwpost.php:63
msgid "Enable Dreamwidth Post Addon"
msgstr ""
#: dwpost.php:64
msgid "Dreamwidth username"
msgstr ""
#: dwpost.php:65
msgid "Dreamwidth password"
msgstr ""
#: dwpost.php:66
msgid "Post to Dreamwidth by default"
msgstr ""
#: dwpost.php:71
msgid "Dreamwidth Export"
msgstr ""

View file

@ -0,0 +1,7 @@
<?php
if(! function_exists("string_plural_select_gd")) {
function string_plural_select_gd($n){
$n = intval($n);
if (($n==1 || $n==11)) { return 0; } else if (($n==2 || $n==12)) { return 1; } else if (($n > 2 && $n < 20)) { return 2; } else { return 3; }
}}

View file

@ -0,0 +1,43 @@
# ADDON dwpost
# Copyright (C)
# This file is distributed under the same license as the Friendica dwpost addon package.
#
#
# Translators:
msgid ""
msgstr ""
"Project-Id-Version: friendica\n"
"Report-Msgid-Bugs-To: \n"
"POT-Creation-Date: 2021-11-21 19:17-0500\n"
"PO-Revision-Date: 2014-06-22 11:41+0000\n"
"Last-Translator: FULL NAME <EMAIL@ADDRESS>\n"
"Language-Team: Icelandic (http://app.transifex.com/Friendica/friendica/language/is/)\n"
"MIME-Version: 1.0\n"
"Content-Type: text/plain; charset=UTF-8\n"
"Content-Transfer-Encoding: 8bit\n"
"Language: is\n"
"Plural-Forms: nplurals=2; plural=(n % 10 != 1 || n % 100 == 11);\n"
#: dwpost.php:43
msgid "Post to Dreamwidth"
msgstr ""
#: dwpost.php:63
msgid "Enable Dreamwidth Post Addon"
msgstr ""
#: dwpost.php:64
msgid "Dreamwidth username"
msgstr ""
#: dwpost.php:65
msgid "Dreamwidth password"
msgstr ""
#: dwpost.php:66
msgid "Post to Dreamwidth by default"
msgstr ""
#: dwpost.php:71
msgid "Dreamwidth Export"
msgstr ""

View file

@ -1,9 +1,7 @@
<?php
$a->strings["Post to Dreamwidth"] = "";
$a->strings["Dreamwidth Post Settings"] = "";
$a->strings["Enable dreamwidth Post Addon"] = "";
$a->strings["dreamwidth username"] = "";
$a->strings["dreamwidth password"] = "";
$a->strings["Post to dreamwidth by default"] = "";
$a->strings["Submit"] = "Senda inn";
<?php
if(! function_exists("string_plural_select_is")) {
function string_plural_select_is($n){
$n = intval($n);
return intval($n % 10 != 1 || $n % 100 == 11);
}}

View file

@ -7,7 +7,6 @@
* Status: Unsupported
*/
use Friendica\App;
use Friendica\Core\Hook;
use Friendica\DI;
@ -40,7 +39,7 @@ function fancybox_render(array &$b){
function ($text) use ($gallery) {
// This processes images inlined in posts
// Frio / Vier hooks für lightbox are un-hooked in fancybox-config.js. So this works for them, too!
//if (!in_array(DI::app()->getCurrentTheme(),['vier','frio']))
//if (!in_array(DI::appHelper()->getCurrentTheme(),['vier','frio']))
$text = preg_replace(
'#<a[^>]*href="([^"]*)"[^>]*>(<img[^>]*src="[^"]*"[^>]*>)</a>#',
'<a data-fancybox="' . $gallery . '" href="$1">$2</a>',

View file

@ -0,0 +1,47 @@
# ADDON forumdirectory
# Copyright (C)
# This file is distributed under the same license as the Friendica forumdirectory addon package.
#
#
# Translators:
msgid ""
msgstr ""
"Project-Id-Version: friendica\n"
"Report-Msgid-Bugs-To: \n"
"POT-Creation-Date: 2021-02-01 18:15+0100\n"
"PO-Revision-Date: 2014-06-22 12:31+0000\n"
"Last-Translator: FULL NAME <EMAIL@ADDRESS>\n"
"Language-Team: Bulgarian (http://app.transifex.com/Friendica/friendica/language/bg/)\n"
"MIME-Version: 1.0\n"
"Content-Type: text/plain; charset=UTF-8\n"
"Content-Transfer-Encoding: 8bit\n"
"Language: bg\n"
"Plural-Forms: nplurals=2; plural=(n != 1);\n"
#: forumdirectory.php:33 forumdirectory.php:137
msgid "Forum Directory"
msgstr ""
#: forumdirectory.php:53
msgid "Public access denied."
msgstr ""
#: forumdirectory.php:125
msgid "No entries (some entries may be hidden)."
msgstr ""
#: forumdirectory.php:131
msgid "Global Directory"
msgstr ""
#: forumdirectory.php:133
msgid "Find on this site"
msgstr ""
#: forumdirectory.php:135
msgid "Results for:"
msgstr ""
#: forumdirectory.php:139
msgid "Find"
msgstr ""

View file

@ -0,0 +1,7 @@
<?php
if(! function_exists("string_plural_select_bg")) {
function string_plural_select_bg($n){
$n = intval($n);
return intval($n != 1);
}}

View file

@ -0,0 +1,47 @@
# ADDON forumdirectory
# Copyright (C)
# This file is distributed under the same license as the Friendica forumdirectory addon package.
#
#
# Translators:
msgid ""
msgstr ""
"Project-Id-Version: friendica\n"
"Report-Msgid-Bugs-To: \n"
"POT-Creation-Date: 2021-02-01 18:15+0100\n"
"PO-Revision-Date: 2014-06-22 12:31+0000\n"
"Last-Translator: FULL NAME <EMAIL@ADDRESS>\n"
"Language-Team: Esperanto (http://app.transifex.com/Friendica/friendica/language/eo/)\n"
"MIME-Version: 1.0\n"
"Content-Type: text/plain; charset=UTF-8\n"
"Content-Transfer-Encoding: 8bit\n"
"Language: eo\n"
"Plural-Forms: nplurals=2; plural=(n != 1);\n"
#: forumdirectory.php:33 forumdirectory.php:137
msgid "Forum Directory"
msgstr ""
#: forumdirectory.php:53
msgid "Public access denied."
msgstr ""
#: forumdirectory.php:125
msgid "No entries (some entries may be hidden)."
msgstr ""
#: forumdirectory.php:131
msgid "Global Directory"
msgstr ""
#: forumdirectory.php:133
msgid "Find on this site"
msgstr ""
#: forumdirectory.php:135
msgid "Results for:"
msgstr ""
#: forumdirectory.php:139
msgid "Find"
msgstr ""

View file

@ -1,16 +1,7 @@
<?php
$a->strings["Public access denied."] = "Publika atingo ne permesita.";
$a->strings["Global Directory"] = "Tutmonda Katalogo";
$a->strings["Find on this site"] = "Trovi en ĉi retejo";
$a->strings["Finding: "] = "Trovata:";
$a->strings["Site Directory"] = "Reteja Katalogo";
$a->strings["Find"] = "Trovi";
$a->strings["Age: "] = "Aĝo:";
$a->strings["Gender: "] = "Sekso:";
$a->strings["Location:"] = "Loko:";
$a->strings["Gender:"] = "Sekso:";
$a->strings["Status:"] = "Stato:";
$a->strings["Homepage:"] = "Hejmpaĝo:";
$a->strings["About:"] = "Pri:";
$a->strings["No entries (some entries may be hidden)."] = "Neniom da afiŝoj (kelkaj afiŝoj eble ne estas videbla).";
<?php
if(! function_exists("string_plural_select_eo")) {
function string_plural_select_eo($n){
$n = intval($n);
return intval($n != 1);
}}

View file

@ -0,0 +1,47 @@
# ADDON forumdirectory
# Copyright (C)
# This file is distributed under the same license as the Friendica forumdirectory addon package.
#
#
# Translators:
msgid ""
msgstr ""
"Project-Id-Version: friendica\n"
"Report-Msgid-Bugs-To: \n"
"POT-Creation-Date: 2021-02-01 18:15+0100\n"
"PO-Revision-Date: 2014-06-22 12:31+0000\n"
"Last-Translator: FULL NAME <EMAIL@ADDRESS>\n"
"Language-Team: Estonian (http://app.transifex.com/Friendica/friendica/language/et/)\n"
"MIME-Version: 1.0\n"
"Content-Type: text/plain; charset=UTF-8\n"
"Content-Transfer-Encoding: 8bit\n"
"Language: et\n"
"Plural-Forms: nplurals=2; plural=(n != 1);\n"
#: forumdirectory.php:33 forumdirectory.php:137
msgid "Forum Directory"
msgstr ""
#: forumdirectory.php:53
msgid "Public access denied."
msgstr ""
#: forumdirectory.php:125
msgid "No entries (some entries may be hidden)."
msgstr ""
#: forumdirectory.php:131
msgid "Global Directory"
msgstr ""
#: forumdirectory.php:133
msgid "Find on this site"
msgstr ""
#: forumdirectory.php:135
msgid "Results for:"
msgstr ""
#: forumdirectory.php:139
msgid "Find"
msgstr ""

View file

@ -0,0 +1,7 @@
<?php
if(! function_exists("string_plural_select_et")) {
function string_plural_select_et($n){
$n = intval($n);
return intval($n != 1);
}}

View file

@ -0,0 +1,47 @@
# ADDON forumdirectory
# Copyright (C)
# This file is distributed under the same license as the Friendica forumdirectory addon package.
#
#
# Translators:
msgid ""
msgstr ""
"Project-Id-Version: friendica\n"
"Report-Msgid-Bugs-To: \n"
"POT-Creation-Date: 2021-02-01 18:15+0100\n"
"PO-Revision-Date: 2014-06-22 12:31+0000\n"
"Last-Translator: FULL NAME <EMAIL@ADDRESS>\n"
"Language-Team: Gaelic, Scottish (http://app.transifex.com/Friendica/friendica/language/gd/)\n"
"MIME-Version: 1.0\n"
"Content-Type: text/plain; charset=UTF-8\n"
"Content-Transfer-Encoding: 8bit\n"
"Language: gd\n"
"Plural-Forms: nplurals=4; plural=(n==1 || n==11) ? 0 : (n==2 || n==12) ? 1 : (n > 2 && n < 20) ? 2 : 3;\n"
#: forumdirectory.php:33 forumdirectory.php:137
msgid "Forum Directory"
msgstr ""
#: forumdirectory.php:53
msgid "Public access denied."
msgstr ""
#: forumdirectory.php:125
msgid "No entries (some entries may be hidden)."
msgstr ""
#: forumdirectory.php:131
msgid "Global Directory"
msgstr ""
#: forumdirectory.php:133
msgid "Find on this site"
msgstr ""
#: forumdirectory.php:135
msgid "Results for:"
msgstr ""
#: forumdirectory.php:139
msgid "Find"
msgstr ""

View file

@ -0,0 +1,7 @@
<?php
if(! function_exists("string_plural_select_gd")) {
function string_plural_select_gd($n){
$n = intval($n);
if (($n==1 || $n==11)) { return 0; } else if (($n==2 || $n==12)) { return 1; } else if (($n > 2 && $n < 20)) { return 2; } else { return 3; }
}}

View file

@ -0,0 +1,47 @@
# ADDON forumdirectory
# Copyright (C)
# This file is distributed under the same license as the Friendica forumdirectory addon package.
#
#
# Translators:
msgid ""
msgstr ""
"Project-Id-Version: friendica\n"
"Report-Msgid-Bugs-To: \n"
"POT-Creation-Date: 2021-02-01 18:15+0100\n"
"PO-Revision-Date: 2014-06-22 12:31+0000\n"
"Last-Translator: FULL NAME <EMAIL@ADDRESS>\n"
"Language-Team: Icelandic (http://app.transifex.com/Friendica/friendica/language/is/)\n"
"MIME-Version: 1.0\n"
"Content-Type: text/plain; charset=UTF-8\n"
"Content-Transfer-Encoding: 8bit\n"
"Language: is\n"
"Plural-Forms: nplurals=2; plural=(n % 10 != 1 || n % 100 == 11);\n"
#: forumdirectory.php:33 forumdirectory.php:137
msgid "Forum Directory"
msgstr ""
#: forumdirectory.php:53
msgid "Public access denied."
msgstr ""
#: forumdirectory.php:125
msgid "No entries (some entries may be hidden)."
msgstr ""
#: forumdirectory.php:131
msgid "Global Directory"
msgstr ""
#: forumdirectory.php:133
msgid "Find on this site"
msgstr ""
#: forumdirectory.php:135
msgid "Results for:"
msgstr ""
#: forumdirectory.php:139
msgid "Find"
msgstr ""

View file

@ -1,16 +1,7 @@
<?php
$a->strings["Public access denied."] = "Alemennings aðgangur ekki veittur.";
$a->strings["Global Directory"] = "Heims tengiliða skrá";
$a->strings["Find on this site"] = "Leita á þessum vef";
$a->strings["Finding: "] = "Niðurstöður:";
$a->strings["Site Directory"] = "Vef tengiliða skrá";
$a->strings["Find"] = "Finna";
$a->strings["Age: "] = "Aldur:";
$a->strings["Gender: "] = "Kyn:";
$a->strings["Location:"] = "Staðsetning:";
$a->strings["Gender:"] = "Kyn:";
$a->strings["Status:"] = "Staða:";
$a->strings["Homepage:"] = "Heimasíða:";
$a->strings["About:"] = "Um:";
$a->strings["No entries (some entries may be hidden)."] = "Engar færslur (sumar geta verið faldar).";
<?php
if(! function_exists("string_plural_select_is")) {
function string_plural_select_is($n){
$n = intval($n);
return intval($n % 10 != 1 || $n % 100 == 11);
}}

View file

@ -7,9 +7,7 @@
*
*/
use Friendica\App;
use Friendica\Core\Hook;
use Friendica\Core\Logger;
use Friendica\Core\Renderer;
use Friendica\DI;
@ -18,7 +16,7 @@ function fromapp_install()
Hook::register('post_local', 'addon/fromapp/fromapp.php', 'fromapp_post_hook');
Hook::register('addon_settings', 'addon/fromapp/fromapp.php', 'fromapp_settings');
Hook::register('addon_settings_post', 'addon/fromapp/fromapp.php', 'fromapp_settings_post');
Logger::notice("installed fromapp");
DI::logger()->notice("installed fromapp");
}
function fromapp_settings_post($post)
@ -76,6 +74,6 @@ function fromapp_post_hook(&$item)
$apps = explode(',', $app);
$item['app'] = trim($apps[mt_rand(0, count($apps)-1)]);
return;
}

View file

@ -0,0 +1,34 @@
# ADDON fromapp
# Copyright (C)
# This file is distributed under the same license as the Friendica fromapp addon package.
#
#
# Translators:
msgid ""
msgstr ""
"Project-Id-Version: friendica\n"
"Report-Msgid-Bugs-To: \n"
"POT-Creation-Date: 2021-11-21 19:14-0500\n"
"PO-Revision-Date: 2014-06-22 12:33+0000\n"
"Last-Translator: FULL NAME <EMAIL@ADDRESS>\n"
"Language-Team: Bulgarian (http://app.transifex.com/Friendica/friendica/language/bg/)\n"
"MIME-Version: 1.0\n"
"Content-Type: text/plain; charset=UTF-8\n"
"Content-Transfer-Encoding: 8bit\n"
"Language: bg\n"
"Plural-Forms: nplurals=2; plural=(n != 1);\n"
#: fromapp.php:45
msgid ""
"The application name you would like to show your posts originating from. "
"Separate different app names with a comma. A random one will then be "
"selected for every posting."
msgstr ""
#: fromapp.php:46
msgid "Use this application name even if another application was used."
msgstr ""
#: fromapp.php:51
msgid "FromApp Settings"
msgstr ""

View file

@ -0,0 +1,7 @@
<?php
if(! function_exists("string_plural_select_bg")) {
function string_plural_select_bg($n){
$n = intval($n);
return intval($n != 1);
}}

View file

@ -0,0 +1,34 @@
# ADDON fromapp
# Copyright (C)
# This file is distributed under the same license as the Friendica fromapp addon package.
#
#
# Translators:
msgid ""
msgstr ""
"Project-Id-Version: friendica\n"
"Report-Msgid-Bugs-To: \n"
"POT-Creation-Date: 2021-11-21 19:14-0500\n"
"PO-Revision-Date: 2014-06-22 12:33+0000\n"
"Last-Translator: FULL NAME <EMAIL@ADDRESS>\n"
"Language-Team: Esperanto (http://app.transifex.com/Friendica/friendica/language/eo/)\n"
"MIME-Version: 1.0\n"
"Content-Type: text/plain; charset=UTF-8\n"
"Content-Transfer-Encoding: 8bit\n"
"Language: eo\n"
"Plural-Forms: nplurals=2; plural=(n != 1);\n"
#: fromapp.php:45
msgid ""
"The application name you would like to show your posts originating from. "
"Separate different app names with a comma. A random one will then be "
"selected for every posting."
msgstr ""
#: fromapp.php:46
msgid "Use this application name even if another application was used."
msgstr ""
#: fromapp.php:51
msgid "FromApp Settings"
msgstr ""

View file

@ -1,7 +1,7 @@
<?php
$a->strings["Fromapp settings updated."] = "";
$a->strings["FromApp Settings"] = "";
$a->strings["The application name you would like to show your posts originating from."] = "";
$a->strings["Use this application name even if another application was used."] = "";
$a->strings["Submit"] = "Sendi";
<?php
if(! function_exists("string_plural_select_eo")) {
function string_plural_select_eo($n){
$n = intval($n);
return intval($n != 1);
}}

View file

@ -0,0 +1,34 @@
# ADDON fromapp
# Copyright (C)
# This file is distributed under the same license as the Friendica fromapp addon package.
#
#
# Translators:
msgid ""
msgstr ""
"Project-Id-Version: friendica\n"
"Report-Msgid-Bugs-To: \n"
"POT-Creation-Date: 2021-11-21 19:14-0500\n"
"PO-Revision-Date: 2014-06-22 12:33+0000\n"
"Last-Translator: FULL NAME <EMAIL@ADDRESS>\n"
"Language-Team: Estonian (http://app.transifex.com/Friendica/friendica/language/et/)\n"
"MIME-Version: 1.0\n"
"Content-Type: text/plain; charset=UTF-8\n"
"Content-Transfer-Encoding: 8bit\n"
"Language: et\n"
"Plural-Forms: nplurals=2; plural=(n != 1);\n"
#: fromapp.php:45
msgid ""
"The application name you would like to show your posts originating from. "
"Separate different app names with a comma. A random one will then be "
"selected for every posting."
msgstr ""
#: fromapp.php:46
msgid "Use this application name even if another application was used."
msgstr ""
#: fromapp.php:51
msgid "FromApp Settings"
msgstr ""

View file

@ -0,0 +1,7 @@
<?php
if(! function_exists("string_plural_select_et")) {
function string_plural_select_et($n){
$n = intval($n);
return intval($n != 1);
}}

View file

@ -0,0 +1,34 @@
# ADDON fromapp
# Copyright (C)
# This file is distributed under the same license as the Friendica fromapp addon package.
#
#
# Translators:
msgid ""
msgstr ""
"Project-Id-Version: friendica\n"
"Report-Msgid-Bugs-To: \n"
"POT-Creation-Date: 2021-11-21 19:14-0500\n"
"PO-Revision-Date: 2014-06-22 12:33+0000\n"
"Last-Translator: FULL NAME <EMAIL@ADDRESS>\n"
"Language-Team: Gaelic, Scottish (http://app.transifex.com/Friendica/friendica/language/gd/)\n"
"MIME-Version: 1.0\n"
"Content-Type: text/plain; charset=UTF-8\n"
"Content-Transfer-Encoding: 8bit\n"
"Language: gd\n"
"Plural-Forms: nplurals=4; plural=(n==1 || n==11) ? 0 : (n==2 || n==12) ? 1 : (n > 2 && n < 20) ? 2 : 3;\n"
#: fromapp.php:45
msgid ""
"The application name you would like to show your posts originating from. "
"Separate different app names with a comma. A random one will then be "
"selected for every posting."
msgstr ""
#: fromapp.php:46
msgid "Use this application name even if another application was used."
msgstr ""
#: fromapp.php:51
msgid "FromApp Settings"
msgstr ""

View file

@ -0,0 +1,7 @@
<?php
if(! function_exists("string_plural_select_gd")) {
function string_plural_select_gd($n){
$n = intval($n);
if (($n==1 || $n==11)) { return 0; } else if (($n==2 || $n==12)) { return 1; } else if (($n > 2 && $n < 20)) { return 2; } else { return 3; }
}}

View file

@ -0,0 +1,34 @@
# ADDON fromapp
# Copyright (C)
# This file is distributed under the same license as the Friendica fromapp addon package.
#
#
# Translators:
msgid ""
msgstr ""
"Project-Id-Version: friendica\n"
"Report-Msgid-Bugs-To: \n"
"POT-Creation-Date: 2021-11-21 19:14-0500\n"
"PO-Revision-Date: 2014-06-22 12:33+0000\n"
"Last-Translator: FULL NAME <EMAIL@ADDRESS>\n"
"Language-Team: Icelandic (http://app.transifex.com/Friendica/friendica/language/is/)\n"
"MIME-Version: 1.0\n"
"Content-Type: text/plain; charset=UTF-8\n"
"Content-Transfer-Encoding: 8bit\n"
"Language: is\n"
"Plural-Forms: nplurals=2; plural=(n % 10 != 1 || n % 100 == 11);\n"
#: fromapp.php:45
msgid ""
"The application name you would like to show your posts originating from. "
"Separate different app names with a comma. A random one will then be "
"selected for every posting."
msgstr ""
#: fromapp.php:46
msgid "Use this application name even if another application was used."
msgstr ""
#: fromapp.php:51
msgid "FromApp Settings"
msgstr ""

View file

@ -1,7 +1,7 @@
<?php
$a->strings["Fromapp settings updated."] = "";
$a->strings["FromApp Settings"] = "";
$a->strings["The application name you would like to show your posts originating from."] = "";
$a->strings["Use this application name even if another application was used."] = "";
$a->strings["Submit"] = "Senda inn";
<?php
if(! function_exists("string_plural_select_is")) {
function string_plural_select_is($n){
$n = intval($n);
return intval($n % 10 != 1 || $n % 100 == 11);
}}

View file

@ -6,9 +6,7 @@
* Author: Michael Vogel <https://pirati.ca/profile/heluecht>
*/
use Friendica\App;
use Friendica\Core\Hook;
use Friendica\Core\Logger;
use Friendica\Core\Renderer;
use Friendica\DI;
@ -52,25 +50,25 @@ function geocoordinates_resolve_item(array &$item)
$s = DI::httpClient()->fetch('https://api.opencagedata.com/geocode/v1/json?q=' . $coords[0] . ',' . $coords[1] . '&key=' . $key . '&language=' . $language);
if (!$s) {
Logger::info('API could not be queried');
DI::logger()->info('API could not be queried');
return;
}
$data = json_decode($s);
if ($data->status->code != '200') {
Logger::info('API returned error ' . $data->status->code . ' ' . $data->status->message);
DI::logger()->info('API returned error ' . $data->status->code . ' ' . $data->status->message);
return;
}
if (($data->total_results == 0) || (count($data->results) == 0)) {
Logger::info('No results found for coordinates ' . $item['coord']);
DI::logger()->info('No results found for coordinates ' . $item['coord']);
return;
}
$item['location'] = $data->results[0]->formatted;
Logger::info('Got location for coordinates ' . $coords[0] . '-' . $coords[1] . ': ' . $item['location']);
DI::logger()->info('Got location for coordinates ' . $coords[0] . '-' . $coords[1] . ': ' . $item['location']);
if ($item['location'] != '') {
DI::cache()->set('geocoordinates:' . $language.':' . $coords[0] . '-' . $coords[1], $item['location']);

View file

@ -6,9 +6,7 @@
* Author: Mike Macgirvin <http://macgirvin.com/profile/mike>
*/
use Friendica\App;
use Friendica\Core\Hook;
use Friendica\Core\Logger;
use Friendica\Core\Renderer;
use Friendica\DI;
use Friendica\Core\Config\Util\ConfigFileManager;
@ -35,7 +33,7 @@ function geonames_install()
function geonames_load_config(ConfigFileManager $loader)
{
DI::app()->getConfigCache()->load($loader->loadAddonConfig('geonames'), \Friendica\Core\Config\ValueObject\Cache::SOURCE_STATIC);
DI::appHelper()->getConfigCache()->load($loader->loadAddonConfig('geonames'), \Friendica\Core\Config\ValueObject\Cache::SOURCE_STATIC);
}
function geonames_post_hook(array &$item)
@ -46,7 +44,7 @@ function geonames_post_hook(array &$item)
* - The profile owner must have allowed our addon
*/
Logger::notice('geonames invoked');
DI::logger()->notice('geonames invoked');
if (!DI::userSession()->getLocalUserId()) { /* non-zero if this is a logged in user of this system */
return;

View file

@ -0,0 +1,33 @@
# ADDON geonames
# Copyright (C)
# This file is distributed under the same license as the Friendica geonames addon package.
#
#
# Translators:
msgid ""
msgstr ""
"Project-Id-Version: friendica\n"
"Report-Msgid-Bugs-To: \n"
"POT-Creation-Date: 2021-11-21 19:14-0500\n"
"PO-Revision-Date: 2014-06-23 08:27+0000\n"
"Last-Translator: FULL NAME <EMAIL@ADDRESS>\n"
"Language-Team: Bulgarian (http://app.transifex.com/Friendica/friendica/language/bg/)\n"
"MIME-Version: 1.0\n"
"Content-Type: text/plain; charset=UTF-8\n"
"Content-Transfer-Encoding: 8bit\n"
"Language: bg\n"
"Plural-Forms: nplurals=2; plural=(n != 1);\n"
#: geonames.php:135
msgid ""
"Replace numerical coordinates by the nearest populated location name in your"
" posts."
msgstr ""
#: geonames.php:136
msgid "Enable Geonames Addon"
msgstr ""
#: geonames.php:141
msgid "Geonames Settings"
msgstr ""

View file

@ -0,0 +1,7 @@
<?php
if(! function_exists("string_plural_select_bg")) {
function string_plural_select_bg($n){
$n = intval($n);
return intval($n != 1);
}}

View file

@ -0,0 +1,34 @@
# ADDON geonames
# Copyright (C)
# This file is distributed under the same license as the Friendica geonames addon package.
#
#
# Translators:
# Rafael Garau, 2018
msgid ""
msgstr ""
"Project-Id-Version: friendica\n"
"Report-Msgid-Bugs-To: \n"
"POT-Creation-Date: 2021-11-21 19:14-0500\n"
"PO-Revision-Date: 2014-06-23 08:27+0000\n"
"Last-Translator: Rafael Garau, 2018\n"
"Language-Team: Catalan (http://app.transifex.com/Friendica/friendica/language/ca/)\n"
"MIME-Version: 1.0\n"
"Content-Type: text/plain; charset=UTF-8\n"
"Content-Transfer-Encoding: 8bit\n"
"Language: ca\n"
"Plural-Forms: nplurals=2; plural=(n != 1);\n"
#: geonames.php:135
msgid ""
"Replace numerical coordinates by the nearest populated location name in your"
" posts."
msgstr ""
#: geonames.php:136
msgid "Enable Geonames Addon"
msgstr "Activa els Ajustos de Geonoms"
#: geonames.php:141
msgid "Geonames Settings"
msgstr "Ajustos de Geonoms"

View file

@ -1,6 +1,9 @@
<?php
$a->strings["Geonames settings updated."] = "Actualitzada la configuració de Geonames.";
$a->strings["Geonames Settings"] = "Configuració de Geonames";
$a->strings["Enable Geonames Addon"] = "Habilitar Addon de Geonames";
$a->strings["Submit"] = "Enviar";
<?php
if(! function_exists("string_plural_select_ca")) {
function string_plural_select_ca($n){
$n = intval($n);
return intval($n != 1);
}}
$a->strings['Enable Geonames Addon'] = 'Activa els Ajustos de Geonoms';
$a->strings['Geonames Settings'] = 'Ajustos de Geonoms';

View file

@ -0,0 +1,33 @@
# ADDON geonames
# Copyright (C)
# This file is distributed under the same license as the Friendica geonames addon package.
#
#
# Translators:
msgid ""
msgstr ""
"Project-Id-Version: friendica\n"
"Report-Msgid-Bugs-To: \n"
"POT-Creation-Date: 2021-11-21 19:14-0500\n"
"PO-Revision-Date: 2014-06-23 08:27+0000\n"
"Last-Translator: FULL NAME <EMAIL@ADDRESS>\n"
"Language-Team: Esperanto (http://app.transifex.com/Friendica/friendica/language/eo/)\n"
"MIME-Version: 1.0\n"
"Content-Type: text/plain; charset=UTF-8\n"
"Content-Transfer-Encoding: 8bit\n"
"Language: eo\n"
"Plural-Forms: nplurals=2; plural=(n != 1);\n"
#: geonames.php:135
msgid ""
"Replace numerical coordinates by the nearest populated location name in your"
" posts."
msgstr ""
#: geonames.php:136
msgid "Enable Geonames Addon"
msgstr ""
#: geonames.php:141
msgid "Geonames Settings"
msgstr ""

View file

@ -1,6 +1,7 @@
<?php
$a->strings["Geonames settings updated."] = "Ĝidatigis la Geonames agordojn.";
$a->strings["Geonames Settings"] = "Geonames Agordoj";
$a->strings["Enable Geonames Addon"] = "Ŝalti la Geonames Kromprogramon";
$a->strings["Submit"] = "Sendi";
<?php
if(! function_exists("string_plural_select_eo")) {
function string_plural_select_eo($n){
$n = intval($n);
return intval($n != 1);
}}

View file

@ -0,0 +1,33 @@
# ADDON geonames
# Copyright (C)
# This file is distributed under the same license as the Friendica geonames addon package.
#
#
# Translators:
msgid ""
msgstr ""
"Project-Id-Version: friendica\n"
"Report-Msgid-Bugs-To: \n"
"POT-Creation-Date: 2021-11-21 19:14-0500\n"
"PO-Revision-Date: 2014-06-23 08:27+0000\n"
"Last-Translator: FULL NAME <EMAIL@ADDRESS>\n"
"Language-Team: Estonian (http://app.transifex.com/Friendica/friendica/language/et/)\n"
"MIME-Version: 1.0\n"
"Content-Type: text/plain; charset=UTF-8\n"
"Content-Transfer-Encoding: 8bit\n"
"Language: et\n"
"Plural-Forms: nplurals=2; plural=(n != 1);\n"
#: geonames.php:135
msgid ""
"Replace numerical coordinates by the nearest populated location name in your"
" posts."
msgstr ""
#: geonames.php:136
msgid "Enable Geonames Addon"
msgstr ""
#: geonames.php:141
msgid "Geonames Settings"
msgstr ""

View file

@ -0,0 +1,7 @@
<?php
if(! function_exists("string_plural_select_et")) {
function string_plural_select_et($n){
$n = intval($n);
return intval($n != 1);
}}

View file

@ -0,0 +1,33 @@
# ADDON geonames
# Copyright (C)
# This file is distributed under the same license as the Friendica geonames addon package.
#
#
# Translators:
msgid ""
msgstr ""
"Project-Id-Version: friendica\n"
"Report-Msgid-Bugs-To: \n"
"POT-Creation-Date: 2021-11-21 19:14-0500\n"
"PO-Revision-Date: 2014-06-23 08:27+0000\n"
"Last-Translator: FULL NAME <EMAIL@ADDRESS>\n"
"Language-Team: Gaelic, Scottish (http://app.transifex.com/Friendica/friendica/language/gd/)\n"
"MIME-Version: 1.0\n"
"Content-Type: text/plain; charset=UTF-8\n"
"Content-Transfer-Encoding: 8bit\n"
"Language: gd\n"
"Plural-Forms: nplurals=4; plural=(n==1 || n==11) ? 0 : (n==2 || n==12) ? 1 : (n > 2 && n < 20) ? 2 : 3;\n"
#: geonames.php:135
msgid ""
"Replace numerical coordinates by the nearest populated location name in your"
" posts."
msgstr ""
#: geonames.php:136
msgid "Enable Geonames Addon"
msgstr ""
#: geonames.php:141
msgid "Geonames Settings"
msgstr ""

View file

@ -0,0 +1,7 @@
<?php
if(! function_exists("string_plural_select_gd")) {
function string_plural_select_gd($n){
$n = intval($n);
if (($n==1 || $n==11)) { return 0; } else if (($n==2 || $n==12)) { return 1; } else if (($n > 2 && $n < 20)) { return 2; } else { return 3; }
}}

View file

@ -4,13 +4,11 @@
* Description: Thread email comment notifications on Gmail and anonymise them
* Version: 1.0
* Author: Mike Macgirvin <http://macgirvin.com/profile/mike>
*
*
*
*/
use Friendica\App;
use Friendica\Core\Hook;
use Friendica\Core\Logger;
use Friendica\Core\Renderer;
use Friendica\DI;
use Friendica\Model\Notification;
@ -21,7 +19,7 @@ function gnot_install()
Hook::register('addon_settings_post', 'addon/gnot/gnot.php', 'gnot_settings_post');
Hook::register('enotify_mail', 'addon/gnot/gnot.php', 'gnot_enotify_mail');
Logger::notice("installed gnot");
DI::logger()->notice("installed gnot");
}
/**
@ -38,7 +36,7 @@ function gnot_settings_post($post) {
}
/**
* Called from the Addon Setting form.
* Called from the Addon Setting form.
* Add our own settings info to the page.
*/
function gnot_settings(array &$data)

38
gnot/lang/bg/messages.po Normal file
View file

@ -0,0 +1,38 @@
# ADDON gnot
# Copyright (C)
# This file is distributed under the same license as the Friendica gnot addon package.
#
#
# Translators:
msgid ""
msgstr ""
"Project-Id-Version: friendica\n"
"Report-Msgid-Bugs-To: \n"
"POT-Creation-Date: 2021-11-21 19:14-0500\n"
"PO-Revision-Date: 2014-06-23 08:30+0000\n"
"Last-Translator: FULL NAME <EMAIL@ADDRESS>\n"
"Language-Team: Bulgarian (http://app.transifex.com/Friendica/friendica/language/bg/)\n"
"MIME-Version: 1.0\n"
"Content-Type: text/plain; charset=UTF-8\n"
"Content-Transfer-Encoding: 8bit\n"
"Language: bg\n"
"Plural-Forms: nplurals=2; plural=(n != 1);\n"
#: gnot.php:63
msgid ""
"Allows threading of email comment notifications on Gmail and anonymising the"
" subject line."
msgstr ""
#: gnot.php:64
msgid "Enable this addon?"
msgstr ""
#: gnot.php:69
msgid "Gnot Settings"
msgstr ""
#: gnot.php:79
#, php-format
msgid "[Friendica:Notify] Comment to conversation #%d"
msgstr ""

7
gnot/lang/bg/strings.php Normal file
View file

@ -0,0 +1,7 @@
<?php
if(! function_exists("string_plural_select_bg")) {
function string_plural_select_bg($n){
$n = intval($n);
return intval($n != 1);
}}

38
gnot/lang/eo/messages.po Normal file
View file

@ -0,0 +1,38 @@
# ADDON gnot
# Copyright (C)
# This file is distributed under the same license as the Friendica gnot addon package.
#
#
# Translators:
msgid ""
msgstr ""
"Project-Id-Version: friendica\n"
"Report-Msgid-Bugs-To: \n"
"POT-Creation-Date: 2021-11-21 19:14-0500\n"
"PO-Revision-Date: 2014-06-23 08:30+0000\n"
"Last-Translator: FULL NAME <EMAIL@ADDRESS>\n"
"Language-Team: Esperanto (http://app.transifex.com/Friendica/friendica/language/eo/)\n"
"MIME-Version: 1.0\n"
"Content-Type: text/plain; charset=UTF-8\n"
"Content-Transfer-Encoding: 8bit\n"
"Language: eo\n"
"Plural-Forms: nplurals=2; plural=(n != 1);\n"
#: gnot.php:63
msgid ""
"Allows threading of email comment notifications on Gmail and anonymising the"
" subject line."
msgstr ""
#: gnot.php:64
msgid "Enable this addon?"
msgstr ""
#: gnot.php:69
msgid "Gnot Settings"
msgstr ""
#: gnot.php:79
#, php-format
msgid "[Friendica:Notify] Comment to conversation #%d"
msgstr ""

View file

@ -1,8 +1,7 @@
<?php
$a->strings["Gnot settings updated."] = "Ĝisdatigis Gnot agordojn.";
$a->strings["Gnot Settings"] = "Agordoj por Gnot";
$a->strings["Allows threading of email comment notifications on Gmail and anonymising the subject line."] = "Permesas la ĉenadon de retpoŝtaj atentigoj pri komentoj ĉe Gmail kan anonimigado de la temlinio.";
$a->strings["Enable this addon?"] = "Ŝalti tiun kromprogramon?";
$a->strings["Submit"] = "Sendi";
$a->strings["[Friendica:Notify] Comment to conversation #%d"] = "[Friendica:Atentigo] Komento pri konversacio #%d";
<?php
if(! function_exists("string_plural_select_eo")) {
function string_plural_select_eo($n){
$n = intval($n);
return intval($n != 1);
}}

39
gnot/lang/et/messages.po Normal file
View file

@ -0,0 +1,39 @@
# ADDON gnot
# Copyright (C)
# This file is distributed under the same license as the Friendica gnot addon package.
#
#
# Translators:
# Rain Hawk, 2020
msgid ""
msgstr ""
"Project-Id-Version: friendica\n"
"Report-Msgid-Bugs-To: \n"
"POT-Creation-Date: 2021-11-21 19:14-0500\n"
"PO-Revision-Date: 2014-06-23 08:30+0000\n"
"Last-Translator: Rain Hawk, 2020\n"
"Language-Team: Estonian (http://app.transifex.com/Friendica/friendica/language/et/)\n"
"MIME-Version: 1.0\n"
"Content-Type: text/plain; charset=UTF-8\n"
"Content-Transfer-Encoding: 8bit\n"
"Language: et\n"
"Plural-Forms: nplurals=2; plural=(n != 1);\n"
#: gnot.php:63
msgid ""
"Allows threading of email comment notifications on Gmail and anonymising the"
" subject line."
msgstr ""
#: gnot.php:64
msgid "Enable this addon?"
msgstr ""
#: gnot.php:69
msgid "Gnot Settings"
msgstr ""
#: gnot.php:79
#, php-format
msgid "[Friendica:Notify] Comment to conversation #%d"
msgstr ""

7
gnot/lang/et/strings.php Normal file
View file

@ -0,0 +1,7 @@
<?php
if(! function_exists("string_plural_select_et")) {
function string_plural_select_et($n){
$n = intval($n);
return intval($n != 1);
}}

38
gnot/lang/gd/messages.po Normal file
View file

@ -0,0 +1,38 @@
# ADDON gnot
# Copyright (C)
# This file is distributed under the same license as the Friendica gnot addon package.
#
#
# Translators:
msgid ""
msgstr ""
"Project-Id-Version: friendica\n"
"Report-Msgid-Bugs-To: \n"
"POT-Creation-Date: 2021-11-21 19:14-0500\n"
"PO-Revision-Date: 2014-06-23 08:30+0000\n"
"Last-Translator: FULL NAME <EMAIL@ADDRESS>\n"
"Language-Team: Gaelic, Scottish (http://app.transifex.com/Friendica/friendica/language/gd/)\n"
"MIME-Version: 1.0\n"
"Content-Type: text/plain; charset=UTF-8\n"
"Content-Transfer-Encoding: 8bit\n"
"Language: gd\n"
"Plural-Forms: nplurals=4; plural=(n==1 || n==11) ? 0 : (n==2 || n==12) ? 1 : (n > 2 && n < 20) ? 2 : 3;\n"
#: gnot.php:63
msgid ""
"Allows threading of email comment notifications on Gmail and anonymising the"
" subject line."
msgstr ""
#: gnot.php:64
msgid "Enable this addon?"
msgstr ""
#: gnot.php:69
msgid "Gnot Settings"
msgstr ""
#: gnot.php:79
#, php-format
msgid "[Friendica:Notify] Comment to conversation #%d"
msgstr ""

7
gnot/lang/gd/strings.php Normal file
View file

@ -0,0 +1,7 @@
<?php
if(! function_exists("string_plural_select_gd")) {
function string_plural_select_gd($n){
$n = intval($n);
if (($n==1 || $n==11)) { return 0; } else if (($n==2 || $n==12)) { return 1; } else if (($n > 2 && $n < 20)) { return 2; } else { return 3; }
}}

38
gnot/lang/is/messages.po Normal file
View file

@ -0,0 +1,38 @@
# ADDON gnot
# Copyright (C)
# This file is distributed under the same license as the Friendica gnot addon package.
#
#
# Translators:
msgid ""
msgstr ""
"Project-Id-Version: friendica\n"
"Report-Msgid-Bugs-To: \n"
"POT-Creation-Date: 2021-11-21 19:14-0500\n"
"PO-Revision-Date: 2014-06-23 08:30+0000\n"
"Last-Translator: FULL NAME <EMAIL@ADDRESS>\n"
"Language-Team: Icelandic (http://app.transifex.com/Friendica/friendica/language/is/)\n"
"MIME-Version: 1.0\n"
"Content-Type: text/plain; charset=UTF-8\n"
"Content-Transfer-Encoding: 8bit\n"
"Language: is\n"
"Plural-Forms: nplurals=2; plural=(n % 10 != 1 || n % 100 == 11);\n"
#: gnot.php:63
msgid ""
"Allows threading of email comment notifications on Gmail and anonymising the"
" subject line."
msgstr ""
#: gnot.php:64
msgid "Enable this addon?"
msgstr ""
#: gnot.php:69
msgid "Gnot Settings"
msgstr ""
#: gnot.php:79
#, php-format
msgid "[Friendica:Notify] Comment to conversation #%d"
msgstr ""

View file

@ -1,8 +1,7 @@
<?php
$a->strings["Gnot settings updated."] = "";
$a->strings["Gnot Settings"] = "";
$a->strings["Allows threading of email comment notifications on Gmail and anonymising the subject line."] = "";
$a->strings["Enable this addon?"] = "";
$a->strings["Submit"] = "Senda inn";
$a->strings["[Friendica:Notify] Comment to conversation #%d"] = "";
<?php
if(! function_exists("string_plural_select_is")) {
function string_plural_select_is($n){
$n = intval($n);
return intval($n % 10 != 1 || $n % 100 == 11);
}}

View file

@ -7,15 +7,14 @@
*
*/
use Friendica\App;
use Friendica\Core\Hook;
use Friendica\Core\Logger;
use Friendica\DI;
function googlemaps_install()
{
Hook::register('render_location', 'addon/googlemaps/googlemaps.php', 'googlemaps_location');
Logger::notice('installed googlemaps');
DI::logger()->notice('installed googlemaps');
}
function googlemaps_location(&$item)

View file

@ -6,15 +6,11 @@
* Author: Klaus Weidenbach <http://friendica.dszdw.net/profile/klaus>
*/
use Friendica\App;
use Friendica\BaseModule;
use Friendica\Core\Hook;
use Friendica\Core\Logger;
use Friendica\Core\Renderer;
use Friendica\Database\DBA;
use Friendica\DI;
use Friendica\Core\Config\Util\ConfigFileManager;
use Friendica\Util\Strings;
/**
* Installs the addon hook
@ -23,12 +19,12 @@ function gravatar_install() {
Hook::register('load_config', 'addon/gravatar/gravatar.php', 'gravatar_load_config');
Hook::register('avatar_lookup', 'addon/gravatar/gravatar.php', 'gravatar_lookup');
Logger::notice("registered gravatar in avatar_lookup hook");
DI::logger()->notice("registered gravatar in avatar_lookup hook");
}
function gravatar_load_config(ConfigFileManager $loader)
{
DI::app()->getConfigCache()->load($loader->loadAddonConfig('gravatar'), \Friendica\Core\Config\ValueObject\Cache::SOURCE_STATIC);
DI::appHelper()->getConfigCache()->load($loader->loadAddonConfig('gravatar'), \Friendica\Core\Config\ValueObject\Cache::SOURCE_STATIC);
}
/**

View file

@ -0,0 +1,70 @@
# ADDON gravatar
# Copyright (C)
# This file is distributed under the same license as the Friendica gravatar addon package.
#
#
# Translators:
msgid ""
msgstr ""
"Project-Id-Version: friendica\n"
"Report-Msgid-Bugs-To: \n"
"POT-Creation-Date: 2021-02-01 18:15+0100\n"
"PO-Revision-Date: 2014-06-23 08:33+0000\n"
"Last-Translator: FULL NAME <EMAIL@ADDRESS>\n"
"Language-Team: Bulgarian (http://app.transifex.com/Friendica/friendica/language/bg/)\n"
"MIME-Version: 1.0\n"
"Content-Type: text/plain; charset=UTF-8\n"
"Content-Transfer-Encoding: 8bit\n"
"Language: bg\n"
"Plural-Forms: nplurals=2; plural=(n != 1);\n"
#: gravatar.php:78
msgid "generic profile image"
msgstr ""
#: gravatar.php:79
msgid "random geometric pattern"
msgstr ""
#: gravatar.php:80
msgid "monster face"
msgstr ""
#: gravatar.php:81
msgid "computer generated face"
msgstr ""
#: gravatar.php:82
msgid "retro arcade style face"
msgstr ""
#: gravatar.php:96
msgid "Information"
msgstr ""
#: gravatar.php:96
msgid ""
"Libravatar addon is installed, too. Please disable Libravatar addon or this "
"Gravatar addon.<br>The Libravatar addon will fall back to Gravatar if "
"nothing was found at Libravatar."
msgstr ""
#: gravatar.php:102
msgid "Save Settings"
msgstr ""
#: gravatar.php:103
msgid "Default avatar image"
msgstr ""
#: gravatar.php:103
msgid "Select default avatar image if none was found at Gravatar. See README"
msgstr ""
#: gravatar.php:104
msgid "Rating of images"
msgstr ""
#: gravatar.php:104
msgid "Select the appropriate avatar rating for your site. See README"
msgstr ""

View file

@ -0,0 +1,7 @@
<?php
if(! function_exists("string_plural_select_bg")) {
function string_plural_select_bg($n){
$n = intval($n);
return intval($n != 1);
}}

View file

@ -0,0 +1,70 @@
# ADDON gravatar
# Copyright (C)
# This file is distributed under the same license as the Friendica gravatar addon package.
#
#
# Translators:
msgid ""
msgstr ""
"Project-Id-Version: friendica\n"
"Report-Msgid-Bugs-To: \n"
"POT-Creation-Date: 2021-02-01 18:15+0100\n"
"PO-Revision-Date: 2014-06-23 08:33+0000\n"
"Last-Translator: FULL NAME <EMAIL@ADDRESS>\n"
"Language-Team: Esperanto (http://app.transifex.com/Friendica/friendica/language/eo/)\n"
"MIME-Version: 1.0\n"
"Content-Type: text/plain; charset=UTF-8\n"
"Content-Transfer-Encoding: 8bit\n"
"Language: eo\n"
"Plural-Forms: nplurals=2; plural=(n != 1);\n"
#: gravatar.php:78
msgid "generic profile image"
msgstr ""
#: gravatar.php:79
msgid "random geometric pattern"
msgstr ""
#: gravatar.php:80
msgid "monster face"
msgstr ""
#: gravatar.php:81
msgid "computer generated face"
msgstr ""
#: gravatar.php:82
msgid "retro arcade style face"
msgstr ""
#: gravatar.php:96
msgid "Information"
msgstr ""
#: gravatar.php:96
msgid ""
"Libravatar addon is installed, too. Please disable Libravatar addon or this "
"Gravatar addon.<br>The Libravatar addon will fall back to Gravatar if "
"nothing was found at Libravatar."
msgstr ""
#: gravatar.php:102
msgid "Save Settings"
msgstr ""
#: gravatar.php:103
msgid "Default avatar image"
msgstr ""
#: gravatar.php:103
msgid "Select default avatar image if none was found at Gravatar. See README"
msgstr ""
#: gravatar.php:104
msgid "Rating of images"
msgstr ""
#: gravatar.php:104
msgid "Select the appropriate avatar rating for your site. See README"
msgstr ""

View file

@ -1,15 +1,7 @@
<?php
$a->strings["generic profile image"] = "komuna profilbildo";
$a->strings["random geometric pattern"] = "loteca geometria skemo";
$a->strings["monster face"] = "monstrobildo";
$a->strings["computer generated face"] = "komputita vizaĝo";
$a->strings["retro arcade style face"] = "retrostila videoludstila vizaĝo";
$a->strings["Information"] = "Informo";
$a->strings["Libravatar addon is installed, too. Please disable Libravatar addon or this Gravatar addon.<br>The Libravatar addon will fall back to Gravatar if nothing was found at Libravatar."] = "La Libravatar kromprogramo estas ankaŭ instaltga. Bonvolu malŝalti la Libravatar kromprogramon.<br>La Libravatar kromprogramo retropaŝos al Gravatar se neniu troveblis ĉe Libravatar.";
$a->strings["Submit"] = "Sendi";
$a->strings["Default avatar image"] = "Defaŭlta avatarbildo";
$a->strings["Select default avatar image if none was found at Gravatar. See README"] = "Elektu defaŭltan avatarbildon se neniu troviĝis ĉe Gravatar. Vidu README.";
$a->strings["Rating of images"] = "Pritakso de bildoj";
$a->strings["Select the appropriate avatar rating for your site. See README"] = "Elektu la ĝustan pritakson de via avataro por via retejo. Vidu README.";
$a->strings["Gravatar settings updated."] = "Gravatar agordoj ĝisdatigitaj.";
<?php
if(! function_exists("string_plural_select_eo")) {
function string_plural_select_eo($n){
$n = intval($n);
return intval($n != 1);
}}

View file

@ -0,0 +1,71 @@
# ADDON gravatar
# Copyright (C)
# This file is distributed under the same license as the Friendica gravatar addon package.
#
#
# Translators:
# Rain Hawk, 2020
msgid ""
msgstr ""
"Project-Id-Version: friendica\n"
"Report-Msgid-Bugs-To: \n"
"POT-Creation-Date: 2021-02-01 18:15+0100\n"
"PO-Revision-Date: 2014-06-23 08:33+0000\n"
"Last-Translator: Rain Hawk, 2020\n"
"Language-Team: Estonian (http://app.transifex.com/Friendica/friendica/language/et/)\n"
"MIME-Version: 1.0\n"
"Content-Type: text/plain; charset=UTF-8\n"
"Content-Transfer-Encoding: 8bit\n"
"Language: et\n"
"Plural-Forms: nplurals=2; plural=(n != 1);\n"
#: gravatar.php:78
msgid "generic profile image"
msgstr ""
#: gravatar.php:79
msgid "random geometric pattern"
msgstr ""
#: gravatar.php:80
msgid "monster face"
msgstr ""
#: gravatar.php:81
msgid "computer generated face"
msgstr ""
#: gravatar.php:82
msgid "retro arcade style face"
msgstr ""
#: gravatar.php:96
msgid "Information"
msgstr ""
#: gravatar.php:96
msgid ""
"Libravatar addon is installed, too. Please disable Libravatar addon or this "
"Gravatar addon.<br>The Libravatar addon will fall back to Gravatar if "
"nothing was found at Libravatar."
msgstr ""
#: gravatar.php:102
msgid "Save Settings"
msgstr ""
#: gravatar.php:103
msgid "Default avatar image"
msgstr ""
#: gravatar.php:103
msgid "Select default avatar image if none was found at Gravatar. See README"
msgstr ""
#: gravatar.php:104
msgid "Rating of images"
msgstr ""
#: gravatar.php:104
msgid "Select the appropriate avatar rating for your site. See README"
msgstr ""

View file

@ -0,0 +1,7 @@
<?php
if(! function_exists("string_plural_select_et")) {
function string_plural_select_et($n){
$n = intval($n);
return intval($n != 1);
}}

View file

@ -0,0 +1,70 @@
# ADDON gravatar
# Copyright (C)
# This file is distributed under the same license as the Friendica gravatar addon package.
#
#
# Translators:
msgid ""
msgstr ""
"Project-Id-Version: friendica\n"
"Report-Msgid-Bugs-To: \n"
"POT-Creation-Date: 2021-02-01 18:15+0100\n"
"PO-Revision-Date: 2014-06-23 08:33+0000\n"
"Last-Translator: FULL NAME <EMAIL@ADDRESS>\n"
"Language-Team: Gaelic, Scottish (http://app.transifex.com/Friendica/friendica/language/gd/)\n"
"MIME-Version: 1.0\n"
"Content-Type: text/plain; charset=UTF-8\n"
"Content-Transfer-Encoding: 8bit\n"
"Language: gd\n"
"Plural-Forms: nplurals=4; plural=(n==1 || n==11) ? 0 : (n==2 || n==12) ? 1 : (n > 2 && n < 20) ? 2 : 3;\n"
#: gravatar.php:78
msgid "generic profile image"
msgstr ""
#: gravatar.php:79
msgid "random geometric pattern"
msgstr ""
#: gravatar.php:80
msgid "monster face"
msgstr ""
#: gravatar.php:81
msgid "computer generated face"
msgstr ""
#: gravatar.php:82
msgid "retro arcade style face"
msgstr ""
#: gravatar.php:96
msgid "Information"
msgstr ""
#: gravatar.php:96
msgid ""
"Libravatar addon is installed, too. Please disable Libravatar addon or this "
"Gravatar addon.<br>The Libravatar addon will fall back to Gravatar if "
"nothing was found at Libravatar."
msgstr ""
#: gravatar.php:102
msgid "Save Settings"
msgstr ""
#: gravatar.php:103
msgid "Default avatar image"
msgstr ""
#: gravatar.php:103
msgid "Select default avatar image if none was found at Gravatar. See README"
msgstr ""
#: gravatar.php:104
msgid "Rating of images"
msgstr ""
#: gravatar.php:104
msgid "Select the appropriate avatar rating for your site. See README"
msgstr ""

View file

@ -0,0 +1,7 @@
<?php
if(! function_exists("string_plural_select_gd")) {
function string_plural_select_gd($n){
$n = intval($n);
if (($n==1 || $n==11)) { return 0; } else if (($n==2 || $n==12)) { return 1; } else if (($n > 2 && $n < 20)) { return 2; } else { return 3; }
}}

View file

@ -0,0 +1,70 @@
# ADDON gravatar
# Copyright (C)
# This file is distributed under the same license as the Friendica gravatar addon package.
#
#
# Translators:
msgid ""
msgstr ""
"Project-Id-Version: friendica\n"
"Report-Msgid-Bugs-To: \n"
"POT-Creation-Date: 2021-02-01 18:15+0100\n"
"PO-Revision-Date: 2014-06-23 08:33+0000\n"
"Last-Translator: FULL NAME <EMAIL@ADDRESS>\n"
"Language-Team: Icelandic (http://app.transifex.com/Friendica/friendica/language/is/)\n"
"MIME-Version: 1.0\n"
"Content-Type: text/plain; charset=UTF-8\n"
"Content-Transfer-Encoding: 8bit\n"
"Language: is\n"
"Plural-Forms: nplurals=2; plural=(n % 10 != 1 || n % 100 == 11);\n"
#: gravatar.php:78
msgid "generic profile image"
msgstr ""
#: gravatar.php:79
msgid "random geometric pattern"
msgstr ""
#: gravatar.php:80
msgid "monster face"
msgstr ""
#: gravatar.php:81
msgid "computer generated face"
msgstr ""
#: gravatar.php:82
msgid "retro arcade style face"
msgstr ""
#: gravatar.php:96
msgid "Information"
msgstr ""
#: gravatar.php:96
msgid ""
"Libravatar addon is installed, too. Please disable Libravatar addon or this "
"Gravatar addon.<br>The Libravatar addon will fall back to Gravatar if "
"nothing was found at Libravatar."
msgstr ""
#: gravatar.php:102
msgid "Save Settings"
msgstr ""
#: gravatar.php:103
msgid "Default avatar image"
msgstr ""
#: gravatar.php:103
msgid "Select default avatar image if none was found at Gravatar. See README"
msgstr ""
#: gravatar.php:104
msgid "Rating of images"
msgstr ""
#: gravatar.php:104
msgid "Select the appropriate avatar rating for your site. See README"
msgstr ""

View file

@ -1,15 +1,7 @@
<?php
$a->strings["generic profile image"] = "";
$a->strings["random geometric pattern"] = "";
$a->strings["monster face"] = "";
$a->strings["computer generated face"] = "";
$a->strings["retro arcade style face"] = "";
$a->strings["Information"] = "";
$a->strings["Libravatar addon is installed, too. Please disable Libravatar addon or this Gravatar addon.<br>The Libravatar addon will fall back to Gravatar if nothing was found at Libravatar."] = "";
$a->strings["Submit"] = "Senda inn";
$a->strings["Default avatar image"] = "";
$a->strings["Select default avatar image if none was found at Gravatar. See README"] = "";
$a->strings["Rating of images"] = "";
$a->strings["Select the appropriate avatar rating for your site. See README"] = "";
$a->strings["Gravatar settings updated."] = "";
<?php
if(! function_exists("string_plural_select_is")) {
function string_plural_select_is($n){
$n = intval($n);
return intval($n % 10 != 1 || $n % 100 == 11);
}}

View file

@ -8,9 +8,7 @@
* Note: Please use Circle Text instead
*/
use Friendica\App;
use Friendica\Core\Hook;
use Friendica\Core\Logger;
use Friendica\Core\Renderer;
use Friendica\DI;

View file

@ -0,0 +1,27 @@
# ADDON group_text
# Copyright (C)
# This file is distributed under the same license as the Friendica group_text addon package.
#
#
# Translators:
msgid ""
msgstr ""
"Project-Id-Version: friendica\n"
"Report-Msgid-Bugs-To: \n"
"POT-Creation-Date: 2021-11-21 19:14-0500\n"
"PO-Revision-Date: 2014-06-23 08:35+0000\n"
"Last-Translator: FULL NAME <EMAIL@ADDRESS>\n"
"Language-Team: Bulgarian (http://app.transifex.com/Friendica/friendica/language/bg/)\n"
"MIME-Version: 1.0\n"
"Content-Type: text/plain; charset=UTF-8\n"
"Content-Transfer-Encoding: 8bit\n"
"Language: bg\n"
"Plural-Forms: nplurals=2; plural=(n != 1);\n"
#: group_text.php:58
msgid "Use a text only (non-image) group selector in the \"group edit\" menu"
msgstr ""
#: group_text.php:63
msgid "Group Text"
msgstr ""

View file

@ -0,0 +1,7 @@
<?php
if(! function_exists("string_plural_select_bg")) {
function string_plural_select_bg($n){
$n = intval($n);
return intval($n != 1);
}}

View file

@ -0,0 +1,27 @@
# ADDON group_text
# Copyright (C)
# This file is distributed under the same license as the Friendica group_text addon package.
#
#
# Translators:
msgid ""
msgstr ""
"Project-Id-Version: friendica\n"
"Report-Msgid-Bugs-To: \n"
"POT-Creation-Date: 2021-11-21 19:14-0500\n"
"PO-Revision-Date: 2014-06-23 08:35+0000\n"
"Last-Translator: FULL NAME <EMAIL@ADDRESS>\n"
"Language-Team: Esperanto (http://app.transifex.com/Friendica/friendica/language/eo/)\n"
"MIME-Version: 1.0\n"
"Content-Type: text/plain; charset=UTF-8\n"
"Content-Transfer-Encoding: 8bit\n"
"Language: eo\n"
"Plural-Forms: nplurals=2; plural=(n != 1);\n"
#: group_text.php:58
msgid "Use a text only (non-image) group selector in the \"group edit\" menu"
msgstr ""
#: group_text.php:63
msgid "Group Text"
msgstr ""

View file

@ -1,5 +1,7 @@
<?php
$a->strings["Group Text"] = "";
$a->strings["Use a text only (non-image) group selector in the \"group edit\" menu"] = "";
$a->strings["Submit"] = "Sendi";
<?php
if(! function_exists("string_plural_select_eo")) {
function string_plural_select_eo($n){
$n = intval($n);
return intval($n != 1);
}}

View file

@ -0,0 +1,28 @@
# ADDON group_text
# Copyright (C)
# This file is distributed under the same license as the Friendica group_text addon package.
#
#
# Translators:
# Rain Hawk, 2020
msgid ""
msgstr ""
"Project-Id-Version: friendica\n"
"Report-Msgid-Bugs-To: \n"
"POT-Creation-Date: 2021-11-21 19:14-0500\n"
"PO-Revision-Date: 2014-06-23 08:35+0000\n"
"Last-Translator: Rain Hawk, 2020\n"
"Language-Team: Estonian (http://app.transifex.com/Friendica/friendica/language/et/)\n"
"MIME-Version: 1.0\n"
"Content-Type: text/plain; charset=UTF-8\n"
"Content-Transfer-Encoding: 8bit\n"
"Language: et\n"
"Plural-Forms: nplurals=2; plural=(n != 1);\n"
#: group_text.php:58
msgid "Use a text only (non-image) group selector in the \"group edit\" menu"
msgstr ""
#: group_text.php:63
msgid "Group Text"
msgstr ""

View file

@ -0,0 +1,7 @@
<?php
if(! function_exists("string_plural_select_et")) {
function string_plural_select_et($n){
$n = intval($n);
return intval($n != 1);
}}

View file

@ -0,0 +1,27 @@
# ADDON group_text
# Copyright (C)
# This file is distributed under the same license as the Friendica group_text addon package.
#
#
# Translators:
msgid ""
msgstr ""
"Project-Id-Version: friendica\n"
"Report-Msgid-Bugs-To: \n"
"POT-Creation-Date: 2021-11-21 19:14-0500\n"
"PO-Revision-Date: 2014-06-23 08:35+0000\n"
"Last-Translator: FULL NAME <EMAIL@ADDRESS>\n"
"Language-Team: Gaelic, Scottish (http://app.transifex.com/Friendica/friendica/language/gd/)\n"
"MIME-Version: 1.0\n"
"Content-Type: text/plain; charset=UTF-8\n"
"Content-Transfer-Encoding: 8bit\n"
"Language: gd\n"
"Plural-Forms: nplurals=4; plural=(n==1 || n==11) ? 0 : (n==2 || n==12) ? 1 : (n > 2 && n < 20) ? 2 : 3;\n"
#: group_text.php:58
msgid "Use a text only (non-image) group selector in the \"group edit\" menu"
msgstr ""
#: group_text.php:63
msgid "Group Text"
msgstr ""

View file

@ -0,0 +1,7 @@
<?php
if(! function_exists("string_plural_select_gd")) {
function string_plural_select_gd($n){
$n = intval($n);
if (($n==1 || $n==11)) { return 0; } else if (($n==2 || $n==12)) { return 1; } else if (($n > 2 && $n < 20)) { return 2; } else { return 3; }
}}

View file

@ -0,0 +1,27 @@
# ADDON group_text
# Copyright (C)
# This file is distributed under the same license as the Friendica group_text addon package.
#
#
# Translators:
msgid ""
msgstr ""
"Project-Id-Version: friendica\n"
"Report-Msgid-Bugs-To: \n"
"POT-Creation-Date: 2021-11-21 19:14-0500\n"
"PO-Revision-Date: 2014-06-23 08:35+0000\n"
"Last-Translator: FULL NAME <EMAIL@ADDRESS>\n"
"Language-Team: Icelandic (http://app.transifex.com/Friendica/friendica/language/is/)\n"
"MIME-Version: 1.0\n"
"Content-Type: text/plain; charset=UTF-8\n"
"Content-Transfer-Encoding: 8bit\n"
"Language: is\n"
"Plural-Forms: nplurals=2; plural=(n % 10 != 1 || n % 100 == 11);\n"
#: group_text.php:58
msgid "Use a text only (non-image) group selector in the \"group edit\" menu"
msgstr ""
#: group_text.php:63
msgid "Group Text"
msgstr ""

View file

@ -1,5 +1,7 @@
<?php
$a->strings["Group Text"] = "";
$a->strings["Use a text only (non-image) group selector in the \"group edit\" menu"] = "";
$a->strings["Submit"] = "Senda inn";
<?php
if(! function_exists("string_plural_select_is")) {
function string_plural_select_is($n){
$n = intval($n);
return intval($n % 10 != 1 || $n % 100 == 11);
}}

View file

@ -6,7 +6,6 @@
* Author: Hypolite Petovan <hypolite@mrpetovan.com>
*/
use Friendica\App;
use Friendica\Core\Hook;
use Friendica\DI;
@ -18,7 +17,7 @@ function highlightjs_install()
function highlightjs_head(string &$str)
{
if (DI::app()->getCurrentTheme() == 'frio') {
if (DI::appHelper()->getCurrentTheme() == 'frio') {
$style = 'bootstrap';
} else {
$style = 'default';

View file

@ -6,10 +6,8 @@
* Version: 0.1
* Author: Michael Vogel <https://pirati.ca/profile/heluecht>
*/
use Friendica\App;
use Friendica\Content\PageInfo;
use Friendica\Core\Hook;
use Friendica\Core\Logger;
use Friendica\Core\Renderer;
use Friendica\Core\Worker;
use Friendica\Database\DBA;
@ -87,16 +85,16 @@ function ifttt_post()
$user = DBA::selectFirst('user', ['uid'], ['nickname' => $nickname]);
if (!DBA::isResult($user)) {
Logger::info('User ' . $nickname . ' not found.');
DI::logger()->info('User ' . $nickname . ' not found.');
return;
}
$uid = $user['uid'];
Logger::info('Received a post for user ' . $uid . ' from ifttt ' . print_r($_REQUEST, true));
DI::logger()->info('Received a post for user ' . $uid . ' from ifttt ' . print_r($_REQUEST, true));
if (!isset($_REQUEST['key'])) {
Logger::notice('No key found.');
DI::logger()->notice('No key found.');
return;
}
@ -104,7 +102,7 @@ function ifttt_post()
// Check the key
if ($key != DI::pConfig()->get($uid, 'ifttt', 'key')) {
Logger::info('Invalid key for user ' . $uid);
DI::logger()->info('Invalid key for user ' . $uid);
return;
}
@ -115,7 +113,7 @@ function ifttt_post()
}
if (!in_array($item['type'], ['status', 'link', 'photo'])) {
Logger::info('Unknown item type ' . $item['type']);
DI::logger()->info('Unknown item type ' . $item['type']);
return;
}

58
ifttt/lang/bg/messages.po Normal file
View file

@ -0,0 +1,58 @@
# ADDON ifttt
# Copyright (C)
# This file is distributed under the same license as the Friendica ifttt addon package.
#
#
#, fuzzy
msgid ""
msgstr ""
"Project-Id-Version: \n"
"Report-Msgid-Bugs-To: \n"
"POT-Creation-Date: 2021-11-21 19:17-0500\n"
"PO-Revision-Date: 2017-11-27 10:37+0000\n"
"Language-Team: Bulgarian (https://app.transifex.com/Friendica/teams/12172/bg/)\n"
"MIME-Version: 1.0\n"
"Content-Type: text/plain; charset=UTF-8\n"
"Content-Transfer-Encoding: 8bit\n"
"Language: bg\n"
"Plural-Forms: nplurals=2; plural=(n != 1);\n"
#: ifttt.php:52
msgid ""
"Create an account at <a href=\"http://www.ifttt.com\">IFTTT</a>. Create "
"three Facebook recipes that are connected with <a "
"href=\"https://ifttt.com/maker\">Maker</a> (In the form \"if Facebook then "
"Maker\") with the following parameters:"
msgstr ""
#: ifttt.php:53
msgid "URL"
msgstr ""
#: ifttt.php:54
msgid "Method"
msgstr ""
#: ifttt.php:55
msgid "Content Type"
msgstr ""
#: ifttt.php:56
msgid "Body for \"new status message\""
msgstr ""
#: ifttt.php:57
msgid "Body for \"new photo upload\""
msgstr ""
#: ifttt.php:58
msgid "Body for \"new link post\""
msgstr ""
#: ifttt.php:68
msgid "IFTTT Mirror"
msgstr ""
#: ifttt.php:71
msgid "Generate new key"
msgstr ""

View file

@ -0,0 +1,7 @@
<?php
if(! function_exists("string_plural_select_bg")) {
function string_plural_select_bg($n){
$n = intval($n);
return intval($n != 1);
}}

66
ifttt/lang/ca/messages.po Normal file
View file

@ -0,0 +1,66 @@
# ADDON ifttt
# Copyright (C)
# This file is distributed under the same license as the Friendica ifttt addon package.
#
#
# Translators:
# Rafael Garau, 2018
#
#, fuzzy
msgid ""
msgstr ""
"Project-Id-Version: \n"
"Report-Msgid-Bugs-To: \n"
"POT-Creation-Date: 2021-11-21 19:17-0500\n"
"PO-Revision-Date: 2017-11-27 10:37+0000\n"
"Last-Translator: Rafael Garau, 2018\n"
"Language-Team: Catalan (https://app.transifex.com/Friendica/teams/12172/ca/)\n"
"MIME-Version: 1.0\n"
"Content-Type: text/plain; charset=UTF-8\n"
"Content-Transfer-Encoding: 8bit\n"
"Language: ca\n"
"Plural-Forms: nplurals=2; plural=(n != 1);\n"
#: ifttt.php:52
msgid ""
"Create an account at <a href=\"http://www.ifttt.com\">IFTTT</a>. Create "
"three Facebook recipes that are connected with <a "
"href=\"https://ifttt.com/maker\">Maker</a> (In the form \"if Facebook then "
"Maker\") with the following parameters:"
msgstr ""
"Crear un compte en <a href=\"http://www.ifttt.com\">IFTTT</a>. Crear tres "
"fórmules per Facebook que estiguin connectades amb <a "
"href=\"https://ifttt.com/maker\">Maker</a> (de la següent forma \"si "
"Facebook llavors Maker\") amb els següents paràmetres:"
#: ifttt.php:53
msgid "URL"
msgstr ""
#: ifttt.php:54
msgid "Method"
msgstr ""
#: ifttt.php:55
msgid "Content Type"
msgstr ""
#: ifttt.php:56
msgid "Body for \"new status message\""
msgstr "Cos pel \"nou missatge de estatus\""
#: ifttt.php:57
msgid "Body for \"new photo upload\""
msgstr "Cos per la \"nova foto pujada\""
#: ifttt.php:58
msgid "Body for \"new link post\""
msgstr "Cos pel \"nou enllaç de l'enviament\""
#: ifttt.php:68
msgid "IFTTT Mirror"
msgstr "Espill IFTTT"
#: ifttt.php:71
msgid "Generate new key"
msgstr "Generar nova clau"

13
ifttt/lang/ca/strings.php Normal file
View file

@ -0,0 +1,13 @@
<?php
if(! function_exists("string_plural_select_ca")) {
function string_plural_select_ca($n){
$n = intval($n);
return intval($n != 1);
}}
$a->strings['Create an account at <a href="http://www.ifttt.com">IFTTT</a>. Create three Facebook recipes that are connected with <a href="https://ifttt.com/maker">Maker</a> (In the form "if Facebook then Maker") with the following parameters:'] = 'Crear un compte en <a href="http://www.ifttt.com">IFTTT</a>. Crear tres fórmules per Facebook que estiguin connectades amb <a href="https://ifttt.com/maker">Maker</a> (de la següent forma "si Facebook llavors Maker") amb els següents paràmetres:';
$a->strings['Body for "new status message"'] = 'Cos pel "nou missatge de estatus"';
$a->strings['Body for "new photo upload"'] = 'Cos per la "nova foto pujada"';
$a->strings['Body for "new link post"'] = 'Cos pel "nou enllaç de l\'enviament"';
$a->strings['IFTTT Mirror'] = 'Espill IFTTT';
$a->strings['Generate new key'] = 'Generar nova clau';

58
ifttt/lang/eo/messages.po Normal file
View file

@ -0,0 +1,58 @@
# ADDON ifttt
# Copyright (C)
# This file is distributed under the same license as the Friendica ifttt addon package.
#
#
#, fuzzy
msgid ""
msgstr ""
"Project-Id-Version: \n"
"Report-Msgid-Bugs-To: \n"
"POT-Creation-Date: 2021-11-21 19:17-0500\n"
"PO-Revision-Date: 2017-11-27 10:37+0000\n"
"Language-Team: Esperanto (https://app.transifex.com/Friendica/teams/12172/eo/)\n"
"MIME-Version: 1.0\n"
"Content-Type: text/plain; charset=UTF-8\n"
"Content-Transfer-Encoding: 8bit\n"
"Language: eo\n"
"Plural-Forms: nplurals=2; plural=(n != 1);\n"
#: ifttt.php:52
msgid ""
"Create an account at <a href=\"http://www.ifttt.com\">IFTTT</a>. Create "
"three Facebook recipes that are connected with <a "
"href=\"https://ifttt.com/maker\">Maker</a> (In the form \"if Facebook then "
"Maker\") with the following parameters:"
msgstr ""
#: ifttt.php:53
msgid "URL"
msgstr ""
#: ifttt.php:54
msgid "Method"
msgstr ""
#: ifttt.php:55
msgid "Content Type"
msgstr ""
#: ifttt.php:56
msgid "Body for \"new status message\""
msgstr ""
#: ifttt.php:57
msgid "Body for \"new photo upload\""
msgstr ""
#: ifttt.php:58
msgid "Body for \"new link post\""
msgstr ""
#: ifttt.php:68
msgid "IFTTT Mirror"
msgstr ""
#: ifttt.php:71
msgid "Generate new key"
msgstr ""

View file

@ -0,0 +1,7 @@
<?php
if(! function_exists("string_plural_select_eo")) {
function string_plural_select_eo($n){
$n = intval($n);
return intval($n != 1);
}}

58
ifttt/lang/et/messages.po Normal file
View file

@ -0,0 +1,58 @@
# ADDON ifttt
# Copyright (C)
# This file is distributed under the same license as the Friendica ifttt addon package.
#
#
#, fuzzy
msgid ""
msgstr ""
"Project-Id-Version: \n"
"Report-Msgid-Bugs-To: \n"
"POT-Creation-Date: 2021-11-21 19:17-0500\n"
"PO-Revision-Date: 2017-11-27 10:37+0000\n"
"Language-Team: Estonian (https://app.transifex.com/Friendica/teams/12172/et/)\n"
"MIME-Version: 1.0\n"
"Content-Type: text/plain; charset=UTF-8\n"
"Content-Transfer-Encoding: 8bit\n"
"Language: et\n"
"Plural-Forms: nplurals=2; plural=(n != 1);\n"
#: ifttt.php:52
msgid ""
"Create an account at <a href=\"http://www.ifttt.com\">IFTTT</a>. Create "
"three Facebook recipes that are connected with <a "
"href=\"https://ifttt.com/maker\">Maker</a> (In the form \"if Facebook then "
"Maker\") with the following parameters:"
msgstr ""
#: ifttt.php:53
msgid "URL"
msgstr ""
#: ifttt.php:54
msgid "Method"
msgstr ""
#: ifttt.php:55
msgid "Content Type"
msgstr ""
#: ifttt.php:56
msgid "Body for \"new status message\""
msgstr ""
#: ifttt.php:57
msgid "Body for \"new photo upload\""
msgstr ""
#: ifttt.php:58
msgid "Body for \"new link post\""
msgstr ""
#: ifttt.php:68
msgid "IFTTT Mirror"
msgstr ""
#: ifttt.php:71
msgid "Generate new key"
msgstr ""

View file

@ -0,0 +1,7 @@
<?php
if(! function_exists("string_plural_select_et")) {
function string_plural_select_et($n){
$n = intval($n);
return intval($n != 1);
}}

58
ifttt/lang/gd/messages.po Normal file
View file

@ -0,0 +1,58 @@
# ADDON ifttt
# Copyright (C)
# This file is distributed under the same license as the Friendica ifttt addon package.
#
#
#, fuzzy
msgid ""
msgstr ""
"Project-Id-Version: \n"
"Report-Msgid-Bugs-To: \n"
"POT-Creation-Date: 2021-11-21 19:17-0500\n"
"PO-Revision-Date: 2017-11-27 10:37+0000\n"
"Language-Team: Gaelic, Scottish (https://app.transifex.com/Friendica/teams/12172/gd/)\n"
"MIME-Version: 1.0\n"
"Content-Type: text/plain; charset=UTF-8\n"
"Content-Transfer-Encoding: 8bit\n"
"Language: gd\n"
"Plural-Forms: nplurals=4; plural=(n==1 || n==11) ? 0 : (n==2 || n==12) ? 1 : (n > 2 && n < 20) ? 2 : 3;\n"
#: ifttt.php:52
msgid ""
"Create an account at <a href=\"http://www.ifttt.com\">IFTTT</a>. Create "
"three Facebook recipes that are connected with <a "
"href=\"https://ifttt.com/maker\">Maker</a> (In the form \"if Facebook then "
"Maker\") with the following parameters:"
msgstr ""
#: ifttt.php:53
msgid "URL"
msgstr ""
#: ifttt.php:54
msgid "Method"
msgstr ""
#: ifttt.php:55
msgid "Content Type"
msgstr ""
#: ifttt.php:56
msgid "Body for \"new status message\""
msgstr ""
#: ifttt.php:57
msgid "Body for \"new photo upload\""
msgstr ""
#: ifttt.php:58
msgid "Body for \"new link post\""
msgstr ""
#: ifttt.php:68
msgid "IFTTT Mirror"
msgstr ""
#: ifttt.php:71
msgid "Generate new key"
msgstr ""

View file

@ -0,0 +1,7 @@
<?php
if(! function_exists("string_plural_select_gd")) {
function string_plural_select_gd($n){
$n = intval($n);
if (($n==1 || $n==11)) { return 0; } else if (($n==2 || $n==12)) { return 1; } else if (($n > 2 && $n < 20)) { return 2; } else { return 3; }
}}

58
ifttt/lang/is/messages.po Normal file
View file

@ -0,0 +1,58 @@
# ADDON ifttt
# Copyright (C)
# This file is distributed under the same license as the Friendica ifttt addon package.
#
#
#, fuzzy
msgid ""
msgstr ""
"Project-Id-Version: \n"
"Report-Msgid-Bugs-To: \n"
"POT-Creation-Date: 2021-11-21 19:17-0500\n"
"PO-Revision-Date: 2017-11-27 10:37+0000\n"
"Language-Team: Icelandic (https://app.transifex.com/Friendica/teams/12172/is/)\n"
"MIME-Version: 1.0\n"
"Content-Type: text/plain; charset=UTF-8\n"
"Content-Transfer-Encoding: 8bit\n"
"Language: is\n"
"Plural-Forms: nplurals=2; plural=(n % 10 != 1 || n % 100 == 11);\n"
#: ifttt.php:52
msgid ""
"Create an account at <a href=\"http://www.ifttt.com\">IFTTT</a>. Create "
"three Facebook recipes that are connected with <a "
"href=\"https://ifttt.com/maker\">Maker</a> (In the form \"if Facebook then "
"Maker\") with the following parameters:"
msgstr ""
#: ifttt.php:53
msgid "URL"
msgstr ""
#: ifttt.php:54
msgid "Method"
msgstr ""
#: ifttt.php:55
msgid "Content Type"
msgstr ""
#: ifttt.php:56
msgid "Body for \"new status message\""
msgstr ""
#: ifttt.php:57
msgid "Body for \"new photo upload\""
msgstr ""
#: ifttt.php:58
msgid "Body for \"new link post\""
msgstr ""
#: ifttt.php:68
msgid "IFTTT Mirror"
msgstr ""
#: ifttt.php:71
msgid "Generate new key"
msgstr ""

View file

@ -0,0 +1,7 @@
<?php
if(! function_exists("string_plural_select_is")) {
function string_plural_select_is($n){
$n = intval($n);
return intval($n % 10 != 1 || $n % 100 == 11);
}}

67
ifttt/lang/it/messages.po Normal file
View file

@ -0,0 +1,67 @@
# ADDON ifttt
# Copyright (C)
# This file is distributed under the same license as the Friendica ifttt addon package.
#
#
# Translators:
# fabrixxm <fabrix.xm@gmail.com>, 2018
# Sylke Vicious <silkevicious@gmail.com>, 2023
#
#, fuzzy
msgid ""
msgstr ""
"Project-Id-Version: \n"
"Report-Msgid-Bugs-To: \n"
"POT-Creation-Date: 2021-11-21 19:17-0500\n"
"PO-Revision-Date: 2017-11-27 10:37+0000\n"
"Last-Translator: Sylke Vicious <silkevicious@gmail.com>, 2023\n"
"Language-Team: Italian (https://app.transifex.com/Friendica/teams/12172/it/)\n"
"MIME-Version: 1.0\n"
"Content-Type: text/plain; charset=UTF-8\n"
"Content-Transfer-Encoding: 8bit\n"
"Language: it\n"
"Plural-Forms: nplurals=3; plural=n == 1 ? 0 : n != 0 && n % 1000000 == 0 ? 1 : 2;\n"
#: ifttt.php:52
msgid ""
"Create an account at <a href=\"http://www.ifttt.com\">IFTTT</a>. Create "
"three Facebook recipes that are connected with <a "
"href=\"https://ifttt.com/maker\">Maker</a> (In the form \"if Facebook then "
"Maker\") with the following parameters:"
msgstr ""
"Crea un accout su <a href=\"http://www.ifttt.com\">IFTTT</a>. Crea tre "
"ricette Facebook collegate con <a "
"href=\"https://ifttt.com/maker\">Maker</a> (del tipo \"if Facebook then "
"Maker\") con i seguenti parametri:"
#: ifttt.php:53
msgid "URL"
msgstr "URL"
#: ifttt.php:54
msgid "Method"
msgstr "Metodo"
#: ifttt.php:55
msgid "Content Type"
msgstr "Tipo di Contenuto"
#: ifttt.php:56
msgid "Body for \"new status message\""
msgstr "Contenuto per \"nuovo messaggio di stato\""
#: ifttt.php:57
msgid "Body for \"new photo upload\""
msgstr "Contenuto per \"nuova foto caricata\""
#: ifttt.php:58
msgid "Body for \"new link post\""
msgstr "Contenuto per \"nuovo collegamento\""
#: ifttt.php:68
msgid "IFTTT Mirror"
msgstr "Mirror IFTTT"
#: ifttt.php:71
msgid "Generate new key"
msgstr "Genera una nuova chiave"

16
ifttt/lang/it/strings.php Normal file
View file

@ -0,0 +1,16 @@
<?php
if(! function_exists("string_plural_select_it")) {
function string_plural_select_it($n){
$n = intval($n);
if ($n == 1) { return 0; } else if ($n != 0 && $n % 1000000 == 0) { return 1; } else { return 2; }
}}
$a->strings['Create an account at <a href="http://www.ifttt.com">IFTTT</a>. Create three Facebook recipes that are connected with <a href="https://ifttt.com/maker">Maker</a> (In the form "if Facebook then Maker") with the following parameters:'] = 'Crea un accout su <a href="http://www.ifttt.com">IFTTT</a>. Crea tre ricette Facebook collegate con <a href="https://ifttt.com/maker">Maker</a> (del tipo "if Facebook then Maker") con i seguenti parametri:';
$a->strings['URL'] = 'URL';
$a->strings['Method'] = 'Metodo';
$a->strings['Content Type'] = 'Tipo di Contenuto';
$a->strings['Body for "new status message"'] = 'Contenuto per "nuovo messaggio di stato"';
$a->strings['Body for "new photo upload"'] = 'Contenuto per "nuova foto caricata"';
$a->strings['Body for "new link post"'] = 'Contenuto per "nuovo collegamento"';
$a->strings['IFTTT Mirror'] = 'Mirror IFTTT';
$a->strings['Generate new key'] = 'Genera una nuova chiave';

62
ifttt/lang/nl/messages.po Normal file
View file

@ -0,0 +1,62 @@
# ADDON ifttt
# Copyright (C)
# This file is distributed under the same license as the Friendica ifttt addon package.
#
#
# Translators:
# Jeroen De Meerleer <me@jeroened.be>, 2018
#
#, fuzzy
msgid ""
msgstr ""
"Project-Id-Version: \n"
"Report-Msgid-Bugs-To: \n"
"POT-Creation-Date: 2021-11-21 19:17-0500\n"
"PO-Revision-Date: 2017-11-27 10:37+0000\n"
"Last-Translator: Jeroen De Meerleer <me@jeroened.be>, 2018\n"
"Language-Team: Dutch (https://app.transifex.com/Friendica/teams/12172/nl/)\n"
"MIME-Version: 1.0\n"
"Content-Type: text/plain; charset=UTF-8\n"
"Content-Transfer-Encoding: 8bit\n"
"Language: nl\n"
"Plural-Forms: nplurals=2; plural=(n != 1);\n"
#: ifttt.php:52
msgid ""
"Create an account at <a href=\"http://www.ifttt.com\">IFTTT</a>. Create "
"three Facebook recipes that are connected with <a "
"href=\"https://ifttt.com/maker\">Maker</a> (In the form \"if Facebook then "
"Maker\") with the following parameters:"
msgstr ""
#: ifttt.php:53
msgid "URL"
msgstr ""
#: ifttt.php:54
msgid "Method"
msgstr ""
#: ifttt.php:55
msgid "Content Type"
msgstr ""
#: ifttt.php:56
msgid "Body for \"new status message\""
msgstr ""
#: ifttt.php:57
msgid "Body for \"new photo upload\""
msgstr ""
#: ifttt.php:58
msgid "Body for \"new link post\""
msgstr ""
#: ifttt.php:68
msgid "IFTTT Mirror"
msgstr "IFTTT Mirror"
#: ifttt.php:71
msgid "Generate new key"
msgstr ""

View file

@ -0,0 +1,8 @@
<?php
if(! function_exists("string_plural_select_nl")) {
function string_plural_select_nl($n){
$n = intval($n);
return intval($n != 1);
}}
$a->strings['IFTTT Mirror'] = 'IFTTT Mirror';

58
ifttt/lang/ru/messages.po Normal file
View file

@ -0,0 +1,58 @@
# ADDON ifttt
# Copyright (C)
# This file is distributed under the same license as the Friendica ifttt addon package.
#
#
#, fuzzy
msgid ""
msgstr ""
"Project-Id-Version: \n"
"Report-Msgid-Bugs-To: \n"
"POT-Creation-Date: 2021-11-21 19:17-0500\n"
"PO-Revision-Date: 2017-11-27 10:37+0000\n"
"Language-Team: Russian (https://app.transifex.com/Friendica/teams/12172/ru/)\n"
"MIME-Version: 1.0\n"
"Content-Type: text/plain; charset=UTF-8\n"
"Content-Transfer-Encoding: 8bit\n"
"Language: ru\n"
"Plural-Forms: nplurals=4; plural=(n%10==1 && n%100!=11 ? 0 : n%10>=2 && n%10<=4 && (n%100<12 || n%100>14) ? 1 : n%10==0 || (n%10>=5 && n%10<=9) || (n%100>=11 && n%100<=14)? 2 : 3);\n"
#: ifttt.php:52
msgid ""
"Create an account at <a href=\"http://www.ifttt.com\">IFTTT</a>. Create "
"three Facebook recipes that are connected with <a "
"href=\"https://ifttt.com/maker\">Maker</a> (In the form \"if Facebook then "
"Maker\") with the following parameters:"
msgstr ""
#: ifttt.php:53
msgid "URL"
msgstr ""
#: ifttt.php:54
msgid "Method"
msgstr ""
#: ifttt.php:55
msgid "Content Type"
msgstr ""
#: ifttt.php:56
msgid "Body for \"new status message\""
msgstr ""
#: ifttt.php:57
msgid "Body for \"new photo upload\""
msgstr ""
#: ifttt.php:58
msgid "Body for \"new link post\""
msgstr ""
#: ifttt.php:68
msgid "IFTTT Mirror"
msgstr ""
#: ifttt.php:71
msgid "Generate new key"
msgstr ""

View file

@ -0,0 +1,7 @@
<?php
if(! function_exists("string_plural_select_ru")) {
function string_plural_select_ru($n){
$n = intval($n);
if ($n%10==1 && $n%100!=11) { return 0; } else if ($n%10>=2 && $n%10<=4 && ($n%100<12 || $n%100>14)) { return 1; } else if ($n%10==0 || ($n%10>=5 && $n%10<=9) || ($n%100>=11 && $n%100<=14)) { return 2; } else { return 3; }
}}

View file

@ -8,10 +8,8 @@
* Author: Cat Gray <https://free-haven.org/profile/catness>
*/
use Friendica\App;
use Friendica\Content\Text\BBCode;
use Friendica\Core\Hook;
use Friendica\Core\Logger;
use Friendica\Core\Renderer;
use Friendica\DI;
use Friendica\Model\Item;
@ -124,6 +122,10 @@ function ijpost_send(array &$b)
return;
}
if (Item::isGroupPost($b['uri-id'])) {
return;
}
if ($b['parent'] != $b['id']) {
return;
}
@ -179,11 +181,11 @@ function ijpost_send(array &$b)
EOT;
Logger::debug('ijpost: data: ' . $xml);
DI::logger()->debug('ijpost: data: ' . $xml);
if ($ij_blog !== 'test') {
$x = DI::httpClient()->post($ij_blog, $xml, ['Content-Type' => 'text/xml'])->getBodyString();
}
Logger::info('posted to insanejournal: ' . $x ? $x : '');
DI::logger()->info('posted to insanejournal: ' . $x ? $x : '');
}
}

Some files were not shown because too many files have changed in this diff Show more