]> git.mxchange.org Git - friendica.git/commitdiff
Merge commit 'upstream/master'
authorMichael Vogel <icarus@dabo.de>
Thu, 15 Mar 2012 20:11:58 +0000 (21:11 +0100)
committerMichael Vogel <icarus@dabo.de>
Thu, 15 Mar 2012 20:11:58 +0000 (21:11 +0100)
114 files changed:
.gitignore
.htaccess
boot.php
build.xml
include/contact_widgets.php
include/conversation.php
include/event.php
include/items.php
include/nav.php
include/oembed.php
include/security.php
include/template_processor.php
include/text.php
library/tinymce/jscripts/tiny_mce/plugins/bbcode/editor_plugin_src.js
mod/admin.php
mod/contacts.php
mod/dfrn_notify.php
mod/dfrn_request.php
mod/filer.php [new file with mode: 0755]
mod/filerm.php [new file with mode: 0644]
mod/hcard.php
mod/item.php
mod/manage.php
mod/message.php
mod/network.php
mod/notifications.php
mod/notify.php
mod/parse_url.php
mod/profile.php
mod/profile_photo.php
mod/profiles.php
mod/settings.php
mod/share.php
tests/autoname_test.php [new file with mode: 0755]
tests/contains_attribute_test.php [new file with mode: 0755]
tests/expand_acl_test.php [new file with mode: 0755]
tests/get_tags_test.php [new file with mode: 0644]
tests/xss_filter_test.php [new file with mode: 0644]
util/db_update.php
view/admin_site.tpl
view/auto_request.tpl
view/cropbody.tpl
view/de/strings.php
view/dfrn_request.tpl
view/fileas_widget.tpl [new file with mode: 0755]
view/jot-header.tpl
view/login.tpl
view/logout.tpl
view/profile_edit.tpl
view/profile_listing_header.tpl
view/profile_photo.tpl
view/profile_vcard.tpl
view/settings.tpl
view/settings_addons.tpl
view/settings_connectors.tpl
view/settings_oauth.tpl
view/settings_oauth_edit.tpl
view/theme/darkbubble/theme.php
view/theme/darkzero-NS/theme.php
view/theme/darkzero/theme.php
view/theme/diabook-blue/experimental [deleted file]
view/theme/diabook-blue/group_side.tpl [new file with mode: 0755]
view/theme/diabook-blue/icons/isstar.png [deleted file]
view/theme/diabook-blue/icons/next.png [new file with mode: 0755]
view/theme/diabook-blue/icons/prev.png [new file with mode: 0755]
view/theme/diabook-blue/icons/toogle_off.png [changed mode: 0755->0644]
view/theme/diabook-blue/icons/toogle_on.png [changed mode: 0755->0644]
view/theme/diabook-blue/icons/unglobe.png [deleted file]
view/theme/diabook-blue/photo_view.tpl [new file with mode: 0755]
view/theme/diabook-blue/profile_side.tpl [new file with mode: 0644]
view/theme/diabook-blue/style.css
view/theme/diabook-blue/theme.php
view/theme/diabook/experimental [deleted file]
view/theme/diabook/group_side.tpl [new file with mode: 0755]
view/theme/diabook/icons/isstar.png [deleted file]
view/theme/diabook/icons/next.png [new file with mode: 0755]
view/theme/diabook/icons/prev.png [new file with mode: 0755]
view/theme/diabook/icons/toogle_off.png [changed mode: 0755->0644]
view/theme/diabook/icons/toogle_on.png [changed mode: 0755->0644]
view/theme/diabook/icons/unglobe.png [deleted file]
view/theme/diabook/nav.tpl
view/theme/diabook/photo_view.tpl [new file with mode: 0755]
view/theme/diabook/profile_side.tpl [new file with mode: 0644]
view/theme/diabook/style.css
view/theme/diabook/theme.php
view/theme/dispy-dark/contact_template.tpl
view/theme/dispy-dark/group_side.tpl
view/theme/dispy-dark/head.tpl
view/theme/dispy-dark/icons.png
view/theme/dispy-dark/icons.svg
view/theme/dispy-dark/jot-header.tpl
view/theme/dispy-dark/nav.tpl
view/theme/dispy-dark/nets.tpl
view/theme/dispy-dark/photo_view.tpl
view/theme/dispy-dark/profile_vcard.tpl
view/theme/dispy-dark/saved_searches_aside.tpl
view/theme/dispy-dark/style.css
view/theme/dispy-dark/theme.php
view/theme/dispy-dark/wall_item.tpl
view/theme/dispy-dark/wallwall_item.tpl
view/theme/dispy/nav.tpl
view/theme/dispy/style.css
view/theme/dispy/theme.php
view/theme/duepuntozero/file.gif [new file with mode: 0644]
view/theme/duepuntozero/style.css
view/theme/duepuntozero/theme.php
view/theme/duepuntozero/wall_item.tpl
view/theme/greenzero/file.gif [new file with mode: 0644]
view/theme/greenzero/theme.php
view/theme/purplezero/theme.php
view/theme/slack-NS/style.css [new file with mode: 0755]
view/theme/slack-NS/theme.php [new file with mode: 0755]
view/theme/slackr/theme.php
view/theme/testbubble/theme.php

index 6302bc1c8bcdd16345778ff3186ca5fec060b4a6..2531fe4cdd2e34cad6c7b7a0541e283817f19ff2 100755 (executable)
@@ -13,6 +13,9 @@ addon
 #ignore documentation, it should be newly built 
 doc/api
 
+#ignore reports, should be generted with every build
+report/
+
 #ignore config files from eclipse, we don't want IDE files in our repository
 .project
 .buildpath
index 1df5096702eb6c5d051e0cf0d88ee356a84ca6a9..5f9531a7ebf83d3462d8b03b7732cc858f40c1ef 100755 (executable)
--- a/.htaccess
+++ b/.htaccess
@@ -5,6 +5,9 @@ AddType audio/ogg .oga
 <FilesMatch "\.(out|log)$">
 Deny from all
 </FilesMatch>
+<Files "(include|library)">
+Deny from all
+</Files>
 
 <IfModule mod_rewrite.c>
   RewriteEngine on
index 1414adb06980a61da1a7ab029343584a3055e38c..04f36093bfffb38359a9a780999aef30e24c1eba 100755 (executable)
--- a/boot.php
+++ b/boot.php
@@ -9,8 +9,8 @@ require_once('include/nav.php');
 require_once('include/cache.php');
 
 define ( 'FRIENDICA_PLATFORM',     'Friendica');
-define ( 'FRIENDICA_VERSION',      '2.3.1277' );
-define ( 'DFRN_PROTOCOL_VERSION',  '2.22'    );
+define ( 'FRIENDICA_VERSION',      '2.3.1281' );
+define ( 'DFRN_PROTOCOL_VERSION',  '2.23'    );
 define ( 'DB_UPDATE_VERSION',      1131      );
 
 define ( 'EOL',                    "<br />\r\n"     );
