Merge pull request #936 from MrPetovan/bug/notices

[various] Replace remaining $a->page by DI::page()
This commit is contained in:
Michael Vogel 2019-12-31 10:54:18 +01:00 committed by GitHub
commit 8504f2e999
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
27 changed files with 394 additions and 393 deletions

View file

@ -1,363 +1,364 @@
<?php
/**
* Name: Calculator App
* Description: Simple Calculator Application
* Version: 1.0
* Author: Mike Macgirvin <http://macgirvin.com/profile/mike>
*/
use Friendica\Core\Hook;
function calc_install() {
Hook::register('app_menu', 'addon/calc/calc.php', 'calc_app_menu');
}
function calc_uninstall() {
Hook::unregister('app_menu', 'addon/calc/calc.php', 'calc_app_menu');
}
function calc_app_menu($a,&$b) {
$b['app_menu'][] = '<div class="app-title"><a href="calc">Calculator</a></div>';
}
function calc_module() {}
function calc_init($a) {
$x = <<< EOT
<script language="JavaScript">
/**************************************
* www.FemaleNerd.com *
**************************************/
// Declare global variables
var displayText = ""
var num1
var num2
var operatorType
// Write to display
function addDisplay(n){
id = document.getElementById("display");
id.value = ""
displayText += n
id.value = displayText
}
// Addition
function addNumbers() {
if (displayText == "") {
displayText = result
}
num1 = parseFloat(displayText)
operatorType = "add"
displayText = ""
}
// Subtraction
function subtractNumbers() {
if (displayText == "") {
displayText = result
}
num1 = parseFloat(displayText)
operatorType = "subtract"
displayText = ""
}
// Multiplication
function multiplyNumbers() {
if (displayText == "") {
displayText = result
}
num1 = parseFloat(displayText)
operatorType = "multiply"
displayText = ""
}
// Division
function divideNumbers() {
if (displayText == "") {
displayText = result
}
num1 = parseFloat(displayText)
operatorType = "divide"
displayText = ""
}
// Sine
function sin() {
id = document.getElementById("display");
if (displayText == "") {
num1 = result
}
else {
num1 = parseFloat(displayText)
}
if (num1 != "") {
result = Math.sin(num1)
id.value = result
displayText = ""
}
else {
alert("Please write the number first")
}
}
// Cosine
function cos() {
id = document.getElementById("display");
if (displayText == "") {
num1 = result
}
else {
num1 = parseFloat(displayText)
}
if (num1 != "") {
result = Math.cos(num1)
id.value = result
displayText = ""
}
else {
alert("Please write the number first")
}
}
// ArcSine
function arcSin() {
id = document.getElementById("display");
if (displayText == "") {
num1 = result
}
else {
num1 = parseFloat(displayText)
}
if (num1 != "") {
result = Math.asin(num1)
id.value = result
displayText = ""
}
else {
alert("Please write the number first")
}
}
// ArcCosine
function arcCos() {
id = document.getElementById("display");
if (displayText == "") {
num1 = result
}
else {
num1 = parseFloat(displayText)
}
if (num1 != "") {
result = Math.acos(num1)
id.value = result
displayText = ""
}
else {
alert("Please write the number first")
}
}
// Square root
function sqrt() {
id = document.getElementById("display");
if (displayText == "") {
num1 = result
}
else {
num1 = parseFloat(displayText)
}
if (num1 != "") {
result = Math.sqrt(num1)
id.value = result
displayText = ""
}
else {
alert("Please write the number first")
}
}
// Square number (number to the power of two)
function square() {
id = document.getElementById("display");
if (displayText == "") {
num1 = result
}
else {
num1 = parseFloat(displayText)
}
if (num1 != "") {
result = num1 * num1
id.value = result
displayText = ""
}
else {
alert("Please write the number first")
}
}
// Convert degrees to radians
function degToRad() {
id = document.getElementById("display");
if (displayText == "") {
num1 = result
}
else {
num1 = parseFloat(displayText)
}
if (num1 != "") {
result = num1 * Math.PI / 180
id.value = result
displayText = ""
}
else {
alert("Please write the number first")
}
}
// Convert radians to degrees
function radToDeg() {
id = document.getElementById("display");
if (displayText == "") {
num1 = result
}
else {
num1 = parseFloat(displayText)
}
if (num1 != "") {
result = num1 * 180 / Math.PI
id.value = result
displayText = ""
}
else {
alert("Please write the number first")
}
}
// Calculations
function calculate() {
id = document.getElementById("display");
if (displayText != "") {
num2 = parseFloat(displayText)
// Calc: Addition
if (operatorType == "add") {
result = num1 + num2
id.value = result
}
// Calc: Subtraction
if (operatorType == "subtract") {
result = num1 - num2
id.value = result
}
// Calc: Multiplication
if (operatorType == "multiply") {
result = num1 * num2
id.value = result
}
// Calc: Division
if (operatorType == "divide") {
result = num1 / num2
id.value = result
}
displayText = ""
}
else {
id.value = "Oops! Error!"
}
}
// Clear the display
function clearDisplay() {
id = document.getElementById("display");
displayText = ""
id.value = ""
}
</script>
EOT;
$a->page['htmlhead'] .= $x;
}
function calc_content($app) {
$o = '';
$o .= <<< EOT
<h3>Calculator</h3>
<br /><br />
<table>
<tbody><tr><td>
<table bgcolor="#af9999" border="1">
<tbody><tr><td>
<table border="1" cellpadding="2" cellspacing="2">
<form name="calc">
<!--
<TR><TD VALIGN=top colspan=6 ALIGN="center"> <H2>Calculator</H2> </TD>
-->
<tbody><tr>
<td colspan="5"><input size="22" id="display" name="display" type="text"></td>
</tr><tr align="left" valign="middle">
<td><input name="one" value="&nbsp;&nbsp;1&nbsp;&nbsp;&nbsp;" onclick="addDisplay(1)" type="button"></td>
<td><input name="two" value="&nbsp;&nbsp;2&nbsp;&nbsp;&nbsp;" onclick="addDisplay(2)" type="button"></td>
<td><input name="three" value="&nbsp;&nbsp;3&nbsp;&nbsp;&nbsp;" onclick="addDisplay(3)" type="button"></td>
<td><input name="plus" value="&nbsp;&nbsp;+&nbsp;&nbsp;&nbsp;" onclick="addNumbers()" type="button"></td>
</tr><tr align="left" valign="middle">
<td><input name="four" value="&nbsp;&nbsp;4&nbsp;&nbsp;&nbsp;" onclick="addDisplay(4)" type="button"></td>
<td><input name="five" value="&nbsp;&nbsp;5&nbsp;&nbsp;&nbsp;" onclick="addDisplay(5)" type="button"></td>
<td><input name="six" value="&nbsp;&nbsp;6&nbsp;&nbsp;&nbsp;" onclick="addDisplay(6)" type="button"></td>
<td><input name="minus" value="&nbsp;&nbsp;&nbsp;-&nbsp;&nbsp;&nbsp;" onclick="subtractNumbers()" type="button"></td>
</tr><tr align="left" valign="middle">
<td><input name="seven" value="&nbsp;&nbsp;7&nbsp;&nbsp;&nbsp;" onclick="addDisplay(7)" type="button"></td>
<td><input name="eight" value="&nbsp;&nbsp;8&nbsp;&nbsp;&nbsp;" onclick="addDisplay(8)" type="button"></td>
<td><input name="nine" value="&nbsp;&nbsp;9&nbsp;&nbsp;&nbsp;" onclick="addDisplay(9)" type="button"></td>
<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="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">
<td><input name="sqareroot" value="sqrt" onclick="sqrt()" type="button"></td>
<td><input name="squarex" value=" x^2" onclick="square()" type="button"></td>
<td><input name="deg-rad" value="d2r&nbsp;" onclick="degToRad()" type="button"></td>
<td><input name="rad-deg" value="r2d&nbsp;" onclick="radToDeg()" type="button"></td>
</tr><tr align="left" valign="middle">
<td><input name="sine" value="&nbsp;sin&nbsp;" onclick="sin()" type="button"></td>
<td><input name="arcsine" value="asin" onclick="arcSin()" type="button"></td>
<td><input name="cosine" value="cos" onclick="cos()" type="button"></td>
<td><input name="arccosine" value="acs" onclick="arcCos()" type="button"></td>
</tr><tr align="left" valign="middle">
<td colspan="2"><input name="clear" value="&nbsp;&nbsp;Clear&nbsp;&nbsp;" onclick="clearDisplay()" type="button"></td>
<td colspan="3"><input name="enter" value="&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;=&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;" onclick="calculate()" type="button"></td>
</tr></tbody></table>
</form>
<!--
<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>
</td></tr></tbody></table>
EOT;
return $o;
}
<?php
/**
* Name: Calculator App
* Description: Simple Calculator Application
* Version: 1.0
* Author: Mike Macgirvin <http://macgirvin.com/profile/mike>
*/
use Friendica\Core\Hook;
use Friendica\DI;
function calc_install() {
Hook::register('app_menu', 'addon/calc/calc.php', 'calc_app_menu');
}
function calc_uninstall() {
Hook::unregister('app_menu', 'addon/calc/calc.php', 'calc_app_menu');
}
function calc_app_menu($a,&$b) {
$b['app_menu'][] = '<div class="app-title"><a href="calc">Calculator</a></div>';
}
function calc_module() {}
function calc_init($a) {
$x = <<< EOT
<script language="JavaScript">
/**************************************
* www.FemaleNerd.com *
**************************************/
// Declare global variables
var displayText = ""
var num1
var num2
var operatorType
// Write to display
function addDisplay(n){
id = document.getElementById("display");
id.value = ""
displayText += n
id.value = displayText
}
// Addition
function addNumbers() {
if (displayText == "") {
displayText = result
}
num1 = parseFloat(displayText)
operatorType = "add"
displayText = ""
}
// Subtraction
function subtractNumbers() {
if (displayText == "") {
displayText = result
}
num1 = parseFloat(displayText)
operatorType = "subtract"
displayText = ""
}
// Multiplication
function multiplyNumbers() {
if (displayText == "") {
displayText = result
}
num1 = parseFloat(displayText)
operatorType = "multiply"
displayText = ""
}
// Division
function divideNumbers() {
if (displayText == "") {
displayText = result
}
num1 = parseFloat(displayText)
operatorType = "divide"
displayText = ""
}
// Sine
function sin() {
id = document.getElementById("display");
if (displayText == "") {
num1 = result
}
else {
num1 = parseFloat(displayText)
}
if (num1 != "") {
result = Math.sin(num1)
id.value = result
displayText = ""
}
else {
alert("Please write the number first")
}
}
// Cosine
function cos() {
id = document.getElementById("display");
if (displayText == "") {
num1 = result
}
else {
num1 = parseFloat(displayText)
}
if (num1 != "") {
result = Math.cos(num1)
id.value = result
displayText = ""
}
else {
alert("Please write the number first")
}
}
// ArcSine
function arcSin() {
id = document.getElementById("display");
if (displayText == "") {
num1 = result
}
else {
num1 = parseFloat(displayText)
}
if (num1 != "") {
result = Math.asin(num1)
id.value = result
displayText = ""
}
else {
alert("Please write the number first")
}
}
// ArcCosine
function arcCos() {
id = document.getElementById("display");
if (displayText == "") {
num1 = result
}
else {
num1 = parseFloat(displayText)
}
if (num1 != "") {
result = Math.acos(num1)
id.value = result
displayText = ""
}
else {
alert("Please write the number first")
}
}
// Square root
function sqrt() {
id = document.getElementById("display");
if (displayText == "") {
num1 = result
}
else {
num1 = parseFloat(displayText)
}
if (num1 != "") {
result = Math.sqrt(num1)
id.value = result
displayText = ""
}
else {
alert("Please write the number first")
}
}
// Square number (number to the power of two)
function square() {
id = document.getElementById("display");
if (displayText == "") {
num1 = result
}
else {
num1 = parseFloat(displayText)
}
if (num1 != "") {
result = num1 * num1
id.value = result
displayText = ""
}
else {
alert("Please write the number first")
}
}
// Convert degrees to radians
function degToRad() {
id = document.getElementById("display");
if (displayText == "") {
num1 = result
}
else {
num1 = parseFloat(displayText)
}
if (num1 != "") {
result = num1 * Math.PI / 180
id.value = result
displayText = ""
}
else {
alert("Please write the number first")
}
}
// Convert radians to degrees
function radToDeg() {
id = document.getElementById("display");
if (displayText == "") {
num1 = result
}
else {
num1 = parseFloat(displayText)
}
if (num1 != "") {
result = num1 * 180 / Math.PI
id.value = result
displayText = ""
}
else {
alert("Please write the number first")
}
}
// Calculations
function calculate() {
id = document.getElementById("display");
if (displayText != "") {
num2 = parseFloat(displayText)
// Calc: Addition
if (operatorType == "add") {
result = num1 + num2
id.value = result
}
// Calc: Subtraction
if (operatorType == "subtract") {
result = num1 - num2
id.value = result
}
// Calc: Multiplication
if (operatorType == "multiply") {
result = num1 * num2
id.value = result
}
// Calc: Division
if (operatorType == "divide") {
result = num1 / num2
id.value = result
}
displayText = ""
}
else {
id.value = "Oops! Error!"
}
}
// Clear the display
function clearDisplay() {
id = document.getElementById("display");
displayText = ""
id.value = ""
}
</script>
EOT;
DI::page()['htmlhead'] .= $x;
}
function calc_content($app) {
$o = '';
$o .= <<< EOT
<h3>Calculator</h3>
<br /><br />
<table>
<tbody><tr><td>
<table bgcolor="#af9999" border="1">
<tbody><tr><td>
<table border="1" cellpadding="2" cellspacing="2">
<form name="calc">
<!--
<TR><TD VALIGN=top colspan=6 ALIGN="center"> <H2>Calculator</H2> </TD>
-->
<tbody><tr>
<td colspan="5"><input size="22" id="display" name="display" type="text"></td>
</tr><tr align="left" valign="middle">
<td><input name="one" value="&nbsp;&nbsp;1&nbsp;&nbsp;&nbsp;" onclick="addDisplay(1)" type="button"></td>
<td><input name="two" value="&nbsp;&nbsp;2&nbsp;&nbsp;&nbsp;" onclick="addDisplay(2)" type="button"></td>
<td><input name="three" value="&nbsp;&nbsp;3&nbsp;&nbsp;&nbsp;" onclick="addDisplay(3)" type="button"></td>
<td><input name="plus" value="&nbsp;&nbsp;+&nbsp;&nbsp;&nbsp;" onclick="addNumbers()" type="button"></td>
</tr><tr align="left" valign="middle">
<td><input name="four" value="&nbsp;&nbsp;4&nbsp;&nbsp;&nbsp;" onclick="addDisplay(4)" type="button"></td>
<td><input name="five" value="&nbsp;&nbsp;5&nbsp;&nbsp;&nbsp;" onclick="addDisplay(5)" type="button"></td>
<td><input name="six" value="&nbsp;&nbsp;6&nbsp;&nbsp;&nbsp;" onclick="addDisplay(6)" type="button"></td>
<td><input name="minus" value="&nbsp;&nbsp;&nbsp;-&nbsp;&nbsp;&nbsp;" onclick="subtractNumbers()" type="button"></td>
</tr><tr align="left" valign="middle">
<td><input name="seven" value="&nbsp;&nbsp;7&nbsp;&nbsp;&nbsp;" onclick="addDisplay(7)" type="button"></td>
<td><input name="eight" value="&nbsp;&nbsp;8&nbsp;&nbsp;&nbsp;" onclick="addDisplay(8)" type="button"></td>
<td><input name="nine" value="&nbsp;&nbsp;9&nbsp;&nbsp;&nbsp;" onclick="addDisplay(9)" type="button"></td>
<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="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">
<td><input name="sqareroot" value="sqrt" onclick="sqrt()" type="button"></td>
<td><input name="squarex" value=" x^2" onclick="square()" type="button"></td>
<td><input name="deg-rad" value="d2r&nbsp;" onclick="degToRad()" type="button"></td>
<td><input name="rad-deg" value="r2d&nbsp;" onclick="radToDeg()" type="button"></td>
</tr><tr align="left" valign="middle">
<td><input name="sine" value="&nbsp;sin&nbsp;" onclick="sin()" type="button"></td>
<td><input name="arcsine" value="asin" onclick="arcSin()" type="button"></td>
<td><input name="cosine" value="cos" onclick="cos()" type="button"></td>
<td><input name="arccosine" value="acs" onclick="arcCos()" type="button"></td>
</tr><tr align="left" valign="middle">
<td colspan="2"><input name="clear" value="&nbsp;&nbsp;Clear&nbsp;&nbsp;" onclick="clearDisplay()" type="button"></td>
<td colspan="3"><input name="enter" value="&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;=&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;" onclick="calculate()" type="button"></td>
</tr></tbody></table>
</form>
<!--
<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>
</td></tr></tbody></table>
EOT;
return $o;
}

