Commit 03897f79 authored by redmatrix's avatar redmatrix

deprecate $a->get_baseurl()

parent ee628c40
......@@ -1466,7 +1466,7 @@ function diaspora_asphoto($importer,$xml,$msg) {
//if($message_id) {
// q("update item set plink = '%s' where id = %d",
// dbesc($a->get_baseurl() . '/display/' . $importer['nickname'] . '/' . $message_id),
// dbesc(z_root() . '/display/' . $importer['nickname'] . '/' . $message_id),
// intval($message_id)
// );
//}
......@@ -2560,7 +2560,7 @@ function diaspora_share($owner,$contact) {
$myaddr = $owner['channel_address'] . '@' . substr($a->get_baseurl(), strpos($a->get_baseurl(),'://') + 3);
$myaddr = $owner['channel_address'] . '@' . substr(z_root(), strpos(z_root(),'://') + 3);
if(! array_key_exists('hubloc_hash',$contact)) {
$c = q("select * from xchan left join hubloc on xchan_hash = hubloc_hash where xchan_hash = '%s' limit 1",
......@@ -2588,7 +2588,7 @@ function diaspora_share($owner,$contact) {
function diaspora_unshare($owner,$contact) {
$a = get_app();
$myaddr = $owner['channel_address'] . '@' . substr($a->get_baseurl(), strpos($a->get_baseurl(),'://') + 3);
$myaddr = $owner['channel_address'] . '@' . substr(z_root(), strpos(z_root(),'://') + 3);
$tpl = get_markup_template('diaspora_retract.tpl','addon/diaspora');
$msg = replace_macros($tpl, array(
......@@ -2606,7 +2606,7 @@ function diaspora_unshare($owner,$contact) {
function diaspora_send_status($item,$owner,$contact,$public_batch = false) {
$a = get_app();
$myaddr = $owner['channel_address'] . '@' . substr($a->get_baseurl(), strpos($a->get_baseurl(),'://') + 3);
$myaddr = $owner['channel_address'] . '@' . substr(z_root(), strpos(z_root(),'://') + 3);
if(intval($item['id']) != intval($item['parent'])) {
logger('attempted to send a comment as a top-level post');
......@@ -2769,7 +2769,7 @@ function diaspora_send_images($item,$owner,$contact,$images,$public_batch = fals
$a = get_app();
if(! count($images))
return;
$mysite = substr($a->get_baseurl(),strpos($a->get_baseurl(),'://') + 3) . '/photo';
$mysite = substr(z_root(),strpos(z_root(),'://') + 3) . '/photo';
$qi = array();
......@@ -2995,7 +2995,7 @@ function diaspora_send_relay($item,$owner,$contact,$public_batch = false) {
// bug - nomadic identity may/will affect diaspora_handle_from_contact
if(! $handle) {
if($item['author_xchan'] === $owner['channel_hash'])
$handle = $owner['channel_address'] . '@' . substr($a->get_baseurl(), strpos($a->get_baseurl(),'://') + 3);
$handle = $owner['channel_address'] . '@' . substr(z_root(), strpos(z_root(),'://') + 3);
else
$handle = diaspora_handle_from_contact($item['author_xchan']);
}
......
......@@ -115,7 +115,7 @@ function diaspost_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->get_baseurl() . '/addon/diaspost/diaspost.css' . '" media="all" />' . "\r\n";
//$a->page['htmlhead'] .= '<link rel="stylesheet" type="text/css" href="' . z_root() . '/addon/diaspost/diaspost.css' . '" media="all" />' . "\r\n";
/* Get the current state of our config variables */
......
......@@ -51,7 +51,7 @@ function dwpost_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->get_baseurl() . '/addon/dwpost/dwpost.css' . '" media="all" />' . "\r\n";
//$a->page['htmlhead'] .= '<link rel="stylesheet" type="text/css" href="' . z_root() . '/addon/dwpost/dwpost.css' . '" media="all" />' . "\r\n";
/* Get the current state of our config variables */
......
......@@ -29,7 +29,7 @@ function flattrwidget_construct_page(&$a,&$b) {
$enable = intval(get_pconfig($id,'flattrwidget','enable'));
if (! $enable)
return;
$a->page['htmlhead'] .= '<link rel="stylesheet" href="'.$a->get_baseurl().'/addon/flattrwidget/style.css'.'" media="all" />';
$a->page['htmlhead'] .= '<link rel="stylesheet" href="'.z_root().'/addon/flattrwidget/style.css'.'" media="all" />';
// get alignment and static/dynamic from the settings
// align is either "aside" or "right_aside"
// sd is either static or dynamic
......@@ -47,7 +47,7 @@ function flattrwidget_construct_page(&$a,&$b) {
$link = 'https://flattr.com/submit/auto?user_id='.$user.'&url=' . rawurlencode($thing).'&title='.rawurlencode($ftitle);
if ($sd == 'static') {
// static button graphic from the img folder
$img = $a->get_baseurl() .'/addon/flattrwidget/img/flattr-badge-large.png';
$img = z_root() .'/addon/flattrwidget/img/flattr-badge-large.png';
$code = '<a href="'.$link.'" target="_blank"><img src="'.$img.'" alt="'.$title.'" title="'.$title.'" border="0"></a>';
} else {
$code = '<script id=\'fbdu5zs\'>(function(i){var f,s=document.getElementById(i);f=document.createElement(\'iframe\');f.src=\'//api.flattr.com/button/view/?uid='.$user.'&url='.rawurlencode($thing).'&title='.rawurlencode($ftitle).'\';f.title=\''.$title.'\';f.height=72;f.width=65;f.style.borderWidth=0;s.parentNode.insertBefore(f,s);})(\'fbdu5zs\');</script>';
......@@ -70,7 +70,7 @@ function flattrwidget_settings_post($a,$s) {
set_pconfig( local_channel(), 'flattrwidget', 'sd', $_POST['flattrwidget-static'] );
$thing = $_POST['flattrwidget-thing'];
if ($thing == '') {
$thing = $a->get_baseurl().'/channel/'.$c['channel_address'];
$thing = z_root().'/channel/'.$c['channel_address'];
}
set_pconfig( local_channel(), 'flattrwidget', 'thing', $thing);
set_pconfig( local_channel(), 'flattrwidget', 'user', $_POST['flattrwidget-user']);
......@@ -87,7 +87,7 @@ function flattrwidget_settings(&$a,&$s) {
if (! $id)
return;
//$a->page['htmlhead'] .= '<link rel="stylesheet" href="'.$a->get_baseurl().'/addon/flattrwidget/style.css'.'" media="all" />';
//$a->page['htmlhead'] .= '<link rel="stylesheet" href="'.z_root().'/addon/flattrwidget/style.css'.'" media="all" />';
$lr = get_pconfig( $id, 'flattrwidget', 'align');
$sd = get_pconfig( $id, 'flattrwidget', 'sd');
$thing = get_pconfig( $id, 'flattrwidget', 'thing');
......
......@@ -27,7 +27,7 @@ function fortunate_fetch(&$a,&$b) {
return;
$a->page['htmlhead'] .= '<link rel="stylesheet" type="text/css" href="'
. $a->get_baseurl() . '/addon/fortunate/fortunate.css' . '" media="all" />' . "\r\n";
. z_root() . '/addon/fortunate/fortunate.css' . '" media="all" />' . "\r\n";
$s = z_fetch_url('http://' . $fort_server . '/cookie.php?numlines=4&equal=1&rand=' . mt_rand());
if($s['success'])
......
......@@ -51,7 +51,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="' . $a->get_baseurl() . '/addon/ijpost/ijpost.css' . '" media="all" />' . "\r\n";
//$a->page['htmlhead'] .= '<link rel="stylesheet" type="text/css" href="' . z_root() . '/addon/ijpost/ijpost.css' . '" media="all" />' . "\r\n";
/* Get the current state of our config variables */
......
......@@ -35,7 +35,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->get_baseurl() . '/addon/irc/irc.css' . '" media="all" />' . "\r\n";
//$a->page['htmlhead'] .= '<link rel="stylesheet" type="text/css" href="' . z_root() . '/addon/irc/irc.css' . '" media="all" />' . "\r\n";
/* setting popular channels, auto connect channels */
$sitechats = get_config('irc','sitechats'); /* popular channels */
......@@ -82,7 +82,7 @@ return;
function irc_content(&$a) {
$baseurl = $a->get_baseurl() . '/addon/irc';
$baseurl = z_root() . '/addon/irc';
$o = '';
/* set the list of popular channels */
......@@ -95,7 +95,7 @@ function irc_content(&$a) {
$a->page['aside'] .= '<div class="widget"><h3>' . t('Popular Channels') . '</h3><ul>';
foreach($chats as $chat) {
$a->page['aside'] .= '<li><a href="' . $a->get_baseurl() . '/irc?channels=' . $chat . '" >' . '#' . $chat . '</a></li>';
$a->page['aside'] .= '<li><a href="' . z_root() . '/irc?channels=' . $chat . '" >' . '#' . $chat . '</a></li>';
}
$a->page['aside'] .= '</ul></div>';
......
......@@ -297,9 +297,9 @@ function jappixmini_settings(&$a, &$s) {
if (!$activate) {
// load scripts if not yet activated so that password can be saved
$a->page['htmlhead'] .= '<script type="text/javascript" src="' . $a->get_baseurl() . '/addon/jappixmini/jappix/php/get.php?t=js&amp;g=mini.xml"></script>'."\r\n";
$a->page['htmlhead'] .= '<script type="text/javascript" src="' . $a->get_baseurl() . '/addon/jappixmini/jappix/php/get.php?t=js&amp;f=presence.js~caps.js~name.js~roster.js"></script>'."\r\n";
$a->page['htmlhead'] .= '<script type="text/javascript" src="' . $a->get_baseurl() . '/addon/jappixmini/lib.js"></script>'."\r\n";
$a->page['htmlhead'] .= '<script type="text/javascript" src="' . z_root() . '/addon/jappixmini/jappix/php/get.php?t=js&amp;g=mini.xml"></script>'."\r\n";
$a->page['htmlhead'] .= '<script type="text/javascript" src="' . z_root() . '/addon/jappixmini/jappix/php/get.php?t=js&amp;f=presence.js~caps.js~name.js~roster.js"></script>'."\r\n";
$a->page['htmlhead'] .= '<script type="text/javascript" src="' . z_root() . '/addon/jappixmini/lib.js"></script>'."\r\n";
}
$sc .= '<div class="section-content-info-wrapper form-group">';
......@@ -490,10 +490,10 @@ function jappixmini_script(&$a,&$s) {
if (!$activate or $dontinsertchat) {
return;
}
$a->page['htmlhead'] .= '<script type="text/javascript" src="' . $a->get_baseurl() . '/addon/jappixmini/jappix/php/get.php?t=js&amp;g=mini.xml"></script>'."\r\n";
$a->page['htmlhead'] .= '<script type="text/javascript" src="' . $a->get_baseurl() . '/addon/jappixmini/jappix/php/get.php?t=js&amp;f=presence.js~caps.js~name.js~roster.js"></script>'."\r\n";
$a->page['htmlhead'] .= '<script type="text/javascript" src="' . z_root() . '/addon/jappixmini/jappix/php/get.php?t=js&amp;g=mini.xml"></script>'."\r\n";
$a->page['htmlhead'] .= '<script type="text/javascript" src="' . z_root() . '/addon/jappixmini/jappix/php/get.php?t=js&amp;f=presence.js~caps.js~name.js~roster.js"></script>'."\r\n";
$a->page['htmlhead'] .= '<script type="text/javascript" src="' . $a->get_baseurl() . '/addon/jappixmini/lib.js"></script>'."\r\n";
$a->page['htmlhead'] .= '<script type="text/javascript" src="' . z_root() . '/addon/jappixmini/lib.js"></script>'."\r\n";
$username = get_pconfig(local_channel(),'jappixmini','username');
$username = str_replace("'", "\\'", $username);
......@@ -514,7 +514,7 @@ function jappixmini_script(&$a,&$s) {
// set proxy if necessary
$use_proxy = get_config('jappixmini','bosh_proxy');
if ($use_proxy) {
$proxy = $a->get_baseurl().'/addon/jappixmini/proxy.php';
$proxy = z_root().'/addon/jappixmini/proxy.php';
}
else {
$proxy = "";
......@@ -568,10 +568,10 @@ function jappixmini_login(&$a, &$o) {
// 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="' . $a->get_baseurl() . '/addon/jappixmini/jappix/php/get.php?t=js&amp;f=datastore.js~jsjac.js"></script>'."\r\n";
$a->page['htmlhead'] .= '<script type="text/javascript" src="' . z_root() . '/addon/jappixmini/jappix/php/get.php?t=js&amp;f=datastore.js~jsjac.js"></script>'."\r\n";
// for jappixmini_addon_set_client_secret
$a->page['htmlhead'] .= '<script type="text/javascript" src="' . $a->get_baseurl() . '/addon/jappixmini/lib.js"></script>'."\r\n";
$a->page['htmlhead'] .= '<script type="text/javascript" src="' . z_root() . '/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);
......@@ -699,6 +699,6 @@ function jappixmini_download_source(&$a,&$b) {
// Jappix Mini source download link on About page
$b .= '<h1>Jappix Mini</h1>';
$b .= '<p>This site uses the jappixmini addon, which includes Jappix Mini by the <a href="'.$a->get_baseurl().'/addon/jappixmini/jappix/AUTHORS">Jappix authors</a> and is distributed under the terms of the <a href="'.$a->get_baseurl().'/addon/jappixmini/jappix/COPYING">GNU Affero General Public License</a>.</p>';
$b .= '<p>You can download the <a href="'.$a->get_baseurl().'/addon/jappixmini.tgz">source code of the addon</a>. The rest of Hubzilla is distributed under compatible licenses and can be retrieved from <a href="https://github.com/friendica/red">https://github.com/friendica/red</a> and <a href="https://github.com/friendica/red-addons">https://github.com/friendica/red-addons</a></p>';
$b .= '<p>This site uses the jappixmini addon, which includes Jappix Mini by the <a href="'.z_root().'/addon/jappixmini/jappix/AUTHORS">Jappix authors</a> and is distributed under the terms of the <a href="'.z_root().'/addon/jappixmini/jappix/COPYING">GNU Affero General Public License</a>.</p>';
$b .= '<p>You can download the <a href="'.z_root().'/addon/jappixmini.tgz">source code of the addon</a>. The rest of Hubzilla is distributed under compatible licenses and can be retrieved from <a href="https://github.com/friendica/red">https://github.com/friendica/red</a> and <a href="https://github.com/friendica/red-addons">https://github.com/friendica/red-addons</a></p>';
}
......@@ -38,8 +38,8 @@ function js_upload_form(&$a,&$b) {
$b['default_upload'] = false;
$b['addon_text'] .= '<link href="' . $a->get_baseurl() . '/addon/js_upload/file-uploader/client/fileuploader.css" rel="stylesheet" type="text/css">';
$b['addon_text'] .= '<script src="' . $a->get_baseurl() . '/addon/js_upload/file-uploader/client/fileuploader.js" type="text/javascript"></script>';
$b['addon_text'] .= '<link href="' . z_root() . '/addon/js_upload/file-uploader/client/fileuploader.css" rel="stylesheet" type="text/css">';
$b['addon_text'] .= '<script src="' . z_root() . '/addon/js_upload/file-uploader/client/fileuploader.js" type="text/javascript"></script>';
$upload_msg = t('Upload a file');
$drop_msg = t('Drop files here to upload');
......
......@@ -47,7 +47,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="' . $a->get_baseurl() . '/addon/libertree/libertree.css' . '" media="all" />' . "\r\n";
//$a->page['htmlhead'] .= '<link rel="stylesheet" type="text/css" href="' . z_root() . '/addon/libertree/libertree.css' . '" media="all" />' . "\r\n";
/* Get the current state of our config variables */
......@@ -152,7 +152,7 @@ function libertree_send(&$a,&$b) {
$ltree_api_token = get_pconfig($b['uid'],'libertree','libertree_api_token');
$ltree_url = get_pconfig($b['uid'],'libertree','libertree_url');
$ltree_blog = "$ltree_url/api/v1/posts/create/?token=$ltree_api_token";
$ltree_source = "[".$a->config['system']['sitename']."](".$a->get_baseurl().")";
$ltree_source = "[".$a->config['system']['sitename']."](".z_root().")";
// $ltree_source = "Hubzilla";
logger('sitename: ' . print_r($ltree_source,true));
if($ltree_url && $ltree_api_token && $ltree_blog && $ltree_source) {
......
......@@ -51,7 +51,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="' . $a->get_baseurl() . '/addon/ljpost/ljpost.css' . '" media="all" />' . "\r\n";
//$a->page['htmlhead'] .= '<link rel="stylesheet" type="text/css" href="' . z_root() . '/addon/ljpost/ljpost.css' . '" media="all" />' . "\r\n";
/* Get the current state of our config variables */
......
......@@ -27,7 +27,7 @@ function mahjongg_module() {}
function mahjongg_content(&$a) {
$baseurl = $a->get_baseurl() . '/addon/mahjongg';
$baseurl = z_root() . '/addon/mahjongg';
$o .= <<< EOT
<br><br>
......
......@@ -143,7 +143,7 @@ function nsabait_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->get_baseurl() . '/addon/nsabait/nsabait.css' . '" media="all" />' . "\r\n";
//$a->page['htmlhead'] .= '<link rel="stylesheet" type="text/css" href="' . z_root() . '/addon/nsabait/nsabait.css' . '" media="all" />' . "\r\n";
/* Get the current state of our config variable */
......
......@@ -277,8 +277,8 @@ function openclipatar_content(&$a) {
else {
// not the default profile, set the path in the correct entry in the profile DB
$r = q("update profile set photo = '%s', thumb = '%s' where id = %d and uid = %d",
dbesc(get_app()->get_baseurl() . '/photo/' . $hash . '-4'),
dbesc(get_app()->get_baseurl() . '/photo/' . $hash . '-5'),
dbesc(z_root() . '/photo/' . $hash . '-4'),
dbesc(z_root() . '/photo/' . $hash . '-5'),
intval($_REQUEST['profile']),
intval(local_channel())
);
......@@ -294,9 +294,9 @@ function openclipatar_content(&$a) {
$returnafter = get_config('openclipatar', 'returnafter');
$returnafter_urls = array(
0 => $a->get_baseurl() . '/profile/' . ($_REQUEST['profile'] ? $_REQUEST['profile'].'/view' : $chan['channel_address']),
1 => $a->get_baseurl() . '/profiles/' . ($_REQUEST['profile'] ? $_REQUEST['profile'] : $a->profile_uid),
2 => $a->get_baseurl() . '/profiles'
0 => z_root() . '/profile/' . ($_REQUEST['profile'] ? $_REQUEST['profile'].'/view' : $chan['channel_address']),
1 => z_root() . '/profiles/' . ($_REQUEST['profile'] ? $_REQUEST['profile'] : $a->profile_uid),
2 => z_root() . '/profiles'
);
goaway($returnafter_urls[$returnafter]);
......
......@@ -27,7 +27,7 @@ function openstreetmap_unload() {
}
function openstreetmap_alterheader($a, &$navHtml) {
$addScriptTag = '<script type="text/javascript" src="' . $a->get_baseurl() . '/addon/openstreetmap/openstreetmap.js"></script>' . "\r\n";
$addScriptTag = '<script type="text/javascript" src="' . z_root() . '/addon/openstreetmap/openstreetmap.js"></script>' . "\r\n";
$a->page['htmlhead'] .= $addScriptTag;
}
......
......@@ -75,7 +75,7 @@ function pageheader_fetch($a,&$b) {
$s = file_get_contents('pageheader.html');
} else {
$s = get_config('pageheader', 'text');
$a->page['htmlhead'] .= '<link rel="stylesheet" type="text/css" href="' . $a->get_baseurl() . '/addon/pageheader/pageheader.css' . '" media="all" />' . "\r\n";
$a->page['htmlhead'] .= '<link rel="stylesheet" type="text/css" href="' . z_root() . '/addon/pageheader/pageheader.css' . '" media="all" />' . "\r\n";
}
if($s)
......
......@@ -52,7 +52,7 @@ function piwik_analytics($a,&$b) {
* associated CSS file. We just have to tell Hubzilla to get it
* into the page header.
*/
$a->page['htmlhead'] .= '<link rel="stylesheet" type="text/css" href="' . $a->get_baseurl() . '/addon/piwik/piwik.css' . '" media="all" />';
$a->page['htmlhead'] .= '<link rel="stylesheet" type="text/css" href="' . z_root() . '/addon/piwik/piwik.css' . '" media="all" />';
/*
* Get the configuration variables from the .htconfig file.
......
......@@ -139,7 +139,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="' . $a->get_baseurl() . '/addon/planets/planets.css' . '" media="all" />' . "\r\n";
//$a->page['htmlhead'] .= '<link rel="stylesheet" type="text/css" href="' . z_root() . '/addon/planets/planets.css' . '" media="all" />' . "\r\n";
/* Get the current state of our config variable */
......
......@@ -173,7 +173,7 @@ function pumpio_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->get_baseurl() . '/addon/pumpio/pumpio.css' . '" media="all" />' . "\r\n";
//$a->page['htmlhead'] .= '<link rel="stylesheet" type="text/css" href="' . z_root() . '/addon/pumpio/pumpio.css' . '" media="all" />' . "\r\n";
/* Get the current state of our config variables */
......@@ -212,7 +212,7 @@ function pumpio_settings(&$a,&$s) {
$sc .= '<div class="section-content-danger-wrapper">';
$sc .= '<strong>' . t("You are not authenticated to pumpio") . '</strong>';
$sc .= '</div>';
$sc .= '<a href="'.$a->get_baseurl().'/pumpio/connect" class="btn btn-primary btn-xs">'.t("(Re-)Authenticate your pump.io connection").'</a>';
$sc .= '<a href="'.z_root().'/pumpio/connect" class="btn btn-primary btn-xs">'.t("(Re-)Authenticate your pump.io connection").'</a>';
}
$sc .= replace_macros(get_markup_template('field_checkbox.tpl'), array(
......
......@@ -61,7 +61,7 @@ function randpost_enotify_store(&$a,&$b) {
$my_conversation = true;
elseif($p[0]['term']) {
$v = get_terms_oftype($p[0]['term'],TERM_MENTION);
$link = normalise_link($a->get_baseurl() . '/channel/' . $c[0]['channel_address']);
$link = normalise_link(z_root() . '/channel/' . $c[0]['channel_address']);
if($v) {
foreach($v as $vv) {
if(link_compare($vv['url'],$link)) {
......
......@@ -95,28 +95,28 @@ function show_button($a, &$b) {
);
$icons = array(
'<img class="smiley" src="' . $a->get_baseurl() . '/images/smiley-heart.gif" alt="<3" />',
'<img class="smiley" src="' . $a->get_baseurl() . '/images/smiley-brokenheart.gif" alt="</3" />',
'<img class="smiley" src="' . $a->get_baseurl() . '/images/smiley-smile.gif" alt=":-)" />',
'<img class="smiley" src="' . $a->get_baseurl() . '/images/smiley-wink.gif" alt=";-)" />',
'<img class="smiley" src="' . $a->get_baseurl() . '/images/smiley-frown.gif" alt=":-(" />',
'<img class="smiley" src="' . $a->get_baseurl() . '/images/smiley-tongue-out.gif" alt=":-P" />',
'<img class="smiley" src="' . $a->get_baseurl() . '/images/smiley-kiss.gif" alt=":-X" />',
'<img class="smiley" src="' . $a->get_baseurl() . '/images/smiley-laughing.gif" alt=":-D" />',
'<img class="smiley" src="' . $a->get_baseurl() . '/images/smiley-surprised.gif" alt=":-O" />',
'<img class="smiley" src="' . $a->get_baseurl() . '/images/smiley-thumbsup.gif" alt="\\o/" />',
'<img class="smiley" src="' . $a->get_baseurl() . '/images/smiley-Oo.gif" alt="O_o" />',
'<img class="smiley" src="' . $a->get_baseurl() . '/images/smiley-cry.gif" alt=":\'(" />',
'<img class="smiley" src="' . $a->get_baseurl() . '/images/smiley-foot-in-mouth.gif" alt=":-!" />',
'<img class="smiley" src="' . $a->get_baseurl() . '/images/smiley-undecided.gif" alt=":-/" />',
'<img class="smiley" src="' . $a->get_baseurl() . '/images/smiley-embarassed.gif" alt=":-[" />',
'<img class="smiley" src="' . $a->get_baseurl() . '/images/smiley-cool.gif" alt="8-)" />',
'<img class="smiley" src="' . $a->get_baseurl() . '/images/beer_mug.gif" alt=":beer" />',
'<img class="smiley" src="' . $a->get_baseurl() . '/images/coffee.gif" alt=":coffee" />',
'<img class="smiley" src="' . $a->get_baseurl() . '/images/smiley-facepalm.gif" alt=":facepalm" />',
'<img class="smiley" src="' . $a->get_baseurl() . '/images/like.gif" alt=":like" />',
'<img class="smiley" src="' . $a->get_baseurl() . '/images/dislike.gif" alt=":dislike" />',
'<img class="smiley" src="' . $a->get_baseurl() . '/images/rhash-16.png" alt="red" />'
'<img class="smiley" src="' . z_root() . '/images/smiley-heart.gif" alt="<3" />',
'<img class="smiley" src="' . z_root() . '/images/smiley-brokenheart.gif" alt="</3" />',
'<img class="smiley" src="' . z_root() . '/images/smiley-smile.gif" alt=":-)" />',
'<img class="smiley" src="' . z_root() . '/images/smiley-wink.gif" alt=";-)" />',
'<img class="smiley" src="' . z_root() . '/images/smiley-frown.gif" alt=":-(" />',
'<img class="smiley" src="' . z_root() . '/images/smiley-tongue-out.gif" alt=":-P" />',
'<img class="smiley" src="' . z_root() . '/images/smiley-kiss.gif" alt=":-X" />',
'<img class="smiley" src="' . z_root() . '/images/smiley-laughing.gif" alt=":-D" />',
'<img class="smiley" src="' . z_root() . '/images/smiley-surprised.gif" alt=":-O" />',
'<img class="smiley" src="' . z_root() . '/images/smiley-thumbsup.gif" alt="\\o/" />',
'<img class="smiley" src="' . z_root() . '/images/smiley-Oo.gif" alt="O_o" />',
'<img class="smiley" src="' . z_root() . '/images/smiley-cry.gif" alt=":\'(" />',
'<img class="smiley" src="' . z_root() . '/images/smiley-foot-in-mouth.gif" alt=":-!" />',
'<img class="smiley" src="' . z_root() . '/images/smiley-undecided.gif" alt=":-/" />',
'<img class="smiley" src="' . z_root() . '/images/smiley-embarassed.gif" alt=":-[" />',
'<img class="smiley" src="' . z_root() . '/images/smiley-cool.gif" alt="8-)" />',
'<img class="smiley" src="' . z_root() . '/images/beer_mug.gif" alt=":beer" />',
'<img class="smiley" src="' . z_root() . '/images/coffee.gif" alt=":coffee" />',
'<img class="smiley" src="' . z_root() . '/images/smiley-facepalm.gif" alt=":facepalm" />',
'<img class="smiley" src="' . z_root() . '/images/like.gif" alt=":like" />',
'<img class="smiley" src="' . z_root() . '/images/dislike.gif" alt=":dislike" />',
'<img class="smiley" src="' . z_root() . '/images/rhash-16.png" alt="red" />'
);
/**
......@@ -152,7 +152,7 @@ function show_button($a, &$b) {
*
*/
$a->page['htmlhead'] .= '<link rel="stylesheet" type="text/css" href="' . $a->get_baseurl() . '/addon/smileybutton/smileybutton.css' . '" media="all" />' . "\r\n";
$a->page['htmlhead'] .= '<link rel="stylesheet" type="text/css" href="' . z_root() . '/addon/smileybutton/smileybutton.css' . '" media="all" />' . "\r\n";
/**
*
......@@ -161,7 +161,7 @@ function show_button($a, &$b) {
*/
if (! $nobutton and ! $deactivated) {
$b .= "<div id=\"profile-smiley-wrapper\" >\n";
//$b .= "\t<img src=\"" . $a->get_baseurl() . "/addon/smileybutton/icon.gif\" onclick=\"toggle_smileybutton(); return false;\" alt=\"smiley\">\n";
//$b .= "\t<img src=\"" . z_root() . "/addon/smileybutton/icon.gif\" onclick=\"toggle_smileybutton(); return false;\" alt=\"smiley\">\n";
$b .= "\t<button class=\"btn btn-default btn-sm\" onclick=\"toggle_smileybutton(); return false;\"><i id=\"profile-smiley-button\" class=\"icon-smile jot-icons\" ></i></button>\n";
$b .= "\t</div>\n";
}
......@@ -262,7 +262,7 @@ function smileybutton_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->get_baseurl() . '/addon/smileybutton/smileybutton.css' . '" media="all" />' . "\r\n";
//$a->page['htmlhead'] .= '<link rel="stylesheet" type="text/css" href="' . z_root() . '/addon/smileybutton/smileybutton.css' . '" media="all" />' . "\r\n";
/* Get the current state of our config variable */
......
......@@ -42,7 +42,7 @@ function startpage_home_init($a, $b) {
if(stristr($page,'://'))
goaway(z_root() . '/' . $page);
goaway($a->get_baseurl() . (($slash) ? '' : '/') . $page);
goaway(z_root() . (($slash) ? '' : '/') . $page);
}
return;
}
......
......@@ -196,7 +196,7 @@ function statusnet_settings_post ($a,$post) {
}
}
}
goaway($a->get_baseurl().'/settings/featured');
goaway(z_root().'/settings/featured');
}
else {
......@@ -232,7 +232,7 @@ function statusnet_settings_post ($a,$post) {
notice( t('We could not contact the GNU social API with the Path you entered.').EOL );
}
}
goaway($a->get_baseurl().'/settings/featured');
goaway(z_root().'/settings/featured');
}
else {
......@@ -253,7 +253,7 @@ function statusnet_settings_post ($a,$post) {
set_pconfig(local_channel(),'statusnet', 'post', 1);
set_pconfig(local_channel(),'statusnet', 'post_taglinks', 1);
// reload the Addon Settings page, if we don't do it see Bug #42
goaway($a->get_baseurl().'/settings/featured');
goaway(z_root().'/settings/featured');
}
else {
// if no PIN is supplied in the POST variables, the user has changed the setting
......@@ -274,7 +274,7 @@ function statusnet_settings(&$a,&$s) {
if(! local_channel())
return;
$a->page['htmlhead'] .= '<link rel="stylesheet" type="text/css" href="' . $a->get_baseurl() . '/addon/statusnet/statusnet.css' . '" media="all" />' . "\r\n";
$a->page['htmlhead'] .= '<link rel="stylesheet" type="text/css" href="' . z_root() . '/addon/statusnet/statusnet.css' . '" media="all" />' . "\r\n";
/***
* 1) Check that we have a base api url and a consumer key & secret
......
......@@ -45,7 +45,7 @@ function superblock_addon_settings(&$a,&$s) {
/* Add our stylesheet to the page so we can make our settings look nice */
//if(! array_key_exists('htmlhead',$a->page))
//$a->page['htmlhead'] = '';
//$a->page['htmlhead'] .= '<link rel="stylesheet" type="text/css" href="' . $a->get_baseurl() . '/addon/superblock/superblock.css' . '" media="all" />' . "\r\n";
//$a->page['htmlhead'] .= '<link rel="stylesheet" type="text/css" href="' . z_root() . '/addon/superblock/superblock.css' . '" media="all" />' . "\r\n";
$words = get_pconfig(local_channel(),'system','blocked');
if(! $words)
......
......@@ -61,8 +61,8 @@ function tour_addfooter($a,&$navHtml) {
if(get_pconfig(local_channel(),'tour','showtour') != 1)
return;
$content = '<script type="text/javascript" src="' . $a->get_baseurl() . '/addon/tour/jquery-tourbus.min.js"></script>' . "\r\n";
$content .= '<script type="text/javascript" src="' . $a->get_baseurl() . '/addon/tour/jquery.scrollTo.min.js"></script>' . "\r\n";
$content = '<script type="text/javascript" src="' . z_root() . '/addon/tour/jquery-tourbus.min.js"></script>' . "\r\n";
$content .= '<script type="text/javascript" src="' . z_root() . '/addon/tour/jquery.scrollTo.min.js"></script>' . "\r\n";
$seen = explode(',',get_pconfig(local_channel(),'tour','seen'));
......
......@@ -140,7 +140,7 @@ function twitter_settings_post ($a,$post) {
set_pconfig(local_channel(),'twitter', 'post', 1);
set_pconfig(local_channel(),'twitter', 'post_taglinks', 1);
// reload the Addon Settings page, if we don't do it see Friendica Bug #42
goaway($a->get_baseurl().'/settings/featured');
goaway(z_root().'/settings/featured');
} else {
// if no PIN is supplied in the POST variables, the user has changed the setting
// to post a tweet for every new __public__ posting to the wall
......@@ -157,7 +157,7 @@ function twitter_settings_post ($a,$post) {
function twitter_settings(&$a,&$s) {
if(! local_channel())
return;
$a->page['htmlhead'] .= '<link rel="stylesheet" type="text/css" href="' . $a->get_baseurl() . '/addon/twitter/twitter.css' . '" media="all" />' . "\r\n";
$a->page['htmlhead'] .= '<link rel="stylesheet" type="text/css" href="' . z_root() . '/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
......@@ -860,7 +860,7 @@ function twitter_expand_entities($a, $body, $item, $no_tags = false, $dontinclud
$tags_arr = array();
foreach ($item->entities->hashtags AS $hashtag) {
$url = "#[url=".$a->get_baseurl()."/search?tag=".rawurlencode($hashtag->text)."]".$hashtag->text."[/url]";
$url = "#[url=".z_root()."/search?tag=".rawurlencode($hashtag->text)."]".$hashtag->text."[/url]";
$tags_arr["#".$hashtag->text] = $url;
$body = str_replace("#".$hashtag->text, $url, $body);
}
......@@ -891,7 +891,7 @@ function twitter_expand_entities($a, $body, $item, $no_tags = false, $dontinclud
continue;
$basetag = str_replace('_',' ',substr($tag,1));
$url = '#[url='.$a->get_baseurl().'/search?tag='.rawurlencode($basetag).']'.$basetag.'[/url]';
$url = '#[url='.z_root().'/search?tag='.rawurlencode($basetag).']'.$basetag.'[/url]';
$body = str_replace($tag,$url,$body);
$tags_arr["#".$basetag] = $url;
continue;
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment