streams/Zotlabs/Module
2020-04-17 20:36:29 -07:00
..
Admin performance, reverse the no-comment icon state 2020-03-25 13:05:56 -07:00
Settings cleanup of settings page 2020-04-07 19:07:12 -07:00
Acl.php fix follow autocomplete 2020-02-19 11:00:26 -08:00
Activity.php force activitypub addressing on fetched zot packets 2020-04-17 18:47:29 -07:00
Admin.php fixes from upstream 2019-02-17 21:45:31 -08:00
Affinity.php network -> stream 2020-02-12 21:36:21 -08:00
Ap_probe.php cleanup 2019-05-27 20:50:05 -07:00
Api.php
Appman.php cleanup 2019-06-16 23:05:15 -07:00
Apporder.php allow apps to be pinned,featured or both. Also some channel settings cleanup 2019-10-02 21:38:32 -07:00
Apps.php
Apschema.php add iconfig to zot6 objects 2020-02-23 15:27:39 -08:00
Attach.php use correct (or at least official) capitalisation on Content-Disposition 2020-03-04 14:45:58 -08:00
Authorize.php add client_name to oauth2 storage 2019-08-04 17:30:07 -07:00
Block.php start libprofile 2019-04-17 16:54:06 -07:00
Blocks.php start libprofile 2019-04-17 16:54:06 -07:00
Ca.php add cache control headers to image cache module 2020-03-15 18:45:29 -07:00
Cal.php parse error 2019-10-03 12:56:49 -07:00
Calendar.php use correct (or at least official) capitalisation on Content-Disposition 2020-03-04 14:45:58 -08:00
Card_edit.php appify categories 2019-03-24 20:08:23 -07:00
Cards.php start libprofile 2019-04-17 16:54:06 -07:00
Categories.php start libprofile 2019-04-17 16:54:06 -07:00
Cdav.php calendar fixes 2019-05-13 16:59:50 -07:00
Changeaddr.php cleanup 2019-04-16 23:31:36 -07:00
Channel.php more sudo 2020-02-24 15:40:20 -08:00
Chanview.php
Chat.php rev update 2020-04-05 21:05:07 -07:00
Chatsvc.php
Clients.php appify oauth2 2019-10-09 22:51:48 -07:00
Cloud.php store/[data] => cache 2020-03-03 18:24:26 -08:00
Cloud_tiles.php
Common.php start libprofile 2019-04-17 16:54:06 -07:00
Connect.php start libprofile 2019-04-17 16:54:06 -07:00
Connections.php backport MR 22 to dev 2020-02-17 15:07:19 -08:00
Connedit.php several little fixes and some re-factoring. 2020-04-16 16:24:01 -07:00
Contactgroup.php make public lists discoverable 2019-10-01 18:29:39 -07:00
Content_filter.php cut/paste error - incorrect field description 2020-03-17 18:15:57 -07:00
Cover_photo.php alias tagging issue 2019-09-19 15:30:17 -07:00
Dav.php store/[data] => cache 2020-03-03 18:24:26 -08:00
Defperms.php
Dircensor.php directory issue 2019-06-30 19:10:12 -07:00
Directory.php move superblock to core 2020-03-19 21:08:50 -07:00
Dirsearch.php Updates and fixes 2019-09-22 20:56:30 -07:00
Display.php personal site blocks 2020-04-17 04:08:04 -07:00
Dreport.php
Editblock.php start libprofile 2019-04-17 16:54:06 -07:00
Editlayout.php start libprofile 2019-04-17 16:54:06 -07:00
Editpost.php the rest of the stuff to support collections 2019-04-03 16:22:03 -07:00
Editwebpage.php start libprofile 2019-04-17 16:54:06 -07:00
Email_resend.php
Email_validation.php
Embed.php cleanup 2019-04-14 22:31:07 -07:00
Embedphotos.php rework img alt text (legacy bbcode constructs are still supported) 2020-02-29 13:03:28 -08:00
Event.php event federation testing zap/hubzilla 2020-01-13 17:30:13 -08:00
Events.php use correct (or at least official) capitalisation on Content-Disposition 2020-03-04 14:45:58 -08:00
Expire.php cleanup 2019-09-29 17:17:40 -07:00
Fbrowser.php port photo lib updates 2019-04-15 23:43:06 -07:00
Feed.php fix feeds 2019-06-10 23:39:17 -07:00
File_upload.php
Filer.php
Filerm.php
Filestorage.php more ocap refactor 2020-02-02 16:01:07 -08:00
Finger.php cleanup 2019-04-14 22:31:07 -07:00
Follow.php typos 2020-04-10 22:11:46 -07:00
Followers.php wrong time format specifier 2019-11-08 12:16:29 -08:00
Following.php wrong time format specifier 2019-11-08 12:16:29 -08:00
Getfile.php use correct (or at least official) capitalisation on Content-Disposition 2020-03-04 14:45:58 -08:00
Hashtags.php cleanup 2019-04-14 22:31:07 -07:00
Hcard.php start libprofile 2019-04-17 16:54:06 -07:00
Help.php start the doco rewrite 2019-10-28 16:47:55 -07:00
Home.php network -> stream 2020-02-12 21:36:21 -08:00
Hostxrd.php
Hq.php cleanup - filter "unsafe" entries from driectory tag cloud 2019-06-20 23:17:04 -07:00
Id.php activitypub default enable 2019-10-26 15:53:43 -07:00
Impel.php use urlify from composer 2019-04-11 23:59:44 -07:00
Import.php sync block objects 2020-03-19 16:56:48 -07:00
Import_items.php improve expiration +cleanup 2019-05-29 16:29:55 -07:00
Inbox.php implement followed tags 2020-04-07 19:01:14 -07:00
Inspect.php photo encoding anomaly 2020-03-16 15:58:41 -07:00
Invite.php remove old twitter stuff 2019-04-15 21:55:59 -07:00
Item.php force activitypub addressing on fetched zot packets 2020-04-17 18:47:29 -07:00
Jwks.php more openid work 2019-10-10 18:34:44 -07:00
Lang.php
Layouts.php use correct (or at least official) capitalisation on Content-Disposition 2020-03-04 14:45:58 -08:00
Like.php more event and poll work 2020-01-16 17:22:32 -08:00
Linkinfo.php rework img alt text (legacy bbcode constructs are still supported) 2020-02-29 13:03:28 -08:00
Lists.php wrong time format specifier 2019-11-08 12:16:29 -08:00
Lockview.php some early dev work for dm support 2019-06-18 19:21:31 -07:00
Locs.php add moderated permission 2019-02-28 15:14:22 -08:00
Login.php
Logout.php
Lostpass.php
Magic.php some cleanup 2019-04-11 20:26:38 -07:00
Manage.php more work on channel manager 2019-10-05 01:07:02 -07:00
Menu.php start libprofile 2019-04-17 16:54:06 -07:00
Message.php
Mitem.php start libprofile 2019-04-17 16:54:06 -07:00
Moderate.php let people know there's nothing in the moderation queue if the query returns empty 2019-03-27 20:30:12 -07:00
Mood.php add item uuid 2019-02-19 14:59:22 -08:00
New_channel.php the only thing worse than no doco is bad doco 2019-05-26 19:55:08 -07:00
Nocomment.php nocomment app 2019-06-11 20:40:25 -07:00
Notes.php network -> stream 2020-02-12 21:36:21 -08:00
Notifications.php
Notify.php more sudo 2020-02-24 15:40:20 -08:00
Nullbox.php
Oauthinfo.php more openid work 2019-10-10 18:34:44 -07:00
Oembed.php
Oep.php add portable_id to share attributes in some cases 2019-05-13 20:28:56 -07:00
Oexchange.php
Online.php support expire plus misc cleanup 2019-05-28 16:42:32 -07:00
Outbox.php wrong time format specifier 2019-11-08 12:16:29 -08:00
Owa.php issues with autoperms, rewrite owa, upstream fixes to main.js 2019-01-23 14:27:51 -08:00
Page.php start libprofile 2019-04-17 16:54:06 -07:00
Pconfig.php update obscurify 2019-04-04 19:55:17 -07:00
Pdledit.php more html5 br conversions 2019-11-21 20:00:57 -08:00
Permcat.php
Photo.php we probably are not using AS fetches to /photo at present, but clean up the actor representation anyway from the old way of doing it 2020-03-24 19:09:47 -07:00
Photomap.php more app work 2019-06-30 23:36:03 -07:00
Photos.php photo album sort options 2019-10-22 22:54:19 -07:00
Pin.php missing pinned post files 2019-12-02 18:44:32 -08:00
Ping.php more runaway process tracing 2020-04-17 17:01:50 -07:00
Poco.php cleanup 2019-04-14 23:50:49 -07:00
Poke.php
Poster.php make notes widget fixed height because it still doesn't play well with stickykit and I've wasted too much time trying to bludgeon it into submission. 2019-06-25 16:11:22 -07:00
Pretheme.php
Profile.php use correct (or at least official) capitalisation on Content-Disposition 2020-03-04 14:45:58 -08:00
Profile_photo.php cleanup 2019-09-17 21:25:26 -07:00
Profiles.php use correct (or at least official) capitalisation on Content-Disposition 2020-03-04 14:45:58 -08:00
Profperm.php start libprofile 2019-04-17 16:54:06 -07:00
Pubsites.php more html5 br conversions 2019-11-21 20:00:57 -08:00
Pubstream.php deprecate public stream uids calculations 2019-10-06 13:07:41 -07:00
Q.php cloud perms and location independent content searching 2019-02-19 12:31:39 -08:00
Randprof.php
React.php emoji reaction compatibility work 2020-02-03 17:51:42 -08:00
README.md fix feeds 2019-06-10 23:39:17 -07:00
Regdir.php
Register.php issue with bb_parse_app 2019-11-21 02:32:22 -08:00
Regmod.php
Regver.php cleanup 2020-01-14 12:14:34 -08:00
Removeaccount.php Deprecate global channel removal. There are a few issues which need to be addressed. The first of which is a mechanism to tell other servers to destroy your clones. The second is securing this against forgery attempts. In its current form a lot of your data is removed from around the network but the channel clones themselves may remain. 2019-06-04 23:27:11 -07:00
Removeme.php Deprecate global channel removal. There are a few issues which need to be addressed. The first of which is a mechanism to tell other servers to destroy your clones. The second is securing this against forgery attempts. In its current form a lot of your data is removed from around the network but the channel clones themselves may remain. 2019-06-04 23:27:11 -07:00
Rmagic.php
Rpost.php network -> stream 2020-02-12 21:36:21 -08:00
Safe.php consolidate safe mode settings 2019-10-03 13:22:59 -07:00
Search.php personal site blocks 2020-04-17 04:08:04 -07:00
Search_ac.php cleanup, link modal issue 2019-05-23 16:37:56 -07:00
Service_limits.php
Settings.php groups 2019-10-11 16:45:04 -07:00
Setup.php rev update 2020-01-27 17:19:44 -08:00
Share.php add item uuid 2019-02-19 14:59:22 -08:00
Sharedwithme.php
Siteinfo.php icon update 2019-11-14 19:15:52 -08:00
Sitelist.php cleanup 2019-05-05 23:38:29 -07:00
Smilies.php
Sources.php typos 2020-04-10 22:11:46 -07:00
Sslify.php
Starred.php
Stream.php sync block objects 2020-03-19 16:56:48 -07:00
Subthread.php typo 2019-06-12 20:57:28 -07:00
Suggestions.php fix suggestion ignore redirection and update zotsh 2019-08-13 19:42:32 -07:00
Superblock.php superblock updates 2020-04-17 20:36:29 -07:00
Tagger.php
Tagrm.php
Tasks.php turn tasks into an app 2019-06-29 19:23:31 -07:00
Theme_info.php
Thing.php start libprofile 2019-04-17 16:54:06 -07:00
Toggle_safesearch.php
Token.php
Uexport.php use correct (or at least official) capitalisation on Content-Disposition 2020-03-04 14:45:58 -08:00
Update.php cleanup 2019-04-14 22:31:07 -07:00
Userinfo.php
View.php
Viewconnections.php misc fixes 2019-07-11 22:03:17 -07:00
Viewsrc.php use correct (or at least official) capitalisation on Content-Disposition 2020-03-04 14:45:58 -08:00
Vote.php more work on polls 2020-02-06 18:50:18 -08:00
Wall_attach.php wait longer than 3 seconds (but not more than 15) for a video thumbnail to be created after uploading 2020-02-18 16:18:19 -08:00
Wall_upload.php port photo lib updates 2019-04-15 23:43:06 -07:00
Webfinger.php if http signature fails using cached xchan, try again - ignoring cache, in case public key changed 2019-12-04 20:41:16 -08:00
Webpages.php use correct (or at least official) capitalisation on Content-Disposition 2020-03-04 14:45:58 -08:00
Well_known.php start the doco rewrite 2019-10-28 16:47:55 -07:00
Xchan.php
Xref.php
Zot.php
Zot_probe.php more html5 br conversions 2019-11-21 20:00:57 -08:00
Zotfeed.php oauth work 2019-10-09 17:34:18 -07:00
Zotfinger.php more cleanup 2019-04-14 23:41:26 -07:00

