1
0
Fork 0

Vier: Some more changes to the theme.

Added a switch to suppress displaying of the tags.
This commit is contained in:
Michael Vogel 2013-03-05 00:46:11 +01:00
parent 8bb6b51967
commit 86e19dda22
5 changed files with 55 additions and 38 deletions

View file

@ -30,7 +30,7 @@ function settings_init(&$a) {
'label' => t('Account settings'),
'url' => $a->get_baseurl(true).'/settings',
'selected' => (($a->argc == 1)?'active':''),
),
),
array(
'label' => t('Additional features'),
'url' => $a->get_baseurl(true).'/settings/features',
@ -40,8 +40,8 @@ function settings_init(&$a) {
'label' => t('Display settings'),
'url' => $a->get_baseurl(true).'/settings/display',
'selected' => (($a->argc > 1) && ($a->argv[1] === 'display')?'active':''),
),
),
array(
'label' => t('Connector settings'),
'url' => $a->get_baseurl(true).'/settings/connectors',
@ -68,7 +68,7 @@ function settings_init(&$a) {
'selected' => ''
)
);
$tabtpl = get_markup_template("generic_links_widget.tpl");
$a->page['aside'] = replace_macros($tabtpl, array(
'$title' => t('Settings'),
@ -96,19 +96,19 @@ function settings_post(&$a) {
if(($a->argc > 1) && ($a->argv[1] === 'oauth') && x($_POST,'remove')){
check_form_security_token_redirectOnErr('/settings/oauth', 'settings_oauth');
$key = $_POST['remove'];
q("DELETE FROM tokens WHERE id='%s' AND uid=%d",
dbesc($key),
local_user());
goaway($a->get_baseurl(true)."/settings/oauth/");
return;
return;
}
if(($a->argc > 2) && ($a->argv[1] === 'oauth') && ($a->argv[2] === 'edit'||($a->argv[2] === 'add')) && x($_POST,'submit')) {
check_form_security_token_redirectOnErr('/settings/oauth', 'settings_oauth');
$name = ((x($_POST,'name')) ? $_POST['name'] : '');
$key = ((x($_POST,'key')) ? $_POST['key'] : '');
$secret = ((x($_POST,'secret')) ? $_POST['secret'] : '');
@ -116,7 +116,7 @@ function settings_post(&$a) {
$icon = ((x($_POST,'icon')) ? $_POST['icon'] : '');
if ($name=="" || $key=="" || $secret==""){
notice(t("Missing some important data!"));
} else {
if ($_POST['submit']==t("Update")){
$r = q("UPDATE clients SET
@ -236,7 +236,7 @@ function settings_post(&$a) {
call_hooks('connector_settings_post', $_POST);
return;
}
if(($a->argc > 1) && ($a->argv[1] === 'features')) {
check_form_security_token_redirectOnErr('/settings/features', 'settings_features');
foreach($_POST as $k => $v) {
@ -249,7 +249,7 @@ function settings_post(&$a) {
}
if(($a->argc > 1) && ($a->argv[1] === 'display')) {
check_form_security_token_redirectOnErr('/settings/display', 'settings_display');
$theme = ((x($_POST,'theme')) ? notags(trim($_POST['theme'])) : $a->user['theme']);
@ -611,8 +611,8 @@ function settings_content(&$a) {
WHERE clients.uid IN (%d,0)",
local_user(),
local_user());
$tpl = get_markup_template("settings_oauth.tpl");
$o .= replace_macros($tpl, array(
'$form_security_token' => get_form_security_token("settings_oauth"),
@ -627,19 +627,19 @@ function settings_content(&$a) {
'$apps' => $r,
));
return $o;
}
if(($a->argc > 1) && ($a->argv[1] === 'addon')) {
$settings_addons = "";
$r = q("SELECT * FROM `hook` WHERE `hook` = 'plugin_settings' ");
if(! count($r))
$settings_addons = t('No Plugin settings configured');
call_hooks('plugin_settings', $settings_addons);
$tpl = get_markup_template("settings_addons.tpl");
$o .= replace_macros($tpl, array(
'$form_security_token' => get_form_security_token("settings_addon"),
@ -650,7 +650,7 @@ function settings_content(&$a) {
}
if(($a->argc > 1) && ($a->argv[1] === 'features')) {
$arr = array();
$features = get_features();
foreach($features as $fname => $fdata) {
@ -675,7 +675,7 @@ function settings_content(&$a) {
if(($a->argc > 1) && ($a->argv[1] === 'connectors')) {
$settings_connectors = "";
call_hooks('connector_settings', $settings_connectors);
$diasp_enabled = sprintf( t('Built-in support for %s connectivity is %s'), t('Diaspora'), ((get_config('system','diaspora_enabled')) ? t('enabled') : t('disabled')));

View file

@ -158,22 +158,24 @@ class Item extends BaseObject {
$hashtags = array();
$mentions = array();
$taglist = q("SELECT `type`, `term`, `url` FROM `term` WHERE `otype` = %d AND `oid` = %d AND `type` IN (%d, %d) ORDER BY `tid`",
intval(TERM_OBJ_POST), intval($item['id']), intval(TERM_HASHTAG), intval(TERM_MENTION));
if (!get_config('system','suppress_tags')) {
$taglist = q("SELECT `type`, `term`, `url` FROM `term` WHERE `otype` = %d AND `oid` = %d AND `type` IN (%d, %d) ORDER BY `tid`",
intval(TERM_OBJ_POST), intval($item['id']), intval(TERM_HASHTAG), intval(TERM_MENTION));
foreach($taglist as $tag) {
foreach($taglist as $tag) {
if ($tag["url"] == "")
$tag["url"] = $searchpath.strtolower($tag["term"]);
if ($tag["url"] == "")
$tag["url"] = $searchpath.strtolower($tag["term"]);
if ($tag["type"] == TERM_HASHTAG) {
$hashtags[] = "#<a href=\"".$tag["url"]."\" target=\"external-link\">".$tag["term"]."</a>";
$prefix = "#";
} elseif ($tag["type"] == TERM_MENTION) {
$mentions[] = "@<a href=\"".$tag["url"]."\" target=\"external-link\">".$tag["term"]."</a>";
$prefix = "@";
if ($tag["type"] == TERM_HASHTAG) {
$hashtags[] = "#<a href=\"".$tag["url"]."\" target=\"external-link\">".$tag["term"]."</a>";
$prefix = "#";
} elseif ($tag["type"] == TERM_MENTION) {
$mentions[] = "@<a href=\"".$tag["url"]."\" target=\"external-link\">".$tag["term"]."</a>";
$prefix = "@";
}
$tags[] = $prefix."<a href=\"".$tag["url"]."\" target=\"external-link\">".$tag["term"]."</a>";
}
$tags[] = $prefix."<a href=\"".$tag["url"]."\" target=\"external-link\">".$tag["term"]."</a>";
}
/*foreach(explode(',',$item['tag']) as $tag){

View file

@ -35,7 +35,7 @@
</li>
{{ endif }}
<li id="nav-site-linkmenu" class="nav-menu-icon"><a href="#" rel="#nav-site-menu"><span class="icon s22 gear" style="color: lightgray;"></span></a>
<li id="nav-site-linkmenu" class="nav-menu-icon"><a href="#" rel="#nav-site-menu"><span class="icon s22 gear"></span></a>
<ul id="nav-site-menu" class="menu-popup">
{{ if $nav.manage }}<li><a class="$nav.manage.2" href="$nav.manage.0" title="$nav.manage.3">$nav.manage.1</a></li>{{ endif }}
{{ if $nav.help }} <li><a class="$nav.help.2" target="friendica-help" href="$nav.help.0" title="$nav.help.3" >$nav.help.1</a></li>{{ endif }}

View file

@ -40,7 +40,7 @@
</li>
{{/if}}
<li id="nav-site-linkmenu" class="nav-menu-icon"><a href="#" rel="#nav-site-menu"><span class="icon s22 gear" style="color: lightgray;"></span></a>
<li id="nav-site-linkmenu" class="nav-menu-icon"><a href="#" rel="#nav-site-menu"><span class="icon s22 gear"></span></a>
<ul id="nav-site-menu" class="menu-popup">
{{if $nav.manage}}<li><a class="{{$nav.manage.2}}" href="{{$nav.manage.0}}" title="{{$nav.manage.3}}">{{$nav.manage.1}}</a></li>{{/if}}
{{if $nav.help}} <li><a class="{{$nav.help.2}}" target="friendica-help" href="{{$nav.help.0}}" title="{{$nav.help.3}}" >{{$nav.help.1}}</a></li>{{/if}}

View file

@ -169,9 +169,9 @@ img {
min-width: 22px;
height: 22px;
}
.icon.s22.notify {
/*.icon.s22.notify {
color: gray;
}
}*/
.icon.s22.text {
padding: 10px 0px 0px 25px;
width: 230px;
@ -543,6 +543,10 @@ nav {
border-bottom: 5px solid #F80; */
}
nav .icon {
color: #ccc;
}
nav a:active,
nav a:visited,
nav a:link,
@ -554,6 +558,10 @@ nav a {
padding-top: 8px;
}
nav a:hover .icon {
color: #fff;
}
nav a:hover {
text-decoration: none;
outline: none;
@ -628,7 +636,12 @@ nav .nav-menu {
font-size: 13px;
/* border-bottom: 3px solid #364A84; */
color: #ccc;
font-weight: bold;
}
/*nav .nav-menu.selected a {
color: white;
}*/
nav .nav-menu.selected {
border-bottom: 3px solid #9eabb0;
/* background-color: #364E59; */
@ -841,7 +854,7 @@ right_aside {
/* aside */
aside {
display: table-cell;
/* display: table-cell; */
vertical-align: top;
width: 185px;
padding: 10px 10px 10px 20px;
@ -1186,6 +1199,7 @@ border-bottom: 1px solid #D2D2D2;
font-weight: bold;
}
.toplevel_item:hover .wall-item-name,
.wall-item-container:hover .wall-item-name {
color: #36c;
font-weight: bold;
@ -1196,11 +1210,12 @@ border-bottom: 1px solid #D2D2D2;
transition: all 0.2s ease-in-out;
}
.toplevel_item .wall-item-content a,
.wall-item-container .wall-item-content a,
/* .wall-item-container .wall-item-content a, */
.toplevel_item .fakelink,
.wall-item-container .fakelink {
color: black;
/* color: darkblue; */
/* color: #3E3E8C; */
}
.toplevel_item:hover .fakelink,