}
/* Add our stylesheet to the page so we can make our settings look nice */
- $a->page['htmlhead'] .= '<link rel="stylesheet" type="text/css" href="' . DI::baseUrl()->get() . '/addon/blockem/blockem.css' . '" media="all" />' . "\r\n";
+ DI::page()['htmlhead'] .= '<link rel="stylesheet" type="text/css" href="' . DI::baseUrl()->get() . '/addon/blockem/blockem.css' . '" media="all" />' . "\r\n";
$words = PConfig::get(local_user(), 'blockem', 'words');
$a->data['blockem'] = explode(',', $words);
}
- $a->page['htmlhead'] .= <<< EOT
+ DI::page()['htmlhead'] .= <<< EOT
<script>
function blockemBlock(author) {
/* Add our stylesheet to the page so we can make our settings look nice */
- $a->page['htmlhead'] .= '<link rel="stylesheet" type="text/css" href="' . DI::baseUrl()->get() . '/addon/blogger/blogger.css' . '" media="all" />' . "\r\n";
+ DI::page()['htmlhead'] .= '<link rel="stylesheet" type="text/css" href="' . DI::baseUrl()->get() . '/addon/blogger/blogger.css' . '" media="all" />' . "\r\n";
/* Get the current state of our config variables */
/* Add our stylesheet to the page so we can make our settings look nice */
- $a->page['htmlhead'] .= '<link rel="stylesheet" type="text/css" href="' . DI::baseUrl()->get() . '/addon/buffer/buffer.css' . '" media="all" />' . "\r\n";
+ DI::page()['htmlhead'] .= '<link rel="stylesheet" type="text/css" href="' . DI::baseUrl()->get() . '/addon/buffer/buffer.css' . '" media="all" />' . "\r\n";
/* Get the current state of our config variables */
return;
}
- $a->page['htmlhead'] .= '<link rel="stylesheet" type="text/css" href="' . DI::baseUrl()->get() . '/addon/curweather/curweather.css' . '" media="all" />' . "\r\n";
+ DI::page()['htmlhead'] .= '<link rel="stylesheet" type="text/css" href="' . DI::baseUrl()->get() . '/addon/curweather/curweather.css' . '" media="all" />' . "\r\n";
// $rpt value is needed for location
// $lang will be taken from the browser session to honour user settings
]);
}
- $a->page['aside'] = $curweather . $a->page['aside'];
+ DI::page()['aside'] = $curweather . DI::page()['aside'];
}
function curweather_addon_settings_post(App $a, $post)
/* Add our stylesheet to the page so we can make our settings look nice */
- $a->page['htmlhead'] .= '<link rel="stylesheet" type="text/css" href="' . DI::baseUrl()->get() . '/addon/diaspora/diaspora.css' . '" media="all" />' . "\r\n";
+ DI::page()['htmlhead'] .= '<link rel="stylesheet" type="text/css" href="' . DI::baseUrl()->get() . '/addon/diaspora/diaspora.css' . '" media="all" />' . "\r\n";
/* Get the current state of our config variables */
}
/* Add our stylesheet to the page so we can make our settings look nice */
- $a->page['htmlhead'] .= '<link rel="stylesheet" type="text/css" href="' . DI::baseUrl()->get() . '/addon/dwpost/dwpost.css' . '" media="all" />' . "\r\n";
+ DI::page()['htmlhead'] .= '<link rel="stylesheet" type="text/css" href="' . DI::baseUrl()->get() . '/addon/dwpost/dwpost.css' . '" media="all" />' . "\r\n";
/* Get the current state of our config variables */
$enabled = PConfig::get(local_user(), 'dwpost', 'post');
function forumdirectory_init(App $a)
{
if (local_user()) {
- $a->page['aside'] .= Widget::findPeople();
+ DI::page()['aside'] .= Widget::findPeople();
}
}
if (!$activate) {
// load scripts if not yet activated so that password can be saved
- $a->page['htmlhead'] .= '<script type="text/javascript" src="' . DI::baseUrl()->get() . '/addon/jappixmini/jappix/php/get.php?t=js&g=mini.xml"></script>' . "\r\n";
- $a->page['htmlhead'] .= '<script type="text/javascript" src="' . DI::baseUrl()->get() . '/addon/jappixmini/jappix/php/get.php?t=js&f=presence.js~caps.js~name.js~roster.js"></script>' . "\r\n";
+ DI::page()['htmlhead'] .= '<script type="text/javascript" src="' . DI::baseUrl()->get() . '/addon/jappixmini/jappix/php/get.php?t=js&g=mini.xml"></script>' . "\r\n";
+ DI::page()['htmlhead'] .= '<script type="text/javascript" src="' . DI::baseUrl()->get() . '/addon/jappixmini/jappix/php/get.php?t=js&f=presence.js~caps.js~name.js~roster.js"></script>' . "\r\n";
- $a->page['htmlhead'] .= '<script type="text/javascript" src="' . DI::baseUrl()->get() . '/addon/jappixmini/lib.js"></script>' . "\r\n";
+ DI::page()['htmlhead'] .= '<script type="text/javascript" src="' . DI::baseUrl()->get() . '/addon/jappixmini/lib.js"></script>' . "\r\n";
}
$s .= '<span id="settings_jappixmini_inflated" class="settings-block fakelink" style="display: block;" onclick="openClose(\'settings_jappixmini_expanded\'); openClose(\'settings_jappixmini_inflated\');">';
$s .= '</div>';
- $a->page['htmlhead'] .= "<script type=\"text/javascript\">
+ DI::page()['htmlhead'] .= "<script type=\"text/javascript\">
function jappixmini_set_password() {
encrypt = document.getElementById('jappixmini-encrypt').checked;
password = document.getElementById('jappixmini-password');
return;
}
- $a->page['htmlhead'] .= '<script type="text/javascript" src="' . DI::baseUrl()->get() . '/addon/jappixmini/jappix/php/get.php?t=js&g=mini.xml"></script>' . "\r\n";
- $a->page['htmlhead'] .= '<script type="text/javascript" src="' . DI::baseUrl()->get() . '/addon/jappixmini/jappix/php/get.php?t=js&f=presence.js~caps.js~name.js~roster.js"></script>' . "\r\n";
+ DI::page()['htmlhead'] .= '<script type="text/javascript" src="' . DI::baseUrl()->get() . '/addon/jappixmini/jappix/php/get.php?t=js&g=mini.xml"></script>' . "\r\n";
+ DI::page()['htmlhead'] .= '<script type="text/javascript" src="' . DI::baseUrl()->get() . '/addon/jappixmini/jappix/php/get.php?t=js&f=presence.js~caps.js~name.js~roster.js"></script>' . "\r\n";
- $a->page['htmlhead'] .= '<script type="text/javascript" src="' . DI::baseUrl()->get() . '/addon/jappixmini/lib.js"></script>' . "\r\n";
+ DI::page()['htmlhead'] .= '<script type="text/javascript" src="' . DI::baseUrl()->get() . '/addon/jappixmini/lib.js"></script>' . "\r\n";
$username = PConfig::get(local_user(), 'jappixmini', 'username');
$username = str_replace("'", "\\'", $username);
}
// add javascript to start Jappix Mini
- $a->page['htmlhead'] .= "<script type=\"text/javascript\">
+ DI::page()['htmlhead'] .= "<script type=\"text/javascript\">
jQuery(document).ready(function() {
jappixmini_addon_start('$server', '$username', '$proxy', '$bosh', $encrypt, '$password', $nickname, $contacts_json, '$contacts_hash', $autoapprove, $autosubscribe, $groupchats);
});
{
// create client secret on login to be able to encrypt jabber passwords
// for setDB and str_sha1, needed by jappixmini_addon_set_client_secret
- $a->page['htmlhead'] .= '<script type="text/javascript" src="' . DI::baseUrl()->get() . '/addon/jappixmini/jappix/php/get.php?t=js&f=datastore.js~jsjac.js"></script>' . "\r\n";
+ DI::page()['htmlhead'] .= '<script type="text/javascript" src="' . DI::baseUrl()->get() . '/addon/jappixmini/jappix/php/get.php?t=js&f=datastore.js~jsjac.js"></script>' . "\r\n";
// for jappixmini_addon_set_client_secret
- $a->page['htmlhead'] .= '<script type="text/javascript" src="' . DI::baseUrl()->get() . '/addon/jappixmini/lib.js"></script>' . "\r\n";
+ DI::page()['htmlhead'] .= '<script type="text/javascript" src="' . DI::baseUrl()->get() . '/addon/jappixmini/lib.js"></script>' . "\r\n";
// save hash of password
$o = str_replace("<form ", "<form onsubmit=\"jappixmini_addon_set_client_secret(this.elements['id_password'].value);return true;\" ", $o);
use Friendica\Core\L10n;
use Friendica\Core\Logger;
use Friendica\Core\Renderer;
+use Friendica\DI;
function js_upload_install()
{
{
$b['default_upload'] = false;
- $a->page->registerStylesheet('addon/js_upload/file-uploader/client/fileuploader.css');
- $a->page->registerFooterScript('addon/js_upload/file-uploader/client/fileuploader.js');
+ DI::page()->registerStylesheet('addon/js_upload/file-uploader/client/fileuploader.css');
+ DI::page()->registerFooterScript('addon/js_upload/file-uploader/client/fileuploader.js');
$tpl = Renderer::getMarkupTemplate('js_upload.tpl', 'addon/js_upload');
$b['addon_text'] .= Renderer::replaceMacros($tpl, [
use Friendica\Core\Config;
use Friendica\Core\Hook;
use Friendica\Core\Protocol;
+use Friendica\DI;
use Friendica\Util\Network;
use Friendica\Util\Proxy as ProxyUtils;
function mastodoncustomemojis_css_hook(App $a)
{
- $a->page['htmlhead'] .= <<<HTML
+ DI::page()['htmlhead'] .= <<<HTML
<!-- Style added by mastodoncustomemojis -->
<style type="text/css">
.emoji.mastodon {
/* Add our stylesheet to the page so we can make our settings look nice */
- $a->page['htmlhead'] .= '<link rel="stylesheet" type="text/css" href="' . DI::baseUrl()->get() . '/addon/pumpio/pumpio.css' . '" media="all" />' . "\r\n";
+ DI::page()['htmlhead'] .= '<link rel="stylesheet" type="text/css" href="' . DI::baseUrl()->get() . '/addon/pumpio/pumpio.css' . '" media="all" />' . "\r\n";
/* Get the current state of our config variables */
$css_file = 'addon/smileybutton/view/default.css';
$css_url = DI::baseUrl()->get().'/'.$css_file;
- $a->page['htmlhead'] .= '<link rel="stylesheet" type="text/css" href="'.$css_url.'" media="all" />'."\r\n";
+ DI::page()['htmlhead'] .= '<link rel="stylesheet" type="text/css" href="'.$css_url.'" media="all" />'."\r\n";
//Get the correct image for the theme
if (!local_user()) {
return;
}
- $a->page['htmlhead'] .= '<link rel="stylesheet" type="text/css" href="' . DI::baseUrl()->get() . '/addon/statusnet/statusnet.css' . '" media="all" />' . "\r\n";
+ DI::page()['htmlhead'] .= '<link rel="stylesheet" type="text/css" href="' . DI::baseUrl()->get() . '/addon/statusnet/statusnet.css' . '" media="all" />' . "\r\n";
/* * *
* 1) Check that we have a base api url and a consumer key & secret
* 2) If no OAuthtoken & stuff is present, generate button to get some
/* Add our stylesheet to the page so we can make our settings look nice */
- $a->page['htmlhead'] .= '<link rel="stylesheet" type="text/css" href="' . DI::baseUrl()->get() . '/addon/tumblr/tumblr.css' . '" media="all" />' . "\r\n";
+ DI::page()['htmlhead'] .= '<link rel="stylesheet" type="text/css" href="' . DI::baseUrl()->get() . '/addon/tumblr/tumblr.css' . '" media="all" />' . "\r\n";
/* Get the current state of our config variables */
if (!local_user()) {
return;
}
- $a->page['htmlhead'] .= '<link rel="stylesheet" type="text/css" href="' . DI::baseUrl()->get() . '/addon/twitter/twitter.css' . '" media="all" />' . "\r\n";
+ DI::page()['htmlhead'] .= '<link rel="stylesheet" type="text/css" href="' . DI::baseUrl()->get() . '/addon/twitter/twitter.css' . '" media="all" />' . "\r\n";
/* * *
* 1) Check that we have global consumer key & secret
* 2) If no OAuthtoken & stuff is present, generate button to get some
/* Add our stylesheet to the xmpp so we can make our settings look nice */
- $a->page['htmlhead'] .= '<link rel="stylesheet" type="text/css" href="' . DI::baseUrl()->get() . '/addon/xmpp/xmpp.css' . '" media="all" />' . "\r\n";
+ DI::page()['htmlhead'] .= '<link rel="stylesheet" type="text/css" href="' . DI::baseUrl()->get() . '/addon/xmpp/xmpp.css' . '" media="all" />' . "\r\n";
/* Get the current state of our config variable */
return;
}
- $a->page['htmlhead'] .= '<link type="text/css" rel="stylesheet" media="screen" href="addon/xmpp/converse/css/converse.css" />' . "\n";
- $a->page['htmlhead'] .= '<script src="addon/xmpp/converse/builds/converse.min.js"></script>' . "\n";
+ DI::page()['htmlhead'] .= '<link type="text/css" rel="stylesheet" media="screen" href="addon/xmpp/converse/css/converse.css" />' . "\n";
+ DI::page()['htmlhead'] .= '<script src="addon/xmpp/converse/builds/converse.min.js"></script>' . "\n";
if (Config::get("xmpp", "central_userbase") && !PConfig::get(local_user(), "xmpp", "individual")) {
$bosh_proxy = Config::get("xmpp", "bosh_proxy");
xhr_user_search: false
});\n";
- $a->page['htmlhead'] .= "<script>
+ DI::page()['htmlhead'] .= "<script>
require(['converse'], function (converse) {
$initialize
converse.listen.on('ready', function (event) {