Friendica Communications Platform (please note that this is a clone of the repository at github, issues are handled there) https://friendi.ca
You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
 
 
 
 
 
 
Hypolite Petovan 5c59c57b14 Improve template args visual alignment in two-factor modules 2 years ago
..
Admin Uninstall addon when it wasn't found when accessed from admin aside 2 years ago
Diaspora add status code to System::externalRedirect 2 years ago
Filer Move mod/filerm to src/Module/FilerM 2 years ago
Settings/TwoFactor Improve template args visual alignment in two-factor modules 2 years ago
Special Add style to exception page 2 years ago
TwoFactor Improve template args visual alignment in two-factor modules 2 years ago
WellKnown code standards :-) 2 years ago
AccountManagementControlDocument.php Rename to AccountManagementControlDocument 2 years ago
Acctlink.php Split goaway to System::externalRedirectTo() and App->internalRedirect() 3 years ago
AllFriends.php added url for magic link again 2 years ago
Apps.php reduce code 2 years ago
Attach.php Replace System::httpExit() by HTTPException throwing 2 years ago
Babel.php Moving mod/babel to src/Module/babel 2 years ago
BaseAdminModule.php Fix EOL and EOF in Admin modules 2 years ago
BaseSettingsModule.php Add two-factor authentication settings 2 years ago
Bookmarklet.php Rename BookMarklet to Bookmarklet 2 years ago
Contact.php Add contact/batch route 2 years ago
Credits.php Moving mod/credits to src/Module/Credits 2 years ago
Directory.php Fixed Forbidden message. 2 years ago
Feed.php Move mod/allfriends to src/Module/AllFriends 2 years ago
Feedtest.php removed debugging 2 years ago
FollowConfirm.php Some cleaning up 2 years ago
Followers.php Replace System::httpExit() by HTTPException throwing 2 years ago
Following.php Replace System::httpExit() by HTTPException throwing 2 years ago
Friendica.php added feedback 2 years ago
Group.php Move mod/nogroup to src/Module/Group 2 years ago
Hashtag.php Remove include/ requires that are now done directly from Composer 3 years ago
Help.php Fix undefined $a variable in Module\Help 2 years ago
Home.php Bugfixing Home 2 years ago
Inbox.php Replace System::httpExit() by HTTPException throwing 2 years ago
Install.php Merge pull request #7068 from MrPetovan/task/7047-theme-error-page 2 years ago
Invite.php fix quotes 2 years ago
ItemBody.php Move mod/viewsrc to src/Module/ItemBody 2 years ago
Itemsource.php Add routes for current BaseModules 2 years ago
Like.php Move mod/like to src/Module/Like 2 years ago
Localtime.php Move mod/localtime to src/Module/Localtime 2 years ago
Login.php Move Authentication::setAuthenticatedSessionForUser to Session::setAuthenticatedForUser 2 years ago
Logout.php Replace deprecated Addon::callHooks with Hook::callAll 3 years ago
Magic.php Issue 6149: Making OWA (hopefully) compatible with Hubzilla 3 years ago
Maintenance.php Rename ServiceUnavailableException & alter maintenance 2 years ago
Manifest.php Remove duplicate $baseurl template variable 2 years ago
NodeInfo.php Replace System::httpExit() by HTTPException throwing 2 years ago
Objects.php Replace System::httpExit() by HTTPException throwing 2 years ago
Oembed.php Add routes for current BaseModules 2 years ago
Outbox.php Replace System::httpExit() by HTTPException throwing 2 years ago
Owa.php Issue 6149: Making OWA (hopefully) compatible with Hubzilla 3 years ago
PageNotFound.php Add themed error pages 2 years ago
Photo.php Replace System::httpExit() by HTTPException throwing 2 years ago
Profile.php Replace System::httpExit() by HTTPException throwing 2 years ago
Proxy.php Replace System::httpExit() by HTTPException throwing 2 years ago
PublicRSAKey.php Move mod/modexp to src/Module/PublicRSAKey 2 years ago
README.md fixing text 2 years ago
ReallySimpleDiscovery.php Create XML output for RSD with XML::fromArray() 2 years ago
Register.php Remove duplicate $baseurl template variable 2 years ago
RobotsTxt.php add new disallowed path for robots.txt 2 years ago
Smilies.php Move Smilies::getList() into if 2 years ago
Statistics.php Replace System::httpExit() by HTTPException throwing 2 years ago
ThemeDetails.php Move mod/pretheme to src/Module/ThemeDetails 2 years ago
Tos.php Fix PHPDoc comments project-wide 3 years ago
WebFinger.php Replace System::httpExit() by HTTPException throwing 2 years ago
Xrd.php Merge pull request #7068 from MrPetovan/task/7047-theme-error-page 2 years ago

README.md

Friendica\Module

The Module namespace contains the different modules of Friendica. Each module is loaded through the App.

There are mainly two types of modules:

  • frontend modules to interact with users
  • backend modules to interact with machine requests

Frontend modules

This type of modules mainly needs a template, which are generally located at view/templates/.

A frontend module should extend the BaseModule, especially the content() method.

Backend modules

This type of modules mainly responds either with encoded XML or with JSON output. It isn't intended to respond with human readable text.

A frontend module should extend the BaseModule, especially the rawContent() method.

Routing

Every module needs to be accessed within a route. The routes are defined inside Router->collectRoutes().

Use the given routes as a pattern for further routes.

The routing library and further documentation can be found here.