From a4775aab9b823523dd91246cbbb7fec3375b214d Mon Sep 17 00:00:00 2001 From: Mario Vavti Date: Mon, 22 Jun 2015 14:02:14 +0200 Subject: Bring /help in line with the rest of the app --- doc/de/main.bb | 16 +++++++--------- doc/main.bb | 16 +++++++--------- doc/sv/main.bb | 16 +++++++--------- mod/help.php | 1 + view/tpl/help.tpl | 9 +++++++-- 5 files changed, 29 insertions(+), 29 deletions(-) diff --git a/doc/de/main.bb b/doc/de/main.bb index 7627e157e..d5f8d03cf 100644 --- a/doc/de/main.bb +++ b/doc/de/main.bb @@ -1,7 +1,5 @@ [img][baseurl]/assets/hashlogo.png[/img] -[size=large][b]Dokumentation zur Red-Matrix[/b][/size] - [zrl=[baseurl]/help/about]Was ist die Red-Matrix?[/zrl] Die Red-Matrix ist eine dezentrale Kommunikations- und Publishing-Plattform. Sie ermöglicht Dir die volle Kontrolle über all Deine Kommunikation mit Hilfe von automatischer Verschlüsselung und detaillierter Zugriffskontrolle. Du, und [i]nur[/i] Du, entscheidest, wer Deine Beiträge sehen darf. @@ -12,7 +10,7 @@ Kommunikationsplattformen für Familien, verteilte Online-Communities, Support-F [zrl=[baseurl]/help/what_is_zot]Got Zot? Hast Du schon Zot? Wenn nicht wird es Zeit.[/zrl] Zot ist das großartige neue Kommunikationsprotokoll, das extra für die Red-Matrix entwickelt wurde. Als Mitglied bist Du dank „Nomadischer Identität“ nicht länger an einen einzigen Server oder Anbieter gebunden. Ziehe einfach auf einen anderen Server um und behalte dabei alle Deine Kontakte, oder klone Deinen Kanal und lasse ihn auf mehreren Servern gleichzeitig laufen – sollte einer davon plötzlich geschlossen werden, ist das kein Problem für Dich. Und bist Du erst Teil der Red-Matrix, musst Du Dich nie wieder mehrfach anmelden, selbst wenn Du Seiten auf einem andere Red-Server betrachtest. Zot ist, was die Red-Matrix besonders macht. -[size=large][b]Erste Schritte[/b][/size] +[h3]Erste Schritte[/h3] [zrl=[baseurl]/help/Privacy]Datenschutz[/zrl] [zrl=[baseurl]/help/registration]Ein Konto registrieren[/zrl] [zrl=[baseurl]/help/accounts_profiles_channels_basics]Du in der Red-Matrix: Konten, Profile und Kanäle kurz erklärt[/zrl] @@ -25,7 +23,7 @@ Zot ist das großartige neue Kommunikationsprotokoll, das extra für die Red-Mat [zrl=[baseurl]/help/cloud]Cloud-Speicher[/zrl] [zrl=[baseurl]/help/remove_account]Einen Kanal oder das ganze Konto löschen[/zrl] -[size=large][b]Hilfe für $Projectname-Mitglieder[/b][/size] +[h3]Hilfe für $Projectname-Mitglieder[/h3] [zrl=[baseurl]/help/tags_and_mentions]Tags und Erwähnungen[/zrl] [zrl=[baseurl]/help/webpages]Webseiten[/zrl] [zrl=[baseurl]/help/bbcode]BBcode-Referenz für Posts und Kommentare[/zrl] @@ -36,7 +34,7 @@ Zot ist das großartige neue Kommunikationsprotokoll, das extra für die Red-Mat [zrl=[baseurl]/help/diaspora_compat]Kompatibilität zum Diaspora-Protokoll (zur Kommunikation mit Kontakten aus Diaspora und Friendica)[/zrl] [zrl=[baseurl]/help/faq_members]FAQ für Mitglieder[/zrl] -[size=large][b]Hilfe für Administratoren[/b][/size] +[h3]Hilfe für Administratoren[/h3] [zrl=[baseurl]/help/install]Installation[/zrl] [zrl=[baseurl]/help/debian_install]Einfache Installation unter Debian mit einem Skript[/zrl] [zrl=[baseurl]/help/red2pi]Red auf einem Raspberry Pi installieren[/zrl] @@ -44,7 +42,7 @@ Zot ist das großartige neue Kommunikationsprotokoll, das extra für die Red-Mat [zrl=[baseurl]/help/hidden_configs]Versteckte Konfigurations-Optionen[/zrl] [zrl=[baseurl]/help/faq_admins]FAQ für Admins[/zrl] -[size=large][b]Technische Dokumentation[/b][/size] +[h3]Technische Dokumentation[/h3] [zrl=[baseurl]/help/history]Die Geschichte der $Projectname[/zrl] [zrl=[baseurl]/help/Zot---A-High-Level-Overview]Zot – ein grober Überblick[/zrl] [zrl=[baseurl]/help/zot]Eine Einführung ins Zot-Protokoll[/zrl] @@ -70,10 +68,10 @@ Zot ist das großartige neue Kommunikationsprotokoll, das extra für die Red-Mat [zrl=[baseurl]/help/git_for_non_developers]Git für Nicht-Entwickler[/zrl] [zrl=[baseurl]/help/dev_beginner]Schritt-für-Schritt-Einführung für neue Entwickler[/zrl] -[size=large][b]Häufig gestellte Fragen für Entwickler[/b][/size] +[h3]Häufig gestellte Fragen für Entwickler[/h3] [zrl=[baseurl]/help/faq_developers]FAQ für Entwickler[/zrl] -[size=large][b]Externe Ressourcen[/b][/size] +[h3]Externe Ressourcen[/h3] [zrl=[baseurl]/help/external-resource-links]Links zu externen Ressourcen[/zrl] [url=https://github.com/friendica/red]Haupt-Website[/url] [url=https://github.com/friendica/red-addons]Addons-Website[/url] @@ -83,7 +81,7 @@ Zot ist das großartige neue Kommunikationsprotokoll, das extra für die Red-Mat [url=[baseurl]/help/credits]$Projectname Credits[/url] -[size=large][b]Über diesen Red-Server[/b][/size] +[h3]Über diesen Red-Server[/h3] [zrl=[baseurl]/help/TermsOfService]Nutzungsbedingungen dieses Red-Servers[/zrl] [zrl=[baseurl]/siteinfo]Informationen zu diesem Server und der Red-Version[/zrl] [zrl=[baseurl]/siteinfo/json]Detaillierte technische Informationen zu diesem Server im JSON-Format[/zrl] diff --git a/doc/main.bb b/doc/main.bb index 1d323b918..94fd24a86 100644 --- a/doc/main.bb +++ b/doc/main.bb @@ -1,7 +1,5 @@ [img][baseurl]/assets/hashlogo.png[/img] -[size=large][b]$Projectname Documentation[/b][/size] - [zrl=[baseurl]/help/about][b]What is the $Projectname?[/b][/zrl] $Projectname is a decentralized communication and publishing platform that enables you to keep in control of your communication needs by automatic encryption and finely grained access control. It's you, and only you who decides who is allowed to see your stuff. @@ -13,7 +11,7 @@ Think of standalone family communication platforms, distributed online communiti [zrl=[baseurl]/help/what_is_zot][b]Got Zot? Well, you should.[/b][/zrl] Zot is the great new communicaton protocol invented especially for the $Projectname. As a member you are no longer bound to a single site or hub thanks to "Nomadic Identities". Migrate easily to another server and keep your contacts intact, or clone it and run the same channel on several servers. Just in case one of them might shut down, you don't lose out. Plus once you are inside the $Projectname there is no need for you to authenticate twice, even when accessing another $Projectname site. Zot is what sets the $Projectname apart. -[size=large][b]Getting Started[/b][/size] +[h3]Getting Started[/h3] [zrl=[baseurl]/help/Privacy]Privacy Policy[/zrl] [zrl=[baseurl]/help/registration]Account Registration[/zrl] [zrl=[baseurl]/help/accounts_profiles_channels_basics]You at the $Projectname: accounts, profiles and channels in short[/zrl] @@ -26,7 +24,7 @@ Zot is the great new communicaton protocol invented especially for the $Projectn [zrl=[baseurl]/help/cloud]Cloud Storage[/zrl] [zrl=[baseurl]/help/remove_account]Remove Channel or Account[/zrl] -[size=large][b]Members Help[/b][/size] +[h3]Members Help[/h3] [zrl=[baseurl]/help/tags_and_mentions]Tags and Mentions[/zrl] [zrl=[baseurl]/help/webpages]Web Pages[/zrl] [zrl=[baseurl]/help/bbcode]BBcode reference for posts and comments[/zrl] @@ -37,7 +35,7 @@ Zot is the great new communicaton protocol invented especially for the $Projectn [zrl=[baseurl]/help/diaspora_compat]Diaspora Communications Compatibility (Diaspora and Friendica)[/zrl] [zrl=[baseurl]/help/faq_members]FAQ For Members[/zrl] -[size=large][b]Administrators Help[/b][/size] +[h3]Administrators Help[/h3] [zrl=[baseurl]/help/install]Install[/zrl] [zrl=[baseurl]/help/debian_install]Easy Install on Debian via script[/zrl] [zrl=[baseurl]/help/red2pi]Installing Red on the Raspberry Pi[/zrl] @@ -46,7 +44,7 @@ Zot is the great new communicaton protocol invented especially for the $Projectn [zrl=[baseurl]/help/faq_admins]FAQ For Admins[/zrl] [zrl=[baseurl]/help/service_classes]Service Classes[/zrl] -[size=large][b]Technical Documentation[/b][/size] +[h3]Technical Documentation[/h3] [zrl=[baseurl]/help/history]$Projectname history[/zrl] [zrl=[baseurl]/help/Zot---A-High-Level-Overview]A high level overview of Zot[/zrl] [zrl=[baseurl]/help/zot]An introduction to Zot[/zrl] @@ -72,10 +70,10 @@ Zot is the great new communicaton protocol invented especially for the $Projectn [zrl=[baseurl]/help/git_for_non_developers]Git for Non-Developers[/zrl] [zrl=[baseurl]/help/dev_beginner]Step-for-step manual for beginning developers[/zrl] -[size=large][b]Frequently Asked Questions For Developers[/b][/size] +[h3]Frequently Asked Questions For Developers[/h3] [zrl=[baseurl]/help/faq_developers]FAQ For Developers[/zrl] -[size=large][b]External Resources[/b][/size] +[h3]External Resources[/h3] [zrl=[baseurl]/help/external-resource-links]External Resource Links[/zrl] [url=https://github.com/redmatrix/redmatrix]Main Website[/url] [url=https://github.com/redmatrix/redmatrix-addons]Addon Website[/url] @@ -84,7 +82,7 @@ Zot is the great new communicaton protocol invented especially for the $Projectn [url=[baseurl]/help/credits]$Projectname Credits[/url] -[size=large][b]About This $Projectname Hub[/b][/size] +[h3]About This $Projectname Hub[/h3] [zrl=[baseurl]/help/TermsOfService]Terms of Service For This Hub[/zrl] [zrl=[baseurl]/siteinfo]Hub Information (/siteinfo)[/zrl] [zrl=[baseurl]/siteinfo/json]Detailed Technical Hub Information in JSON format(/siteinfo/json)[/zrl] diff --git a/doc/sv/main.bb b/doc/sv/main.bb index 409be59c3..eb35b0b3e 100644 --- a/doc/sv/main.bb +++ b/doc/sv/main.bb @@ -1,7 +1,5 @@ [img][baseurl]/assets/hashlogo.png[/img] -[size=large][b]$Projectname dokumentation[/b][/size] - [zrl=[baseurl]/help/about][b]Vad är $Projectname?[/b][/zrl] $Projectname är en decentraliserad publicerings- och kommunikationsplattform som möjliggör att du behåller kontrollen över dina kommunikationer med hjälp av automatisk kryptering och fininställbar behörighetskontroll. Det är du, och bara du, som beslutar vem som är behörig att ta del av ditt innehåll. @@ -12,7 +10,7 @@ Föreställ dig isolerade familjekommunikationsplatformer, distribuerade nätfor [zrl=[baseurl]/help/what_is_zot][b]Har du Zot? Skaffa det, direkt.[/b][/zrl] Zot är en fantastisk ny kommunikationsprotokoll uppfunnit speciellt för $Projectname. Som medlem är du inte längre bunden till en enskild sida eller hub tack vara "nomadiska identiteter". Flytt lätt till en annan server och håll dina kontakter och förbindelser intakta eller klona och kör den samma kanal på flera servrar simultant. I tillfälle av att en av dem stänger ner så går du inte miste om något. Plus när du är loggat in i $Projectname så är det inga flera inloggningar även när du kontakter andra hubbar i nätverket. Zot är det som gör $Projectname till något särskilt värdefullt/som urskiljer $Projectname från mängden. -[size=large][b]Kom igång[/b][/size] +[h3]Kom igång[/h3] [zrl=[baseurl]/help/Privacy]Privacy Policy[/zrl] [zrl=[baseurl]/help/registration]Account Registration[/zrl] [zrl=[baseurl]/help/accounts_profiles_channels_basics]You at the $Projectname: accounts, profiles and channels in short[/zrl] @@ -25,7 +23,7 @@ Zot är en fantastisk ny kommunikationsprotokoll uppfunnit speciellt för $Proje [zrl=[baseurl]/help/cloud]Cloud Storage[/zrl] [zrl=[baseurl]/help/remove_account]Remove Channel or Account[/zrl] -[size=large][b]Hjälp till medlemmar[/b][/size] +[h3]Hjälp till medlemmar[/h3] [zrl=[baseurl]/help/tags_and_mentions]Tags and Mentions[/zrl] [zrl=[baseurl]/help/webpages]Web Pages[/zrl] [zrl=[baseurl]/help/bbcode]BBcode reference for posts and comments[/zrl] @@ -36,7 +34,7 @@ Zot är en fantastisk ny kommunikationsprotokoll uppfunnit speciellt för $Proje [zrl=[baseurl]/help/diaspora_compat]Diaspora Communications Compatibility (Diaspora and Friendica)[/zrl] [zrl=[baseurl]/help/faq_members]FAQ For Members[/zrl] -[size=large][b]Hjälp till administratorer[/b][/size] +[h3]Hjälp till administratorer[/h3] [zrl=[baseurl]/help/install]Install[/zrl] [zrl=[baseurl]/help/debian_install]Easy Install on Debian via script[/zrl] [zrl=[baseurl]/help/red2pi]Installing Red on the Raspberry Pi[/zrl] @@ -44,7 +42,7 @@ Zot är en fantastisk ny kommunikationsprotokoll uppfunnit speciellt för $Proje [zrl=[baseurl]/help/hidden_configs]Tweaking $Projectname's Hidden Configurations[/zrl] [zrl=[baseurl]/help/faq_admins]FAQ For Admins[/zrl] -[size=large][b]Teknisk dokumentation[/b][/size] +[h3]Teknisk dokumentation[/h3] [zrl=[baseurl]/help/history]$Projectname history[/zrl] [zrl=[baseurl]/help/Zot---A-High-Level-Overview]A high level overview of Zot[/zrl] [zrl=[baseurl]/help/zot]An introduction to Zot[/zrl] @@ -69,10 +67,10 @@ Zot är en fantastisk ny kommunikationsprotokoll uppfunnit speciellt för $Proje [zrl=[baseurl]/help/git_for_non_developers]Git for Non-Developers[/zrl] [zrl=[baseurl]/help/dev_beginner]Sep-for-step manual for beginning developers[/zrl] -[size=large][b]FAQ för utvecklare[/b][/size] +[h3]FAQ för utvecklare[/h3] [zrl=[baseurl]/help/faq_developers]FAQ For Developers[/zrl] -[size=large][b]Externa resurser[/b][/size] +[h3]Externa resurser[/h3] [zrl=[baseurl]/help/external-resource-links]External Resource Links[/zrl] [url=https://github.com/friendica/red]Main Website[/url] [url=https://github.com/friendica/red-addons]Addon Website[/url] @@ -80,7 +78,7 @@ Zot är en fantastisk ny kommunikationsprotokoll uppfunnit speciellt för $Proje [url=[baseurl]/help/credits]$Projectname Credits[/url] -[size=large][b]About This $Projectname Hub[/b][/size] +[h3]About This $Projectname Hub[/h3] [zrl=[baseurl]/help/TermsOfService]Terms of Service For This Hub[/zrl] [zrl=[baseurl]/siteinfo]Hub Information (/siteinfo)[/zrl] [zrl=[baseurl]/siteinfo_json]Detailed Technical Hub Information (/siteinfo_json)[/zrl] diff --git a/mod/help.php b/mod/help.php index 3d7c0a628..694b356aa 100644 --- a/mod/help.php +++ b/mod/help.php @@ -97,6 +97,7 @@ function help_content(&$a) { $content = preg_replace_callback("/#include (.*?)\;/ism", 'preg_callback_help_include', $content); return replace_macros(get_markup_template("help.tpl"), array( + '$title' => t('$Projectname Documentation'), '$content' => translate_projectname($content) )); diff --git a/view/tpl/help.tpl b/view/tpl/help.tpl index e01243077..22180bda6 100644 --- a/view/tpl/help.tpl +++ b/view/tpl/help.tpl @@ -1,3 +1,8 @@ -
-{{$content}} +
+
+

{{$title}}

+
+
+ {{$content}} +
-- cgit v1.2.3 From 0d8fcbe48dd92f37336dbb1bb86e609e8c86c488 Mon Sep 17 00:00:00 2001 From: redmatrix Date: Mon, 22 Jun 2015 15:03:47 -0700 Subject: discovered a couple of loose ends in the per-member enable diaspora setting --- include/diaspora.php | 26 ++++++++++++++++++++++++++ version.inc | 2 +- 2 files changed, 27 insertions(+), 1 deletion(-) diff --git a/include/diaspora.php b/include/diaspora.php index 33ad4211b..77a400604 100755 --- a/include/diaspora.php +++ b/include/diaspora.php @@ -2371,6 +2371,24 @@ function diaspora_profile($importer,$xml,$msg) { function diaspora_share($owner,$contact) { $a = get_app(); + + $enabled = intval(get_config('system','diaspora_enabled')); + if(! $enabled) { + logger('diaspora_share: disabled'); + return; + } + + $allowed = get_pconfig($owner['channel_id'],'system','diaspora_allowed'); + if($allowed === false) + $allowed = 1; + + if(! intval($allowed)) { + logger('diaspora_share: disallowed for channel ' . $importer['channel_name']); + return; + } + + + $myaddr = $owner['channel_address'] . '@' . substr($a->get_baseurl(), strpos($a->get_baseurl(),'://') + 3); if(! array_key_exists('xchan_hash',$contact)) { @@ -2947,6 +2965,14 @@ function diaspora_transmit($owner,$contact,$slap,$public_batch,$queue_run=false) return 200; } + $allowed = get_pconfig($owner['channel_id'],'system','diaspora_allowed'); + if($allowed === false) + $allowed = 1; + + if(! intval($allowed)) { + return 200; + } + if($public_batch) $dest_url = $contact['hubloc_callback'] . '/public'; else diff --git a/version.inc b/version.inc index 03a0995b5..cbaf6aa9c 100644 --- a/version.inc +++ b/version.inc @@ -1 +1 @@ -2015-06-21.1070 +2015-06-22.1071 -- cgit v1.2.3 From 9879cf3c6ca0652e9dc5c69824f6ab655c484c28 Mon Sep 17 00:00:00 2001 From: redmatrix Date: Mon, 22 Jun 2015 16:09:02 -0700 Subject: ensure we always sign a trimmed item body. --- include/items.php | 6 +++--- mod/item.php | 2 +- 2 files changed, 4 insertions(+), 4 deletions(-) diff --git a/include/items.php b/include/items.php index eb4ad1ead..229512ead 100755 --- a/include/items.php +++ b/include/items.php @@ -423,7 +423,7 @@ function post_activity_item($arr) { if(array_key_exists('item_private',$arr) && $arr['item_private']) { - $arr['body'] = z_input_filter($arr['uid'],$arr['body'],$arr['mimetype']); + $arr['body'] = trim(z_input_filter($arr['uid'],$arr['body'],$arr['mimetype'])); if($channel) { if($channel['channel_hash'] === $arr['author_xchan']) { @@ -2064,7 +2064,7 @@ function item_store($arr, $allow_exec = false) { $arr['lang'] = detect_language($arr['body']); // apply the input filter here - if it is obscured it has been filtered already - $arr['body'] = z_input_filter($arr['uid'],$arr['body'],$arr['mimetype']); + $arr['body'] = trim(z_input_filter($arr['uid'],$arr['body'],$arr['mimetype'])); if(local_channel() && (! $arr['sig'])) { $channel = get_app()->get_channel(); @@ -2461,7 +2461,7 @@ function item_store_update($arr,$allow_exec = false) { $arr['lang'] = detect_language($arr['body']); // apply the input filter here - if it is obscured it has been filtered already - $arr['body'] = z_input_filter($arr['uid'],$arr['body'],$arr['mimetype']); + $arr['body'] = trim(z_input_filter($arr['uid'],$arr['body'],$arr['mimetype'])); if(local_channel() && (! $arr['sig'])) { $channel = get_app()->get_channel(); diff --git a/mod/item.php b/mod/item.php index 3ff286268..94e203788 100644 --- a/mod/item.php +++ b/mod/item.php @@ -798,7 +798,7 @@ function item_post(&$a) { if(array_key_exists('item_private',$datarray) && $datarray['item_private']) { - $datarray['body'] = z_input_filter($datarray['uid'],$datarray['body'],$datarray['mimetype']); + $datarray['body'] = trim(z_input_filter($datarray['uid'],$datarray['body'],$datarray['mimetype'])); if($uid) { if($channel['channel_hash'] === $datarray['author_xchan']) { -- cgit v1.2.3 From a189fc0872867e6692e02453fb2ea1ec95c0979c Mon Sep 17 00:00:00 2001 From: Alexandre Hannud Abdo Date: Tue, 23 Jun 2015 01:08:02 -0300 Subject: properly trims edited posts before signing so signature verification works --- mod/item.php | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/mod/item.php b/mod/item.php index 3ff286268..9287081ef 100644 --- a/mod/item.php +++ b/mod/item.php @@ -343,8 +343,8 @@ function item_post(&$a) { $coord = $orig_post['coord']; $verb = $orig_post['verb']; $app = $orig_post['app']; - $title = $_REQUEST['title']; - $body = $_REQUEST['body']; + $title = escape_tags(trim($_REQUEST['title'])); + $body = trim($_REQUEST['body']); $item_flags = $orig_post['item_flags']; // force us to recalculate if we need to obscure this post -- cgit v1.2.3 From b6c4601d8fe96d53428697dd98d085f3602b2e6e Mon Sep 17 00:00:00 2001 From: Mario Vavti Date: Tue, 23 Jun 2015 13:06:22 +0200 Subject: some work on directory --- mod/directory.php | 37 ++++++++------ view/css/mod_directory.css | 73 +++++----------------------- view/js/main.js | 2 +- view/js/mod_directory.js | 2 +- view/tpl/directory_header.tpl | 22 ++++----- view/tpl/direntry.tpl | 109 ++++++++++++++++++++++++++---------------- 6 files changed, 115 insertions(+), 130 deletions(-) diff --git a/mod/directory.php b/mod/directory.php index 7c7f63037..67074d8cd 100644 --- a/mod/directory.php +++ b/mod/directory.php @@ -13,6 +13,7 @@ function directory_init(&$a) { intval(local_channel()), dbesc($_GET['ignore']) ); + goaway(z_root() . '/directory?suggest=1'); } $observer = get_observer_hash(); @@ -200,22 +201,24 @@ function directory_content(&$a) { if(in_array($rr['hash'],$contacts)) $connect_link = ''; - $details = ''; + $location = ''; if(strlen($rr['locale'])) - $details .= $rr['locale']; + $location .= $rr['locale']; if(strlen($rr['region'])) { if(strlen($rr['locale'])) - $details .= ', '; - $details .= $rr['region']; + $location .= ', '; + $location .= $rr['region']; } if(strlen($rr['country'])) { if(strlen($details)) - $details .= ', '; - $details .= $rr['country']; + $location .= ', '; + $location .= $rr['country']; } + + $age = ''; if(strlen($rr['birthday'])) { if(($years = age($rr['birthday'],'UTC','')) != 0) - $details .= '
' . t('Age: ') . $years ; + $age = $years; } $page_type = ''; @@ -231,7 +234,6 @@ function directory_content(&$a) { || (x($profile,'region') == 1) || (x($profile,'postcode') == 1) || (x($profile,'country') == 1)) - $location = t('Location:'); $gender = ((x($profile,'gender') == 1) ? t('Gender: ') . $profile['gender']: False); @@ -240,9 +242,9 @@ function directory_content(&$a) { $homepage = ((x($profile,'homepage') == 1) ? t('Homepage: ') : False); $homepageurl = ((x($profile,'homepage') == 1) ? $profile['homepage'] : ''); - $hometown = ((x($profile,'hometown') == 1) ? t('Hometown: ') . $profile['hometown'] : False); + $hometown = ((x($profile,'hometown') == 1) ? $profile['hometown'] : False); - $about = ((x($profile,'about') == 1) ? t('About: ') . bbcode(strip_bbimage($profile['about'])) : False); + $about = ((x($profile,'about') == 1) ? bbcode(strip_bbimage($profile['about'])) : False); $keywords = ((x($profile,'keywords')) ? $profile['keywords'] : ''); @@ -284,21 +286,27 @@ function directory_content(&$a) { 'hash' => $rr['hash'], 'alttext' => $rr['name'] . ((local_channel() || remote_channel()) ? ' ' . $rr['address'] : ''), 'name' => $rr['name'], - 'details' => $pdesc . $details, + 'details' => $details, + 'age' => $age, + 'age_label' => t('Age:'), 'profile' => $profile, 'address' => $rr['address'], 'nickname' => substr($rr['address'],0,strpos($rr['address'],'@')), 'location' => $location, + 'location_label' => t('Location:'), 'gender' => $gender, 'total_ratings' => $total_ratings, 'viewrate' => true, 'canrate' => ((local_channel()) ? true : false), 'pdesc' => $pdesc, + 'pdesc_label' => t('Description:'), 'marital' => $marital, 'homepage' => $homepage, 'homepageurl' => linkify($homepageurl), 'hometown' => $hometown, + 'hometown_label' => t('Hometown:'), 'about' => $about, + 'about_label' => t('About:'), 'conn_label' => t('Connect'), 'forum_label' => t('Public Forum:'), 'connect' => $connect_link, @@ -306,9 +314,10 @@ function directory_content(&$a) { 'kw' => (($out) ? t('Keywords: ') : ''), 'keywords' => $out, 'ignlink' => $suggest ? $a->get_baseurl() . '/directory?ignore=' . $rr['hash'] : '', - 'ignore_label' => "Don't suggest", + 'ignore_label' => t('Don\'t suggest'), 'common_friends' => (($common[$rr['address']]) ? intval($common[$rr['address']]) : ''), - 'common_txt' => sprintf( t('Common connections: %s'), intval($common[$rr['address']]) ), + 'common_label' => t('Common connections:'), + 'common_count' => intval($common[$rr['address']]), 'safe' => $safe_mode ); @@ -354,7 +363,7 @@ function directory_content(&$a) { killme(); } else { - $maxheight = 175; + $maxheight = 94; $o .= ""; $o .= replace_macros($tpl, array( diff --git a/view/css/mod_directory.css b/view/css/mod_directory.css index 7b149d744..d3831e589 100644 --- a/view/css/mod_directory.css +++ b/view/css/mod_directory.css @@ -1,76 +1,29 @@ - -.directory-end { - clear: both; -} -.directory-name { - float: left; - width: 250px; -} - -.directory-photo { - margin-left: 25px; -} .directory-photo-img { - margin-left: auto; - margin-right: auto; - display:block; width: 80px; height: 80px; -} -.directory-details { - text-align: center; - margin-left: 5px; - margin-right: 5px; -} -.directory-item { - overflow: hidden; - margin: 2px; - border-bottom: 2px solid #f1f1f1; - padding-bottom: 3px; -} - -#directory-search-wrapper { - margin-top: 20px; - margin-right: 20px; - margin-bottom: 50px; -} - -#directory-search-end { -} - -.directory-photo-img { border: none; } -div.dirtagblock.widget { - overflow: hidden; +.directory-item { + margin-bottom: 20px; } -.dirpopup { - float: left; - width: 225px; +.contact-photo-wrapper { + display: table-cell; + vertical-align: top; } -.contact-photo { - float: left; - margin-right: 16px; +.contact-info { + display: table-cell; + vertical-align: top; + padding-left: 10px; } -.contact-name { - font-size: larger; +.contact-info-label { + font-weight: bold; } -.contact-info { - display: block; - overflow: hidden; +.section-subtitle-wrapper .btn-xs { + margin-top: -2px; } -.directory-item { - margin: 16px; -} -.directory-connect { - margin-top: 3px; - display:block; - margin-left:auto; - margin-right: auto; -} diff --git a/view/js/main.js b/view/js/main.js index 625ac5b01..698e2d79c 100644 --- a/view/js/main.js +++ b/view/js/main.js @@ -615,7 +615,7 @@ function updateConvItems(mode,data) { function collapseHeight() { - $(".wall-item-body, .contact-info").each(function() { + $(".wall-item-body, .directory-collapse").each(function() { var orgHeight = $(this).height(); if(orgHeight > divmore_height + 10) { if(! $(this).hasClass('divmore')) { diff --git a/view/js/mod_directory.js b/view/js/mod_directory.js index 90942f9ac..e850963c1 100644 --- a/view/js/mod_directory.js +++ b/view/js/mod_directory.js @@ -38,4 +38,4 @@ function postRatings() { $(document).ready(function() { collapseHeight(); -}); \ No newline at end of file +}); diff --git a/view/tpl/directory_header.tpl b/view/tpl/directory_header.tpl index 477df8a63..26739efc3 100755 --- a/view/tpl/directory_header.tpl +++ b/view/tpl/directory_header.tpl @@ -1,16 +1,12 @@ -
-

{{$dirlbl}}

- -{{if $search}} -

{{$finddsc}} {{$safetxt}}

-{{/if}} - -{{foreach $entries as $entry}} -{{include file="direntry.tpl"}} -{{/foreach}} - -
-
+
+
+

{{$dirlbl}}{{if $search}}: {{$safetxt}}{{/if}}

+
+ {{foreach $entries as $entry}} + {{include file="direntry.tpl"}} + {{/foreach}} +
+
diff --git a/view/tpl/direntry.tpl b/view/tpl/direntry.tpl index 0608bca0a..3450ad36d 100755 --- a/view/tpl/direntry.tpl +++ b/view/tpl/direntry.tpl @@ -1,46 +1,73 @@ -
+
+
+
+ {{if $entry.viewrate}} + {{if $entry.canrate}}{{/if}} + {{if $entry.total_ratings}}{{$entry.total_ratings}}{{/if}} + {{/if}} + {{if $entry.ignlink}} + {{$entry.ignore_label}} + {{/if}} + {{$entry.conn_label}} +
+

{{if $entry.public_forum}} {{/if}}{{$entry.name}}{{if $entry.online}} {{/if}}

+
+
+
+
+ + {{$entry.alttext}} + +
+
+
+ {{if $entry.common_friends}} +
+ {{$entry.common_label}} {{$entry.common_count}} +
+ {{/if}} -
-
-{{$entry.alttext}} -{{if $entry.connect}} - -{{/if}} -{{if $entry.ignlink}} - -{{/if}} -
-
+ {{if $entry.pdesc}} +
+ {{$entry.pdesc_label}} {{$entry.pdesc}} +
+ {{/if}} -
-
{{$entry.name}}{{if $entry.online}} {{/if}}
+ {{if $entry.age}} +
+ {{$entry.age_label}} {{$entry.age}} +
+ {{/if}} -{{if $entry.viewrate}} -
{{if $entry.total_ratings}}{{/if}} -{{if $entry.canrate}}{{/if}} -
-{{/if}} -{{if $entry.common_friends}} -
{{$entry.common_txt}}
-{{/if}} -{{if $entry.public_forum}} -
-{{$entry.forum_label}} @{{$entry.nickname}}+ -
-{{/if}} + {{if $entry.details}} +
+ {{$entry.location}} {{$entry.details}} +
+ {{/if}} -
{{$entry.details}}
-{{if $entry.hometown}} -
{{$entry.hometown}}
-{{/if}} -{{if $entry.about}} -
{{$entry.about}}
-{{/if}} -{{if $entry.homepage}} -
{{$entry.homepage}}{{$entry.homepageurl}}
-{{/if}} -{{if $entry.kw}} -
{{$entry.kw}} {{$entry.keywords}}
-{{/if}} -
+ {{if $entry.hometown}} +
+ {{$entry.hometown_label}} {{$entry.hometown}} +
+ {{/if}} + + {{if $entry.homepage}} +
+ {{$entry.homepage}} {{$entry.homepageurl}} +
+ {{/if}} + + {{if $entry.kw}} +
+ {{$entry.kw}} {{$entry.keywords}} +
+ {{/if}} + + {{if $entry.about}} +
+ {{$entry.about_label}} {{$entry.about}} +
+ {{/if}} +
+
-- cgit v1.2.3 From 7975bc828fc9ae1cf9b92cc2147297a46524d59f Mon Sep 17 00:00:00 2001 From: redmatrix Date: Tue, 23 Jun 2015 16:22:21 -0700 Subject: typo --- mod/item.php | 2 +- version.inc | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/mod/item.php b/mod/item.php index 8a73974c6..bc2710b42 100644 --- a/mod/item.php +++ b/mod/item.php @@ -1097,7 +1097,7 @@ function fix_attached_file_permissions($channel,$observer_hash,$body, } function item_check_service_class($channel_id,$iswebpage) { - $ret = array('success' => false, $message => ''); + $ret = array('success' => false, 'message' => ''); if ($iswebpage) { // note: we aren't counting comanche templates and blocks, only webpages diff --git a/version.inc b/version.inc index cbaf6aa9c..df3ed0059 100644 --- a/version.inc +++ b/version.inc @@ -1 +1 @@ -2015-06-22.1071 +2015-06-23.1072 -- cgit v1.2.3