View file

@ -49,7 +49,7 @@ function fromapp_settings(&$a, &$s)
/* 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/fromapp/fromapp.css' . '" media="all" />' . "\r\n";
DI::page()['htmlhead'] .= '<link rel="stylesheet" type="text/css" href="' . DI::baseUrl()->get() . '/addon/fromapp/fromapp.css' . '" media="all" />' . "\r\n";
/* Get the current state of our config variable */

View file

@ -70,7 +70,7 @@ function gnot_settings(&$a,&$s) {
/* 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/gnot/gnot.css' . '" media="all" />' . "\r\n";
DI::page()['htmlhead'] .= '<link rel="stylesheet" type="text/css" href="' . DI::baseUrl()->get() . '/addon/gnot/gnot.css' . '" media="all" />' . "\r\n";
/* Get the current state of our config variable */

View file

@ -65,7 +65,7 @@ function group_text_settings(&$a,&$s) {
/* 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/group_text/group_text.css' . '" media="all" />' . "\r\n";
DI::page()['htmlhead'] .= '<link rel="stylesheet" type="text/css" href="' . DI::baseUrl()->get() . '/addon/group_text/group_text.css' . '" media="all" />' . "\r\n";
/* Get the current state of our config variable */

View file

@ -62,7 +62,7 @@ function ijpost_settings(&$a, &$s)
/* 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/ijpost/ijpost.css' . '" media="all" />' . "\r\n";
DI::page()['htmlhead'] .= '<link rel="stylesheet" type="text/css" href="' . DI::baseUrl()->get() . '/addon/ijpost/ijpost.css' . '" media="all" />' . "\r\n";
/* Get the current state of our config variables */

View file

@ -47,7 +47,7 @@ function impressum_footer($a, &$b) {
$text = ProxyUtils::proxifyHtml(BBCode::convert(Config::get('impressum','footer_text')));
if (! $text == '') {
$a->page['htmlhead'] .= '<link rel="stylesheet" type="text/css" href="'.DI::baseUrl()->get().'/addon/impressum/impressum.css" media="all" />';
DI::page()['htmlhead'] .= '<link rel="stylesheet" type="text/css" href="'.DI::baseUrl()->get().'/addon/impressum/impressum.css" media="all" />';
$b .= '<div class="clear"></div>';
$b .= '<div id="impressum_footer">'.$text.'</div>';
}

View file

@ -36,7 +36,7 @@ function infiniteimprobabilitydrive_content(&$a)
$baseurl = DI::baseUrl()->get() . '/addon/infiniteimprobabilitydrive';
$o = '';
$a->page['htmlhead'] .= '<link rel="stylesheet" type="text/css" href="'.DI::baseUrl()->get().'/addon/infiniteimprobabilitydrive/infiniteimprobabilitydrive.css"/>';
DI::page()['htmlhead'] .= '<link rel="stylesheet" type="text/css" href="'.DI::baseUrl()->get().'/addon/infiniteimprobabilitydrive/infiniteimprobabilitydrive.css"/>';
$baseurl = DI::baseUrl()->get();

View file

@ -33,7 +33,7 @@ function irc_addon_settings(&$a,&$s) {
/* Add our stylesheet to the page so we can make our settings look nice */
// $a->page['htmlhead'] .= '<link rel="stylesheet" type="text/css" href="' . $a->getBaseURL() . '/addon/irc/irc.css' . '" media="all" />' . "\r\n";
// DI::page()['htmlhead'] .= '<link rel="stylesheet" type="text/css" href="' . $a->getBaseURL() . '/addon/irc/irc.css' . '" media="all" />' . "\r\n";
/* setting popular channels, auto connect channels */
$sitechats = PConfig::get( local_user(), 'irc','sitechats'); /* popular channels */
@ -98,11 +98,11 @@ function irc_content(&$a) {
$chats = ['friendica','chat','chatback','hottub','ircbar','dateroom','debian'];
$a->page['aside'] .= '<div class="widget"><h3>' . L10n::t('Popular Channels') . '</h3><ul>';
DI::page()['aside'] .= '<div class="widget"><h3>' . L10n::t('Popular Channels') . '</h3><ul>';
foreach($chats as $chat) {
$a->page['aside'] .= '<li><a href="' . DI::baseUrl()->get() . '/irc?channels=' . $chat . '" >' . '#' . $chat . '</a></li>';
DI::page()['aside'] .= '<li><a href="' . DI::baseUrl()->get() . '/irc?channels=' . $chat . '" >' . '#' . $chat . '</a></li>';
}
$a->page['aside'] .= '</ul></div>';
DI::page()['aside'] .= '</ul></div>';
/* setting the channel(s) to auto connect */
if (local_user()) {

View file

@ -143,7 +143,7 @@ function krynn_settings(&$a,&$s) {
/* 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/krynn/krynn.css' . '" media="all" />' . "\r\n";
DI::page()['htmlhead'] .= '<link rel="stylesheet" type="text/css" href="' . DI::baseUrl()->get() . '/addon/krynn/krynn.css' . '" media="all" />' . "\r\n";
/* Get the current state of our config variable */

View file

@ -62,7 +62,7 @@ function libertree_settings(&$a,&$s) {
/* 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/libertree/libertree.css' . '" media="all" />' . "\r\n";
DI::page()['htmlhead'] .= '<link rel="stylesheet" type="text/css" href="' . DI::baseUrl()->get() . '/addon/libertree/libertree.css' . '" media="all" />' . "\r\n";
/* Get the current state of our config variables */

View file

@ -62,7 +62,7 @@ function ljpost_settings(&$a,&$s) {
/* 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/ljpost/ljpost.css' . '" media="all" />' . "\r\n";
DI::page()['htmlhead'] .= '<link rel="stylesheet" type="text/css" href="' . DI::baseUrl()->get() . '/addon/ljpost/ljpost.css' . '" media="all" />' . "\r\n";
/* Get the current state of our config variables */

View file

@ -50,7 +50,7 @@ function newmemberwidget_network_mod_init ($a, $b)
}
$t .= '</div><div class="clear"></div>';
$a->page['aside'] = $t . $a->page['aside'];
DI::page()['aside'] = $t . DI::page()['aside'];
}
function newmemberwidget_addon_admin_post(&$a)

View file

@ -42,7 +42,7 @@ function notimeline_settings(&$a, &$s)
/* 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/notimeline/notimeline.css' . '" media="all" />' . "\r\n";
DI::page()['htmlhead'] .= '<link rel="stylesheet" type="text/css" href="' . DI::baseUrl()->get() . '/addon/notimeline/notimeline.css' . '" media="all" />' . "\r\n";
/* Get the current state of our config variable */

View file

@ -66,7 +66,7 @@ function nsfw_addon_settings(&$a, &$s)
/* 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/nsfw/nsfw.css' . '" media="all" />' . "\r\n";
DI::page()['htmlhead'] .= '<link rel="stylesheet" type="text/css" href="' . DI::baseUrl()->get() . '/addon/nsfw/nsfw.css' . '" media="all" />' . "\r\n";
$enable_checked = (intval(PConfig::get(local_user(), 'nsfw', 'disable')) ? '' : ' checked="checked" ');
$words = PConfig::get(local_user(), 'nsfw', 'words');

View file

@ -60,7 +60,7 @@ function numfriends_settings(&$a, &$s)
/* 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/numfriends/numfriends.css' . '" media="all" />' . "\r\n";
DI::page()['htmlhead'] .= '<link rel="stylesheet" type="text/css" href="' . DI::baseUrl()->get() . '/addon/numfriends/numfriends.css' . '" media="all" />' . "\r\n";
/* Get the current state of our config variable */

View file

@ -57,7 +57,7 @@ function openstreetmap_load_config(\Friendica\App $a, ConfigFileLoader $loader)
function openstreetmap_alterheader($a, &$navHtml)
{
$addScriptTag = '<script type="text/javascript" src="' . DI::baseUrl()->get() . '/addon/openstreetmap/openstreetmap.js"></script>' . "\r\n";
$a->page['htmlhead'] .= $addScriptTag;
DI::page()['htmlhead'] .= $addScriptTag;
}
/**

View file

@ -66,7 +66,7 @@ function piwik_analytics($a,&$b) {
* associated CSS file. We just have to tell Friendica to get it
* into the page header.
*/
$a->page['htmlhead'] .= '<link rel="stylesheet" type="text/css" href="' . DI::baseUrl()->get() . '/addon/piwik/piwik.css' . '" media="all" />';
DI::page()['htmlhead'] .= '<link rel="stylesheet" type="text/css" href="' . DI::baseUrl()->get() . '/addon/piwik/piwik.css' . '" media="all" />';
/*
* Get the configuration variables from the config/addon.config.php file.

View file

@ -140,7 +140,7 @@ function planets_settings(&$a,&$s) {
/* 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/planets/planets.css' . '" media="all" />' . "\r\n";
DI::page()['htmlhead'] .= '<link rel="stylesheet" type="text/css" href="' . DI::baseUrl()->get() . '/addon/planets/planets.css' . '" media="all" />' . "\r\n";
/* Get the current state of our config variable */

View file

@ -43,7 +43,7 @@ function qcomment_addon_settings(&$a, &$s)
/* 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/qcomment/qcomment.css' . '" media="all" />' . "\r\n";
DI::page()['htmlhead'] .= '<link rel="stylesheet" type="text/css" href="' . DI::baseUrl()->get() . '/addon/qcomment/qcomment.css' . '" media="all" />' . "\r\n";
$words = PConfig::get(local_user(), 'qcomment', 'words', L10n::t(':-)') . "\n" . L10n::t(':-(') . "\n" . L10n::t('lol'));

View file

@ -159,7 +159,7 @@ function randplace_settings(&$a,&$s) {
/* 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/randplace/randplace.css' . '" media="all" />' . "\r\n";
DI::page()['htmlhead'] .= '<link rel="stylesheet" type="text/css" href="' . DI::baseUrl()->get() . '/addon/randplace/randplace.css' . '" media="all" />' . "\r\n";
/* Get the current state of our config variable */

View file

@ -39,7 +39,7 @@ function remote_permissions_settings(&$a,&$o) {
/* 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/remote_permissions/settings.css' . '" media="all" />' . "\r\n";
DI::page()['htmlhead'] .= '<link rel="stylesheet" type="text/css" href="' . DI::baseUrl()->get() . '/addon/remote_permissions/settings.css' . '" media="all" />' . "\r\n";
/* Get the current state of our config variable */

View file

@ -35,7 +35,7 @@ function showmore_addon_settings(&$a, &$s)
/* 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/showmore/showmore.css'.'" media="all"/>'."\r\n";
DI::page()['htmlhead'] .= '<link rel="stylesheet" type="text/css" href="'.DI::baseUrl()->get().'/addon/showmore/showmore.css'.'" media="all"/>'."\r\n";
$enable_checked = (intval(PConfig::get(local_user(), 'showmore', 'disable')) ? '' : ' checked="checked"');
$chars = PConfig::get(local_user(), 'showmore', 'chars', 1100);

View file

@ -72,7 +72,7 @@ function startpage_settings(&$a, &$s)
/* 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/startpage/startpage.css' . '" media="all" />' . "\r\n";
DI::page()['htmlhead'] .= '<link rel="stylesheet" type="text/css" href="' . DI::baseUrl()->get() . '/addon/startpage/startpage.css' . '" media="all" />' . "\r\n";
/* Get the current state of our config variable */

View file

@ -38,7 +38,7 @@ function superblock_addon_settings(&$a, &$s)
/* 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/superblock/superblock.css' . '" media="all" />' . "\r\n";
DI::page()['htmlhead'] .= '<link rel="stylesheet" type="text/css" href="' . DI::baseUrl()->get() . '/addon/superblock/superblock.css' . '" media="all" />' . "\r\n";
$words = PConfig::get(local_user(), 'system', 'blocked');
if (!$words) {
@ -112,7 +112,7 @@ function superblock_conversation_start(&$a, &$b)
if ($words) {
$a->data['superblock'] = explode(',', $words);
}
$a->page['htmlhead'] .= <<< EOT
DI::page()['htmlhead'] .= <<< EOT
<script>
function superblockBlock(author) {

View file

@ -25,7 +25,7 @@ function viewsrc_uninstall() {
}
function viewsrc_page_end(&$a, &$o){
$a->page['htmlhead'] .= <<< EOS
DI::page()['htmlhead'] .= <<< EOS
<script>
$(function(){
$('a[href*="/viewsrc/"]').each(function() {

View file

@ -107,7 +107,7 @@ function windowsphonepush_settings(&$a, &$s)
}
/* 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/windowsphonepush/windowsphonepush.css' . '" media="all" />' . "\r\n";
DI::page()['htmlhead'] .= '<link rel="stylesheet" type="text/css" href="' . DI::baseUrl()->get() . '/addon/windowsphonepush/windowsphonepush.css' . '" media="all" />' . "\r\n";
/* Get the current state of our config variables */
$enabled = PConfig::get(local_user(), 'windowsphonepush', 'enable');

View file

@ -70,7 +70,7 @@ function wppost_settings(&$a,&$s) {
/* 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/wppost/wppost.css' . '" media="all" />' . "\r\n";
DI::page()['htmlhead'] .= '<link rel="stylesheet" type="text/css" href="' . DI::baseUrl()->get() . '/addon/wppost/wppost.css' . '" media="all" />' . "\r\n";
/* Get the current state of our config variables */