@@ -379,11 +379,22 @@ class App {
 
                $scheme = $this->scheme;
 
-               if(x($this->config,'ssl_policy')) {
-                       if(($ssl) || ($this->config['ssl_policy'] == SSL_POLICY_FULL)) 
-                               $scheme = 'https';
-                       if(($this->config['ssl_policy'] == SSL_POLICY_SELFSIGN) && (local_user() || x($_POST,'auth-params')))
+               if((x($this->config,'system')) && (x($this->config['system'],'ssl_policy'))) {
+                       if($this->config['system']['ssl_policy'] == SSL_POLICY_FULL) 
                                $scheme = 'https';
+
+//                     We need to populate the $ssl flag across the entire program before turning this on.
+//                     Basically, we'll have $ssl = true on any links which can only be seen by a logged in user
+//                     (and also the login link). Anything seen by an outsider will have it turned off.
+//                     At present, setting SSL_POLICY_SELFSIGN will only force remote contacts to update their 
+//                     contact links to this site with "http:" if they are currently using "https:"
+
+//                     if($this->config['system']['ssl_policy'] == SSL_POLICY_SELFSIGN) {
+//                             if($ssl)
+//                                     $scheme = 'https';
+//                             else
+//                                     $scheme = 'http';
+//                     }
                }
 
                $this->baseurl = $scheme . "://" . $this->hostname . ((isset($this->path) && strlen($this->path)) ? '/' . $this->path : '' );
@@ -685,6 +696,7 @@ function get_guid($size=16) {
 
 if(! function_exists('login')) {
 function login($register = false, $hiddens=false) {
+       $a = get_app();
        $o = "";
        $reg = false;
        if ($register) {
@@ -704,23 +716,26 @@ function login($register = false, $hiddens=false) {
 
        }
 
+       $dest_url = $a->get_baseurl(true) . '/' . $a->query_string;
 
        $o .= replace_macros($tpl,array(
-               '$logout'        => t('Logout'),
-               '$login'                 => t('Login'),
+
+               '$dest_url'     => $dest_url,
+               '$logout'       => t('Logout'),
+               '$login'        => t('Login'),
                
                '$lname'                => array('username', t('Nickname or Email address: ') , '', ''),
                '$lpassword'    => array('password', t('Password: '), '', ''),
                
                '$openid'               => !$noid,
-               '$lopenid'      => array('openid_url', t('Or login using OpenID: '),'',''),
+               '$lopenid'      => array('openid_url', t('Or login using OpenID: '),'',''),
                
-               '$hiddens'      => $hiddens,
+               '$hiddens'      => $hiddens,
                
-               '$register'             => $reg,
+               '$register'     => $reg,
                
-               '$lostpass'      => t('Forgot your password?'),
-               '$lostlink'      => t('Password Reset'),
+               '$lostpass'     => t('Forgot your password?'),
+               '$lostlink'     => t('Password Reset'),
        ));
 
        call_hooks('login_hook',$o);
@@ -1209,7 +1224,7 @@ function current_theme(){
        $a = get_app();
        
        $system_theme = ((isset($a->config['system']['theme'])) ? $a->config['system']['theme'] : '');
-       $theme_name = ((is_array($_SESSION) && x($_SESSION,'theme')) ? $_SESSION['theme'] : $system_theme);
+       $theme_name = ((isset($_SESSION) && x($_SESSION,'theme')) ? $_SESSION['theme'] : $system_theme);
        
        if($theme_name && file_exists('view/theme/' . $theme_name . '/style.css'))
                return($theme_name);
@@ -1335,7 +1350,7 @@ function profile_tabs($a, $is_owner=False, $nickname=Null){
                array(
                        'label' => t('Profile'),
                        'url'   => $url.'/?tab=profile',
-                       'sel'   => (($tab=='profile')?'active':''),
+                       'sel'   => ((isset($tab) && $tab=='profile')?'active':''),
                ),
                array(
                        'label' => t('Photos'),
index 83c53002643eb5f668d7cfdd6e11076a25b3f17d..a61a5123d7cef5d13bd060cefd4e3300f03add48 100644 (file)
--- a/build.xml
+++ b/build.xml
@@ -1,14 +1,49 @@
 <?xml version="1.0" encoding="UTF-8"?>
 
 <project name="friendica" default="test">
-
+       <!-- ====================================================== -->
+       <!-- Target: clean-test -->
+       <!-- deletes directories with old test reports -->
+       <!-- ====================================================== -->
+       <target name="clean-test">
+               <delete dir="report" />
+       </target>
+       
+       <!-- ====================================================== -->
+       <!-- Target: prepare-test -->
+       <!-- creates directories for test reports -->
+       <!-- ====================================================== -->
+       <target name="prepare-test" depends="clean-test">
+               <mkdir dir="report" />
+       </target>
+       
        <!-- =================================== -->
        <!-- Target: test -->
        <!-- this target runs all test files -->
        <!-- =================================== -->
-
-       <target name="test">
-               <!-- there are no tests by now, so, nothing to do -->
+       <target name="test" depends="prepare-test">
+               <!-- coverage-setup database="./report/coverage-database">
+                       <fileset dir=".">
+                               <include name="**/*.php" />
+                               <exclude name="*test.php"/>
+                               <exclude name="index.php"/>
+                               <exclude name="library/**"/>
+                               <exclude name="doc/**"/>
+                               <exclude name=".."/>
+                       </fileset>
+               </coverage-setup -->
+               <phpunit printsummary="true">
+                       <batchtest>
+                               <fileset dir="tests">
+                                       <include name="*test.php" />
+                               </fileset>
+                       </batchtest>
+                       <formatter type="xml" todir="report" outfile="testlog.xml" />
+               </phpunit>
+               <phpunitreport infile="report/testlog.xml" todir="report" />
+               <!-- coverage-report outfile="report/coverage-database">
+                     <report todir="report" styledir="/home/phing/etc" />
+                   </coverage-report -->
        </target>
 
        <!-- ===================================================== -->
@@ -31,6 +66,9 @@
                <docblox title="Friendica API" destdir="./doc/api">
                        <fileset dir=".">
                                <include name="**/*.php" />
+                               <include name="README"/>
+                               <include name="INSTALL.txt"/>
+                               <include name="LICENSE"/>
                        </fileset>
                </docblox>
        </target>
index caa0572d20f79aff5a3bf2deb669364836ac10cb..605a3eb78e64c46bcf4691774a8f1a0a8995fbc5 100755 (executable)
@@ -75,4 +75,33 @@ function networks_widget($baseurl,$selected = '') {
        ));
 }
 
+function fileas_widget($baseurl,$selected = '') {
+       $a = get_app();
+       if(! local_user())
+               return '';
+
+       $saved = get_pconfig(local_user(),'system','filetags');
+       if(! strlen($saved))
+               return;
+
+       $matches = false;
+       $terms = array();
+    $cnt = preg_match_all('/\[(.*?)\]/',$saved,$matches,PREG_SET_ORDER);
+    if($cnt) {
+               foreach($matches as $mtch) {
+                       $unescaped = file_tag_decode($mtch[1]);
+                       $terms[] = array('name' => $unescaped,'selected' => (($selected == $unescaped) ? 'selected' : ''));
+               }
+       }
+
+       return replace_macros(get_markup_template('fileas_widget.tpl'),array(
+               '$title' => t('File Selections'),
+               '$desc' => '',
+               '$sel_all' => (($selected == '') ? 'selected' : ''),
+               '$all' => t('Everything'),
+               '$terms' => $terms,
+               '$base' => $baseurl,
+
+       ));
+}
 
index 526c6ea0052c5dc5c7fdbf4fe3bf51e2b2e05e53..88ecf502b222e4b66867f0115cc82e8410b6f8e3 100755 (executable)
@@ -186,6 +186,8 @@ function conversation(&$a, $items, $mode, $update, $preview = false) {
 
        require_once('bbcode.php');
 
+       $ssl_state = ((local_user()) ? true : false);
+
        $profile_owner = 0;
        $page_writeable      = false;
 
@@ -345,7 +347,7 @@ function conversation(&$a, $items, $mode, $update, $preview = false) {
                                        'like' => '',
                                        'dislike' => '',
                                        'comment' => '',
-                                       'conv' => (($preview) ? '' : array('href'=> $a->get_baseurl() . '/display/' . $nickname . '/' . $item['id'], 'title'=> t('View in context'))),
+                                       'conv' => (($preview) ? '' : array('href'=> $a->get_baseurl($ssl_state) . '/display/' . $nickname . '/' . $item['id'], 'title'=> t('View in context'))),
                                        'previewing' => $previewing,
                                        'wait' => t('Please wait'),
                                );
@@ -375,7 +377,8 @@ function conversation(&$a, $items, $mode, $update, $preview = false) {
                                                $comments[$item['parent']] = 1;
                                        else
                                                $comments[$item['parent']] += 1;
-                               }
+                               } elseif(! x($comments,$item['parent'])) 
+                                       $comments[$item['parent']] = 0; // avoid notices later on
                        }
 
                        // map all the like/dislike activities for each parent item 
@@ -460,7 +463,7 @@ function conversation(&$a, $items, $mode, $update, $preview = false) {
                                        $comment_lastcollapsed = true;
                                }
 
-                               $redirect_url = $a->get_baseurl() . '/redir/' . $item['cid'] ;
+                               $redirect_url = $a->get_baseurl($ssl_state) . '/redir/' . $item['cid'] ;
 
                                $lock = ((($item['private']) || (($item['uid'] == local_user()) && (strlen($item['allow_cid']) || strlen($item['allow_gid']) 
                                        || strlen($item['deny_cid']) || strlen($item['deny_gid']))))
@@ -542,7 +545,7 @@ function conversation(&$a, $items, $mode, $update, $preview = false) {
                                }
 
                                $edpost = (((($profile_owner == local_user()) && ($toplevelpost) && (intval($item['wall']) == 1)) || ($mode === 'notes'))
-                                               ? array($a->get_baseurl()."/editpost/".$item['id'], t("Edit"))
+                                               ? array($a->get_baseurl($ssl_state)."/editpost/".$item['id'], t("Edit"))
                                                : False);
 
 
@@ -559,24 +562,28 @@ function conversation(&$a, $items, $mode, $update, $preview = false) {
                                );
 
                                $star = false;
+                               $filer = false;
+
                                $isstarred = "unstarred";
-                               if ($profile_owner == local_user() && $toplevelpost) {
-                                       $isstarred = (($item['starred']) ? "starred" : "unstarred");
-
-                                       $star = array(
-                                               'do' => t("add star"),
-                                               'undo' => t("remove star"),
-                                               'toggle' => t("toggle star status"),
-                                               'classdo' => (($item['starred']) ? "hidden" : ""),
-                                               'classundo' => (($item['starred']) ? "" : "hidden"),
-                                               'starred' =>  t('starred'),
-                                               'tagger' => t("add tag"),
-                                               'classtagger' => "",
-                                       );
+                               if ($profile_owner == local_user()) {
+                                       if($toplevelpost) {
+                                               $isstarred = (($item['starred']) ? "starred" : "unstarred");
+
+                                               $star = array(
+                                                       'do' => t("add star"),
+                                                       'undo' => t("remove star"),
+                                                       'toggle' => t("toggle star status"),
+                                                       'classdo' => (($item['starred']) ? "hidden" : ""),
+                                                       'classundo' => (($item['starred']) ? "" : "hidden"),
+                                                       'starred' =>  t('starred'),
+                                                       'tagger' => t("add tag"),
+                                                       'classtagger' => "",
+                                               );
+                                       }
+                                       $filer = t("file as");
                                }
 
 
-
                                $photo = $item['photo'];
                                $thumb = $item['thumb'];
 
@@ -670,6 +677,7 @@ function conversation(&$a, $items, $mode, $update, $preview = false) {
                                        'edpost' => $edpost,
                                        'isstarred' => $isstarred,
                                        'star' => $star,
+                                       'filer' => $filer,
                                        'drop' => $drop,
                                        'vote' => $likebuttons,
                                        'like' => $like,
@@ -691,7 +699,7 @@ function conversation(&$a, $items, $mode, $update, $preview = false) {
 
        $page_template = get_markup_template("conversation.tpl");
        $o .= replace_macros($page_template, array(
-               '$baseurl' => $a->get_baseurl(),
+               '$baseurl' => $a->get_baseurl($ssl_state),
                '$mode' => $mode,
                '$user' => $a->user,
                '$threads' => $threads,
@@ -701,7 +709,7 @@ function conversation(&$a, $items, $mode, $update, $preview = false) {
        return $o;
 }}
 
-function best_link_url($item,&$sparkle) {
+function best_link_url($item,&$sparkle,$ssl_state = false) {
 
        $a = get_app();
 
@@ -713,7 +721,7 @@ function best_link_url($item,&$sparkle) {
        if((local_user()) && (local_user() == $item['uid'])) {
                if(isset($a->contacts) && x($a->contacts,$clean_url)) {
                        if($a->contacts[$clean_url]['network'] === NETWORK_DFRN) {
-                               $best_url = $a->get_baseurl() . '/redir/' . $a->contacts[$clean_url]['id'];
+                               $best_url = $a->get_baseurl($ssl_state) . '/redir/' . $a->contacts[$clean_url]['id'];
                                $sparkle = true;
                        }
                        else
@@ -734,10 +742,14 @@ function best_link_url($item,&$sparkle) {
 if(! function_exists('item_photo_menu')){
 function item_photo_menu($item){
        $a = get_app();
-       
-       if (local_user() && (! count($a->contacts)))
-               load_contact_links(local_user());
 
+       $ssl_state = false;
+
+       if(local_user()) {
+               $ssl_state = true;
+                if(! count($a->contacts))
+                       load_contact_links(local_user());
+       }
        $contact_url="";
        $pm_url="";
        $status_link="";
@@ -745,7 +757,7 @@ function item_photo_menu($item){
        $posts_link="";
 
        $sparkle = false;
-    $profile_link = best_link_url($item,$sparkle);
+    $profile_link = best_link_url($item,$sparkle,$ssl_state);
        if($profile_link === 'mailbox')
                $profile_link = '';
 
@@ -754,7 +766,7 @@ function item_photo_menu($item){
                $status_link = $profile_link . "?url=status";
                $photos_link = $profile_link . "?url=photos";
                $profile_link = $profile_link . "?url=profile";
-               $pm_url = $a->get_baseurl() . '/message/new/' . $cid;
+               $pm_url = $a->get_baseurl($ssl_state) . '/message/new/' . $cid;
        }
        else {
                if(local_user() && local_user() == $item['uid'] && link_compare($item['url'],$item['author-link'])) {
@@ -765,8 +777,8 @@ function item_photo_menu($item){
                }
        }
        if(($cid) && (! $item['self'])) {
-               $contact_url = $a->get_baseurl() . '/contacts/' . $cid;
-               $posts_link = $a->get_baseurl() . '/network/?cid=' . $cid;
+               $contact_url = $a->get_baseurl($ssl_state) . '/contacts/' . $cid;
+               $posts_link = $a->get_baseurl($ssl_state) . '/network/?cid=' . $cid;
        }
 
        $menu = Array(
@@ -802,7 +814,7 @@ function like_puller($a,$item,&$arr,$mode) {
        if((activity_match($item['verb'],$verb)) && ($item['id'] != $item['parent'])) {
                $url = $item['author-link'];
                if((local_user()) && (local_user() == $item['uid']) && ($item['network'] === 'dfrn') && (! $item['self']) && (link_compare($item['author-link'],$item['url']))) {
-                       $url = $a->get_baseurl() . '/redir/' . $item['contact-id'];
+                       $url = $a->get_baseurl(true) . '/redir/' . $item['contact-id'];
                        $sparkle = ' class="sparkle" ';
                }
                if(! ((isset($arr[$item['parent'] . '-l'])) && (is_array($arr[$item['parent'] . '-l']))))
@@ -864,7 +876,7 @@ function status_editor($a,$x, $notes_cid = 0, $popup=false) {
        
        $a->page['htmlhead'] .= replace_macros($tpl, array(
                '$newpost' => 'true',
-               '$baseurl' => $a->get_baseurl(),
+               '$baseurl' => $a->get_baseurl(true),
                '$editselect' => (($plaintext) ? 'none' : '/(profile-jot-text|prvmail-text)/'),
                '$geotag' => $geotag,
                '$nickname' => $x['nickname'],
@@ -873,6 +885,7 @@ function status_editor($a,$x, $notes_cid = 0, $popup=false) {
                '$vidurl' => t("Please enter a video link/URL:"),
                '$audurl' => t("Please enter an audio link/URL:"),
                '$term' => t('Tag term:'),
+               '$fileas' => t('File as:'),
                '$whereareu' => t('Where are you right now?'),
                '$title' => t('Enter a title for this item') 
        ));
@@ -914,8 +927,8 @@ function status_editor($a,$x, $notes_cid = 0, $popup=false) {
 
        $o .= replace_macros($tpl,array(
                '$return_path' => $a->cmd,
-               '$action' =>  $a->get_baseurl().'/item',
-               '$share' => (($x['button']) ? $x['button'] : t('Share')),
+               '$action' =>  $a->get_baseurl(true) . '/item',
+               '$share' => (x($x,'button') ? $x['button'] : t('Share')),
                '$upload' => t('Upload photo'),
                '$shortupload' => t('upload photo'),
                '$attach' => t('Attach file'),
@@ -938,7 +951,7 @@ function status_editor($a,$x, $notes_cid = 0, $popup=false) {
                '$ptyp' => (($notes_cid) ? 'note' : 'wall'),
                '$content' => '',
                '$post_id' => '',
-               '$baseurl' => $a->get_baseurl(),
+               '$baseurl' => $a->get_baseurl(true),
                '$defloc' => $x['default_location'],
                '$visitor' => $x['visitor'],
                '$pvisit' => (($notes_cid) ? 'none' : $x['visitor']),
@@ -980,8 +993,8 @@ function conv_sort($arr,$order) {
                usort($parents,'sort_thr_commented');
 
        if(count($parents))
-               foreach($parents as $x) 
-                       $x['children'] = array();
+               foreach($parents as $i=>$_x) 
+                       $parents[$i]['children'] = array();
 
        foreach($arr as $x) {
                if($x['id'] != $x['parent']) {
index 4a9a9a0041e40ec6318070806ec9add4be990333..29202baddf982417cdf3decedc3f0b69be539dc8 100755 (executable)
@@ -163,7 +163,7 @@ function bbtoevent($s) {
        if(preg_match("/\[event\-adjust\](.*?)\[\/event\-adjust\]/is",$s,$match))
                $ev['adjust'] = $match[1];
        $match = '';
-       $ev['nofinish'] = (($ev['start'] && (!x($ev, 'finish') || !$ev['finish'])) ? 1 : 0);
+       $ev['nofinish'] = (((x($ev, 'start') && $ev['start']) && (!x($ev, 'finish') || !$ev['finish'])) ? 1 : 0);
        return $ev;
 
 }
index 1a7aa6c4608d0dd57592ef97782c501750f2ae37..4b1523ff65397c4ac84330002708ea10484716b9 100755 (executable)
@@ -682,7 +682,7 @@ function item_store($arr,$force_parent = false) {
                unset($arr['dsprsig']);
        }
 
-       if($arr['gravity'])
+       if(x($arr, 'gravity'))
                $arr['gravity'] = intval($arr['gravity']);
        elseif($arr['parent-uri'] === $arr['uri'])
                $arr['gravity'] = 0;
@@ -742,6 +742,7 @@ function item_store($arr,$force_parent = false) {
 
        if($arr['parent-uri'] === $arr['uri']) {
                $parent_id = 0;
+               $parent_deleted = 0;
                $allow_cid = $arr['allow_cid'];
                $allow_gid = $arr['allow_gid'];
                $deny_cid  = $arr['deny_cid'];
@@ -800,6 +801,8 @@ function item_store($arr,$force_parent = false) {
                                logger('item_store: item parent was not found - ignoring item');
                                return 0;
                        }
+                       
+                       $parent_deleted = 0;
                }
        }
 
@@ -1043,6 +1046,21 @@ function dfrn_deliver($owner,$contact,$atom, $dissolve = false) {
        if(! $rino_enable)
                $rino = 0;
 
+       $ssl_val = intval(get_config('system','ssl_policy'));
+       $ssl_policy = '';
+       switch($ssl_val){
+               case SSL_POLICY_FULL:
+                       $ssl_policy = 'full';
+                       break;
+               case SSL_POLICY_SELFSIGN:
+                       $ssl_policy = 'self';
+                       break;                  
+               case SSL_POLICY_NONE:
+               default:
+                       $ssl_policy = 'none';
+                       break;
+       }
+
        $url = $contact['notify'] . '&dfrn_id=' . $idtosend . '&dfrn_version=' . DFRN_PROTOCOL_VERSION . (($rino) ? '&rino=1' : '');
 
        logger('dfrn_deliver: ' . $url);
@@ -1115,6 +1133,8 @@ function dfrn_deliver($owner,$contact,$atom, $dissolve = false) {
                $postvars['perm'] = 'r';
        }
 
+       $postvars['ssl_policy'] = $ssl_policy;
+
        if($rino && $rino_allowed && (! $dissolve)) {
                $key = substr(random_string(),0,16);
                $data = bin2hex(aes_encrypt($postvars['data'],$key));
index aadfa82fd852c8a20f02a8e4b90c3649f46d0254..e28081839965731b7aa2135e71fb8c3f805c9e27 100755 (executable)
@@ -8,6 +8,8 @@ function nav(&$a) {
         *
         */
 
+       $ssl_state = ((local_user()) ? true : false);
+
        if(!(x($a->page,'nav')))
                $a->page['nav'] = '';
 
@@ -27,7 +29,7 @@ function nav(&$a) {
 
        $myident = ((is_array($a->user) && isset($a->user['nickname'])) ? $a->user['nickname'] . '@' : '');
                
-       $sitelocation = $myident . substr($a->get_baseurl(),strpos($a->get_baseurl(),'//') + 2 );
+       $sitelocation = $myident . substr($a->get_baseurl($ssl_state),strpos($a->get_baseurl($ssl_state),'//') + 2 );
 
 
        // nav links: array of array('href', 'text', 'extra css classes', 'title')
@@ -53,7 +55,7 @@ function nav(&$a) {
                // user info
                $r = q("SELECT micro FROM contact WHERE uid=%d AND self=1", intval($a->user['uid']));
                $userinfo = array(
-                       'icon' => (count($r) ? $r[0]['micro']: $a->get_baseurl()."/images/default-profile-mm.jpg"),
+                       'icon' => (count($r) ? $r[0]['micro']: $a->get_baseurl($ssl_state)."/images/default-profile-mm.jpg"),
                        'name' => $a->user['username'],
                );
                
@@ -76,7 +78,7 @@ function nav(&$a) {
        if(($a->config['register_policy'] == REGISTER_OPEN) && (! local_user()) && (! remote_user()))
                $nav['register'] = array('register',t('Register'), "", t('Create an account'));
 
-       $help_url = $a->get_baseurl() . '/help';
+       $help_url = $a->get_baseurl($ssl_state) . '/help';
 
        if(! get_config('system','hide_help'))
                $nav['help'] = array($help_url, t('Help'), "", t('Help and documentation'));
index 5c3c595f57e910ba47577746e7afd53d89c8b1e0..cc71f9757c9208ffcdcd31ac5d8c4de38a53b24b 100755 (executable)
@@ -1,6 +1,6 @@
 <?php
 function oembed_replacecb($matches){
-       logger('oembedcb');
+//     logger('oembedcb');
        $embedurl=$matches[1];
        $j = oembed_fetch_url($embedurl);
        $s =  oembed_format_object($j);
@@ -14,6 +14,9 @@ function oembed_fetch_url($embedurl){
 
        $txt = Cache::get($embedurl);
 
+       // These media files should now be caught in bbcode.php
+       // left here as a fallback in case this is called from another source
+
        $noexts = array("mp3","mp4","ogg","ogv","oga","ogm","webm");
        $ext = pathinfo(strtolower($embedurl),PATHINFO_EXTENSION);
        
@@ -62,7 +65,7 @@ function oembed_fetch_url($embedurl){
        
 function oembed_format_object($j){
        $embedurl = $j->embedurl;
-       $jhtml = oembed_iframe($j->embedurl,$j->width,$j->height );
+       $jhtml = oembed_iframe($j->embedurl,(isset($j->width) ? $j->width : null), (isset($j->height) ? $j->height : null) );
        $ret="<span class='oembed ".$j->type."'>";
        switch ($j->type) {
                case "video": {
index 8c536b656aca95f3e18deb5f6cd5421a2c98f020..6ea515bffe41ff907b5bffb7ee1d237b0bc397f5 100755 (executable)
@@ -288,3 +288,49 @@ function item_permissions_sql($owner_id,$remote_verified = false,$groups = null)
 }
 
 
+/*
+ * Functions used to protect against Cross-Site Request Forgery
+ * The security token has to base on at least one value that an attacker can't know - here it's the session ID and the private key.
+ * In this implementation, a security token is reusable (if the user submits a form, goes back and resubmits the form, maybe with small changes;
+ * or if the security token is used for ajax-calls that happen several times), but only valid for a certain amout of time (3hours).
+ * The "typename" seperates the security tokens of different types of forms. This could be relevant in the following case:
+ *    A security token is used to protekt a link from CSRF (e.g. the "delete this profile"-link).
+ *    If the new page contains by any chance external elements, then the used security token is exposed by the referrer.
+ *    Actually, important actions should not be triggered by Links / GET-Requests at all, but somethimes they still are,
+ *    so this mechanism brings in some damage control (the attacker would be able to forge a request to a form of this type, but not to forms of other types).
+ */ 
+function get_form_security_token($typename = "") {
+       $a = get_app();
+       
+       $timestamp = time();
+       $sec_hash = hash('whirlpool', $a->user["guid"] . $a->user["prvkey"] . session_id() . $timestamp . $typename);
+       
+       return $timestamp . "." . $sec_hash;
+}
+
+function check_form_security_token($typename = "", $formname = 'form_security_token') {
+       if (!x($_REQUEST, $formname)) return false;
+       $hash = $_REQUEST[$formname];
+       
+       $max_livetime = 10800; // 3 hours
+       
+       $a = get_app();
+       
+       $x = explode(".", $hash);
+       if (time() > (IntVal($x[0]) + $max_livetime)) return false;
+       
+       $sec_hash = hash('whirlpool', $a->user["guid"] . $a->user["prvkey"] . session_id() . $x[0] . $typename);
+       
+       return ($sec_hash == $x[1]);
+}
+
+function check_form_security_std_err_msg() {
+       return t('The form security token was not correct. This probably happened because the form has been opened for too long (>3 hours) before subitting it.') . EOL;
+}
+function check_form_security_token_redirectOnErr($err_redirect, $typename = "", $formname = 'form_security_token') {
+       if (!check_form_security_token($typename, $formname)) {
+               $a = get_app();
+               notice( check_form_security_std_err_msg() );
+               goaway($a->get_baseurl() . $err_redirect );
+       }
+}
index 8671587fc4b48d57d60934cfd350c89aef2f00aa..7f7b0b55bd727c16524d03ebef5ed045f5a7a691 100755 (executable)
                 */
                private function _replcb_for($args){
                        $m = array_map('trim', explode(" as ", $args[2]));
-                       list($keyname, $varname) = explode("=>",$m[1]);
-                       if (is_null($varname)) { $varname=$keyname; $keyname=""; }
+                       $x = explode("=>",$m[1]);
+                       if (count($x) == 1) {
+                               $varname = $x[0];
+                               $keyname = "";
+                       } else {
+                               list($keyname, $varname) = $x;
+                       }
                        if ($m[0]=="" || $varname=="" || is_null($varname)) die("template error: 'for ".$m[0]." as ".$varname."'") ;
                        //$vals = $this->r[$m[0]];
                        $vals = $this->_get_var($m[0]);
index 08c5a542464ffa189e66a6391cdd6b0162231970..d34fd7fbeec35bcacfb5a1bd2fa201a3e770d692 100644 (file)
@@ -874,6 +874,7 @@ function link_compare($a,$b) {
 if(! function_exists('prepare_body')) {
 function prepare_body($item,$attach = false) {
 
+       $a = get_app();
        call_hooks('prepare_body_init', $item); 
 
        $cache = get_config('system','itemcache');
@@ -926,6 +927,33 @@ function prepare_body($item,$attach = false) {
                }
                $s .= '<div class="clear"></div></div>';
        }
+       $matches = false;
+       $cnt = preg_match_all('/<(.*?)>/',$item['file'],$matches,PREG_SET_ORDER);
+       if($cnt) {
+//             logger('prepare_text: categories: ' . print_r($matches,true), LOGGER_DEBUG);
+               foreach($matches as $mtch) {
+                       if(strlen($x))
+                               $x .= ',';
+                       $x .= file_tag_decode($mtch[1]);
+               }
+               if(strlen($x))
+                       $s .= '<div class="categorytags"><span>' . t('Categories:') . ' </span>' . $x . '</div>'; 
+
+
+       }
+       $matches = false;
+       $x = '';
+       $cnt = preg_match_all('/\[(.*?)\]/',$item['file'],$matches,PREG_SET_ORDER);
+       if($cnt) {
+//             logger('prepare_text: filed_under: ' . print_r($matches,true), LOGGER_DEBUG);
+               foreach($matches as $mtch) {
+                       if(strlen($x))
+                               $x .= '&nbsp;&nbsp;&nbsp;';
+                       $x .= file_tag_decode($mtch[1]). ' <a href="' . $a->get_baseurl() . '/filerm/' . $item['id'] . '?f=&term=' . file_tag_decode($mtch[1]) . '" title="' . t('remove') . '" >' . t('[remove]') . '</a>';
+               }
+               if(strlen($x) && (local_user() == $item['uid']))
+                       $s .= '<div class="filesavetags"><span>' . t('Filed under:') . ' </span>' . $x . '</div>'; 
+       }
 
        $prep_arr = array('item' => $item, 'html' => $s);
        call_hooks('prepare_body_final', $prep_arr);
@@ -1248,4 +1276,77 @@ function item_post_type($item) {
        return t('post');
 }
 
+// post categories and "save to file" use the same item.file table for storage.
+// We will differentiate the different uses by wrapping categories in angle brackets
+// and save to file categories in square brackets.
+// To do this we need to escape these characters if they appear in our tag. 
+
+function file_tag_encode($s) {
+       return str_replace(array('<','>','[',']'),array('%3c','%3e','%5b','%5d'),$s);
+}
+
+function file_tag_decode($s) {
+       return str_replace(array('%3c','%3e','%5b','%5d'),array('<','>','[',']'),$s);
+}
+
+function file_tag_file_query($table,$s,$type = 'file') {
+       if($type == 'file')
+               $str = preg_quote( '[' . file_tag_encode($s) . ']' );
+       else
+               $str = preg_quote( '<' . file_tag_encode($s) . '>' );
+       return " AND " . (($table) ? dbesc($table) . '.' : '') . "file regexp '" . dbesc($str) . "' ";
+}
+
+function file_tag_save_file($uid,$item,$file) {
+       $result = false;
+       if(! intval($uid))
+               return false;
+       $r = q("select file from item where id = %d and uid = %d limit 1",
+               intval($item),
+               intval($uid)
+       );
+       if(count($r)) {
+               if(! stristr($r[0]['file'],'[' . file_tag_encode($file) . ']'))
+                       q("update item set file = '%s' where id = %d and uid = %d limit 1",
+                               dbesc($r[0]['file'] . '[' . file_tag_encode($file) . ']'),
+                               intval($item),
+                               intval($uid)
+                       );
+               $saved = get_pconfig($uid,'system','filetags');
+               if((! strlen($saved)) || (! stristr($saved,'[' . file_tag_encode($file) . ']')))
+                       set_pconfig($uid,'system','filetags',$saved . '[' . file_tag_encode($file) . ']');
+       }
+       return true;
+}
+
+function file_tag_unsave_file($uid,$item,$file) {
+       $result = false;
+       if(! intval($uid))
+               return false;
+
+       $pattern = '[' . file_tag_encode($file) . ']' ;
+
+       $r = q("select file from item where id = %d and uid = %d limit 1",
+               intval($item),
+               intval($uid)
+       );
+       if(! count($r))
+               return false;
+
+       q("update item set file = '%s' where id = %d and uid = %d limit 1",
+               dbesc(str_replace($pattern,'',$r[0]['file'])),
+               intval($item),
+               intval($uid)
+       );
+
+       $r = q("select file from item where uid = %d " . file_tag_file_query('item',$file),
+               intval($uid)
+       );
+
+       if(! count($r)) {
+               $saved = get_pconfig($uid,'system','filetags');
+               set_pconfig($uid,'system','filetags',str_replace($pattern,'',$saved));
+       }
+       return true;
+}
 
index 44d1473a99fe2bbe5b6c739f2a84d035bd297bb5..183f2bc68d3e155a05b7c2e43ec9246738f05fa7 100755 (executable)
                _dfrn_html2bbcode : function(s) {\r
                        s = tinymce.trim(s);\r
 \r
-                       function rep(re, str) {
-
-                               //modify code to keep stuff intact within [code][/code] blocks
-                               //Waitman Gobble NO WARRANTY
-
-
-                               var o = new Array();
-                               var x = s.split("[code]");
-                               var i = 0;
-
-                               var si = "";
-                               si = x.shift();
-                               si = si.replace(re,str);
-                               o.push(si);
-
-                               for (i = 0; i < x.length; i++) {
-                                       var no = new Array();
-                                       var j = x.shift();
-                                       var g = j.split("[/code]");
-                                       no.push(g.shift());
-                                       si = g.shift();
-                                       si = si.replace(re,str);
-                                       no.push(si);
-                                       o.push(no.join("[/code]"));
-                               }
-
-                               s = o.join("[code]");
-
-                       };
-
-
-
-
-                       /* oembed */
-                       function _h2b_cb(match) {
-                               function s_h2b(data) {
-                                               match = data;
+                       function rep(re, str) {\r
+\r
+                               //modify code to keep stuff intact within [code][/code] blocks\r
+                               //Waitman Gobble NO WARRANTY\r
+\r
+\r
+                               var o = new Array();\r
+                               var x = s.split("[code]");\r
+                               var i = 0;\r
+\r
+                               var si = "";\r
+                               si = x.shift();\r
+                               si = si.replace(re,str);\r
+                               o.push(si);\r
+\r
+                               for (i = 0; i < x.length; i++) {\r
+                                       var no = new Array();\r
+                                       var j = x.shift();\r
+                                       var g = j.split("[/code]");\r
+                                       no.push(g.shift());\r
+                                       si = g.shift();\r
+                                       si = si.replace(re,str);\r
+                                       no.push(si);\r
+                                       o.push(no.join("[/code]"));\r
+                               }\r
+\r
+                               s = o.join("[code]");\r
+\r
+                       };\r
+\r
+\r
+\r
+\r
+                       /* oembed */\r
+                       function _h2b_cb(match) {\r
+                               /*\r
+                               function s_h2b(data) {\r
+                                               match = data;\r
                                }\r
                                $.ajax({\r
-                                       type:"POST",
+                                       type:"POST",\r
                                        url: 'oembed/h2b',\r
-                                       data: {text: match},
-                                       async: false,
-                                       success: s_h2b,
-                                       dataType: 'html'
-                               });
-                               return match;
-                       }
+                                       data: {text: match},\r
+                                       async: false,\r
+                                       success: s_h2b,\r
+                                       dataType: 'html'\r
+                               });\r
+                               */\r
+                               \r
+                               var f, g, tof = [], tor = [];\r
+                               var find_spanc = /<span [^>]*class *= *[\"'](?:[^\"']* )*oembed(?: [^\"']*)*[\"'][^>]*>(.*?(?:<span[^>]*>(.*?)<\/span *>)*.*?)<\/span *>/ig;\r
+                               while (f = find_spanc.exec(match)) {\r
+                                       var find_a = /<a([^>]* rel=[\"']oembed[\"'][^>]*)>.*?<\/a *>/ig;\r
+                                       if (g = find_a.exec(f[1])) {\r
+                                               var find_href = /href=[\"']([^\"']*)[\"']/ig;\r
+                                               var m2 = find_href.exec(g[1]);\r
+                                               if (m2[1]) {\r
+                                                       tof.push(f[0]);\r
+                                                       tor.push("[EMBED]" + m2[1] + "[/EMBED]");\r
+                                               }\r
+                                       }\r
+                               }\r
+                               for (var i = 0; i < tof.length; i++) match = match.replace(tof[i], tor[i]);\r
+                               \r
+                               return match;\r
+                       }\r
                        if (s.indexOf('class="oembed')>=0){\r
                                //alert("request oembed html2bbcode");\r
                                s = _h2b_cb(s);\r
                        }\r
-                       
-                       /* /oembed */
-
+                       \r
+                       /* /oembed */\r
+\r
 \r
                        // example: <strong> to [b]\r
                        rep(/<a class=\"bookmark\" href=\"(.*?)\".*?>(.*?)<\/a>/gi,"[bookmark=$1]$2[/bookmark]");\r
                        rep(/<img.*?src=\"(.*?)\".*?height=\"(.*?)\".*?width=\"(.*?)\".*?\/>/gi,"[img=$3x$2]$1[/img]");\r
                        rep(/<img.*?src=\"(.*?)\".*?width=\"(.*?)\".*?height=\"(.*?)\".*?\/>/gi,"[img=$2x$3]$1[/img]");\r
                        rep(/<img.*?src=\"(.*?)\".*?\/>/gi,"[img]$1[/img]");\r
-
-                       rep(/<ul class=\"listbullet\" style=\"list-style-type\: circle\;\">(.*?)<\/ul>/gi,"[list]$1[/list]");
-                       rep(/<ul class=\"listnone\" style=\"list-style-type\: none\;\">(.*?)<\/ul>/gi,"[list=]$1[/list]");
-                       rep(/<ul class=\"listdecimal\" style=\"list-style-type\: decimal\;\">(.*?)<\/ul>/gi,"[list=1]$1[/list]");
-                       rep(/<ul class=\"listlowerroman\" style=\"list-style-type\: lower-roman\;\">(.*?)<\/ul>/gi,"[list=i]$1[/list]");
-                       rep(/<ul class=\"listupperroman\" style=\"list-style-type\: upper-roman\;\">(.*?)<\/ul>/gi,"[list=I]$1[/list]");
-                       rep(/<ul class=\"listloweralpha\" style=\"list-style-type\: lower-alpha\;\">(.*?)<\/ul>/gi,"[list=a]$1[/list]");
-                       rep(/<ul class=\"listupperalpha\" style=\"list-style-type\: upper-alpha\;\">(.*?)<\/ul>/gi,"[list=A]$1[/list]");
-                       rep(/<li>(.*?)<\/li>/gi,'[li]$1[/li]');
-
+\r
+                       rep(/<ul class=\"listbullet\" style=\"list-style-type\: circle\;\">(.*?)<\/ul>/gi,"[list]$1[/list]");\r
+                       rep(/<ul class=\"listnone\" style=\"list-style-type\: none\;\">(.*?)<\/ul>/gi,"[list=]$1[/list]");\r
+                       rep(/<ul class=\"listdecimal\" style=\"list-style-type\: decimal\;\">(.*?)<\/ul>/gi,"[list=1]$1[/list]");\r
+                       rep(/<ul class=\"listlowerroman\" style=\"list-style-type\: lower-roman\;\">(.*?)<\/ul>/gi,"[list=i]$1[/list]");\r
+                       rep(/<ul class=\"listupperroman\" style=\"list-style-type\: upper-roman\;\">(.*?)<\/ul>/gi,"[list=I]$1[/list]");\r
+                       rep(/<ul class=\"listloweralpha\" style=\"list-style-type\: lower-alpha\;\">(.*?)<\/ul>/gi,"[list=a]$1[/list]");\r
+                       rep(/<ul class=\"listupperalpha\" style=\"list-style-type\: upper-alpha\;\">(.*?)<\/ul>/gi,"[list=A]$1[/list]");\r
+                       rep(/<li>(.*?)<\/li>/gi,'[li]$1[/li]');\r
+\r
                        rep(/<code>(.*?)<\/code>/gi,"[code]$1[/code]");\r
                        rep(/<\/(strong|b)>/gi,"[/b]");\r
                        rep(/<(strong|b)>/gi,"[b]");\r
                // BBCode -> HTML from DFRN dialect\r
                _dfrn_bbcode2html : function(s) {\r
                        s = tinymce.trim(s);\r
-
-
-                        function rep(re, str) {
-
-                                //modify code to keep stuff intact within [code][/code] blocks
-                                //Waitman Gobble NO WARRANTY
-
-
-                                var o = new Array();
-                                var x = s.split("[code]");
-                                var i = 0;
-
-                                var si = "";
-                                si = x.shift();
-                                si = si.replace(re,str);
-                                o.push(si);
-
-                                for (i = 0; i < x.length; i++) {
-                                        var no = new Array();
-                                        var j = x.shift();
-                                        var g = j.split("[/code]");
-                                        no.push(g.shift());
-                                        si = g.shift();
-                                        si = si.replace(re,str);
-                                        no.push(si);
-                                        o.push(no.join("[/code]"));
-                                }
-
-                                s = o.join("[code]");
-
-                        };
-
-
-
-
-
+\r
+\r
+                        function rep(re, str) {\r
+\r
+                                //modify code to keep stuff intact within [code][/code] blocks\r
+                                //Waitman Gobble NO WARRANTY\r
+\r
+\r
+                                var o = new Array();\r
+                                var x = s.split("[code]");\r
+                                var i = 0;\r
+\r
+                                var si = "";\r
+                                si = x.shift();\r
+                                si = si.replace(re,str);\r
+                                o.push(si);\r
+\r
+                                for (i = 0; i < x.length; i++) {\r
+                                        var no = new Array();\r
+                                        var j = x.shift();\r
+                                        var g = j.split("[/code]");\r
+                                        no.push(g.shift());\r
+                                        si = g.shift();\r
+                                        si = si.replace(re,str);\r
+                                        no.push(si);\r
+                                        o.push(no.join("[/code]"));\r
+                                }\r
+\r
+                                s = o.join("[code]");\r
+\r
+                        };\r
+\r
+\r
+\r
+\r
+\r
                        // example: [b] to <strong>\r
                        rep(/\n/gi,"<br />");\r
                        rep(/\[b\]/gi,"<strong>");\r
                        rep(/\[\/i\]/gi,"</em>");\r
                        rep(/\[u\]/gi,"<u>");\r
                        rep(/\[\/u\]/gi,"</u>");\r
-                       rep(/\[hr\]/gi,"<hr />");
+                       rep(/\[hr\]/gi,"<hr />");\r
                        rep(/\[bookmark=([^\]]+)\](.*?)\[\/bookmark\]/gi,"<a class=\"bookmark\" href=\"$1\">$2</a>");\r
                        rep(/\[url=([^\]]+)\](.*?)\[\/url\]/gi,"<a href=\"$1\">$2</a>");\r
                        rep(/\[url\](.*?)\[\/url\]/gi,"<a href=\"$1\">$1</a>");\r
                        rep(/\[img=(.*?)x(.*?)\](.*?)\[\/img\]/gi,"<img width=\"$1\" height=\"$2\" src=\"$3\" />");\r
                        rep(/\[img\](.*?)\[\/img\]/gi,"<img src=\"$1\" />");\r
-
-                       rep(/\[list\](.*?)\[\/list\]/gi, '<ul class="listbullet" style="list-style-type: circle;">$1</ul>');
-                       rep(/\[list=\](.*?)\[\/list\]/gi, '<ul class="listnone" style="list-style-type: none;">$1</ul>');
-                       rep(/\[list=1\](.*?)\[\/list\]/gi, '<ul class="listdecimal" style="list-style-type: decimal;">$1</ul>');
-                       rep(/\[list=i\](.*?)\[\/list\]/gi,'<ul class="listlowerroman" style="list-style-type: lower-roman;">$1</ul>');
-                       rep(/\[list=I\](.*?)\[\/list\]/gi, '<ul class="listupperroman" style="list-style-type: upper-roman;">$1</ul>');
-                       rep(/\[list=a\](.*?)\[\/list\]/gi, '<ul class="listloweralpha" style="list-style-type: lower-alpha;">$1</ul>');
-                       rep(/\[list=A\](.*?)\[\/list\]/gi, '<ul class="listupperalpha" style="list-style-type: upper-alpha;">$1</ul>');
-                       rep(/\[li\](.*?)\[\/li\]/gi, '<li>$1</li>');
+\r
+                       rep(/\[list\](.*?)\[\/list\]/gi, '<ul class="listbullet" style="list-style-type: circle;">$1</ul>');\r
+                       rep(/\[list=\](.*?)\[\/list\]/gi, '<ul class="listnone" style="list-style-type: none;">$1</ul>');\r
+                       rep(/\[list=1\](.*?)\[\/list\]/gi, '<ul class="listdecimal" style="list-style-type: decimal;">$1</ul>');\r
+                       rep(/\[list=i\](.*?)\[\/list\]/gi,'<ul class="listlowerroman" style="list-style-type: lower-roman;">$1</ul>');\r
+                       rep(/\[list=I\](.*?)\[\/list\]/gi, '<ul class="listupperroman" style="list-style-type: upper-roman;">$1</ul>');\r
+                       rep(/\[list=a\](.*?)\[\/list\]/gi, '<ul class="listloweralpha" style="list-style-type: lower-alpha;">$1</ul>');\r
+                       rep(/\[list=A\](.*?)\[\/list\]/gi, '<ul class="listupperalpha" style="list-style-type: upper-alpha;">$1</ul>');\r
+                       rep(/\[li\](.*?)\[\/li\]/gi, '<li>$1</li>');\r
                        rep(/\[color=(.*?)\](.*?)\[\/color\]/gi,"<span style=\"color: $1;\">$2</span>");\r
                        rep(/\[size=(.*?)\](.*?)\[\/size\]/gi,"<span style=\"font-size: $1;\">$2</span>");\r
                        rep(/\[code\](.*?)\[\/code\]/gi,"<code>$1</code>");\r
                        rep(/\[quote.*?\](.*?)\[\/quote\]/gi,"<blockquote>$1</blockquote>");\r
-
-                       /* oembed */
-                       function _b2h_cb(match, url) {
-                               url = bin2hex(url);
-                               function s_b2h(data) {
-                                               match = data;
-                               }
-                               $.ajax({
-                                       url: 'oembed/b2h?url=' + url,
-                                       async: false,
-                                       success: s_b2h,
-                                       dataType: 'html'
-                               });
-                               return match;
-                       }
-                       s = s.replace(/\[embed\](.*?)\[\/embed\]/gi, _b2h_cb);
-                       
-                       /* /oembed */
+\r
+                       /* oembed */\r
+                       function _b2h_cb(match, url) {\r
+                               url = bin2hex(url);\r
+                               function s_b2h(data) {\r
+                                               match = data;\r
+                               }\r
+                               $.ajax({\r
+                                       url: 'oembed/b2h?url=' + url,\r
+                                       async: false,\r
+                                       success: s_b2h,\r
+                                       dataType: 'html'\r
+                               });\r
+                               return match;\r
+                       }\r
+                       s = s.replace(/\[embed\](.*?)\[\/embed\]/gi, _b2h_cb);\r
+                       \r
+                       /* /oembed */\r
 \r
                        return s; \r
                }\r
index 93714bb5f9079c695da18bdb63333df38a84ea0a..88ccad6d3e42f9c7f970eba972f04417f132d3bd 100755 (executable)
@@ -37,7 +37,7 @@ function admin_post(&$a){
                                                        $func($a);
                                                }
                                }
-                               goaway($a->get_baseurl() . '/admin/plugins/' . $a->argv[2] );
+                               goaway($a->get_baseurl(true) . '/admin/plugins/' . $a->argv[2] );
                                return; // NOTREACHED
                                break;
                        case 'logs':
@@ -49,7 +49,7 @@ function admin_post(&$a){
                }
        }
 
-       goaway($a->get_baseurl() . '/admin' );
+       goaway($a->get_baseurl(true) . '/admin' );
        return; // NOTREACHED   
 }
 
@@ -68,11 +68,11 @@ function admin_content(&$a) {
 
        // array( url, name, extra css classes )
        $aside = Array(
-               'site'   =>     Array($a->get_baseurl()."/admin/site/", t("Site") , "site"),
-               'users'  =>     Array($a->get_baseurl()."/admin/users/", t("Users") , "users"),
-               'plugins'=>     Array($a->get_baseurl()."/admin/plugins/", t("Plugins") , "plugins"),
-               'themes' =>     Array($a->get_baseurl()."/admin/themes/", t("Themes") , "themes"),
-               'update' =>     Array($a->get_baseurl()."/admin/update/", t("Update") , "update")
+               'site'   =>     Array($a->get_baseurl(true)."/admin/site/", t("Site") , "site"),
+               'users'  =>     Array($a->get_baseurl(true)."/admin/users/", t("Users") , "users"),
+               'plugins'=>     Array($a->get_baseurl(true)."/admin/plugins/", t("Plugins") , "plugins"),
+               'themes' =>     Array($a->get_baseurl(true)."/admin/themes/", t("Themes") , "themes"),
+               'update' =>     Array($a->get_baseurl(true)."/admin/update/", t("Update") , "update")
        );
        
        /* get plugins admin page */
@@ -81,18 +81,18 @@ function admin_content(&$a) {
        $aside['plugins_admin']=Array();
        foreach ($r as $h){
                $plugin =$h['name'];
-               $aside['plugins_admin'][] = Array($a->get_baseurl()."/admin/plugins/".$plugin, $plugin, "plugin");
+               $aside['plugins_admin'][] = Array($a->get_baseurl(true)."/admin/plugins/".$plugin, $plugin, "plugin");
                // temp plugins with admin
                $a->plugins_admin[] = $plugin;
        }
                
-       $aside['logs'] = Array($a->get_baseurl()."/admin/logs/", t("Logs"), "logs");
+       $aside['logs'] = Array($a->get_baseurl(true)."/admin/logs/", t("Logs"), "logs");
 
        $t = get_markup_template("admin_aside.tpl");
        $a->page['aside'] = replace_macros( $t, array(
                        '$admin' => $aside, 
                        '$h_pending' => t('User registrations waiting for confirmation'),
-                       '$admurl'=> $a->get_baseurl()."/admin/"
+                       '$admurl'=> $a->get_baseurl(true)."/admin/"
        ));
 
 
@@ -151,11 +151,7 @@ function admin_page_summary(&$a) {
 
        $r = q("SELECT COUNT(id) as `count` FROM `register`");
        $pending = $r[0]['count'];
-       
-       
-       
-       
-       
+               
        $t = get_markup_template("admin_summary.tpl");
        return replace_macros($t, array(
                '$title' => t('Administration'),
@@ -210,7 +206,7 @@ function admin_page_site_post(&$a){
        $dfrn_only          =   ((x($_POST,'dfrn_only'))            ? True      :       False);
     $ostatus_disabled   =   !((x($_POST,'ostatus_disabled')) ? True  :   False);
        $diaspora_enabled   =   ((x($_POST,'diaspora_enabled')) ? True   :  False);
-
+       $ssl_policy         =   ((x($_POST,'ssl_policy')) ? intval($_POST['ssl_policy']) : 0);
 
        set_config('config','sitename',$sitename);
        if ($banner==""){
@@ -222,6 +218,7 @@ function admin_page_site_post(&$a){
        } else {
                set_config('system','banner', $banner);
        }
+       set_config('system','ssl_policy',$ssl_policy);
        set_config('system','language', $language);
        set_config('system','theme', $theme);
        set_config('system','maximagesize', $maximagesize);
@@ -258,7 +255,7 @@ function admin_page_site_post(&$a){
        set_config('system','diaspora_enabled', $diaspora_enabled);
 
        info( t('Site settings updated.') . EOL);
-       goaway($a->get_baseurl() . '/admin/site' );
+       goaway($a->get_baseurl(true) . '/admin/site' );
        return; // NOTREACHED   
        
 }
@@ -305,6 +302,12 @@ function admin_page_site(&$a) {
                REGISTER_APPROVE => t("Requires approval"),
                REGISTER_OPEN => t("Open")
        ); 
+
+       $ssl_choices = array(
+               SSL_POLICY_NONE => t("No SSL policy, links will track page SSL state"),
+               SSL_POLICY_FULL => t("Force all links to use SSL"),
+               SSL_POLICY_SELFSIGN => t("Self-signed certificate, use SSL for local links only (discouraged)")
+       );
        
        $t = get_markup_template("admin_site.tpl");
        return replace_macros($t, array(
@@ -316,13 +319,13 @@ function admin_page_site(&$a) {
                '$corporate' => t('Policies'),
                '$advanced' => t('Advanced'),
                
-               '$baseurl' => $a->get_baseurl(),
+               '$baseurl' => $a->get_baseurl(true),
                                                                        // name, label, value, help string, extra data...
                '$sitename'             => array('sitename', t("Site name"), htmlentities($a->config['sitename'], ENT_QUOTES), ""),
                '$banner'                       => array('banner', t("Banner/Logo"), $banner, ""),
                '$language'             => array('language', t("System language"), get_config('system','language'), "", $lang_choices),
                '$theme'                        => array('theme', t("System theme"), get_config('system','theme'), t("Default system theme - may be over-ridden by user profiles"), $theme_choices),
-
+               '$ssl_policy'       => array('ssl_policy', t("SSL link policy"), get_config('system','ssl_policy'), t("Determines whether generated links should be forced to use SSL"), $ssl_choices),
                '$maximagesize'         => array('maximagesize', t("Maximum image size"), get_config('system','maximagesize'), t("Maximum size in bytes of uploaded images. Default is 0, which means no limits.")),
 
                '$register_policy'      => array('register_policy', t("Register policy"), $a->config['register_policy'], "", $register_choices),
@@ -389,7 +392,7 @@ function admin_page_users_post(&$a){
                        user_deny($hash);
                }
        }
-       goaway($a->get_baseurl() . '/admin/users' );
+       goaway($a->get_baseurl(true) . '/admin/users' );
        return; // NOTREACHED   
 }
  
@@ -399,7 +402,7 @@ function admin_page_users(&$a){
                $user = q("SELECT * FROM `user` WHERE `uid`=%d", intval($uid));
                if (count($user)==0){
                        notice( 'User not found' . EOL);
-                       goaway($a->get_baseurl() . '/admin/users' );
+                       goaway($a->get_baseurl(true) . '/admin/users' );
                        return; // NOTREACHED                                           
                }               
                switch($a->argv[2]){
@@ -418,7 +421,7 @@ function admin_page_users(&$a){
                                notice( sprintf( ($user[0]['blocked']?t("User '%s' unblocked"):t("User '%s' blocked")) , $user[0]['username']) . EOL);
                        }; break;
                }
-               goaway($a->get_baseurl() . '/admin/users' );
+               goaway($a->get_baseurl(true) . '/admin/users' );
                return; // NOTREACHED   
                
        }
@@ -497,7 +500,7 @@ function admin_page_users(&$a){
 
 
                // values //
-               '$baseurl' => $a->get_baseurl(),
+               '$baseurl' => $a->get_baseurl(true),
 
                '$pending' => $pending,
                '$users' => $users,
@@ -536,7 +539,7 @@ function admin_page_plugins(&$a){
                                info( sprintf( t("Plugin %s enabled."), $plugin ) );
                        }
                        set_config("system","addon", implode(", ",$a->plugins));
-                       goaway($a->get_baseurl() . '/admin/plugins' );
+                       goaway($a->get_baseurl(true) . '/admin/plugins' );
                        return; // NOTREACHED   
                }
                // display plugin details
@@ -569,7 +572,7 @@ function admin_page_plugins(&$a){
                        '$page' => t('Plugins'),
                        '$toggle' => t('Toggle'),
                        '$settings' => t('Settings'),
-                       '$baseurl' => $a->get_baseurl(),
+                       '$baseurl' => $a->get_baseurl(true),
                
                        '$plugin' => $plugin,
                        '$status' => $status,
@@ -607,7 +610,7 @@ function admin_page_plugins(&$a){
                '$title' => t('Administration'),
                '$page' => t('Plugins'),
                '$submit' => t('Submit'),
-               '$baseurl' => $a->get_baseurl(),
+               '$baseurl' => $a->get_baseurl(true),
                '$function' => 'plugins',       
                '$plugins' => $plugins
        ));
@@ -713,7 +716,7 @@ function admin_page_themes(&$a){
                                info( sprintf('Theme %s disabled.',$theme));
 
                        set_config('system','allowed_themes',$s);
-                       goaway($a->get_baseurl() . '/admin/themes' );
+                       goaway($a->get_baseurl(true) . '/admin/themes' );
                        return; // NOTREACHED   
                }
 
@@ -742,7 +745,7 @@ function admin_page_themes(&$a){
                        '$page' => t('Themes'),
                        '$toggle' => t('Toggle'),
                        '$settings' => t('Settings'),
-                       '$baseurl' => $a->get_baseurl(),
+                       '$baseurl' => $a->get_baseurl(true),
                
                        '$plugin' => $theme,
                        '$status' => $status,
@@ -774,7 +777,7 @@ function admin_page_themes(&$a){
                '$title' => t('Administration'),
                '$page' => t('Themes'),
                '$submit' => t('Submit'),
-               '$baseurl' => $a->get_baseurl(),
+               '$baseurl' => $a->get_baseurl(true),
                '$function' => 'themes',
                '$plugins' => $xthemes,
                '$experimental' => t('[Experimental]'),
@@ -802,7 +805,7 @@ function admin_page_logs_post(&$a) {
        }
 
        info( t("Log settings updated.") );
-       goaway($a->get_baseurl() . '/admin/logs' );
+       goaway($a->get_baseurl(true) . '/admin/logs' );
        return; // NOTREACHED   
 }
  
@@ -856,7 +859,7 @@ readable.");
                '$submit' => t('Submit'),
                '$clear' => t('Clear'),
                '$data' => $data,
-               '$baseurl' => $a->get_baseurl(),
+               '$baseurl' => $a->get_baseurl(true),
                '$logname' =>  get_config('system','logfile'),
                
                                                                        // name, label, value, help string, extra data...
@@ -901,7 +904,7 @@ function admin_page_remoteupdate(&$a) {
        
        $tpl = get_markup_template("admin_remoteupdate.tpl");
        return replace_macros($tpl, array(
-               '$baseurl' => $a->get_baseurl(),
+               '$baseurl' => $a->get_baseurl(true),
                '$submit' => t("Update now"),
                '$close' => t("Close"),
                '$localversion' => FRIENDICA_VERSION,
index 001bf12af450ef76e7aa7fdf8f5a2c72282bc7be..78c8d40928c2b6461d2faa35539356a9d1128ee2 100755 (executable)
@@ -61,7 +61,7 @@ function contacts_post(&$a) {
 
        if(! count($orig_record)) {
                notice( t('Could not access contact record.') . EOL);
-               goaway($a->get_baseurl() . '/contacts');
+               goaway($a->get_baseurl(true) . '/contacts');
                return; // NOTREACHED
        }
 
@@ -141,7 +141,7 @@ function contacts_content(&$a) {
 
                if(! count($orig_record)) {
                        notice( t('Could not access contact record.') . EOL);
-                       goaway($a->get_baseurl() . '/contacts');
+                       goaway($a->get_baseurl(true) . '/contacts');
                        return; // NOTREACHED
                }
 
@@ -149,7 +149,7 @@ function contacts_content(&$a) {
 
                        // pull feed and consume it, which should subscribe to the hub.
                        proc_run('php',"include/poller.php","$contact_id");
-                       goaway($a->get_baseurl() . '/contacts/' . $contact_id);
+                       goaway($a->get_baseurl(true) . '/contacts/' . $contact_id);
                        // NOTREACHED
                }
 
@@ -164,7 +164,7 @@ function contacts_content(&$a) {
                                //notice( t('Contact has been ') . (($blocked) ? t('blocked') : t('unblocked')) . EOL );
                                info( (($blocked) ? t('Contact has been blocked') : t('Contact has been unblocked')) . EOL );
                        }
-                       goaway($a->get_baseurl() . '/contacts/' . $contact_id);
+                       goaway($a->get_baseurl(true) . '/contacts/' . $contact_id);
                        return; // NOTREACHED
                }
 
@@ -178,7 +178,7 @@ function contacts_content(&$a) {
                        if($r) {
                                info( (($readonly) ? t('Contact has been ignored') : t('Contact has been unignored')) . EOL );
                        }
-                       goaway($a->get_baseurl() . '/contacts/' . $contact_id);
+                       goaway($a->get_baseurl(true) . '/contacts/' . $contact_id);
                        return; // NOTREACHED
                }
 
@@ -220,9 +220,9 @@ function contacts_content(&$a) {
                        contact_remove($orig_record[0]['id']);
                        info( t('Contact has been removed.') . EOL );
                        if(x($_SESSION,'return_url'))
-                               goaway($a->get_baseurl() . '/' . $_SESSION['return_url']);
+                               goaway($a->get_baseurl(true) . '/' . $_SESSION['return_url']);
                        else
-                               goaway($a->get_baseurl() . '/contacts');
+                               goaway($a->get_baseurl(true) . '/contacts');
                        return; // NOTREACHED
                }
        }
@@ -233,7 +233,7 @@ function contacts_content(&$a) {
                $contact = $a->data['contact'];
 
                $tpl = get_markup_template('contact_head.tpl');
-               $a->page['htmlhead'] .= replace_macros($tpl, array('$baseurl' => $a->get_baseurl()));
+               $a->page['htmlhead'] .= replace_macros($tpl, array('$baseurl' => $a->get_baseurl(true)));
 
                require_once('include/contact_selectors.php');
 
@@ -295,17 +295,17 @@ function contacts_content(&$a) {
                $tabs = array(
                        array(
                                'label' => (($contact['blocked']) ? t('Unblock') : t('Block') ),
-                               'url'   => $a->get_baseurl() . '/contacts/' . $contact_id . '/block',
+                               'url'   => $a->get_baseurl(true) . '/contacts/' . $contact_id . '/block',
                                'sel'   => '',
                        ),
                        array(
                                'label' => (($contact['readonly']) ? t('Unignore') : t('Ignore') ),
-                               'url'   => $a->get_baseurl() . '/contacts/' . $contact_id . '/ignore',
+                               'url'   => $a->get_baseurl(true) . '/contacts/' . $contact_id . '/ignore',
                                'sel'   => '',
                        ),
                        array(
                                'label' => t('Repair'),
-                               'url'   => $a->get_baseurl() . '/crepair/' . $contact_id,
+                               'url'   => $a->get_baseurl(true) . '/crepair/' . $contact_id,
                                'sel'   => '',
                        )
                );
@@ -322,7 +322,7 @@ function contacts_content(&$a) {
                        '$lbl_info1' => t('Contact Information / Notes'),
                        '$infedit' => t('Edit contact notes'),
                        '$common_text' => $common_text,
-                       '$common_link' => $a->get_baseurl() . '/common/' . $contact['id'],
+                       '$common_link' => $a->get_baseurl(true) . '/common/' . $contact['id'],
                        '$all_friends' => $all_friends,
                        '$relation_text' => $relation_text,
                        '$visit' => sprintf( t('Visit %s\'s profile [%s]'),$contact['name'],$contact['url']),
@@ -397,30 +397,30 @@ function contacts_content(&$a) {
        $tabs = array(
                array(
                        'label' => t('All Contacts'),
-                       'url'   => $a->get_baseurl() . '/contacts/all', 
+                       'url'   => $a->get_baseurl(true) . '/contacts/all', 
                        'sel'   => ($all) ? 'active' : '',
                ),
                array(
                        'label' => t('Unblocked Contacts'),
-                       'url'   => $a->get_baseurl() . '/contacts',
+                       'url'   => $a->get_baseurl(true) . '/contacts',
                        'sel'   => ((! $all) && (! $blocked) && (! $hidden) && (! $search) && (! $nets) && (! $ignored)) ? 'active' : '',
                ),
 
                array(
                        'label' => t('Blocked Contacts'),
-                       'url'   => $a->get_baseurl() . '/contacts/blocked',
+                       'url'   => $a->get_baseurl(true) . '/contacts/blocked',
                        'sel'   => ($blocked) ? 'active' : '',
                ),
 
                array(
                        'label' => t('Ignored Contacts'),
-                       'url'   => $a->get_baseurl() . '/contacts/ignored',
+                       'url'   => $a->get_baseurl(true) . '/contacts/ignored',
                        'sel'   => ($ignored) ? 'active' : '',
                ),
 
                array(
                        'label' => t('Hidden Contacts'),
-                       'url'   => $a->get_baseurl() . '/contacts/hidden',
+                       'url'   => $a->get_baseurl(true) . '/contacts/hidden',
                        'sel'   => ($hidden) ? 'active' : '',
                ),
 
@@ -445,7 +445,7 @@ function contacts_content(&$a) {
 
        
        $r = q("SELECT COUNT(*) AS `total` FROM `contact` 
-               WHERE `uid` = %d AND `pending` = 0 $sql_extra $sql_extra2 ",
+               WHERE `uid` = %d AND `self` = 0 AND `pending` = 0 $sql_extra $sql_extra2 ",
                intval($_SESSION['uid']));
        if(count($r)) {
                $a->set_pager_total($r[0]['total']);
@@ -454,7 +454,7 @@ function contacts_content(&$a) {
 
 
 
-       $r = q("SELECT * FROM `contact` WHERE `uid` = %d AND `pending` = 0 $sql_extra $sql_extra2 ORDER BY `name` ASC LIMIT %d , %d ",
+       $r = q("SELECT * FROM `contact` WHERE `uid` = %d AND `self` = 0 AND `pending` = 0 $sql_extra $sql_extra2 ORDER BY `name` ASC LIMIT %d , %d ",
                intval($_SESSION['uid']),
                intval($a->pager['start']),
                intval($a->pager['itemspage'])
@@ -465,8 +465,6 @@ function contacts_content(&$a) {
        if(count($r)) {
 
                foreach($r as $rr) {
-                       if($rr['self'])
-                               continue;
 
                        switch($rr['rel']) {
                                case CONTACT_IS_FRIEND:
index 0c0c27e3d67a465c2118bf2db20ead142d511488..3dbdc5b328953a55c142340bd00956c96c44b669 100755 (executable)
@@ -14,6 +14,7 @@ function dfrn_notify_post(&$a) {
        $key          = ((x($_POST,'key'))          ? $_POST['key']                     : '');
        $dissolve     = ((x($_POST,'dissolve'))     ? intval($_POST['dissolve'])        :  0);
        $perm         = ((x($_POST,'perm'))         ? notags(trim($_POST['perm']))      : 'r');
+       $ssl_policy   = ((x($_POST,'ssl_policy'))   ? notags(trim($_POST['ssl_policy'])): 'none');
 
        $writable = (-1);
        if($dfrn_version >= 2.21) {
@@ -94,6 +95,65 @@ function dfrn_notify_post(&$a) {
                $importer['writable'] = $writable;
        }
 
+       // if contact's ssl policy changed, update our links
+
+       $ssl_changed = false;
+
+       if($ssl_policy == 'self' && strstr($importer['url'],'https:')) {
+               $ssl_changed = true;
+               $importer['url']     =  str_replace('https:','http:',$importer['url']);
+               $importer['nurl']    = normalise_link($importer['url']);
+               $importer['photo']   =  str_replace('https:','http:',$importer['photo']);
+               $importer['thumb']   =  str_replace('https:','http:',$importer['thumb']);
+               $importer['micro']   =  str_replace('https:','http:',$importer['micro']);
+               $importer['request'] =  str_replace('https:','http:',$importer['request']);
+               $importer['notify']  =  str_replace('https:','http:',$importer['notify']);
+               $importer['poll']    =  str_replace('https:','http:',$importer['poll']);
+               $importer['confirm'] =  str_replace('https:','http:',$importer['confirm']);
+               $importer['poco']    =  str_replace('https:','http:',$importer['poco']);
+       }
+
+       if($ssl_policy == 'full' && strstr($importer['url'],'http:')) {
+               $ssl_changed = true;
+               $importer['url']     =  str_replace('http:','https:',$importer['url']);
+               $importer['nurl']    = normalise_link($importer['url']);
+               $importer['photo']   =  str_replace('http:','https:',$importer['photo']);
+               $importer['thumb']   =  str_replace('http:','https:',$importer['thumb']);
+               $importer['micro']   =  str_replace('http:','https:',$importer['micro']);
+               $importer['request'] =  str_replace('http:','https:',$importer['request']);
+               $importer['notify']  =  str_replace('http:','https:',$importer['notify']);
+               $importer['poll']    =  str_replace('http:','https:',$importer['poll']);
+               $importer['confirm'] =  str_replace('http:','https:',$importer['confirm']);
+               $importer['poco']    =  str_replace('http:','https:',$importer['poco']);
+       }
+
+       if($ssl_changed) {
+               q("update contact set 
+                       url = '%s', 
+                       nurl = '%s',
+                       photo = '%s',
+                       thumb = '%s',
+                       micro = '%s',
+                       request = '%s',
+                       notify = '%s',
+                       poll = '%s',
+                       confirm = '%s',
+                       poco = '%s'
+                       where id = %d limit 1",
+                       dbesc($importer['url']),
+                       dbesc($importer['nurl']),
+                       dbesc($importer['photo']),
+                       dbesc($importer['thumb']),
+                       dbesc($importer['micro']),
+                       dbesc($importer['request']),
+                       dbesc($importer['notify']),
+                       dbesc($importer['poll']),
+                       dbesc($importer['confirm']),
+                       dbesc($importer['poco']),
+                       intval($importer['id'])
+               );
+       }
+                       
        logger('dfrn_notify: received notify from ' . $importer['name'] . ' for ' . $importer['username']);
        logger('dfrn_notify: data: ' . $data, LOGGER_DATA);
 
index bc159137df697046fa14abb9ee8bc18b59f4a5e0..c2d37dac7e094d625a085d7571d80bac58b89387 100755 (executable)
@@ -43,7 +43,7 @@ function dfrn_request_post(&$a) {
                return;
 
 
-       if($_POST['cancel']) {
+       if(x($_POST, 'cancel')) {
                goaway(z_root());
        } 
 
@@ -77,9 +77,10 @@ function dfrn_request_post(&$a) {
                                 * Lookup the contact based on their URL (which is the only unique thing we have at the moment)
                                 */
        
-                               $r = q("SELECT * FROM `contact` WHERE `uid` = %d AND `url` = '%s' AND `self` = 0 LIMIT 1",
+                               $r = q("SELECT * FROM `contact` WHERE `uid` = %d AND (`url` = '%s' OR `nurl` = '%s') AND `self` = 0 LIMIT 1",
                                        intval(local_user()),
-                                       dbesc($dfrn_url)
+                                       dbesc($dfrn_url),
+                                       dbesc(normalise_link($dfrn_url))
                                );
        
                                if(count($r)) {
@@ -666,7 +667,25 @@ function dfrn_request_content(&$a) {
                $page_desc = sprintf( t('Diaspora members: Please do not use this form. Instead, enter "%s" into your Diaspora search bar.'), 
                        $target_addr) . EOL . EOL;
 
-               $page_desc .= t("Please enter your 'Identity Address' from one of the following supported social networks:");
+               $page_desc .= t("Please enter your 'Identity Address' from one of the following supported communications networks:");
+
+               // see if we are allowed to have NETWORK_MAIL2 contacts
+
+               $mail_disabled = ((function_exists('imap_open') && (! get_config('system','imap_disabled'))) ? 0 : 1);
+               if(get_config('system','dfrn_only'))
+                       $mail_disabled = 1;
+
+               if(! $mail_disabled) {
+                       $r = q("SELECT * FROM `mailacct` WHERE `uid` = %d LIMIT 1",
+                               intval($a->profile['uid'])
+                       );
+                       if(! count($r))
+                               $mail_disabled = 1;
+               }
+
+               $emailnet = (($mail_disabled) ? '' : t("<strike>Connect as an email follower</strike> \x28Coming soon\x29"));
+
+               $invite_desc = t('If you are not yet a member of the free social web, <a href="http://dir.friendica.com/siteinfo">follow this link to find a public Friendica site and join us today</a>.');
 
                $o .= replace_macros($tpl,array(
                        '$header' => t('Friend/Connection Request'),
@@ -682,6 +701,8 @@ function dfrn_request_content(&$a) {
                        '$diaspora' => t('Diaspora'),
                        '$diasnote' => t('- please share from your own site as noted above'),
                        '$your_address' => t('Your Identity Address:'),
+                       '$invite_desc' => $invite_desc,
+                       '$emailnet' => $emailnet,
                        '$submit' => t('Submit Request'),
                        '$cancel' => t('Cancel'),
                        '$nickname' => $a->argv[1],
diff --git a/mod/filer.php b/mod/filer.php
new file mode 100755 (executable)
index 0000000..a9e2135
--- /dev/null
@@ -0,0 +1,23 @@
+<?php
+
+require_once('include/security.php');
+require_once('include/bbcode.php');
+require_once('include/items.php');
+
+
+function filer_content(&$a) {
+
+       if(! local_user()) {
+               killme();
+       }
+
+       $term = notags(trim($_GET['term']));
+       $item_id = (($a->argc > 1) ? notags(trim($a->argv[1])) : 0);
+
+       logger('filer: tag ' . $term . ' item ' . $item_id);
+
+       if($item_id && strlen($term))
+               file_tag_save_file(local_user(),$item_id,$term);
+
+       killme();
+}
diff --git a/mod/filerm.php b/mod/filerm.php
new file mode 100644 (file)
index 0000000..66b684d
--- /dev/null
@@ -0,0 +1,21 @@
+<?php
+
+function filerm_content(&$a) {
+
+       if(! local_user()) {
+               killme();
+       }
+
+       $term = notags(trim($_GET['term']));
+       $item_id = (($a->argc > 1) ? notags(trim($a->argv[1])) : 0);
+
+       logger('filerm: tag ' . $term . ' item ' . $item_id);
+
+       if($item_id && strlen($term))
+               file_tag_unsave_file(local_user(),$item_id,$term);
+
+       if(x($_SESSION,'return_url'))
+               goaway($a->get_baseurl() . '/' . $_SESSION['return_url']);
+       
+       killme();
+}
index 19e649dcb6ce7a1ee25d5fe42f4bdfe5991ca705..6d2d9e2ebfc38f03761ec6b0595787db981184f9 100755 (executable)
@@ -21,7 +21,7 @@ function hcard_init(&$a) {
        profile_load($a,$which,$profile);
 
        if((x($a->profile,'page-flags')) && ($a->profile['page-flags'] == PAGE_COMMUNITY)) {
-               $a->page['htmlhead'] .= '<meta name="friendika.community" content="true" />';
+               $a->page['htmlhead'] .= '<meta name="friendica.community" content="true" />';
        }
        if(x($a->profile,'openidserver'))                               
                $a->page['htmlhead'] .= '<link rel="openid.server" href="' . $a->profile['openidserver'] . '" />' . "\r\n";
index 81d7c753b42484e1fe787b3829803a9159d2449d..98cfb4338512bc57d7de2fb6ea5d44658975363d 100755 (executable)
@@ -425,110 +425,7 @@ function item_post(&$a) {
 
        if(count($tags)) {
                foreach($tags as $tag) {
-                       
-                       if(isset($profile))
-                               unset($profile);
-                       if(strpos($tag,'#') === 0) {
-                               if(strpos($tag,'[url='))
-                                       continue;
-                               $basetag = str_replace('_',' ',substr($tag,1));
-                               $body = str_replace($tag,'#[url=' . $a->get_baseurl() . '/search?search=' . rawurlencode($basetag) . ']' . $basetag . '[/url]',$body);
-
-                               $newtag = '#[url=' . $a->get_baseurl() . '/search?search=' . rawurlencode($basetag) . ']' . $basetag . '[/url]';
-                               if(! stristr($str_tags,$newtag)) {
-                                       if(strlen($str_tags))
-                                               $str_tags .= ',';
-                                       $str_tags .= $newtag;
-                               } 
-                               continue;
-                       }
-                       if(strpos($tag,'@') === 0) {
-                               if(strpos($tag,'[url='))
-                                       continue;
-                               $stat = false;
-                               $name = substr($tag,1);
-                               if((strpos($name,'@')) || (strpos($name,'http://'))) {
-                                       $newname = $name;
-                                       $links = @lrdd($name);
-                                       if(count($links)) {
-                                               foreach($links as $link) {
-                                                       if($link['@attributes']['rel'] === 'http://webfinger.net/rel/profile-page')
-                                       $profile = $link['@attributes']['href'];
-                                                       if($link['@attributes']['rel'] === 'salmon') {
-                                                               if(strlen($inform))
-                                                                       $inform .= ',';
-                                       $inform .= 'url:' . str_replace(',','%2c',$link['@attributes']['href']);
-                                                       }
-                                               }
-                                       }
-                               }
-                               else {
-                                       $newname = $name;
-                                       $alias = '';
-                                       $tagcid = 0;
-                                       if(strrpos($newname,'+')) {
-                                               $tagcid = intval(substr($newname,strrpos($newname,'+') + 1));
-                                               if(strpos($name,' '))
-                                                       $name = substr($name,0,strpos($name,' '));
-                                       }       
-                                       if($tagcid) {
-                                               $r = q("SELECT * FROM `contact` WHERE `id` = %d AND `uid` = %d LIMIT 1",
-                                                       intval($tagcid),
-                                                       intval($profile_uid)
-                                               );
-                                       }
-                                       elseif(strstr($name,'_') || strstr($name,' ')) {
-                                               $newname = str_replace('_',' ',$name);
-                                               $r = q("SELECT * FROM `contact` WHERE `name` = '%s' AND `uid` = %d LIMIT 1",
-                                                       dbesc($newname),
-                                                       intval($profile_uid)
-                                               );
-                                       }
-                                       else {
-                                               $r = q("SELECT * FROM `contact` WHERE `attag` = '%s' OR `nick` = '%s' AND `uid` = %d ORDER BY `attag` DESC LIMIT 1",
-                                                       dbesc($name),
-                                                       dbesc($name),
-                                                       intval($profile_uid)
-                                               );
-                                       }
-                                       if(count($r)) {
-                                               $profile = $r[0]['url'];
-                                               if($r[0]['network'] === 'stat') {
-                                                       $newname = $r[0]['nick'];
-                                                       $stat = true;
-                                                       if($r[0]['alias'])
-                                                               $alias = $r[0]['alias'];
-                                               }
-                                               else
-                                                       $newname = $r[0]['name'];
-                                               if(strlen($inform))
-                                                       $inform .= ',';
-                                               $inform .= 'cid:' . $r[0]['id'];
-                                       }
-                               }
-                               if($profile) {
-                                       $body = str_replace('@' . $name, '@' . '[url=' . $profile . ']' . $newname      . '[/url]', $body);
-                                       $profile = str_replace(',','%2c',$profile);
-                                       $newtag = '@[url=' . $profile . ']' . $newname  . '[/url]';
-                                       if(! stristr($str_tags,$newtag)) {
-                                               if(strlen($str_tags))
-                                                       $str_tags .= ',';
-                                               $str_tags .= $newtag;
-                                       }
-
-                                       // Status.Net seems to require the numeric ID URL in a mention if the person isn't 
-                                       // subscribed to you. But the nickname URL is OK if they are. Grrr. We'll tag both. 
-
-                                       if(strlen($alias)) {
-                                               $newtag = '@[url=' . $alias . ']' . $newname    . '[/url]';
-                                               if(! stristr($str_tags,$newtag)) {
-                                                       if(strlen($str_tags))
-                                                               $str_tags .= ',';
-                                                       $str_tags .= $newtag;
-                                               }
-                                       }
-                               }
-                       }
+                       handle_tag($a, $body, $inform, $str_tags, $profile_uid, $tag); 
                }
        }
 
@@ -627,7 +524,7 @@ function item_post(&$a) {
 
        if($preview) {
                require_once('include/conversation.php');
-               $o = conversation(&$a,array(array_merge($contact_record,$datarray)),'search',false,true);
+               $o = conversation($a,array(array_merge($contact_record,$datarray)),'search',false,true);
                logger('preview: ' . $o);
                echo json_encode(array('preview' => $o));
                killme();
@@ -922,3 +819,142 @@ function item_content(&$a) {
                drop_item($a->argv[2]);
        }
 }
+
+/**
+ * This function removes the tag $tag from the text $body and replaces it with 
+ * the appropiate link. 
+ * 
+ * @param unknown_type $body the text to replace the tag in
+ * @param unknown_type $inform a comma-seperated string containing everybody to inform
+ * @param unknown_type $str_tags string to add the tag to
+ * @param unknown_type $profile_uid
+ * @param unknown_type $tag the tag to replace
+ */
+function handle_tag($a, &$body, &$inform, &$str_tags, $profile_uid, $tag) {
+       //is it a hash tag? 
+       if(strpos($tag,'#') === 0) {\r
+               //if the tag is replaced...
+               if(strpos($tag,'[url='))
+                       //...do nothing\r
+                       continue;
+               //base tag has the tags name only\r
+               $basetag = str_replace('_',' ',substr($tag,1));\r
+               //create text for link
+               $newtag = '#[url=' . $a->get_baseurl() . '/search?search=' . rawurlencode($basetag) . ']' . $basetag . '[/url]';
+               //replace tag by the link\r
+               $body = str_replace($tag, $newtag, $body);\r
+       
+               //is the link already in str_tags?\r
+               if(! stristr($str_tags,$newtag)) {\r
+                       //append or set str_tags
+                       if(strlen($str_tags))\r
+                               $str_tags .= ',';\r
+                       $str_tags .= $newtag;\r
+               }\r
+               return;\r
+       }
+       //is it a person tag? \r
+       if(strpos($tag,'@') === 0) {\r
+               //is it already replaced? 
+               if(strpos($tag,'[url='))\r
+                       continue;\r
+               $stat = false;\r
+               //get the person's name
+               $name = substr($tag,1);
+               //is it a link or a full dfrn address? \r
+               if((strpos($name,'@')) || (strpos($name,'http://'))) {\r
+                       $newname = $name;\r
+                       //get the profile links
+                       $links = @lrdd($name);\r
+                       if(count($links)) {\r
+                               //for all links, collect how is to inform and how's profile is to link
+                               foreach($links as $link) {\r
+                                       if($link['@attributes']['rel'] === 'http://webfinger.net/rel/profile-page')\r
+                                               $profile = $link['@attributes']['href'];\r
+                                       if($link['@attributes']['rel'] === 'salmon') {\r
+                                               if(strlen($inform))\r
+                                                       $inform .= ',';\r
+                                               $inform .= 'url:' . str_replace(',','%2c',$link['@attributes']['href']);\r
+                                       }\r
+                               }\r
+                       }\r
+               } else { //if it is a name rather than an address\r
+                       $newname = $name;\r
+                       $alias = '';\r
+                       $tagcid = 0;
+                       //is it some generated name?\r
+                       if(strrpos($newname,'+')) {\r
+                               //get the id
+                               $tagcid = intval(substr($newname,strrpos($newname,'+') + 1));\r
+                               //remove the next word from tag's name
+                               if(strpos($name,' ')) {\r
+                                       $name = substr($name,0,strpos($name,' '));
+                               }\r
+                       }
+                       if($tagcid) { //if there was an id
+                               //select contact with that id from the logged in user's contact list\r
+                               $r = q("SELECT * FROM `contact` WHERE `id` = %d AND `uid` = %d LIMIT 1",\r
+                                               intval($tagcid),\r
+                                               intval($profile_uid)
+                               );\r
+                       } elseif(strstr($name,'_') || strstr($name,' ')) { //no id
+                               //get the real name\r
+                               $newname = str_replace('_',' ',$name);\r
+                               //select someone from this user's contacts by name
+                               $r = q("SELECT * FROM `contact` WHERE `name` = '%s' AND `uid` = %d LIMIT 1",\r
+                                               dbesc($newname),\r
+                                               intval($profile_uid)\r
+                               );\r
+                       } else {
+                               //select someone by attag or nick and the name passed in\r
+                               $r = q("SELECT * FROM `contact` WHERE `attag` = '%s' OR `nick` = '%s' AND `uid` = %d ORDER BY `attag` DESC LIMIT 1",\r
+                                               dbesc($name),\r
+                                               dbesc($name),\r
+                                               intval($profile_uid)\r
+                               );\r
+                       }
+                       //$r is set, if someone could be selected\r
+                       if(count($r)) {\r
+                               $profile = $r[0]['url'];
+                               //set newname to nick, find alias\r
+                               if($r[0]['network'] === 'stat') {\r
+                                       $newname = $r[0]['nick'];\r
+                                       $stat = true;\r
+                                       if($r[0]['alias'])\r
+                                               $alias = $r[0]['alias'];\r
+                               }\r
+                               else\r
+                                       $newname = $r[0]['name'];\r
+                               //add person's id to $inform
+                               if(strlen($inform))\r
+                                       $inform .= ',';\r
+                               $inform .= 'cid:' . $r[0]['id'];\r
+                       }\r
+               }
+               //if there is an url for this persons profile\r
+               if(isset($profile)) {\r
+                       //create profile link
+                       $profile = str_replace(',','%2c',$profile);\r
+                       $newtag = '@[url=' . $profile . ']' . $newname  . '[/url]';\r
+                       $body = str_replace('@' . $name, $newtag, $body);\r
+                       //append tag to str_tags
+                       if(! stristr($str_tags,$newtag)) {\r
+                               if(strlen($str_tags))\r
+                                       $str_tags .= ',';\r
+                               $str_tags .= $newtag;\r
+                       }\r
+       \r
+                       // Status.Net seems to require the numeric ID URL in a mention if the person isn't\r
+                       // subscribed to you. But the nickname URL is OK if they are. Grrr. We'll tag both.\r
+       \r
+                       if(strlen($alias)) {\r
+                               $newtag = '@[url=' . $alias . ']' . $newname    . '[/url]';\r
+                               if(! stristr($str_tags,$newtag)) {\r
+                                       if(strlen($str_tags))\r
+                                               $str_tags .= ',';\r
+                                       $str_tags .= $newtag;\r
+                               }\r
+                       }\r
+               }\r
+       }
+}
index ec4dcd8a00922e0125aca2ae3a690df2a4a6153e..84dfa6917c3529c05293fcf39d83c06d692b1dfb 100755 (executable)
@@ -74,7 +74,7 @@ function manage_post(&$a) {
        if($limited_id)
                $_SESSION['submanage'] = $original_id;
 
-       goaway($a->get_baseurl() . '/profile/' . $a->user['nickname']);
+       goaway($a->get_baseurl(true) . '/profile/' . $a->user['nickname']);
        // NOTREACHED
 }
 
index 57d45ee3c7933113a45cb3f4401f766a44ed1f29..55e313776d6c0897f0cf2f426377c19891c1c048 100755 (executable)
@@ -56,23 +56,23 @@ function message_content(&$a) {
                return;
        }
 
-       $myprofile = $a->get_baseurl() . '/profile/' . $a->user['nickname'];
+       $myprofile = $a->get_baseurl(true) . '/profile/' . $a->user['nickname'];
 
 
        $tabs = array(
                array(
                        'label' => t('Inbox'),
-                       'url'=> $a->get_baseurl() . '/message',
+                       'url'=> $a->get_baseurl(true) . '/message',
                        'sel'=> (($a->argc == 1) ? 'active' : ''),
                ),
                array(
                        'label' => t('Outbox'),
-                       'url' => $a->get_baseurl() . '/message/sent',
+                       'url' => $a->get_baseurl(true) . '/message/sent',
                        'sel'=> (($a->argv[1] == 'sent') ? 'active' : ''),
                ),
                array(
                        'label' => t('New Message'),
-                       'url' => $a->get_baseurl() . '/message/new',
+                       'url' => $a->get_baseurl(true) . '/message/new',
                        'sel'=> (($a->argv[1] == 'new') ? 'active' : ''),
                ),
        );
@@ -99,7 +99,7 @@ function message_content(&$a) {
                        if($r) {
                                info( t('Message deleted.') . EOL );
                        }
-                       goaway($a->get_baseurl() . '/message' );
+                       goaway($a->get_baseurl(true) . '/message' );
                }
                else {
                        $r = q("SELECT `parent-uri`,`convid` FROM `mail` WHERE `id` = %d AND `uid` = %d LIMIT 1",
@@ -129,7 +129,7 @@ function message_content(&$a) {
                                if($r)
                                        info( t('Conversation removed.') . EOL );
                        } 
-                       goaway($a->get_baseurl() . '/message' );
+                       goaway($a->get_baseurl(true) . '/message' );
                }       
        
        }
@@ -146,7 +146,7 @@ function message_content(&$a) {
                $tpl = get_markup_template('msg-header.tpl');
 
                $a->page['htmlhead'] .= replace_macros($tpl, array(
-                       '$baseurl' => $a->get_baseurl(),
+                       '$baseurl' => $a->get_baseurl(true),
                        '$editselect' => (($plaintext) ? 'none' : '/(profile-jot-text|prvmail-text)/'),
                        '$nickname' => $a->user['nickname'],
                        '$linkurl' => t('Please enter a link URL:')
@@ -192,9 +192,9 @@ function message_content(&$a) {
                        $a->set_pager_total($r[0]['total']);
        
                $r = q("SELECT max(`mail`.`created`) AS `mailcreated`, min(`mail`.`seen`) AS `mailseen`, 
-                       `mail`.* , `contact`.`name`, `contact`.`url`, `contact`.`thumb` 
+                       `mail`.* , `contact`.`name`, `contact`.`url`, `contact`.`thumb` , `contact`.`network`  
                        FROM `mail` LEFT JOIN `contact` ON `mail`.`contact-id` = `contact`.`id` 
-                       WHERE `mail`.`uid` = %d AND `from-url` $eq '%s' GROUP BY `parent-uri` ORDER BY `created` DESC  LIMIT %d , %d ",
+                       WHERE `mail`.`uid` = %d AND `from-url` $eq '%s' GROUP BY `parent-uri` ORDER BY `mailcreated` DESC  LIMIT %d , %d ",
                        intval(local_user()),
                        dbesc($myprofile),
                        intval($a->pager['start']),
@@ -210,7 +210,7 @@ function message_content(&$a) {
                        $o .= replace_macros($tpl, array(
                                '$id' => $rr['id'],
                                '$from_name' =>$rr['from-name'],
-                               '$from_url' => (($rr['network'] === NETWORK_DFRN) ? $a->get_baseurl() . '/redir/' . $rr['contact-id'] : $rr['url']),
+                               '$from_url' => (($rr['network'] === NETWORK_DFRN) ? $a->get_baseurl(true) . '/redir/' . $rr['contact-id'] : $rr['url']),
                                '$sparkle' => ' sparkle',
                                '$from_photo' => $rr['thumb'],
                                '$subject' => template_escape((($rr['mailseen']) ? $rr['title'] : '<strong>' . $rr['title'] . '</strong>')),
@@ -267,7 +267,7 @@ function message_content(&$a) {
        
                $a->page['htmlhead'] .= replace_macros($tpl, array(
                        '$nickname' => $a->user['nickname'],
-                       '$baseurl' => $a->get_baseurl()
+                       '$baseurl' => $a->get_baseurl(true)
                ));
 
 
@@ -278,7 +278,7 @@ function message_content(&$a) {
                                $sparkle = '';
                        }
                        else {
-                               $from_url = $a->get_baseurl() . '/redir/' . $message['contact-id'];
+                               $from_url = $a->get_baseurl(true) . '/redir/' . $message['contact-id'];
                                $sparkle = ' sparkle';
                        }
                        $o .= replace_macros($tpl, array(
index b04a7b489013153999a8a9d47c21d7458580e8c3..d0f1733f46120e5c6cec659491ddda9cc17b8398 100755 (executable)
@@ -44,21 +44,26 @@ function network_init(&$a) {
        }
        
        $a->page['aside'] .= group_side('network','network',true,$group_id);
-       $a->page['aside'] .= networks_widget($a->get_baseurl() . '/network',(($_GET['nets']) ? $_GET['nets'] : ''));
+       $a->page['aside'] .= networks_widget($a->get_baseurl(true) . '/network',(x($_GET, 'nets') ? $_GET['nets'] : ''));
        $a->page['aside'] .= saved_searches($search);
+       $a->page['aside'] .= fileas_widget($a->get_baseurl(true) . '/network',(x($_GET, 'file') ? $_GET['file'] : ''));
 
 }
 
 function saved_searches($search) {
 
+       $a = get_app();
+
        $srchurl = '/network?f=' 
-               . ((x($_GET,'cid')) ? '&cid=' . $_GET['cid'] : '') 
-               . ((x($_GET,'star')) ? '&star=' . $_GET['star'] : '')
+               . ((x($_GET,'cid'))   ? '&cid='   . $_GET['cid']   : '') 
+               . ((x($_GET,'star'))  ? '&star='  . $_GET['star']  : '')
                . ((x($_GET,'bmark')) ? '&bmark=' . $_GET['bmark'] : '')
-               . ((x($_GET,'conv')) ? '&conv=' . $_GET['conv'] : '')
-               . ((x($_GET,'nets')) ? '&nets=' . $_GET['nets'] : '')
-               . ((x($_GET,'cmin')) ? '&cmin=' . $_GET['cmin'] : '')
-               . ((x($_GET,'cmax')) ? '&cmax=' . $_GET['cmax'] : '');
+               . ((x($_GET,'conv'))  ? '&conv='  . $_GET['conv']  : '')
+               . ((x($_GET,'nets'))  ? '&nets='  . $_GET['nets']  : '')
+               . ((x($_GET,'cmin'))  ? '&cmin='  . $_GET['cmin']  : '')
+               . ((x($_GET,'cmax'))  ? '&cmax='  . $_GET['cmax']  : '')
+               . ((x($_GET,'file'))  ? '&file='  . $_GET['file']  : '');
+       ;
        
        $o = '';
 
@@ -85,7 +90,7 @@ function saved_searches($search) {
        $o = replace_macros($tpl, array(
                '$title'         => t('Saved Searches'),
                '$add'           => t('add'),
-               '$searchbox' => search($search,'netsearch-box',$srchurl,true),
+               '$searchbox' => search($search,'netsearch-box',$a->get_baseurl(true) . $srchurl,true),
                '$saved'         => $saved,
        ));
        
@@ -130,15 +135,15 @@ function network_content(&$a, $update = 0) {
                $starred_active = 'active';
        }
        
-       if($_GET['bmark']) {
+       if(x($_GET,'bmark')) {
                $bookmarked_active = 'active';
        }
 
-       if($_GET['conv']) {
+       if(x($_GET,'conv')) {
                $conv_active = 'active';
        }
 
-       if($_GET['spam']) {
+       if(x($_GET,'spam')) {
                $spam_active = 'active';
        }
 
@@ -164,38 +169,38 @@ function network_content(&$a, $update = 0) {
        $tabs = array(
                array(
                        'label' => t('Commented Order'),
-                       'url'=>$a->get_baseurl() . '/' . str_replace('/new', '', $a->cmd) . ((x($_GET,'cid')) ? '?f=&cid=' . $_GET['cid'] : ''), 
+                       'url'=>$a->get_baseurl(true) . '/' . str_replace('/new', '', $a->cmd) . ((x($_GET,'cid')) ? '?f=&cid=' . $_GET['cid'] : ''), 
                        'sel'=>$all_active,
                ),
                array(
                        'label' => t('Posted Order'),
-                       'url'=>$a->get_baseurl() . '/' . str_replace('/new', '', $a->cmd) . '?f=&order=post' . ((x($_GET,'cid')) ? '&cid=' . $_GET['cid'] : ''), 
+                       'url'=>$a->get_baseurl(true) . '/' . str_replace('/new', '', $a->cmd) . '?f=&order=post' . ((x($_GET,'cid')) ? '&cid=' . $_GET['cid'] : ''), 
                        'sel'=>$postord_active,
                ),
 
                array(
                        'label' => t('Personal'),
-                       'url' => $a->get_baseurl() . '/' . str_replace('/new', '', $a->cmd) . ((x($_GET,'cid')) ? '/?f=&cid=' . $_GET['cid'] : '') . '&conv=1',
+                       'url' => $a->get_baseurl(true) . '/' . str_replace('/new', '', $a->cmd) . ((x($_GET,'cid')) ? '/?f=&cid=' . $_GET['cid'] : '') . '&conv=1',
                        'sel' => $conv_active,
                ),
                array(
                        'label' => t('New'),
-                       'url' => $a->get_baseurl() . '/' . str_replace('/new', '', $a->cmd) . '/new' . ((x($_GET,'cid')) ? '/?f=&cid=' . $_GET['cid'] : ''),
+                       'url' => $a->get_baseurl(true) . '/' . str_replace('/new', '', $a->cmd) . '/new' . ((x($_GET,'cid')) ? '/?f=&cid=' . $_GET['cid'] : ''),
                        'sel' => $new_active,
                ),
                array(
                        'label' => t('Starred'),
-                       'url'=>$a->get_baseurl() . '/' . str_replace('/new', '', $a->cmd) . ((x($_GET,'cid')) ? '/?f=&cid=' . $_GET['cid'] : '') . '&star=1',
+                       'url'=>$a->get_baseurl(true) . '/' . str_replace('/new', '', $a->cmd) . ((x($_GET,'cid')) ? '/?f=&cid=' . $_GET['cid'] : '') . '&star=1',
                        'sel'=>$starred_active,
                ),
                array(
-                       'label' => t('Bookmarks'),
-                       'url'=>$a->get_baseurl() . '/' . str_replace('/new', '', $a->cmd) . ((x($_GET,'cid')) ? '/?f=&cid=' . $_GET['cid'] : '') . '&bmark=1',
+                       'label' => t('Shared Links'),
+                       'url'=>$a->get_baseurl(true) . '/' . str_replace('/new', '', $a->cmd) . ((x($_GET,'cid')) ? '/?f=&cid=' . $_GET['cid'] : '') . '&bmark=1',
                        'sel'=>$bookmarked_active,
                ),      
 //             array(
 //                     'label' => t('Spam'),
-//                     'url'=>$a->get_baseurl() . '/network?f=&spam=1'
+//                     'url'=>$a->get_baseurl(true) . '/network?f=&spam=1'
 //                     'sel'=> $spam_active,
 //             ),      
 
@@ -226,6 +231,7 @@ function network_content(&$a, $update = 0) {
        $nets = ((x($_GET,'nets')) ? $_GET['nets'] : '');
        $cmin = ((x($_GET,'cmin')) ? intval($_GET['cmin']) : 0);
        $cmax = ((x($_GET,'cmax')) ? intval($_GET['cmax']) : 99);
+       $file = ((x($_GET,'file')) ? $_GET['file'] : '');
 
        if(($a->argc > 2) && $a->argv[2] === 'new')
                $nouveau = true;
@@ -239,13 +245,13 @@ function network_content(&$a, $update = 0) {
                }
        }
 
-       if(x($_GET,'search'))
+       if(x($_GET,'search') || x($_GET,'file'))
                $nouveau = true;
        if($cid)
                $def_acl = array('allow_cid' => '<' . intval($cid) . '>');
 
        if(! $update) {
-               if(group) {
+               if($group) {
                        if(($t = group_public_members($group)) && (! get_pconfig(local_user(),'system','nowarn_insecure'))) {
                                notice( sprintf( tt('Warning: This group contains %s member from an insecure network.',
                                                                        'Warning: This group contains %s members from an insecure network.',
@@ -296,7 +302,7 @@ function network_content(&$a, $update = 0) {
                        if($update)
                                killme();
                        notice( t('No such group') . EOL );
-                       goaway($a->get_baseurl() . '/network');
+                       goaway($a->get_baseurl(true) . '/network');
                        // NOTREACHED
                }
 
@@ -328,7 +334,7 @@ function network_content(&$a, $update = 0) {
                }
                else {
                        notice( t('Invalid contact.') . EOL);
-                       goaway($a->get_baseurl() . '/network');
+                       goaway($a->get_baseurl(true) . '/network');
                        // NOTREACHED
                }
        }
@@ -358,6 +364,7 @@ function network_content(&$a, $update = 0) {
                        . ((x($_GET,'nets'))   ? '&nets='   . $_GET['nets']   : '') 
                        . ((x($_GET,'cmin'))   ? '&cmin='   . $_GET['cmin']   : '') 
                        . ((x($_GET,'cmax'))   ? '&cmax='   . $_GET['cmax']   : '') 
+                       . ((x($_GET,'file'))   ? '&file='   . $_GET['file']   : '') 
 
                        . "'; var profile_page = " . $a->pager['page'] . "; </script>\r\n";
        }
@@ -371,6 +378,9 @@ function network_content(&$a, $update = 0) {
                        dbesc('\\]' . preg_quote($search) . '\\[')
                );
        }
+       if(strlen($file)) {
+               $sql_extra .= file_tag_file_query('item',$file);
+       }
 
        if($conv) {
                $myurl = $a->get_baseurl() . '/profile/'. $a->user['nickname'];
@@ -491,7 +501,9 @@ function network_content(&$a, $update = 0) {
 
                        $items = conv_sort($items,$ordering);
 
-               }       
+               } else {
+                       $items = array();
+               }
        }
 
 
index 99031a1d59f0dee8a2050e08def1082dc0f1cf98..d478b51634a3f3bb1349d2e1709f398ad7497b8a 100755 (executable)
@@ -42,12 +42,12 @@ function notifications_post(&$a) {
                                        intval(local_user())
                                );
                        }
-                       goaway($a->get_baseurl() . '/notifications/intros');
+                       goaway($a->get_baseurl(true) . '/notifications/intros');
                }
                if($_POST['submit'] == t('Ignore')) {
                        $r = q("UPDATE `intro` SET `ignore` = 1 WHERE `id` = %d LIMIT 1",
                                intval($intro_id));
-                       goaway($a->get_baseurl() . '/notifications/intros');
+                       goaway($a->get_baseurl(true) . '/notifications/intros');
                }
        }
 }
@@ -69,32 +69,32 @@ function notifications_content(&$a) {
        $tabs = array(
                array(
                        'label' => t('System'),
-                       'url'=>$a->get_baseurl() . '/notifications/system',
+                       'url'=>$a->get_baseurl(true) . '/notifications/system',
                        'sel'=> (($a->argv[1] == 'system') ? 'active' : ''),
                ),
                array(
                        'label' => t('Network'),
-                       'url'=>$a->get_baseurl() . '/notifications/network',
+                       'url'=>$a->get_baseurl(true) . '/notifications/network',
                        'sel'=> (($a->argv[1] == 'network') ? 'active' : ''),
                ),
                array(
                        'label' => t('Personal'),
-                       'url'=>$a->get_baseurl() . '/notifications/personal',
+                       'url'=>$a->get_baseurl(true) . '/notifications/personal',
                        'sel'=> (($a->argv[1] == 'personal') ? 'active' : ''),
                ),
                array(
                        'label' => t('Home'),
-                       'url' => $a->get_baseurl() . '/notifications/home',
+                       'url' => $a->get_baseurl(true) . '/notifications/home',
                        'sel'=> (($a->argv[1] == 'home') ? 'active' : ''),
                ),
                array(
                        'label' => t('Introductions'),
-                       'url' => $a->get_baseurl() . '/notifications/intros',
+                       'url' => $a->get_baseurl(true) . '/notifications/intros',
                        'sel'=> (($a->argv[1] == 'intros') ? 'active' : ''),
                ),
                array(
                        'label' => t('Messages'),
-                       'url' => $a->get_baseurl() . '/message',
+                       'url' => $a->get_baseurl(true) . '/message',
                        'sel'=> '',
                ),
        );
@@ -244,7 +244,7 @@ function notifications_content(&$a) {
                                switch($it['verb']){
                                        case ACTIVITY_LIKE:
                                                $notif_content .= replace_macros($tpl_item_likes,array(
-                                                       '$item_link' => $a->get_baseurl().'/display/'.$a->user['nickname']."/".$it['parent'],
+                                                       '$item_link' => $a->get_baseurl(true).'/display/'.$a->user['nickname']."/".$it['parent'],
                                                        '$item_image' => $it['author-avatar'],
                                                        '$item_text' => sprintf( t("%s liked %s's post"), $it['author-name'], $it['pname']),
                                                        '$item_when' => relative_date($it['created'])
@@ -253,7 +253,7 @@ function notifications_content(&$a) {
                                                
                                        case ACTIVITY_DISLIKE:
                                                $notif_content .= replace_macros($tpl_item_dislikes,array(
-                                                       '$item_link' => $a->get_baseurl().'/display/'.$a->user['nickname']."/".$it['parent'],
+                                                       '$item_link' => $a->get_baseurl(true).'/display/'.$a->user['nickname']."/".$it['parent'],
                                                        '$item_image' => $it['author-avatar'],
                                                        '$item_text' => sprintf( t("%s disliked %s's post"), $it['author-name'], $it['pname']),
                                                        '$item_when' => relative_date($it['created'])
@@ -267,7 +267,7 @@ function notifications_content(&$a) {
                                                $it['fname'] = $obj->title;
                                                
                                                $notif_content .= replace_macros($tpl_item_friends,array(
-                                                       '$item_link' => $a->get_baseurl().'/display/'.$a->user['nickname']."/".$it['parent'],
+                                                       '$item_link' => $a->get_baseurl(true).'/display/'.$a->user['nickname']."/".$it['parent'],
                                                        '$item_image' => $it['author-avatar'],
                                                        '$item_text' => sprintf( t("%s is now friends with %s"), $it['author-name'], $it['fname']),
                                                        '$item_when' => relative_date($it['created'])
@@ -281,7 +281,7 @@ function notifications_content(&$a) {
                                                $tpl = (($it['id'] == $it['parent']) ? $tpl_item_posts : $tpl_item_comments);
 
                                                $notif_content .= replace_macros($tpl,array(
-                                                       '$item_link' => $a->get_baseurl().'/display/'.$a->user['nickname']."/".$it['parent'],
+                                                       '$item_link' => $a->get_baseurl(true).'/display/'.$a->user['nickname']."/".$it['parent'],
                                                        '$item_image' => $it['author-avatar'],
                                                        '$item_text' => $item_text,
                                                        '$item_when' => relative_date($it['created'])
@@ -314,7 +314,7 @@ function notifications_content(&$a) {
                if (count($r) > 0) {
                        foreach ($r as $it) {
                                $notif_content .= replace_macros($not_tpl,array(
-                                       '$item_link' => $a->get_baseurl().'/notify/view/'. $it['id'],
+                                       '$item_link' => $a->get_baseurl(true).'/notify/view/'. $it['id'],
                                        '$item_image' => $it['photo'],
                                        '$item_text' => strip_tags(bbcode($it['msg'])),
                                        '$item_when' => relative_date($it['date'])
@@ -334,7 +334,7 @@ function notifications_content(&$a) {
                
                $notif_tpl = get_markup_template('notifications.tpl');
                
-               $myurl = $a->get_baseurl() . '/profile/'. $a->user['nickname'];
+               $myurl = $a->get_baseurl(true) . '/profile/'. $a->user['nickname'];
                $myurl = substr($myurl,strpos($myurl,'://')+3);
                $myurl = str_replace(array('www.','.'),array('','\\.'),$myurl);
                $diasp_url = str_replace('/profile/','/u/',$myurl);
@@ -369,7 +369,7 @@ function notifications_content(&$a) {
                                switch($it['verb']){
                                        case ACTIVITY_LIKE:
                                                $notif_content .= replace_macros($tpl_item_likes,array(
-                                                       '$item_link' => $a->get_baseurl().'/display/'.$a->user['nickname']."/".$it['parent'],
+                                                       '$item_link' => $a->get_baseurl(true).'/display/'.$a->user['nickname']."/".$it['parent'],
                                                        '$item_image' => $it['author-avatar'],
                                                        '$item_text' => sprintf( t("%s liked %s's post"), $it['author-name'], $it['pname']),
                                                        '$item_when' => relative_date($it['created'])
@@ -378,7 +378,7 @@ function notifications_content(&$a) {
                                                
                                        case ACTIVITY_DISLIKE:
                                                $notif_content .= replace_macros($tpl_item_dislikes,array(
-                                                       '$item_link' => $a->get_baseurl().'/display/'.$a->user['nickname']."/".$it['parent'],
+                                                       '$item_link' => $a->get_baseurl(true).'/display/'.$a->user['nickname']."/".$it['parent'],
                                                        '$item_image' => $it['author-avatar'],
                                                        '$item_text' => sprintf( t("%s disliked %s's post"), $it['author-name'], $it['pname']),
                                                        '$item_when' => relative_date($it['created'])
@@ -392,7 +392,7 @@ function notifications_content(&$a) {
                                                $it['fname'] = $obj->title;
                                                
                                                $notif_content .= replace_macros($tpl_item_friends,array(
-                                                       '$item_link' => $a->get_baseurl().'/display/'.$a->user['nickname']."/".$it['parent'],
+                                                       '$item_link' => $a->get_baseurl(true).'/display/'.$a->user['nickname']."/".$it['parent'],
                                                        '$item_image' => $it['author-avatar'],
                                                        '$item_text' => sprintf( t("%s is now friends with %s"), $it['author-name'], $it['fname']),
                                                        '$item_when' => relative_date($it['created'])
@@ -406,7 +406,7 @@ function notifications_content(&$a) {
                                                $tpl = (($it['id'] == $it['parent']) ? $tpl_item_posts : $tpl_item_comments);
 
                                                $notif_content .= replace_macros($tpl,array(
-                                                       '$item_link' => $a->get_baseurl().'/display/'.$a->user['nickname']."/".$it['parent'],
+                                                       '$item_link' => $a->get_baseurl(true).'/display/'.$a->user['nickname']."/".$it['parent'],
                                                        '$item_image' => $it['author-avatar'],
                                                        '$item_text' => $item_text,
                                                        '$item_when' => relative_date($it['created'])
@@ -456,7 +456,7 @@ function notifications_content(&$a) {
                                switch($it['verb']){
                                        case ACTIVITY_LIKE:
                                                $notif_content .= replace_macros($tpl_item_likes,array(
-                                                       '$item_link' => $a->get_baseurl().'/display/'.$a->user['nickname']."/".$it['parent'],
+                                                       '$item_link' => $a->get_baseurl(true).'/display/'.$a->user['nickname']."/".$it['parent'],
                                                        '$item_image' => $it['author-avatar'],
                                                        '$item_text' => sprintf( t("%s liked %s's post"), $it['author-name'], $it['pname']),
                                                        '$item_when' => relative_date($it['created'])
@@ -465,7 +465,7 @@ function notifications_content(&$a) {
                                                break;
                                        case ACTIVITY_DISLIKE:
                                                $notif_content .= replace_macros($tpl_item_dislikes,array(
-                                                       '$item_link' => $a->get_baseurl().'/display/'.$a->user['nickname']."/".$it['parent'],
+                                                       '$item_link' => $a->get_baseurl(true).'/display/'.$a->user['nickname']."/".$it['parent'],
                                                        '$item_image' => $it['author-avatar'],
                                                        '$item_text' => sprintf( t("%s disliked %s's post"), $it['author-name'], $it['pname']),
                                                        '$item_when' => relative_date($it['created'])
@@ -479,7 +479,7 @@ function notifications_content(&$a) {
                                                $it['fname'] = $obj->title;
                                                
                                                $notif_content .= replace_macros($tpl_item_friends,array(
-                                                       '$item_link' => $a->get_baseurl().'/display/'.$a->user['nickname']."/".$it['parent'],
+                                                       '$item_link' => $a->get_baseurl(true).'/display/'.$a->user['nickname']."/".$it['parent'],
                                                        '$item_image' => $it['author-avatar'],
                                                        '$item_text' => sprintf( t("%s is now friends with %s"), $it['author-name'], $it['fname']),
                                                        '$item_when' => relative_date($it['created'])
@@ -488,7 +488,7 @@ function notifications_content(&$a) {
                                                break;
                                        default:
                                                $notif_content .= replace_macros($tpl_item_comments,array(
-                                                       '$item_link' => $a->get_baseurl().'/display/'.$a->user['nickname']."/".$it['parent'],
+                                                       '$item_link' => $a->get_baseurl(true).'/display/'.$a->user['nickname']."/".$it['parent'],
                                                        '$item_image' => $it['author-avatar'],
                                                        '$item_text' => sprintf( t("%s commented on %s's post"), $it['author-name'], $it['pname']),
                                                        '$item_when' => relative_date($it['created'])
index a572b15344269f8c4d0bcd9776c6c1cd8b696195..ae8273a1d3eda064c7a7b2f5697162e3955f018c 100644 (file)
@@ -20,7 +20,7 @@ function notify_init(&$a) {
                        goaway($r[0]['link']);
                }
 
-               goaway($a->get_baseurl());
+               goaway($a->get_baseurl(true));
        }
 
        if($a->argc > 2 && $a->argv[1] === 'mark' && $a->argv[2] === 'all' ) {
@@ -51,7 +51,7 @@ function notify_content(&$a) {
                if (count($r) > 0) {
                        foreach ($r as $it) {
                                $notif_content .= replace_macros($not_tpl,array(
-                                       '$item_link' => $a->get_baseurl().'/notify/view/'. $it['id'],
+                                       '$item_link' => $a->get_baseurl(true).'/notify/view/'. $it['id'],
                                        '$item_image' => $it['photo'],
                                        '$item_text' => strip_tags(bbcode($it['msg'])),
                                        '$item_when' => relative_date($it['date'])
index e0b378f685448a2ac95142bf25649e733e267319..27dac4d5d318565483a392f3a0a7170e2dae4868 100755 (executable)
@@ -188,7 +188,7 @@ function parse_url_content(&$a) {
 
        if(! $text) {
                logger('parsing meta');
-               $items = $domhead->getElementsByTagName('meta');
+               $items = (isset($domhead) && is_object($domhead) ? $domhead->getElementsByTagName('meta') : null);
                if($items) {
                        foreach($items as $item) {
                                $property = $item->getAttribute('property');
index 1a701f40773bcfc12d4ace04c620e906ffdc2640..428679ffc53e02f85f8bf573e4adb371c0557fe7 100755 (executable)
@@ -27,7 +27,7 @@ function profile_init(&$a) {
        profile_load($a,$which,$profile);
 
        if((x($a->profile,'page-flags')) && ($a->profile['page-flags'] == PAGE_COMMUNITY)) {
-               $a->page['htmlhead'] .= '<meta name="friendika.community" content="true" />';
+               $a->page['htmlhead'] .= '<meta name="friendica.community" content="true" />';
        }
        if(x($a->profile,'openidserver'))                               
                $a->page['htmlhead'] .= '<link rel="openid.server" href="' . $a->profile['openidserver'] . '" />' . "\r\n";
index e3dbdaf39c803006e4a609a67df47b6d59c08ac7..d1fd08eba68ed5fcb2f12c59d97c96fb8e194863 100755 (executable)
@@ -15,11 +15,13 @@ function profile_photo_init(&$a) {
 
 function profile_photo_post(&$a) {
 
-        if(! local_user()) {
-                notice ( t('Permission denied.') . EOL );
-                return;
-        }
-
+       if(! local_user()) {
+               notice ( t('Permission denied.') . EOL );
+               return;
+       }
+       
+       check_form_security_token_redirectOnErr('/profile_photo', 'profile_photo');
+        
        if((x($_POST,'cropfinal')) && ($_POST['cropfinal'] == 1)) {
 
                // phase 2 - we have finished cropping
@@ -148,7 +150,9 @@ function profile_photo_content(&$a) {
                        notice( t('Permission denied.') . EOL );
                        return;
                };
-                       
+               
+               check_form_security_token_redirectOnErr('/profile_photo', 'profile_photo');
+        
                $resource_id = $a->argv[2];
                //die(":".local_user());
                $r=q("SELECT * FROM `photo` WHERE `uid` = %d AND `resource-id` = '%s' ORDER BY `scale` ASC",
@@ -203,6 +207,7 @@ function profile_photo_content(&$a) {
                        '$lbl_upfile' => t('Upload File:'),
                        '$title' => t('Upload Profile Photo'),
                        '$submit' => t('Upload'),
+                       '$form_security_token' => get_form_security_token("profile_photo"),
                        '$select' => sprintf('%s %s', t('or'), ($newuser) ? '<a href="' . $a->get_baseurl() . '">' . t('skip this step') . '</a>' : '<a href="'. $a->get_baseurl() . '/photos/' . $a->user['nickname'] . '">' . t('select a photo from your photo albums') . '</a>')
                ));
 
@@ -218,6 +223,7 @@ function profile_photo_content(&$a) {
                        '$image_url' => $a->get_baseurl() . '/photo/' . $filename,
                        '$title' => t('Crop Image'),
                        '$desc' => t('Please adjust the image cropping for optimum viewing.'),
+                       '$form_security_token' => get_form_security_token("profile_photo"),
                        '$done' => t('Done Editing')
                ));
                return $o;
index ccd7d54741af192aed688c4449182d6d158aaf42..7b3b6ccc1eb5ea1451bcf361768c53f73f117379 100755 (executable)
@@ -21,6 +21,9 @@ function profiles_post(&$a) {
                        notice( t('Profile not found.') . EOL);
                        return;
                }
+               
+               check_form_security_token_redirectOnErr('/profiles', 'profile_edit');
+               
                $is_default = (($orig[0]['is-default']) ? 1 : 0);
 
                $profile_name = notags(trim($_POST['profile_name']));
@@ -237,9 +240,11 @@ function profiles_content(&$a) {
                );
                if(! count($r)) {
                        notice( t('Profile not found.') . EOL);
-                       goaway($a->get_baseurl() . '/profiles');
+                       goaway($a->get_baseurl(true) . '/profiles');
                        return; // NOTREACHED
                }
+               
+               check_form_security_token_redirectOnErr('/profiles', 'profile_drop', 't');
 
                // move every contact using this profile as their default to the user default
 
@@ -255,7 +260,7 @@ function profiles_content(&$a) {
                if($r)
                        info( t('Profile deleted.') . EOL);
 
-               goaway($a->get_baseurl() . '/profiles');
+               goaway($a->get_baseurl(true) . '/profiles');
                return; // NOTREACHED
        }
 
@@ -264,6 +269,8 @@ function profiles_content(&$a) {
 
 
        if(($a->argc > 1) && ($a->argv[1] === 'new')) {
+               
+               check_form_security_token_redirectOnErr('/profiles', 'profile_new', 't');
 
                $r0 = q("SELECT `id` FROM `profile` WHERE `uid` = %d",
                        intval(local_user()));
@@ -290,11 +297,14 @@ function profiles_content(&$a) {
 
                info( t('New profile created.') . EOL);
                if(count($r3) == 1)
-                       goaway($a->get_baseurl() . '/profiles/' . $r3[0]['id']);
-               goaway($a->get_baseurl() . '/profiles');
-       }                
+                       goaway($a->get_baseurl(true) . '/profiles/' . $r3[0]['id']);
+               
+               goaway($a->get_baseurl(true) . '/profiles');
+       } 
 
        if(($a->argc > 2) && ($a->argv[1] === 'clone')) {
+               
+               check_form_security_token_redirectOnErr('/profiles', 'profile_clone', 't');
 
                $r0 = q("SELECT `id` FROM `profile` WHERE `uid` = %d",
                        intval(local_user()));
@@ -329,10 +339,12 @@ function profiles_content(&$a) {
                );
                info( t('New profile created.') . EOL);
                if(count($r3) == 1)
-                       goaway($a->get_baseurl() . '/profiles/' . $r3[0]['id']);
-       goaway($a->get_baseurl() . '/profiles');
-       return; // NOTREACHED
-       }                
+                       goaway($a->get_baseurl(true) . '/profiles/' . $r3[0]['id']);
+               
+               goaway($a->get_baseurl(true) . '/profiles');
+               
+               return; // NOTREACHED
+       }
 
 
        if(($a->argc > 1) && (intval($a->argv[1]))) {
@@ -361,7 +373,7 @@ function profiles_content(&$a) {
                ));
 
 
-               $a->page['htmlhead'] .= replace_macros($tpl, array('$baseurl' => $a->get_baseurl()));
+               $a->page['htmlhead'] .= replace_macros($tpl, array('$baseurl' => $a->get_baseurl(true)));
                $a->page['htmlhead'] .= "<script type=\"text/javascript\" src=\"js/country.js\" ></script>";
 
                $f = get_config('system','birthday_input_format');
@@ -371,6 +383,9 @@ function profiles_content(&$a) {
                $is_default = (($r[0]['is-default']) ? 1 : 0);
                $tpl = get_markup_template("profile_edit.tpl");
                $o .= replace_macros($tpl,array(
+                       '$form_security_token' => get_form_security_token("profile_edit"),
+                       '$profile_clone_link' => 'profiles/clone/' . $r[0]['id'] . '?t=' . get_form_security_token("profile_clone"),
+                       '$profile_drop_link' => 'profiles/drop/' . $r[0]['id'] . '?t=' . get_form_security_token("profile_drop"),
                        '$banner' => t('Edit Profile Details'),
                        '$submit' => t('Submit'),
                        '$viewprof' => t('View this profile'),
@@ -410,7 +425,7 @@ function profiles_content(&$a) {
                        '$lbl_work' => t('Work/employment'),
                        '$lbl_school' => t('School/education'),
                        '$disabled' => (($is_default) ? 'onclick="return false;" style="color: #BBBBFF;"' : ''),
-                       '$baseurl' => $a->get_baseurl(),
+                       '$baseurl' => $a->get_baseurl(true),
                        '$profile_id' => $r[0]['id'],
                        '$profile_name' => $r[0]['profile-name'],
                        '$default' => (($is_default) ? '<p id="profile-edit-default-desc">' . t('This is your <strong>public</strong> profile.<br />It <strong>may</strong> be visible to anybody using the internet.') . '</p>' : ""),
@@ -460,7 +475,8 @@ function profiles_content(&$a) {
                        $o .= replace_macros($tpl_header,array(
                                '$header' => t('Edit/Manage Profiles'),
                                '$chg_photo' => t('Change profile photo'),
-                               '$cr_new' => t('Create New Profile')
+                               '$cr_new' => t('Create New Profile'),
+                               '$cr_new_link' => 'profiles/new?t=' . get_form_security_token("profile_new")
                        ));
 
 
@@ -473,7 +489,7 @@ function profiles_content(&$a) {
                                        '$alt' => t('Profile Image'),
                                        '$profile_name' => $rr['profile-name'],
                                        '$visible' => (($rr['is-default']) ? '<strong>' . t('visible to everybody') . '</strong>' 
-                                               : '<a href="' . $a->get_baseurl() . '/profperm/' . $rr['id'] . '" />' . t('Edit visibility') . '</a>')
+                                               : '<a href="' . $a->get_baseurl(true) . '/profperm/' . $rr['id'] . '" />' . t('Edit visibility') . '</a>')
                                ));
                        }
                }
index 2ef582fdfeec84b9f760a287716fd54208da98dd..f694b5840f088887819e37911b69b88828786094 100755 (executable)
@@ -53,16 +53,20 @@ function settings_post(&$a) {
        $old_page_flags = $a->user['page-flags'];
 
        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()."/settings/oauth/");
+               goaway($a->get_baseurl(true)."/settings/oauth/");
                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'] : '');
@@ -100,18 +104,23 @@ function settings_post(&$a) {
                                                local_user());
                        }
                }
-               goaway($a->get_baseurl()."/settings/oauth/");
+               goaway($a->get_baseurl(true)."/settings/oauth/");
                return;
        }
 
        if(($a->argc > 1) && ($a->argv[1] == 'addon')) {
+               check_form_security_token_redirectOnErr('/settings/addon', 'settings_addon');
+               
                call_hooks('plugin_settings_post', $_POST);
                return;
        }
 
        if(($a->argc > 1) && ($a->argv[1] == 'connectors')) {
-
-               if(x($_POST['imap-submit'])) {
+               
+               check_form_security_token_redirectOnErr('/settings/connectors', 'settings_connectors');
+               
+               if(x($_POST, 'imap-submit')) {
+                       
                        $mail_server       = ((x($_POST,'mail_server')) ? $_POST['mail_server'] : '');
                        $mail_port         = ((x($_POST,'mail_port')) ? $_POST['mail_port'] : '');
                        $mail_ssl          = ((x($_POST,'mail_ssl')) ? strtolower(trim($_POST['mail_ssl'])) : '');
@@ -185,7 +194,8 @@ function settings_post(&$a) {
                return;
        }
 
-
+       check_form_security_token_redirectOnErr('/settings', 'settings');
+       
        call_hooks('settings_post', $_POST);
 
        if((x($_POST,'npassword')) || (x($_POST,'confirm'))) {
@@ -401,7 +411,7 @@ function settings_post(&$a) {
 
        }
 
-       goaway($a->get_baseurl() . '/settings' );
+       goaway($a->get_baseurl(true) . '/settings' );
        return; // NOTREACHED
 }
                
@@ -425,27 +435,27 @@ function settings_content(&$a) {
        $tabs = array(
                array(
                        'label' => t('Account settings'),
-                       'url'   => $a->get_baseurl().'/settings',
+                       'url'   => $a->get_baseurl(true).'/settings',
                        'sel'   => (($a->argc == 1)?'active':''),
                ),      
                array(
                        'label' => t('Connector settings'),
-                       'url'   => $a->get_baseurl().'/settings/connectors',
+                       'url'   => $a->get_baseurl(true).'/settings/connectors',
                        'sel'   => (($a->argc > 1) && ($a->argv[1] === 'connectors')?'active':''),
                ),
                array(
                        'label' => t('Plugin settings'),
-                       'url'   => $a->get_baseurl().'/settings/addon',
+                       'url'   => $a->get_baseurl(true).'/settings/addon',
                        'sel'   => (($a->argc > 1) && ($a->argv[1] === 'addon')?'active':''),
                ),
                array(
                        'label' => t('Connections'),
-                       'url' => $a->get_baseurl() . '/settings/oauth',
+                       'url' => $a->get_baseurl(true) . '/settings/oauth',
                        'sel' => (($a->argc > 1) && ($a->argv[1] === 'oauth')?'active':''),
                ),
                array(
                        'label' => t('Export personal data'),
-                       'url' => $a->get_baseurl() . '/uexport',
+                       'url' => $a->get_baseurl(true) . '/uexport',
                        'sel' => ''
                )
        );
@@ -460,6 +470,7 @@ function settings_content(&$a) {
                if(($a->argc > 2) && ($a->argv[2] === 'add')) {
                        $tpl = get_markup_template("settings_oauth_edit.tpl");
                        $o .= replace_macros($tpl, array(
+                               '$form_security_token' => get_form_security_token("settings_oauth"),
                                '$tabs'         => $tabs,
                                '$title'        => t('Add application'),
                                '$submit'       => t('Submit'),
@@ -486,6 +497,7 @@ function settings_content(&$a) {
                        
                        $tpl = get_markup_template("settings_oauth_edit.tpl");
                        $o .= replace_macros($tpl, array(
+                               '$form_security_token' => get_form_security_token("settings_oauth"),
                                '$tabs'         => $tabs,
                                '$title'        => t('Add application'),
                                '$submit'       => t('Update'),
@@ -500,10 +512,12 @@ function settings_content(&$a) {
                }
                
                if(($a->argc > 3) && ($a->argv[2] === 'delete')) {
+                       check_form_security_token_redirectOnErr('/settings/oauth', 'settings_oauth', 't');
+               
                        $r = q("DELETE FROM clients WHERE client_id='%s' AND uid=%d",
                                        dbesc($a->argv[3]),
                                        local_user());
-                       goaway($a->get_baseurl()."/settings/oauth/");
+                       goaway($a->get_baseurl(true)."/settings/oauth/");
                        return;                 
                }
                
@@ -518,7 +532,8 @@ function settings_content(&$a) {
                
                $tpl = get_markup_template("settings_oauth.tpl");
                $o .= replace_macros($tpl, array(
-                       '$baseurl'      => $a->get_baseurl(),
+                       '$form_security_token' => get_form_security_token("settings_oauth"),
+                       '$baseurl'      => $a->get_baseurl(true),
                        '$title'        => t('Connected Apps'),
                        '$add'          => t('Add application'),
                        '$edit'         => t('Edit'),
@@ -544,6 +559,7 @@ function settings_content(&$a) {
                
                $tpl = get_markup_template("settings_addons.tpl");
                $o .= replace_macros($tpl, array(
+                       '$form_security_token' => get_form_security_token("settings_addon"),
                        '$title'        => t('Plugin Settings'),
                        '$tabs'         => $tabs,
                        '$settings_addons' => $settings_addons
@@ -586,28 +602,28 @@ function settings_content(&$a) {
 
        $tpl = get_markup_template("settings_connectors.tpl");
                $o .= replace_macros($tpl, array(
+                       '$form_security_token' => get_form_security_token("settings_connectors"),
+                       
                        '$title'        => t('Connector Settings'),
                        '$tabs'         => $tabs,
 
-               '$diasp_enabled' => $diasp_enabled,
-               '$ostat_enabled' => $ostat_enabled,
-
-               '$h_imap' => t('Email/Mailbox Setup'),
-               '$imap_desc' => t("If you wish to communicate with email contacts using this service \x28optional\x29, please specify how to connect to your mailbox."),
-               '$imap_lastcheck' => array('imap_lastcheck', t('Last successful email check:'), $mail_chk,''),
-               '$mail_disabled' => (($mail_disabled) ? t('Email access is disabled on this site.') : ''),
-               '$mail_server'  => array('mail_server',  t('IMAP server name:'), $mail_server, ''),
-               '$mail_port'    => array('mail_port',    t('IMAP port:'), $mail_port, ''),
-               '$mail_ssl'             => array('mail_ssl',     t('Security:'), strtoupper($mail_ssl), '', array( ''=>t('None'), 'TLS'=>'TLS', 'SSL'=>'SSL')),
-               '$mail_user'    => array('mail_user',    t('Email login name:'), $mail_user, ''),
-               '$mail_pass'    => array('mail_pass',    t('Email password:'), '', ''),
-               '$mail_replyto' => array('mail_replyto', t('Reply-to address:'), '', 'Optional'),
-               '$mail_pubmail' => array('mail_pubmail', t('Send public posts to all email contacts:'), $mail_pubmail, ''),
-               '$mail_action'  => array('mail_action',  t('Action after import:'), $mail_action, '', array(0=>t('None'), 1=>t('Delete'), 2=>t('Mark as seen'), 3=>t('Move to folder'))),
-               '$mail_movetofolder'    => array('mail_movetofolder',    t('Move to folder:'), $mail_movetofolder, ''),
-               '$submit' => t('Submit'),
-
-
+                       '$diasp_enabled' => $diasp_enabled,
+                       '$ostat_enabled' => $ostat_enabled,
+
+                       '$h_imap' => t('Email/Mailbox Setup'),
+                       '$imap_desc' => t("If you wish to communicate with email contacts using this service \x28optional\x29, please specify how to connect to your mailbox."),
+                       '$imap_lastcheck' => array('imap_lastcheck', t('Last successful email check:'), $mail_chk,''),
+                       '$mail_disabled' => (($mail_disabled) ? t('Email access is disabled on this site.') : ''),
+                       '$mail_server'  => array('mail_server',  t('IMAP server name:'), $mail_server, ''),
+                       '$mail_port'    => array('mail_port',    t('IMAP port:'), $mail_port, ''),
+                       '$mail_ssl'             => array('mail_ssl',     t('Security:'), strtoupper($mail_ssl), '', array( ''=>t('None'), 'TLS'=>'TLS', 'SSL'=>'SSL')),
+                       '$mail_user'    => array('mail_user',    t('Email login name:'), $mail_user, ''),
+                       '$mail_pass'    => array('mail_pass',    t('Email password:'), '', ''),
+                       '$mail_replyto' => array('mail_replyto', t('Reply-to address:'), '', 'Optional'),
+                       '$mail_pubmail' => array('mail_pubmail', t('Send public posts to all email contacts:'), $mail_pubmail, ''),
+                       '$mail_action'  => array('mail_action',  t('Action after import:'), $mail_action, '', array(0=>t('None'), 1=>t('Delete'), 2=>t('Mark as seen'), 3=>t('Move to folder'))),
+                       '$mail_movetofolder'    => array('mail_movetofolder',    t('Move to folder:'), $mail_movetofolder, ''),
+                       '$submit' => t('Submit'),
 
                        '$settings_connectors' => $settings_connectors
                ));
@@ -773,7 +789,7 @@ function settings_content(&$a) {
        $theme_selected = (!x($_SESSION,'theme')? $default_theme : $_SESSION['theme']);
 
 
-       $subdir = ((strlen($a->get_path())) ? '<br />' . t('or') . ' ' . $a->get_baseurl() . '/profile/' . $nickname : '');
+       $subdir = ((strlen($a->get_path())) ? '<br />' . t('or') . ' ' . $a->get_baseurl(true) . '/profile/' . $nickname : '');
 
        $tpl_addr = get_markup_template("settings_nick_set.tpl");
 
@@ -803,8 +819,9 @@ function settings_content(&$a) {
                '$ptitle'       => t('Account Settings'),
 
                '$submit'       => t('Submit'),
-               '$baseurl' => $a->get_baseurl(),
+               '$baseurl' => $a->get_baseurl(true),
                '$uid' => local_user(),
+               '$form_security_token' => get_form_security_token("settings"),
                
                '$nickname_block' => $prof_addr,
                
index f6c025e3cef29ea774c58bae14d341c94a18ec78..47bb851a4f3311ae1ff1ae54c7308f1b55190158 100755 (executable)
@@ -17,7 +17,7 @@ function share_init(&$a) {
        $o = '';
 
        if(local_user() && intval(get_pconfig(local_user(),'system','plaintext'))) {
-               $o .= '&#x2672; [url=' . $r[0]['author-link'] . ']' . $r[0]['author-name'] . '[/url]';
+               $o .= "\xE2\x99\xb2" . ' [url=' . $r[0]['author-link'] . ']' . $r[0]['author-name'] . '[/url]' . "\n";
                if($r[0]['title'])
                        $o .= '[b]' . $r[0]['title'] . '[/b]' . "\n";
                $o .= $r[0]['body'] . "\n";
diff --git a/tests/autoname_test.php b/tests/autoname_test.php
new file mode 100755 (executable)
index 0000000..9dae920
--- /dev/null
@@ -0,0 +1,73 @@
+<?php
+/**
+ * this file contains tests for the autoname function
+ * 
+ * @package test.util
+ */
+
+/** required, it is the file under test */
+require_once('include/text.php');
+
+/**
+ * TestCase for the autoname function
+ * 
+ * @author Alexander Kampmann
+ * @package test.util
+ */
+class AutonameTest extends PHPUnit_Framework_TestCase {
+       /**\r
+        *autonames should be random, even length\r
+        */\r
+       public function testAutonameEven() {\r
+               $autoname1=autoname(10);\r
+               $autoname2=autoname(10);\r
+       \r
+               $this->assertNotEquals($autoname1, $autoname2);\r
+       }\r
+       \r
+       /**\r
+        *autonames should be random, odd length\r
+        */\r
+       public function testAutonameOdd() {\r
+               $autoname1=autoname(9);\r
+               $autoname2=autoname(9);\r
+       \r
+               $this->assertNotEquals($autoname1, $autoname2);\r
+       }\r
+       \r
+       /**\r
+        * try to fail autonames\r
+        */\r
+       public function testAutonameNoLength() {\r
+               $autoname1=autoname(0);\r
+               $this->assertEquals(0, count($autoname1));\r
+       }\r
+       
+       /**
+        * try to fail it with invalid input
+        * 
+        * TODO: What's corect behaviour here? An exception?
+        */\r
+       public function testAutonameNegativeLength() {\r
+               $autoname1=autoname(-23);\r
+               $this->assertEquals(0, count($autoname1));\r
+       }\r
+       \r
+       //      public function testAutonameMaxLength() {\r
+       //              $autoname2=autoname(PHP_INT_MAX);\r
+       //              $this->assertEquals(PHP_INT_MAX, count($autoname2));\r
+       //      }\r
+       
+       /**
+        * test with a length, that may be too short
+        */\r
+       public function testAutonameLength1() {\r
+               $autoname1=autoname(1);\r
+               $this->assertEquals(1, count($autoname1));
+               
+               $autoname2=autoname(1);\r
+               $this->assertEquals(1, count($autoname2));
+               
+               $this->assertFalse($autoname1==$autoname2); \r
+       }
+}
\ No newline at end of file
diff --git a/tests/contains_attribute_test.php b/tests/contains_attribute_test.php
new file mode 100755 (executable)
index 0000000..b0bb06a
--- /dev/null
@@ -0,0 +1,51 @@
+<?php
+/**\r
+ * this test tests the contains_attribute function\r
+ *\r
+ * @package test.util\r
+ */\r
+\r
+/** required, it is the file under test */\r
+require_once('include/text.php');\r
+\r
+/**\r
+ * TestCase for the contains_attribute function\r
+ *\r
+ * @author Alexander Kampmann\r
+ * @package test.util\r
+ */\r
+class ContainsAttributeTest extends PHPUnit_Framework_TestCase {
+       /**\r
+        * test attribute contains\r
+        */\r
+       public function testAttributeContains1() {\r
+               $testAttr="class1 notclass2 class3";\r
+               $this->assertTrue(attribute_contains($testAttr, "class3"));\r
+               $this->assertFalse(attribute_contains($testAttr, "class2"));\r
+       }\r
+       \r
+       /**\r
+        * test attribute contains\r
+        */\r
+       public function testAttributeContains2() {\r
+               $testAttr="class1 not-class2 class3";\r
+               $this->assertTrue(attribute_contains($testAttr, "class3"));\r
+               $this->assertFalse(attribute_contains($testAttr, "class2"));\r
+       }\r
+       
+       /**
+        * test with empty input
+        */\r
+       public function testAttributeContainsEmpty() {\r
+               $testAttr="";\r
+               $this->assertFalse(attribute_contains($testAttr, "class2"));\r
+       }\r
+       
+       /**
+        * test input with special chars
+        */\r
+       public function testAttributeContainsSpecialChars() {\r
+               $testAttr="--... %\$ä() /(=?}";\r
+               $this->assertFalse(attribute_contains($testAttr, "class2"));\r
+       }
+}
\ No newline at end of file
diff --git a/tests/expand_acl_test.php b/tests/expand_acl_test.php
new file mode 100755 (executable)
index 0000000..b516a3f
--- /dev/null
@@ -0,0 +1,142 @@
+<?php
+/**
+ * this test tests the expand_acl function
+ *
+ * @package test.util
+ */
+
+/** required, it is the file under test */
+require_once('include/text.php');
+
+/**\r
+ * TestCase for the expand_acl function\r
+ *\r
+ * @author Alexander Kampmann\r
+ * @package test.util\r
+ */\r
+class ExpandAclTest extends PHPUnit_Framework_TestCase {
+       
+       /**\r
+        * test expand_acl, perfect input\r
+        */\r
+       public function testExpandAclNormal() {\r
+               $text='<1><2><3>';\r
+               $this->assertEquals(array(1, 2, 3), expand_acl($text));\r
+       }\r
+       
+       /**
+        * test with a big number
+        */\r
+       public function testExpandAclBigNumber() {\r
+               $text='<1><'.PHP_INT_MAX.'><15>';\r
+               $this->assertEquals(array(1, PHP_INT_MAX, 15), expand_acl($text));\r
+       }\r
+       
+       /**
+        * test with a string in it. 
+        * 
+        * TODO: is this valid input? Otherwise: should there be an exception?
+        */\r
+       public function testExpandAclString() {\r
+               $text="<1><279012><tt>"; \r
+               $this->assertEquals(array(1, 279012, 'tt'), expand_acl($text));\r
+       }\r
+       
+       /**
+        * test with a ' ' in it. 
+        * 
+        * TODO: is this valid input? Otherwise: should there be an exception?
+        */\r
+       public function testExpandAclSpace() {\r
+               $text="<1><279 012><32>"; \r
+               $this->assertEquals(array(1, "279 012", "32"), expand_acl($text));\r
+       }\r
+       
+       /**
+        * test empty input
+        */\r
+       public function testExpandAclEmpty() {\r
+               $text=""; \r
+               $this->assertEquals(array(), expand_acl($text));\r
+       }\r
+       
+       /**
+        * test invalid input, no < at all
+        * 
+        * TODO: should there be an exception?
+        */\r
+       public function testExpandAclNoBrackets() {\r
+               $text="According to documentation, that's invalid. "; //should be invalid\r
+               $this->assertEquals(array(), expand_acl($text));\r
+       }\r
+       
+       /**\r
+        * test invalid input, just open <\r
+        *\r
+        * TODO: should there be an exception?\r
+        */\r
+       public function testExpandAclJustOneBracket1() {\r
+               $text="<Another invalid string"; //should be invalid\r
+               $this->assertEquals(array(), expand_acl($text));\r
+       }\r
+       
+       /**\r
+        * test invalid input, just close >\r
+        *\r
+        * TODO: should there be an exception?\r
+        */\r
+       public function testExpandAclJustOneBracket2() {\r
+               $text="Another invalid> string"; //should be invalid\r
+               $this->assertEquals(array(), expand_acl($text));\r
+       }\r
+       
+       /**\r
+        * test invalid input, just close >\r
+        *\r
+        * TODO: should there be an exception?\r
+        */\r
+       public function testExpandAclCloseOnly() {\r
+               $text="Another> invalid> string>"; //should be invalid\r
+               $this->assertEquals(array(), expand_acl($text));\r
+       }\r
+       
+       /**\r
+        * test invalid input, just open <\r
+        *\r
+        * TODO: should there be an exception?\r
+        */\r
+       public function testExpandAclOpenOnly() {\r
+               $text="<Another< invalid string<"; //should be invalid\r
+               $this->assertEquals(array(), expand_acl($text));\r
+       }\r
+       
+       /**\r
+        * test invalid input, open and close do not match\r
+        *\r
+        * TODO: should there be an exception?\r
+        */\r
+       public function testExpandAclNoMatching1() {\r
+               $text="<Another<> invalid <string>"; //should be invalid\r
+               $this->assertEquals(array(), expand_acl($text));\r
+       }\r
+       
+       /**\r
+        * test invalid input, open and close do not match\r
+        *\r
+        * TODO: should there be an exception?\r
+        */\r
+       public function testExpandAclNoMatching2() {\r
+               $text="<1>2><3>";\r
+               $this->assertEquals(array(), expand_acl($text));\r
+       }
+       
+       /**\r
+        * test invalid input, empty <>\r
+        *\r
+        * TODO: should there be an exception? Or array(1, 3)\r
+        */\r
+       public function testExpandAclEmptyMatch() {\r
+               $text="<1><><3>";\r
+               $this->assertEquals(array(), expand_acl($text));\r
+       }
+}
\ No newline at end of file
diff --git a/tests/get_tags_test.php b/tests/get_tags_test.php
new file mode 100644 (file)
index 0000000..9051923
--- /dev/null
@@ -0,0 +1,313 @@
+<?php
+/**
+ * This file contains the tests for get_tags and the tag handling in item.php
+ * 
+ * @package test.util
+ */
+
+/**
+ * required, because it contains the get_tags() function
+ */
+require_once 'include/text.php';
+/**
+ * required, because it contains the tag handling
+ */
+require_once 'mod/item.php';
+
+/**
+ * A class which can be used as replacement for an app if
+ * only get_baseurl is used. 
+ * 
+ * @author Alexander Kampmann
+ * @package test.util
+ */
+class MockApp {
+       function get_baseurl() {
+               return "baseurl"; 
+       }
+}; 
+
+/**
+ * the test should not rely on a database, 
+ * so this is a replacement for the database access method q. 
+ * 
+ * It simulates the user with uid 11 has one contact, named Mike Lastname. 
+ * 
+ * @param string $sql
+ */
+function q($sql) {
+       $result=array(array('id'=>15, 
+                       'attag'=>'', 'network'=>'dfrn', 
+                       'name'=>'Mike Lastname', 'alias'=>'Mike', 
+                       'nick'=>'Mike', 'url'=>"http://justatest.de")); 
+       
+       $args=func_get_args(); 
+
+       //last parameter is always (in this test) uid, so, it should be 11
+       if($args[count($args)-1]!=11) {
+               return; 
+       }
+       
+       
+       if(3==count($args)) {
+               //first call in handle_body, id only
+               if($result[0]['id']==$args[1]) {
+                       return $result; 
+               }
+               //second call in handle_body, name
+               if($result[0]['name']===$args[1]) {\r
+                       return $result;\r
+               }
+       }
+       //third call in handle_body, nick or attag
+       if($result[0]['nick']===$args[2] || $result[0]['attag']===$args[1]) {\r
+               return $result;\r
+       }
+}
+
+/**
+ * replacement for dbesc. 
+ * I don't want to test dbesc here, so
+ * I just return the input. It won't be a problem, because 
+ * the test does not use a real database. 
+ * 
+ * DON'T USE HAT FUNCTION OUTSIDE A TEST!
+ * 
+ * @param string $str
+ * @return input
+ */
+function dbesc($str) {
+       return $str; 
+}
+
+/**
+ * TestCase for tag handling. 
+ * 
+ * @author alexander
+ * @package test.util
+ */
+class GetTagsTest extends PHPUnit_Framework_TestCase {
+       /** the mock to use as app */
+       private $a; \r
+
+       /**
+        * initialize the test. That's a phpUnit function, 
+        * don't change its name.
+        */\r
+       public function setUp() {\r
+               $this->a=new MockApp(); 
+       }
+
+       /**\r
+        * test with one Person tag\r
+        */\r
+       public function testGetTagsShortPerson() {\r
+               $text="hi @Mike";\r
+\r
+               $tags=get_tags($text);\r
+
+               $inform=''; 
+               $str_tags='';
+               foreach($tags as $tag) {
+                       handle_tag($this->a, $text, $inform, $str_tags, 11, $tag);
+               }
+
+               //correct tags found?
+               $this->assertEquals(1, count($tags)); \r
+               $this->assertTrue(in_array("@Mike", $tags));
+               
+               //correct output from handle_tag?
+               $this->assertEquals("cid:15", $inform); 
+               $this->assertEquals("@[url=http://justatest.de]Mike Lastname[/url]", $str_tags);
+               $this->assertEquals("hi @[url=http://justatest.de]Mike Lastname[/url]", $text);\r
+       }
+       
+       /**\r
+        * test with one Person tag. 
+        * There's a minor spelling mistake...\r
+        */\r
+       public function testGetTagsShortPersonSpelling() {\r
+               $text="hi @Mike.because";\r
+       \r
+               $tags=get_tags($text);\r
+       
+               //correct tags found?\r
+               $this->assertEquals(1, count($tags));\r
+               $this->assertTrue(in_array("@Mike.because", $tags));
+               \r
+               $inform='';\r
+               $str_tags='';\r
+               handle_tag($this->a, $text, $inform, $str_tags, 11, $tags[0]);\r
+       \r
+               $this->assertEquals("cid:15", $inform); 
+               $this->assertEquals("@[url=http://justatest.de]Mike Lastname[/url]", $str_tags);
+               $this->assertEquals("hi @[url=http://justatest.de]Mike Lastname[/url].because", $text);\r
+       }
+       
+       /**\r
+        * test with two Person tags. 
+        * There's a minor spelling mistake...\r
+        */\r
+       public function testGetTagsPerson2Spelling() {\r
+               $text="hi @Mike@campino@friendica.eu";\r
+       \r
+               $tags=get_tags($text);\r
+       
+               $this->assertEquals(2, count($tags)); \r
+               $this->assertTrue(in_array("@Mike", $tags));
+               $this->assertTrue(in_array("@campino@friendica.eu", $tags));\r
+       }\r
+
+       /**
+        * Test with one hash tag.
+        */\r
+       public function testGetTagsShortTag() {\r
+               $text="This is a #test_case";\r
+\r
+               $tags=get_tags($text);\r
+
+               $this->assertEquals(1, count($tags));\r
+               $this->assertTrue(in_array("#test_case", $tags));\r
+       }\r
+
+       /**
+        * test with a person and a hash tag
+        */\r
+       public function testGetTagsShortTagAndPerson() {\r
+               $text="hi @Mike This is a #test_case";\r
+\r
+               $tags=get_tags($text);\r
+
+               $this->assertEquals(3, count($tags));
+               $this->assertTrue(in_array("@Mike", $tags));
+               $this->assertTrue(in_array("@Mike This", $tags));\r
+               $this->assertTrue(in_array("#test_case", $tags));\r
+
+               $inform='';
+               $str_tags='';
+               foreach($tags as $tag) {
+                       handle_tag($this->a, $text, $inform, $str_tags, 11, $tag);
+               }
+               \r
+               $this->assertEquals("cid:15", $inform); 
+               $this->assertEquals("@[url=http://justatest.de]Mike Lastname[/url],#[url=baseurl/search?search=test%20case]test case[/url]", $str_tags);
+               $this->assertEquals("hi @[url=http://justatest.de]Mike Lastname[/url] This is a #[url=baseurl/search?search=test%20case]test case[/url]", $text); 
+               \r
+       }\r
+
+       /**
+        * test with a person, a hash tag and some special chars.
+        */\r
+       public function testGetTagsShortTagAndPersonSpecialChars() {\r
+               $text="hi @Mike, This is a #test_case.";\r
+\r
+               $tags=get_tags($text);\r
+\r
+               $this->assertEquals(2, count($tags));
+               $this->assertTrue(in_array("@Mike", $tags));
+               $this->assertTrue(in_array("#test_case", $tags));\r
+       }\r
+
+       /**
+        * Test with a person tag and text behind it.
+        */\r
+       public function testGetTagsPersonOnly() {\r
+               $text="@Test I saw the Theme Dev group was created.";\r
+\r
+               $tags=get_tags($text);\r
+
+               $this->assertEquals(2, count($tags));\r
+               $this->assertTrue(in_array("@Test I", $tags));
+               $this->assertTrue(in_array("@Test", $tags));\r
+       }\r
+
+       /**
+        * this test demonstrates strange behaviour by intval. 
+        * It makes the next test fail. 
+        */
+       public function testIntval() {
+               $this->assertEquals(15, intval("15 it")); 
+       }
+       
+       /**
+        * test a tag with an id in it
+        */
+       public function testIdTag() {
+               $text="Test with @mike+15 id tag"; 
+               
+               $tags=get_tags($text); 
+               
+               $this->assertEquals(2, count($tags)); 
+               $this->assertTrue(in_array("@mike+15", $tags));
+               
+               //happens right now, but it shouldn't be necessary
+               $this->assertTrue(in_array("@mike+15 id", $tags));
+               
+               $inform='';\r
+               $str_tags='';
+               foreach($tags as $tag) {
+                       handle_tag($this->a, $text, $inform, $str_tags, 11, $tag);
+               }
+               
+               $this->assertEquals("Test with @[url=http://justatest.de]Mike Lastname[/url] id tag", $text);\r
+               $this->assertEquals("@[url=http://justatest.de]Mike Lastname[/url]", $str_tags);\r
+               $this->assertEquals("cid:15", $inform);
+       }
+       
+       /**
+        * test with two persons and one special tag.
+        */\r
+       public function testGetTags2Persons1TagSpecialChars() {\r
+               $text="hi @Mike, I'm just writing #test_cases, so"\r
+               ." so @somebody@friendica.com may change #things.";\r
+\r
+               $tags=get_tags($text);\r
+
+               $this->assertEquals(5, count($tags));\r
+               $this->assertTrue(in_array("@Mike", $tags));\r
+               $this->assertTrue(in_array("#test_cases", $tags));
+               $this->assertTrue(in_array("@somebody@friendica.com", $tags));\r
+               $this->assertTrue(in_array("@somebody@friendica.com may", $tags));\r
+               $this->assertTrue(in_array("#things", $tags));\r
+       }\r
+
+       /**
+        * test with a long text.
+        */\r
+       public function testGetTags() {\r
+               $text="hi @Mike, I'm just writing #test_cases, "\r
+               ." so @somebody@friendica.com may change #things. Of course I "\r
+               ."look for a lot of #pitfalls, like #tags at the end of a sentence "\r
+               ."@comment. I hope noone forgets about @fullstops.because that might"\r
+               ." break #things. @Mike@campino@friendica.eu is also #nice, isn't it? "\r
+               ."Now, add a @first_last tag. ";\r
+               \r
+               $tags=get_tags($text);\r
+\r
+               $this->assertTrue(in_array("@Mike", $tags));\r
+               $this->assertTrue(in_array("#test_cases", $tags));\r
+               $this->assertTrue(in_array("@somebody@friendica.com", $tags));\r
+               $this->assertTrue(in_array("#things", $tags));\r
+               $this->assertTrue(in_array("#pitfalls", $tags));\r
+               $this->assertTrue(in_array("#tags", $tags));\r
+               $this->assertTrue(in_array("@comment", $tags));\r
+               $this->assertTrue(in_array("@fullstops.because", $tags));\r
+               $this->assertTrue(in_array("#things", $tags));\r
+               $this->assertTrue(in_array("@Mike", $tags));\r
+               $this->assertTrue(in_array("#nice", $tags));\r
+               $this->assertTrue(in_array("@first_last", $tags));
+               
+               //right now, none of the is matched
+               $this->assertFalse(in_array("@Mike@campino@friendica.eu", $tags));\r
+               $this->assertTrue(in_array("@campino@friendica.eu", $tags));
+               $this->assertTrue(in_array("@campino@friendica.eu is", $tags));\r
+       }\r
+
+       /**
+        * test with an empty string
+        */\r
+       public function testGetTagsEmpty() {\r
+               $tags=get_tags("");\r
+               $this->assertEquals(0, count($tags));\r
+       }
+}
\ No newline at end of file
diff --git a/tests/xss_filter_test.php b/tests/xss_filter_test.php
new file mode 100644 (file)
index 0000000..d7dcf04
--- /dev/null
@@ -0,0 +1,50 @@
+<?php
+/**
+ * tests several functions which are used to prevent xss attacks
+ * 
+ * @package test.util
+ */
+
+require_once('include/text.php');
+
+class AntiXSSTest extends PHPUnit_Framework_TestCase {
+
+       /**
+        * test, that tags are escaped
+        */
+       public function testEscapeTags() {
+               $invalidstring='<submit type="button" onclick="alert(\'failed!\');" />';
+
+               $validstring=notags($invalidstring);
+               $escapedString=escape_tags($invalidstring);
+
+               $this->assertEquals('[submit type="button" onclick="alert(\'failed!\');" /]', $validstring);
+               $this->assertEquals("&lt;submit type=&quot;button&quot; onclick=&quot;alert('failed!');&quot; /&gt;", $escapedString);
+       }
+
+       /**
+        *xmlify and unxmlify
+        */
+       public function testXmlify() {
+               $text="<tag>I want to break\n this!11!<?hard?></tag>";
+               $xml=xmlify($text); //test whether it actually may be part of a xml document
+               $retext=unxmlify($text);
+
+               $this->assertEquals($text, $retext);
+       }
+
+       /**
+        * test hex2bin and reverse
+        */
+       public function testHex2Bin() {
+               $this->assertEquals(-3, hex2bin(bin2hex(-3)));
+               $this->assertEquals(0, hex2bin(bin2hex(0)));
+               $this->assertEquals(12, hex2bin(bin2hex(12)));
+               $this->assertEquals(PHP_INT_MAX, hex2bin(bin2hex(PHP_INT_MAX)));
+       }
+
+       //function qp, quick and dirty??
+       //get_mentions
+       //get_contact_block, bis Zeile 538
+}
+?>
index a6177324aced4fc9cd19a3f2237d6b23f18c4d14..35620e80b756dda2e84594a9304a540896a9f9a6 100755 (executable)
@@ -26,7 +26,7 @@ echo "New DB VERSION: " . DB_UPDATE_VERSION . "\n";
 
 if($build != DB_UPDATE_VERSION) {
        echo "Updating database...";
-       check_config();
+       check_config($a);
        echo "Done\n";
 }
 
index 9a122984546080450117655176e396a4623db839..01fe893c6551b8966294391da86340b4757bc1f9 100755 (executable)
@@ -7,6 +7,7 @@
        {{ inc field_textarea.tpl with $field=$banner }}{{ endinc }}
        {{ inc field_select.tpl with $field=$language }}{{ endinc }}
        {{ inc field_select.tpl with $field=$theme }}{{ endinc }}
+       {{ inc field_select.tpl with $field=$ssl_policy }}{{ endinc }}
        
        <div class="submit"><input type="submit" name="page_site" value="$submit" /></div>
        
index 204fcf2475abca9d1172b1217513a8315b9c2710..2958397c924543abbed726219af3d27654d25113 100755 (executable)
@@ -7,8 +7,15 @@ $page_desc<br />
 <li><a href="http://friendica.com" title="$friendica">$friendica</a></li>
 <li><a href="http://joindiaspora.com" title="$diaspora">$diaspora</a> $diasnote</li>
 <li><a href="http://ostatus.org" title="$public_net" >$statusnet</a></li>
+<li>$emailnet</li>
 </ul>
 </p>
+<p>
+$invite_desc
+</p>
+<p>
+$desc
+</p>
 
 <form action="dfrn_request/$nickname" method="post" />
 
index c9c0f84de16ce4c5290e972465769967e4168535..b484d15bf7f2fb3f81b549ce7a150b2a56966e9f 100755 (executable)
@@ -40,6 +40,7 @@ $desc
 </script>
 
 <form action="profile_photo/$resource" id="crop-image-form" method="post" />
+<input type='hidden' name='form_security_token' value='$form_security_token'>
 
 <input type="hidden" name="cropfinal" value="1" />
 <input type="hidden" name="xstart" id="x1" />
index 3f9176cd7be9821ee6781d3287dba1bd74202c46..5438a1c9fc2719f0fbd5499517b198709419d990 100755 (executable)
@@ -4,23 +4,23 @@ function string_plural_select_de($n){
        return ($n != 1);
 }
 ;
-$a->strings["Post successful."] = "Beitrag erfolgreich veröffentlicht.";
+$a->strings["Post successful."] = "Beitrag erfolgreich ver�ffentlicht.";
 $a->strings["[Embedded content - reload page to view]"] = "[Eingebetteter Inhalt - Seite neu laden zum Betrachten]";
 $a->strings["Contact settings applied."] = "Einstellungen zum Kontakt angewandt.";
 $a->strings["Contact update failed."] = "Konnte den Kontakt nicht aktualisieren.";
 $a->strings["Permission denied."] = "Zugriff verweigert.";
 $a->strings["Contact not found."] = "Kontakt nicht gefunden.";
 $a->strings["Repair Contact Settings"] = "Kontakt-Einstellungen reparieren";
-$a->strings["<strong>WARNING: This is highly advanced</strong> and if you enter incorrect information your communications with this contact may stop working."] = "<strong>ACHTUNG: Das sind Experten-Einstellungen!</strong> Wenn Du etwas Falsches eingibst, funktioniert die Kommunikation mit diesem Kontakt evtl. nicht mehr.";
-$a->strings["Please use your browser 'Back' button <strong>now</strong> if you are uncertain what to do on this page."] = "Bitte nutze den Zurück-Button deines Browsers <strong>jetzt</strong>, wenn du dir unsicher bist, was du tun willst.";
-$a->strings["Return to contact editor"] = "Zurück zum Kontakteditor";
+$a->strings["<strong>WARNING: This is highly advanced</strong> and if you enter incorrect information your communications with this contact may stop working."] = "<strong>ACHTUNG: Das sind Experten-Einstellungen!</strong> Wenn Du etwas falsches eingibst, funktioniert die Kommunikation mit diesem Kontakt evtl. nicht mehr.";
+$a->strings["Please use your browser 'Back' button <strong>now</strong> if you are uncertain what to do on this page."] = "Bitte nutze den Zur�ck-Button deines Browsers <strong>jetzt</strong>, wenn du dir unsicher bist, was auf dieser Seite gemacht wird.";
+$a->strings["Return to contact editor"] = "Zur�ck zum Kontakteditor";
 $a->strings["Name"] = "Name";
 $a->strings["Account Nickname"] = "Account-Spitzname";
-$a->strings["@Tagname - overrides Name/Nickname"] = "@Tagname - Ã¼berschreibt Name/Spitzname";
+$a->strings["@Tagname - overrides Name/Nickname"] = "@Tagname - ï¿½berschreibt Name/Spitzname";
 $a->strings["Account URL"] = "Account-URL";
-$a->strings["Friend Request URL"] = "URL für Freundschaftsanfragen";
-$a->strings["Friend Confirm URL"] = "URL für Bestätigungen von Freundschaftsanfragen";
-$a->strings["Notification Endpoint URL"] = "URL-Endpunkt für Benachrichtigungen";
+$a->strings["Friend Request URL"] = "URL f�r Freundschaftsanfragen";
+$a->strings["Friend Confirm URL"] = "URL f�r Best�tigungen von Freundschaftsanfragen";
+$a->strings["Notification Endpoint URL"] = "URL-Endpunkt f�r Benachrichtigungen";
 $a->strings["Poll/Feed URL"] = "Pull/Feed-URL";
 $a->strings["New photo from this URL"] = "Neues Foto von dieser URL";
 $a->strings["Submit"] = "Senden";
@@ -28,7 +28,7 @@ $a->strings["Help:"] = "Hilfe:";
 $a->strings["Help"] = "Hilfe";
 $a->strings["Not Found"] = "Nicht gefunden";
 $a->strings["Page not found."] = "Seite nicht gefunden.";
-$a->strings["File exceeds size limit of %d"] = "Die Datei ist größer als das erlaubte Limit von %d";
+$a->strings["File exceeds size limit of %d"] = "Die Datei ist gr��er als das erlaubte Limit von %d";
 $a->strings["File upload failed."] = "Hochladen der Datei fehlgeschlagen.";
 $a->strings["Friend suggestion sent."] = "Kontaktvorschlag gesendet.";
 $a->strings["Suggest Friends"] = "Kontakte vorschlagen";
@@ -40,7 +40,7 @@ $a->strings["link to source"] = "Link zum Originalbeitrag";
 $a->strings["Events"] = "Veranstaltungen";
 $a->strings["Create New Event"] = "Neue Veranstaltung erstellen";
 $a->strings["Previous"] = "Vorherige";
-$a->strings["Next"] = "Nächste";
+$a->strings["Next"] = "N�chste";
 $a->strings["hour:minute"] = "Stunde:Minute";
 $a->strings["Event details"] = "Veranstaltungsdetails";
 $a->strings["Format is %s %s. Starting date and Description are required."] = "Format ist %s %s. Anfangsdatum und Beschreibung sind notwendig.";
index cd98a4daabe9bf5a46f590011f74f34c6a4ec251..d8aa8b18188ddfd7d9ec21bfcc00e24db1428042 100755 (executable)
@@ -7,7 +7,11 @@ $page_desc<br />
 <li><a href="http://friendica.com" title="$friendica">$friendica</a></li>
 <li><a href="http://joindiaspora.com" title="$diaspora">$diaspora</a> $diasnote</li>
 <li><a href="http://ostatus.org" title="$public_net" >$statusnet</a></li>
+<li>$emailnet</li>
 </ul>
+$invite_desc
+</p>
+<p>
 $desc
 </p>
 
diff --git a/view/fileas_widget.tpl b/view/fileas_widget.tpl
new file mode 100755 (executable)
index 0000000..54fba74
--- /dev/null
@@ -0,0 +1,12 @@
+<div id="fileas-sidebar" class="widget">
+       <h3>$title</h3>
+       <div id="nets-desc">$desc</div>
+       
+       <ul class="fileas-ul">
+               <li class="tool"><a href="$base" class="fileas-link fileas-all{{ if $sel_all }} fileas-selected{{ endif }}">$all</a></li>
+               {{ for $terms as $term }}
+                       <li class="tool"><a href="$base?f=&file=$term.name" class="fileas-link{{ if $term.selected }} fileas-selected{{ endif }}">$term.name</a></li>
+               {{ endfor }}
+       </ul>
+       
+</div>
index d6b172b6af8c28e75af10cbf84ee2f2483cf3ac0..88df73494fef3c54d71d9726fa0b6de1bd5a9ea0 100755 (executable)
@@ -262,6 +262,18 @@ function enableOnUser(){
                }
        }
 
+       function itemFiler(id) {
+               reply = prompt("$fileas");
+               if(reply && reply.length) {
+                       commentBusy = true;
+                       $('body').css('cursor', 'wait');
+                       $.get('filer/' + id + '?term=' + reply);
+                       if(timer) clearTimeout(timer);
+                       timer = setTimeout(NavUpdate,3000);
+                       liking = 1;
+               }
+       }
+
        function jotClearLocation() {
                $('#jot-coord').val('');
                $('#profile-nolocation-wrapper').hide();
index 5349fa3d836876f186e1f1398723e178c735a399..4cbbb162400a76789950a012982153e2f2277ebd 100755 (executable)
@@ -1,5 +1,5 @@
 
-<form action="" method="post" >
+<form action="$dest_url" method="post" >
        <input type="hidden" name="auth-params" value="login" />
 
        <div id="login_standard">
index 6a84a5bbcf58ae49f676c1c9f0de5c97cebf66c8..efc971df8491a2c59d4e01c5add95f2e6c90c549 100755 (executable)
@@ -1,4 +1,4 @@
-<form action="" method="post" >
+<form action="$dest_url" method="post" >
 <div class="logout-wrapper">
 <input type="hidden" name="auth-params" value="logout" />
 <input type="submit" name="submit" id="logout-button" value="$logout" />
index 8dab72649222d04a003010712c5af405e8910a32..e5c7162d03946f723c8f0620df6bb21e89338692 100755 (executable)
@@ -5,9 +5,9 @@ $default
 <div id="profile-edit-links">
 <ul>
 <li><a href="profile/$profile_id/view?tab=profile" id="profile-edit-view-link" title="$viewprof">$viewprof</a></li>
-<li><a href="profiles/clone/$profile_id" id="profile-edit-clone-link" title="$cr_prof">$cl_prof</a></li>
+<li><a href="$profile_clone_link" id="profile-edit-clone-link" title="$cr_prof">$cl_prof</a></li>
 <li></li>
-<li><a href="profiles/drop/$profile_id" id="profile-edit-drop-link" title="$del_prof" $disabled >$del_prof</a></li>
+<li><a href="$profile_drop_link" id="profile-edit-drop-link" title="$del_prof" $disabled >$del_prof</a></li>
 
 </ul>
 </div>
@@ -17,6 +17,7 @@ $default
 
 <div id="profile-edit-wrapper" >
 <form id="profile-edit-form" name="form1" action="profiles/$profile_id" method="post" >
+<input type='hidden' name='form_security_token' value='$form_security_token'>
 
 <div id="profile-edit-profile-name-wrapper" >
 <label id="profile-edit-profile-name-label" for="profile-edit-profile-name" >$lbl_profname </label>
index 09e4fc9b24cb0b50c66a1217d73c4aa5c4b4215f..61a27379292bb14991271e35ee1c6145f6b24e6f 100755 (executable)
@@ -3,6 +3,6 @@
 <a href="profile_photo" >$chg_photo</a>
 </p>
 <div id="profile-listing-new-link-wrapper" class="button" >
-<a href="profiles/new" id="profile-listing-new-link" title="$cr_new" >$cr_new</a>
+<a href="$cr_new_link" id="profile-listing-new-link" title="$cr_new" >$cr_new</a>
 </div>
 
index f258b5b86dc85fac6be1bef54a73af7d692cec81..0b3a1cac17f82038c637df84ca971100c390fcff 100755 (executable)
@@ -1,6 +1,7 @@
 <h1>$title</h1>
 
 <form enctype="multipart/form-data" action="profile_photo" method="post">
+<input type='hidden' name='form_security_token' value='$form_security_token'>
 
 <div id="profile-photo-upload-wrapper">
 <label id="profile-photo-upload-label" for="profile-photo-upload">$lbl_upfile </label>
index 5bcbfd0b02e147aa32b81f2c86988fbc14d0dd09..7cd02f16486eb38ea54f5bbe54408fc1982936ef 100755 (executable)
@@ -18,8 +18,8 @@
                        </div>
                {{ endif }}
        </div>
-                               
-       
+
+
        {{ if $pdesc }}<div class="title">$profile.pdesc</div>{{ endif }}
        <div id="profile-photo-wrapper"><img class="photo" width="175" height="175" src="$profile.photo?rev=$profile.picdate" alt="$profile.name" /></div>
 
index 46c737b23a70986b418eeb1a77db2fabfe6d2f91..25479b5bff8f4ef26c5ff8d1a17063db7d5c848a 100755 (executable)
@@ -5,7 +5,7 @@ $tabs
 $nickname_block
 
 <form action="settings" id="settings-form" method="post" autocomplete="off" >
-
+<input type='hidden' name='form_security_token' value='$form_security_token'>
 
 <h3 class="settings-heading">$h_pass</h3>
 
index 2cbfd17e92af79c4ede727d39961a7dd0214fcfb..28fca53620a0e9e254cdc4778a953c7b38b044a9 100755 (executable)
@@ -4,6 +4,7 @@ $tabs
 
 
 <form action="settings/addon" method="post" autocomplete="off">
+<input type='hidden' name='form_security_token' value='$form_security_token'>
 
 $settings_addons
 
index 9493c8bf7795d24e904ec44925944694023b0f31..43c0346bba7dc5e726c36ceaca4dd327a10594ab 100755 (executable)
@@ -6,6 +6,7 @@ $tabs
 <div class="connector_statusmsg">$ostat_enabled</div>
 
 <form action="settings/connectors" method="post" autocomplete="off">
+<input type='hidden' name='form_security_token' value='$form_security_token'>
 
 $settings_connectors
 
index 0de0dbe98ac19937e870f7858064c8b61721b5db..da1398ab9656eb694b3f352ec8b37b6a58a03560 100755 (executable)
@@ -4,7 +4,8 @@ $tabs
 
 
 <form action="settings/oauth" method="post" autocomplete="off">
-       
+<input type='hidden' name='form_security_token' value='$form_security_token'>
+
        <div id="profile-edit-links">
                <ul>
                        <li>
@@ -24,7 +25,7 @@ $tabs
                {{ endif }}
                {{ if $app.my }}
                <a href="$baseurl/settings/oauth/edit/$app.client_id" class="icon s22 edit" title="$edit">&nbsp;</a>
-               <a href="$baseurl/settings/oauth/delete/$app.client_id" class="icon s22 delete" title="$delete">&nbsp;</a>
+               <a href="$baseurl/settings/oauth/delete/$app.client_id?t=$form_security_token" class="icon s22 delete" title="$delete">&nbsp;</a>
                {{ endif }}             
        </div>
        {{ endfor }}
index 98b7457aa42b2895a1bf9556ad94efec61d9e7d2..d293413867700aff64d9537c5cf9872f387e7ed4 100755 (executable)
@@ -3,6 +3,8 @@ $tabs
 <h1>$title</h1>
 
 <form method="POST">
+<input type='hidden' name='form_security_token' value='$form_security_token'>
+
 {{ inc field_input.tpl with $field=$name }}{{ endinc }}
 {{ inc field_input.tpl with $field=$key }}{{ endinc }}
 {{ inc field_input.tpl with $field=$secret }}{{ endinc }}
index 326c98bbdaa0f70426ef9d17c144437db96d7d4d..053730c21addff7f97963c0ae0f6dc14ebc72543 100755 (executable)
@@ -1,4 +1,22 @@
 <?php
+
+/*
+ * Name: Dark Bubble
+ * Version: 1.0
+ * Maintainer: Mike Macgirvin <mike@macgirvin.com>
+ */
+
+
 $a->theme_info = array(
   'extends' => 'testbubble',
 );
+
+
+$a->page['htmlhead'] .= <<< EOT
+<script>
+$(document).ready(function() {
+
+$('html').click(function() { $("#nav-notifications-menu" ).hide(); });
+});
+</script>
+EOT;
index 521b1859e985087f412f8e03510259c86f20945c..2d3e4fd56e266219c637a50296adf730a90dc6e0 100755 (executable)
@@ -15,6 +15,8 @@ $a->page['htmlhead'] .= <<< EOT
 <script>
 $(document).ready(function() {
 
+$('html').click(function() { $("#nav-notifications-menu" ).hide(); });
+
 $('.group-edit-icon').hover(
        function() {
                $(this).addClass('icon'); $(this).removeClass('iconspacer');},
index 839d862a18575c7fe423cb480bd3bad7aacdaa8c..8c4d3e9ac34f729a417ab0a81887d66e2d0f0a13 100755 (executable)
@@ -16,6 +16,8 @@ $a->page['htmlhead'] .= <<< EOT
 <script>
 $(document).ready(function() {
 
+$('html').click(function() { $("#nav-notifications-menu" ).hide(); });
+
 $('.group-edit-icon').hover(
        function() {
                $(this).addClass('icon'); $(this).removeClass('iconspacer');},
diff --git a/view/theme/diabook-blue/experimental b/view/theme/diabook-blue/experimental
deleted file mode 100755 (executable)
index e69de29..0000000
diff --git a/view/theme/diabook-blue/group_side.tpl b/view/theme/diabook-blue/group_side.tpl
new file mode 100755 (executable)
index 0000000..af183d0
--- /dev/null
@@ -0,0 +1,29 @@
+<div id="group-sidebar" class="widget">
+       <div class="title tool">
+               <h3 class="label">$title</h3>
+               <a href="group/new" title="$createtext" class="action"><span class="icon text s16 add"></span></a>
+       </div>
+
+       <div id="sidebar-group-list">
+               <ul>
+                       {{ for $groups as $group }}
+                       <li class="tool  {{ if $group.selected }}selected{{ endif }}">
+                               <a href="$group.href" class="label">
+                                       $group.text
+                               </a>
+                               {{ if $group.edit }}
+                                       <a href="$group.edit.href" class="action"><span class="icon text s10 edit"></span></a>
+                               {{ endif }}
+                               {{ if $group.cid }}
+                                       <input type="checkbox" 
+                                               class="{{ if $group.selected }}ticked{{ else }}unticked {{ endif }} action" 
+                                               onclick="contactgroupChangeMember('$group.id','$group.cid');return true;"
+                                               {{ if $group.ismember }}checked="checked"{{ endif }}
+                                       />
+                               {{ endif }}
+                       </li>
+                       {{ endfor }}
+               </ul>
+       </div>
+</div> 
+
diff --git a/view/theme/diabook-blue/icons/isstar.png b/view/theme/diabook-blue/icons/isstar.png
deleted file mode 100644 (file)
index c955b25..0000000
Binary files a/view/theme/diabook-blue/icons/isstar.png and /dev/null differ
diff --git a/view/theme/diabook-blue/icons/next.png b/view/theme/diabook-blue/icons/next.png
new file mode 100755 (executable)
index 0000000..7b5e25b
Binary files /dev/null and b/view/theme/diabook-blue/icons/next.png differ
diff --git a/view/theme/diabook-blue/icons/prev.png b/view/theme/diabook-blue/icons/prev.png
new file mode 100755 (executable)
index 0000000..55c1464
Binary files /dev/null and b/view/theme/diabook-blue/icons/prev.png differ
old mode 100755 (executable)
new mode 100644 (file)
index 99490bc..0fcce4d
Binary files a/view/theme/diabook-blue/icons/toogle_off.png and b/view/theme/diabook-blue/icons/toogle_off.png differ
old mode 100755 (executable)
new mode 100644 (file)
index 81e8f91..79ce07f
Binary files a/view/theme/diabook-blue/icons/toogle_on.png and b/view/theme/diabook-blue/icons/toogle_on.png differ
diff --git a/view/theme/diabook-blue/icons/unglobe.png b/view/theme/diabook-blue/icons/unglobe.png
deleted file mode 100755 (executable)
index aa9b0e1..0000000
Binary files a/view/theme/diabook-blue/icons/unglobe.png and /dev/null differ
diff --git a/view/theme/diabook-blue/photo_view.tpl b/view/theme/diabook-blue/photo_view.tpl
new file mode 100755 (executable)
index 0000000..511fc73
--- /dev/null
@@ -0,0 +1,27 @@
+<div id="live-display"></div>
+<h3><a href="$album.0">$album.1</a></h3>
+
+<div id="photo-edit-link-wrap">
+{{ if $tools }}
+<a id="photo-edit-link" href="$tools.edit.0">$tools.edit.1</a>
+-
+<a id="photo-toprofile-link" href="$tools.profile.0">$tools.profile.1</a>
+{{ endif }}
+{{ if $lock }} - <img src="images/lock_icon.gif" class="lockview" alt="$lock" onclick="lockview(event,'photo$id');" /> {{ endif }}
+</div>
+
+<div id="photo-photo">
+       {{ if $prevlink }}<div id="photo-prev-link"><a href="$prevlink.0">$prevlink.1</a></div>{{ endif }}
+       <a href="$photo.href" class="lightbox" title="$photo.title"><img src="$photo.src" /></a>
+       {{ if $nextlink }}<div id="photo-next-link"><a href="$nextlink.0">$nextlink.1</a></div>{{ endif }}
+</div>
+
+<div id="photo-photo-end"></div>
+<div id="photo-caption" >$desc</div>
+{{ if $tags }}
+<div id="in-this-photo-text">$tags.0</div>
+<div id="in-this-photo">$tags.1</div>
+{{ endif }}
+{{ if $tags.2 }}<div id="tag-remove"><a href="$tags.2">$tags.3</a></div>{{ endif }}
+
+{{ if $edit }}$edit{{ endif }}
\ No newline at end of file
diff --git a/view/theme/diabook-blue/profile_side.tpl b/view/theme/diabook-blue/profile_side.tpl
new file mode 100644 (file)
index 0000000..01da55c
--- /dev/null
@@ -0,0 +1,20 @@
+<div id="profile_side">
+       <div id="ps-usernameicon">
+               <a href="$ps.usermenu.status.0" title="$userinfo.name">
+                       <img src="$userinfo.icon" id="ps-usericon" alt="$userinfo.name">
+               </a>
+               <a href="$ps.usermenu.status.0" id="ps-username" title="$userinfo.name">$userinfo.name</a>
+       </div>
+       
+<ul id="profile-side-menu" class="menu-profile-side">
+       <li id="profile-side-status" class="menu-profile-list"><a class="menu-profile-list-item" href="$ps.usermenu.status.0">$ps.usermenu.status.1</a></li>
+       <li id="profile-side-photos" class="menu-profile-list"><a class="menu-profile-list-item" href="$ps.usermenu.photos.0">$ps.usermenu.photos.1</a></li>
+       <li id="profile-side-events" class="menu-profile-list"><a class="menu-profile-list-item" href="$ps.usermenu.events.0">$ps.usermenu.events.1</a></li>
+       <li id="profile-side-notes" class="menu-profile-list"><a class="menu-profile-list-item" href="$ps.usermenu.notes.0">$ps.usermenu.notes.1</a></li>
+       <li id="profile-side-foren" class="menu-profile-list"><a class="menu-profile-list-item" href="http://dir.friendika.com/directory/forum" target="blanc">Public Groups</a></li>
+       <li id="profile-side-foren" class="menu-profile-list"><a class="menu-profile-list-item" href="$ps.usermenu.community.0">$ps.usermenu.community.1</a></li>
+</ul>
+
+</div>
+
+                               
\ No newline at end of file
index 51b173f2a93fc4df364a10baffb3c163972cecec..bdc79a350d4655e011812742840e1e1720fae353 100644 (file)
   background-image: url("../../../images/icons/10/edit.png");
 }
 .icon.s10.star {
-  background-image: url("../../../images/icons/10/star.png");
+  background-image: url("../../../images/star_dummy.png");
 }
 .icon.s10.menu {
   background-image: url("../../../images/icons/10/menu.png");
   background-image: url("../../../images/icons/16/edit.png");
 }*/
 .icon.s16.star {
-  background-image: url("../../../images/icons/16/star.png");
+  background-image: url("../../../images/star_dummy.png");
 }
 .icon.s16.menu {
   background-image: url("../../../images/icons/16/menu.png");
   background-image: url("../../../images/icons/22/edit.png");
 }
 .icon.s22.star {
-  background-image: url("../../../images/icons/22/star.png");
+  background-image: url("../../../images/star_dummy.png");
 }
 .icon.s22.menu {
   background-image: url("../../../images/icons/22/menu.png");
   background-image: url("../../../images/icons/48/edit.png");
 }
 .icon.s48.star {
-  background-image: url("../../../images/icons/48/star.png");
+  background-image: url("../../../images/star_dummy.png");
 }
 .icon.s48.menu {
   background-image: url("../../../images/icons/48/menu.png");
@@ -438,7 +438,7 @@ a:hover {
   clear: both;
 }
 .fakelink {
-  color: #3465A4;
+  color: #1872A2;
   /* color: #3e3e8c; */
   text-decoration: none;
   cursor: pointer;
@@ -461,7 +461,7 @@ code {
 }
 #panel {
   position: absolute;
-  width: 10em;
+  width: 12em;
   background: #ffffff;
   color: #2d2d2d;
   margin: 0px;
@@ -647,7 +647,7 @@ nav .nav-menu-icon {
   position: relative;
   height: 22px;
   padding: 5px;
-  margin: 0px 7px;
+  margin: 0px 5px;
   -moz-border-radius: 5px 5px 0 0;
   -webkit-border-radius: 5px 5px 0 0;
   border-radius: 5px 5px 0 0;
@@ -657,7 +657,7 @@ nav .nav-menu-icon:hover {
   position: relative;
   height: 22px;
   padding: 5px;
-  margin: 0px 7px;
+  margin: 0px 5px;
   -moz-border-radius: 5px 5px 0 0;
   -webkit-border-radius: 5px 5px 0 0;
   border-radius: 5px 5px 0 0;
@@ -716,21 +716,17 @@ nav #nav-user-linkmenu
 nav #nav-user-linkmenu{
        margin-right: 0px;
        }
-nav #nav-home-link{
+nav #nav-home-link, #nav-directory-link, #nav-apps-link{
        margin-left: 0px;
+       margin-right: 0px;
        font-weight: bold;
+       margin: 3px 5px;
        }
 nav #nav-directory-link{
-       margin-left: 0px;
-       margin-right: 0px;
-       font-weight: bold;
-       margin: 3px 15px;
+  margin-right: 0px;   
        }
-nav #nav-apps-link{
-       margin-left: 0px;
-       margin-right: 0px;
-       font-weight: bold;
-       margin: 3px 15px;
+nav #nav-home-link{
+  margin-left: 0px;    
        }
 nav #nav-help-link .menu-popup,
 nav #nav-search-link .menu-popup,
@@ -784,8 +780,6 @@ ul.menu-popup {
   margin: 0px;
   padding: 0px;
   list-style: none;
-  border: 1px solid #364e59;
-  border-top-color: transparent;
   z-index: 100000;
   -webkit-box-shadow: 0px 5px 10px rgba(0, 0, 0, 0.7);
   -moz-box-shadow: 0px 5px 10px rgba(0, 0, 0, 0.7);
@@ -878,6 +872,41 @@ ul.menu-popup .empty {
         padding: 7px 7px 0px 0px;
 }
 
+/*profile_side*/
+#profile_side {
+  margin-bottom: 30px;
+}
+#ps-usericon{
+       height: 25px    
+       }
+#ps-username{
+  font-size: 1.17em;
+  font-weight: bold;
+  vertical-align: top;
+  position: absolute;
+  padding-top: 4px;
+  padding-left: 5px;   
+       }
+#ps-username:hover{
+  text-decoration: none;       
+       }
+.menu-profile-side{
+       list-style: none;       
+  padding-left: 16px;
+  min-height: 16px;
+       }
+.menu-profile-list{
+  height: auto;
+  overflow: auto;
+  padding-top: 3px;
+  padding-bottom: 3px;
+       }
+.menu-profile-list:hover{
+       background: #EEE;
+       }
+.menu-profile-list-item:hover{ 
+       text-decoration: none;  
+   }
 /* aside */
 aside {
   display: table-cell;
@@ -974,6 +1003,10 @@ aside #side-peoplefind-url {
   widht: 55px;
   height: 55px;
 }
+#lost-password-link {
+  float: left;
+  margin-right: 20px;          
+       }
 /* widget */
 .widget {
   margin-bottom: 2em;
@@ -1048,6 +1081,12 @@ section {
   width: 800px;
   padding: 0px 0px 0px 12px;
 }
+body .pageheader{
+  text-align: center;
+  margin-top: 25px;
+  font-size: 0px;
+       }
+
 #id_username {
   width: 173px;        
        }
@@ -1063,7 +1102,8 @@ section {
    padding: 10px;
        text-align: center;
        font-size: 1.0em;
-       margin-top: 140%;
+       clear: both;
+       display: block;
 }      
 
 .tabs {
@@ -1306,14 +1346,14 @@ section {
 }
 .tag {
   /*background: url("../../../images/tag_b.png") repeat-x center left;*/
-  color: #3465A4;
+  color: #999;
   padding-left: 3px;
   font-size: 12px;
 }
 .tag a {
   padding-right: 5px;
   /*background: url("../../../images/tag.png") no-repeat center right;*/
-  color: #3465A4;
+  color: #999;
 }
 .wwto {
   position: absolute !important;
@@ -1616,7 +1656,7 @@ section {
     box-shadow: 0 1px 1px #CFCFCF;
 }
 .button.creation2 {
-    background-color: #33ACFF;
+    background-color: #1872A2;
     background-image: -moz-linear-gradient(center top , #66C1FF 0%, #0097FF 100%);
     border: 1px solid #777777;
     color: white;
@@ -1872,9 +1912,15 @@ ul.tabs li .active {
   float: left;
 }
 /* photo */
+.photo {
+box-shadow: 2px 2px 5px 0px #000000;
+margin: 2px 5px 2px 5px;
+max-height: 85%;
+max-width: 85%;
+}
 .lframe {
   float: left;
-  margin: 0px 10px 10px 0px;
+  /*margin: 0px 10px 10px 0px;*/
 }
 /* profile match wrapper */
 .profile-match-wrapper {
@@ -1988,10 +2034,24 @@ box-shadow: 1px 1px 5px 0;
 }
 
 #prvmail-submit {
-       float: left;
+       float: right;
        margin-top: 10px;
-       margin-right: 30px;
 }
+
+#prvmail-subject
+{
+background: none repeat scroll 0 0 #FFFFFF;
+border: 1px solid #CCCCCC;
+border-radius: 5px 5px 5px 5px;
+font-weight: bold;
+height: 20px;
+margin: 0 0 5px;
+vertical-align: middle;
+}
+#prvmail-form{
+ width: 597px; 
+       }
+       
 #prvmail-upload-wrapper,
 #prvmail-link-wrapper,
 #prvmail-rotator-wrapper {
@@ -2179,7 +2239,9 @@ a.mail-list-link {
         padding: 10px;
         float: left;
 }
-
+.lightbox{
+       float: left;
+       }
 #photo-photo {
         float: left;
 }
@@ -2298,8 +2360,36 @@ float: left;
 .contact-details {
   color: #999999;
 }
-
-.photo-top-image-wrapper {
+#side-bar-photos-albums{
+       margin-top: 15px;       
+       }
+.photo-top-photo, .photo-album-photo {
+  -webkit-border-radius: 5px 5px 0 0;
+  -moz-border-radius: 5px 5px 0 0;
+  border-radius: 5px 5px 0 0;
+}
+.photo-album-image-wrapper, .photo-top-image-wrapper {
+  float: left;
+   -moz-box-shadow: 0 0 5px #888;
+   -webkit-box-shadow: 0 0 5px #888;
+   box-shadow: 0 0 5px #888;
+  background-color: #EEE;
+   -webkit-border-radius: 5px;
+   -moz-border-radius: 5px;
+  border-radius: 5px;
+  padding-bottom: 20px;
+  position: relative;
+  margin: 0 10px 10px 0;
+}
+.photo-top-album-name {
+  position: absolute;
+  bottom: 0;
+  padding: 0 5px;
+}
+.photo-top-album-link{
+  color: #1872A2;
+       }
+/*.photo-top-image-wrapper {
         position: relative;
         float: left;
         margin-top: 15px;
@@ -2315,7 +2405,7 @@ float: left;
         padding: 0px 3px;
         padding-top: 0.5em;
         background-color: rgb(255, 255, 255);
-}
+}*/
 #photo-top-end {
         clear: both;
 }
index 0a20c9fbca22f52f7fb1f2238c527ee04263890f..9093ac2ca229abe9497a5ca3c19c77e27d817fc9 100755 (executable)
@@ -1,8 +1,8 @@
 <?php
 
 /*
- * Name: Diabook
- * Description: Diabook: report bugs and request here: http://pad.toktan.org/p/diabook or contact me : thomas_bierey@friendica.eu
+ * Name: Diabook-blue
+ * Description: Diabook-blue: report bugs and request here: http://pad.toktan.org/p/diabook or contact me : thomas_bierey@friendica.eu
  * Version: 
  * Author: 
  */
@@ -11,8 +11,46 @@ $a->theme_info = array(
   'extends' => 'diabook',
 );
 
+//profile_side
+
+
+
+$nav['usermenu']=array();
+$userinfo = null;
+
+if(local_user()) {
+       
+
+
+$r = q("SELECT micro FROM contact WHERE uid=%d AND self=1", intval($a->user['uid']));
+               
+$userinfo = array(
+                       'icon' => (count($r) ? $r[0]['micro']: $a->get_baseurl()."/images/default-profile-mm.jpg"),
+                       'name' => $a->user['username'],
+               );      
+       
+$ps['usermenu'][status] = Array('profile/' . $a->user['nickname'], t('Home'), "", t('Your posts and conversations'));
+$ps['usermenu'][profile] = Array('profile/' . $a->user['nickname']. '?tab=profile', t('Profile'), "", t('Your profile page'));
+$ps['usermenu'][photos] = Array('photos/' . $a->user['nickname'], t('Photos'), "", t('Your photos'));
+$ps['usermenu'][events] = Array('events/', t('Events'), "", t('Your events'));
+$ps['usermenu'][notes] = Array('notes/', t('Personal notes'), "", t('Your personal photos'));
+$ps['usermenu'][community] = Array('community/', t('Community'), "", "");
+
+if($is_url = preg_match ("/\bnetwork\b/i", $_SERVER['REQUEST_URI'])) {
+$tpl = get_markup_template('profile_side.tpl');
+
+$a->page['aside'] .= replace_macros($tpl, array(
+               '$userinfo' => $userinfo,
+               '$ps' => $ps,
+       ));
+}
+}
+
+//js scripts
 $a->page['htmlhead'] .= <<< EOT
+
 <script>
+
 //contacts
 $('html').click(function() {
  $('#nav-contacts-linkmenu').removeClass('selected');
@@ -62,5 +100,20 @@ $('html').click(function() {
  $('#nav-site-linkmenu').click(function(event){
      event.stopPropagation();
  });
-</script>
+ //appsmenu
+ $('html').click(function() {
+ $('#nav-apps-link').removeClass('selected');
+ document.getElementById( "nav-apps-menu" ).style.display = "none";
+ });
+
+ $('#nav-apps-link').click(function(event){
+     event.stopPropagation();
+ });
+ $(function() {
+       $('a.lightbox').fancybox(); // Select all links with lightbox class
+});
+
+ </script>
 EOT;
diff --git a/view/theme/diabook/experimental b/view/theme/diabook/experimental
deleted file mode 100755 (executable)
index e69de29..0000000
diff --git a/view/theme/diabook/group_side.tpl b/view/theme/diabook/group_side.tpl
new file mode 100755 (executable)
index 0000000..af183d0
--- /dev/null
@@ -0,0 +1,29 @@
+<div id="group-sidebar" class="widget">
+       <div class="title tool">
+               <h3 class="label">$title</h3>
+               <a href="group/new" title="$createtext" class="action"><span class="icon text s16 add"></span></a>
+       </div>
+
+       <div id="sidebar-group-list">
+               <ul>
+                       {{ for $groups as $group }}
+                       <li class="tool  {{ if $group.selected }}selected{{ endif }}">
+                               <a href="$group.href" class="label">
+                                       $group.text
+                               </a>
+                               {{ if $group.edit }}
+                                       <a href="$group.edit.href" class="action"><span class="icon text s10 edit"></span></a>
+                               {{ endif }}
+                               {{ if $group.cid }}
+                                       <input type="checkbox" 
+                                               class="{{ if $group.selected }}ticked{{ else }}unticked {{ endif }} action" 
+                                               onclick="contactgroupChangeMember('$group.id','$group.cid');return true;"
+                                               {{ if $group.ismember }}checked="checked"{{ endif }}
+                                       />
+                               {{ endif }}
+                       </li>
+                       {{ endfor }}
+               </ul>
+       </div>
+</div> 
+
diff --git a/view/theme/diabook/icons/isstar.png b/view/theme/diabook/icons/isstar.png
deleted file mode 100644 (file)
index c955b25..0000000
Binary files a/view/theme/diabook/icons/isstar.png and /dev/null differ
diff --git a/view/theme/diabook/icons/next.png b/view/theme/diabook/icons/next.png
new file mode 100755 (executable)
index 0000000..7b5e25b
Binary files /dev/null and b/view/theme/diabook/icons/next.png differ
diff --git a/view/theme/diabook/icons/prev.png b/view/theme/diabook/icons/prev.png
new file mode 100755 (executable)
index 0000000..55c1464
Binary files /dev/null and b/view/theme/diabook/icons/prev.png differ
old mode 100755 (executable)
new mode 100644 (file)
index 99490bc..0fcce4d
Binary files a/view/theme/diabook/icons/toogle_off.png and b/view/theme/diabook/icons/toogle_off.png differ
old mode 100755 (executable)
new mode 100644 (file)
index 81e8f91..79ce07f
Binary files a/view/theme/diabook/icons/toogle_on.png and b/view/theme/diabook/icons/toogle_on.png differ
diff --git a/view/theme/diabook/icons/unglobe.png b/view/theme/diabook/icons/unglobe.png
deleted file mode 100755 (executable)
index aa9b0e1..0000000
Binary files a/view/theme/diabook/icons/unglobe.png and /dev/null differ
index 8b32ebe6caf5f7c93e8a44c307530ec05832498c..5776b6cf753609a46b9ce314676eb8fb0a3e4468 100644 (file)
 </ul>
 
 
-<ul id="nav-notifications-template" style="display:none;" rel="template">
-       <li><a href="{0}"><img src="{1}">{2} <span class="notif-when">{3}</span></a></li>
-</ul>
-
 
 {#
 
diff --git a/view/theme/diabook/photo_view.tpl b/view/theme/diabook/photo_view.tpl
new file mode 100755 (executable)
index 0000000..511fc73
--- /dev/null
@@ -0,0 +1,27 @@
+<div id="live-display"></div>
+<h3><a href="$album.0">$album.1</a></h3>
+
+<div id="photo-edit-link-wrap">
+{{ if $tools }}
+<a id="photo-edit-link" href="$tools.edit.0">$tools.edit.1</a>
+-
+<a id="photo-toprofile-link" href="$tools.profile.0">$tools.profile.1</a>
+{{ endif }}
+{{ if $lock }} - <img src="images/lock_icon.gif" class="lockview" alt="$lock" onclick="lockview(event,'photo$id');" /> {{ endif }}
+</div>
+
+<div id="photo-photo">
+       {{ if $prevlink }}<div id="photo-prev-link"><a href="$prevlink.0">$prevlink.1</a></div>{{ endif }}
+       <a href="$photo.href" class="lightbox" title="$photo.title"><img src="$photo.src" /></a>
+       {{ if $nextlink }}<div id="photo-next-link"><a href="$nextlink.0">$nextlink.1</a></div>{{ endif }}
+</div>
+
+<div id="photo-photo-end"></div>
+<div id="photo-caption" >$desc</div>
+{{ if $tags }}
+<div id="in-this-photo-text">$tags.0</div>
+<div id="in-this-photo">$tags.1</div>
+{{ endif }}
+{{ if $tags.2 }}<div id="tag-remove"><a href="$tags.2">$tags.3</a></div>{{ endif }}
+
+{{ if $edit }}$edit{{ endif }}
\ No newline at end of file
diff --git a/view/theme/diabook/profile_side.tpl b/view/theme/diabook/profile_side.tpl
new file mode 100644 (file)
index 0000000..01da55c
--- /dev/null
@@ -0,0 +1,20 @@
+<div id="profile_side">
+       <div id="ps-usernameicon">
+               <a href="$ps.usermenu.status.0" title="$userinfo.name">
+                       <img src="$userinfo.icon" id="ps-usericon" alt="$userinfo.name">
+               </a>
+               <a href="$ps.usermenu.status.0" id="ps-username" title="$userinfo.name">$userinfo.name</a>
+       </div>
+       
+<ul id="profile-side-menu" class="menu-profile-side">
+       <li id="profile-side-status" class="menu-profile-list"><a class="menu-profile-list-item" href="$ps.usermenu.status.0">$ps.usermenu.status.1</a></li>
+       <li id="profile-side-photos" class="menu-profile-list"><a class="menu-profile-list-item" href="$ps.usermenu.photos.0">$ps.usermenu.photos.1</a></li>
+       <li id="profile-side-events" class="menu-profile-list"><a class="menu-profile-list-item" href="$ps.usermenu.events.0">$ps.usermenu.events.1</a></li>
+       <li id="profile-side-notes" class="menu-profile-list"><a class="menu-profile-list-item" href="$ps.usermenu.notes.0">$ps.usermenu.notes.1</a></li>
+       <li id="profile-side-foren" class="menu-profile-list"><a class="menu-profile-list-item" href="http://dir.friendika.com/directory/forum" target="blanc">Public Groups</a></li>
+       <li id="profile-side-foren" class="menu-profile-list"><a class="menu-profile-list-item" href="$ps.usermenu.community.0">$ps.usermenu.community.1</a></li>
+</ul>
+
+</div>
+
+                               
\ No newline at end of file
index c9be0111d5d7db290430c1e0ab3cbe65be1a8876..b7568631ff057c6f5af95c72503e8e609879d0ff 100644 (file)
 
 .icon.on             { background-image: url("../../../view/theme/diabook/icons/toogle_on.png"); background-repeat: no-repeat;}
 .icon.off            { background-image: url("../../../view/theme/diabook/icons/toogle_off.png"); background-repeat: no-repeat;}
-.prev           { background-position: -90px  -60px;}
-.next           { background-position: -110px -60px;}
+.icon.prev           { background-image: url("../../../view/theme/diabook/icons/prev.png"); background-repeat: no-repeat;}
+.icon.next           { background-image: url("../../../view/theme/diabook/icons/next.png"); background-repeat: no-repeat;}
 /*.tagged     { background-position: -130px -60px;}*/
 
 .attachtype {
   background-image: url("../../../images/icons/10/edit.png");
 }
 .icon.s10.star {
-  background-image: url("../../../images/icons/10/star.png");
+  background-image: url("../../../images/star_dummy.png");
 }
 .icon.s10.menu {
   background-image: url("../../../images/icons/10/menu.png");
   background-image: url("../../../images/icons/16/edit.png");
 }*/
 .icon.s16.star {
-  background-image: url("../../../images/icons/16/star.png");
+  background-image: url("../../../images/star_dummy.png");
 }
 .icon.s16.menu {
   background-image: url("../../../images/icons/16/menu.png");
   background-image: url("../../../images/icons/22/edit.png");
 }
 .icon.s22.star {
-  background-image: url("../../../images/icons/22/star.png");
+  background-image: url("../../../images/star_dummy.png");
 }
 .icon.s22.menu {
   background-image: url("../../../images/icons/22/menu.png");
   background-image: url("../../../images/icons/48/edit.png");
 }
 .icon.s48.star {
-  background-image: url("../../../images/icons/48/star.png");
+  background-image: url("../../../images/star_dummy.png");
 }
 .icon.s48.menu {
   background-image: url("../../../images/icons/48/menu.png");
@@ -400,6 +400,7 @@ body {
   margin: 50px auto auto;
   display: table;
 }
+
 h4 {
   font-size: 1.1em;
 }
@@ -461,7 +462,7 @@ code {
 }
 #panel {
   position: absolute;
-  width: 10em;
+  width: 12em;
   background: #ffffff;
   color: #2d2d2d;
   margin: 0px;
@@ -707,21 +708,17 @@ nav #nav-user-linkmenu
 nav #nav-user-linkmenu{
        margin-right: 0px;
        }
-nav #nav-home-link{
+nav #nav-home-link, #nav-directory-link, #nav-apps-link{
        margin-left: 0px;
+       margin-right: 0px;
        font-weight: bold;
+       margin: 3px 5px;
        }
 nav #nav-directory-link{
-       margin-left: 0px;
-       margin-right: 0px;
-       font-weight: bold;
-       margin: 3px 15px;
+  margin-right: 0px;   
        }
-nav #nav-apps-link{
-       margin-left: 0px;
-       margin-right: 0px;
-       font-weight: bold;
-       margin: 3px 15px;
+nav #nav-home-link{
+  margin-left: 0px;    
        }
 nav #nav-help-link .menu-popup,
 nav #nav-search-link .menu-popup,
@@ -775,8 +772,6 @@ ul.menu-popup {
   margin: 0px;
   padding: 0px;
   list-style: none;
-  border: 1px solid #364e59;
-  border-top-color: transparent;
   z-index: 100000;
   -webkit-box-shadow: 0px 5px 10px rgba(0, 0, 0, 0.7);
   -moz-box-shadow: 0px 5px 10px rgba(0, 0, 0, 0.7);
@@ -869,6 +864,43 @@ ul.menu-popup .empty {
         padding: 7px 7px 0px 0px;
 }
 
+/*profile_side*/
+#profile_side {
+  margin-bottom: 30px;
+}
+#ps-usericon{
+       height: 25px    
+       }
+#ps-username{
+  font-size: 1.17em;
+  font-weight: bold;
+  vertical-align: top;
+  position: absolute;
+  padding-top: 4px;
+  padding-left: 5px;   
+  color: #2D2D2D;
+       }
+#ps-username:hover{
+  text-decoration: none;       
+       }
+.menu-profile-side{
+       list-style: none;       
+  padding-left: 16px;
+  min-height: 16px;
+       }
+.menu-profile-list{
+  height: auto;
+  overflow: auto;
+  padding-top: 3px;
+  padding-bottom: 3px;
+       }
+.menu-profile-list:hover{
+       background: #EEE;
+       }
+.menu-profile-list-item:hover{ 
+       text-decoration: none;  
+   }
+
 /* aside */
 aside {
   display: table-cell;
@@ -879,6 +911,7 @@ aside {
   float: left;
   /* background: #F1F1F1; */
 }
+
 aside .vcard .fn {
   font-size: 18px;
   font-weight: bold;
@@ -965,6 +998,10 @@ aside #side-peoplefind-url {
   widht: 55px;
   height: 55px;
 }
+#lost-password-link {
+  float: left;
+  margin-right: 20px;  
+       }
 /* widget */
 .widget {
   margin-bottom: 2em;
@@ -1039,6 +1076,13 @@ section {
   width: 800px;
   padding: 0px 0px 0px 12px;
 }
+
+body .pageheader{
+  text-align: center;
+  margin-top: 25px;
+  font-size: 0px;
+       }
+
 #id_username {
   width: 173px;        
        }
@@ -1049,13 +1093,13 @@ section {
   width: 173px;        
        }
 #contact-edit-end {
-   
        }
 .pager {
    padding: 10px;
        text-align: center;
        font-size: 1.0em;
-       margin-top: 140%;
+       clear: both;
+       display: block;
 }      
 .tabs {
     
@@ -1861,7 +1905,6 @@ ul.tabs li .active {
 /* photo */
 .lframe {
   float: left;
-  margin: 0px 10px 10px 0px;
 }
 /* profile match wrapper */
 .profile-match-wrapper {
@@ -1975,10 +2018,22 @@ box-shadow: 1px 1px 5px 0;
 }
 
 #prvmail-submit {
-       float: left;
+       float: right;
        margin-top: 10px;
-       margin-right: 30px;
 }
+#prvmail-subject
+{
+background: none repeat scroll 0 0 #FFFFFF;
+border: 1px solid #CCCCCC;
+border-radius: 5px 5px 5px 5px;
+font-weight: bold;
+height: 20px;
+margin: 0 0 5px;
+vertical-align: middle;
+}
+#prvmail-form{
+ width: 597px; 
+       }
 #prvmail-upload-wrapper,
 #prvmail-link-wrapper,
 #prvmail-rotator-wrapper {
@@ -2166,14 +2221,25 @@ a.mail-list-link {
         padding: 10px;
         float: left;
 }
+.lightbox{
+       float: left;
+       }
 
 #photo-photo {
         float: left;
 }
 #photo-like-div .wall-item-like-buttons {
-       float: left;
-   margin-right: 10px;
+        float: left;
+    margin-right: 5px;
+    margin-top: 30px;
        }
+.comment-edit-text-empty {
+    margin: 10px 0 0;
+    width: 85%;
+}
+.comment-edit-photo {
+    margin: 10px 0 0;
+}
 .wall-item-like-buttons .icon.like {
 float: left;
 }
@@ -2286,7 +2352,36 @@ float: left;
   color: #999999;
 }
 
-.photo-top-image-wrapper {
+#side-bar-photos-albums{
+       margin-top: 15px;       
+       }
+.photo-top-photo, .photo-album-photo {
+  -webkit-border-radius: 5px 5px 0 0;
+  -moz-border-radius: 5px 5px 0 0;
+  border-radius: 5px 5px 0 0;
+}
+.photo-album-image-wrapper, .photo-top-image-wrapper {
+  float: left;
+   -moz-box-shadow: 0 0 5px #888;
+   -webkit-box-shadow: 0 0 5px #888;
+   box-shadow: 0 0 5px #888;
+  background-color: #EEE;
+   -webkit-border-radius: 5px;
+   -moz-border-radius: 5px;
+  border-radius: 5px;
+  padding-bottom: 20px;
+  position: relative;
+  margin: 0 10px 10px 0;
+}
+.photo-top-album-name {
+  position: absolute;
+  bottom: 0;
+  padding: 0 5px;
+}
+.photo-top-album-link{
+  color: #1872A2;
+       }
+/*.photo-top-image-wrapper {
         position: relative;
         float: left;
         margin-top: 15px;
@@ -2302,7 +2397,7 @@ float: left;
         padding: 0px 3px;
         padding-top: 0.5em;
         background-color: rgb(255, 255, 255);
-}
+}*/
 #photo-top-end {
         clear: both;
 }
@@ -2315,5 +2410,4 @@ float: left;
 #photos-upload-newalbum-div {
         float: left;
         width: 175px;
-}
-
+}
\ No newline at end of file
index 5a1828ad75e26d062ea11f0299f02f4050607b49..9093ac2ca229abe9497a5ca3c19c77e27d817fc9 100755 (executable)
@@ -1,8 +1,8 @@
 <?php
 
 /*
- * Name: Diabook
- * Description: Diabook: report bugs and request here: http://pad.toktan.org/p/diabook or contact me : thomas_bierey@friendica.eu
+ * Name: Diabook-blue
+ * Description: Diabook-blue: report bugs and request here: http://pad.toktan.org/p/diabook or contact me : thomas_bierey@friendica.eu
  * Version: 
  * Author: 
  */
@@ -11,7 +11,44 @@ $a->theme_info = array(
   'extends' => 'diabook',
 );
 
+//profile_side
+
+
+
+$nav['usermenu']=array();
+$userinfo = null;
+
+if(local_user()) {
+       
+
+
+$r = q("SELECT micro FROM contact WHERE uid=%d AND self=1", intval($a->user['uid']));
+               
+$userinfo = array(
+                       'icon' => (count($r) ? $r[0]['micro']: $a->get_baseurl()."/images/default-profile-mm.jpg"),
+                       'name' => $a->user['username'],
+               );      
+       
+$ps['usermenu'][status] = Array('profile/' . $a->user['nickname'], t('Home'), "", t('Your posts and conversations'));
+$ps['usermenu'][profile] = Array('profile/' . $a->user['nickname']. '?tab=profile', t('Profile'), "", t('Your profile page'));
+$ps['usermenu'][photos] = Array('photos/' . $a->user['nickname'], t('Photos'), "", t('Your photos'));
+$ps['usermenu'][events] = Array('events/', t('Events'), "", t('Your events'));
+$ps['usermenu'][notes] = Array('notes/', t('Personal notes'), "", t('Your personal photos'));
+$ps['usermenu'][community] = Array('community/', t('Community'), "", "");
+
+if($is_url = preg_match ("/\bnetwork\b/i", $_SERVER['REQUEST_URI'])) {
+$tpl = get_markup_template('profile_side.tpl');
+
+$a->page['aside'] .= replace_macros($tpl, array(
+               '$userinfo' => $userinfo,
+               '$ps' => $ps,
+       ));
+}
+}
+
+//js scripts
 $a->page['htmlhead'] .= <<< EOT
+
 <script>
 
 //contacts
@@ -63,5 +100,20 @@ $('html').click(function() {
  $('#nav-site-linkmenu').click(function(event){
      event.stopPropagation();
  });
-</script> 
+ //appsmenu
+ $('html').click(function() {
+ $('#nav-apps-link').removeClass('selected');
+ document.getElementById( "nav-apps-menu" ).style.display = "none";
+ });
+
+ $('#nav-apps-link').click(function(event){
+     event.stopPropagation();
+ });
+ $(function() {
+       $('a.lightbox').fancybox(); // Select all links with lightbox class
+});
+
+ </script>
 EOT;
index fbf354b47566cf1184155d5093e0e42accd7d88c..04968bd07d2206eedcbe121190ee7a67b9b16d16 100644 (file)
        </div>
        <div class="contact-entry-photo-end" ></div>
                <div class="contact-entry-name" id="contact-entry-name-$contact.id" >$contact.name</div>
+{{ if $contact.alt_text }}<div class="contact-entry-details" id="contact-entry-rel-$contact.id" >$contact.alt_text</div>{{ endif }}
        <div class="contact-entry-details" id="contact-entry-url-$contact.id" >
                <a href="$contact.itemurl" title="$contact.itemurl">Profile URL</a></div>
        <div class="contact-entry-details" id="contact-entry-network-$contact.id" >$contact.network</div>
 
        <div class="contact-entry-end" ></div>
 </div>
+
index 516d70d5b4c1a1ac24c5a3b1b0c28b3dc04b3f1b..10ecec2e8536c22ae944b5c010ca6b38364b3a7c 100644 (file)
@@ -1,5 +1,5 @@
-<div class="widget" id="group-sidebar">
-<h3>$title</h3>
+<div id="group-sidebar" class="widget">
+<h3 class="label">$title</h3>
 
 <div id="sidebar-group-list">
        <ul id="sidebar-group-ul">
@@ -9,7 +9,7 @@
                                {{ if $group.edit }}
                                        <a 
                         class="groupsideedit"
-                        href="$group.edit.href" title="$edittext"><span class="icon small-pencil"></span></a>
+                        href="$group.edit.href" title="$group.edit.title"><span class="icon small-pencil"></span></a>
                                {{ endif }}
                                {{ if $group.cid }}
                                        <input type="checkbox" 
index 793af6fd2dbd93ecc2771f9899f848ed15da0d0e..f606f2f7e2dde6a0bdff17a11e9a9c4e19f1a4bf 100644 (file)
                }
        }
 
-    $(document).ready(function() {
-        function toggleToolbar() {
-            if ( $('#nav-floater').is(':visible') ) {
-                $('#nav-floater').slideUp('fast');
-                $('.floaterflip').css({
-                    backgroundPosition: '-210px -60px' 
-                });
-            } else {
-                $('#nav-floater').slideDown('fast');
-                $('.floaterflip').css({
-                    backgroundPosition: '-190px -60px'
-                });
-            }
-        };
-        $('.floaterflip').click(function() {
-            toggleToolbar();
-            return false;
-        });
-    });
 
 </script>
 
index f99ec29ee211b6ab448ed3502134dae0f109a623..648811373a41b2328cd76eb596adf0a02a15187a 100644 (file)
Binary files a/view/theme/dispy-dark/icons.png and b/view/theme/dispy-dark/icons.png differ
index 05a00d93c4e69246ecced20d1357fb741cf92c48..10f8cc667dd1655d80e80fe7edd790a5c0df9ec1 100644 (file)
@@ -51,9 +51,9 @@
      borderopacity="1.0"
      inkscape:pageopacity="0"
      inkscape:pageshadow="2"
-     inkscape:zoom="1.9403009"
-     inkscape:cx="100.08061"
-     inkscape:cy="113.21269"
+     inkscape:zoom="1.3859292"
+     inkscape:cx="105.02551"
+     inkscape:cy="107.90767"
      inkscape:document-units="px"
      inkscape:current-layer="layer1"
      showgrid="true"
         <dc:format>image/svg+xml</dc:format>
         <dc:type
            rdf:resource="http://purl.org/dc/dcmitype/StillImage" />
-        <dc:title></dc:title>
+        <dc:title />
       </cc:Work>
     </rdf:RDF>
   </metadata>
          inkscape:connector-curvature="0"
          id="rect4428-4"
          d="m 118.03127,895.15627 0,0.3125 c 0,1.2601 -0.0643,3.4345 -0.35937,5.75 l -1.5625,1e-4 c -0.80183,0.011 -1.64766,4.0737 -1.60938,8.0625 l 8.25,0 c -0.057,-5.5479 1.56902,-11.5211 1.75,-5.6563 0.21453,6.9525 1.74237,-5.1823 1.75,-8.4687 z"
-         style="fill:none;stroke:#1a1a1a;stroke-width:0.5;stroke-linecap:butt;stroke-linejoin:round;stroke-miterlimit:4;stroke-opacity:1;stroke-dasharray:none;display:inline" />
+         style="fill:none;stroke:#e6e6e6;stroke-width:0.5;stroke-linecap:butt;stroke-linejoin:round;stroke-miterlimit:4;stroke-opacity:1;stroke-dasharray:none;display:inline" />
       <path
          inkscape:export-ydpi="90"
          inkscape:export-xdpi="90"
          inkscape:connector-curvature="0"
          id="path4440-4"
          d="m 124.78127,905.73727 -1.9375,-0.063"
-         style="fill:none;stroke:#1a1a1a;stroke-width:0.5;stroke-linecap:butt;stroke-linejoin:miter;stroke-miterlimit:4;stroke-opacity:1;stroke-dasharray:none;display:inline" />
+         style="fill:none;stroke:#e6e6e6;stroke-width:0.5;stroke-linecap:butt;stroke-linejoin:miter;stroke-miterlimit:4;stroke-opacity:1;stroke-dasharray:none;display:inline" />
       <path
          inkscape:export-ydpi="90"
          inkscape:export-xdpi="90"
          inkscape:connector-curvature="0"
          id="path4442-9"
          d="m 117.59377,901.20597 6.4375,0"
-         style="fill:none;stroke:#1a1a1a;stroke-width:0.5;stroke-linecap:butt;stroke-linejoin:miter;stroke-miterlimit:4;stroke-opacity:1;stroke-dasharray:none;display:inline" />
+         style="fill:none;stroke:#e6e6e6;stroke-width:0.5;stroke-linecap:butt;stroke-linejoin:miter;stroke-miterlimit:4;stroke-opacity:1;stroke-dasharray:none;display:inline" />
       <rect
          inkscape:export-ydpi="90"
          inkscape:export-xdpi="90"
          height="0.375"
          width="1.0625"
          id="rect4446-9"
-         style="fill:none;stroke:#1a1a1a;stroke-width:0.5;stroke-linecap:butt;stroke-linejoin:round;stroke-miterlimit:4;stroke-opacity:1;stroke-dasharray:none;display:inline" />
+         style="fill:none;stroke:#e6e6e6;stroke-width:0.5;stroke-linecap:butt;stroke-linejoin:round;stroke-miterlimit:4;stroke-opacity:1;stroke-dasharray:none;display:inline" />
       <rect
          inkscape:export-ydpi="90"
          inkscape:export-xdpi="90"
          inkscape:export-filename="/home/fabio/public_html/f9k-tre/icons2.png"
-         style="fill:none;stroke:#1a1a1a;stroke-width:0.5;stroke-linecap:butt;stroke-linejoin:round;stroke-miterlimit:4;stroke-opacity:1;stroke-dasharray:none;display:inline"
+         style="fill:none;stroke:#e6e6e6;stroke-width:0.5;stroke-linecap:butt;stroke-linejoin:round;stroke-miterlimit:4;stroke-opacity:1;stroke-dasharray:none;display:inline"
          id="rect4448-3"
          width="1.0625"
          height="0.375"
          height="0.375"
          width="1.0625"
          id="rect4450-6"
-         style="fill:none;stroke:#1a1a1a;stroke-width:0.5;stroke-linecap:butt;stroke-linejoin:round;stroke-miterlimit:4;stroke-opacity:1;stroke-dasharray:none;display:inline" />
+         style="fill:none;stroke:#e6e6e6;stroke-width:0.5;stroke-linecap:butt;stroke-linejoin:round;stroke-miterlimit:4;stroke-opacity:1;stroke-dasharray:none;display:inline" />
       <rect
          inkscape:export-ydpi="90"
          inkscape:export-xdpi="90"
          inkscape:export-filename="/home/fabio/public_html/f9k-tre/icons2.png"
-         style="fill:none;stroke:#1a1a1a;stroke-width:0.5;stroke-linecap:butt;stroke-linejoin:round;stroke-miterlimit:4;stroke-opacity:1;stroke-dasharray:none;display:inline"
+         style="fill:none;stroke:#e6e6e6;stroke-width:0.5;stroke-linecap:butt;stroke-linejoin:round;stroke-miterlimit:4;stroke-opacity:1;stroke-dasharray:none;display:inline"
          id="rect4452-0"
          width="1.0625"
          height="0.375"
          height="0.375"
          width="1.0625"
          id="rect4454-5"
-         style="fill:none;stroke:#1a1a1a;stroke-width:0.5;stroke-linecap:butt;stroke-linejoin:round;stroke-miterlimit:4;stroke-opacity:1;stroke-dasharray:none;display:inline" />
+         style="fill:none;stroke:#e6e6e6;stroke-width:0.5;stroke-linecap:butt;stroke-linejoin:round;stroke-miterlimit:4;stroke-opacity:1;stroke-dasharray:none;display:inline" />
       <rect
          inkscape:export-ydpi="90"
          inkscape:export-xdpi="90"
          inkscape:export-filename="/home/fabio/public_html/f9k-tre/icons2.png"
-         style="fill:none;stroke:#1a1a1a;stroke-width:0.5;stroke-linecap:butt;stroke-linejoin:round;stroke-miterlimit:4;stroke-opacity:1;stroke-dasharray:none;display:inline"
+         style="fill:none;stroke:#e6e6e6;stroke-width:0.5;stroke-linecap:butt;stroke-linejoin:round;stroke-miterlimit:4;stroke-opacity:1;stroke-dasharray:none;display:inline"
          id="rect4456-0"
          width="1.0625"
          height="0.375"
          height="0.375"
          width="1.0625"
          id="rect4458-2"
-         style="fill:none;stroke:#1a1a1a;stroke-width:0.5;stroke-linecap:butt;stroke-linejoin:round;stroke-miterlimit:4;stroke-opacity:1;stroke-dasharray:none;display:inline" />
+         style="fill:none;stroke:#e6e6e6;stroke-width:0.5;stroke-linecap:butt;stroke-linejoin:round;stroke-miterlimit:4;stroke-opacity:1;stroke-dasharray:none;display:inline" />
       <rect
          inkscape:export-ydpi="90"
          inkscape:export-xdpi="90"
          inkscape:export-filename="/home/fabio/public_html/f9k-tre/icons2.png"
-         style="fill:none;stroke:#1a1a1a;stroke-width:0.5;stroke-linecap:butt;stroke-linejoin:round;stroke-miterlimit:4;stroke-opacity:1;stroke-dasharray:none;display:inline"
+         style="fill:none;stroke:#e6e6e6;stroke-width:0.5;stroke-linecap:butt;stroke-linejoin:round;stroke-miterlimit:4;stroke-opacity:1;stroke-dasharray:none;display:inline"
          id="rect4460-9"
          width="1.0625"
          height="0.375"
          height="0.375"
          width="1.0625"
          id="rect4462-4"
-         style="fill:none;stroke:#1a1a1a;stroke-width:0.5;stroke-linecap:butt;stroke-linejoin:round;stroke-miterlimit:4;stroke-opacity:1;stroke-dasharray:none;display:inline" />
+         style="fill:none;stroke:#e6e6e6;stroke-width:0.5;stroke-linecap:butt;stroke-linejoin:round;stroke-miterlimit:4;stroke-opacity:1;stroke-dasharray:none;display:inline" />
       <rect
          inkscape:export-ydpi="90"
          inkscape:export-xdpi="90"
          inkscape:export-filename="/home/fabio/public_html/f9k-tre/icons2.png"
-         style="fill:none;stroke:#1a1a1a;stroke-width:0.5;stroke-linecap:butt;stroke-linejoin:round;stroke-miterlimit:4;stroke-opacity:1;stroke-dasharray:none;display:inline"
+         style="fill:none;stroke:#e6e6e6;stroke-width:0.5;stroke-linecap:butt;stroke-linejoin:round;stroke-miterlimit:4;stroke-opacity:1;stroke-dasharray:none;display:inline"
          id="rect4464-3"
          width="1.0625"
          height="0.375"
          height="0.375"
          width="1.0625"
          id="rect4466-5"
-         style="fill:none;stroke:#1a1a1a;stroke-width:0.5;stroke-linecap:butt;stroke-linejoin:round;stroke-miterlimit:4;stroke-opacity:1;stroke-dasharray:none;display:inline" />
+         style="fill:none;stroke:#e6e6e6;stroke-width:0.5;stroke-linecap:butt;stroke-linejoin:round;stroke-miterlimit:4;stroke-opacity:1;stroke-dasharray:none;display:inline" />
       <rect
          inkscape:export-ydpi="90"
          inkscape:export-xdpi="90"
          inkscape:export-filename="/home/fabio/public_html/f9k-tre/icons2.png"
-         style="fill:none;stroke:#1a1a1a;stroke-width:0.5;stroke-linecap:butt;stroke-linejoin:round;stroke-miterlimit:4;stroke-opacity:1;stroke-dasharray:none;display:inline"
+         style="fill:none;stroke:#e6e6e6;stroke-width:0.5;stroke-linecap:butt;stroke-linejoin:round;stroke-miterlimit:4;stroke-opacity:1;stroke-dasharray:none;display:inline"
          id="rect4468-1"
          width="1.0625"
          height="0.375"
          height="0.375"
          width="1.0625"
          id="rect4470-7"
-         style="fill:none;stroke:#1a1a1a;stroke-width:0.5;stroke-linecap:butt;stroke-linejoin:round;stroke-miterlimit:4;stroke-opacity:1;stroke-dasharray:none;display:inline" />
+         style="fill:none;stroke:#e6e6e6;stroke-width:0.5;stroke-linecap:butt;stroke-linejoin:round;stroke-miterlimit:4;stroke-opacity:1;stroke-dasharray:none;display:inline" />
       <rect
          inkscape:export-ydpi="90"
          inkscape:export-xdpi="90"
          inkscape:export-filename="/home/fabio/public_html/f9k-tre/icons2.png"
-         style="fill:none;stroke:#1a1a1a;stroke-width:0.5;stroke-linecap:butt;stroke-linejoin:round;stroke-miterlimit:4;stroke-opacity:1;stroke-dasharray:none;display:inline"
+         style="fill:none;stroke:#e6e6e6;stroke-width:0.5;stroke-linecap:butt;stroke-linejoin:round;stroke-miterlimit:4;stroke-opacity:1;stroke-dasharray:none;display:inline"
          id="rect4472-4"
          width="1.0625"
          height="0.375"
          height="0.375"
          width="1.0625"
          id="rect4474-3"
-         style="fill:none;stroke:#1a1a1a;stroke-width:0.5;stroke-linecap:butt;stroke-linejoin:round;stroke-miterlimit:4;stroke-opacity:1;stroke-dasharray:none;display:inline" />
+         style="fill:none;stroke:#e6e6e6;stroke-width:0.5;stroke-linecap:butt;stroke-linejoin:round;stroke-miterlimit:4;stroke-opacity:1;stroke-dasharray:none;display:inline" />
       <rect
          inkscape:export-ydpi="90"
          inkscape:export-xdpi="90"
          inkscape:export-filename="/home/fabio/public_html/f9k-tre/icons2.png"
-         style="fill:none;stroke:#1a1a1a;stroke-width:0.5;stroke-linecap:butt;stroke-linejoin:round;stroke-miterlimit:4;stroke-opacity:1;stroke-dasharray:none;display:inline"
+         style="fill:none;stroke:#e6e6e6;stroke-width:0.5;stroke-linecap:butt;stroke-linejoin:round;stroke-miterlimit:4;stroke-opacity:1;stroke-dasharray:none;display:inline"
          id="rect4476-1"
          width="1.0625"
          height="0.375"
          height="0.375"
          width="1.0625"
          id="rect4478-4"
-         style="fill:none;stroke:#1a1a1a;stroke-width:0.5;stroke-linecap:butt;stroke-linejoin:round;stroke-miterlimit:4;stroke-opacity:1;stroke-dasharray:none;display:inline" />
+         style="fill:none;stroke:#e6e6e6;stroke-width:0.5;stroke-linecap:butt;stroke-linejoin:round;stroke-miterlimit:4;stroke-opacity:1;stroke-dasharray:none;display:inline" />
       <rect
          inkscape:export-ydpi="90"
          inkscape:export-xdpi="90"
          inkscape:export-filename="/home/fabio/public_html/f9k-tre/icons2.png"
-         style="fill:none;stroke:#1a1a1a;stroke-width:0.5;stroke-linecap:butt;stroke-linejoin:round;stroke-miterlimit:4;stroke-opacity:1;stroke-dasharray:none;display:inline"
+         style="fill:none;stroke:#e6e6e6;stroke-width:0.5;stroke-linecap:butt;stroke-linejoin:round;stroke-miterlimit:4;stroke-opacity:1;stroke-dasharray:none;display:inline"
          id="rect4480-6"
          width="1.0625"
          height="0.375"
index 43dcdbb8415d4c115e87b8a22d5e4cde77d1d38b..4c8f59d7969bd2348ebbacf1d3daa26da4f6f4e2 100644 (file)
@@ -114,6 +114,7 @@ function enableOnUser(){
        $(this).val("");
        initEditor();
 }
+
 </script>
 <script type="text/javascript" src="$baseurl/js/ajaxupload.js"></script>
 <script type="text/javascript">
@@ -121,6 +122,7 @@ function enableOnUser(){
        var addtitle = '$addtitle';
 
        $(document).ready(function() {
+               
                /* enable tinymce on focus and click */
                $("#profile-jot-text").focus(enableOnUser);
                $("#profile-jot-text").click(enableOnUser);
@@ -261,6 +263,18 @@ function enableOnUser(){
                }
        }
 
+       function itemFiler(id) {
+               reply = prompt("$fileas");
+               if(reply && reply.length) {
+                       commentBusy = true;
+                       $('body').css('cursor', 'wait');
+                       $.get('filer/' + id + '?term=' + reply);
+                       if(timer) clearTimeout(timer);
+                       timer = setTimeout(NavUpdate,3000);
+                       liking = 1;
+               }
+       }
+
        function jotClearLocation() {
                $('#jot-coord').val('');
                $('#profile-nolocation-wrapper').hide();
index 4a030e7ae1996a849a35d8b889e23e9503e36372..11469dc6611f15c63567dbcf5f08c01414c0fed6 100644 (file)
@@ -1,5 +1,4 @@
 <nav>
-$langselector
 
 <span id="banner">$banner</span>
 
@@ -58,14 +57,6 @@ works -->
         </li>
         {{ endif }}
 
-{{ if $userinfo }}
-        <ul id="nav-user-menu" class="menu-popup">
-            {{ for $nav.usermenu as $usermenu }}
-                <li><a class="$usermenu.2" href="$usermenu.0" title="$usermenu.3">$usermenu.1</a></li>
-            {{ endfor }}
-        </ul>
-{{ endif }}
-
         {{ if $nav.contacts }}
         <li><a id="nav-contacts-link" class="nav-commlink $nav.contacts.2" href="$nav.contacts.0" title="$nav.contacts.1">$nav.contacts.1</a></li>
         {{ endif }}
@@ -95,6 +86,14 @@ works -->
         </ul>
     </div>
 
+{{ if $userinfo }}
+        <ul id="nav-user-menu" class="menu-popup">
+            {{ for $nav.usermenu as $usermenu }}
+                <li><a class="$usermenu.2" href="$usermenu.0" title="$usermenu.3">$usermenu.1</a></li>
+            {{ endfor }}
+        </ul>
+{{ endif }}
+
     <div id="notifications">
         {{ if $nav.home }}
         <a id="home-update" class="nav-ajax-left" href="$nav.home.0" title="$nav.home.1"></a>
@@ -112,11 +111,14 @@ works -->
                <a id="intro-update" class="nav-ajax-left" href="$nav.introductions.0"></a>
                {{ endif }}
     </div>
-
 </div>
     <a href="#" class="floaterflip"></a>
 </nav>
 
+<div id="lang-sel-wrap">
+$langselector
+</div>
+
 <ul id="nav-notifications-template" style="display:none;" rel="template">
        <li class="{4}"><a href="{0}"><img src="{1}" height="24" width="24" alt="" />{2} <span class="notif-when">{3}</span></a></li>
 </ul>
index b0cb8890c546c228654d791c97bc3e77e2faf747..b322717ad107dc1f85485cf550c2a37aa2fa5df3 100644 (file)
@@ -4,7 +4,7 @@
        <a href="$base" class="nets-link{{ if $sel_all }} nets-selected{{ endif }} nets-all">$all</a>
        <ul class="nets-ul">
        {{ for $nets as $net }}
-       <li><a href="$base?nets=$net.ref" class="nets-link{{ if $net.selected }} nets-selected{{ endif }}">$net.name</a></li>
+       <li><a href="$base?f=&nets=$net.ref" class="nets-link{{ if $net.selected }} nets-selected{{ endif }}">$net.name</a></li>
        {{ endfor }}
        </ul>
 </div>
index 4582751c60dc804f0a22d342e716ef22b00c93f2..f1209ec58f33b042b122002d629b777cd43f63b1 100644 (file)
@@ -17,7 +17,7 @@
 </div>
 
 <div id="photo-photo-end"></div>
-<div id="photo-caption" >$desc</div>
+<div id="photo-caption">$desc</div>
 {{ if $tags }}
 <div id="in-this-photo-text">$tags.0</div>
 <div id="in-this-photo">$tags.1</div>
index 0c289d982b41c43d3f5eb98c24eb6a89ef1a23aa..6228e4f282aa5e4566b729737d55644c6a7f42f6 100644 (file)
@@ -1,12 +1,30 @@
 <div class="vcard">
 
        <div class="fn label">$profile.name</div>
-       
+
+               {{ if $profile.edit }}
+                       <div class="action">
+                       <span class="icon-profile-edit"></span>
+                       <a href="#" rel="#profiles-menu" class="ttright" id="profiles-menu-trigger" title="$profile.edit.3">$profile.edit.1</a>
+                       <ul id="profiles-menu" class="menu-popup">
+                               {{ for $profile.menu.entries as $e }}
+                               <li>
+                                       <a href="profiles/$e.id"><img src='$e.photo'>$e.profile_name</a>
+                               </li>
+                               {{ endfor }}
+                               <li><a href="profile_photo" >$profile.menu.chg_photo</a></li>
+                               <li><a href="profiles/new" id="profile-listing-new-link">$profile.menu.cr_new</a></li>
+                               
+                       </ul>
+                       </div>
+               {{ endif }}
+       </div>
+
        {{ if $pdesc }}
     <div class="title">$profile.pdesc</div>
     {{ endif }}
        <div id="profile-photo-wrapper">
-    <img class="photo" width="175" height="175" src="$profile.photo" alt="$profile.name" />
+               <img class="photo" width="175" height="175" src="$profile.photo?rev=$profile.picdate" alt="$profile.name" />
     </div>
 
        {{ if $location }}
                <div class="adr">
                        {{ if $profile.address }}
             <div class="street-address">$profile.address</div>{{ endif }}
-                       <span class="city-state-zip">$profile.zip</span>
-            <span class="locality">$profile.locality</span>{{ if $profile.locality }}, {{ endif }}
-            <span class="region">$profile.region</span>
-            <span class="postal-code">$profile.postal-code</span>
+                       <span class="city-state-zip">
+                               <span class="locality">$profile.locality</span>{{ if $profile.locality }}, {{ endif }}
+                               <span class="region">$profile.region</span>
+                               <span class="postal-code">$profile.postal-code</span>
+                       </span>
                        {{ if $profile.country-name }}<span class="country-name">$profile.country-name</span>{{ endif }}
                </div>
                </div>
index e2aae1e77cd9b9474a652433a95388e2f528ba7f..63a85dda536cd44fedaf2f82358ee82c8dfdd0a3 100644 (file)
@@ -1,4 +1,4 @@
-<div class="widget" id="saved-search-list">
+<div id="saved-search-list" class="widget">
        <h3 id="search">$title</h3>
        $searchbox
        
index 805749b1c548d34b7112b55a428aedb605772728..2dc21817a268326e7d14e9385c3a2e28b62bee83 100644 (file)
@@ -122,7 +122,6 @@ a {
     color: #88a9d2;
     text-decoration: none;
     margin-bottom: 1px;
-       text-decoration: none;
 }
 /*a:hover {                 */
 /*    text-decoration: none;*/
@@ -140,7 +139,6 @@ blockquote {
 }
 a:hover {
     color: #729fcf;
-    padding-bottom: 0;
     border-bottom: 1px dotted #729fcf;
 }
 .required {
@@ -197,14 +195,16 @@ input[type=submit] {
     color: #fff;
 }
 
+
 /**
  * global
  */
 /* .tool .action */
 .action {
-    float: right;
+       margin: 5px 0;
 }
 
+
 /**
  *     login
  */
@@ -212,9 +212,10 @@ input[type=submit] {
     margin-right: 20px;
 }
 
-/*********
-* nav
-*********/
+
+/**
+ * nav
+ */
 nav {
        height: 60px;
        display: block;
@@ -483,12 +484,12 @@ nav #nav-notifications-linkmenu.on .icon.s22.notify, nav #nav-notifications-link
        height: 22px;
        overflow: hidden;
        margin: 0px;
-       background: transparent url(icons.png) -190px -60px no-repeat; 
+       background: transparent url(icons.png) -190px -60px no-repeat;
 }
 .nav-ajax-update, .nav-ajax-left {
        width: 30px;
        height: 19px;
-       background: transparent url(notifications.svg) 0 0 no-repeat;
+       background: transparent url(notifications.png) 0 0 no-repeat;
        color: #222;
        font-weight: bold;
        font-size: 0.8em;
@@ -519,14 +520,16 @@ nav #nav-notifications-linkmenu.on .icon.s22.notify, nav #nav-notifications-link
 }
 #lang-select-icon {
        cursor: pointer;
-       position: absolute;
-       left: 0;
-       top: 0;
+       position: fixed;
+       left: 28px;
+       bottom: 6px;
+       z-index: 10;
 }
 #language-selector {
-    position: absolute;
-    top: 0;
-    left: 16px;
+    position: fixed;
+    bottom: 2px;
+    left: 52px;
+       z-index: 10;
 }
 .menu-popup {
     position: absolute;
@@ -539,9 +542,9 @@ nav #nav-notifications-linkmenu.on .icon.s22.notify, nav #nav-notifications-link
     list-style: none;
     border: 3px solid #364e59;
     z-index: 100000;
-    -webkit-box-shadow: 0px 5px 10px rgba(0, 0, 0, 0.7);
-    -moz-box-shadow: 0px 5px 10px rgba(0, 0, 0, 0.7);
-    box-shadow: 0px 5px 10px rgba(0, 0, 0, 0.7);
+    -webkit-box-shadow: 3px 3px 10px 0 rgba(0, 0, 0, 0.7);
+    -moz-box-shadow: 3px 3px 10px 0 rgba(0, 0, 0, 0.7);
+    box-shadow: 3px 3px 10px 0 rgba(0, 0, 0, 0.7);
 }
 .menu-popup a {
     display: block;
@@ -589,24 +592,24 @@ nav #nav-notifications-linkmenu.on .icon.s22.notify, nav #nav-notifications-link
 
 /** sysmsg **/
 #sysmsg_info {
-       position:fixed;
-       bottom:0;
-       -moz-box-shadow:0 0 5px #888;
-       -webkit-box-shadow:0 0 5px #888;
-       box-shadow:0 0 5px #888;
+       position: fixed;
+       bottom: 0;
+       -moz-box-shadow: 3px 3px 3px 10px 0 #000;
+       -webkit-box-shadow: 3px 3px 10px 0 #000;
+       box-shadow: 3px 3px 10px 0 #000;
     padding: 10px;
-       background-color:#fcaf3e;
+       background-color: #fcaf3e;
        border:2px solid #f8911b;
-       border-bottom:0;
+       border-bottom: 0;
        padding-bottom: 50px;
        z-index: 1000;
 }
 #sysmsg {
        position: fixed;
        bottom: 0;
-       -moz-box-shadow: 0 0 5px #888;
-       -webkit-box-shadow: 0 0 5px #888;
-       box-shadow: 0 0 5px #888;
+       -moz-box-shadow: 3px 3px 10px 0 #000;
+       -webkit-box-shadow: 3px 3px 10px 0 #000;
+       box-shadow: 3px 3px 10px 0 #000;
     padding: 10px;
        background-color: #fcaf3e;
        border: 2px solid #f8911b;
@@ -690,7 +693,9 @@ aside #viewcontacts {
 #netsearch-box {
        margin: 30px 0px;
 }
-
+.ttright {
+       margin: 0px 0px 0px 5px;
+}
 
 /**
 * contacts block
@@ -812,6 +817,9 @@ aside #viewcontacts {
        border-bottom: 0;
        padding: 5px;
 }
+#profile-jot-net {
+       margin: 5px 0;
+}
 #jot-preview-link {
     margin: 0 0 0 10px;
     border: 0;
@@ -833,12 +841,12 @@ aside #viewcontacts {
     background-color: #555753;
     height: 22px;
     width: 20px;
-    -webkit-border-radius: 5px 0px 0px 5px;
-    -moz-border-radius: 5px 0px 0px 5px;
-    border-radius: 5px 0px 0px 5px;     
+    -webkit-border-radius: 5px;
+    -moz-border-radius: 5px;
+    border-radius: 5px;     
     overflow: hidden;
     border: 0px;
-    margin: 0 -4px 0 10px;
+    margin: 0 10px 0 10px;
 }
 #profile-jot-plugin-wrapper {
        width: 1px;
@@ -856,23 +864,21 @@ aside #viewcontacts {
        height: 22px;
        background-color: #555753;
        color: #eeeeec;
-       -webkit-border-radius: 0 5px 5px 0;
-       -moz-border-radius: 0 5px 5px 0;
-       border-radius: 0 5px 5px 0;
+       -webkit-border-radius: 5px;
+       -moz-border-radius: 5px;
+       border-radius: 5px;
        border: 0;
        margin: 0;
        float: right;
 }
-#jot-perms-icons {
-       background-color: #555753;
+#jot-perms-icon {
        height: 22px;
        width: 20px;
-       -webkit-border-radius: 0 5px 5px 0;
-       -moz-border-radius: 0 5px 5px 0;
-       border-radius: 0 5px 5px 0;
+       -webkit-border-radius: 5px;
+       -moz-border-radius: 5px;
+       border-radius: 5px;
        overflow: hidden;
        border: 0;
-       margin: 0 0 0 94.4%;
 }
 #profile-jot-acl-wrapper {
        margin: 0 10px;
@@ -915,10 +921,11 @@ aside #viewcontacts {
        clear: both;
 }
 #jot-title-desc {
-       color: #cccccc;
+       color: #ccc;
 }
 #profile-jot-desc {
-       color: #a00;
+       color: #ff2000;
+       margin: 5px 0;
 }
 #jot-title-wrapper {
        margin-bottom: 5px;
@@ -946,7 +953,7 @@ aside #viewcontacts {
  * section
  */
 section {
-    margin: 20px 6% 0 4%;
+    margin: 20px 8% 0 4%;
     font-size: 0.8em;
     padding-right: 230px;
        min-width: 475px;
@@ -955,30 +962,31 @@ section {
 /** tabs **/
 .tabs {
     list-style: none;
-    margin: 10px 0 10px;
+    margin: 10px 0;
     padding: 0;
-    border-bottom: 1px solid #729fcf;
-    font-size: 14px;
 }
 .tabs li {
     display: inline;
 }
 .tab {
-    padding: 0 5px;
+    border: 1px solid #729fcf;
+       padding: 4px;
 }
 .tab:hover {
-    background-color: #88a9d2;
-    color: #111;
-    border: 0px;
+    background: #88a9d2;
+    color: #2e2f2e;
 }
 .tab:active {
-    background-color: #88a9d2;
-    color: #111;
-    border: 0px;
+    background: #88a9d2;
+    color: #2e2f2e;
 }
 .tab.active {
-       background-color: #88a9d2;
-    color: #111;
+       background: #88a9d2;
+    color: #2e2f2e;
+}
+.tab a {
+       border: 0;
+       text-decoration: none;
 }
 
 /**
@@ -1005,6 +1013,9 @@ section {
 .shiny {
     background: #2e3436;
 }
+.heart {
+       color: red;
+}
 .wall-item-content {
        overflow-x: auto;
 }
@@ -1091,7 +1102,7 @@ section {
        clear: left;
        font-size: 0.8em;
        color: #878883;
-       margin: 20px 0 0 110px;
+       margin: 20px 20px 0 110px;
 }
 .wall-item-ago {
        display: inline;
@@ -1328,10 +1339,11 @@ div[id$="wrapper"] br {
 .photo-album-image-wrapper,
 .photo-top-image-wrapper {
     float: left;
-    -moz-box-shadow: 0 0 5px #888;
-    -webkit-box-shadow: 0 0 5px #888;
-    box-shadow: 0 0 5px #888;
-    background-color: #eee;
+    -moz-box-shadow: 3px 3px 10px 0 #000;
+    -webkit-box-shadow: 3px 3px 10px 0 #000;
+    box-shadow: 3px 3px 10px 0 #000;
+    background-color: #222;
+       color: #2e2f2e;
     -webkit-border-radius: 5px;
     -moz-border-radius: 5px;
     border-radius: 5px;
@@ -1500,20 +1512,26 @@ div[id$="wrapper"] br {
 }
 .mail-list-sender-name {
     display: inline;
+       font-size: 1.1em;
 }
 .mail-list-date {
     display: inline;
-    font-size: 0.8em;
+    font-size: 0.9em;
     padding-left: 10px;
 }
+.mail-list-sender-name, .mail-list-date {
+       font-style: italic;
+}
 .mail-list-subject {
-    font-size: 1.5em;
+    font-size: 1.2em;
+       font-weight: bold;
 }
 .mail-list-delete-wrapper {
     float: right;
 }
 .mail-list-outside-wrapper-end {
     clear: both;
+       border-bottom: 1px #eec dotted;
 }
 .mail-conv-sender {
     float: left;
@@ -1548,8 +1566,7 @@ div[id$="wrapper"] br {
 .view-contact-wrapper,
 .contact-entry-wrapper {
     float: left;
-    margin-right: 5px;
-    margin-bottom: 40px;
+    margin: 0 5px 40px 0;
     width: 120px;
        height: 120px;
        padding: 3px;
@@ -1712,38 +1729,68 @@ div[id$="wrapper"] br {
     clear: both;
 }
 
-#register-form label,
-#profile-edit-form label {
-       width: 300px;
-    float: left;
-}
+/*#register-form label,     */
+/*#profile-edit-form label {*/
+/*    width: 300px;         */
+/*    float: left;          */
+/*}                         */
 
-#register-form span,
-#profile-edit-form span {
-    color:#555753;
-    display:block;
-    margin-bottom:20px;
+/*#register-form span,     */
+/*#profile-edit-form span {*/
+/*    color: #555753;      */
+/*    display: block;      */
+/*    margin-bottom: 20px; */
+/*}                        */
+#profile-edit-marital-label span {
+       margin: -4px;
 }
 .settings-submit-wrapper,
 .profile-edit-submit-wrapper {
     margin: 30px 0px;
 }
 .profile-edit-side-div {
-    margin: 5px 2px 0 0;
+       /*background: #111;*/
+       /*border-radius: 5px 5px 0px 0px;*/
+       /*margin: 0px 0px 0px 0px;*/
+       /*width: 100px;*/
+       /*height: 25px;*/
+       /*position: absolute;*/
+       display: none;
+       /*left: 35%;*/
+       /*top: 41%;*/
+       /*cursor: pointer;*/
 }
-.profile-edit-side-link {
-       margin: 0 20px -18px 0;
-    float: right;
+/*.profile-edit-side-div:hover {*/
+       /*display: block;*/
+/*}*/
+/*.profile-edit-side-link {*/
+       /*margin: 3px 0px 0px 70px;*/
+/*}*/
+#profiles-menu-trigger {
+       width: 100px;
 }
 .profile-listing {
     float: left;
     margin: 20px 20px 0px 0px;
 }
+.icon-profile-edit {
+    background: url("icons.png") no-repeat scroll -150px 0px transparent;
+    border: 0 none;
+    display: block;
+    float: right;
+    height: 20px;
+    margin: 0 0 -18px;
+    text-decoration: none;
+       cursor: pointer;
+}
 #profile-edit-links ul {
     margin: 20px 0;
     padding: 0;
     list-style: none;
 }
+.marital {
+       margin-top: 5px;
+}
 #register-sitename {
     display: inline;
     font-weight: bold;
@@ -1944,7 +1991,12 @@ div[id$="wrapper"] br {
  */
 .directory-item {
     float: left;
-    margin: 50px 50px 0px 0px;
+       /*margin: 50px 50px 0px 0px;*/
+       margin: 0 5px 4px 0;
+       padding: 3px;
+       width: 180px;
+       height: 250px;
+    position: relative;
 }
 
 
@@ -1956,10 +2008,13 @@ div[id$="wrapper"] br {
 }
 .group-selected, .nets-selected {
     padding: 3px;
-    border: 1px solid #f8f8f8;
-    background: #2e302e;
+       color: #2e2f2e;
+    background: #88a9d2;
     font-weight: bold;
 }
+.group-selected:hover, .nets-selected:hover {
+       color: #2e2f2e;
+}
 .groupsideedit {
     margin-right: 10px;
 }
@@ -2105,11 +2160,16 @@ div[id$="wrapper"] br {
     width: 16px; height: 16px;
 }
 #adminpage table tr:hover {
-    background-color:#bbc7d7;
+       color: #2e2f2e;
+    background-color: #eec;
 }
 #adminpage .selectall {
     text-align: right;
 }
+#adminpage #users a {
+       color: #2e2f2e;
+       text-decoration: underline;
+}
 
 /**
  * Form fields
@@ -2387,7 +2447,7 @@ div[id$="wrapper"] br {
        background-position: -70px -40px;
 }
 .unlock {
-       background-position: -90px -40px;
+       background-position: -88px -40px;
 }
 .video {
        background-position: -110px -40px;
@@ -2471,8 +2531,8 @@ footer {
 }
 #profile-jot-text {
     height: 20px;
-    color: #666;
-    border: 1px solid #ccc;
+    color: #eec;
+    border: 1px solid #eec;
     border-radius: 5px;
     width: 99.5%;
 }
@@ -2483,113 +2543,117 @@ footer {
 #photos-upload-permissions-wrapper,
 #profile-jot-acl-wrapper {
     display: block !important;
+       background: #2e2f2e;
+       color: #eec;
 }
 #acl-wrapper {
-    width: 690px;
-    float: left;
+    width: 660px;
+       margin: 0 auto;
 }
 #acl-search {
     float: right;
     background: #fff url("../../../images/search_18.png") no-repeat right center;
     padding-right: 20px;
+       margin: 6px;
 }
 #acl-showall {
-    float:left;
-    display:block;
-    width:auto;
-    height:18px;
-    background-color:#CCC;
-    background-image:url("../../../images/show_all_off.png");
-    background-position:7px 7px;
-    background-repeat:no-repeat;
-    padding:7px 10px 7px 30px;
-    -webkit-border-radius:5px;
-    -moz-border-radius:5px;
-    border-radius:5px;
-    color:#999;
+    float: left;
+    display: block;
+    width: auto;
+    height: 18px;
+    background: #eec url("../../../images/show_all_off.png") 8px 8px no-repeat;
+    padding: 7px 10px 7px 30px;
+    -webkit-border-radius: 5px;
+    -moz-border-radius: 5px;
+    border-radius: 5px;
+    color: #999;
+       margin: 5px 0;
 }
 #acl-showall.selected {
-    color:#000;
-    background-color:#F90;
-    background-image:url(../../../images/show_all_on.png);
+    color: #000;
+    background: #f90 url(../../../images/show_all_on.png) 8px 8px no-repeat;
 }
 #acl-list {
-    height:210px;
-    border:1px solid #ccc;
-    clear:both;
-    margin-top:30px;
-    overflow:auto;
-}
-#acl-list-content {
+    height: 210px;
+    border: 1px solid #ccc;
+    clear: both;
+    margin-top: 30px;
+    overflow: auto;
 }
+/*#acl-list-content {*/
+/*}*/
 .acl-list-item {
-    display:block;
-    width:150px;
-    height:30px;
-    border:1px solid #ccc;
-    margin:5px;
-    float:left;
+       border: 1px solid #eec;
+    display: block;
+    float: left;
+    height: 110px;
+    margin: 3px 0 5px 5px;
+    width: 120px;
 }
 .acl-list-item img {
-    width:22px;
-    height:22px;
-    float:left;
-    margin:4px;
+    width: 22px;
+    height: 22px;
+    float: left;
+    margin: 5px 5px 20px;
 }
 .acl-list-item p {
     height: 12px;
     font-size: 10px;
-    margin: 0;
+    margin: 0 0 22px;
     padding: 2px 0 1px;
 }
 .acl-list-item a {
-    font-size:8px;
-    display:block;
-    width:40px;
-    height:10px;
-    float:left;
-    color:#999;
-    background-color:#CCC;
-    background-position:3px 3px;
-    background-repeat:no-repeat;
-    margin-right:5px;
-    -webkit-border-radius:2px;
-    -moz-border-radius:2px;
-    border-radius:2px;
-    padding-left:15px;
+    background: #eec 3px 3px no-repeat;
+    -webkit-border-radius: 2px;
+    -moz-border-radius: 2px;
+    border-radius: 2px;
+       clear: both;
+    font-size: 10px;
+    display: block;
+    width: 55px;
+    height: 20px;
+    color: #2e2f2e;
+    margin: 5px auto 0;
+       padding: 0 3px;
+       text-align: center;
+       vertical-align: middle;
 }
 #acl-wrapper a:hover {
-    text-decoration:none;
-    color:#000;
+    text-decoration: none;
+    color: #2e2f2e;
+       border: 0;
 }
 .acl-button-show {
-    background-image:url('../../../images/show_off.png');
+    background-image: url('../../../images/show_off.png');
+       margin: 0 auto;
 }
 .acl-button-hide {
-    background-image:url('../../../images/hide_off.png');
+    background-image: url('../../../images/hide_off.png');
+       margin: 0 auto;
 }
 .acl-button-show.selected {
-    color:#000;
-    background-color:#9ade00;
-    background-image:url(../../../images/show_on.png);
+    color: #2e2f2e;
+    background-color: #9ade00;
+    background-image: url(../../../images/show_on.png);
 }
 .acl-button-hide.selected {
-    color:#000;
-    background-color:#ff4141;
-    background-image:url(../../../images/hide_on.png);
+    color: #2e2f2e;
+    background-color: #ff4141;
+    background-image: url(../../../images/hide_on.png);
 }
 .acl-list-item.groupshow {
-    border-color:#9ade00;
+    border-color: #9ade00;
 }
 .acl-list-item.grouphide {
-    border-color:#ff4141;
+    border-color: #ff4141;
 }
 /** /acl **/
 
 
 /* autocomplete popup */
 .acpopup {
-       max-height: 150px;
+       max-height: 175px;
+    max-width: 42%;
        background-color: #555753;
        color: #fff;
        overflow: auto;
index c72884f1a5475c7688440086a982751be0352fd3..c0611ce83daa3a517114c1c94e419641a49a2f52 100644 (file)
@@ -1,5 +1,17 @@
 <?php
-$a->theme_info = array();
+
+/*
+ * Name: Dispy Dark
+ * Description: Dispy Dark, Friendica theme
+ * Version: 0.9
+ * Author: Simon <http://simon.kisikew.org/>
+ * Maintainer: Simon <http://simon.kisikew.org/>
+ */
+
+
+$a->theme_info = array(
+       'extends' => 'dispy-dark'
+);
 
 $a->page['htmlhead'] .= <<< EOT
 <script>
@@ -52,6 +64,16 @@ $(document).ready(function() {
             $('#drop-' + id).addClass('iconspacer'); }
         );
 
+       // notifications
+       $('html').click(function() {
+               $('#nav-notifications-linkmenu').removeClass('selected');
+               document.getElementById("nav-notifications-menu").style.display = "none";
+       });
+
+       $('#nav-notifications-linkmenu').click(function(event) {
+               event.stopPropagation();
+       });
+
     function toggleToolbar() {
         if ( $('#nav-floater').is(':visible') ) {
             $('#nav-floater').slideUp('fast');
@@ -69,6 +91,26 @@ $(document).ready(function() {
         toggleToolbar();
         return false;
     });
+
+       $('#profile-jot-text').focusin(function() {
+               $(this).css({color: '#eec'});
+       });
+
+/*     $('#profile-photo-wrapper').mouseover(function() {
+               $('.profile-edit-side-div').css({display: 'block'});
+       }).mouseout(function() {
+               $('.profile-edit-side-div').css({display: 'none'});
+               return false;
+       });
+
+       $('img.photo').mouseover(function() {
+               $('.profile-edit-side-div').css({display: 'block'});
+       }).mouseout(function() {
+               $('.profile-edit-side-div').css({display: 'none'});
+               return false;
+       });*/
+
 });
 </script>
 EOT;
+
index b013cfeef45966ed69a4af35550facc5d01b5936..c67a88635c54e47e76d455d7c702927a55e42b09 100644 (file)
                                <a href="#" id="starred-$item.id" onclick="dostar($item.id); return false;" class="star-item icon $item.isstarred" title="$item.star.toggle"></a>
                                <a href="#" id="tagger-$item.id" onclick="itemTag($item.id); return false;" class="tag-item icon tagged" title="$item.star.tagger"></a>
                        {{ endif }}
+                       
                        {{ if $item.vote }}
                        <div class="wall-item-like-buttons" id="wall-item-like-buttons-$item.id">
                                <a href="#" class="icon like" title="$item.vote.like.0" onclick="dolike($item.id,'like'); return false"></a>
                                <a href="#" class="icon dislike" title="$item.vote.dislike.0" onclick="dolike($item.id,'dislike'); return false"></a>
-                               {{ if $item.vote.share }}<a href="#" class="icon recycle wall-item-share-buttons" title="$item.vote.share.0" onclick="jotShare($item.id); return false"></a>{{ endif }}
+                               {{ if $item.vote.share }}
+                                       <a href="#" id="share-$item.id"
+                                       class="icon recycle wall-item-share-buttons" title="$item.vote.share.0" onclick="jotShare($item.id); return false"></a>{{ endif }}
                                <img id="like-rotator-$item.id" class="like-rotator" src="images/rotator.gif" alt="$item.wait" title="$item.wait" style="display: none;" />
                        </div>
                        {{ endif }}
index 86453fad21afc41e8dafbc99bf8008d24c88508f..f251d7352bb1301cfc1bf676727b41d4dda2fea7 100644 (file)
                                <a href="#" id="starred-$item.id" onclick="dostar($item.id); return false;" class="star-item icon $item.isstarred" title="$item.star.toggle"></a>
                                <a href="#" id="tagger-$item.id" onclick="itemTag($item.id); return false;" class="tag-item icon tagged" title="$item.star.tagger"></a>
                        {{ endif }}
+                       
                        {{ if $item.vote }}
                        <div class="wall-item-like-buttons" id="wall-item-like-buttons-$item.id">
                                <a href="#" class="icon like" title="$item.vote.like.0" onclick="dolike($item.id,'like'); return false"></a>
                                <a href="#" class="icon dislike" title="$item.vote.dislike.0" onclick="dolike($item.id,'dislike'); return false"></a>
-                               {{ if $item.vote.share }}<a href="#" class="icon recycle wall-item-share-buttons" title="$item.vote.share.0" onclick="jotShare($item.id); return false"></a>{{ endif }}
+
+                       {{ if $item.vote.share }}
+                               <a href="#"  id="share-$item.id"
+class="icon recycle wall-item-share-buttons"  title="$item.vote.share.0" onclick="jotShare($item.id); return false"></a>{{ endif }}
                                <img id="like-rotator-$item.id" class="like-rotator" src="images/rotator.gif" alt="$item.wait" title="$item.wait" style="display: none;" />
                        </div>
                        {{ endif }}
@@ -63,6 +67,7 @@
                                                {{ endfor }}
                                        </div>                  
                        </div>
+                       
                </div>
                <div class="wall-item-author">
                        <a href="$item.profile_url" title="$item.linktitle" class="wall-item-name-link"><span class="wall-item-name$item.sparkle" id="wall-item-name-$item.id" >$item.name</span></a>
index 4a030e7ae1996a849a35d8b889e23e9503e36372..f6e399ef522aa03db7ca4eb56844bc5208a33d9d 100644 (file)
@@ -1,5 +1,4 @@
 <nav>
-$langselector
 
 <span id="banner">$banner</span>
 
@@ -112,11 +111,14 @@ works -->
                <a id="intro-update" class="nav-ajax-left" href="$nav.introductions.0"></a>
                {{ endif }}
     </div>
-
 </div>
     <a href="#" class="floaterflip"></a>
 </nav>
 
+<div id="lang-sel-wrap">
+$langselector
+</div>
+
 <ul id="nav-notifications-template" style="display:none;" rel="template">
        <li class="{4}"><a href="{0}"><img src="{1}" height="24" width="24" alt="" />{2} <span class="notif-when">{3}</span></a></li>
 </ul>
index 8081bfc281bed7a6efc6e694ccb641a6effec0af..93830de96776b439e0faef277e1d2ce8adbefed3 100644 (file)
@@ -79,7 +79,7 @@ mark {
 /* Redeclare monospace font family: h5bp.com/j */
 pre, code, kbd, samp, .wall-item-body code {
     font-family: monospace, monospace;
-    _font-family: 'courier new', monospace;
+    _font-family: monospace;
     font-size: 1em; }
 
 /* Improve readability of pre-formatted text in all browsers */
@@ -127,6 +127,7 @@ a:hover img {
 }
 blockquote {
     background: #eee;
+       color: #111;
     text-indent: 5px;
     padding: 5px;
     border: 1px #aaa solid;
@@ -134,7 +135,6 @@ blockquote {
 }
 a:hover {
     color: #729fcf;
-    padding-bottom: 0;
     border-bottom: 1px dotted #729fcf;
 }
 .required {
@@ -462,6 +462,7 @@ nav #nav-notifications-linkmenu.on .icon.s22.notify, nav #nav-notifications-link
     right: 1%;
     padding: 5px;
     background: #2e3436;
+       color: transparent;
     border-radius: 5px;
     z-index: 100;
 }
@@ -511,14 +512,14 @@ nav #nav-notifications-linkmenu.on .icon.s22.notify, nav #nav-notifications-link
 }
 #lang-select-icon {
        cursor: pointer;
-       position: absolute;
-       left: 0;
-       top: 0;
+       position: fixed;
+       left: 28px;
+       bottom: 6px;
 }
 #language-selector {
-    position: absolute;
-    top: 0;
-    left: 16px;
+    position: fixed;
+    bottom: 2px;
+    left: 52px;
 }
 .menu-popup {
     position: absolute;
@@ -633,8 +634,24 @@ aside {
 .vcard #profile-photo-wrapper {
        margin: 20px;
 }
+/* http://css-tricks.com/snippets/css/css-box-shadow/
+ * box-shadow:
+ * 1. The horizontal offset of the shadow, positive means
+ * the shadow will be on the right of the box, a negative
+ * offset will put the shadow on the left of the box.
+ * 2. The vertical offset of the shadow, a negative one
+ * means the box-shadow will be above the box, a
+ * positive one means the shadow will be below the box.
+ * 3. The blur radius (optional), if set to 0 the shadow
+ * will be sharp, the higher the number, the more blurred
+ * it will be.
+ * 4. The spread radius (optional), positive values increase
+ * the size of the shadow, negative values decrease the size.
+ * Default is 0 (the shadow is same size as blur).
+ * 5. Colo[u]r
+ */
 .vcard #profile-photo-wrapper img {
-       box-shadow: 3px 3px 10px 0;
+       box-shadow: 3px 3px 10px 0 #000;
 }
 aside h4 {
        font-size: 1.2em;
@@ -643,8 +660,10 @@ aside #viewcontacts {
        text-align: right;
 }
 .aprofile dt {
-    box-shadow: 1px 1px 5px 0;
     color: #666666;
+       background: transparent;
+       font-weight: bold;
+    box-shadow: 1px 1px 5px 0 #000;
     margin: 15px 0 5px;
     padding-left: 5px;
 }
@@ -707,51 +726,11 @@ aside #viewcontacts {
 }
 #jot #jot-tools span a {
     display: block;
-    /*color: #cccccc;    */
-    /*width: 100%;       */
-    /*height: 40px;      */
-    /*text-align: center;*/
-    /*line-height: 40px; */
-    /*overflow: hidden;*/
 }
-/*#jot #jot-tools li:hover {*/
-    /*background-color: #364e59;*/
-/*}*/
 #jot #jot-tools .perms {
     float: right;
     width: 40px;
 }
-/*#jot #jot-tools .perms a.unlock {*/
-/*    width: 30px;                    */
-/*    border-left: 10px solid #cccccc;*/
-/*    background-color: #cccccc;      */
-/*}*/
-/*#jot #jot-tools .perms a.lock {*/
-/*    width: 30px;                    */
-/*    border-left: 10px solid #666666;*/
-/*    background-color: #666666;      */
-/*}*/
-/*#jot #jot-tools li.submit {            */
-/*    float: right;                      */
-/*    background-color: #cccccc;         */
-/*    border-bottom: 2px solid #cccccc;  */
-/*    border-right: 1px solid #666666;   */
-/*    border-left: 1px solid #666666;    */
-/*}                                      */
-/*#jot #jot-tools li.submit input {      */
-/*    border: 0px;                       */
-/*    margin: 0px;                       */
-/*    padding: 0px;                      */
-/*    background-color: #cccccc;         */
-/*    color: #666666;                    */
-/*    width: 80px;                       */
-/*    height: 40px;                      */
-/*    line-height: 40px;                 */
-/*}                                      */
-/*#jot #jot-tools li.submit input:hover {*/
-/*    background-color: #bdcdd4;         */
-/*    color: #666666;                    */
-/*}                                      */
 #jot #jot-tools li.loading {
     float: right;
     background-color: #ffffff;
@@ -945,17 +924,22 @@ aside #viewcontacts {
 }
 #jot-preview-content {
     background-color: #ffffe0;
-    border: 1px #aaaa00 solid;
+       color: #111;
+    border: 1px #aa0 solid;
     border-radius: 3px;
     padding: 3px 3px 6px 10px;
 }
+#jot-preview-content .wall-item-outside-wrapper {
+       border: 0;
+       border-radius: 0px;
+}
 
 
 /**
  * section
  */
 section {
-    margin: 20px 6% 0 4%;
+    margin: 20px 8% 0 4%;
     font-size: 0.8em;
     padding-right: 230px;
        min-width: 475px;
@@ -964,28 +948,32 @@ section {
 /** tabs **/
 .tabs {
     list-style: none;
-    margin: 10px 0 10px;
+    margin: 10px 0;
     padding: 0;
-    border-bottom: 1px solid #729fcf;
-    font-size: 14px;
 }
 .tabs li {
     display: inline;
 }
 .tab {
-    padding: 0 5px;
+    border: 1px solid #729fcf;
+       padding: 4px;
 }
 .tab:hover {
-    background-color: #729fcf;
+    background: #729fcf;
     color: #eeeeec;
-    border: 0px;
 }
 .tab:active {
-    background-color: #729fcf;
+    background: #729fcf;
     color: #eeeeec;
-    border: 0px;
 }
-
+.tab.active {
+       background: #729fcf;
+    color: #eeeeec;
+}
+.tab a {
+       border: 0;
+       text-decoration: none;
+}
 
 /**
  *     items
@@ -1011,6 +999,9 @@ section {
 .shiny {
     background: #efefdf;
 }
+.heart {
+       color: red;
+}
 .wall-item-content {
        overflow-x: auto;
 }
@@ -1297,6 +1288,7 @@ section {
        border-style: solid;
        border-width: 1px 1px 1px 10px;
        background: #eee;
+       color: #444;
        width: 95%;
 }
 
@@ -1553,8 +1545,7 @@ div[id$="wrapper"] br {
 .view-contact-wrapper,
 .contact-entry-wrapper {
     float: left;
-    margin-right: 5px;
-    margin-bottom: 40px;
+    margin: 0 5px 40px 0;
     width: 120px;
        height: 120px;
        padding: 3px;
@@ -1666,8 +1657,9 @@ div[id$="wrapper"] br {
 }
 .contact-photo-menu {
     width: auto;
-    border: 2px solid #444444;
-    background: #FFFFFF;
+    border: 2px solid #444;
+    background: #eee;
+       color: #111;
     position: absolute;
     left: 0px; top: 90px;
     display: none;
@@ -1706,6 +1698,7 @@ div[id$="wrapper"] br {
     -moz-border-radius: 5px;
     border-radius: 5px;
     padding: 5px;
+       color: #111;
 }
 #settings-default-perms {
     margin-bottom: 20px;
@@ -1715,17 +1708,20 @@ div[id$="wrapper"] br {
     clear: both;
 }
 
-#register-form label,
-#profile-edit-form label {
-       width: 300px;
-    float: left;
-}
+/*#register-form label,     */
+/*#profile-edit-form label {*/
+/*    width: 300px;         */
+/*    float: left;          */
+/*}                         */
 
-#register-form span,
-#profile-edit-form span {
-    color:#555753;
-    display:block;
-    margin-bottom:20px;
+/*#register-form span,     */
+/*#profile-edit-form span {*/
+/*    color: #555753;      */
+/*    display: block;      */
+/*    margin-bottom: 20px; */
+/*}                        */
+#profile-edit-marital-label span {
+       margin: -4px;
 }
 .settings-submit-wrapper,
 .profile-edit-submit-wrapper {
@@ -1742,17 +1738,19 @@ div[id$="wrapper"] br {
     float: left;
     margin: 20px 20px 0px 0px;
 }
-
 #profile-edit-links ul {
     margin: 20px 0;
     padding: 0;
     list-style: none;
 }
-
 #register-sitename {
     display: inline;
     font-weight: bold;
 }
+#advanced-expire-popup {
+/*     background: #2e2f2e;
+       color: #eec;*/
+}
 
 /**
  *     contacts selector
@@ -1945,7 +1943,12 @@ div[id$="wrapper"] br {
  */
 .directory-item {
     float: left;
-    margin: 50px 50px 0px 0px;
+       /*margin: 50px 50px 0px 0px;*/
+       margin: 0 5px 4px 0;
+       padding: 3px;
+       width: 180px;
+       height: 250px;
+    position: relative;
 }
 
 
@@ -1957,6 +1960,7 @@ div[id$="wrapper"] br {
 }
 .group-selected, .nets-selected {
     padding: 3px;
+       color: #111;
     border: 1px solid #CCCCCC;
     background: #F8F8F8;
     font-weight: bold;
@@ -2132,6 +2136,7 @@ div[id$="wrapper"] br {
        padding: 5px;
        background: #eee;
        vertical-align: middle;
+       color: #111;
 }
 .field input, input[type="text"] {
        width: 250px;
@@ -2172,7 +2177,7 @@ div[id$="wrapper"] br {
     display:none !important;
 }
 .field.radio .field_help {
-    margin-left: 0;
+    margin-left: 297px;
 }
 
 
@@ -2182,8 +2187,8 @@ div[id$="wrapper"] br {
 .popup {       
        width: 100%;
     height: 100%;
-       top:0px;
-    left:0px;
+       top: 0px;
+    left: 0px;
        position: absolute;
        display: none;
 }
@@ -2298,12 +2303,6 @@ div[id$="wrapper"] br {
 .icon.drophide, .icon.delete {
     float: left;
 }
-/*.icon.s22 {
-       display: block;
-       background: url(icons.png) no-repeat;
-       width: 22px;
-       height: 22px;
-}*/
 .icon.s22.delete {
        display: block;
        background-position: -110px 0;
@@ -2594,7 +2593,8 @@ footer {
 
 /* autocomplete popup */
 .acpopup {
-       max-height: 150px;
+       max-height: 175px;
+    max-width: 42%;
        background-color: #555753;
        color: #fff;
        overflow: auto;
@@ -2649,4 +2649,3 @@ footer {
         font-size: 15pt;
     }
 }
-
index c72884f1a5475c7688440086a982751be0352fd3..cbfcb09e675f416f9d00253559a320f109d2945a 100644 (file)
@@ -1,5 +1,17 @@
 <?php
-$a->theme_info = array();
+
+/*
+ * Name: Dispy
+ * Description: Dispy, Friendica theme
+ * Version: 0.9
+ * Author: unknown
+ * Maintainer: Simon <http://simon.kisikew.org/>
+ */
+
+
+$a->theme_info = array(
+       'extends' => 'dispy'
+);
 
 $a->page['htmlhead'] .= <<< EOT
 <script>
@@ -52,6 +64,26 @@ $(document).ready(function() {
             $('#drop-' + id).addClass('iconspacer'); }
         );
 
+       // notifications
+       $('html').click(function() {
+               $('#nav-notifications-linkmenu').removeClass('selected');
+               document.getElementById("nav-notifications-menu").style.display = "none";
+       });
+
+       $('#nav-notifications-linkmenu').click(function(event) {
+               event.stopPropagation();
+       });
+
+       // usermenu
+       $('html').click(function() {
+               $('#nav-user-linkmenu').removeClass('selected');
+               document.getElementById("nav-user-menu").style.display = "none";
+       });
+
+       $('#nav-user-linkmenu').click(function(event) {
+               event.stopPropagation();
+       });
+
     function toggleToolbar() {
         if ( $('#nav-floater').is(':visible') ) {
             $('#nav-floater').slideUp('fast');
@@ -71,4 +103,11 @@ $(document).ready(function() {
     });
 });
 </script>
+<script>
+$(document).ready(function() {
+       $('#profile-jot-text').focusin(function() {
+               $(this).css('color: #eec;');
+       });
+});
+</script>
 EOT;
diff --git a/view/theme/duepuntozero/file.gif b/view/theme/duepuntozero/file.gif
new file mode 100644 (file)
index 0000000..7885b99
Binary files /dev/null and b/view/theme/duepuntozero/file.gif differ
index acd97eb941d5bac00f3f450f69a886c7cd6bf2f9..10ddb00909df6c754bfd9d9cda46475a47c21b1b 100755 (executable)
@@ -309,7 +309,7 @@ div.wall-item-content-wrapper.shiny {
        margin-bottom: 10px;
 }
 
-.group-selected, .nets-selected {
+.group-selected, .nets-selected, .fileas-selected {
        padding: 3px;
        -moz-border-radius: 3px;
        border-radius: 3px;     
@@ -1024,6 +1024,10 @@ input#dfrn-url {
        float: left;    
 }
 
+.filer-item {
+       margin-left: 10px;
+       float: left;
+}
 
 .wall-item-links-wrapper {
        float: left;
@@ -1864,11 +1868,11 @@ a.mail-list-link {
        margin-top: 10px;
 }
 
-.nets-ul {
+.nets-ul, .fileas-ul {
        list-style-type: none;
 }
 
-.nets-ul li {
+.nets-ul li, .fileas-ul li {
        margin-top: 10px;
 }
 
@@ -1879,6 +1883,14 @@ a.mail-list-link {
        margin-left: 42px;
 }
 
+.fileas-link {
+       margin-left: 24px;
+}
+
+.fileas-all {
+       margin-left: 0px;
+}
+
 #search-save {
        margin-left: 5px;
 }
@@ -2902,6 +2914,11 @@ aside input[type='text'] {
 .tagged { background-position: -48px -48px; }
 
 
+.filer-icon {
+       display: block; width: 16px; height: 16px;
+       background-image: url('file.gif');
+}
+
 .icon.dim { opacity: 0.3;filter:alpha(opacity=30); }
 
 .attachtype {
index 7d919fedc85a3d8cca522a3edc60e55e7c94622f..701fb134918df80fb101b77e7a2c648131a16863 100755 (executable)
@@ -5,6 +5,8 @@ $a->page['htmlhead'] .= <<< EOT
 <script>
 $(document).ready(function() {
 
+$('html').click(function() { $("#nav-notifications-menu" ).hide(); });
+
 $('.group-edit-icon').hover(
        function() {
                $(this).addClass('icon'); $(this).removeClass('iconspacer');},
index 51e36b6f4f946a9a78f77e49b0e22ecaf7b3f4f9..2c88fc598ef914d6c64fed26b81eee8f834b09db 100755 (executable)
@@ -56,6 +56,7 @@
                        {{ if $item.star }}
                        <a href="#" id="starred-$item.id" onclick="dostar($item.id); return false;" class="star-item icon $item.isstarred" title="$item.star.toggle"></a>
                        <a href="#" id="tagger-$item.id" onclick="itemTag($item.id); return false;" class="tag-item icon tagged" title="$item.star.tagger"></a>
+                       <a href="#" id="filer-$item.id" onclick="itemFiler($item.id); return false;" class="filer-item filer-icon" title="$item.star.filer"></a>
                        {{ endif }}
                        
                        <div class="wall-item-delete-wrapper" id="wall-item-delete-wrapper-$item.id" >
diff --git a/view/theme/greenzero/file.gif b/view/theme/greenzero/file.gif
new file mode 100644 (file)
index 0000000..e388a13
Binary files /dev/null and b/view/theme/greenzero/file.gif differ
index 5d63583f42ac3bbea15faf2b60a342560bb24196..ceec4dd97640c3a5b4f1224f4df94ce63a9bfeee 100755 (executable)
@@ -7,6 +7,8 @@ $a->page['htmlhead'] .= <<< EOT
 <script>
 $(document).ready(function() {
 
+$('html').click(function() { $("#nav-notifications-menu" ).hide(); });
+
 $('.group-edit-icon').hover(
        function() {
                $(this).addClass('icon'); $(this).removeClass('iconspacer');},
index 5d63583f42ac3bbea15faf2b60a342560bb24196..ceec4dd97640c3a5b4f1224f4df94ce63a9bfeee 100755 (executable)
@@ -7,6 +7,8 @@ $a->page['htmlhead'] .= <<< EOT
 <script>
 $(document).ready(function() {
 
+$('html').click(function() { $("#nav-notifications-menu" ).hide(); });
+
 $('.group-edit-icon').hover(
        function() {
                $(this).addClass('icon'); $(this).removeClass('iconspacer');},
diff --git a/view/theme/slack-NS/style.css b/view/theme/slack-NS/style.css
new file mode 100755 (executable)
index 0000000..82bceea
--- /dev/null
@@ -0,0 +1,51 @@
+@import url('../duepuntozero/style.css');
+
+.wall-item-content-wrapper {
+       border: none;
+}
+
+.wall-item-content-wrapper.comment {
+       background: #ffffff !important;
+       border-left: 1px solid #EEE;
+}
+
+.wall-item-tools {
+       background: none;
+}
+
+.wall-item-content { 
+       max-height: 20000px; 
+       overflow: none; 
+}
+
+.comment-edit-text-empty, .comment-edit-text-full {
+       border: none;
+       border-left: 1px solid #EEE;
+       background: #EEEEEE;
+}
+
+.comment-edit-wrapper, .comment-wwedit-wrapper {
+       background: #ffffff !important;
+}
+
+section {
+       margin: 0px 32px;
+}
+
+aside {
+       margin-left: 32px;
+}
+nav {
+       margin-left: 32px;
+       margin-right: 32px;
+}
+
+nav #site-location {
+       top: 80px;
+       right: 36px;
+}
+
+.wall-item-photo, .photo, .contact-block-img, .my-comment-photo {
+       border-radius: 3px;
+       -moz-border-radius: 3px;
+}
diff --git a/view/theme/slack-NS/theme.php b/view/theme/slack-NS/theme.php
new file mode 100755 (executable)
index 0000000..ceec4dd
--- /dev/null
@@ -0,0 +1,51 @@
+<?php
+$a->theme_info = array(
+  'extends' => 'duepuntozero',
+);
+
+$a->page['htmlhead'] .= <<< EOT
+<script>
+$(document).ready(function() {
+
+$('html').click(function() { $("#nav-notifications-menu" ).hide(); });
+
+$('.group-edit-icon').hover(
+       function() {
+               $(this).addClass('icon'); $(this).removeClass('iconspacer');},
+       function() {
+               $(this).removeClass('icon'); $(this).addClass('iconspacer');}
+       );
+
+$('.sidebar-group-element').hover(
+       function() {
+               id = $(this).attr('id');
+               $('#edit-' + id).addClass('icon'); $('#edit-' + id).removeClass('iconspacer');},
+
+       function() {
+               id = $(this).attr('id');
+               $('#edit-' + id).removeClass('icon');$('#edit-' + id).addClass('iconspacer');}
+       );
+
+
+$('.savedsearchdrop').hover(
+       function() {
+               $(this).addClass('drop'); $(this).addClass('icon'); $(this).removeClass('iconspacer');},
+       function() {
+               $(this).removeClass('drop'); $(this).removeClass('icon'); $(this).addClass('iconspacer');}
+       );
+
+$('.savedsearchterm').hover(
+       function() {
+               id = $(this).attr('id');
+               $('#drop-' + id).addClass('icon');      $('#drop-' + id).addClass('drophide'); $('#drop-' + id).removeClass('iconspacer');},
+
+       function() {
+               id = $(this).attr('id');
+               $('#drop-' + id).removeClass('icon');$('#drop-' + id).removeClass('drophide'); $('#drop-' + id).addClass('iconspacer');}
+       );
+
+});
+
+
+</script>
+EOT;
index 5d63583f42ac3bbea15faf2b60a342560bb24196..ceec4dd97640c3a5b4f1224f4df94ce63a9bfeee 100755 (executable)
@@ -7,6 +7,8 @@ $a->page['htmlhead'] .= <<< EOT
 <script>
 $(document).ready(function() {
 
+$('html').click(function() { $("#nav-notifications-menu" ).hide(); });
+
 $('.group-edit-icon').hover(
        function() {
                $(this).addClass('icon'); $(this).removeClass('iconspacer');},
index 87ce4dd7355d3378bf5013d673d122975d1a209b..591d9e066b2c91a52b1ce9300f404dc87c04bb61 100644 (file)
@@ -7,3 +7,12 @@
  * Author: Devlon Duthied
  * Maintainer: Mike Macgirvin <mike@macgirvin.com>
  */
+
+$a->page['htmlhead'] .= <<< EOT
+<script>
+$(document).ready(function() {
+
+$('html').click(function() { $("#nav-notifications-menu" ).hide(); });
+});
+</script>
+EOT;