Zotlabs/Module

This directory contains controller modules for handling web requests. The lowercase class name indicates the head of the URL path which this module handles. There are other methods of attaching (routing) URL paths to controllers, but this is the primary method used in this project.

Module controllers MUST reside in this directory and namespace to be autoloaded (unless other specific routing methods are employed). They typically use and extend the class definition in Zotlabs/Web/Controller as a template.

Template:

<?php

namespace Zotlabs\Web;


class Controller {

	function init() {}
	function post() {}
	function get() {}

}

Typical Module declaration for the '/foo' URL route:

<?php
namespace Zotlabs\Module;

class Foo extends \Zotlabs\Web\Controller {

	function init() {
		// init() handler goes here
	}

	function post() {
		// post handler goes here
	}

	function get() {
		return 'Hello world.' . EOL;
	}

}

This model provides callbacks for public functions named init(), post(), and get(). init() is always called. post() is called if $_POST variables are present, and get() is called if none of the prior functions terminated the handler. The get() method typically retuns a string which represents the contents of the content region of the resulting page. Modules which emit json, xml or other machine-readable formats typically emit their contents inside the init() function and call 'killme()' to terminate the Module.

Modules are passed the URL path as argc,argv arguments. For a path such as

https://mysite.something/foo/bar/baz

The app will typically invoke the Module class 'Foo' and pass it

$x = argc(); // $x = 3

$x = argv(0); // $x = 'foo'
$x = argv(1); // $x = 'bar'
$x = argv(2); // $x = 'baz'

These are handled in a similar fashion to their counterparts in the Unix shell or C/C++ languages. Do not confuse the argc(),argv() functions with the global variables $argc,$argv which are passed to command line programs. These are handled separately by command line and Zotlabs/Daemon class functions.