This repository has been archived on 2024-08-19. You can view files and clone it, but cannot push or open issues or pull requests.
core/Zotlabs/Module
2017-11-03 19:18:55 -07:00
..
Admin add another delivery control parameter (force queue threshold) 2017-10-31 15:41:44 -07:00
Settings provide personal config for channel_menu; the site can set an initial site-wide value but this but there isn't a corresponding admin setting currently and can only be set by manual config 2017-10-31 19:56:14 -07:00
Achievements.php
Acl.php wrong param 2017-10-03 15:43:51 -07:00
Admin.php provide a mechanism to mark apps active in the bin 2017-07-21 10:32:21 +02:00
Api.php
Appman.php apporder module and all the associated backend stuff to make it work; probably needs a bit of UI cleanup and a link to it from somewhere 2017-05-23 21:44:25 +02:00
Apporder.php nav_set_selected() for apps and apporder. restrict apporder to local_channel() and whitespace 2017-10-11 11:58:09 +02:00
Apps.php nav_set_selected() for apps and apporder. restrict apporder to local_channel() and whitespace 2017-10-11 11:58:09 +02:00
Attach.php check code rights on cloud files 2017-09-05 21:38:07 -07:00
Authorize.php
Authtest.php
Block.php remove unused page_widgets.php include and provide a general function for loading sql from file to use in the cdav migration 2017-06-22 22:43:08 -07:00
Blocks.php
Bookmarks.php feed untranslated appnames to nav_set_selected() and query for the active app directly to get app details 2017-10-09 21:22:57 +02:00
Branchtopic.php
Cal.php
Card_edit.php card_edit: fix lockstate and current permissions not handed over to editor 2017-10-01 22:46:35 +02:00
Cards.php cards - change placeholdertext, separate from button text 2017-08-24 18:34:12 -07:00
Cdav.php feed untranslated appnames to nav_set_selected() and query for the active app directly to get app details 2017-10-09 21:22:57 +02:00
Changeaddr.php allow channel address to be changed 2017-08-04 19:02:41 -07:00
Channel.php support for netselect query 2017-11-01 02:53:12 -07:00
Chanview.php typo in chanview, remove output buffering in mod_cloud which is preventing large files from being downloaded. IIRC this was put there to avoid a SAML warning in SabreDAV but I'm not seeing that currently. 2017-06-25 19:17:05 -07:00
Chat.php feed untranslated appnames to nav_set_selected() and query for the active app directly to get app details 2017-10-09 21:22:57 +02:00
Chatsvc.php
Cloud_tiles.php provide a 'tile' view (view only) mode to mod_cloud 2017-10-30 18:49:18 -07:00
Cloud.php fix cloud redirects with owt tokens 2017-11-03 14:07:00 -07:00
Common.php some basic work on mod common 2017-10-03 11:37:45 +02:00
Connect.php
Connections.php feed untranslated appnames to nav_set_selected() and query for the active app directly to get app details 2017-10-09 21:22:57 +02:00
Connedit.php call the follow_accept hook when desired 2017-09-19 13:25:34 -07:00
Contactgroup.php
Cover_photo.php
Dav.php Reviewed. This is OK. 2017-09-03 00:59:51 -07:00
Directory.php feed untranslated appnames to nav_set_selected() and query for the active app directly to get app details 2017-10-09 21:22:57 +02:00
Dirsearch.php
Display.php set $module_format to html to not break updates. it will be set to something else later if appropriate 2017-11-03 10:04:25 +01:00
Dreport.php
Editblock.php
Editlayout.php
Editpost.php more deprecate server_role 2017-05-29 16:25:27 -07:00
Editwebpage.php hubzilla issue #795 2017-05-27 02:22:36 -07:00
Embedphotos.php
Events.php feed untranslated appnames to nav_set_selected() and query for the active app directly to get app details 2017-10-09 21:22:57 +02:00
Fbrowser.php
Feed.php
Fhublocs.php
File_upload.php a few file activities were not getting synced 2017-08-20 21:24:58 -07:00
Filer.php
Filerm.php
Filestorage.php improve file_activity() a little 2017-07-31 16:59:43 +02:00
Follow.php
Getfile.php check code rights on cloud files 2017-09-05 21:38:07 -07:00
Group.php hubzilla issue #832 2017-07-19 18:32:16 -07:00
Hcard.php missing space in nav tpl 2017-06-28 16:45:48 -07:00
Help.php feed untranslated appnames to nav_set_selected() and query for the active app directly to get app details 2017-10-09 21:22:57 +02:00
Home.php
Hostxrd.php
Impel.php
Import_items.php
Import.php import: special handling required for channel photo in the xchan record when not seizing 'primary' 2017-10-02 20:27:04 -07:00
Invite.php feed untranslated appnames to nav_set_selected() and query for the active app directly to get app details 2017-10-09 21:22:57 +02:00
Item.php bring back the markdown post feature (after investing some effort to make it work) 2017-10-22 18:23:37 -07:00
Lang.php feed untranslated appnames to nav_set_selected() and query for the active app directly to get app details 2017-10-09 21:22:57 +02:00
Layouts.php
Like.php make cards likeable 2017-09-06 11:42:16 +02:00
Linkinfo.php more work on oembed from /display 2017-08-21 15:00:45 -07:00
Lockview.php
Locs.php
Login.php
Logout.php create an actual logout module instead of relying on internal variables 2017-10-12 22:10:42 -07:00
Lostpass.php
Magic.php encrypt the owa token 2017-10-26 15:23:04 -07:00
Mail.php fix issues with diaspora xchans 2017-11-02 08:44:46 +01:00
Manage.php more fixes 2017-10-08 22:47:43 +02:00
Menu.php
Message.php
Mitem.php
Moderate.php redirect to be moderated items to /moderate and change the conv link to partent mid in /modrate 2017-10-19 11:20:09 +02:00
Mood.php feed untranslated appnames to nav_set_selected() and query for the active app directly to get app details 2017-10-09 21:22:57 +02:00
Network.php update item_normal() to not include ACTIVITY_OBJ_FILE obj_type 2017-11-03 13:49:58 +01:00
New_channel.php register workflow was getting over-ridden in include/security 2017-10-19 18:48:11 -07:00
Nojs.php
Notes.php
Notifications.php do not show seen notifys in notifications - show them in mod notifications instead. Update notifications count also on notifications updates 2017-10-22 21:01:58 +02:00
Notify.php plugin hook for update_unseen 2017-08-01 22:25:55 -07:00
Oembed.php add rel=noopener to all external target _blank links 2017-06-14 16:56:13 +02:00
Oep.php card embed improved 2017-09-04 21:02:44 -07:00
Oexchange.php
Ofeed.php merge red/master into dev 2017-08-10 08:09:02 +02:00
Online.php
Owa.php encrypt the owa token 2017-10-26 15:23:04 -07:00
Page.php allow plugin class widgets, fix sql error in page module 2017-10-29 19:52:00 -07:00
Pconfig.php
Pdledit.php pdledit - show original/system layout text for comparison 2017-10-31 18:04:01 -07:00
Permcat.php
Photo.php cover photo was unintentionally disabled when block_public in effect 2017-05-08 11:11:50 +02:00
Photos.php feed untranslated appnames to nav_set_selected() and query for the active app directly to get app details 2017-10-09 21:22:57 +02:00
Ping.php update item_normal() to not include ACTIVITY_OBJ_FILE obj_type 2017-11-03 13:49:58 +01:00
Poco.php
Poke.php feed untranslated appnames to nav_set_selected() and query for the active app directly to get app details 2017-10-09 21:22:57 +02:00
Post.php whitespace 2017-09-25 23:39:48 -07:00
Prate.php
Pretheme.php
Probe.php feed untranslated appnames to nav_set_selected() and query for the active app directly to get app details 2017-10-09 21:22:57 +02:00
Profile_photo.php Maria's profile photo issue, please push to master. 2017-11-01 02:15:40 -07:00
Profile.php oembed provider cleanup, add oembed to cards 2017-08-23 20:47:08 -07:00
Profiles.php provide a mechanism to mark apps active in the bin 2017-07-21 10:32:21 +02:00
Profperm.php
Pubsites.php comment out statistics link in mod pubsites until we have something functional again 2017-10-24 18:21:19 +02:00
Pubstream.php hubzilla issue #896 2017-11-02 18:25:34 -07:00
Randprof.php convert randprof to use chanlink_hash() instead of chanlink_url() and filter sys channels by xchan.xchan_system instead of xchan_addr != sys@% 2017-06-03 10:13:42 +02:00
Rate.php
Ratings.php
Ratingsearch.php
Rbmark.php
React.php prevent expiration of conversations you are involved with - allows you to find your own comments months from now 2017-07-10 20:18:33 -07:00
README.md
Regdir.php
Register.php Merge remote-tracking branch 'mike/master' into dev 2017-10-20 10:08:57 +02:00
Regmod.php
Regver.php
Removeaccount.php
Removeme.php
Rmagic.php redirect loop with rmagic and owa 2017-10-04 18:51:37 -07:00
Rpost.php feed untranslated appnames to nav_set_selected() and query for the active app directly to get app details 2017-10-09 21:22:57 +02:00
Search_ac.php
Search.php more search work 2017-11-03 15:08:56 -07:00
Service_limits.php
Settings.php provide a mechanism to mark apps active in the bin 2017-07-21 10:32:21 +02:00
Setup.php fix typos in comment 2017-10-16 21:33:14 +02:00
Share.php oopsy 2017-06-21 17:46:28 -07:00
Sharedwithme.php improve file_activity() a little 2017-07-31 16:59:43 +02:00
Siteinfo.php turn url requests where argv[0] is something.xyz into module='something' and $_REQUEST['module_format'] = 'xyz'; But leave modules beginning with . (like .well_known) alone (convert the initial . to _ and then strip it). This really only affects Siteinfo_json at this time. 2017-07-13 20:53:05 -07:00
Sitelist.php
Smilies.php
Snap.php
Sources.php
Sslify.php
Starred.php fix "unstar" 2017-10-28 15:24:37 -07:00
Subthread.php
Suggest.php feed untranslated appnames to nav_set_selected() and query for the active app directly to get app details 2017-10-09 21:22:57 +02:00
Tagger.php
Tagrm.php
Tasks.php last remaining task in tasklist was not removed from view when 'completed' 2017-08-23 23:59:05 -07:00
Theme_info.php
Thing.php hubzilla issue #868 2017-10-03 17:03:24 -07:00
Toggle_mobile.php
Toggle_safesearch.php
Token.php
Uexport.php
Update_cards.php partial support (unfinished) for ajax loading cards with liveupdate; page still functions even though this isn't finished 2017-08-23 21:26:09 -07:00
Update_channel.php
Update_display.php
Update_home.php
Update_network.php
Update_pubstream.php
Update_search.php
View.php
Viewconnections.php
Viewsrc.php
Wall_attach.php a few file activities were not getting synced 2017-08-20 21:24:58 -07:00
Wall_upload.php
Webfinger.php
Webpages.php feed untranslated appnames to nav_set_selected() and query for the active app directly to get app details 2017-10-09 21:22:57 +02:00
Well_known.php
Wfinger.php not sure when but the hcard went missing in webfinger 2017-10-23 21:19:40 -07:00
Wiki.php feed untranslated appnames to nav_set_selected() and query for the active app directly to get app details 2017-10-09 21:22:57 +02:00
Xchan.php
Xpoco.php
Xrd.php we need this in the plugin, not in core 2017-09-20 19:34:43 -07:00
Xref.php
Zfinger.php some preliminary work on Zot VI 2017-09-04 22:35:44 -07:00
Zotfeed.php
Zping.php

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.