diff --git a/.gitignore b/.gitignore index a2d1ffa547..cbdf03673b 100644 --- a/.gitignore +++ b/.gitignore @@ -7,4 +7,4 @@ include/jquery-1.4.2.min.js *.version* favicon.* home.html -*~ +addon diff --git a/LICENSE b/LICENSE index 33579fe080..3136dd4f81 100644 --- a/LICENSE +++ b/LICENSE @@ -1,25 +1,20 @@ -The Friendika project is distributed under the following license terms: +Copyright (c) 2010, 2011 the Friendika Project +All rights reserved. -* This software is provided for any use with no license terms or restrictions. - -No guarantee is provided. Use at your own risk. - -Components packaged with this software may fall under different license terms. - -cropper - BSD -TwitterOAuth - BSD -markdown - BSD -slinky - BSD -ajax-upload - MIT -simplepie - MIT -LightOpenID - MIT -HTML5 - MIT -jQuery - MIT -TinyMCE - LGPL -phpsec - LGPL -HTMLPurifer - LGPL -Facebook SDK - Apache - -Addons, plugins, and themes may also be provided under their own license terms. +Permission is hereby granted, free of charge, to any person obtaining a copy +of this software and associated documentation files (the "Software"), to deal +in the Software without restriction, including without limitation the rights +to use, copy, modify, merge, publish, distribute, sublicense, and/or sell +copies of the Software, and to permit persons to whom the Software is +furnished to do so, subject to the following conditions: +The above copyright notice and this permission notice shall be included in +all copies or substantial portions of the Software. +THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR +IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, +FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE +AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER +LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, +OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN +THE SOFTWARE. diff --git a/README b/README deleted file mode 100644 index 598b6d2921..0000000000 --- a/README +++ /dev/null @@ -1,86 +0,0 @@ - - ************* - * Friendika * - ************* - - Friendika Communications Server - - http://project.friendika.com - - - Friendika is a web application for managing social communications. Some -would call it a "social network" or "distributed social network". We think -both terms have been over-used, and don't adequately describe Friendika's -capabilities - though Friendika can also fill those roles. - - At its essence, Friendika is a web application which can monitor various -information and social activity streams, and which also lets you participate -in online conversations with friends and associates, using a variety of network -protocols. These are combined into an overview of your various communications -and activities - regardless of network origin. - - Friendika also manages your personal profiles and photo albums and lets -you securely present each of these to specific audiences. Your communications -can be either open and public, or closed and private. You can easily create -"groups" of contacts with which you can partition your conversations into -private social circles, and which cannot be seen outside the circle. - - Friendika is decentralised. Any account on any Friendika server can connect -with any account on any other Friendika server. You can also connect to and -interact directly with friends on Facebook, Status.Net, and other federated -social web services (e.g. identi.ca, GNU-Social, etc.). - - Outgoing communications can be directed to Friendika, existing accounts on -Facebook and Twitter, federated social web providers - or even delivered to -email contacts. - - Incoming data streams aren't limited to traditional social networks. -They may include most any service which provides a syndication feed (both RSS -and Atom). This allows you to view communications from friends in other -diverse social networks - such as Diaspora, Google Buzz, and millions of -blogs, news services, and other websites. You can also import -contacts from (and write to) anybody that is accessible from your email -INBOX and view them in your social stream. Over time we will try to -build two-way bridges to other services so that you can freely -interact in both directions with anybody on an accessible network that -allows it. - - Communications between Friendika servers are private and encrypted, -using military grade encryption - and require mutual identity provenance -before any data is exchanged. These same crypto mechanisms provide remote -password-less authentication; allowing you to post to profiles and view private -photo collections on other servers - without encountering any login and/or -authorisation dialogues when visiting these sites. - - Friendika has no boundaries and no central ownership of the data generated -within the network. Anybody with a commodity PHP/MySQL web server or hosting -account can provide a server, and each individual server can then support -up to several thousand participating members - each with their own unique -communication and privacy needs. This allows Friendika to scale to global -levels and mimics the decentralised architecture of the web itself. - - If you are creating a website which requires social interaction, Friendika -can also take the place of blog software, forum software and feed readers, and -also provide individualised communications and content management - or -simply be used as an alternative to traditional "monolithic" social networks. - - Friendika is also free - in every sense of the word. - - Choose freedom - join us. - - Find out more about the project at http://project.friendika.com - - ******************* - Friendika Demo Site - ******************* - - http://demo.friendika.com - - ******************* - Friendika Downloads - ******************* - - http://github.com/friendika/friendika/tarball/master - - - diff --git a/addon/LICENSE b/addon/LICENSE deleted file mode 100644 index 02cff93203..0000000000 --- a/addon/LICENSE +++ /dev/null @@ -1,10 +0,0 @@ -Friendika addons/plugins license terms are under the control of the project -author or authors. - -Developers are free to set their own license terms on addons/plugins as -standalone works. These license terms apply only to the covered addon or -plugin. - -Addons/plugins may be licensed under copyleft or other license terms. Although -these projects may require Friendika to operate, no addon or plugin may -mandate any changes to the Friendika project license. diff --git a/addon/README b/addon/README deleted file mode 100644 index fb1c6340a5..0000000000 --- a/addon/README +++ /dev/null @@ -1,186 +0,0 @@ -Friendika Addon/Plugin development - -This is an early specification and hook details may be subject to change. - -Please see the sample addon 'randplace' for a working example of using these features. - - -You must register plugins with the system in the .htconfig.php file. - -$a->config['system']['addon'] = 'plugin1name, plugin2name, another_name'; - -Plugin names cannot contain spaces and are used as filenames. - - -Register your plugin hooks during installation. - - register_hook($hookname, $file, $function); - - $hookname is a string and corresponds to a known Friendika hook - $file is a pathname relative to the top-level Friendika directory. - This *should* be 'addon/plugin_name/plugin_name.php' in most cases. - $function is a string and is the name of the function which will be executed - when the hook is called. - - -Your hook functions will be called with at least one and possibly two arguments - - function myhook_function(&$a, &$b) { - - - } - -If you wish to make changes to the calling data, you must declare them as -reference variables (with '&') during function declaration. - -$a is the Friendika 'App' class - which contains a wealth of information -about the current state of Friendika, such as which module has been called, -configuration info, the page contents at the point the hook was invoked, profile -and user information, etc. It is recommeded you call this '$a' to match its usage -elsewhere. - -$b can be called anything you like. This is information which is specific to the hook -currently being processed, and generally contains information that is being immediately -processed or acted on that you can use, display, or alter. Remember to declare it with -'&' if you wish to alter it. - - -Current hooks: - -'authenticate' - called when a user attempts to login. - $b is an array - 'username' => the supplied username - 'password' => the supplied password - 'authenticated' => set this to non-zero to authenticate the user. - 'user_record' => successful authentication must also return a valid user record from the database - - -'logged_in' - called after a user has successfully logged in. - $b contains the $a->user array - - -'display_item' - called when formatting a post for display. - $b is an array - 'item' => The item (array) details pulled from the database - 'output' => the (string) HTML representation of this item prior to adding it - to the page - -'post_local' - called when a status post or comment is entered on the local system - $b is the item array of the information to be stored in the database - {Please note: body contents are bbcode - not HTML) - -'post_local_end' - called when a local status post or comment has been stored on the local system - $b is the item array of the information which has just been stored in the database - {Please note: body contents are bbcode - not HTML) - - -'post_remote' - called when receiving a post from another source. This may also be used - to post local activity or system generated messages. - $b is the item array of information to be stored in the database and the item - body is bbcode. - -'settings_form' - called when generating the HTML for the user Settings page - $b is the (string) HTML of the settings page before the final '' tag. - -'settings_post' - called when the Settings pages are submitted. - $b is the $_POST array - -'plugin_settings' - called when generating the HTML for the addon settings page - $b is the (string) HTML of the addon settings page before the final '' tag. - -'plugin_settings_post' - called when the Addon Settings pages are submitted. - $b is the $_POST array - -'profile_post' - called when posting a profile page. - $b is the $_POST array - -'profile_edit' - called prior to output of profile edit page - $b is array - 'profile' => profile (array) record from the database - 'entry' => the (string) HTML of the generated entry - -'profile_advanced' - called when the HTML is generated for the 'Advanced profile', - corresponding to the 'Profile' tab within a person's profile page. - $b is the (string) HTML representation of the generated profile - -'directory_item' - called from the Directory page when formatting an item for display - $b is an array - 'contact' => contact (array) record for the person from the database - 'entry' => the (string) HTML of the generated entry - -'profile_sidebar_enter' - called prior to generating the sidebar "short" profile for a page - $b is (array) the person's profile array - -'profile_sidebar' - called when generating the sidebar "short" profile for a page - $b is an array - 'profile' => profile (array) record for the person from the database - 'entry' => the (string) HTML of the generated entry - -'contact_block_end' - called when formatting the block of contacts/friends on a - profile sidebar has completed - $b is an array - 'contacts' => contact array of entries - 'output' => the (string) generated HTML of the contact block - -'bbcode' - called during conversion of bbcode to html - $b is (string) converted text - -'html2bbcode' - called during conversion of html to bbcode (e.g. remote message posting) - $b is (string) converted text - - -'page_header' - called after building the page navigation section - $b is (string) HTML of nav region - - -'personal_xrd' - called prior to output of personal XRD file. - $b is an array - 'user' => the user record for the person - 'xml' => the complete XML to be output - - -'home_content' - called prior to output home page content, shown to unlogged users - $b is (string) HTML of section region - -'contact_edit' - called when editing contact details on an individual from the Contacts page - $b is (array) - 'contact' => contact record (array) of target contact - 'output' => the (string) generated HTML of the contact edit page - -'contact_edit_post' - called when posting the contact edit page - $b is the $_POST array - -'init_1' - called just after DB has been opened and before session start - $b is not used or passed - -'page_end' - called after HTML content functions have completed - $b is (string) HTML of content div - -'jot_plugin' - add tools to jot toolbar - $b is (string) HTML for tool icon - - -*** = subject to change - - - - - -Not yet documented: - -'atom_feed' *** - -'atom_feed_end' *** - -'parse_atom' *** - -'atom_author' *** - -'atom_entry' *** - -'parse_link' *** - - - - - diff --git a/addon/calc/calc.php b/addon/calc/calc.php deleted file mode 100644 index 47fb22d339..0000000000 --- a/addon/calc/calc.php +++ /dev/null @@ -1,363 +0,0 @@ - - */ - - -function calc_install() { - register_hook('app_menu', 'addon/calc/calc.php', 'calc_app_menu'); -} - -function calc_uninstall() { - unregister_hook('app_menu', 'addon/calc/calc.php', 'calc_app_menu'); - -} - -function calc_app_menu($a,&$b) { - $b['app_menu'][] = Array('url'=>'calc', 'name'=>'Calculator'); -} - - -function calc_module() {} - - - - -function calc_init($a) { - -$x = <<< EOT - - - -EOT; -$a->page['htmlhead'] .= $x; -} - -function calc_content($app) { - -$o = ''; - -$o .= <<< EOT - -

Calculator

-

- -
- -
- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
- - - - -
- - -
- -EOT; -return $o; - -} diff --git a/addon/convert/UnitConvertor.php b/addon/convert/UnitConvertor.php deleted file mode 100644 index d7933a8fb4..0000000000 --- a/addon/convert/UnitConvertor.php +++ /dev/null @@ -1,283 +0,0 @@ - | -// | Co-authored by : CVH, Chris Hansel | -// +----------------------------------------------------------------------+ -// -// $Id: UnitConvertor.php,v 1.00 2002/02/20 11:40:00 stasokhvat Exp $ - -/** -* UnitConvertor is able to convert between different units and currencies. -* -* @author Stanislav Okhvat -* @version $Id: UnitConvertor.php,v 1.00 2002/03/01 17:00:00 stasokhvat Exp $ -* @package UnitConvertor -* @access public -* @history 01.03.2002 Implemented the code for regular and offset-based -* conversions -* -* 13.12.2004 -* By Chris Hansel (CVH): changed getConvSpecs in order to have it look up -* intermediary conversions (also see comments in check_key). -* -* Intermediary conversions are useful when no conversion ratio is specified -* between two units when we calculate between the two. For example, we want -* to convert between Fahrenheit and Kelvin, and we have only -* specified how to convert Centigrade<->Fahrenheit and -* Centigrade<->Kelvin. While a direct (Fahrenheit->Kelvin) or -* reverse (Kelvin->Fahrenheit) lookups fail, looking for an intermediary -* unit linking the two (Centigrade) helps us do the conversion. -* -* 13.12.2004 -* Chris Hansel (CVH): $to_array argument of addConversion method can now -* contain units as 'unit1/unit2/unit3', when all units stand for the same -* thing. See examples in unitconv.php -*/ -class UnitConvertor -{ - /** - * Stores conversion ratios. - * - * @var array - * @access private - */ - var $conversion_table = array(); - - /** - * Decimal point character (default is "." - American - set in constructor). - * - * @var string - * @access private - */ - var $decimal_point; - - /** - * Thousands separator (default is "," - American - set in constructor). - * - * @var string - * @access private - */ - var $thousand_separator; - - /** - * For future use - * - * @var array - * @access private - */ - var $bases = array(); - - /** - * Constructor. Initializes the UnitConvertor object with the most important - * properties. - * - * @param string decimal point character - * @param string thousand separator character - * @return void - * @access public - */ - function UnitConvertor($dec_point = '.', $thousand_sep = ',') - { - $this->decimal_point = $dec_point; - $this->thousand_separator = $thousand_sep; - - } // end func UnitConvertor - - /** - * Adds a conversion ratio to the conversion table. - * - * @param string the name of unit from which to convert - * @param array array( - * "pound"=>array("ratio"=>'', "offset"=>'') - * ) - * "pound" - name of unit to set conversion ration to - * "ratio" - 'double' conversion ratio which, when - * multiplied by the number of $from_unit units produces - * the result - * "offset" - an offset from 0 which will be added to - * the result when converting (needed for temperature - * conversions and defaults to 0). - * @return boolean true if successful, false otherwise - * @access public - */ - function addConversion($from_unit, $to_array) - { - if (!isset($this->conversion_table[$from_unit])) { - while(list($key, $val) = each($to_array)) - { - if (strstr($key, '/')) - { - $to_units = explode('/', $key); - foreach ($to_units as $to_unit) - { - $this->bases[$from_unit][] = $to_unit; - - if (!is_array($val)) - { - $this->conversion_table[$from_unit."_".$to_unit] = array("ratio"=>$val, "offset"=>0); - } - else - { - $this->conversion_table[$from_unit."_".$to_unit] = - array( - "ratio"=>$val['ratio'], - "offset"=>(isset($val['offset']) ? $val['offset'] : 0) - ); - } - } - } - else - { - $this->bases[$from_unit][] = $key; - - if (!is_array($val)) - { - $this->conversion_table[$from_unit."_".$key] = array("ratio"=>$val, "offset"=>0); - } - else - { - $this->conversion_table[$from_unit."_".$key] = - array( - "ratio"=>$val['ratio'], - "offset"=>(isset($val['offset']) ? $val['offset'] : 0) - ); - } - } - } - return true; - } - return false; - - } // end func addConversion - - /** - * Converts from one unit to another using specified precision. - * - * @param double value to convert - * @param string name of the source unit from which to convert - * @param string name of the target unit to which we are converting - * @param integer double precision of the end result - * @return void - * @access public - */ - function convert($value, $from_unit, $to_unit, $precision) - { - if ($this->getConvSpecs($from_unit, $to_unit, $value, $converted )) - { - return number_format($converted , (int)$precision, $this->decimal_point, $this->thousand_separator); - } else { - return false; - } - } // end func - - /** - * CVH : changed this Function getConvSpecs in order to have it look up - * intermediary Conversions from the - * "base" unit being that one that has the highest hierarchical order in one - * "logical" Conversion_Array - * when taking $conv->addConversion('km', - * array('meter'=>1000, 'dmeter'=>10000, 'centimeter'=>100000, - * 'millimeter'=>1000000, 'mile'=>0.62137, 'naut.mile'=>0.53996, - * 'inch(es)/zoll'=>39370, 'ft/foot/feet'=>3280.8, 'yd/yard'=>1093.6)); - * "km" would be the logical base unit for all units of dinstance, thus, - * if the function fails to find a direct or reverse conversion in the table - * it is only logical to suspect that if there is a chance - * converting the value it only is via the "base" unit, and so - * there is not even a need for a recursive search keeping the perfomance - * acceptable and the ressource small... - * - * CVH check_key checks for a key in the Conversiontable and returns a value - */ - function check_key( $key) { - if ( array_key_exists ($key,$this->conversion_table)) { - if (! empty($this->conversion_table[$key])) { - return $this->conversion_table[$key]; - } - } - return false; - } - - /** - * Key function. Finds the conversion ratio and offset from one unit to another. - * - * @param string name of the source unit from which to convert - * @param string name of the target unit to which we are converting - * @param double conversion ratio found. Returned by reference. - * @param double offset which needs to be added (or subtracted, if negative) - * to the result to convert correctly. - * For temperature or some scientific conversions, - * i.e. Fahrenheit -> Celcius - * @return boolean true if ratio and offset are found for the supplied - * units, false otherwise - * @access private - */ - function getConvSpecs($from_unit, $to_unit, $value, &$converted) - { - $key = $from_unit."_".$to_unit; - $revkey = $to_unit."_".$from_unit; - $found = false; - if ($ct_arr = $this->check_key($key)) { - // Conversion Specs found directly - $ratio = (double)$ct_arr['ratio']; - $offset = $ct_arr['offset']; - $converted = (double)(($value * $ratio)+ $offset); - - return true; - } // not found in direct order, try reverse order - elseif ($ct_arr = $this->check_key($revkey)) { - $ratio = (double)(1/$ct_arr['ratio']); - $offset = -$ct_arr['offset']; - $converted = (double)(($value + $offset) * $ratio); - - return true; - } // not found test for intermediary conversion - else { - // return ratio = 1 if keyparts match - if ($key == $revkey) { - $ratio = 1; - $offset = 0; - $converted = $value; - return true; - } - // otherwise search intermediary - reset($this->conversion_table); - while (list($convk, $i1_value) = each($this->conversion_table)) { - // split the key into parts - $keyparts = preg_split("/_/",$convk); - // return ratio = 1 if keyparts match - - // Now test if either part matches the from or to unit - if ($keyparts[1] == $to_unit && ($i2_value = $this->check_key($keyparts[0]."_".$from_unit))) { - // an intermediary $keyparts[0] was found - // now let us put things together intermediary 1 and 2 - $converted = (double)(((($value - $i2_value['offset']) / $i2_value['ratio']) * $i1_value['ratio'])+ $i1_value['offset']); - - $found = true; - - } elseif ($keyparts[1] == $from_unit && ($i2_value = $this->check_key($keyparts[0]."_".$to_unit))) { - // an intermediary $keyparts[0] was found - // now let us put things together intermediary 2 and 1 - $converted = (double)(((($value - $i1_value['offset']) / $i1_value['ratio']) + $i2_value['offset']) * $i2_value['ratio']); - - $found = true; - } - } - return $found; - } - - } // end func getConvSpecs - -} // end class UnitConvertor -?> \ No newline at end of file diff --git a/addon/convert/convert.php b/addon/convert/convert.php deleted file mode 100644 index aaa56a43e0..0000000000 --- a/addon/convert/convert.php +++ /dev/null @@ -1,228 +0,0 @@ - - */ - -function convert_install() { - register_hook('app_menu', 'addon/convert/convert.php', 'convert_app_menu'); -} - -function convert_uninstall() { - unregister_hook('app_menu', 'addon/convert/convert.php', 'convert_app_menu'); -} - -function convert_app_menu($a,&$b) { - $b['app_menu'][] = Array('url'=>'convert', 'name'=>'Units Conversion'); -} - - -function convert_module() {} - - - - - - - -function convert_content($app) { - -include("UnitConvertor.php"); - - class TP_Converter extends UnitConvertor { - function TP_Converter($lang = "en") - { - if ($lang != 'en' ) { - $dec_point = '.'; $thousand_sep = "'"; - } else { - $dec_point = '.'; $thousand_sep = ","; - } - - $this->UnitConvertor($dec_point , $thousand_sep ); - - } // end func UnitConvertor - - function find_base_unit($from,$to) { - while (list($skey,$sval) = each($this->bases)) { - if ($skey == $from || $to == $skey || in_array($to,$sval) || in_array($from,$sval)) { - return $skey; - } - } - return false; - } - - function getTable($value, $from_unit, $to_unit, $precision) { - - if ($base_unit = $this->find_base_unit($from_unit,$to_unit)) { - - // A baseunit was found now lets convert from -> $base_unit - - $cell ['value'] = $this->convert($value, $from_unit, $base_unit, $precision)." ".$base_unit; - $cell ['class'] = ($base_unit == $from_unit || $base_unit == $to_unit) ? "framedred": ""; - $cells[] = $cell; - // We now have the base unit and value now lets produce the table; - while (list($key,$val) = each($this->bases[$base_unit])) { - $cell ['value'] = $this->convert($value, $from_unit, $val, $precision)." ".$val; - $cell ['class'] = ($val == $from_unit || $val == $to_unit) ? "framedred": ""; - $cells[] = $cell; - } - - $cc = count($cells); - $string = ""; - $string .= ""; - $i=0; - foreach ($cells as $cell) { - if ($i==0) { - $string .= ""; - $i++; - } else { - $string .= ""; - } - } - $string .= "
$value $from_unit".$cell['value']."
".$cell['value']."
"; - return $string; - } - - } -} - - -$conv = new TP_Converter('en'); - - -$conversions = array( - 'Temperature'=>array('base' =>'Celsius', - 'conv'=>array( - 'Fahrenheit'=>array('ratio'=>1.8, 'offset'=>32), - 'Kelvin'=>array('ratio'=>1, 'offset'=>273), - 'Reaumur'=>0.8 - ) - ), - 'Weight' => array('base' =>'kg', - 'conv'=>array( - 'g'=>1000, - 'mg'=>1000000, - 't'=>0.001, - 'grain'=>15432, - 'oz'=>35.274, - 'lb'=>2.2046, - 'cwt(UK)' => 0.019684, - 'cwt(US)' => 0.022046, - 'ton (US)' => 0.0011023, - 'ton (UK)' => 0.0009842 - ) - ), - 'Distance' => array('base' =>'km', - 'conv'=>array( - 'm'=>1000, - 'dm'=>10000, - 'cm'=>100000, - 'mm'=>1000000, - 'mile'=>0.62137, - 'naut.mile'=>0.53996, - 'inch(es)'=>39370, - 'ft'=>3280.8, - 'yd'=>1093.6, - 'furlong'=>4.970969537898672, - 'fathom'=>546.8066491688539 - ) - ), - 'Area' => array('base' =>'km 2', - 'conv'=>array( - 'ha'=>100, - 'acre'=>247.105, - 'm 2'=>pow(1000,2), - 'dm 2'=>pow(10000,2), - 'cm 2'=>pow(100000,2), - 'mm 2'=>pow(1000000,2), - 'mile 2'=>pow(0.62137,2), - 'naut.miles 2'=>pow(0.53996,2), - 'in 2'=>pow(39370,2), - 'ft 2'=>pow(3280.8,2), - 'yd 2'=>pow(1093.6,2), - ) - ), - 'Volume' => array('base' =>'m 3', - 'conv'=>array( - 'in 3'=>61023.6, - 'ft 3'=>35.315, - 'cm 3'=>pow(10,6), - 'dm 3'=>1000, - 'litre'=>1000, - 'hl'=>10, - 'yd 3'=>1.30795, - 'gal(US)'=>264.172, - 'gal(UK)'=>219.969, - 'pint' => 2113.376, - 'quart' => 1056.688, - 'cup' => 4266.753, - 'fl oz' => 33814.02, - 'tablespoon' => 67628.04, - 'teaspoon' => 202884.1, - 'pt (UK)'=>1000/0.56826, - 'barrel petroleum'=>1000/158.99, - 'Register Tons'=>2.832, - 'Ocean Tons'=>1.1327 - ) - ), - 'Speed' =>array('base' =>'kmph', - 'conv'=>array( - 'mps'=>0.0001726031, - 'milesph'=>0.62137, - 'knots'=>0.53996, - 'mach STP'=>0.0008380431, - 'c (warp)'=>9.265669e-10 - ) - ) -); - - -while (list($key,$val) = each($conversions)) { - $conv->addConversion($val['base'], $val['conv']); - $list[$key][] = $val['base']; - while (list($ukey,$uval) = each($val['conv'])) { - $list[$key][] = $ukey; - } -} - - $o .= '

Unit Conversions

'; - - - if (isset($_POST['from_unit']) && isset($_POST['value'])) { - $_POST['value'] = $_POST['value'] + 0; - - - $o .= ($conv->getTable($_POST['value'], $_POST['from_unit'], $_POST['to_unit'], 5))."

"; - } else { - $o .= "

Select:

"; - } - - if(isset($_POST['value'])) - $value = $_POST['value']; - else - $value = ''; - - $o .= '
'; - $o .= ''; - $o .= ''; - - $o .= '
'; - - return $o; -} diff --git a/addon/facebook/README b/addon/facebook/README deleted file mode 100644 index 325f18dd12..0000000000 --- a/addon/facebook/README +++ /dev/null @@ -1,39 +0,0 @@ -Installing the Friendika/Facebook connector - -1. register an API key for your site from developer.facebook.com - a. We'd be very happy if you include "Friendika" in the application name - to increase name recognition. The Friendika icons are also present - in the images directory and may be uploaded as a Facebook app icon. - Use images/friendika-16.jpg for the Icon and images/friendika-128.jpg for the Logo. - b. The url should be your site URL with a trailing slash. - You may use http://portal.friendika.com/privacy as the privacy policy - URL unless your site has different requirements, and - http://portal.friendika.com as the Terms of Service URL unless - you have different requirements. (Friendika is a software application - and does not require Terms of Service, though your installation of it might). - c. Set the following values in your .htconfig.php file - $a->config['facebook']['appid'] = 'xxxxxxxxxxx'; - $a->config['facebook']['appsecret'] = 'xxxxxxxxxxxxxxx'; - Replace with the settings Facebook gives you. - d. Navigate to Set Web->Site URL & Domain -> Website Settings. Set Site URL - to yoursubdomain.yourdomain.com. Set Site Domain to your yourdomain.com. -2. Enable the facebook plugin by including it in .htconfig.php - e.g. - $a->config['system']['addon'] = 'plugin1,plugin2,facebook'; -3. Visit the Facebook Settings section of the "Settings->Plugin Settings" page. - and click 'Install Facebook Connector'. -4. This will ask you to login to Facebook and grant permission to the - plugin to do its stuff. Allow it to do so. -5. You're done. To turn it off visit the Plugin Settings page again and - 'Remove Facebook posting'. - -Vidoes and embeds will not be posted if there is no other content. Links -and images will be converted to a format suitable for the Facebook API and -long posts truncated - with a link to view the full post. - -Facebook contacts will not be able to view private photos, as they are not able to -authenticate to your site to establish identity. We will address this -in a future release. - -Info: please make sure that you understand all aspects due to Friendika's -default licence which is: Creative Commons Attribution 3.0 (further info: -http://creativecommons.org/licenses/by/3.0/ ) diff --git a/addon/facebook/facebook.css b/addon/facebook/facebook.css deleted file mode 100644 index 0c164331e7..0000000000 --- a/addon/facebook/facebook.css +++ /dev/null @@ -1,13 +0,0 @@ - -#facebook-enable-wrapper { - margin-top: 20px; -} - -#facebook-disable-wrapper { - margin-top: 20px; -} - -#facebook-post-default-form input { - margin-top: 20px; - margin-right: 20px; -} \ No newline at end of file diff --git a/addon/facebook/facebook.php b/addon/facebook/facebook.php deleted file mode 100644 index fe348f689e..0000000000 --- a/addon/facebook/facebook.php +++ /dev/null @@ -1,1046 +0,0 @@ - - */ - -/** - * Installing the Friendika/Facebook connector - * - * 1. register an API key for your site from developer.facebook.com - * a. We'd be very happy if you include "Friendika" in the application name - * to increase name recognition. The Friendika icons are also present - * in the images directory and may be uploaded as a Facebook app icon. - * Use images/friendika-16.jpg for the Icon and images/friendika-128.jpg for the Logo. - * b. The url should be your site URL with a trailing slash. - * You may use http://portal.friendika.com/privacy as the privacy policy - * URL unless your site has different requirements, and - * http://portal.friendika.com as the Terms of Service URL unless - * you have different requirements. (Friendika is a software application - * and does not require Terms of Service, though your installation of it might). - * c. Set the following values in your .htconfig.php file - * $a->config['facebook']['appid'] = 'xxxxxxxxxxx'; - * $a->config['facebook']['appsecret'] = 'xxxxxxxxxxxxxxx'; - * Replace with the settings Facebook gives you. - * d. Navigate to Set Web->Site URL & Domain -> Website Settings. Set - * Site URL to yoursubdomain.yourdomain.com. Set Site Domain to your - * yourdomain.com. - * 2. Enable the facebook plugin by including it in .htconfig.php - e.g. - * $a->config['system']['addon'] = 'plugin1,plugin2,facebook'; - * 3. Visit the Facebook Settings section of the "Settings->Plugin Settings" page. - * and click 'Install Facebook Connector'. - * 4. This will ask you to login to Facebook and grant permission to the - * plugin to do its stuff. Allow it to do so. - * 5. You're done. To turn it off visit the Plugin Settings page again and - * 'Remove Facebook posting'. - * - * Vidoes and embeds will not be posted if there is no other content. Links - * and images will be converted to a format suitable for the Facebook API and - * long posts truncated - with a link to view the full post. - * - * Facebook contacts will not be able to view private photos, as they are not able to - * authenticate to your site to establish identity. We will address this - * in a future release. - */ - -define('FACEBOOK_MAXPOSTLEN', 420); - - -function facebook_install() { - register_hook('post_local_end', 'addon/facebook/facebook.php', 'facebook_post_hook'); - register_hook('jot_networks', 'addon/facebook/facebook.php', 'facebook_jot_nets'); - register_hook('plugin_settings', 'addon/facebook/facebook.php', 'facebook_plugin_settings'); - register_hook('cron', 'addon/facebook/facebook.php', 'facebook_cron'); - register_hook('queue_predeliver', 'addon/facebook/facebook.php', 'fb_queue_hook'); -} - - -function facebook_uninstall() { - unregister_hook('post_local_end', 'addon/facebook/facebook.php', 'facebook_post_hook'); - unregister_hook('jot_networks', 'addon/facebook/facebook.php', 'facebook_jot_nets'); - unregister_hook('plugin_settings', 'addon/facebook/facebook.php', 'facebook_plugin_settings'); - unregister_hook('cron', 'addon/facebook/facebook.php', 'facebook_cron'); - unregister_hook('queue_predeliver', 'addon/facebook/facebook.php', 'fb_queue_hook'); -} - - -/* declare the facebook_module function so that /facebook url requests will land here */ - -function facebook_module() {} - - - -/* If a->argv[1] is a nickname, this is a callback from Facebook oauth requests. */ - -function facebook_init(&$a) { - - if($a->argc != 2) - return; - $nick = $a->argv[1]; - if(strlen($nick)) - $r = q("SELECT `uid` FROM `user` WHERE `nickname` = '%s' LIMIT 1", - dbesc($nick) - ); - if(! count($r)) - return; - - $uid = $r[0]['uid']; - $auth_code = (($_GET['code']) ? $_GET['code'] : ''); - $error = (($_GET['error_description']) ? $_GET['error_description'] : ''); - - - if($error) - logger('facebook_init: Error: ' . $error); - - if($auth_code && $uid) { - - $appid = get_config('facebook','appid'); - $appsecret = get_config('facebook', 'appsecret'); - - $x = fetch_url('https://graph.facebook.com/oauth/access_token?client_id=' - . $appid . '&client_secret=' . $appsecret . '&redirect_uri=' - . urlencode($a->get_baseurl() . '/facebook/' . $nick) - . '&code=' . $auth_code); - - logger('facebook_init: returned access token: ' . $x, LOGGER_DATA); - - if(strpos($x,'access_token=') !== false) { - $token = str_replace('access_token=', '', $x); - if(strpos($token,'&') !== false) - $token = substr($token,0,strpos($token,'&')); - set_pconfig($uid,'facebook','access_token',$token); - set_pconfig($uid,'facebook','post','1'); - if(get_pconfig($uid,'facebook','no_linking') === false) - set_pconfig($uid,'facebook','no_linking',1); - fb_get_self($uid); - fb_get_friends($uid); - fb_consume_all($uid); - - } - - } - -} - - -function fb_get_self($uid) { - $access_token = get_pconfig($uid,'facebook','access_token'); - if(! $access_token) - return; - $s = fetch_url('https://graph.facebook.com/me/?access_token=' . $access_token); - if($s) { - $j = json_decode($s); - set_pconfig($uid,'facebook','self_id',(string) $j->id); - } -} - - - -function fb_get_friends($uid) { - - $access_token = get_pconfig($uid,'facebook','access_token'); - - $no_linking = get_pconfig($uid,'facebook','no_linking'); - if($no_linking) - return; - - if(! $access_token) - return; - $s = fetch_url('https://graph.facebook.com/me/friends?access_token=' . $access_token); - if($s) { - logger('facebook: fb_get_friends: ' . $s, LOGGER_DATA); - $j = json_decode($s); - logger('facebook: fb_get_friends: json: ' . print_r($j,true), LOGGER_DATA); - if(! $j->data) - return; - foreach($j->data as $person) { - $s = fetch_url('https://graph.facebook.com/' . $person->id . '?access_token=' . $access_token); - if($s) { - $jp = json_decode($s); - logger('fb_get_friends: info: ' . print_r($jp,true), LOGGER_DATA); - - // always use numeric link for consistency - - $jp->link = 'http://facebook.com/profile.php?id=' . $person->id; - - // check if we already have a contact - - $r = q("SELECT * FROM `contact` WHERE `uid` = %d AND `url` = '%s' LIMIT 1", - intval($uid), - dbesc($jp->link) - ); - - if(count($r)) { - - // check that we have all the photos, this has been known to fail on occasion - - if((! $r[0]['photo']) || (! $r[0]['thumb']) || (! $r[0]['micro'])) { - require_once("Photo.php"); - - $photos = import_profile_photo('https://graph.facebook.com/' . $jp->id . '/picture', $uid, $r[0]['id']); - - $r = q("UPDATE `contact` SET `photo` = '%s', - `thumb` = '%s', - `micro` = '%s', - `name-date` = '%s', - `uri-date` = '%s', - `avatar-date` = '%s' - WHERE `id` = %d LIMIT 1 - ", - dbesc($photos[0]), - dbesc($photos[1]), - dbesc($photos[2]), - dbesc(datetime_convert()), - dbesc(datetime_convert()), - dbesc(datetime_convert()), - intval($r[0]['id']) - ); - } - continue; - } - else { - - // create contact record - $r = q("INSERT INTO `contact` ( `uid`, `created`, `url`, `addr`, `alias`, `notify`, `poll`, - `name`, `nick`, `photo`, `network`, `rel`, `priority`, - `writable`, `blocked`, `readonly`, `pending` ) - VALUES ( %d, '%s', '%s', '%s', '%s', '%s', '%s', '%s', '%s', '%s', '%s', %d, %d, %d, 0, 0, 0 ) ", - intval($uid), - dbesc(datetime_convert()), - dbesc($jp->link), - dbesc(''), - dbesc(''), - dbesc($jp->id), - dbesc('facebook ' . $jp->id), - dbesc($jp->name), - dbesc(($jp->nickname) ? $jp->nickname : strtolower($jp->first_name)), - dbesc('https://graph.facebook.com/' . $jp->id . '/picture'), - dbesc(NETWORK_FACEBOOK), - intval(CONTACT_IS_FRIEND), - intval(1), - intval(1) - ); - } - - $r = q("SELECT * FROM `contact` WHERE `url` = '%s' AND `uid` = %d LIMIT 1", - dbesc($jp->link), - intval($uid) - ); - - if(! count($r)) { - continue; - } - - $contact = $r[0]; - $contact_id = $r[0]['id']; - - require_once("Photo.php"); - - $photos = import_profile_photo($r[0]['photo'],$uid,$contact_id); - - $r = q("UPDATE `contact` SET `photo` = '%s', - `thumb` = '%s', - `micro` = '%s', - `name-date` = '%s', - `uri-date` = '%s', - `avatar-date` = '%s' - WHERE `id` = %d LIMIT 1 - ", - dbesc($photos[0]), - dbesc($photos[1]), - dbesc($photos[2]), - dbesc(datetime_convert()), - dbesc(datetime_convert()), - dbesc(datetime_convert()), - intval($contact_id) - ); - - } - } - } -} - -// This is the POST method to the facebook settings page -// Content is posted to Facebook in the function facebook_post_hook() - -function facebook_post(&$a) { - - $uid = local_user(); - if($uid){ - - $value = ((x($_POST,'post_by_default')) ? intval($_POST['post_by_default']) : 0); - set_pconfig($uid,'facebook','post_by_default', $value); - - $no_linking = get_pconfig($uid,'facebook','no_linking'); - - $no_wall = ((x($_POST,'facebook_no_wall')) ? intval($_POST['facebook_no_wall']) : 0); - set_pconfig($uid,'facebook','no_wall',$no_wall); - - $private_wall = ((x($_POST,'facebook_private_wall')) ? intval($_POST['facebook_private_wall']) : 0); - set_pconfig($uid,'facebook','private_wall',$private_wall); - - - $linkvalue = ((x($_POST,'facebook_linking')) ? intval($_POST['facebook_linking']) : 0); - set_pconfig($uid,'facebook','no_linking', (($linkvalue) ? 0 : 1)); - - // FB linkage was allowed but has just been turned off - remove all FB contacts and posts - - if((! intval($no_linking)) && (! intval($linkvalue))) { - $r = q("SELECT `id` FROM `contact` WHERE `uid` = %d AND `network` = '%s' ", - intval($uid), - dbesc(NETWORK_FACEBOOK) - ); - if(count($r)) { - require_once('include/Contact.php'); - foreach($r as $rr) - contact_remove($rr['id']); - } - } - elseif(intval($no_linking) && intval($linkvalue)) { - // FB linkage is now allowed - import stuff. - fb_get_self($uid); - fb_get_friends($uid); - fb_consume_all($uid); - } - - info( t('Settings updated.') . EOL); - } - - return; -} - -// Facebook settings form - -function facebook_content(&$a) { - - if(! local_user()) { - notice( t('Permission denied.') . EOL); - return ''; - } - - if($a->argc > 1 && $a->argv[1] === 'remove') { - del_pconfig(local_user(),'facebook','post'); - info( t('Facebook disabled') . EOL); - } - - if($a->argc > 1 && $a->argv[1] === 'friends') { - fb_get_friends(local_user()); - info( t('Updating contacts') . EOL); - } - - - $fb_installed = get_pconfig(local_user(),'facebook','post'); - - $appid = get_config('facebook','appid'); - - if(! $appid) { - notice( t('Facebook API key is missing.') . EOL); - return ''; - } - - $a->page['htmlhead'] .= '' . "\r\n"; - - $o .= '

' . t('Facebook Connect') . '

'; - - if(! $fb_installed) { - $o .= ''; - } - - if($fb_installed) { - $o .= ''; - - $o .= ''; - - $o .= '
'; - $o .= '
'; - $post_by_default = get_pconfig(local_user(),'facebook','post_by_default'); - $checked = (($post_by_default) ? ' checked="checked" ' : ''); - $o .= '' . ' ' . t('Post to Facebook by default') . EOL; - - $no_linking = get_pconfig(local_user(),'facebook','no_linking'); - $checked = (($no_linking) ? '' : ' checked="checked" '); - $o .= '' . ' ' . t('Link all your Facebook friends and conversations on this website') . EOL ; - - $o .= '

' . t('Facebook conversations consist of your profile wall and your friend stream.'); - $o .= ' ' . t('On this website, your Facebook friend stream is only visible to you.'); - $o .= ' ' . t('The following settings determine the privacy of your Facebook profile wall on this website.') . '

'; - - $private_wall = get_pconfig(local_user(),'facebook','private_wall'); - $checked = (($private_wall) ? ' checked="checked" ' : ''); - $o .= '' . ' ' . t('On this website your Facebook profile wall conversations will only be visible to you') . EOL ; - - - $no_wall = get_pconfig(local_user(),'facebook','no_wall'); - $checked = (($no_wall) ? ' checked="checked" ' : ''); - $o .= '' . ' ' . t('Do not import your Facebook profile wall conversations') . EOL ; - - $o .= '

' . t('If you choose to link conversations and leave both of these boxes unchecked, your Facebook profile wall will be merged with your profile wall on this website and your privacy settings on this website will be used to determine who may see the conversations.') . '

'; - - $o .= '
'; - } - - return $o; -} - - - -function facebook_cron($a,$b) { - - $last = get_config('facebook','last_poll'); - - $poll_interval = intval(get_config('facebook','poll_interval')); - if(! $poll_interval) - $poll_interval = 3600; - - if($last) { - $next = $last + $poll_interval; - if($next > time()) - return; - } - - logger('facebook_cron'); - - - // Find the FB users on this site and randomize in case one of them - // uses an obscene amount of memory. It may kill this queue run - // but hopefully we'll get a few others through on each run. - - $r = q("SELECT * FROM `pconfig` WHERE `cat` = 'facebook' AND `k` = 'post' AND `v` = '1' ORDER BY RAND() "); - if(count($r)) { - foreach($r as $rr) { - if(get_pconfig($rr['uid'],'facebook','no_linking')) - continue; - // check for new friends once a day - $last_friend_check = get_pconfig($rr['uid'],'facebook','friend_check'); - if($last_friend_check) - $next_friend_check = $last_friend_check + 86400; - if($next_friend_check <= time()) { - fb_get_friends($rr['uid']); - set_pconfig($rr['uid'],'facebook','friend_check',time()); - } - fb_consume_all($rr['uid']); - } - } - - set_config('facebook','last_poll', time()); - -} - - - -function facebook_plugin_settings(&$a,&$b) { - - $b .= '
'; - $b .= '

' . t('Facebook') . '

'; - $b .= '' . t('Facebook Connector Settings') . '
'; - $b .= '
'; - -} - -function facebook_jot_nets(&$a,&$b) { - if(! local_user()) - return; - - $fb_post = get_pconfig(local_user(),'facebook','post'); - if(intval($fb_post) == 1) { - $fb_defpost = get_pconfig(local_user(),'facebook','post_by_default'); - $selected = ((intval($fb_defpost) == 1) ? ' checked="checked" ' : ''); - $b .= '
' - . t('Post to Facebook') . '
'; - } -} - - -function facebook_post_hook(&$a,&$b) { - - /** - * Post to Facebook stream - */ - - require_once('include/group.php'); - - logger('Facebook post'); - - $reply = false; - $likes = false; - - if((local_user()) && (local_user() == $b['uid'])) { - - // Facebook is not considered a private network - if($b['prvnets'] && $b['private']) - return; - - if($b['parent']) { - $r = q("SELECT * FROM `item` WHERE `id` = %d AND `uid` = %d LIMIT 1", - intval($b['parent']), - intval(local_user()) - ); - if(count($r) && substr($r[0]['uri'],0,4) === 'fb::') - $reply = substr($r[0]['uri'],4); - elseif(count($r) && substr($r[0]['extid'],0,4) === 'fb::') - $reply = substr($r[0]['extid'],4); - else - return; - logger('facebook reply id=' . $reply); - } - - if($b['private'] && $reply === false) { - $allow_people = expand_acl($b['allow_cid']); - $allow_groups = expand_groups(expand_acl($b['allow_gid'])); - $deny_people = expand_acl($b['deny_cid']); - $deny_groups = expand_groups(expand_acl($b['deny_gid'])); - - $recipients = array_unique(array_merge($allow_people,$allow_groups)); - $deny = array_unique(array_merge($deny_people,$deny_groups)); - - $allow_str = dbesc(implode(', ',$recipients)); - if($allow_str) { - $r = q("SELECT `notify` FROM `contact` WHERE `id` IN ( $allow_str ) AND `network` = 'face'"); - $allow_arr = array(); - if(count($r)) - foreach($r as $rr) - $allow_arr[] = $rr['notify']; - } - - $deny_str = dbesc(implode(', ',$deny)); - if($deny_str) { - $r = q("SELECT `notify` FROM `contact` WHERE `id` IN ( $deny_str ) AND `network` = 'face'"); - $deny_arr = array(); - if(count($r)) - foreach($r as $rr) - $deny_arr[] = $rr['notify']; - } - - if(count($deny_arr) && (! count($allow_arr))) { - - // One or more FB folks were denied access but nobody on FB was specifically allowed access. - // This might cause the post to be open to public on Facebook, but only to selected members - // on another network. Since this could potentially leak a post to somebody who was denied, - // we will skip posting it to Facebook with a slightly vague but relevant message that will - // hopefully lead somebody to this code comment for a better explanation of what went wrong. - - notice( t('Post to Facebook cancelled because of multi-network access permission conflict.') . EOL); - return; - } - - - // if it's a private message but no Facebook members are allowed or denied, skip Facebook post - - if((! count($allow_arr)) && (! count($deny_arr))) - return; - } - - if($b['verb'] == ACTIVITY_LIKE) - $likes = true; - - - $appid = get_config('facebook', 'appid' ); - $secret = get_config('facebook', 'appsecret' ); - - if($appid && $secret) { - - logger('facebook: have appid+secret'); - - $fb_post = intval(get_pconfig(local_user(),'facebook','post')); - $fb_enable = (($fb_post && x($_POST,'facebook_enable')) ? intval($_POST['facebook_enable']) : 0); - $fb_token = get_pconfig(local_user(),'facebook','access_token'); - - // if API is used, default to the chosen settings - if($_POST['api_source'] && intval(get_pconfig(local_user(),'facebook','post_by_default'))) - $fb_enable = 1; - - - - - logger('facebook: $fb_post: ' . $fb_post . ' $fb_enable: ' . $fb_enable . ' $fb_token: ' . $fb_token,LOGGER_DEBUG); - - // post to facebook if it's a public post and we've ticked the 'post to Facebook' box, - // or it's a private message with facebook participants - // or it's a reply or likes action to an existing facebook post - - if($fb_post && $fb_token && ($fb_enable || $b['private'] || $reply)) { - logger('facebook: able to post'); - require_once('library/facebook.php'); - require_once('include/bbcode.php'); - - $msg = $b['body']; - - logger('Facebook post: original msg=' . $msg, LOGGER_DATA); - - // make links readable before we strip the code - - // unless it's a dislike - just send the text as a comment - - if($b['verb'] == ACTIVITY_DISLIKE) - $msg = trim(strip_tags(bbcode($msg))); - - $search_str = $a->get_baseurl() . '/search'; - - if(preg_match("/\[url=(.*?)\](.*?)\[\/url\]/is",$msg,$matches)) { - - // don't use hashtags for message link - - if(strpos($matches[2],$search_str) === false) { - $link = $matches[1]; - if(substr($matches[2],0,5) != '[img]') - $linkname = $matches[2]; - } - } - - $msg = preg_replace("/\[url=(.*?)\](.*?)\[\/url\]/is",'$2 $1',$msg); - - if(preg_match("/\[img\](.*?)\[\/img\]/is",$msg,$matches)) - $image = $matches[1]; - - $msg = preg_replace("/\[img\](.*?)\[\/img\]/is", t('Image: ') . '$1', $msg); - - if((strpos($link,z_root()) !== false) && (! $image)) - $image = $a->get_baseurl() . '/images/friendika-64.jpg'; - - $msg = trim(strip_tags(bbcode($msg))); - $msg = html_entity_decode($msg,ENT_QUOTES,'UTF-8'); - - // add any attachments as text urls - - $arr = explode(',',$b['attach']); - - if(count($arr)) { - $msg .= "\n"; - foreach($arr as $r) { - $matches = false; - $cnt = preg_match('|\[attach\]href=\"(.*?)\" size=\"(.*?)\" type=\"(.*?)\" title=\"(.*?)\"\[\/attach\]|',$r,$matches); - if($cnt) { - $msg .= $matches[1]; - } - } - } - - if (strlen($msg) > FACEBOOK_MAXPOSTLEN) { - $shortlink = ""; - require_once('library/slinky.php'); - - $display_url = $a->get_baseurl() . '/display/' . $a->user['nickname'] . '/' . $b['id']; - $slinky = new Slinky( $display_url ); - // setup a cascade of shortening services - // try to get a short link from these services - // in the order ur1.ca, trim, id.gd, tinyurl - $slinky->set_cascade( array( new Slinky_UR1ca(), new Slinky_Trim(), new Slinky_IsGd(), new Slinky_TinyURL() ) ); - $shortlink = $slinky->short(); - // the new message will be shortened such that "... $shortlink" - // will fit into the character limit - $msg = substr($msg, 0, FACEBOOK_MAXPOSTLEN - strlen($shortlink) - 4); - $msg .= '... ' . $shortlink; - } - if(! strlen($msg)) - return; - - logger('Facebook post: msg=' . $msg, LOGGER_DATA); - - if($likes) { - $postvars = array('access_token' => $fb_token); - } - else { - $postvars = array( - 'access_token' => $fb_token, - 'message' => $msg - ); - if(isset($image)) - $postvars['picture'] = $image; - if(isset($link)) - $postvars['link'] = $link; - if(isset($linkname)) - $postvars['name'] = $linkname; - } - - if(($b['private']) && (! $b['parent'])) { - $postvars['privacy'] = '{"value": "CUSTOM", "friends": "SOME_FRIENDS"'; - if(count($allow_arr)) - $postvars['privacy'] .= ',"allow": "' . implode(',',$allow_arr) . '"'; - if(count($deny_arr)) - $postvars['privacy'] .= ',"deny": "' . implode(',',$deny_arr) . '"'; - $postvars['privacy'] .= '}'; - - } - - if($reply) { - $url = 'https://graph.facebook.com/' . $reply . '/' . (($likes) ? 'likes' : 'comments'); - } - else { - $url = 'https://graph.facebook.com/me/feed'; - if($b['plink']) - $postvars['actions'] = '{"name": "' . t('View on Friendika') . '", "link": "' . $b['plink'] . '"}'; - } - - logger('facebook: post to ' . $url); - logger('facebook: postvars: ' . print_r($postvars,true)); - - // "test_mode" prevents anything from actually being posted. - // Otherwise, let's do it. - - if(! get_config('facebook','test_mode')) { - $x = post_url($url, $postvars); - - $retj = json_decode($x); - if($retj->id) { - q("UPDATE `item` SET `extid` = '%s' WHERE `id` = %d LIMIT 1", - dbesc('fb::' . $retj->id), - intval($b['id']) - ); - } - else { - if(! $likes) { - $s = serialize(array('url' => $url, 'item' => $b['id'], 'post' => $postvars)); - q("INSERT INTO `queue` ( `network`, `cid`, `created`, `last`, `content`) - VALUES ( '%s', %d, '%s', '%s', '%s') ", - dbesc(NETWORK_FACEBOOK), - intval($a->contact), - dbesc(datetime_convert()), - dbesc(datetime_convert()), - dbesc($s) - ); - - notice( t('Facebook post failed. Queued for retry.') . EOL); - } - } - - logger('Facebook post returns: ' . $x, LOGGER_DEBUG); - } - } - } - } -} - - -function fb_queue_hook(&$a,&$b) { - - $qi = q("SELECT * FROM `queue` WHERE `network` = '%s'", - dbesc(NETWORK_FACEBOOK) - ); - if(! count($qi)) - return; - - require_once('include/queue_fn.php'); - - foreach($qi as $x) { - if($x['network'] !== NETWORK_FACEBOOK) - continue; - - logger('facebook_queue: run'); - - $r = q("SELECT `user`.* FROM `user` LEFT JOIN `contact` on `contact`.`uid` = `user`.`uid` - WHERE `contact`.`self` = 1 AND `contact`.`id` = %d LIMIT 1", - intval($x['cid']) - ); - if(! count($r)) - continue; - - $user = $r[0]; - - $appid = get_config('facebook', 'appid' ); - $secret = get_config('facebook', 'appsecret' ); - - if($appid && $secret) { - $fb_post = intval(get_pconfig($user['uid'],'facebook','post')); - $fb_token = get_pconfig($user['uid'],'facebook','access_token'); - - if($fb_post && $fb_token) { - logger('facebook_queue: able to post'); - require_once('library/facebook.php'); - - $z = unserialize($x['content']); - $item = $z['item']; - $j = post_url($z['url'],$z['post']); - - $retj = json_decode($j); - if($retj->id) { - q("UPDATE `item` SET `extid` = '%s' WHERE `id` = %d LIMIT 1", - dbesc('fb::' . $retj->id), - intval($item) - ); - logger('facebook_queue: success: ' . $j); - remove_queue_item($x['id']); - } - else { - logger('facebook_queue: failed: ' . $j); - update_queue_time($x['id']); - } - } - } - } -} - -function fb_consume_all($uid) { - - require_once('include/items.php'); - - $access_token = get_pconfig($uid,'facebook','access_token'); - if(! $access_token) - return; - - if(! get_pconfig($uid,'facebook','no_wall')) { - $private_wall = intval(get_pconfig($uid,'facebook','private_wall')); - $s = fetch_url('https://graph.facebook.com/me/feed?access_token=' . $access_token); - if($s) { - $j = json_decode($s); - logger('fb_consume_stream: wall: ' . print_r($j,true), LOGGER_DATA); - fb_consume_stream($uid,$j,($private_wall) ? false : true); - } - } - $s = fetch_url('https://graph.facebook.com/me/home?access_token=' . $access_token); - if($s) { - $j = json_decode($s); - logger('fb_consume_stream: feed: ' . print_r($j,true), LOGGER_DATA); - fb_consume_stream($uid,$j,false); - } - -} - -function fb_consume_stream($uid,$j,$wall = false) { - $a = get_app(); - - $no_linking = get_pconfig($uid,'facebook','no_linking'); - if($no_linking) - return; - - $self = q("SELECT * FROM `contact` WHERE `self` = 1 AND `uid` = %d LIMIT 1", - intval($uid) - ); - - $user = q("SELECT `nickname`, `blockwall` FROM `user` WHERE `uid` = %d LIMIT 1", - intval($uid) - ); - if(count($user)) - $my_local_url = $a->get_baseurl() . '/profile/' . $user[0]['nickname']; - - $self_id = get_pconfig($uid,'facebook','self_id'); - if(! count($j->data) || (! strlen($self_id))) - return; - - foreach($j->data as $entry) { - logger('fb_consume: entry: ' . print_r($entry,true), LOGGER_DATA); - $datarray = array(); - - $r = q("SELECT * FROM `item` WHERE ( `uri` = '%s' OR `extid` = '%s') AND `uid` = %d LIMIT 1", - dbesc('fb::' . $entry->id), - dbesc('fb::' . $entry->id), - intval($uid) - ); - if(count($r)) { - $post_exists = true; - $orig_post = $r[0]; - $top_item = $r[0]['id']; - } - else { - $post_exists = false; - $orig_post = null; - } - - if(! $orig_post) { - $datarray['gravity'] = 0; - $datarray['uid'] = $uid; - $datarray['wall'] = (($wall) ? 1 : 0); - $datarray['uri'] = $datarray['parent-uri'] = 'fb::' . $entry->id; - $from = $entry->from; - if($from->id == $self_id) - $datarray['contact-id'] = $self[0]['id']; - else { - $r = q("SELECT * FROM `contact` WHERE `notify` = '%s' AND `uid` = %d AND `blocked` = 0 AND `readonly` = 0 LIMIT 1", - dbesc($from->id), - intval($uid) - ); - if(count($r)) - $datarray['contact-id'] = $r[0]['id']; - } - - // don't store post if we don't have a contact - - if(! x($datarray,'contact-id')) { - logger('no contact: post ignored'); - continue; - } - - $datarray['verb'] = ACTIVITY_POST; - if($wall) { - $datarray['owner-name'] = $self[0]['name']; - $datarray['owner-link'] = $self[0]['url']; - $datarray['owner-avatar'] = $self[0]['thumb']; - } - if(isset($entry->application) && isset($entry->application->name) && strlen($entry->application->name)) - $datarray['app'] = strip_tags($entry->application->name); - else - $datarray['app'] = 'facebook'; - $datarray['author-name'] = $from->name; - $datarray['author-link'] = 'http://facebook.com/profile.php?id=' . $from->id; - $datarray['author-avatar'] = 'https://graph.facebook.com/' . $from->id . '/picture'; - $datarray['plink'] = $datarray['author-link'] . '&v=wall&story_fbid=' . substr($entry->id,strpos($entry->id,'_') + 1); - - $datarray['body'] = $entry->message; - if($entry->picture) - $datarray['body'] .= "\n\n" . '[img]' . $entry->picture . '[/img]'; - if($entry->link) - $datarray['body'] .= "\n" . linkify($entry->link); - if($entry->name) - $datarray['body'] .= "\n" . $entry->name; - if($entry->caption) - $datarray['body'] .= "\n" . $entry->caption; - if($entry->description) - $datarray['body'] .= "\n" . $entry->description; - $datarray['created'] = datetime_convert('UTC','UTC',$entry->created_time); - $datarray['edited'] = datetime_convert('UTC','UTC',$entry->updated_time); - - // If the entry has a privacy policy, we cannot assume who can or cannot see it, - // as the identities are from a foreign system. Mark it as private to the owner. - - if($entry->privacy && $entry->privacy->value !== 'EVERYONE') { - $datarray['private'] = 1; - $datarray['allow_cid'] = '<' . $uid . '>'; - } - - $top_item = item_store($datarray); - $r = q("SELECT * FROM `item` WHERE `id` = %d AND `uid` = %d LIMIT 1", - intval($top_item), - intval($uid) - ); - if(count($r)) { - $orig_post = $r[0]; - logger('fb: new top level item posted'); - } - } - - if(isset($entry->likes) && isset($entry->likes->data)) - $likers = $entry->likes->data; - else - $likers = null; - - if(isset($entry->comments) && isset($entry->comments->data)) - $comments = $entry->comments->data; - else - $comments = null; - - if(is_array($likers)) { - foreach($likers as $likes) { - - if(! $orig_post) - continue; - - // If we posted the like locally, it will be found with our url, not the FB url. - - $second_url = (($likes->id == $self_id) ? $self[0]['url'] : 'http://facebook.com/profile.php?id=' . $likes->id); - - $r = q("SELECT * FROM `item` WHERE `parent-uri` = '%s' AND `uid` = %d AND `verb` = '%s' - AND ( `author-link` = '%s' OR `author-link` = '%s' ) LIMIT 1", - dbesc($orig_post['uri']), - intval($uid), - dbesc(ACTIVITY_LIKE), - dbesc('http://facebook.com/profile.php?id=' . $likes->id), - dbesc($second_url) - ); - - if(count($r)) - continue; - - $likedata = array(); - $likedata['parent'] = $top_item; - $likedata['verb'] = ACTIVITY_LIKE; - $likedata['gravity'] = 3; - $likedata['uid'] = $uid; - $likedata['wall'] = (($wall) ? 1 : 0); - $likedata['uri'] = item_new_uri($a->get_baseurl(), $uid); - $likedata['parent-uri'] = $orig_post['uri']; - if($likes->id == $self_id) - $likedata['contact-id'] = $self[0]['id']; - else { - $r = q("SELECT * FROM `contact` WHERE `notify` = '%s' AND `uid` = %d AND `blocked` = 0 AND `readonly` = 0 LIMIT 1", - dbesc($likes->id), - intval($uid) - ); - if(count($r)) - $likedata['contact-id'] = $r[0]['id']; - } - if(! x($likedata,'contact-id')) - $likedata['contact-id'] = $orig_post['contact-id']; - - $likedata['app'] = 'facebook'; - $likedata['verb'] = ACTIVITY_LIKE; - $likedata['author-name'] = $likes->name; - $likedata['author-link'] = 'http://facebook.com/profile.php?id=' . $likes->id; - $likedata['author-avatar'] = 'https://graph.facebook.com/' . $likes->id . '/picture'; - - $author = '[url=' . $likedata['author-link'] . ']' . $likedata['author-name'] . '[/url]'; - $objauthor = '[url=' . $orig_post['author-link'] . ']' . $orig_post['author-name'] . '[/url]'; - $post_type = t('status'); - $plink = '[url=' . $orig_post['plink'] . ']' . $post_type . '[/url]'; - $likedata['object-type'] = ACTIVITY_OBJ_NOTE; - - $likedata['body'] = sprintf( t('%1$s likes %2$s\'s %3$s'), $author, $objauthor, $plink); - $likedata['object'] = '' . ACTIVITY_OBJ_NOTE . '1' . - '' . $orig_post['uri'] . '' . xmlify('') . '' . $orig_post['title'] . '' . $orig_post['body'] . ''; - - $item = item_store($likedata); - } - } - if(is_array($comments)) { - foreach($comments as $cmnt) { - - if(! $orig_post) - continue; - - $r = q("SELECT * FROM `item` WHERE `uid` = %d AND ( `uri` = '%s' OR `extid` = '%s' ) LIMIT 1", - intval($uid), - dbesc('fb::' . $cmnt->id), - dbesc('fb::' . $cmnt->id) - ); - if(count($r)) - continue; - - $cmntdata = array(); - $cmntdata['parent'] = $top_item; - $cmntdata['verb'] = ACTIVITY_POST; - $cmntdata['gravity'] = 6; - $cmntdata['uid'] = $uid; - $cmntdata['wall'] = (($wall) ? 1 : 0); - $cmntdata['uri'] = 'fb::' . $cmnt->id; - $cmntdata['parent-uri'] = $orig_post['uri']; - if($cmnt->from->id == $self_id) { - $cmntdata['contact-id'] = $self[0]['id']; - } - else { - $r = q("SELECT * FROM `contact` WHERE `notify` = '%s' AND `uid` = %d LIMIT 1", - dbesc($cmnt->from->id), - intval($uid) - ); - if(count($r)) { - $cmntdata['contact-id'] = $r[0]['id']; - if($r[0]['blocked'] || $r[0]['readonly']) - continue; - } - } - if(! x($cmntdata,'contact-id')) - $cmntdata['contact-id'] = $orig_post['contact-id']; - - $cmntdata['app'] = 'facebook'; - $cmntdata['created'] = datetime_convert('UTC','UTC',$cmnt->created_time); - $cmntdata['edited'] = datetime_convert('UTC','UTC',$cmnt->created_time); - $cmntdata['verb'] = ACTIVITY_POST; - $cmntdata['author-name'] = $cmnt->from->name; - $cmntdata['author-link'] = 'http://facebook.com/profile.php?id=' . $cmnt->from->id; - $cmntdata['author-avatar'] = 'https://graph.facebook.com/' . $cmnt->from->id . '/picture'; - $cmntdata['body'] = $cmnt->message; - $item = item_store($cmntdata); - } - } - } -} - diff --git a/addon/fortunate/fortunate.css b/addon/fortunate/fortunate.css deleted file mode 100644 index 61813b7d7e..0000000000 --- a/addon/fortunate/fortunate.css +++ /dev/null @@ -1,7 +0,0 @@ -.fortunate { - margin-top: 25px; - margin-left: 100px; - margin-bottom: 25px; - color: #000088; - font-size: 14px; -} \ No newline at end of file diff --git a/addon/fortunate/fortunate.php b/addon/fortunate/fortunate.php deleted file mode 100644 index 5a6302e58d..0000000000 --- a/addon/fortunate/fortunate.php +++ /dev/null @@ -1,27 +0,0 @@ - - */ - - -function fortunate_install() { - register_hook('page_end', 'addon/fortunate/fortunate.php', 'fortunate_fetch'); -} - -function fortunate_uninstall() { - unregister_hook('page_end', 'addon/fortunate/fortunate.php', 'fortunate_fetch'); -} - - -function fortunate_fetch($a,&$b) { - - $a->page['htmlhead'] .= '' . "\r\n"; - - $s = fetch_url('http://fortunemod.com/cookie.php?numlines=2&equal=1&rand=' . mt_rand()); - $b .= '
' . $s . '
'; -} - diff --git a/addon/impressum/README b/addon/impressum/README deleted file mode 100644 index 8e4255bd11..0000000000 --- a/addon/impressum/README +++ /dev/null @@ -1,27 +0,0 @@ -Impressum Plugin for Friendika - -Author: Tobias Diekershoff - tobias.diekershoff@gmx.net - -License: 3-clause BSD license (same as Friendika) - -About - This plugin adds an Impressum block to the /friendika page with informations - about the page operator/owner and how to contact you in case of any questions. - - In the notes and postal fields you can use HTML tags for formatting. - -Configuration: - For configuration you can set the following variables in the .htconfig file - * $a->config['impressum']['owner'] this is the Name of the Operator - * $a->config['impressum']['ownerprofile'] this is an optional Friendika account - where the above owner name will link to - * $a->config['impressum']['email'] a contact email address (optional) - will be displayed slightly obfuscated - as name(at)example(dot)com - * $a->config['impressum']['postal'] should contain a postal address where - you can be reached at (optional) - * $a->config['impressum']['notes'] additional informations that should - be displayed in the Impressum block - - diff --git a/addon/impressum/admin.tpl b/addon/impressum/admin.tpl deleted file mode 100644 index cfba8df76d..0000000000 --- a/addon/impressum/admin.tpl +++ /dev/null @@ -1,6 +0,0 @@ -{{ inc field_input.tpl with $field=$owner }}{{ endinc }} -{{ inc field_input.tpl with $field=$ownerprofile }}{{ endinc }} -{{ inc field_input.tpl with $field=$postal }}{{ endinc }} -{{ inc field_input.tpl with $field=$notes }}{{ endinc }} -{{ inc field_input.tpl with $field=$email }}{{ endinc }} -
diff --git a/addon/impressum/impressum.php b/addon/impressum/impressum.php deleted file mode 100644 index b760c7e0d9..0000000000 --- a/addon/impressum/impressum.php +++ /dev/null @@ -1,76 +0,0 @@ - - * License: 3-clause BSD license - */ - -function impressum_install() { - register_hook('about_hook', 'addon/impressum/impressum.php', 'impressum_show'); - logger("installed impressum plugin"); -} - -function impressum_uninstall() { - unregister_hook('about_hook', 'addon/impressum/impressum.php', 'impressum_show'); - logger("uninstalled impressum plugin"); -} -function obfuscate_email ($s) { - $s = str_replace('@','(at)',$s); - $s = str_replace('.','(dot)',$s); - return $s; -} -function impressum_show($a,&$b) { - $b .= '

'.t('Impressum').'

'; - $owner = get_config('impressum', 'owner'); - $owner_profile = get_config('impressum','ownerprofile'); - $postal = get_config('impressum', 'postal'); - $notes = get_config('impressum', 'notes'); - $email = obfuscate_email( get_config('impressum','email') ); - if (strlen($owner)) { - if (strlen($owner_profile)) { - $tmp = ''.$owner.''; - } else { - $tmp = $owner; - } - if (strlen($email)) { - $b .= '

'.t('Site Owner').': '. $tmp .'
'.t('Email Address').': '.$email.'

'; - } else { - $b .= '

'.t('Site Owner').': '. $tmp .'

'; - } - if (strlen($postal)) { - $b .= '

'.t('Postal Address').'
'. $postal .'

'; - } - if (strlen($notes)) { - $b .= '

'.$notes.'

'; - } - } else { - $b .= '

'.t('The impressum addon needs to be configured!
Please add at least the owner variable to your config file. For other variables please refer to the README file of the addon.').'

'; - } -} - -function impressum_plugin_admin_post (&$a) { - $owner = ((x($_POST, 'owner')) ? notags(trim($_POST['owner'])) : ''); - $ownerprofile = ((x($_POST, 'ownerprofile')) ? notags(trim($_POST['ownerprofile'])) : ''); - $postal = ((x($_POST, 'postal')) ? (trim($_POST['postal'])) : ''); - $notes = ((x($_POST, 'notes')) ? (trim($_POST['notes'])) : ''); - $email = ((x($_POST, 'email')) ? notags(trim($_POST['email'])) : ''); - set_config('impressum','owner',$owner); - set_config('impressum','ownerprofile',$ownerprofile); - set_config('impressum','postal',$postal); - set_config('impressum','email',$email); - set_config('impressum','notes',$notes); - info( t('Settings updated.'). EOL ); -} -function impressum_plugin_admin (&$a, &$o) { - $t = file_get_contents( dirname(__file__). "/admin.tpl" ); - $o = replace_macros($t, array( - '$submit' => t('Submit'), - '$owner' => array('owner', t('Site Owner'), get_config('impressum','owner'), ''), - '$ownerprofile' => array('ownerprofile', t('Site Owners Profile'), get_config('impressum','ownerprofile'), ''), - '$postal' => array('postal', t('Postal Address'), get_config('impressum','postal'), ''), - '$notes' => array('notes', t('Notes'), get_config('impressum','notes'), ''), - '$email' => array('email', t('Email Address'), get_config('impressum','email'), ''), - )); -} diff --git a/addon/js_upload/file-uploader/client/demo.htm b/addon/js_upload/file-uploader/client/demo.htm deleted file mode 100644 index 2a0cd6d305..0000000000 --- a/addon/js_upload/file-uploader/client/demo.htm +++ /dev/null @@ -1,38 +0,0 @@ - - - - - - - - -

Back to project page

- -

To upload a file, click on the button below. Drag-and-drop is supported in FF, Chrome.

-

Progress-bar is supported in FF3.6+, Chrome6+, Safari4+

- -
- -
- - - - - \ No newline at end of file diff --git a/addon/js_upload/file-uploader/client/do-nothing.htm b/addon/js_upload/file-uploader/client/do-nothing.htm deleted file mode 100644 index 0da19059da..0000000000 --- a/addon/js_upload/file-uploader/client/do-nothing.htm +++ /dev/null @@ -1 +0,0 @@ -{success:true} diff --git a/addon/js_upload/file-uploader/client/fileuploader.css b/addon/js_upload/file-uploader/client/fileuploader.css deleted file mode 100644 index 0e3f111a91..0000000000 --- a/addon/js_upload/file-uploader/client/fileuploader.css +++ /dev/null @@ -1,31 +0,0 @@ -.qq-uploader { position:relative; width: 100%;} - -.qq-upload-button { - display:block; /* or inline-block */ - width: 105px; padding: 7px 0; text-align:center; - background:#880000; border-bottom:1px solid #ddd;color:#fff; -} -.qq-upload-button-hover {background:#cc0000;} -.qq-upload-button-focus {outline:1px dotted black;} - -.qq-upload-drop-area { - position:absolute; top:0; left:0; width:100%; height:100%; min-height: 70px; z-index:2; - background:#FF9797; text-align:center; -} -.qq-upload-drop-area span { - display:block; position:absolute; top: 50%; width:100%; margin-top:-8px; font-size:16px; -} -.qq-upload-drop-area-active {background:#FF7171;} - -.qq-upload-list {margin:15px 35px; padding:0; list-style:disc;} -.qq-upload-list li { margin:0; padding:0; line-height:15px; font-size:12px;} -.qq-upload-file, .qq-upload-spinner, .qq-upload-size, .qq-upload-cancel, .qq-upload-failed-text { - margin-right: 7px; -} - -.qq-upload-file {} -.qq-upload-spinner {display:inline-block; background: url("loading.gif"); width:15px; height:15px; vertical-align:text-bottom;} -.qq-upload-size,.qq-upload-cancel {font-size:11px;} - -.qq-upload-failed-text {display:none;} -.qq-upload-fail .qq-upload-failed-text {display:inline;} \ No newline at end of file diff --git a/addon/js_upload/file-uploader/client/fileuploader.js b/addon/js_upload/file-uploader/client/fileuploader.js deleted file mode 100644 index 89c09ebf50..0000000000 --- a/addon/js_upload/file-uploader/client/fileuploader.js +++ /dev/null @@ -1,1247 +0,0 @@ -/** - * http://github.com/valums/file-uploader - * - * Multiple file upload component with progress-bar, drag-and-drop. - * © 2010 Andrew Valums ( andrew(at)valums.com ) - * - * Licensed under GNU GPL 2 or later, see license.txt. - */ - -// -// Helper functions -// - -var qq = qq || {}; - -/** - * Adds all missing properties from second obj to first obj - */ -qq.extend = function(first, second){ - for (var prop in second){ - first[prop] = second[prop]; - } -}; - -/** - * Searches for a given element in the array, returns -1 if it is not present. - * @param {Number} [from] The index at which to begin the search - */ -qq.indexOf = function(arr, elt, from){ - if (arr.indexOf) return arr.indexOf(elt, from); - - from = from || 0; - var len = arr.length; - - if (from < 0) from += len; - - for (; from < len; from++){ - if (from in arr && arr[from] === elt){ - return from; - } - } - return -1; -}; - -qq.getUniqueId = (function(){ - var id = 0; - return function(){ return id++; }; -})(); - -// -// Events - -qq.attach = function(element, type, fn){ - if (element.addEventListener){ - element.addEventListener(type, fn, false); - } else if (element.attachEvent){ - element.attachEvent('on' + type, fn); - } -}; -qq.detach = function(element, type, fn){ - if (element.removeEventListener){ - element.removeEventListener(type, fn, false); - } else if (element.attachEvent){ - element.detachEvent('on' + type, fn); - } -}; - -qq.preventDefault = function(e){ - if (e.preventDefault){ - e.preventDefault(); - } else{ - e.returnValue = false; - } -}; - -// -// Node manipulations - -/** - * Insert node a before node b. - */ -qq.insertBefore = function(a, b){ - b.parentNode.insertBefore(a, b); -}; -qq.remove = function(element){ - element.parentNode.removeChild(element); -}; - -qq.contains = function(parent, descendant){ - // compareposition returns false in this case - if (parent == descendant) return true; - - if (parent.contains){ - return parent.contains(descendant); - } else { - return !!(descendant.compareDocumentPosition(parent) & 8); - } -}; - -/** - * Creates and returns element from html string - * Uses innerHTML to create an element - */ -qq.toElement = (function(){ - var div = document.createElement('div'); - return function(html){ - div.innerHTML = html; - var element = div.firstChild; - div.removeChild(element); - return element; - }; -})(); - -// -// Node properties and attributes - -/** - * Sets styles for an element. - * Fixes opacity in IE6-8. - */ -qq.css = function(element, styles){ - if (styles.opacity != null){ - if (typeof element.style.opacity != 'string' && typeof(element.filters) != 'undefined'){ - styles.filter = 'alpha(opacity=' + Math.round(100 * styles.opacity) + ')'; - } - } - qq.extend(element.style, styles); -}; -qq.hasClass = function(element, name){ - var re = new RegExp('(^| )' + name + '( |$)'); - return re.test(element.className); -}; -qq.addClass = function(element, name){ - if (!qq.hasClass(element, name)){ - element.className += ' ' + name; - } -}; -qq.removeClass = function(element, name){ - var re = new RegExp('(^| )' + name + '( |$)'); - element.className = element.className.replace(re, ' ').replace(/^\s+|\s+$/g, ""); -}; -qq.setText = function(element, text){ - element.innerText = text; - element.textContent = text; -}; - -// -// Selecting elements - -qq.children = function(element){ - var children = [], - child = element.firstChild; - - while (child){ - if (child.nodeType == 1){ - children.push(child); - } - child = child.nextSibling; - } - - return children; -}; - -qq.getByClass = function(element, className){ - if (element.querySelectorAll){ - return element.querySelectorAll('.' + className); - } - - var result = []; - var candidates = element.getElementsByTagName("*"); - var len = candidates.length; - - for (var i = 0; i < len; i++){ - if (qq.hasClass(candidates[i], className)){ - result.push(candidates[i]); - } - } - return result; -}; - -/** - * obj2url() takes a json-object as argument and generates - * a querystring. pretty much like jQuery.param() - * - * how to use: - * - * `qq.obj2url({a:'b',c:'d'},'http://any.url/upload?otherParam=value');` - * - * will result in: - * - * `http://any.url/upload?otherParam=value&a=b&c=d` - * - * @param Object JSON-Object - * @param String current querystring-part - * @return String encoded querystring - */ -qq.obj2url = function(obj, temp, prefixDone){ - var uristrings = [], - prefix = '&', - add = function(nextObj, i){ - var nextTemp = temp - ? (/\[\]$/.test(temp)) // prevent double-encoding - ? temp - : temp+'['+i+']' - : i; - if ((nextTemp != 'undefined') && (i != 'undefined')) { - uristrings.push( - (typeof nextObj === 'object') - ? qq.obj2url(nextObj, nextTemp, true) - : (Object.prototype.toString.call(nextObj) === '[object Function]') - ? encodeURIComponent(nextTemp) + '=' + encodeURIComponent(nextObj()) - : encodeURIComponent(nextTemp) + '=' + encodeURIComponent(nextObj) - ); - } - }; - - if (!prefixDone && temp) { - prefix = (/\?/.test(temp)) ? (/\?$/.test(temp)) ? '' : '&' : '?'; - uristrings.push(temp); - uristrings.push(qq.obj2url(obj)); - } else if ((Object.prototype.toString.call(obj) === '[object Array]') && (typeof obj != 'undefined') ) { - // we wont use a for-in-loop on an array (performance) - for (var i = 0, len = obj.length; i < len; ++i){ - add(obj[i], i); - } - } else if ((typeof obj != 'undefined') && (obj !== null) && (typeof obj === "object")){ - // for anything else but a scalar, we will use for-in-loop - for (var i in obj){ - add(obj[i], i); - } - } else { - uristrings.push(encodeURIComponent(temp) + '=' + encodeURIComponent(obj)); - } - - return uristrings.join(prefix) - .replace(/^&/, '') - .replace(/%20/g, '+'); -}; - -// -// -// Uploader Classes -// -// - -var qq = qq || {}; - -/** - * Creates upload button, validates upload, but doesn't create file list or dd. - */ -qq.FileUploaderBasic = function(o){ - this._options = { - // set to true to see the server response - debug: false, - action: '/server/upload', - params: {}, - button: null, - multiple: true, - maxConnections: 3, - // validation - allowedExtensions: [], - sizeLimit: 0, - minSizeLimit: 0, - // events - // return false to cancel submit - onSubmit: function(id, fileName){}, - onProgress: function(id, fileName, loaded, total){}, - onComplete: function(id, fileName, responseJSON){}, - onCancel: function(id, fileName){}, - // messages - messages: { - typeError: "{file} has invalid extension. Only {extensions} are allowed.", - sizeError: "{file} is too large, maximum file size is {sizeLimit}.", - minSizeError: "{file} is too small, minimum file size is {minSizeLimit}.", - emptyError: "{file} is empty, please select files again without it.", - onLeave: "The files are being uploaded, if you leave now the upload will be cancelled." - }, - showMessage: function(message){ - alert(message); - } - }; - qq.extend(this._options, o); - - // number of files being uploaded - this._filesInProgress = 0; - this._handler = this._createUploadHandler(); - - if (this._options.button){ - this._button = this._createUploadButton(this._options.button); - } - - this._preventLeaveInProgress(); -}; - -qq.FileUploaderBasic.prototype = { - setParams: function(params){ - this._options.params = params; - }, - getInProgress: function(){ - return this._filesInProgress; - }, - _createUploadButton: function(element){ - var self = this; - - return new qq.UploadButton({ - element: element, - multiple: this._options.multiple && qq.UploadHandlerXhr.isSupported(), - onChange: function(input){ - self._onInputChange(input); - } - }); - }, - _createUploadHandler: function(){ - var self = this, - handlerClass; - - if(qq.UploadHandlerXhr.isSupported()){ - handlerClass = 'UploadHandlerXhr'; - } else { - handlerClass = 'UploadHandlerForm'; - } - - var handler = new qq[handlerClass]({ - debug: this._options.debug, - action: this._options.action, - maxConnections: this._options.maxConnections, - onProgress: function(id, fileName, loaded, total){ - self._onProgress(id, fileName, loaded, total); - self._options.onProgress(id, fileName, loaded, total); - }, - onComplete: function(id, fileName, result){ - self._onComplete(id, fileName, result); - self._options.onComplete(id, fileName, result); - }, - onCancel: function(id, fileName){ - self._onCancel(id, fileName); - self._options.onCancel(id, fileName); - } - }); - - return handler; - }, - _preventLeaveInProgress: function(){ - var self = this; - - qq.attach(window, 'beforeunload', function(e){ - if (!self._filesInProgress){return;} - - var e = e || window.event; - // for ie, ff - e.returnValue = self._options.messages.onLeave; - // for webkit - return self._options.messages.onLeave; - }); - }, - _onSubmit: function(id, fileName){ - this._filesInProgress++; - }, - _onProgress: function(id, fileName, loaded, total){ - }, - _onComplete: function(id, fileName, result){ - this._filesInProgress--; - if (result.error){ - this._options.showMessage(result.error); - } - }, - _onCancel: function(id, fileName){ - this._filesInProgress--; - }, - _onInputChange: function(input){ - if (this._handler instanceof qq.UploadHandlerXhr){ - this._uploadFileList(input.files); - } else { - if (this._validateFile(input)){ - this._uploadFile(input); - } - } - this._button.reset(); - }, - _uploadFileList: function(files){ - for (var i=0; i this._options.sizeLimit){ - this._error('sizeError', name); - return false; - - } else if (size && size < this._options.minSizeLimit){ - this._error('minSizeError', name); - return false; - } - - return true; - }, - _error: function(code, fileName){ - var message = this._options.messages[code]; - function r(name, replacement){ message = message.replace(name, replacement); } - - r('{file}', this._formatFileName(fileName)); - r('{extensions}', this._options.allowedExtensions.join(', ')); - r('{sizeLimit}', this._formatSize(this._options.sizeLimit)); - r('{minSizeLimit}', this._formatSize(this._options.minSizeLimit)); - - this._options.showMessage(message); - }, - _formatFileName: function(name){ - if (name.length > 33){ - name = name.slice(0, 19) + '...' + name.slice(-13); - } - return name; - }, - _isAllowedExtension: function(fileName){ - var ext = (-1 !== fileName.indexOf('.')) ? fileName.replace(/.*[.]/, '').toLowerCase() : ''; - var allowed = this._options.allowedExtensions; - - if (!allowed.length){return true;} - - for (var i=0; i 99); - - return Math.max(bytes, 0.1).toFixed(1) + ['kB', 'MB', 'GB', 'TB', 'PB', 'EB'][i]; - } -}; - - -/** - * Class that creates upload widget with drag-and-drop and file list - * @inherits qq.FileUploaderBasic - */ -qq.FileUploader = function(o){ - // call parent constructor - qq.FileUploaderBasic.apply(this, arguments); - - // additional options - qq.extend(this._options, { - element: null, - // if set, will be used instead of qq-upload-list in template - listElement: null, - - template: '
' + - '
Drop files here to upload
' + - '
Upload a file
' + - '
    ' + - '
    ', - - // template for one item in file list - fileTemplate: '
  • ' + - '' + - '' + - '' + - 'Cancel' + - 'Failed' + - '
  • ', - - classes: { - // used to get elements from templates - button: 'qq-upload-button', - drop: 'qq-upload-drop-area', - dropActive: 'qq-upload-drop-area-active', - list: 'qq-upload-list', - - file: 'qq-upload-file', - spinner: 'qq-upload-spinner', - size: 'qq-upload-size', - cancel: 'qq-upload-cancel', - - // added to list item when upload completes - // used in css to hide progress spinner - success: 'qq-upload-success', - fail: 'qq-upload-fail' - } - }); - // overwrite options with user supplied - qq.extend(this._options, o); - - this._element = this._options.element; - this._element.innerHTML = this._options.template; - this._listElement = this._options.listElement || this._find(this._element, 'list'); - - this._classes = this._options.classes; - - this._button = this._createUploadButton(this._find(this._element, 'button')); - - this._bindCancelEvent(); - this._setupDragDrop(); -}; - -// inherit from Basic Uploader -qq.extend(qq.FileUploader.prototype, qq.FileUploaderBasic.prototype); - -qq.extend(qq.FileUploader.prototype, { - /** - * Gets one of the elements listed in this._options.classes - **/ - _find: function(parent, type){ - var element = qq.getByClass(parent, this._options.classes[type])[0]; - if (!element){ - throw new Error('element not found ' + type); - } - - return element; - }, - _setupDragDrop: function(){ - var self = this, - dropArea = this._find(this._element, 'drop'); - - var dz = new qq.UploadDropZone({ - element: dropArea, - onEnter: function(e){ - qq.addClass(dropArea, self._classes.dropActive); - e.stopPropagation(); - }, - onLeave: function(e){ - e.stopPropagation(); - }, - onLeaveNotDescendants: function(e){ - qq.removeClass(dropArea, self._classes.dropActive); - }, - onDrop: function(e){ - dropArea.style.display = 'none'; - qq.removeClass(dropArea, self._classes.dropActive); - self._uploadFileList(e.dataTransfer.files); - } - }); - - dropArea.style.display = 'none'; - - qq.attach(document, 'dragenter', function(e){ - if (!dz._isValidFileDrag(e)) return; - - dropArea.style.display = 'block'; - }); - qq.attach(document, 'dragleave', function(e){ - if (!dz._isValidFileDrag(e)) return; - - var relatedTarget = document.elementFromPoint(e.clientX, e.clientY); - // only fire when leaving document out - if ( ! relatedTarget || relatedTarget.nodeName == "HTML"){ - dropArea.style.display = 'none'; - } - }); - }, - _onSubmit: function(id, fileName){ - qq.FileUploaderBasic.prototype._onSubmit.apply(this, arguments); - this._addToList(id, fileName); - }, - _onProgress: function(id, fileName, loaded, total){ - qq.FileUploaderBasic.prototype._onProgress.apply(this, arguments); - - var item = this._getItemByFileId(id); - var size = this._find(item, 'size'); - size.style.display = 'inline'; - - var text; - if (loaded != total){ - text = Math.round(loaded / total * 100) + '% from ' + this._formatSize(total); - } else { - text = this._formatSize(total); - } - - qq.setText(size, text); - }, - _onComplete: function(id, fileName, result){ - qq.FileUploaderBasic.prototype._onComplete.apply(this, arguments); - - // mark completed - var item = this._getItemByFileId(id); - qq.remove(this._find(item, 'cancel')); - qq.remove(this._find(item, 'spinner')); - - if (result.success){ - qq.addClass(item, this._classes.success); - } else { - qq.addClass(item, this._classes.fail); - } - }, - _addToList: function(id, fileName){ - var item = qq.toElement(this._options.fileTemplate); - item.qqFileId = id; - - var fileElement = this._find(item, 'file'); - qq.setText(fileElement, this._formatFileName(fileName)); - this._find(item, 'size').style.display = 'none'; - - this._listElement.appendChild(item); - }, - _getItemByFileId: function(id){ - var item = this._listElement.firstChild; - - // there can't be txt nodes in dynamically created list - // and we can use nextSibling - while (item){ - if (item.qqFileId == id) return item; - item = item.nextSibling; - } - }, - /** - * delegate click event for cancel link - **/ - _bindCancelEvent: function(){ - var self = this, - list = this._listElement; - - qq.attach(list, 'click', function(e){ - e = e || window.event; - var target = e.target || e.srcElement; - - if (qq.hasClass(target, self._classes.cancel)){ - qq.preventDefault(e); - - var item = target.parentNode; - self._handler.cancel(item.qqFileId); - qq.remove(item); - } - }); - } -}); - -qq.UploadDropZone = function(o){ - this._options = { - element: null, - onEnter: function(e){}, - onLeave: function(e){}, - // is not fired when leaving element by hovering descendants - onLeaveNotDescendants: function(e){}, - onDrop: function(e){} - }; - qq.extend(this._options, o); - - this._element = this._options.element; - - this._disableDropOutside(); - this._attachEvents(); -}; - -qq.UploadDropZone.prototype = { - _disableDropOutside: function(e){ - // run only once for all instances - if (!qq.UploadDropZone.dropOutsideDisabled ){ - - qq.attach(document, 'dragover', function(e){ - if (e.dataTransfer){ - e.dataTransfer.dropEffect = 'none'; - e.preventDefault(); - } - }); - - qq.UploadDropZone.dropOutsideDisabled = true; - } - }, - _attachEvents: function(){ - var self = this; - - qq.attach(self._element, 'dragover', function(e){ - if (!self._isValidFileDrag(e)) return; - - var effect = e.dataTransfer.effectAllowed; - if (effect == 'move' || effect == 'linkMove'){ - e.dataTransfer.dropEffect = 'move'; // for FF (only move allowed) - } else { - e.dataTransfer.dropEffect = 'copy'; // for Chrome - } - - e.stopPropagation(); - e.preventDefault(); - }); - - qq.attach(self._element, 'dragenter', function(e){ - if (!self._isValidFileDrag(e)) return; - - self._options.onEnter(e); - }); - - qq.attach(self._element, 'dragleave', function(e){ - if (!self._isValidFileDrag(e)) return; - - self._options.onLeave(e); - - var relatedTarget = document.elementFromPoint(e.clientX, e.clientY); - // do not fire when moving a mouse over a descendant - if (qq.contains(this, relatedTarget)) return; - - self._options.onLeaveNotDescendants(e); - }); - - qq.attach(self._element, 'drop', function(e){ - if (!self._isValidFileDrag(e)) return; - - e.preventDefault(); - self._options.onDrop(e); - }); - }, - _isValidFileDrag: function(e){ - var dt = e.dataTransfer, - // do not check dt.types.contains in webkit, because it crashes safari 4 - isWebkit = navigator.userAgent.indexOf("AppleWebKit") > -1; - - // dt.effectAllowed is none in Safari 5 - // dt.types.contains check is for firefox - return dt && dt.effectAllowed != 'none' && - (dt.files || (!isWebkit && dt.types.contains && dt.types.contains('Files'))); - - } -}; - -qq.UploadButton = function(o){ - this._options = { - element: null, - // if set to true adds multiple attribute to file input - multiple: false, - // name attribute of file input - name: 'file', - onChange: function(input){}, - hoverClass: 'qq-upload-button-hover', - focusClass: 'qq-upload-button-focus' - }; - - qq.extend(this._options, o); - - this._element = this._options.element; - - // make button suitable container for input - qq.css(this._element, { - position: 'relative', - overflow: 'hidden', - // Make sure browse button is in the right side - // in Internet Explorer - direction: 'ltr' - }); - - this._input = this._createInput(); -}; - -qq.UploadButton.prototype = { - /* returns file input element */ - getInput: function(){ - return this._input; - }, - /* cleans/recreates the file input */ - reset: function(){ - if (this._input.parentNode){ - qq.remove(this._input); - } - - qq.removeClass(this._element, this._options.focusClass); - this._input = this._createInput(); - }, - _createInput: function(){ - var input = document.createElement("input"); - - if (this._options.multiple){ - input.setAttribute("multiple", "multiple"); - } - - input.setAttribute("type", "file"); - input.setAttribute("name", this._options.name); - - qq.css(input, { - position: 'absolute', - // in Opera only 'browse' button - // is clickable and it is located at - // the right side of the input - right: 0, - top: 0, - fontFamily: 'Arial', - // 4 persons reported this, the max values that worked for them were 243, 236, 236, 118 - fontSize: '118px', - margin: 0, - padding: 0, - cursor: 'pointer', - opacity: 0 - }); - - this._element.appendChild(input); - - var self = this; - qq.attach(input, 'change', function(){ - self._options.onChange(input); - }); - - qq.attach(input, 'mouseover', function(){ - qq.addClass(self._element, self._options.hoverClass); - }); - qq.attach(input, 'mouseout', function(){ - qq.removeClass(self._element, self._options.hoverClass); - }); - qq.attach(input, 'focus', function(){ - qq.addClass(self._element, self._options.focusClass); - }); - qq.attach(input, 'blur', function(){ - qq.removeClass(self._element, self._options.focusClass); - }); - - // IE and Opera, unfortunately have 2 tab stops on file input - // which is unacceptable in our case, disable keyboard access - if (window.attachEvent){ - // it is IE or Opera - input.setAttribute('tabIndex', "-1"); - } - - return input; - } -}; - -/** - * Class for uploading files, uploading itself is handled by child classes - */ -qq.UploadHandlerAbstract = function(o){ - this._options = { - debug: false, - action: '/upload.php', - // maximum number of concurrent uploads - maxConnections: 999, - onProgress: function(id, fileName, loaded, total){}, - onComplete: function(id, fileName, response){}, - onCancel: function(id, fileName){} - }; - qq.extend(this._options, o); - - this._queue = []; - // params for files in queue - this._params = []; -}; -qq.UploadHandlerAbstract.prototype = { - log: function(str){ - if (this._options.debug && window.console) console.log('[uploader] ' + str); - }, - /** - * Adds file or file input to the queue - * @returns id - **/ - add: function(file){}, - /** - * Sends the file identified by id and additional query params to the server - */ - upload: function(id, params){ - var len = this._queue.push(id); - - var copy = {}; - qq.extend(copy, params); - this._params[id] = copy; - - // if too many active uploads, wait... - if (len <= this._options.maxConnections){ - this._upload(id, this._params[id]); - } - }, - /** - * Cancels file upload by id - */ - cancel: function(id){ - this._cancel(id); - this._dequeue(id); - }, - /** - * Cancells all uploads - */ - cancelAll: function(){ - for (var i=0; i= max){ - var nextId = this._queue[max-1]; - this._upload(nextId, this._params[nextId]); - } - } -}; - -/** - * Class for uploading files using form and iframe - * @inherits qq.UploadHandlerAbstract - */ -qq.UploadHandlerForm = function(o){ - qq.UploadHandlerAbstract.apply(this, arguments); - - this._inputs = {}; -}; -// @inherits qq.UploadHandlerAbstract -qq.extend(qq.UploadHandlerForm.prototype, qq.UploadHandlerAbstract.prototype); - -qq.extend(qq.UploadHandlerForm.prototype, { - add: function(fileInput){ - fileInput.setAttribute('name', 'qqfile'); - var id = 'qq-upload-handler-iframe' + qq.getUniqueId(); - - this._inputs[id] = fileInput; - - // remove file input from DOM - if (fileInput.parentNode){ - qq.remove(fileInput); - } - - return id; - }, - getName: function(id){ - // get input value and remove path to normalize - return this._inputs[id].value.replace(/.*(\/|\\)/, ""); - }, - _cancel: function(id){ - this._options.onCancel(id, this.getName(id)); - - delete this._inputs[id]; - - var iframe = document.getElementById(id); - if (iframe){ - // to cancel request set src to something else - // we use src="javascript:false;" because it doesn't - // trigger ie6 prompt on https - iframe.setAttribute('src', 'javascript:false;'); - - qq.remove(iframe); - } - }, - _upload: function(id, params){ - var input = this._inputs[id]; - - if (!input){ - throw new Error('file with passed id was not added, or already uploaded or cancelled'); - } - - var fileName = this.getName(id); - - var iframe = this._createIframe(id); - var form = this._createForm(iframe, params); - form.appendChild(input); - - var self = this; - this._attachLoadEvent(iframe, function(){ - self.log('iframe loaded'); - - var response = self._getIframeContentJSON(iframe); - - self._options.onComplete(id, fileName, response); - self._dequeue(id); - - delete self._inputs[id]; - // timeout added to fix busy state in FF3.6 - setTimeout(function(){ - qq.remove(iframe); - }, 1); - }); - - form.submit(); - qq.remove(form); - - return id; - }, - _attachLoadEvent: function(iframe, callback){ - qq.attach(iframe, 'load', function(){ - // when we remove iframe from dom - // the request stops, but in IE load - // event fires - if (!iframe.parentNode){ - return; - } - - // fixing Opera 10.53 - if (iframe.contentDocument && - iframe.contentDocument.body && - iframe.contentDocument.body.innerHTML == "false"){ - // In Opera event is fired second time - // when body.innerHTML changed from false - // to server response approx. after 1 sec - // when we upload file with iframe - return; - } - - callback(); - }); - }, - /** - * Returns json object received by iframe from server. - */ - _getIframeContentJSON: function(iframe){ - // iframe.contentWindow.document - for IE<7 - var doc = iframe.contentDocument ? iframe.contentDocument: iframe.contentWindow.document, - response; - - this.log("converting iframe's innerHTML to JSON"); - this.log("innerHTML = " + doc.body.innerHTML); - - try { - response = eval("(" + doc.body.innerHTML + ")"); - } catch(err){ - response = {}; - } - - return response; - }, - /** - * Creates iframe with unique name - */ - _createIframe: function(id){ - // We can't use following code as the name attribute - // won't be properly registered in IE6, and new window - // on form submit will open - // var iframe = document.createElement('iframe'); - // iframe.setAttribute('name', id); - - var iframe = qq.toElement('', $Text); - // [img=widthxheight]image source[/img] - $Text = preg_replace("/\[img\=([0-9]*)x([0-9]*)\](.*?)\[\/img\]/ism", '', $Text); if (get_pconfig(local_user(), 'oembed', 'use_for_youtube' )==1){ // use oembed for youtube links diff --git a/include/conversation.php b/include/conversation.php index aeb30177f4..10d9bad2cd 100644 --- a/include/conversation.php +++ b/include/conversation.php @@ -211,21 +211,21 @@ function conversation(&$a, $items, $mode, $update) { $o .= replace_macros($tpl,array( '$id' => $item['item_id'], - '$linktitle' => sprintf( t('View %s\'s profile'), $profile_name), + '$linktitle' => sprintf( t('View %s\'s profile @ %s'), $profile_name, ((strlen($item['author-link'])) ? $item['author-link'] : $item['url'])), '$profile_url' => $profile_link, '$item_photo_menu' => item_photo_menu($item), - '$name' => $profile_name, + '$name' => template_escape($profile_name), '$sparkle' => $sparkle, '$lock' => $lock, '$thumb' => $profile_avatar, - '$title' => $item['title'], - '$body' => $body, + '$title' => template_escape($item['title']), + '$body' => template_escape($body), '$ago' => (($item['app']) ? sprintf( t('%s from %s'),relative_date($item['created']),$item['app']) : relative_date($item['created'])), - '$location' => $location, + '$location' => template_escape($location), '$indent' => '', '$owner_url' => $owner_url, '$owner_photo' => $owner_photo, - '$owner_name' => $owner_name, + '$owner_name' => template_escape($owner_name), '$star' => $star, '$drop' => $drop, '$conv' => '' . t('View in context') . '' @@ -505,27 +505,27 @@ function conversation(&$a, $items, $mode, $update) { $tmp_item = replace_macros($template,array( + '$body' => template_escape($body), '$id' => $item['item_id'], - '$linktitle' => sprintf( t('View %s\'s profile'), $profile_name), - '$olinktitle' => sprintf( t('View %s\'s profile'), $owner_name), + '$linktitle' => sprintf( t('View %s\'s profile @ %s'), $profile_name, ((strlen($item['author-link'])) ? $item['author-link'] : $item['url'])), + '$olinktitle' => sprintf( t('View %s\'s profile @ %s'), $profile_name, ((strlen($item['owner-link'])) ? $item['owner-link'] : $item['url'])), '$to' => t('to'), '$wall' => t('Wall-to-Wall'), '$vwall' => t('via Wall-To-Wall:'), '$profile_url' => $profile_link, '$item_photo_menu' => item_photo_menu($item), - '$name' => $profile_name, + '$name' => template_escape($profile_name), '$thumb' => $profile_avatar, '$osparkle' => $osparkle, '$sparkle' => $sparkle, - '$title' => $item['title'], - '$body' => $body, + '$title' => template_escape($item['title']), '$ago' => ((($item['app']) && ($item['id'] == $item['parent'])) ? sprintf( t('%s from %s'),relative_date($item['created']),$item['app']) : relative_date($item['created'])), '$lock' => $lock, - '$location' => $location, + '$location' => template_escape($location), '$indent' => $indent, '$owner_url' => $owner_url, '$owner_photo' => $owner_photo, - '$owner_name' => $owner_name, + '$owner_name' => template_escape($owner_name), '$plink' => get_plink($item), '$edpost' => $edpost, '$isstarred' => $isstarred, @@ -535,6 +535,7 @@ function conversation(&$a, $items, $mode, $update) { '$like' => $like, '$dislike' => $dislike, '$comment' => $comment + )); @@ -755,7 +756,7 @@ function status_editor($a,$x, $notes_cid = 0) { if($mail_enabled) { $selected = (($pubmail_enabled) ? ' checked="checked" ' : ''); - $jotnets .= '
    ' + $jotnets .= '
    ' . t("Post to Email") . '
    '; } diff --git a/include/delivery.php b/include/delivery.php index 18ef09a312..706c07b3b8 100644 --- a/include/delivery.php +++ b/include/delivery.php @@ -31,7 +31,7 @@ function delivery_run($argv, $argc){ $a->set_baseurl(get_config('system','url')); - logger('delivery: invoked: ' . print_r($argv,true)); + logger('delivery: invoked: ' . print_r($argv,true), LOGGER_DEBUG); $cmd = $argv[1]; $item_id = intval($argv[2]); @@ -145,6 +145,7 @@ function delivery_run($argv, $argc){ $public_message = true; // fill this in with a single salmon slap if applicable + $slap = ''; require_once('include/group.php'); @@ -195,8 +196,6 @@ function delivery_run($argv, $argc){ $public_message = false; // private recipients, not public } - $conversant_str = intval($contact_id); - $r = q("SELECT * FROM `contact` WHERE `id` = %d AND `blocked` = 0 AND `pending` = 0", intval($contact_id) ); @@ -204,62 +203,10 @@ function delivery_run($argv, $argc){ if(count($r)) $contact = $r[0]; - - $feed_template = get_markup_template('atom_feed.tpl'); - $mail_template = get_markup_template('atom_mail.tpl'); - - $atom = ''; - $slaps = array(); - $hubxml = feed_hublinks(); - $birthday = feed_birthday($owner['uid'],$owner['timezone']); - - if(strlen($birthday)) - $birthday = '' . xmlify($birthday) . ''; - - $atom .= replace_macros($feed_template, array( - '$version' => xmlify(FRIENDIKA_VERSION), - '$feed_id' => xmlify($a->get_baseurl() . '/profile/' . $owner['nickname'] ), - '$feed_title' => xmlify($owner['name']), - '$feed_updated' => xmlify(datetime_convert('UTC', 'UTC', $updated . '+00:00' , ATOM_TIME)) , - '$hub' => $hubxml, - '$salmon' => '', // private feed, we don't use salmon here - '$name' => xmlify($owner['name']), - '$profile_page' => xmlify($owner['url']), - '$photo' => xmlify($owner['photo']), - '$thumb' => xmlify($owner['thumb']), - '$picdate' => xmlify(datetime_convert('UTC','UTC',$owner['avatar-date'] . '+00:00' , ATOM_TIME)) , - '$uridate' => xmlify(datetime_convert('UTC','UTC',$owner['uri-date'] . '+00:00' , ATOM_TIME)) , - '$namdate' => xmlify(datetime_convert('UTC','UTC',$owner['name-date'] . '+00:00' , ATOM_TIME)) , - '$birthday' => $birthday - )); - - foreach($items as $item) { - if(! $item['parent']) - continue; - - // private emails may be in included in public conversations. Filter them. - if(($public_message) && $item['private']) - continue; - - $item_contact = get_item_contact($item,$icontacts); - if(! $item_contact) - continue; - - $atom .= atom_entry($item,'text',$item_contact,$owner,true); - - if(($top_level) && ($public_message) && ($item['author-link'] === $item['owner-link']) && (! $expire)) - $slaps[] = atom_entry($item,'html',$item_contact,$owner,true); - } - - $atom .= '' . "\r\n"; - - logger('notifier: ' . $atom, LOGGER_DATA); - logger('notifier: slaps: ' . print_r($slaps,true), LOGGER_DATA); - require_once('include/salmon.php'); if($contact['self']) @@ -271,6 +218,55 @@ function delivery_run($argv, $argc){ case NETWORK_DFRN : logger('notifier: dfrndelivery: ' . $contact['name']); + + $feed_template = get_markup_template('atom_feed.tpl'); + $mail_template = get_markup_template('atom_mail.tpl'); + + $atom = ''; + + + $birthday = feed_birthday($owner['uid'],$owner['timezone']); + + if(strlen($birthday)) + $birthday = '' . xmlify($birthday) . ''; + + $atom .= replace_macros($feed_template, array( + '$version' => xmlify(FRIENDIKA_VERSION), + '$feed_id' => xmlify($a->get_baseurl() . '/profile/' . $owner['nickname'] ), + '$feed_title' => xmlify($owner['name']), + '$feed_updated' => xmlify(datetime_convert('UTC', 'UTC', $updated . '+00:00' , ATOM_TIME)) , + '$hub' => $hubxml, + '$salmon' => '', // private feed, we don't use salmon here + '$name' => xmlify($owner['name']), + '$profile_page' => xmlify($owner['url']), + '$photo' => xmlify($owner['photo']), + '$thumb' => xmlify($owner['thumb']), + '$picdate' => xmlify(datetime_convert('UTC','UTC',$owner['avatar-date'] . '+00:00' , ATOM_TIME)) , + '$uridate' => xmlify(datetime_convert('UTC','UTC',$owner['uri-date'] . '+00:00' , ATOM_TIME)) , + '$namdate' => xmlify(datetime_convert('UTC','UTC',$owner['name-date'] . '+00:00' , ATOM_TIME)) , + '$birthday' => $birthday + )); + + foreach($items as $item) { + if(! $item['parent']) + continue; + + // private emails may be in included in public conversations. Filter them. + if(($public_message) && $item['private']) + continue; + + $item_contact = get_item_contact($item,$icontacts); + if(! $item_contact) + continue; + + $atom .= atom_entry($item,'text',$item_contact,$owner,true); + + } + + $atom .= '' . "\r\n"; + + logger('notifier: ' . $atom, LOGGER_DATA); + $deliver_status = dfrn_deliver($owner,$contact,$atom); logger('notifier: dfrn_delivery returns ' . $deliver_status); @@ -299,7 +295,25 @@ function delivery_run($argv, $argc){ // only send salmon if public - e.g. if it's ok to notify // a public hub, it's ok to send a salmon - if((count($slaps)) && ($public_message) && (! $expire)) { + if(($public_message) && (! $expire)) { + $slaps = array(); + + foreach($items as $item) { + if(! $item['parent']) + continue; + + // private emails may be in included in public conversations. Filter them. + if(($public_message) && $item['private']) + continue; + + $item_contact = get_item_contact($item,$icontacts); + if(! $item_contact) + continue; + + if(($top_level) && ($public_message) && ($item['author-link'] === $item['owner-link']) && (! $expire)) + $slaps[] = atom_entry($item,'html',$item_contact,$owner,true); + } + logger('notifier: slapdelivery: ' . $contact['name']); foreach($slaps as $slappy) { if($contact['notify']) { @@ -393,12 +407,17 @@ function delivery_run($argv, $argc){ break; case NETWORK_DIASPORA : - logger('delivery: diaspora deliver: ' . $contact['name']); + if($public_message) + $loc = 'public batch ' . $contact['batch']; + else + $loc = $contact['name']; + + logger('delivery: diaspora batch deliver: ' . $loc); if(get_config('system','dfrn_only') || (! get_config('system','diaspora_enabled')) || (! $normal_mode)) break; - if(! $contact['pubkey']) + if((! $contact['pubkey']) && (! $public_message)) break; if($target_item['verb'] === ACTIVITY_DISLIKE) { @@ -406,23 +425,23 @@ function delivery_run($argv, $argc){ break; } elseif(($target_item['deleted']) && ($target_item['verb'] !== ACTIVITY_LIKE)) { - logger('delivery: diaspora retract: ' . $contact['name']); + logger('delivery: diaspora retract: ' . $loc); // diaspora delete, - diaspora_send_retraction($target_item,$owner,$contact); + diaspora_send_retraction($target_item,$owner,$contact,$public_message); break; } elseif($target_item['parent'] != $target_item['id']) { - logger('delivery: diaspora relay: ' . $contact['name']); + logger('delivery: diaspora relay: ' . $loc); // we are the relay - send comments, likes and unlikes to our conversants - diaspora_send_relay($target_item,$owner,$contact); + diaspora_send_relay($target_item,$owner,$contact,$public_message); break; } elseif(($top_level) && (! $walltowall)) { // currently no workable solution for sending walltowall - logger('delivery: diaspora status: ' . $contact['name']); - diaspora_send_status($target_item,$owner,$contact); + logger('delivery: diaspora status: ' . $loc); + diaspora_send_status($target_item,$owner,$contact,$public_message); break; } diff --git a/include/diaspora.php b/include/diaspora.php index 6d070ecba4..80fbff8d61 100644 --- a/include/diaspora.php +++ b/include/diaspora.php @@ -5,34 +5,55 @@ require_once('include/items.php'); require_once('include/bb2diaspora.php'); require_once('include/contact_selectors.php'); + +function diaspora_dispatch_public($msg) { + + $r = q("SELECT `user`.* FROM `user` WHERE `user`.`uid` IN ( SELECT `contact`.`uid` FROM `contact` WHERE `contact`.`network` = '%s' AND `contact`.`addr` = '%s' ) AND `account_expired` = 0 ", + dbesc(NETWORK_DIASPORA), + dbesc($msg['author']) + ); + if(count($r)) { + foreach($r as $rr) { + logger('diaspora_public: delivering to: ' . $rr['username']); + diaspora_dispatch($rr,$msg); + } + } + else + logger('diaspora_public: no subscribers'); +} + + + function diaspora_dispatch($importer,$msg) { + $ret = 0; + $parsed_xml = parse_xml_string($msg['message'],false); $xmlbase = $parsed_xml->post; if($xmlbase->request) { - diaspora_request($importer,$xmlbase->request); + $ret = diaspora_request($importer,$xmlbase->request); } elseif($xmlbase->status_message) { - diaspora_post($importer,$xmlbase->status_message); + $ret = diaspora_post($importer,$xmlbase->status_message); } elseif($xmlbase->comment) { - diaspora_comment($importer,$xmlbase->comment,$msg); + $ret = diaspora_comment($importer,$xmlbase->comment,$msg); } elseif($xmlbase->like) { - diaspora_like($importer,$xmlbase->like,$msg); + $ret = diaspora_like($importer,$xmlbase->like,$msg); } elseif($xmlbase->retraction) { - diaspora_retraction($importer,$xmlbase->retraction,$msg); + $ret = diaspora_retraction($importer,$xmlbase->retraction,$msg); } elseif($xmlbase->photo) { - diaspora_photo($importer,$xmlbase->photo,$msg); + $ret = diaspora_photo($importer,$xmlbase->photo,$msg); } else { logger('diaspora_dispatch: unknown message type: ' . print_r($xmlbase,true)); } - return; + return $ret; } function diaspora_get_contact_by_handle($uid,$handle) { @@ -47,6 +68,7 @@ function diaspora_get_contact_by_handle($uid,$handle) { } function find_diaspora_person_by_handle($handle) { + $update = false; $r = q("select * from fcontact where network = '%s' and addr = '%s' limit 1", dbesc(NETWORK_DIASPORA), dbesc($handle) @@ -54,18 +76,14 @@ function find_diaspora_person_by_handle($handle) { if(count($r)) { // update record occasionally so it doesn't get stale $d = strtotime($r[0]['updated'] . ' +00:00'); - if($d < strtotime('now - 14 days')) { - q("delete from fcontact where id = %d limit 1", - intval($r[0]['id']) - ); - } - else + if($d > strtotime('now - 14 days')) return $r[0]; + $update = true; } require_once('include/Scrape.php'); $r = probe_url($handle, PROBE_DIASPORA); if((count($r)) && ($r['network'] === NETWORK_DIASPORA)) { - add_fcontact($r); + add_fcontact($r,$update); return ($r); } return false; @@ -82,9 +100,60 @@ function get_diaspora_key($uri) { } -function diaspora_msg_build($msg,$user,$contact,$prvkey,$pubkey) { +function diaspora_pubmsg_build($msg,$user,$contact,$prvkey,$pubkey) { $a = get_app(); + logger('diaspora_pubmsg_build: ' . $msg, LOGGER_DATA); + + + $handle = $user['nickname'] . '@' . substr($a->get_baseurl(), strpos($a->get_baseurl(),'://') + 3); + +// $b64_data = base64_encode($msg); +// $b64url_data = base64url_encode($b64_data); + + $b64url_data = base64url_encode($msg); + + $data = str_replace(array("\n","\r"," ","\t"),array('','','',''),$b64url_data); + + $type = 'application/xml'; + $encoding = 'base64url'; + $alg = 'RSA-SHA256'; + + $signable_data = $data . '.' . base64url_encode($type) . '.' + . base64url_encode($encoding) . '.' . base64url_encode($alg) ; + + $signature = rsa_sign($signable_data,$prvkey); + $sig = base64url_encode($signature); + +$magic_env = <<< EOT + + +
    + $handle +
    + + base64url + RSA-SHA256 + $data + $sig + +
    +EOT; + + logger('diaspora_pubmsg_build: magic_env: ' . $magic_env, LOGGER_DATA); + return $magic_env; + +} + + + + +function diaspora_msg_build($msg,$user,$contact,$prvkey,$pubkey,$public = false) { + $a = get_app(); + + if($public) + return diaspora_pubmsg_build($msg,$user,$contact,$prvkey,$pubkey); + logger('diaspora_msg_build: ' . $msg, LOGGER_DATA); $inner_aes_key = random_string(32); @@ -97,7 +166,7 @@ function diaspora_msg_build($msg,$user,$contact,$prvkey,$pubkey) { $outer_iv = random_string(16); $b_outer_iv = base64_encode($outer_iv); - $handle = 'acct:' . $user['nickname'] . '@' . substr($a->get_baseurl(), strpos($a->get_baseurl(),'://') + 3); + $handle = $user['nickname'] . '@' . substr($a->get_baseurl(), strpos($a->get_baseurl(),'://') + 3); $padded_data = pkcs5_pad($msg,16); $inner_encrypted = mcrypt_encrypt(MCRYPT_RIJNDAEL_128, $inner_aes_key, $padded_data, MCRYPT_MODE_CBC, $inner_iv); @@ -106,16 +175,14 @@ function diaspora_msg_build($msg,$user,$contact,$prvkey,$pubkey) { $b64url_data = base64url_encode($b64_data); - $b64url_stripped = str_replace(array("\n","\r"," ","\t"),array('','','',''),$b64url_data); - $lines = str_split($b64url_stripped,60); - $data = implode("\n",$lines); - $data = $data . (($data[-1] != "\n") ? "\n" : '') ; - $type = 'application/atom+xml'; + $data = str_replace(array("\n","\r"," ","\t"),array('','','',''),$b64url_data); + + $type = 'application/xml'; $encoding = 'base64url'; $alg = 'RSA-SHA256'; - $signable_data = $data . '.' . base64url_encode($type) . "\n" . '.' - . base64url_encode($encoding) . "\n" . '.' . base64url_encode($alg) . "\n"; + $signable_data = $data . '.' . base64url_encode($type) . '.' + . base64url_encode($encoding) . '.' . base64url_encode($alg) ; $signature = rsa_sign($signable_data,$prvkey); $sig = base64url_encode($signature); @@ -124,10 +191,7 @@ $decrypted_header = <<< EOT $b_inner_iv $b_inner_aes_key - - {$user['username']} - $handle - + $handle EOT; @@ -152,15 +216,15 @@ EOT; $magic_env = <<< EOT - + $encrypted_header - + base64url RSA-SHA256 - $data + $data $sig - + EOT; logger('diaspora_msg_build: magic_env: ' . $magic_env, LOGGER_DATA); @@ -185,50 +249,67 @@ EOT; function diaspora_decode($importer,$xml) { + $public = false; $basedom = parse_xml_string($xml); - $atom = $basedom->children(NAMESPACE_ATOM1); + $children = $basedom->children('https://joindiaspora.com/protocol'); - // Diaspora devs: This is kind of sucky - 'encrypted_header' does not belong in the atom namespace + if($children->header) { + $public = true; + $author_link = str_replace('acct:','',$children->header->author_id); + } + else { - $encrypted_header = json_decode(base64_decode($atom->encrypted_header)); + $encrypted_header = json_decode(base64_decode($children->encrypted_header)); - $encrypted_aes_key_bundle = base64_decode($encrypted_header->aes_key); - $ciphertext = base64_decode($encrypted_header->ciphertext); + $encrypted_aes_key_bundle = base64_decode($encrypted_header->aes_key); + $ciphertext = base64_decode($encrypted_header->ciphertext); - $outer_key_bundle = ''; - openssl_private_decrypt($encrypted_aes_key_bundle,$outer_key_bundle,$importer['prvkey']); + $outer_key_bundle = ''; + openssl_private_decrypt($encrypted_aes_key_bundle,$outer_key_bundle,$importer['prvkey']); - $j_outer_key_bundle = json_decode($outer_key_bundle); + $j_outer_key_bundle = json_decode($outer_key_bundle); - $outer_iv = base64_decode($j_outer_key_bundle->iv); - $outer_key = base64_decode($j_outer_key_bundle->key); + $outer_iv = base64_decode($j_outer_key_bundle->iv); + $outer_key = base64_decode($j_outer_key_bundle->key); - $decrypted = mcrypt_decrypt(MCRYPT_RIJNDAEL_128, $outer_key, $ciphertext, MCRYPT_MODE_CBC, $outer_iv); + $decrypted = mcrypt_decrypt(MCRYPT_RIJNDAEL_128, $outer_key, $ciphertext, MCRYPT_MODE_CBC, $outer_iv); - $decrypted = pkcs5_unpad($decrypted); + $decrypted = pkcs5_unpad($decrypted); - /** - * $decrypted now contains something like - * - * - * 8e+G2+ET8l5BPuW0sVTnQw== - * UvSMb4puPeB14STkcDWq+4QE302Edu15oaprAQSkLKU= - * - * Ryan Hughes - * acct:galaxor@diaspora.pirateship.org - * - * - */ + /** + * $decrypted now contains something like + * + * + * 8e+G2+ET8l5BPuW0sVTnQw== + * UvSMb4puPeB14STkcDWq+4QE302Edu15oaprAQSkLKU= - logger('decrypted: ' . $decrypted, LOGGER_DEBUG); - $idom = parse_xml_string($decrypted,false); +***** OBSOLETE - $inner_iv = base64_decode($idom->iv); - $inner_aes_key = base64_decode($idom->aes_key); + * + * Ryan Hughes + * acct:galaxor@diaspora.pirateship.org + * - $author_link = str_replace('acct:','',$idom->author->uri); +***** CURRENT + + * galaxor@diaspora.priateship.org + +***** END DIFFS + + * + */ + + logger('decrypted: ' . $decrypted, LOGGER_DEBUG); + $idom = parse_xml_string($decrypted,false); + + $inner_iv = base64_decode($idom->iv); + $inner_aes_key = base64_decode($idom->aes_key); + + $author_link = str_replace('acct:','',$idom->author_id); + + } $dom = $basedom->children(NAMESPACE_SALMON_ME); @@ -255,16 +336,6 @@ function diaspora_decode($importer,$xml) { // strip whitespace so our data element will return to one big base64 blob $data = str_replace(array(" ","\t","\r","\n"),array("","","",""),$base->data); - // Add back the 60 char linefeeds - - // This completely violates the entire principle of salmon magic signatures, - // which was to have a message signing format that was completely ambivalent to linefeeds - // and transport whitespace mangling, and base64 wrapping rules. Guess what? PHP and Ruby - // use different linelengths for base64 output. - - $lines = str_split($data,60); - $data = implode("\n",$lines); - // stash away some other stuff for later @@ -273,22 +344,25 @@ function diaspora_decode($importer,$xml) { $encoding = $base->encoding; $alg = $base->alg; - // I can't even begin to tell you how sucky this is. Please read the spec. - $signed_data = $data . (($data[-1] != "\n") ? "\n" : '') . '.' . base64url_encode($type) . "\n" . '.' . base64url_encode($encoding) . "\n" . '.' . base64url_encode($alg) . "\n"; + $signed_data = $data . '.' . base64url_encode($type) . '.' . base64url_encode($encoding) . '.' . base64url_encode($alg); // decode the data $data = base64url_decode($data); - // Now pull out the inner encrypted blob - $inner_encrypted = base64_decode($data); + if($public) { + $inner_decrypted = $data; + } + else { - $inner_decrypted = - $inner_decrypted = mcrypt_decrypt(MCRYPT_RIJNDAEL_128, $inner_aes_key, $inner_encrypted, MCRYPT_MODE_CBC, $inner_iv); + // Decode the encrypted blob - $inner_decrypted = pkcs5_unpad($inner_decrypted); + $inner_encrypted = base64_decode($data); + $inner_decrypted = mcrypt_decrypt(MCRYPT_RIJNDAEL_128, $inner_aes_key, $inner_encrypted, MCRYPT_MODE_CBC, $inner_iv); + $inner_decrypted = pkcs5_unpad($inner_decrypted); + } if(! $author_link) { logger('mod-diaspora: Could not retrieve author URI.'); @@ -321,7 +395,6 @@ function diaspora_decode($importer,$xml) { } - function diaspora_request($importer,$xml) { $sender_handle = unxmlify($xml->sender_handle); @@ -332,7 +405,6 @@ function diaspora_request($importer,$xml) { $contact = diaspora_get_contact_by_handle($importer['uid'],$sender_handle); - if($contact) { // perhaps we were already sharing with this person. Now they're sharing with us. @@ -357,13 +429,16 @@ function diaspora_request($importer,$xml) { return; } - $r = q("INSERT INTO `contact` (`uid`, `network`,`addr`,`created`,`url`,`name`,`nick`,`photo`,`pubkey`,`notify`,`poll`,`blocked`,`priority`) - VALUES ( %d, '%s', '%s', '%s','%s','%s','%s','%s','%s','%s','%s',%d,%d) ", + $batch = (($ret['batch']) ? $ret['batch'] : implode('/', array_slice(explode('/',$ret['url']),0,3)) . '/receive/public'); + + $r = q("INSERT INTO `contact` (`uid`, `network`,`addr`,`created`,`url`,`batch`,`name`,`nick`,`photo`,`pubkey`,`notify`,`poll`,`blocked`,`priority`) + VALUES ( %d, '%s', '%s', '%s','%s','%s','%s','%s','%s','%s','%s','%s',%d,%d) ", intval($importer['uid']), dbesc($ret['network']), dbesc($ret['addr']), datetime_convert(), dbesc($ret['url']), + dbesc($batch), dbesc($ret['name']), dbesc($ret['nick']), dbesc($ret['photo']), @@ -408,8 +483,7 @@ function diaspora_post($importer,$xml) { if(($contact['rel'] == CONTACT_IS_FOLLOWER) || ($contact['blocked']) || ($contact['readonly'])) { logger('diaspora_post: Ignoring this author.'); - http_status_exit(202); - // NOTREACHED + return 202; } $message_id = $diaspora_handle . ':' . $guid; @@ -493,8 +567,7 @@ function diaspora_comment($importer,$xml,$msg) { if(($contact['rel'] == CONTACT_IS_FOLLOWER) || ($contact['blocked']) || ($contact['readonly'])) { logger('diaspora_comment: Ignoring this author.'); - http_status_exit(202); - // NOTREACHED + return 202; } $r = q("SELECT * FROM `item` WHERE `uid` = %d AND `guid` = '%s' LIMIT 1", @@ -535,7 +608,7 @@ function diaspora_comment($importer,$xml,$msg) { } } - if(! rsa_verify($author_signed_data,$author_signature,$key,'sha')) { + if(! rsa_verify($author_signed_data,$author_signature,$key,'sha256')) { logger('diaspora_comment: verification failed.'); return; } @@ -548,7 +621,7 @@ function diaspora_comment($importer,$xml,$msg) { $key = $msg['key']; - if(! rsa_verify($owner_signed_data,$parent_author_signature,$key,'sha')) { + if(! rsa_verify($owner_signed_data,$parent_author_signature,$key,'sha256')) { logger('diaspora_comment: owner verification failed.'); return; } @@ -633,8 +706,7 @@ function diaspora_photo($importer,$xml,$msg) { if(($contact['rel'] == CONTACT_IS_FOLLOWER) || ($contact['blocked']) || ($contact['readonly'])) { logger('diaspora_photo: Ignoring this author.'); - http_status_exit(202); - // NOTREACHED + return 202; } $r = q("SELECT * FROM `item` WHERE `uid` = %d AND `guid` = '%s' LIMIT 1", @@ -686,8 +758,7 @@ function diaspora_like($importer,$xml,$msg) { if(($contact['rel'] == CONTACT_IS_FOLLOWER) || ($contact['blocked']) || ($contact['readonly'])) { logger('diaspora_like: Ignoring this author.'); - http_status_exit(202); - // NOTREACHED + return 202; } $r = q("SELECT * FROM `item` WHERE `uid` = %d AND `guid` = '%s' LIMIT 1", @@ -743,7 +814,7 @@ function diaspora_like($importer,$xml,$msg) { } } - if(! rsa_verify($author_signed_data,$author_signature,$key,'sha')) { + if(! rsa_verify($author_signed_data,$author_signature,$key,'sha256')) { logger('diaspora_like: verification failed.'); return; } @@ -756,7 +827,7 @@ function diaspora_like($importer,$xml,$msg) { $key = $msg['key']; - if(! rsa_verify($owner_signed_data,$parent_author_signature,$key,'sha')) { + if(! rsa_verify($owner_signed_data,$parent_author_signature,$key,'sha256')) { logger('diaspora_like: owner verification failed.'); return; } @@ -877,7 +948,7 @@ function diaspora_retraction($importer,$xml) { } } - http_exit_status(202); + return 202; // NOTREACHED } @@ -917,7 +988,7 @@ function diaspora_unshare($me,$contact) { -function diaspora_send_status($item,$owner,$contact) { +function diaspora_send_status($item,$owner,$contact,$public_batch = false) { $a = get_app(); $myaddr = $owner['nickname'] . '@' . substr($a->get_baseurl(), strpos($a->get_baseurl(),'://') + 3); @@ -959,19 +1030,19 @@ function diaspora_send_status($item,$owner,$contact) { logger('diaspora_send_status: ' . $owner['username'] . ' -> ' . $contact['name'] . ' base message: ' . $msg, LOGGER_DATA); - $slap = 'xml=' . urlencode(urlencode(diaspora_msg_build($msg,$owner,$contact,$owner['uprvkey'],$contact['pubkey']))); + $slap = 'xml=' . urlencode(urlencode(diaspora_msg_build($msg,$owner,$contact,$owner['uprvkey'],$contact['pubkey'],$public_batch))); - $return_code = diaspora_transmit($owner,$contact,$slap); + $return_code = diaspora_transmit($owner,$contact,$slap,$public_batch); if(count($images)) { - diaspora_send_images($item,$owner,$contact,$images); + diaspora_send_images($item,$owner,$contact,$images,$public_batch); } return $return_code; } -function diaspora_send_images($item,$owner,$contact,$images) { +function diaspora_send_images($item,$owner,$contact,$images,$public_batch = false) { $a = get_app(); if(! count($images)) return; @@ -1003,14 +1074,14 @@ function diaspora_send_images($item,$owner,$contact,$images) { logger('diaspora_send_photo: base message: ' . $msg, LOGGER_DATA); - $slap = 'xml=' . urlencode(urlencode(diaspora_msg_build($msg,$owner,$contact,$owner['uprvkey'],$contact['pubkey']))); + $slap = 'xml=' . urlencode(urlencode(diaspora_msg_build($msg,$owner,$contact,$owner['uprvkey'],$contact['pubkey'],$public_batch))); - diaspora_transmit($owner,$contact,$slap); + diaspora_transmit($owner,$contact,$slap,$public_batch); } } -function diaspora_send_followup($item,$owner,$contact) { +function diaspora_send_followup($item,$owner,$contact,$public_batch = false) { $a = get_app(); $myaddr = $owner['nickname'] . '@' . substr($a->get_baseurl(), strpos($a->get_baseurl(),'://') + 3); @@ -1044,7 +1115,7 @@ function diaspora_send_followup($item,$owner,$contact) { else $signed_text = $item['guid'] . ';' . $parent_guid . ';' . $text . ';' . $myaddr; - $authorsig = base64_encode(rsa_sign($signed_text,$owner['uprvkey'],'sha')); + $authorsig = base64_encode(rsa_sign($signed_text,$owner['uprvkey'],'sha256')); $msg = replace_macros($tpl,array( '$guid' => xmlify($item['guid']), @@ -1058,13 +1129,13 @@ function diaspora_send_followup($item,$owner,$contact) { logger('diaspora_followup: base message: ' . $msg, LOGGER_DATA); - $slap = 'xml=' . urlencode(urlencode(diaspora_msg_build($msg,$owner,$contact,$owner['uprvkey'],$contact['pubkey']))); + $slap = 'xml=' . urlencode(urlencode(diaspora_msg_build($msg,$owner,$contact,$owner['uprvkey'],$contact['pubkey'],$public_batch))); - return(diaspora_transmit($owner,$contact,$slap)); + return(diaspora_transmit($owner,$contact,$slap,$public_batch)); } -function diaspora_send_relay($item,$owner,$contact) { +function diaspora_send_relay($item,$owner,$contact,$public_batch = false) { $a = get_app(); @@ -1131,7 +1202,7 @@ function diaspora_send_relay($item,$owner,$contact) { else $signed_text = $item['guid'] . ';' . $parent_guid . ';' . $text . ';' . $myaddr; - $authorsig = base64_encode(rsa_sign($signed_text,$owner['uprvkey'],'sha')); + $authorsig = base64_encode(rsa_sign($signed_text,$owner['uprvkey'],'sha256')); q("insert into sign (`iid`,`signed_text`,`signature`,`signer`) values (%d,'%s','%s','%s') ", intval($item['id']), @@ -1145,7 +1216,7 @@ function diaspora_send_relay($item,$owner,$contact) { // sign it - $parentauthorsig = base64_encode(rsa_sign($signed_text,$owner['uprvkey'],'sha')); + $parentauthorsig = base64_encode(rsa_sign($signed_text,$owner['uprvkey'],'sha256')); $msg = replace_macros($tpl,array( '$guid' => xmlify($item['guid']), @@ -1160,15 +1231,15 @@ function diaspora_send_relay($item,$owner,$contact) { logger('diaspora_relay_comment: base message: ' . $msg, LOGGER_DATA); - $slap = 'xml=' . urlencode(urlencode(diaspora_msg_build($msg,$owner,$contact,$owner['uprvkey'],$contact['pubkey']))); + $slap = 'xml=' . urlencode(urlencode(diaspora_msg_build($msg,$owner,$contact,$owner['uprvkey'],$contact['pubkey'],$public_batch))); - return(diaspora_transmit($owner,$contact,$slap)); + return(diaspora_transmit($owner,$contact,$slap,$public_batch)); } -function diaspora_send_retraction($item,$owner,$contact) { +function diaspora_send_retraction($item,$owner,$contact,$public_batch = false) { $a = get_app(); $myaddr = $owner['nickname'] . '@' . substr($a->get_baseurl(), strpos($a->get_baseurl(),'://') + 3); @@ -1180,30 +1251,32 @@ function diaspora_send_retraction($item,$owner,$contact) { '$handle' => $myaddr )); - $slap = 'xml=' . urlencode(urlencode(diaspora_msg_build($msg,$owner,$contact,$owner['uprvkey'],$contact['pubkey']))); + $slap = 'xml=' . urlencode(urlencode(diaspora_msg_build($msg,$owner,$contact,$owner['uprvkey'],$contact['pubkey'],$public_batch))); - return(diaspora_transmit($owner,$contact,$slap)); + return(diaspora_transmit($owner,$contact,$slap,$public_batch)); } -function diaspora_transmit($owner,$contact,$slap) { +function diaspora_transmit($owner,$contact,$slap,$public_batch) { $a = get_app(); - - post_url($contact['notify'] . '/',$slap); + $logid = random_string(4); + logger('diaspora_transmit: ' . $logid . ' ' . (($public_batch) ? $contact['batch'] : $contact['notify'])); + post_url((($public_batch) ? $contact['batch'] : $contact['notify']) . '/',$slap); $return_code = $a->get_curl_code(); - logger('diaspora_transmit: returns: ' . $return_code); + logger('diaspora_transmit: ' . $logid . ' returns: ' . $return_code); if(! $return_code) { logger('diaspora_transmit: queue message'); // queue message for redelivery - q("INSERT INTO `queue` ( `cid`, `created`, `last`, `content`) + q("INSERT INTO `queue` ( `cid`, `created`, `last`, `content`,`batch`) VALUES ( %d, '%s', '%s', '%s') ", intval($contact['id']), dbesc(datetime_convert()), dbesc(datetime_convert()), - dbesc($slap) + dbesc($slap), + intval($public_batch) ); } diff --git a/include/email.php b/include/email.php index a36d9adab9..3e6a8186d8 100644 --- a/include/email.php +++ b/include/email.php @@ -169,6 +169,17 @@ function email_get_part($mbox,$uid,$p,$partno) { function email_header_encode($in_str, $charset) { $out_str = $in_str; + $need_to_convert = false; + + for($x = 0; $x < strlen($in_str); $x ++) { + if((ord($in_str[$x]) == 0) || ((ord($in_str[$x]) > 128))) { + $need_to_convert = true; + } + } + + if(! $need_to_convert) + return $in_str; + if ($out_str && $charset) { // define start delimimter, end delimiter and spacer @@ -205,4 +216,6 @@ function email_header_encode($in_str, $charset) { $out_str = $start . $out_str . $end; } return $out_str; -} \ No newline at end of file +} + + diff --git a/include/group.php b/include/group.php index d92e24e205..e3c7d33d4a 100644 --- a/include/group.php +++ b/include/group.php @@ -6,8 +6,26 @@ function group_add($uid,$name) { $ret = false; if(x($uid) && x($name)) { $r = group_byname($uid,$name); // check for dups - if($r !== false) + if($r !== false) { + + // This could be a problem. + // Let's assume we've just created a group which we once deleted + // all the old members are gone, but the group remains so we don't break any security + // access lists. What we're doing here is reviving the dead group, but old content which + // was restricted to this group may now be seen by the new group members. + + $z = q("SELECT * FROM `group` WHERE `id` = %d LIMIT 1", + intval($r) + ); + if(count($z) && $z[0]['deleted']) { + $r = q("UPDATE `group` SET `deleted` = 0 WHERE `uid` = %d AND `name` = '%s' LIMIT 1", + intval($uid), + dbesc($name) + ); + notice( t('A deleted group with this name was revived. Existing item permissions may apply to this group and any future members. If this is not what you intended, please create another group with a different name.') . EOL); + } return true; + } $r = q("INSERT INTO `group` ( `uid`, `name` ) VALUES( %d, '%s' ) ", intval($uid), @@ -146,15 +164,15 @@ function group_side($every="contacts",$each="group",$edit = false, $group_id = 0 $createtext = t('Create a new group'); $linktext= t('Everybody'); - $selected = (($group_id == 0) ? ' class="group-selected" ' : ''); + $selected = (($group_id == 0) ? ' group-selected' : ''); $o .= <<< EOT -
    +

    Groups

    "; diff --git a/include/items.php b/include/items.php index facd8b2d4d..da5a18cad8 100644 --- a/include/items.php +++ b/include/items.php @@ -717,6 +717,7 @@ function item_store($arr,$force_parent = false) { $arr['owner-avatar'] = ((x($arr,'owner-avatar')) ? notags(trim($arr['owner-avatar'])) : ''); $arr['created'] = ((x($arr,'created') !== false) ? datetime_convert('UTC','UTC',$arr['created']) : datetime_convert()); $arr['edited'] = ((x($arr,'edited') !== false) ? datetime_convert('UTC','UTC',$arr['edited']) : datetime_convert()); + $arr['commented'] = datetime_convert(); $arr['received'] = datetime_convert(); $arr['changed'] = datetime_convert(); $arr['title'] = ((x($arr,'title')) ? notags(trim($arr['title'])) : ''); @@ -865,6 +866,14 @@ function item_store($arr,$force_parent = false) { intval($current_post) ); + // update the commented timestamp on the parent + + q("UPDATE `item` set `commented` = '%s', `changed` = '%s' WHERE `id` = %d LIMIT 1", + dbesc(datetime_convert()), + dbesc(datetime_convert()), + intval($parent_id) + ); + if($dsprsig) { q("insert into sign (`iid`,`signed_text`,`signature`,`signer`) values (%d,'%s','%s','%s') ", intval($current_post), @@ -1606,13 +1615,18 @@ function lose_follower($importer,$contact,$datarray,$item) { } -function subscribe_to_hub($url,$importer,$contact) { +function subscribe_to_hub($url,$importer,$contact,$submode = 'subscribe') { if(is_array($importer)) { $r = q("SELECT `nickname` FROM `user` WHERE `uid` = %d LIMIT 1", intval($importer['uid']) ); } + + // Diaspora has different message-ids in feeds than they do + // through the direct Diaspora protocol. If we try and use + // the feed, we'll get duplicates. So don't. + if((! count($r)) || $contact['network'] === NETWORK_DIASPORA) return; @@ -1622,7 +1636,7 @@ function subscribe_to_hub($url,$importer,$contact) { $verify_token = ((strlen($contact['hub-verify'])) ? $contact['hub-verify'] : random_string()); - $params= 'hub.mode=subscribe&hub.callback=' . urlencode($push_url) . '&hub.topic=' . urlencode($contact['poll']) . '&hub.verify=async&hub.verify_token=' . $verify_token; + $params= 'hub.mode=' . $hubmode . '&hub.callback=' . urlencode($push_url) . '&hub.topic=' . urlencode($contact['poll']) . '&hub.verify=async&hub.verify_token=' . $verify_token; logger('subscribe_to_hub: subscribing ' . $contact['name'] . ' to hub ' . $url . ' with verifier ' . $verify_token); diff --git a/include/network.php b/include/network.php index deb257ff3d..ec99d1e0dc 100644 --- a/include/network.php +++ b/include/network.php @@ -701,24 +701,59 @@ function parse_xml_string($s,$strict = true) { return $x; }} -function add_fcontact($arr) { +function add_fcontact($arr,$update = false) { - $r = q("insert into fcontact ( `url`,`name`,`photo`,`request`,`nick`,`addr`, - `notify`,`poll`,`confirm`,`network`,`alias`,`pubkey`,`updated` ) - values('%s','%s','%s','%s','%s','%s','%s','%s','%s','%s','%s','%s','%s')", - dbesc($arr['url']), - dbesc($arr['name']), - dbesc($arr['photo']), - dbesc($arr['request']), - dbesc($arr['nick']), - dbesc($arr['addr']), - dbesc($arr['notify']), - dbesc($arr['poll']), - dbesc($arr['confirm']), - dbesc($arr['network']), - dbesc($arr['alias']), - dbesc($arr['pubkey']), - dbesc(datetime_convert()) - ); + if($update) { + $r = q("UPDATE `fcontact` SET + `name` = '%s', + `photo` = '%s', + `request` = '%s', + `nick` = '%s', + `addr` = '%s', + `batch` = '%s', + `notify` = '%s', + `poll` = '%s', + `confirm` = '%s', + `alias` = '%s', + `pubkey` = '%s', + `updated` = '%s' + WHERE `url` = '%s' AND `network` = '%s' LIMIT 1", + dbesc($arr['name']), + dbesc($arr['photo']), + dbesc($arr['request']), + dbesc($arr['nick']), + dbesc($arr['addr']), + dbesc($arr['batch']), + dbesc($arr['notify']), + dbesc($arr['poll']), + dbesc($arr['confirm']), + dbesc($arr['network']), + dbesc($arr['alias']), + dbesc($arr['pubkey']), + dbesc(datetime_convert()), + dbesc($arr['url']), + dbesc($arr['network']) + ); + } + else { + $r = q("insert into fcontact ( `url`,`name`,`photo`,`request`,`nick`,`addr`, + `batch`, `notify`,`poll`,`confirm`,`network`,`alias`,`pubkey`,`updated` ) + values('%s','%s','%s','%s','%s','%s','%s','%s','%s','%s','%s','%s','%s','%s')", + dbesc($arr['url']), + dbesc($arr['name']), + dbesc($arr['photo']), + dbesc($arr['request']), + dbesc($arr['nick']), + dbesc($arr['addr']), + dbesc($arr['batch']), + dbesc($arr['notify']), + dbesc($arr['poll']), + dbesc($arr['confirm']), + dbesc($arr['network']), + dbesc($arr['alias']), + dbesc($arr['pubkey']), + dbesc(datetime_convert()) + ); + } return $r; } diff --git a/include/notifier.php b/include/notifier.php index 6ac882c199..748d15743a 100644 --- a/include/notifier.php +++ b/include/notifier.php @@ -409,6 +409,8 @@ function notifier_run($argv, $argc){ foreach($r as $contact) { if((! $mail) && (! $fsuggest) && (! $followup) && (! $contact['self'])) { + if(($contact['network'] === NETWORK_DIASPORA) && ($public_message)) + continue; q("insert into deliverq ( `cmd`,`item`,`contact` ) values ('%s', %d, %d )", dbesc($cmd), intval($item_id), @@ -583,9 +585,19 @@ function notifier_run($argv, $argc){ break; case NETWORK_DIASPORA: require_once('include/diaspora.php'); + if(get_config('system','dfrn_only') || (! get_config('system','diaspora_enabled')) || (! $normal_mode)) break; + // special handling for followup to public post + // all other public posts processed as public batches further below + + if($public_message) { + if($followup) + diaspora_send_followup($target_item,$owner,$contact, true); + break; + } + if(! $contact['pubkey']) break; @@ -643,17 +655,25 @@ function notifier_run($argv, $argc){ if($public_message) { - $r = q("SELECT `id`, `name` FROM `contact` - WHERE `network` in ('%s','%s') AND `uid` = %d AND `blocked` = 0 AND `pending` = 0 - AND `rel` != %d order by rand() ", - dbesc(NETWORK_DFRN), + $r1 = q("SELECT DISTINCT(`batch`), `id`, `name`,`network` FROM `contact` WHERE `network` = '%s' + AND `uid` = %d AND `rel` != %d ORDER BY rand() ", dbesc(NETWORK_DIASPORA), intval($owner['uid']), intval(CONTACT_IS_SHARING) ); + + $r2 = q("SELECT `id`, `name`,`network` FROM `contact` + WHERE `network` = '%s' AND `uid` = %d AND `blocked` = 0 AND `pending` = 0 + AND `rel` != %d order by rand() ", + dbesc(NETWORK_DFRN), + intval($owner['uid']), + intval(CONTACT_IS_SHARING) + ); + + $r = array_merge($r2,$r1); if(count($r)) { - logger('pubdeliver: ' . print_r($r,true)); + logger('pubdeliver: ' . print_r($r,true), LOGGER_DEBUG); // throw everything into the queue in case we get killed @@ -669,9 +689,10 @@ function notifier_run($argv, $argc){ foreach($r as $rr) { - /* Don't deliver to folks who have already been delivered to */ + // except for Diaspora batch jobs + // Don't deliver to folks who have already been delivered to - if(in_array($rr['id'],$conversants)) { + if(($rr['network'] !== NETWORK_DIASPORA) && (in_array($rr['id'],$conversants))) { logger('notifier: already delivered id=' . $rr['id']); continue; } diff --git a/include/pgettext.php b/include/pgettext.php index 49f1007370..83e76ba9d6 100644 --- a/include/pgettext.php +++ b/include/pgettext.php @@ -90,8 +90,11 @@ if(! function_exists('load_translation_table')) { function load_translation_table($lang) { global $a; - if(file_exists("view/$lang/strings.php")) + if(file_exists("view/$lang/strings.php")) { include("view/$lang/strings.php"); + } + else + $a->strings = array(); }} // translate string if translation exists @@ -110,12 +113,15 @@ function t($s) { if(! function_exists('tt')){ function tt($singular, $plural, $count){ - + global $lang; $a = get_app(); if(x($a->strings,$singular)) { $t = $a->strings[$singular]; - $k = string_plural_select($count); + $f = 'string_plural_select_' . str_replace('-','_',$lang); + if(! function_exists($f)) + $f = 'string_plural_select_default'; + $k = $f($count); return is_array($t)?$t[$k]:$t; } @@ -124,4 +130,13 @@ function tt($singular, $plural, $count){ } else { return $singular; } -}} \ No newline at end of file +}} + +// provide a fallback which will not collide with +// a function defined in any language file + +if(! function_exists('string_plural_select_default')) { +function string_plural_select_default($n) { + return ($n != 1); +}} + diff --git a/include/poller.php b/include/poller.php index e80b696bf8..fd2a0af8f9 100644 --- a/include/poller.php +++ b/include/poller.php @@ -86,11 +86,12 @@ function poller_run($argv, $argc){ // and which have a polling address and ignore Diaspora since // we are unable to match those posts with a Diaspora GUID and prevent duplicates. - $contacts = q("SELECT `id` FROM `contact` + $contacts = q("SELECT `contact`.`id` FROM `contact` LEFT JOIN `user` ON `user`.`uid` = `contact`.`uid` WHERE ( `rel` = %d OR `rel` = %d ) AND `poll` != '' AND `network` != '%s' $sql_extra - AND `self` = 0 AND `blocked` = 0 AND `readonly` = 0 ORDER BY RAND()", + AND `self` = 0 AND `contact`.`blocked` = 0 AND `contact`.`readonly` = 0 + AND `user`.`account_expired` = 0 ORDER BY RAND()", intval(CONTACT_IS_SHARING), intval(CONTACT_IS_FRIEND), dbesc(NETWORK_DIASPORA) @@ -137,6 +138,8 @@ function poller_run($argv, $argc){ if((datetime_convert('UTC','UTC', 'now') > datetime_convert('UTC','UTC', $t . " + 1 day")) || $force) $hub_update = true; } + else + $hub_update = false; /** * Based on $contact['priority'], should we poll this site now? Or later? @@ -472,21 +475,25 @@ function poller_run($argv, $argc){ consume_feed($xml,$importer,$contact,$hub,1); + $hubmode = 'subscribe'; + if($contact['network'] === NETWORK_DFRN || $contact['blocked'] || $contact['readonly']) + $hubmode = 'unsubscribe'; - if((strlen($hub)) && ($hub_update) && (($contact['rel'] == CONTACT_IS_FRIEND) || (($contact['network'] === NETWORK_OSTATUS) && (! $contact['readonly'])))) { - logger('poller: subscribing to hub(s) : ' . $hub . ' contact name : ' . $contact['name'] . ' local user : ' . $importer['name']); + if((strlen($hub)) && ($hub_update) && ($contact['rel'] != CONTACT_IS_FOLLOWER)) { + logger('poller: hub ' . $hubmode . ' : ' . $hub . ' contact name : ' . $contact['name'] . ' local user : ' . $importer['name']); $hubs = explode(',', $hub); if(count($hubs)) { foreach($hubs as $h) { $h = trim($h); if(! strlen($h)) continue; - subscribe_to_hub($h,$importer,$contact); + subscribe_to_hub($h,$importer,$contact,$hubmode); } } } } + $updated = datetime_convert(); $r = q("UPDATE `contact` SET `last-update` = '%s', `success_update` = '%s' WHERE `id` = %d LIMIT 1", diff --git a/include/profile_advanced.php b/include/profile_advanced.php index c1dfad66f4..22e035fe64 100644 --- a/include/profile_advanced.php +++ b/include/profile_advanced.php @@ -12,8 +12,8 @@ if($a->profile['name']) { $o .= <<< EOT
    -
    $lbl_fullname
    -
    $fullname
    +
    $lbl_fullname
    +
    $fullname
    EOT; @@ -25,8 +25,8 @@ if($a->profile['gender']) { $o .= <<< EOT
    -
    $lbl_gender
    -
    $gender
    +
    $lbl_gender
    +
    $gender
    EOT; @@ -37,7 +37,7 @@ if(($a->profile['dob']) && ($a->profile['dob'] != '0000-00-00')) { $o .= <<< EOT
    -
    $lbl_birthday
    +
    $lbl_birthday
    EOT; // If no year, add an arbitrary one so just we can parse the month and day. @@ -45,7 +45,7 @@ EOT; $year_bd_format = t('j F, Y'); $short_bd_format = t('j F'); -$o .= '
    ' +$o .= '
    ' . ((intval($a->profile['dob'])) ? day_translate(datetime_convert('UTC','UTC',$a->profile['dob'] . ' 00:00 +00:00',$year_bd_format)) : day_translate(datetime_convert('UTC','UTC','2001-' . substr($a->profile['dob'],6) . ' 00:00 +00:00',$short_bd_format))) @@ -59,8 +59,8 @@ if($age = age($a->profile['dob'],$a->profile['timezone'],'')) { $lbl_age = t('Age:'); $o .= <<< EOT
    -
    $lbl_age
    -
    $age
    +
    $lbl_age
    +
    $age
    EOT; @@ -72,8 +72,8 @@ if($a->profile['marital']) { $o .= <<< EOT
    -
    $lbl_marital
    -
    $marital
    +
    $lbl_marital
    +
    $marital
    EOT; if($a->profile['with']) { @@ -92,8 +92,8 @@ if($a->profile['sexual']) { $o .= <<< EOT
    -
    $lbl_sexual
    -
    $sexual
    +
    $lbl_sexual
    +
    $sexual
    EOT; @@ -104,8 +104,8 @@ if($a->profile['homepage']) { $homepage = linkify($a->profile['homepage']); $o .= <<< EOT
    -
    $lbl_homepage
    -
    $homepage
    +
    $lbl_homepage
    +
    $homepage
    EOT; @@ -116,8 +116,8 @@ if($a->profile['politic']) { $politic = $a->profile['politic']; $o .= <<< EOT
    -
    $lbl_politic
    -
    $politic
    +
    $lbl_politic
    +
    $politic
    EOT; @@ -128,8 +128,8 @@ if($a->profile['religion']) { $religion = $a->profile['religion']; $o .= <<< EOT
    -
    $lbl_religion
    -
    $religion
    +
    $lbl_religion
    +
    $religion
    EOT; @@ -138,9 +138,9 @@ if($txt = prepare_text($a->profile['about'])) { $lbl_about = t('About:'); $o .= <<< EOT
    -
    $lbl_about
    +
    $lbl_about

    -
    $txt
    +
    $txt
    EOT; @@ -150,9 +150,9 @@ if($txt = prepare_text($a->profile['interest'])) { $lbl_interests = t('Hobbies/Interests:'); $o .= <<< EOT
    -
    $lbl_interests
    +
    $lbl_interests

    -
    $txt
    +
    $txt
    EOT; @@ -162,9 +162,9 @@ if($txt = prepare_text($a->profile['contact'])) { $lbl_contact = t('Contact information and Social Networks:'); $o .= <<< EOT
    -
    $lbl_contact
    +
    $lbl_contact

    -
    $txt
    +
    $txt
    EOT; @@ -174,9 +174,9 @@ if($txt = prepare_text($a->profile['music'])) { $lbl_music = t('Musical interests:'); $o .= <<< EOT
    -
    $lbl_music
    +
    $lbl_music

    -
    $txt
    +
    $txt
    EOT; @@ -186,9 +186,9 @@ if($txt = prepare_text($a->profile['book'])) { $lbl_book = t('Books, literature:'); $o .= <<< EOT
    -
    $lbl_book
    +
    $lbl_book

    -
    $txt
    +
    $txt
    EOT; @@ -198,9 +198,9 @@ if($txt = prepare_text($a->profile['tv'])) { $lbl_tv = t('Television:'); $o .= <<< EOT
    -
    $lbl_tv
    +
    $lbl_tv

    -
    $txt
    +
    $txt
    EOT; @@ -210,9 +210,9 @@ if($txt = prepare_text($a->profile['film'])) { $lbl_film = t('Film/dance/culture/entertainment:'); $o .= <<< EOT
    -
    $lbl_film
    +
    $lbl_film

    -
    $txt
    +
    $txt
    EOT; @@ -222,9 +222,9 @@ if($txt = prepare_text($a->profile['romance'])) { $lbl_romance = t('Love/Romance:'); $o .= <<< EOT
    -
    $lbl_romance
    +
    $lbl_romance

    -
    $txt
    +
    $txt
    EOT; @@ -234,9 +234,9 @@ if($txt = prepare_text($a->profile['work'])) { $lbl_work = t('Work/employment:'); $o .= <<< EOT
    -
    $lbl_work
    +
    $lbl_work

    -
    $txt
    +
    $txt
    EOT; @@ -246,9 +246,9 @@ if($txt = prepare_text($a->profile['education'])) { $lbl_education = t('School/education:'); $o .= <<< EOT
    -
    $lbl_education
    +
    $lbl_education

    -
    $txt
    +
    $txt
    EOT; diff --git a/include/queue.php b/include/queue.php index 5119a65d8c..d312b50f5a 100644 --- a/include/queue.php +++ b/include/queue.php @@ -123,6 +123,7 @@ function queue_run($argv, $argc){ } $data = $qi[0]['content']; + $public = $qi[0]['batch']; $contact = $c[0]; $owner = $u[0]; @@ -155,7 +156,7 @@ function queue_run($argv, $argc){ case NETWORK_DIASPORA: if($contact['notify']) { logger('queue: diaspora_delivery: item ' . $q_item['id'] . ' for ' . $contact['name']); - $deliver_status = diaspora_transmit($owner,$contact,$data); + $deliver_status = diaspora_transmit($owner,$contact,$data,$public); if($deliver_status == (-1)) update_queue_time($q_item['id']); diff --git a/include/template_processor.php b/include/template_processor.php index f64fe4c0fa..d04da8c610 100644 --- a/include/template_processor.php +++ b/include/template_processor.php @@ -199,8 +199,26 @@ $os=$s; $count++; $s = str_replace($this->search,$this->replace, $s); } - return $s; + return template_unescape($s); } } $t = new Template; + + + + +function template_escape($s) { + + return str_replace(array('$','{{'),array('!_Doll^Ars1Az_!','!_DoubLe^BraceS4Rw_!'),$s); + + +} + +function template_unescape($s) { + + return str_replace(array('!_Doll^Ars1Az_!','!_DoubLe^BraceS4Rw_!'),array('$','{{'),$s); + + + +} diff --git a/include/text.php b/include/text.php index a22faa1a5e..ea64a3d282 100644 --- a/include/text.php +++ b/include/text.php @@ -860,10 +860,16 @@ function lang_selector() { $o .= '
    ' + $jotnets .= '
    ' . t("Post to Email") . '
    '; } diff --git a/mod/follow.php b/mod/follow.php index df4d2e630a..77c8ae18f3 100644 --- a/mod/follow.php +++ b/mod/follow.php @@ -100,14 +100,15 @@ function follow_post(&$a) { $new_relation = CONTACT_IS_FOLLOWER; // create contact record - $r = q("INSERT INTO `contact` ( `uid`, `created`, `url`, `addr`, `alias`, `notify`, `poll`, `name`, `nick`, `photo`, `network`, `pubkey`, `rel`, `priority`, + $r = q("INSERT INTO `contact` ( `uid`, `created`, `url`, `addr`, `alias`, `batch`, `notify`, `poll`, `name`, `nick`, `photo`, `network`, `pubkey`, `rel`, `priority`, `writable`, `blocked`, `readonly`, `pending` ) - VALUES ( %d, '%s', '%s', '%s', '%s', '%s', '%s', '%s', '%s', '%s', '%s', '%s', %d, %d, %d, 0, 0, 0 ) ", + VALUES ( %d, '%s', '%s', '%s', '%s', '%s', '%s', '%s', '%s', '%s', '%s', '%s', '%s', %d, %d, %d, 0, 0, 0 ) ", intval(local_user()), dbesc(datetime_convert()), dbesc($ret['url']), dbesc($ret['addr']), dbesc($ret['alias']), + dbesc($ret['batch']), dbesc($ret['notify']), dbesc($ret['poll']), dbesc($ret['name']), diff --git a/mod/friendika.php b/mod/friendika.php index d0e709c753..c5d7de59fe 100644 --- a/mod/friendika.php +++ b/mod/friendika.php @@ -42,8 +42,6 @@ function friendika_content(&$a) { $o .= t('This is Friendika version') . ' ' . FRIENDIKA_VERSION . ' '; $o .= t('running at web location') . ' ' . z_root() . '

    '; - $o .= t('Shared content within the Friendika network is provided under the Creative Commons Attribution 3.0 license') . '

    '; - $o .= t('Please visit Project.Friendika.com to learn more about the Friendika project.') . '

    '; $o .= t('Bug reports and issues: please visit') . ' ' . 'Bugs.Friendika.com

    '; diff --git a/mod/group.php b/mod/group.php index 981796f67e..ca163902ca 100644 --- a/mod/group.php +++ b/mod/group.php @@ -176,8 +176,8 @@ function group_content(&$a) { if($change) $o = ''; - $o .= '

    '; $o .= '

    ' . t('Members') . '

    '; + $o .= '
    '; $textmode = (($switchtotext && (count($members) > $switchtotext)) ? true : false); foreach($members as $member) { if($member['url']) { @@ -190,9 +190,10 @@ function group_content(&$a) { $o .= '
    '; $o .= '
    '; + + $o .= '

    ' . t('All Contacts') . '

    '; $o .= '
    '; - $o .= '

    ' . t('All Contacts') . '

    '; $r = q("SELECT * FROM `contact` WHERE `uid` = %d AND `blocked` = 0 and `pending` = 0 and `self` = 0 ORDER BY `name` ASC", intval(local_user()) ); diff --git a/mod/hostxrd.php b/mod/hostxrd.php index c7861d26d0..1cc18da7a6 100644 --- a/mod/hostxrd.php +++ b/mod/hostxrd.php @@ -4,7 +4,8 @@ function hostxrd_init(&$a) { header('Access-Control-Allow-Origin: *'); header("Content-type: text/xml"); $tpl = file_get_contents('view/xrd_host.tpl'); - echo str_replace(array('$zroot','$domain'),array(z_root(),z_path()),$tpl); + echo str_replace(array( + '$zroot','$domain','$zot_post'),array(z_root(),z_path(),z_root() . '/post'),$tpl); session_write_close(); exit(); diff --git a/mod/item.php b/mod/item.php index 025a12a323..e5d4eea820 100644 --- a/mod/item.php +++ b/mod/item.php @@ -336,9 +336,9 @@ function item_post(&$a) { // embedded bookmark in post? convert to regular url and set bookmark flag $bookmark = 0; - if(preg_match_all("/\[bookmark\=([^\]]*)\](.*?)\[\/bookmark\]/m",$body,$match)) { + if(preg_match_all("/\[bookmark\=([^\]]*)\](.*?)\[\/bookmark\]/ism",$body,$match)) { $bookmark = 1; - $body = preg_replace("/\[bookmark\=([^\]]*)\](.*?)\[\/bookmark\]/m",'[url=$1]$2[/url]',$body); + $body = preg_replace("/\[bookmark\=([^\]]*)\](.*?)\[\/bookmark\]/ism",'[url=$1]$2[/url]',$body); } @@ -346,7 +346,7 @@ function item_post(&$a) { * Fold multi-line [code] sequences */ - $body = preg_replace('/\[\/code\]\s*\[code\]/m',"\n",$body); + $body = preg_replace('/\[\/code\]\s*\[code\]/ism',"\n",$body); /** * Look for any tags and linkify them @@ -501,6 +501,7 @@ function item_post(&$a) { $datarray['author-avatar'] = $author['thumb']; $datarray['created'] = datetime_convert(); $datarray['edited'] = datetime_convert(); + $datarray['commented'] = datetime_convert(); $datarray['received'] = datetime_convert(); $datarray['changed'] = datetime_convert(); $datarray['uri'] = $uri; @@ -561,9 +562,9 @@ function item_post(&$a) { $r = q("INSERT INTO `item` (`guid`, `uid`,`type`,`wall`,`gravity`,`contact-id`,`owner-name`,`owner-link`,`owner-avatar`, - `author-name`, `author-link`, `author-avatar`, `created`, `edited`, `received`, `changed`, `uri`, `thr-parent`, `title`, `body`, `app`, `location`, `coord`, + `author-name`, `author-link`, `author-avatar`, `created`, `edited`, `commented`, `received`, `changed`, `uri`, `thr-parent`, `title`, `body`, `app`, `location`, `coord`, `tag`, `inform`, `verb`, `allow_cid`, `allow_gid`, `deny_cid`, `deny_gid`, `private`, `pubmail`, `attach`, `bookmark` ) - VALUES( '%s', %d, '%s', %d, %d, %d, '%s', '%s', '%s', '%s', '%s', '%s', '%s', '%s', '%s', '%s', '%s', '%s', '%s', '%s', '%s', '%s', '%s', '%s', '%s', '%s', '%s', '%s', '%s', '%s', %d, %d, '%s', %d )", + VALUES( '%s', %d, '%s', %d, %d, %d, '%s', '%s', '%s', '%s', '%s', '%s', '%s', '%s', '%s', '%s', '%s', '%s', '%s', '%s', '%s', '%s', '%s', '%s', '%s', '%s', '%s', '%s', '%s', '%s', '%s', %d, %d, '%s', %d )", dbesc($datarray['guid']), intval($datarray['uid']), dbesc($datarray['type']), @@ -578,6 +579,7 @@ function item_post(&$a) { dbesc($datarray['author-avatar']), dbesc($datarray['created']), dbesc($datarray['edited']), + dbesc($datarray['commented']), dbesc($datarray['received']), dbesc($datarray['changed']), dbesc($datarray['uri']), @@ -803,6 +805,13 @@ function item_post(&$a) { // NOTREACHED } + // update the commented timestamp on the parent + + q("UPDATE `item` set `commented` = '%s', `changed` = '%s' WHERE `id` = %d LIMIT 1", + dbesc(datetime_convert()), + dbesc(datetime_convert()), + intval($parent) + ); $datarray['id'] = $post_id; $datarray['plink'] = $a->get_baseurl() . '/display/' . $user['nickname'] . '/' . $post_id; diff --git a/mod/like.php b/mod/like.php index 2876302122..95bedcc20f 100644 --- a/mod/like.php +++ b/mod/like.php @@ -55,6 +55,22 @@ function like_content(&$a) { return; } + $remote_owner = null; + + if(! $item['wall']) { + // The top level post may have been written by somebody on another system + $r = q("SELECT * FROM `contact` WHERE `id` = %d AND `uid` = %d LIMIT 1", + intval($item['contact-id']), + intval($item['uid']) + ); + if(! count($r)) + return; + if(! $r[0]['self']) + $remote_owner = $r[0]; + } + + // this represents the post owner on this system. + $r = q("SELECT `contact`.*, `user`.`nickname` FROM `contact` LEFT JOIN `user` ON `contact`.`uid` = `user`.`uid` WHERE `contact`.`self` = 1 AND `contact`.`uid` = %d LIMIT 1", intval($owner_uid) @@ -67,6 +83,11 @@ function like_content(&$a) { return; } + if(! $remote_owner) + $remote_owner = $owner; + + + // This represents the person posting if((local_user()) && (local_user() == $owner_uid)) { $contact = $owner; @@ -137,9 +158,9 @@ EOT; $arr['gravity'] = GRAVITY_LIKE; $arr['parent'] = $item['id']; $arr['parent-uri'] = $item['uri']; - $arr['owner-name'] = $owner['name']; - $arr['owner-link'] = $owner['url']; - $arr['owner-avatar'] = $owner['thumb']; + $arr['owner-name'] = $remote_owner['name']; + $arr['owner-link'] = $remote_owner['url']; + $arr['owner-avatar'] = $remote_owner['thumb']; $arr['author-name'] = $contact['name']; $arr['author-link'] = $contact['url']; $arr['author-avatar'] = $contact['thumb']; diff --git a/mod/message.php b/mod/message.php index cc94730bc5..1bee45d48c 100644 --- a/mod/message.php +++ b/mod/message.php @@ -159,10 +159,10 @@ function message_content(&$a) { '$from_url' => $a->get_baseurl() . '/redir/' . $rr['contact-id'], '$sparkle' => ' sparkle', '$from_photo' => $rr['thumb'], - '$subject' => (($rr['mailseen']) ? $rr['title'] : '' . $rr['title'] . ''), + '$subject' => template_escape((($rr['mailseen']) ? $rr['title'] : '' . $rr['title'] . '')), '$delete' => t('Delete conversation'), - '$body' => $rr['body'], - '$to_name' => $rr['name'], + '$body' => template_escape($rr['body']), + '$to_name' => template_escape($rr['name']), '$date' => datetime_convert('UTC',date_default_timezone_get(),$rr['mailcreated'], t('D, d M Y - g:i A')) )); } @@ -221,14 +221,14 @@ function message_content(&$a) { } $o .= replace_macros($tpl, array( '$id' => $message['id'], - '$from_name' =>$message['from-name'], + '$from_name' => template_escape($message['from-name']), '$from_url' => $from_url, '$sparkle' => $sparkle, '$from_photo' => $message['from-photo'], - '$subject' => $message['title'], - '$body' => smilies(bbcode($message['body'])), + '$subject' => template_escape($message['title']), + '$body' => template_escape(smilies(bbcode($message['body']))), '$delete' => t('Delete message'), - '$to_name' => $message['name'], + '$to_name' => template_escape($message['name']), '$date' => datetime_convert('UTC',date_default_timezone_get(),$message['created'],'D, d M Y - g:i A') )); @@ -240,7 +240,7 @@ function message_content(&$a) { '$header' => t('Send Reply'), '$to' => t('To:'), '$subject' => t('Subject:'), - '$subjtxt' => $message['title'], + '$subjtxt' => template_escape($message['title']), '$readonly' => ' readonly="readonly" style="background: #BBBBBB;" ', '$yourmessage' => t('Your message:'), '$select' => $select, diff --git a/mod/network.php b/mod/network.php index 1de0bc2120..9488cd973a 100644 --- a/mod/network.php +++ b/mod/network.php @@ -17,12 +17,12 @@ function network_init(&$a) { // We need a better way of managing a growing argument list - $srchurl = '/network' - . ((x($_GET,'cid')) ? '?cid=' . $_GET['cid'] : '') - . ((x($_GET,'star')) ? '?star=' . $_GET['star'] : '') - . ((x($_GET,'order')) ? '?order=' . $_GET['order'] : '') - . ((x($_GET,'bmark')) ? '?bmark=' . $_GET['bmark'] : ''); - + // moved into savedsearches() + // $srchurl = '/network' + // . ((x($_GET,'cid')) ? '?cid=' . $_GET['cid'] : '') + // . ((x($_GET,'star')) ? '?star=' . $_GET['star'] : '') + // . ((x($_GET,'bmark')) ? '?bmark=' . $_GET['bmark'] : ''); + if(x($_GET,'save')) { $r = q("select * from `search` where `uid` = %d and `term` = '%s' limit 1", intval(local_user()), @@ -42,76 +42,110 @@ function network_init(&$a) { ); } - $a->page['aside'] .= search($search,'netsearch-box',$srchurl,true); - - $a->page['aside'] .= ''; - + + if(x($_GET,'star')) { + $starred_active = 'active'; + } + + if($_GET['bmark']) { + $bookmarked_active = 'active'; + } + + if (($new_active == '') + && ($starred_active == '') + && ($bookmarked_active == '') + && ($search_active == '')) { + $all_active = 'active'; + } + + // network links moved to content to match other pages + // all + $a->page['content'] .= '' + . t('All') . ''; + + // new + $a->page['content'] .= '' + . t('New') . ''; + + // starred + $a->page['content'] .= '' + . t('Starred') . ''; + + // bookmarks + $a->page['content'] .= '' + . t('Bookmarks') . ''; + + $a->page['content'] .= '
    '; + // --- end item filter tabs + + // search terms header + if(x($_GET,'search')) { + $a->page['content'] .= '

    Search Results For: ' . $search . '

    '; + } + $a->page['aside'] .= group_side('network','network',true,$group_id); + + // moved to saved searches to have it in the same div + //$a->page['aside'] .= search($search,'netsearch-box',$srchurl,true); - $a->page['aside'] .= saved_searches(); + $a->page['aside'] .= saved_searches($search); } -function saved_searches() { +function saved_searches($search) { + $srchurl = '/network' + . ((x($_GET,'cid')) ? '?cid=' . $_GET['cid'] : '') + . ((x($_GET,'star')) ? '?star=' . $_GET['star'] : '') + . ((x($_GET,'bmark')) ? '?bmark=' . $_GET['bmark'] : ''); + $o = ''; $r = q("select `term` from `search` WHERE `uid` = %d", intval(local_user()) ); + $o .= '
    '; + $o .= '' . "\r\n"; + $o .= search($search,'netsearch-box',$srchurl,true); + if(count($r)) { - $o .= '

    ' . t('Saved Searches') . '

    ' . "\r\n"; - $o .= '
      ' . "\r\n"; + $o .= '
    ' . "\r\n"; + $o .= ''; } + $o .= '
    ' . "\r\n"; return $o; } - - function network_content(&$a, $update = 0) { require_once('include/conversation.php'); @@ -132,6 +166,7 @@ function network_content(&$a, $update = 0) { $star = ((x($_GET,'star')) ? intval($_GET['star']) : 0); $bmark = ((x($_GET,'bmark')) ? intval($_GET['bmark']) : 0); $order = ((x($_GET,'order')) ? notags($_GET['order']) : 'comment'); + $liked = ((x($_GET,'liked')) ? intval($_GET['liked']) : 0); if(($a->argc > 2) && $a->argv[2] === 'new') @@ -195,6 +230,7 @@ function network_content(&$a, $update = 0) { . ((x($_GET,'star')) ? '&star=' . $_GET['star'] : '') . ((x($_GET,'order')) ? '&order=' . $_GET['order'] : '') . ((x($_GET,'bmark')) ? '&bmark=' . $_GET['bmark'] : '') + . ((x($_GET,'liked')) ? '&liked=' . $_GET['liked'] : '') . "'; var profile_page = " . $a->pager['page'] . "; \r\n"; } @@ -315,44 +351,27 @@ function network_content(&$a, $update = 0) { else { // Normal conversation view - // Show conversation by activity date - if($order === 'post') { - $r = q("SELECT `item`.`id` AS `item_id`, `contact`.`uid` AS `contact_uid` - FROM `item` LEFT JOIN `contact` ON `contact`.`id` = `item`.`contact-id` - WHERE `item`.`uid` = %d AND `item`.`visible` = 1 AND `item`.`deleted` = 0 - AND `contact`.`blocked` = 0 AND `contact`.`pending` = 0 - AND `item`.`parent` = `item`.`id` - $sql_extra - ORDER BY `item`.`created` DESC LIMIT %d ,%d ", - intval(local_user()), - intval($a->pager['start']), - intval($a->pager['itemspage']) - ); - } - else { - // $order === 'comment' - // First fetch a known number of parent items + if($order === 'post') + $ordering = "`created`"; + else + $ordering = "`commented`"; + + // Fetch a page full of parent items for this page + + $r = q("SELECT `item`.`id` AS `item_id`, `contact`.`uid` AS `contact_uid` + FROM `item` LEFT JOIN `contact` ON `contact`.`id` = `item`.`contact-id` + WHERE `item`.`uid` = %d AND `item`.`visible` = 1 AND `item`.`deleted` = 0 + AND `contact`.`blocked` = 0 AND `contact`.`pending` = 0 + AND `item`.`parent` = `item`.`id` + $sql_extra + ORDER BY `item`.$ordering DESC LIMIT %d ,%d ", + intval(local_user()), + intval($a->pager['start']), + intval($a->pager['itemspage']) + ); - $r = q("SELECT `item`.`id` AS `item_id`, `contact`.`uid` AS `contact_uid` - FROM `item` LEFT JOIN `contact` ON `contact`.`id` = `item`.`contact-id` - , (SELECT `_com`.`parent`,max(`_com`.`created`) as `created` - FROM `item` AS `_com` - WHERE `_com`.`uid`=%d AND - (`_com`.`parent`!=`_com`.`id` OR `_com`.`id` NOT IN (SELECT `__com`.`parent` FROM `item` as `__com` WHERE `__com`.`parent`!=`__com`.`id`)) - GROUP BY `_com`.`parent` ORDER BY `created` DESC) AS `com` - WHERE `item`.`id`=`com`.`parent` AND - `item`.`uid` = %d AND `item`.`visible` = 1 AND `item`.`deleted` = 0 - AND `contact`.`blocked` = 0 AND `contact`.`pending` = 0 - $sql_extra - ORDER BY `com`.`created` DESC LIMIT %d ,%d ", - intval(local_user()), - intval(local_user()), - intval($a->pager['start']), - intval($a->pager['itemspage']) - ); - } // Then fetch all the children of the parents that are on this page $parents_arr = array(); @@ -363,48 +382,21 @@ function network_content(&$a, $update = 0) { $parents_arr[] = $rr['item_id']; $parents_str = implode(', ', $parents_arr); - if($order === 'post') { - // parent created order - $r = q("SELECT `item`.*, `item`.`id` AS `item_id`, - `contact`.`name`, `contact`.`photo`, `contact`.`url`, `contact`.`rel`, `contact`.`writable`, - `contact`.`network`, `contact`.`thumb`, `contact`.`dfrn-id`, `contact`.`self`, - `contact`.`id` AS `cid`, `contact`.`uid` AS `contact-uid` - FROM `item`, (SELECT `p`.`id`,`p`.`created` FROM `item` AS `p` WHERE `p`.`parent`=`p`.`id`) as `parentitem`, `contact` - WHERE `item`.`uid` = %d AND `item`.`visible` = 1 AND `item`.`deleted` = 0 - AND `contact`.`id` = `item`.`contact-id` - AND `contact`.`blocked` = 0 AND `contact`.`pending` = 0 - AND `item`.`parent` = `parentitem`.`id` AND `item`.`parent` IN ( %s ) - $sql_extra - ORDER BY `parentitem`.`created` DESC, `item`.`gravity` ASC, `item`.`created` ASC ", - intval(local_user()), - dbesc($parents_str) - ); - } - else { - // $order === 'comment' - - $r = q("SELECT `item`.*, `item`.`id` AS `item_id`, - `contact`.`name`, `contact`.`photo`, `contact`.`url`, `contact`.`rel`, `contact`.`writable`, - `contact`.`network`, `contact`.`thumb`, `contact`.`dfrn-id`, `contact`.`self`, - `contact`.`id` AS `cid`, `contact`.`uid` AS `contact-uid` - FROM `item`, `contact`, - (SELECT `_com`.`parent`,max(`_com`.`created`) as `created` - FROM `item` AS `_com` - WHERE `_com`.`uid`=%d AND - (`_com`.`parent`!=`_com`.`id` OR `_com`.`id` NOT IN (SELECT `__com`.`parent` FROM `item` as `__com` WHERE `__com`.`parent`!=`__com`.`id`)) - GROUP BY `_com`.`parent` ORDER BY `created` DESC) AS `com` - WHERE `item`.`uid` = %d AND `item`.`visible` = 1 AND `item`.`deleted` = 0 - AND `contact`.`id` = `item`.`contact-id` - AND `contact`.`blocked` = 0 AND `contact`.`pending` = 0 - AND `item`.`parent` = `com`.`parent` AND `item`.`parent` IN ( %s ) - $sql_extra - ORDER BY `com`.`created` DESC, `item`.`gravity` ASC, `item`.`created` ASC ", - intval(local_user()), - intval(local_user()), - dbesc($parents_str) - ); - } - } + $r = q("SELECT `item`.*, `item`.`id` AS `item_id`, + `contact`.`name`, `contact`.`photo`, `contact`.`url`, `contact`.`rel`, `contact`.`writable`, + `contact`.`network`, `contact`.`thumb`, `contact`.`dfrn-id`, `contact`.`self`, + `contact`.`id` AS `cid`, `contact`.`uid` AS `contact-uid` + FROM `item`, (SELECT `p`.`id`,`p`.`created`,`p`.`commented` FROM `item` AS `p` WHERE `p`.`parent`=`p`.`id`) as `parentitem`, `contact` + WHERE `item`.`uid` = %d AND `item`.`visible` = 1 AND `item`.`deleted` = 0 + AND `contact`.`id` = `item`.`contact-id` + AND `contact`.`blocked` = 0 AND `contact`.`pending` = 0 + AND `item`.`parent` = `parentitem`.`id` AND `item`.`parent` IN ( %s ) + $sql_extra + ORDER BY `parentitem`.$ordering DESC, `parentitem`.`id` ASC, `item`.`gravity` ASC, `item`.`created` ASC ", + intval(local_user()), + dbesc($parents_str) + ); + } } // Set this so that the conversation function can find out contact info for our wall-wall items @@ -416,7 +408,6 @@ function network_content(&$a, $update = 0) { if(! $update) { $o .= paginate($a); - $o .= cc_license(); } return $o; diff --git a/mod/oexchange.php b/mod/oexchange.php index 1a990c64f1..53dce6446a 100644 --- a/mod/oexchange.php +++ b/mod/oexchange.php @@ -28,9 +28,16 @@ function oexchange_content(&$a) { return; } - $url = (((x($_GET,'url')) && strlen($_GET['url'])) ? notags(trim($_GET['url'])) : ''); + $url = (((x($_GET,'url')) && strlen($_GET['url'])) + ? urlencode(notags(trim($_GET['url']))) : ''); + $title = (((x($_GET,'title')) && strlen($_GET['title'])) + ? '&title=' . urlencode(notags(trim($_GET['title']))) : ''); + $description = (((x($_GET,'description')) && strlen($_GET['description'])) + ? '&description=' . urlencode(notags(trim($_GET['description']))) : ''); + $tags = (((x($_GET,'tags')) && strlen($_GET['tags'])) + ? '&tags=' . urlencode(notags(trim($_GET['tags']))) : ''); - $s = fetch_url($a->get_baseurl() . '/parse_url&url=' . $url); + $s = fetch_url($a->get_baseurl() . '/parse_url?f=&url=' . $url . $title . $description . $tags); if(! strlen($s)) return; diff --git a/mod/openid.php b/mod/openid.php index 3c32931471..b8734f0234 100644 --- a/mod/openid.php +++ b/mod/openid.php @@ -56,7 +56,7 @@ function openid_content(&$a) { $r = q("SELECT `user`.*, `user`.`pubkey` as `upubkey`, `user`.`prvkey` as `uprvkey` - FROM `user` WHERE `openid` = '%s' AND `blocked` = 0 AND `verified` = 1 LIMIT 1", + FROM `user` WHERE `openid` = '%s' AND `blocked` = 0 AND `account_expired` = 0 AND `verified` = 1 LIMIT 1", dbesc($_SESSION['openid']) ); if(! count($r)) { diff --git a/mod/parse_url.php b/mod/parse_url.php index 79c336ddcc..a238ecb2f9 100644 --- a/mod/parse_url.php +++ b/mod/parse_url.php @@ -3,15 +3,36 @@ require_once('library/HTML5/Parser.php'); require_once('library/HTMLPurifier.auto.php'); +function arr_add_hashes(&$item,$k) { + $item = '#' . $item; +} + function parse_url_content(&$a) { - logger('parse_url: ' . $_GET['url']); + $text = null; + $str_tags = ''; - $url = trim(hex2bin($_GET['url'])); + if(x($_GET,'binurl')) + $url = trim(hex2bin($_GET['binurl'])); + else + $url = trim($_GET['url']); + + if($_GET['title']) + $title = strip_tags(trim($_GET['title'])); + + if($_GET['description']) + $text = strip_tags(trim($_GET['description'])); + + if($_GET['tags']) { + $arr_tags = str_getcsv($_GET['tags']); + if(count($arr_tags)) { + array_walk($arr_tags,'arr_add_hashes'); + $str_tags = '
    ' . implode(' ',$arr_tags) . '
    '; + } + } logger('parse_url: ' . $url); - $text = null; $template = "
    %s%s
    "; @@ -25,6 +46,20 @@ function parse_url_content(&$a) { killme(); } + if($url && $title && $text) { + + $text = '

    ' . $text . '

    '; + $title = str_replace(array("\r","\n"),array('',''),$title); + + $result = sprintf($template,$url,($title) ? $title : $url,$text) . $str_tags; + + logger('parse_url (unparsed): returns: ' . $result); + + echo $result; + killme(); + } + + if($url) { $s = fetch_url($url); } else { @@ -35,14 +70,16 @@ function parse_url_content(&$a) { logger('parse_url: data: ' . $s, LOGGER_DATA); if(! $s) { - echo sprintf($template,$url,$url,''); + echo sprintf($template,$url,$url,'') . $str_tags; killme(); } - if(strpos($s,'')) { - $title = substr($s,strpos($s,'<title>')+7,64); - if(strpos($title,'<') !== false) - $title = strip_tags(substr($title,0,strpos($title,'<'))); + if(! $title) { + if(strpos($s,'<title>')) { + $title = substr($s,strpos($s,'<title>')+7,64); + if(strpos($title,'<') !== false) + $title = strip_tags(substr($title,0,strpos($title,'<'))); + } } $config = HTMLPurifier_Config::createDefault(); @@ -56,7 +93,7 @@ function parse_url_content(&$a) { $dom = @HTML5_Parser::parse($s); if(! $dom) { - echo sprintf($template,$url,$url,''); + echo sprintf($template,$url,$url,'') . $str_tags; killme(); } @@ -69,48 +106,51 @@ function parse_url_content(&$a) { } } - $divs = $dom->getElementsByTagName('div'); - if($divs) { - foreach($divs as $div) { - $class = $div->getAttribute('class'); - if($class && (stristr($class,'article') || stristr($class,'content'))) { - $items = $div->getElementsByTagName('p'); - if($items) { - foreach($items as $item) { - $text = $item->textContent; - if(stristr($text,'<script')) { - $text = ''; - continue; - } - $text = strip_tags($text); - if(strlen($text) < 100) { - $text = ''; - continue; - } - $text = substr($text,0,250) . '...' ; - break; - } - } - } - if($text) - break; - } - } if(! $text) { - $items = $dom->getElementsByTagName('p'); - if($items) { - foreach($items as $item) { - $text = $item->textContent; - if(stristr($text,'<script')) - continue; - $text = strip_tags($text); - if(strlen($text) < 100) { - $text = ''; - continue; + $divs = $dom->getElementsByTagName('div'); + if($divs) { + foreach($divs as $div) { + $class = $div->getAttribute('class'); + if($class && (stristr($class,'article') || stristr($class,'content'))) { + $items = $div->getElementsByTagName('p'); + if($items) { + foreach($items as $item) { + $text = $item->textContent; + if(stristr($text,'<script')) { + $text = ''; + continue; + } + $text = strip_tags($text); + if(strlen($text) < 100) { + $text = ''; + continue; + } + $text = substr($text,0,250) . '...' ; + break; + } + } + } + if($text) + break; + } + } + + if(! $text) { + $items = $dom->getElementsByTagName('p'); + if($items) { + foreach($items as $item) { + $text = $item->textContent; + if(stristr($text,'<script')) + continue; + $text = strip_tags($text); + if(strlen($text) < 100) { + $text = ''; + continue; + } + $text = substr($text,0,250) . '...' ; + break; } - $text = substr($text,0,250) . '...' ; - break; } } } @@ -119,9 +159,9 @@ function parse_url_content(&$a) { $text = '<br /><br /><blockquote>' . $text . '</blockquote><br />'; } - $title = str_replace("\n",'',$title); + $title = str_replace(array("\r","\n"),array('',''),$title); - $result = sprintf($template,$url,($title) ? $title : $url,$text); + $result = sprintf($template,$url,($title) ? $title : $url,$text) . $str_tags; logger('parse_url: returns: ' . $result); diff --git a/mod/photos.php b/mod/photos.php index b74ca85d71..cb7df15ccf 100644 --- a/mod/photos.php +++ b/mod/photos.php @@ -33,13 +33,18 @@ function photos_init(&$a) { if(count($albums)) { $a->data['albums'] = $albums; - $o .= '<h4><a href="' . $a->get_baseurl() . '/profile/' . $a->data['user']['nickname'] . '">' . $a->data['user']['username'] . '</a></h4>'; - $o .= '<h4>' . '<a href="' . $a->get_baseurl() . '/photos/' . $a->data['user']['nickname'] . '">' . t('Photo Albums') . '</a></h4>'; - + $o .= '<div class="vcard">'; + $o .= '<div class="fn">' . $a->data['user']['username'] . '</h4>'; + $o .= '<div id="profile-photo-wrapper"><img class="photo" style="width: 175px; height: 175px;" src="' . $a->get_baseurl() . '/photo/profile/' . $a->data['user']['uid'] . '.jpg" alt="' . $a->data['user']['username'] . '" /></div>'; + $o .= '</div>'; + + $o .= '<div id="side-bar-photos-albums" class="widget">'; + $o .= '<h3>' . '<a href="' . $a->get_baseurl() . '/photos/' . $a->data['user']['nickname'] . '">' . t('Photo Albums') . '</a></h4>'; + $o .= '<ul>'; foreach($albums as $album) { - // don't show contact photos. We once trasnlated this name, but then you could still access it under + // don't show contact photos. We once translated this name, but then you could still access it under // a different language setting. Now we store the name in English and check in English (and translated for legacy albums). if((! strlen($album['album'])) || ($album['album'] === 'Contact Photos') || ($album['album'] === t('Contact Photos'))) @@ -887,9 +892,9 @@ function photos_content(&$a) { '$nickname' => $a->data['user']['nickname'], '$newalbum' => t('New album name: '), '$existalbumtext' => t('or existing album name: '), - '$albumselect' => $albumselect, + '$albumselect' => template_escape($albumselect), '$permissions' => t('Permissions'), - '$aclselect' => (($visitor) ? '' : populate_acl($a->user, $celeb)), + '$aclselect' => (($visitor) ? '' : template_escape(populate_acl($a->user, $celeb))), '$uploader' => $ret['addon_text'], '$default' => (($ret['default_upload']) ? $default_upload : ''), '$uploadurl' => $ret['post_url'] @@ -930,7 +935,7 @@ function photos_content(&$a) { $o .= replace_macros($edit_tpl,array( '$nametext' => t('New album name: '), '$nickname' => $a->data['user']['nickname'], - '$album' => $album, + '$album' => template_escape($album), '$hexalbum' => bin2hex($album), '$submit' => t('Submit'), '$dropsubmit' => t('Delete Album') @@ -955,8 +960,8 @@ function photos_content(&$a) { '$photolink' => $a->get_baseurl() . '/photos/' . $a->data['user']['nickname'] . '/image/' . $rr['resource-id'], '$phototitle' => t('View Photo'), '$imgsrc' => $a->get_baseurl() . '/photo/' . $rr['resource-id'] . '-' . $rr['scale'] . '.jpg', - '$imgalt' => $rr['filename'], - '$desc'=> $rr['desc'] + '$imgalt' => template_escape($rr['filename']), + '$desc'=> template_escape($rr['desc']) )); } @@ -982,7 +987,15 @@ function photos_content(&$a) { ); if(! count($ph)) { - notice( t('Photo not available') . EOL ); + $ph = q("SELECT `id` FROM `photo` WHERE `uid` = %d AND `resource-id` = '%s' + LIMIT 1", + intval($owner_uid), + dbesc($datum) + ); + if(count($ph)) + notice( t('Permission denied. Access to this item may be restricted.')); + else + notice( t('Photo not available') . EOL ); return; } @@ -1007,8 +1020,9 @@ function photos_content(&$a) { break; } } - $prevlink = $a->get_baseurl() . '/photos/' . $a->data['user']['nickname'] . '/image/' . $prvnxt[$prv]['resource-id'] ; - $nextlink = $a->get_baseurl() . '/photos/' . $a->data['user']['nickname'] . '/image/' . $prvnxt[$nxt]['resource-id'] ; + $edit_suffix = ((($cmd === 'edit') && ($can_post)) ? '/edit' : ''); + $prevlink = $a->get_baseurl() . '/photos/' . $a->data['user']['nickname'] . '/image/' . $prvnxt[$prv]['resource-id'] . $edit_suffix; + $nextlink = $a->get_baseurl() . '/photos/' . $a->data['user']['nickname'] . '/image/' . $prvnxt[$nxt]['resource-id'] . $edit_suffix; } @@ -1031,7 +1045,7 @@ function photos_content(&$a) { if($can_post && ($ph[0]['uid'] == $owner_uid)) { $tools = array( - 'edit' => array($a->get_baseurl() . '/photos/' . $a->data['user']['nickname'] . '/image/' . $datum . '/edit', t('Edit photo')), + 'edit' => array($a->get_baseurl() . '/photos/' . $a->data['user']['nickname'] . '/image/' . $datum . (($cmd === 'edit') ? '' : '/edit'), (($cmd === 'edit') ? t('View photo') : t('Edit photo'))), 'profile'=>array($a->get_baseurl() . '/profile_photo/use/'.$ph[0]['resource-id'], t('Use as profile photo')), ); @@ -1130,16 +1144,16 @@ function photos_content(&$a) { $edit_tpl = get_markup_template('photo_edit.tpl'); $edit = replace_macros($edit_tpl, array( '$id' => $ph[0]['id'], - '$album' => $ph[0]['album'], + '$album' => template_escape($ph[0]['album']), '$newalbum' => t('New album name'), '$nickname' => $a->data['user']['nickname'], '$resource_id' => $ph[0]['resource-id'], '$capt_label' => t('Caption'), - '$caption' => $ph[0]['desc'], + '$caption' => template_escape($ph[0]['desc']), '$tag_label' => t('Add a Tag'), '$tags' => $link_item['tag'], '$permissions' => t('Permissions'), - '$aclselect' => populate_acl($ph[0]), + '$aclselect' => template_escape(populate_acl($ph[0])), '$help_tags' => t('Example: @bob, @Barbara_Jensen, @jim@example.com, #California, #camping'), '$item_id' => ((count($linked_items)) ? $link_item['id'] : 0), '$submit' => t('Submit'), @@ -1285,11 +1299,11 @@ function photos_content(&$a) { $comments .= replace_macros($template,array( '$id' => $item['item_id'], '$profile_url' => $profile_link, - '$name' => $profile_name, + '$name' => template_escape($profile_name), '$thumb' => $profile_avatar, '$sparkle' => $sparkle, - '$title' => $item['title'], - '$body' => bbcode($item['body']), + '$title' => template_escape($item['title']), + '$body' => template_escape(bbcode($item['body'])), '$ago' => relative_date($item['created']), '$indent' => (($item['parent'] != $item['item_id']) ? ' comment' : ''), '$drop' => $drop, @@ -1304,18 +1318,18 @@ function photos_content(&$a) { $photo_tpl = get_markup_template('photo_view.tpl'); $o .= replace_macros($photo_tpl, array( '$id' => $ph[0]['id'], - '$album' => array($album_link,$ph[0]['album']), + '$album' => array($album_link,template_escape($ph[0]['album'])), '$tools' => $tools, '$lock' => $lock, '$photo' => $photo, '$prevlink' => $prevlink, '$nextlink' => $nextlink, '$desc' => $ph[0]['desc'], - '$tags' => $tags, + '$tags' => template_escape($tags), '$edit' => $edit, '$likebuttons' => $likebuttons, - '$like' => $like, - '$dislike' => $dislike, + '$like' => template_escape($like), + '$dislike' => template_escape($dislike), '$comments' => $comments, '$paginate' => $paginate, )); @@ -1363,9 +1377,9 @@ function photos_content(&$a) { '$phototitle' => t('View Photo'), '$imgsrc' => $a->get_baseurl() . '/photo/' . $rr['resource-id'] . '-' . ((($rr['scale']) == 6) ? 4 : $rr['scale']) . '.jpg', '$albumlink' => $a->get_baseurl() . '/photos/' . $a->data['user']['nickname'] . '/album/' . bin2hex($rr['album']), - '$albumname' => $rr['album'], + '$albumname' => template_escape($rr['album']), '$albumalt' => t('View Album'), - '$imgalt' => $rr['filename'] + '$imgalt' => template_escape($rr['filename']) )); } diff --git a/mod/profile.php b/mod/profile.php index 66fa175543..50bbdd46e4 100644 --- a/mod/profile.php +++ b/mod/profile.php @@ -239,7 +239,6 @@ function profile_content(&$a, $update = 0) { if(! $update) { $o .= paginate($a); - $o .= cc_license(); } return $o; diff --git a/mod/pubsub.php b/mod/pubsub.php index 4dff5d531a..b2f0069271 100644 --- a/mod/pubsub.php +++ b/mod/pubsub.php @@ -44,7 +44,7 @@ function pubsub_init(&$a) { $subscribe = (($hub_mode === 'subscribe') ? 1 : 0); - $r = q("SELECT * FROM `user` WHERE `nickname` = '%s' LIMIT 1", + $r = q("SELECT * FROM `user` WHERE `nickname` = '%s' AND `account_expired` = 0 LIMIT 1", dbesc($nick) ); if(! count($r)) @@ -99,7 +99,7 @@ function pubsub_post(&$a) { $nick = (($a->argc > 1) ? notags(trim($a->argv[1])) : ''); $contact_id = (($a->argc > 2) ? intval($a->argv[2]) : 0 ); - $r = q("SELECT * FROM `user` WHERE `nickname` = '%s' LIMIT 1", + $r = q("SELECT * FROM `user` WHERE `nickname` = '%s' AND `account_expired` = 0 LIMIT 1", dbesc($nick) ); if(! count($r)) diff --git a/mod/receive.php b/mod/receive.php index 34128518b5..950bf0bd38 100644 --- a/mod/receive.php +++ b/mod/receive.php @@ -12,18 +12,26 @@ require_once('include/diaspora.php'); function receive_post(&$a) { - if($a->argc != 3 || $a->argv[1] !== 'users') - http_status_exit(500); + $public = false; - $guid = $a->argv[2]; + if(($a->argc == 2) && ($a->argv[1] === 'public')) { + $public = true; + } + else { - $r = q("SELECT * FROM `user` WHERE `guid` = '%s' LIMIT 1", - dbesc($guid) - ); - if(! count($r)) - http_status_exit(500); + if($a->argc != 3 || $a->argv[1] !== 'users') + http_status_exit(500); - $importer = $r[0]; + $guid = $a->argv[2]; + + $r = q("SELECT * FROM `user` WHERE `guid` = '%s' AND `account_expired` = 0 LIMIT 1", + dbesc($guid) + ); + if(! count($r)) + http_status_exit(500); + + $importer = $r[0]; + } // It is an application/x-www-form-urlencoded @@ -41,9 +49,13 @@ function receive_post(&$a) { if(! is_array($msg)) http_status_exit(500); - diaspora_dispatch($importer,$msg); + $ret = 0; + if($public) + diaspora_dispatch_public($msg); + else + $ret = diaspora_dispatch($importer,$msg); - http_status_exit(200); + http_status_exit(($ret) ? $ret : 200); // NOTREACHED } diff --git a/mod/register.php b/mod/register.php index 5fceebd4bd..85e1f9faa0 100644 --- a/mod/register.php +++ b/mod/register.php @@ -501,8 +501,7 @@ function register_content(&$a) { } - $license = cc_license(); - + $license = ''; $o = get_markup_template("register.tpl"); $o = replace_macros($o, array( diff --git a/mod/salmon.php b/mod/salmon.php index 0264e820db..6172d17a1d 100644 --- a/mod/salmon.php +++ b/mod/salmon.php @@ -25,12 +25,12 @@ function salmon_post(&$a) { $xml = file_get_contents('php://input'); - logger('mod-salmon: new salmon ' . $xml); + logger('mod-salmon: new salmon ' . $xml, LOGGER_DATA); $nick = (($a->argc > 1) ? notags(trim($a->argv[1])) : ''); $mentions = (($a->argc > 2 && $a->argv[2] === 'mention') ? true : false); - $r = q("SELECT * FROM `user` WHERE `nickname` = '%s' LIMIT 1", + $r = q("SELECT * FROM `user` WHERE `nickname` = '%s' AND `account_expired` = 0 LIMIT 1", dbesc($nick) ); if(! count($r)) diff --git a/mod/search.php b/mod/search.php index 3264948be2..396b50738e 100644 --- a/mod/search.php +++ b/mod/search.php @@ -9,8 +9,9 @@ function search_saved_searches() { ); if(count($r)) { + $o .= '<div id="saved-search-list" class="widget">'; $o .= '<h3>' . t('Saved Searches') . '</h3>' . "\r\n"; - $o .= '<div id="saved-search-list"><ul id="saved-search-ul">' . "\r\n"; + $o .= '<ul id="saved-search-ul">' . "\r\n"; foreach($r as $rr) { $o .= '<li class="saved-search-li clear"><a href="search/?f=&remove=1&search=' . $rr['term'] . '" class="icon drophide savedsearchdrop" title="' . t('Remove term') . '" onclick="return confirmDelete();" onmouseover="imgbright(this);" onmouseout="imgdull(this);" ></a> <a href="search/?f&search=' . $rr['term'] . '" class="savedsearchterm" >' . $rr['term'] . '</a></li>' . "\r\n"; } @@ -142,12 +143,11 @@ function search_content(&$a) { ); - + $o .= '<h2>Search results for: ' . $search . '</h2>'; $o .= conversation($a,$r,'search',false); $o .= paginate($a); - $o .= cc_license(); return $o; } diff --git a/mod/xrd.php b/mod/xrd.php index fcec74336e..dae6e4828b 100644 --- a/mod/xrd.php +++ b/mod/xrd.php @@ -45,6 +45,7 @@ function xrd_init(&$a) { '$profile_url' => $a->get_baseurl() . '/profile/' . $r[0]['nickname'], '$hcard_url' => $a->get_baseurl() . '/hcard/' . $r[0]['nickname'], '$atom' => $a->get_baseurl() . '/dfrn_poll/' . $r[0]['nickname'], + '$zot_post' => $a->get_baseurl() . '/post/' . $r[0]['nickname'], '$photo' => $a->get_baseurl() . '/photo/profile/' . $r[0]['uid'] . '.jpg', '$dspr' => $dspr, '$salmon' => $a->get_baseurl() . '/salmon/' . $r[0]['nickname'], diff --git a/update.php b/update.php index f94e78d727..2f9277dae6 100644 --- a/update.php +++ b/update.php @@ -1,6 +1,6 @@ <?php -define( 'UPDATE_VERSION' , 1087 ); +define( 'UPDATE_VERSION' , 1092 ); /** * @@ -726,3 +726,47 @@ function update_1086() { q("ALTER TABLE `item` ADD `bookmark` tinyint(1) NOT NULL DEFAULT '0' AFTER `starred` "); } +function update_1087() { + q("ALTER TABLE `item` ADD `commented` datetime NOT NULL DEFAULT '0000-00-00 00:00:00' AFTER `edited` "); + + $r = q("SELECT `id` FROM `item` WHERE `parent` = `id` "); + if(count($r)) { + foreach($r as $rr) { + $x = q("SELECT max(`created`) AS `cdate` FROM `item` WHERE `parent` = %d LIMIT 1", + intval($rr['id']) + ); + if(count($x)) + q("UPDATE `item` SET `commented` = '%s' WHERE `id` = %d LIMIT 1", + dbesc($x[0]['cdate']), + intval($rr['id']) + ); + } + } +} + +function update_1088() { + q("ALTER TABLE `user` ADD `account_expired` TINYINT( 1 ) NOT NULL DEFAULT '0' AFTER `expire` , + ADD `account_expires_on` DATETIME NOT NULL DEFAULT '0000-00-00 00:00:00' AFTER `account_expired` , + ADD `expire_notification_sent` DATETIME NOT NULL DEFAULT '0000-00-00 00:00:00' AFTER `account_expires_on` "); +} + +function update_1089() { + q("ALTER TABLE `user` ADD `blocktags` TINYINT( 1 ) NOT NULL DEFAULT '0' AFTER `hidewall` "); +} + +function update_1090() { + q("ALTER TABLE `contact` ADD `batch` char(255) NOT NULL AFTER `prvkey` "); + + q("UPDATE `contact` SET `batch` = concat(substring_index(`url`,'/',3),'/receive/public') WHERE `network` = 'dspr' "); + +} + +function update_1091() { + + // catch a few stragglers that may have crept in before we added this on remote connects + q("UPDATE `contact` SET `batch` = concat(substring_index(`url`,'/',3),'/receive/public') WHERE `network` = 'dspr' AND `batch` = '' "); + q("ALTER TABLE `queue` ADD `batch` TINYINT( 1 ) NOT NULL DEFAULT '0' "); + q("ALTER TABLE `fcontact` ADD `batch` char(255) NOT NULL AFTER `addr` "); + +} + diff --git a/util/po2php.php b/util/po2php.php index 1a86bb38d0..c703172af7 100644 --- a/util/po2php.php +++ b/util/po2php.php @@ -10,7 +10,14 @@ function po2php_run($argv, $argc) { $pofile = $argv[1]; $outfile = dirname($pofile)."/strings.php"; - + + if(strstr($outfile,'util')) + $lang = 'en'; + else + $lang = str_replace('-','_',basename(dirname($pofile))); + + + if (!file_exists($pofile)){ print "Unable to find '$pofile'\n"; return; @@ -37,7 +44,7 @@ function po2php_run($argv, $argc) { $match=Array(); preg_match("|nplurals=([0-9]*); *plural=(.*)[;\\\\]|", $l, $match); $cond = str_replace('n','$n',$match[2]); - $out .= 'function string_plural_select($n){'."\n"; + $out .= 'function string_plural_select_' . $lang . '($n){'."\n"; $out .= ' return '.$cond.';'."\n"; $out .= '}'."\n"; } diff --git a/view/cs/strings.php b/view/cs/strings.php index 38f3041b79..0c7d0d7bd8 100644 --- a/view/cs/strings.php +++ b/view/cs/strings.php @@ -1,6 +1,6 @@ <?php -function string_plural_select($n){ +function string_plural_select_cs($n){ return ($n==1) ? 0 : ($n>=2 && $n<=4) ? 1 : 2; } ; diff --git a/view/de/strings.php b/view/de/strings.php index affae0bfe7..f46580e551 100644 --- a/view/de/strings.php +++ b/view/de/strings.php @@ -1,6 +1,6 @@ <?php -function string_plural_select($n){ +function string_plural_select_de($n){ return ($n != 1); } ; @@ -380,8 +380,8 @@ $a->strings["View New Items"] = "Neue Einträge anzeigen"; $a->strings["View Any Items"] = "Alle Einträge anzeigen"; $a->strings["View Starred Items"] = "Gesternte Einträge anzeigen"; $a->strings["Warning: This group contains %s member from an insecure network."] = array( - 0 => "Warnung: Diese Gruppe beinhaltet %s Mitglied aus unsicheren Netzwerken.", - 1 => "Warnung: Diese Gruppe beinhaltet %s Mitglieder aus unsicheren Netzwerken.", + 0 => "", + 1 => "", ); $a->strings["Private messages to this group are at risk of public disclosure."] = "Private Nachrichten an diese Gruppe könnten an die Öffentlichkeit geraten."; $a->strings["No such group"] = "Es gibt keine solche Gruppe"; @@ -603,7 +603,7 @@ $a->strings["Log settings updated."] = "Protokolleinstellungen aktualisiert."; $a->strings["Clear"] = "löschen"; $a->strings["Debugging"] = "Protokoll führen"; $a->strings["Log file"] = "Protokolldatei"; -$a->strings["Must be writable by web server. Relative to your Friendika index.php."] = "Muss schreibbar durch den Webserver sein. Angabe relativ zu Friendikas index.php."; +$a->strings["Must be writable by web server. Relative to your Friendika index.php."] = "Muss schreibbar durch den Webserver sein. Angabe relativ zu Friendikas indes.php."; $a->strings["Log level"] = "Protokollevel"; $a->strings["Close"] = "Schließen"; $a->strings["FTP Host"] = "FTP Host"; diff --git a/view/es/strings.php b/view/es/strings.php index 8e7a8fe112..4044755a54 100644 --- a/view/es/strings.php +++ b/view/es/strings.php @@ -1,20 +1,17 @@ <?php -function string_plural_select($n){ - return ($n != 1); -} ; $a->strings["Not Found"] = "No se ha encontrado"; -$a->strings["Page not found."] = "Página no encontrada."; +$a->strings["Page not found."] = "Página no encontrada."; $a->strings["Permission denied"] = "Permiso denegado"; $a->strings["Permission denied."] = "Permiso denegado."; -$a->strings["Create a New Account"] = "Crea una nueva cuenta"; +$a->strings["Create a New Account"] = "Crear una nueva cuenta"; $a->strings["Register"] = "Registrarse"; $a->strings["Nickname or Email address: "] = "Apodo o dirección de email: "; -$a->strings["Password: "] = "Contraseña: "; +$a->strings["Password: "] = "Contraseña: "; $a->strings["Login"] = "Acceder"; $a->strings["Nickname/Email/OpenID: "] = "Apodo/Email/OpenID: "; -$a->strings["Password (if not OpenID): "] = "Contraseña (si no OpenID): "; +$a->strings["Password (if not OpenID): "] = "Contraseña (si no OpenID): "; $a->strings["Forgot your password?"] = "¿Olvidó la contraseña?"; $a->strings["Password Reset"] = "Resetear la contraseña"; $a->strings["Logout"] = "Salir"; @@ -34,7 +31,7 @@ $a->strings["No contacts"] = "Nigún contacto"; $a->strings["Contacts"] = "Contactos"; $a->strings["View Contacts"] = "Ver contactos"; $a->strings["Search"] = "Busca"; -$a->strings["No profile"] = "Nigún perfil"; +$a->strings["No profile"] = "Nigún perfil"; $a->strings["Connect"] = "Conecta"; $a->strings["Location:"] = "Ubicación:"; $a->strings[", "] = ", "; @@ -329,9 +326,9 @@ $a->strings["Please login to confirm introduction."] = "Inicia sesión para conf $a->strings["Incorrect identity currently logged in. Please login to <strong>this</strong> profile."] = "Inicio de sesión con la identificación incorrecta. Entra en <strong>este</ strong> perfil."; $a->strings["[Name Withheld]"] = "[Nombre oculto]"; $a->strings["Introduction received at "] = "Presentación recibida en"; -$a->strings["Friend/Connection Request"] = "Solicitud de Amistad/Conexión"; +$a->strings["Friend/Connection Request"] = "Solicitud de Amistad/Conexión"; $a->strings["Please answer the following:"] = "Por favor responda lo siguiente:"; -$a->strings["Does \$name know you?"] = "\$name te conoce?"; +$a->strings["Does \$name know you?"] = "$name te conoce?"; $a->strings["Add a personal note:"] = "Agregar una nota personal:"; $a->strings["Please enter your profile address from one of the following supported social networks:"] = "Por favor, introduzca su dirección de perfil de uno de las siguientes redes sociales soportadas:"; $a->strings["Friendika"] = "Friendika"; @@ -577,3 +574,522 @@ $a->strings["%d Contact"] = array( 0 => "%d Contacto", 1 => "%d Contactos", ); +$a->strings["Post successful."] = ""; +$a->strings["Contact settings applied."] = ""; +$a->strings["Contact update failed."] = ""; +$a->strings["Repair Contact Settings"] = ""; +$a->strings["<strong>WARNING: This is highly advanced</strong> and if you enter incorrect information your communications with this contact will stop working."] = ""; +$a->strings["Please use your browser 'Back' button <strong>now</strong> if you are uncertain what to do on this page."] = ""; +$a->strings["Name"] = ""; +$a->strings["Account Nickname"] = ""; +$a->strings["@Tagname - overrides Name/Nickname"] = ""; +$a->strings["Account URL"] = ""; +$a->strings["Friend Request URL"] = ""; +$a->strings["Friend Confirm URL"] = ""; +$a->strings["Notification Endpoint URL"] = ""; +$a->strings["Poll/Feed URL"] = ""; +$a->strings["Help:"] = ""; +$a->strings["Help"] = ""; +$a->strings["File exceeds size limit of %d"] = ""; +$a->strings["File upload failed."] = ""; +$a->strings["Friend suggestion sent."] = ""; +$a->strings["Suggest Friends"] = ""; +$a->strings["Suggest a friend for %s"] = ""; +$a->strings["Status"] = ""; +$a->strings["Profile"] = ""; +$a->strings["Photos"] = ""; +$a->strings["Events"] = ""; +$a->strings["Personal Notes"] = ""; +$a->strings["Create New Event"] = ""; +$a->strings["Previous"] = ""; +$a->strings["Next"] = ""; +$a->strings["l, F j"] = ""; +$a->strings["Edit event"] = ""; +$a->strings["hour:minute"] = ""; +$a->strings["Event details"] = ""; +$a->strings["Format is %s %s. Starting date and Description are required."] = ""; +$a->strings["Event Starts:"] = ""; +$a->strings["Finish date/time is not known or not relevant"] = ""; +$a->strings["Event Finishes:"] = ""; +$a->strings["Adjust for viewer timezone"] = ""; +$a->strings["Description:"] = ""; +$a->strings["Share this event"] = ""; +$a->strings["everybody"] = ""; +$a->strings["Image file is empty."] = ""; +$a->strings["Public access denied."] = ""; +$a->strings["Access to this item is restricted."] = ""; +$a->strings["Comment"] = ""; +$a->strings["Not available."] = ""; +$a->strings["Community"] = ""; +$a->strings["Post to Email"] = ""; +$a->strings["Attach file"] = ""; +$a->strings["Public post"] = ""; +$a->strings["Welcome home %s."] = ""; +$a->strings["Please confirm your introduction/connection request to %s."] = ""; +$a->strings["Confirm"] = ""; +$a->strings["Diaspora members: Please do not use this form. Instead, enter \"%s\" into your Diaspora search bar."] = ""; +$a->strings["Please enter your 'Identity Address' from one of the following supported social networks:"] = ""; +$a->strings["Examples: jojo@demo.friendika.com, http://demo.friendika.com/profile/jojo, testuser@identi.ca"] = ""; +$a->strings["Does %s know you?"] = ""; +$a->strings["Diaspora"] = ""; +$a->strings["- please share from your own site as noted above"] = ""; +$a->strings["Your Identity Address:"] = ""; +$a->strings["Proceed with Installation"] = ""; +$a->strings["Your Friendika site database has been installed."] = ""; +$a->strings["Proceed to registration"] = ""; +$a->strings["Friendika Social Network"] = ""; +$a->strings["Installation"] = ""; +$a->strings["In order to install Friendika we need to know how to connect to your database."] = ""; +$a->strings["Please contact your hosting provider or site administrator if you have questions about these settings."] = ""; +$a->strings["The database you specify below should already exist. If it does not, please create it before continuing."] = ""; +$a->strings["Database Server Name"] = ""; +$a->strings["Database Login Name"] = ""; +$a->strings["Database Login Password"] = ""; +$a->strings["Database Name"] = ""; +$a->strings["Please select a default timezone for your website"] = ""; +$a->strings["Site administrator email address. Your account email address must match this in order to use the web admin panel."] = ""; +$a->strings["Error: mb_string PHP module required but not installed."] = ""; +$a->strings["l F d, Y \\@ g:i A"] = ""; +$a->strings["Time Conversion"] = ""; +$a->strings["Friendika provides this service for sharing events with other networks and friends in unknown timezones."] = ""; +$a->strings["Converted localtime: %s"] = ""; +$a->strings["UTC time: %s"] = ""; +$a->strings["Please select your timezone:"] = ""; +$a->strings["[Embedded content - reload page to view]"] = ""; +$a->strings["Profile Match"] = ""; +$a->strings["No keywords to match. Please add keywords to your default profile."] = ""; +$a->strings["No matches"] = ""; +$a->strings["Pending Friend/Connect Notifications"] = ""; +$a->strings["Friend Suggestion"] = ""; +$a->strings["suggested by %s"] = ""; +$a->strings["Sharer"] = ""; +$a->strings["%d invitation available"] = array( + 0 => "", + 1 => "", +); +$a->strings["Find People With Shared Interests"] = ""; +$a->strings["Privacy Unavailable"] = ""; +$a->strings["Private communications are not available for this contact."] = ""; +$a->strings["Suggest friends"] = ""; +$a->strings["Network type: %s"] = ""; +$a->strings["Profile Visibility"] = ""; +$a->strings["Please choose the profile you would like to display to %s when viewing your profile securely."] = ""; +$a->strings["Contact Information / Notes"] = ""; +$a->strings["Online Reputation"] = ""; +$a->strings["Occasionally your friends may wish to inquire about this person's online legitimacy."] = ""; +$a->strings["You may help them choose whether or not to interact with this person by providing a <em>reputation</em> to guide them."] = ""; +$a->strings["Please take a moment to elaborate on this selection if you feel it could be helpful to others."] = ""; +$a->strings["Visit %s's profile [%s]"] = ""; +$a->strings["Repair contact URL settings"] = ""; +$a->strings["Repair contact URL settings (WARNING: Advanced)"] = ""; +$a->strings["View conversations"] = ""; +$a->strings["No valid account found."] = ""; +$a->strings["Password reset request issued. Check your email."] = ""; +$a->strings["Request could not be verified. (You may have previously submitted it.) Password reset failed."] = ""; +$a->strings["Your password has been reset as requested."] = ""; +$a->strings["Your new password is"] = ""; +$a->strings["Save or copy your new password - and then"] = ""; +$a->strings["click here to login"] = ""; +$a->strings["Your password may be changed from the <em>Settings</em> page after successful login."] = ""; +$a->strings["Forgot your Password?"] = ""; +$a->strings["Enter your email address and submit to have your password reset. Then check your email for further instructions."] = ""; +$a->strings["Nickname or Email: "] = ""; +$a->strings["Reset"] = ""; +$a->strings["Failed to connect with email account using the settings provided."] = ""; +$a->strings["Account settings"] = ""; +$a->strings["Plugin settings"] = ""; +$a->strings["Normal Account"] = ""; +$a->strings["This account is a normal personal profile"] = ""; +$a->strings["Soapbox Account"] = ""; +$a->strings["Automatically approve all connection/friend requests as read-only fans"] = ""; +$a->strings["Community/Celebrity Account"] = ""; +$a->strings["Automatically approve all connection/friend requests as read-write fans"] = ""; +$a->strings["Automatic Friend Account"] = ""; +$a->strings["Automatically approve all connection/friend requests as friends"] = ""; +$a->strings["OpenID:"] = ""; +$a->strings["(Optional) Allow this OpenID to login to this account."] = ""; +$a->strings["Publish your default profile in your local site directory?"] = ""; +$a->strings["Publish your default profile in the global social directory?"] = ""; +$a->strings["Hide your contact/friend list from viewers of your default profile?"] = ""; +$a->strings["Hide profile details and all your messages from unknown viewers?"] = ""; +$a->strings["or"] = ""; +$a->strings["Your Identity Address is"] = ""; +$a->strings["Export Personal Data"] = ""; +$a->strings["Password Settings"] = ""; +$a->strings["New Password:"] = ""; +$a->strings["Confirm:"] = ""; +$a->strings["Leave password fields blank unless changing"] = ""; +$a->strings["Basic Settings"] = ""; +$a->strings["Full Name:"] = ""; +$a->strings["Email Address:"] = ""; +$a->strings["Your Timezone:"] = ""; +$a->strings["Default Post Location:"] = ""; +$a->strings["Use Browser Location:"] = ""; +$a->strings["Display Theme:"] = ""; +$a->strings["Security and Privacy Settings"] = ""; +$a->strings["Maximum Friend Requests/Day:"] = ""; +$a->strings["(to prevent spam abuse)"] = ""; +$a->strings["(click to open/close)"] = ""; +$a->strings["Allow friends to post to your profile page:"] = ""; +$a->strings["Automatically expire posts after days:"] = ""; +$a->strings["If empty, posts will not expire. Expired posts will be deleted"] = ""; +$a->strings["Notification Settings"] = ""; +$a->strings["Send a notification email when:"] = ""; +$a->strings["You receive an introduction"] = ""; +$a->strings["Your introductions are confirmed"] = ""; +$a->strings["Someone writes on your profile wall"] = ""; +$a->strings["Someone writes a followup comment"] = ""; +$a->strings["You receive a private message"] = ""; +$a->strings["Email/Mailbox Setup"] = ""; +$a->strings["If you wish to communicate with email contacts using this service (optional), please specify how to connect to your mailbox."] = ""; +$a->strings["Last successful email check:"] = ""; +$a->strings["Email access is disabled on this site."] = ""; +$a->strings["IMAP server name:"] = ""; +$a->strings["IMAP port:"] = ""; +$a->strings["Security:"] = ""; +$a->strings["None"] = ""; +$a->strings["Email login name:"] = ""; +$a->strings["Email password:"] = ""; +$a->strings["Reply-to address:"] = ""; +$a->strings["Send public posts to all email contacts:"] = ""; +$a->strings["Advanced Page Settings"] = ""; +$a->strings["View Conversations"] = ""; +$a->strings["View New Items"] = ""; +$a->strings["View Any Items"] = ""; +$a->strings["View Starred Items"] = ""; +$a->strings["View Bookmarks"] = ""; +$a->strings["Saved Searches"] = ""; +$a->strings["Remove term"] = ""; +$a->strings["Warning: This group contains %s member from an insecure network."] = array( + 0 => "", + 1 => "", +); +$a->strings["Private messages to this group are at risk of public disclosure."] = ""; +$a->strings["Contact: "] = ""; +$a->strings["Private messages to this person are at risk of public disclosure."] = ""; +$a->strings["Invalid contact."] = ""; +$a->strings["Save"] = ""; +$a->strings["Welcome to Friendika"] = ""; +$a->strings["New Member Checklist"] = ""; +$a->strings["We would like to offer some tips and links to help make your experience enjoyable. Click any item to visit the relevant page."] = ""; +$a->strings["On your <em>Settings</em> page - change your initial password. Also make a note of your Identity Address. This will be useful in making friends."] = ""; +$a->strings["Review the other settings, particularly the privacy settings. An unpublished directory listing is like having an unlisted phone number. In general, you should probably publish your listing - unless all of your friends and potential friends know exactly how to find you."] = ""; +$a->strings["Upload a profile photo if you have not done so already. Studies have shown that people with real photos of themselves are ten times more likely to make friends than people who do not."] = ""; +$a->strings["Authorise the Facebook Connector if you currently have a Facebook account and we will (optionally) import all your Facebook friends and conversations."] = ""; +$a->strings["Enter your email access information on your Settings page if you wish to import and interact with friends or mailing lists from your email INBOX"] = ""; +$a->strings["Edit your <strong>default</strong> profile to your liking. Review the settings for hiding your list of friends and hiding the profile from unknown visitors."] = ""; +$a->strings["Set some public keywords for your default profile which describe your interests. We may be able to find other people with similar interests and suggest friendships."] = ""; +$a->strings["Your Contacts page is your gateway to managing friendships and connecting with friends on other networks. Typically you enter their address or site URL in the <em>Connect</em> dialog."] = ""; +$a->strings["The Directory page lets you find other people in this network or other federated sites. Look for a <em>Connect</em> or <em>Follow</em> link on their profile page. Provide your own Identity Address if requested."] = ""; +$a->strings["Once you have made some friends, organize them into private conversation groups from the sidebar of your Contacts page and then you can interact with each group privately on your Network page."] = ""; +$a->strings["Our <strong>help</strong> pages may be consulted for detail on other program features and resources."] = ""; +$a->strings["Item not available."] = ""; +$a->strings["Item was not found."] = ""; +$a->strings["Create a group of contacts/friends."] = ""; +$a->strings["Group Name: "] = ""; +$a->strings["Click on a contact to add or remove."] = ""; +$a->strings["Group Editor"] = ""; +$a->strings["Members"] = ""; +$a->strings["All Contacts"] = ""; +$a->strings["Invalid profile identifier."] = ""; +$a->strings["Profile Visibility Editor"] = ""; +$a->strings["Visible To"] = ""; +$a->strings["All Contacts (with secure profile access)"] = ""; +$a->strings["An invitation is required."] = ""; +$a->strings["Invitation could not be verified."] = ""; +$a->strings["That doesn't appear to be your full (First Last) name."] = ""; +$a->strings["Membership on this site is by invitation only."] = ""; +$a->strings["Your invitation ID: "] = ""; +$a->strings["This is Friendika version"] = ""; +$a->strings["running at web location"] = ""; +$a->strings["Shared content within the Friendika network is provided under the <a href=\"http://creativecommons.org/licenses/by/3.0/\">Creative Commons Attribution 3.0 license</a>"] = ""; +$a->strings["Please visit <a href=\"http://project.friendika.com\">Project.Friendika.com</a> to learn more about the Friendika project."] = ""; +$a->strings["Bug reports and issues: please visit"] = ""; +$a->strings["Suggestions, praise, donations, etc. - please email \"Info\" at Friendika - dot com"] = ""; +$a->strings["Installed plugins/addons/apps"] = ""; +$a->strings["No installed plugins/addons/apps"] = ""; +$a->strings["Administrator@"] = ""; +$a->strings["%s posted to your profile wall at %s"] = ""; +$a->strings["You may visit them online at %s"] = ""; +$a->strings["Upload File:"] = ""; +$a->strings["Upload Profile Photo"] = ""; +$a->strings["Upload"] = ""; +$a->strings["skip this step"] = ""; +$a->strings["select a photo from your photo albums"] = ""; +$a->strings["Crop Image"] = ""; +$a->strings["Please adjust the image cropping for optimum viewing."] = ""; +$a->strings["Done Editing"] = ""; +$a->strings["Please enter a link URL:"] = ""; +$a->strings["D, d M Y - g:i A"] = ""; +$a->strings["Site"] = ""; +$a->strings["Users"] = ""; +$a->strings["Plugins"] = ""; +$a->strings["Update"] = ""; +$a->strings["Logs"] = ""; +$a->strings["User registrations waiting for confirmation"] = ""; +$a->strings["Administration"] = ""; +$a->strings["Summary"] = ""; +$a->strings["Registered users"] = ""; +$a->strings["Pending registrations"] = ""; +$a->strings["Version"] = ""; +$a->strings["Active plugins"] = ""; +$a->strings["Site settings updated."] = ""; +$a->strings["Closed"] = ""; +$a->strings["Requires approval"] = ""; +$a->strings["Open"] = ""; +$a->strings["File upload"] = ""; +$a->strings["Policies"] = ""; +$a->strings["Advanced"] = ""; +$a->strings["Site name"] = ""; +$a->strings["Banner/Logo"] = ""; +$a->strings["System language"] = ""; +$a->strings["System theme"] = ""; +$a->strings["Maximum image size"] = ""; +$a->strings["Register policy"] = ""; +$a->strings["Register text"] = ""; +$a->strings["Allowed friend domains"] = ""; +$a->strings["Allowed email domains"] = ""; +$a->strings["Block public"] = ""; +$a->strings["Force publish"] = ""; +$a->strings["Global directory update URL"] = ""; +$a->strings["Block multiple registrations"] = ""; +$a->strings["OpenID support"] = ""; +$a->strings["Gravatar support"] = ""; +$a->strings["Fullname check"] = ""; +$a->strings["UTF-8 Regular expressions"] = ""; +$a->strings["Show Community Page"] = ""; +$a->strings["Enable OStatus support"] = ""; +$a->strings["Enable Diaspora support"] = ""; +$a->strings["Only allow Friendika contacts"] = ""; +$a->strings["Verify SSL"] = ""; +$a->strings["Proxy user"] = ""; +$a->strings["Proxy URL"] = ""; +$a->strings["Network timeout"] = ""; +$a->strings["%s user blocked"] = array( + 0 => "", + 1 => "", +); +$a->strings["%s user deleted"] = array( + 0 => "", + 1 => "", +); +$a->strings["User '%s' deleted"] = ""; +$a->strings["User '%s' unblocked"] = ""; +$a->strings["User '%s' blocked"] = ""; +$a->strings["select all"] = ""; +$a->strings["User registrations waiting for confirm"] = ""; +$a->strings["Request date"] = ""; +$a->strings["Email"] = ""; +$a->strings["Deny"] = ""; +$a->strings["Block"] = ""; +$a->strings["Unblock"] = ""; +$a->strings["Register date"] = ""; +$a->strings["Last login"] = ""; +$a->strings["Last item"] = ""; +$a->strings["Account"] = ""; +$a->strings["Selected users will be deleted!\\n\\nEverything these users had posted on this site will be permanently deleted!\\n\\nAre you sure?"] = ""; +$a->strings["The user {0} will be deleted!\\n\\nEverything this user has posted on this site will be permanently deleted!\\n\\nAre you sure?"] = ""; +$a->strings["Plugin %s disabled."] = ""; +$a->strings["Plugin %s enabled."] = ""; +$a->strings["Disable"] = ""; +$a->strings["Enable"] = ""; +$a->strings["Toggle"] = ""; +$a->strings["Log settings updated."] = ""; +$a->strings["Clear"] = ""; +$a->strings["Debugging"] = ""; +$a->strings["Log file"] = ""; +$a->strings["Must be writable by web server. Relative to your Friendika index.php."] = ""; +$a->strings["Log level"] = ""; +$a->strings["Close"] = ""; +$a->strings["FTP Host"] = ""; +$a->strings["FTP Path"] = ""; +$a->strings["FTP User"] = ""; +$a->strings["FTP Password"] = ""; +$a->strings["Access to this profile has been restricted."] = ""; +$a->strings["Tips for New Members"] = ""; +$a->strings["Welcome "] = ""; +$a->strings["Please upload a profile photo."] = ""; +$a->strings["This site is not configured to allow communications with other networks."] = ""; +$a->strings["No compatible communication protocols or feeds were discovered."] = ""; +$a->strings["An author or name was not found."] = ""; +$a->strings["No browser URL could be matched to this address."] = ""; +$a->strings["The profile address specified belongs to a network which has been disabled on this site."] = ""; +$a->strings["No installed applications."] = ""; +$a->strings["Hide your contact/friend list from viewers of this profile?"] = ""; +$a->strings["Edit Profile Details"] = ""; +$a->strings["View this profile"] = ""; +$a->strings["Create a new profile using these settings"] = ""; +$a->strings["Clone this profile"] = ""; +$a->strings["Delete this profile"] = ""; +$a->strings["Profile Name:"] = ""; +$a->strings["Your Full Name:"] = ""; +$a->strings["Title/Description:"] = ""; +$a->strings["Your Gender:"] = ""; +$a->strings["Birthday (%s):"] = ""; +$a->strings["Street Address:"] = ""; +$a->strings["Locality/City:"] = ""; +$a->strings["Postal/Zip Code:"] = ""; +$a->strings["Country:"] = ""; +$a->strings["Region/State:"] = ""; +$a->strings["<span class=\"heart\">♥</span> Marital Status:"] = ""; +$a->strings["Who: (if applicable)"] = ""; +$a->strings["Examples: cathy123, Cathy Williams, cathy@example.com"] = ""; +$a->strings["Sexual Preference:"] = ""; +$a->strings["Homepage URL:"] = ""; +$a->strings["Political Views:"] = ""; +$a->strings["Religious Views:"] = ""; +$a->strings["Public Keywords:"] = ""; +$a->strings["Private Keywords:"] = ""; +$a->strings["Example: fishing photography software"] = ""; +$a->strings["(Used for suggesting potential friends, can be seen by others)"] = ""; +$a->strings["(Used for searching profiles, never shown to others)"] = ""; +$a->strings["Tell us about yourself..."] = ""; +$a->strings["Hobbies/Interests"] = ""; +$a->strings["Contact information and Social Networks"] = ""; +$a->strings["Musical interests"] = ""; +$a->strings["Books, literature"] = ""; +$a->strings["Television"] = ""; +$a->strings["Film/dance/culture/entertainment"] = ""; +$a->strings["Love/romance"] = ""; +$a->strings["Work/employment"] = ""; +$a->strings["School/education"] = ""; +$a->strings["Change profile photo"] = ""; +$a->strings["Create New Profile"] = ""; +$a->strings["visible to everybody"] = ""; +$a->strings["Edit visibility"] = ""; +$a->strings["Normal site view"] = ""; +$a->strings["View all site entries"] = ""; +$a->strings["Site Directory"] = ""; +$a->strings["Gender: "] = ""; +$a->strings["No entries (some entries may be hidden)."] = ""; +$a->strings["You have no more invitations available"] = ""; +$a->strings["You will need to supply this invitation code: \$invite_code"] = ""; +$a->strings["%1\$s is now friends with %2\$s"] = ""; +$a->strings["Site public key not available in contact record for URL %s."] = ""; +$a->strings["Updating contacts"] = ""; +$a->strings["Install Facebook connector for this account."] = ""; +$a->strings["Remove Facebook connector"] = ""; +$a->strings["Link all your Facebook friends and conversations"] = ""; +$a->strings["Do not link your Facebook profile wall posts - as these could be visible to people that would not be able to see them on Facebook."] = ""; +$a->strings["Post to Facebook cancelled because of multi-network access permission conflict."] = ""; +$a->strings["View on Friendika"] = ""; +$a->strings["Facebook post failed. Queued for retry."] = ""; +$a->strings["Generate new key"] = ""; +$a->strings["Widgets key"] = ""; +$a->strings["Widgets available"] = ""; +$a->strings["Connect on Friendika!"] = ""; +$a->strings["Impressum"] = ""; +$a->strings["Site Owner"] = ""; +$a->strings["Email Address"] = ""; +$a->strings["Postal Address"] = ""; +$a->strings["The impressum addon needs to be configured!<br />Please add at least the <tt>owner</tt> variable to your config file. For other variables please refer to the README file of the addon."] = ""; +$a->strings["Site Owners Profile"] = ""; +$a->strings["Notes"] = ""; +$a->strings["OEmbed settings updated"] = ""; +$a->strings["Use OEmbed for YouTube videos"] = ""; +$a->strings["URL to embed:"] = ""; +$a->strings["Please contact your site administrator.<br />The provided API URL is not valid."] = ""; +$a->strings["We could not contact the StatusNet API with the Path you entered."] = ""; +$a->strings["StatusNet settings updated."] = ""; +$a->strings["Globally Available StatusNet OAuthKeys"] = ""; +$a->strings["There are preconfigured OAuth key pairs for some StatusNet servers available. If you are useing one of them, please use these credentials. If not feel free to connect to any other StatusNet instance (see below)."] = ""; +$a->strings["Provide your own OAuth Credentials"] = ""; +$a->strings["Cancel Connection Process"] = ""; +$a->strings["Current StatusNet API is"] = ""; +$a->strings["Cancel StatusNet Connection"] = ""; +$a->strings["If enabled all your <strong>public</strong> postings can be posted to the associated StatusNet account. You can choose to do so by default (here) or for every posting separately in the posting options when writing the entry."] = ""; +$a->strings["Allow posting to StatusNet"] = ""; +$a->strings["Send public postings to StatusNet by default"] = ""; +$a->strings["API URL"] = ""; +$a->strings["Consumer Secret"] = ""; +$a->strings["Consumer Key"] = ""; +$a->strings["Post to Wordpress"] = ""; +$a->strings["WordPress Post Settings"] = ""; +$a->strings["Enable WordPress Post Plugin"] = ""; +$a->strings["WordPress username"] = ""; +$a->strings["WordPress password"] = ""; +$a->strings["WordPress API URL"] = ""; +$a->strings["Post to WordPress by default"] = ""; +$a->strings["This website is tracked using the <a href='http://www.piwik.org'>Piwik</a> analytics tool."] = ""; +$a->strings["If you do not want that your visits are logged this way you <a href='%s'>can set a cookie to prevent Piwik from tracking further visits of the site</a> (opt-out)."] = ""; +$a->strings["Piwik Base URL"] = ""; +$a->strings["Site ID"] = ""; +$a->strings["Show opt-out cookie link?"] = ""; +$a->strings["Twitter settings updated."] = ""; +$a->strings["If enabled all your <strong>public</strong> postings can be posted to the associated Twitter account. You can choose to do so by default (here) or for every posting separately in the posting options when writing the entry."] = ""; +$a->strings["Allow posting to Twitter"] = ""; +$a->strings["Send public postings to Twitter by default"] = ""; +$a->strings["Consumer key"] = ""; +$a->strings["Consumer secret"] = ""; +$a->strings["j F, Y"] = ""; +$a->strings["j F"] = ""; +$a->strings["Age:"] = ""; +$a->strings["<span class=\"heart\">♥</span> Status:"] = ""; +$a->strings["Religion:"] = ""; +$a->strings["About:"] = ""; +$a->strings["Hobbies/Interests:"] = ""; +$a->strings["Contact information and Social Networks:"] = ""; +$a->strings["Musical interests:"] = ""; +$a->strings["Books, literature:"] = ""; +$a->strings["Television:"] = ""; +$a->strings["Film/dance/culture/entertainment:"] = ""; +$a->strings["Love/Romance:"] = ""; +$a->strings["Work/employment:"] = ""; +$a->strings["School/education:"] = ""; +$a->strings["OStatus"] = ""; +$a->strings["RSS/Atom"] = ""; +$a->strings["Zot!"] = ""; +$a->strings["Starts:"] = ""; +$a->strings["Finishes:"] = ""; +$a->strings["(no subject)"] = ""; +$a->strings["bytes"] = ""; +$a->strings["Select an alternate language"] = ""; +$a->strings["Sharing notification from Diaspora network"] = ""; +$a->strings["link"] = ""; +$a->strings["[Relayed] Comment authored by %s from network %s"] = ""; +$a->strings["End this session"] = ""; +$a->strings["Sign in"] = ""; +$a->strings["Home Page"] = ""; +$a->strings["Create an account"] = ""; +$a->strings["Help and documentation"] = ""; +$a->strings["Addon applications, utilities, games"] = ""; +$a->strings["Search site content"] = ""; +$a->strings["Conversations on this site"] = ""; +$a->strings["People directory"] = ""; +$a->strings["Conversations from your friends"] = ""; +$a->strings["Your posts and conversations"] = ""; +$a->strings["Friend requests"] = ""; +$a->strings["Private mail"] = ""; +$a->strings["Manage other pages"] = ""; +$a->strings["Manage/edit profiles"] = ""; +$a->strings["Manage/edit friends and contacts"] = ""; +$a->strings["Admin"] = ""; +$a->strings["Site setup and configuration"] = ""; +$a->strings["never"] = ""; +$a->strings["From: "] = ""; +$a->strings["Image/photo"] = ""; +$a->strings["Visible to everybody"] = ""; +$a->strings["show"] = ""; +$a->strings["don't show"] = ""; +$a->strings["View status"] = ""; +$a->strings["View profile"] = ""; +$a->strings["View photos"] = ""; +$a->strings["View recent"] = ""; +$a->strings["Send PM"] = ""; +$a->strings["event"] = ""; +$a->strings["View %s's profile"] = ""; +$a->strings["%s from %s"] = ""; +$a->strings["See more posts like this"] = ""; +$a->strings["See all %d comments"] = ""; +$a->strings["Select"] = ""; +$a->strings["toggle star status"] = ""; +$a->strings["Delete Selected Items"] = ""; +$a->strings["Visible to <strong>everybody</strong>"] = ""; +$a->strings["Please enter a YouTube link:"] = ""; +$a->strings["Please enter a video(.ogg) link/URL:"] = ""; +$a->strings["Please enter an audio(.ogg) link/URL:"] = ""; +$a->strings["Where are you right now?"] = ""; +$a->strings["Enter a title for this item"] = ""; +$a->strings["Set title"] = ""; +$a->strings["Delete this item?"] = ""; +$a->strings["g A l F d"] = ""; diff --git a/view/follow.tpl b/view/follow.tpl index 49bebee8b8..2c024930ca 100644 --- a/view/follow.tpl +++ b/view/follow.tpl @@ -1,10 +1,9 @@ -<div class="side-follow-wrapper" id="side-follow-wrapper" > -<form action="follow" method="post" /> -<label id="side-follow-label" for="side-follow-url" >$label</label> -<input id="side-follow-url" type="text" name="url" size="24" title="$hint" /> -<div class="side-follow-input-end"></div> -<input id="side-follow-submit" type="submit" name="submit" value="$follow" /> -</form> +<div id="follow-sidebar" class="widget"> + <h3>Find People</h3> + <form action="follow" method="post" /> + <input id="side-follow-url" type="text" name="url" size="24" title="$hint" /><input id="side-follow-submit" type="submit" name="submit" value="$follow" /> + </form> + $findSimilar + $inviteFriends </div> -<div class="side-follow-end"></div> diff --git a/view/fr/strings.php b/view/fr/strings.php index cbed6eec46..654fba019c 100644 --- a/view/fr/strings.php +++ b/view/fr/strings.php @@ -1,6 +1,6 @@ <?php -function string_plural_select($n){ +function string_plural_select_fr($n){ return ($n != 1); } ; diff --git a/view/it/strings.php b/view/it/strings.php index 7d6c2e704f..3a0aed70f4 100644 --- a/view/it/strings.php +++ b/view/it/strings.php @@ -1,6 +1,6 @@ <?php -function string_plural_select($n){ +function string_plural_select_it($n){ return ($n != 1); } ; diff --git a/view/it/wall_received_html_body_eml.tpl b/view/it/wall_received_html_body_eml.tpl new file mode 100644 index 0000000000..cdc05cfa38 --- /dev/null +++ b/view/it/wall_received_html_body_eml.tpl @@ -0,0 +1,24 @@ +<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional //EN"> +<html> +<head> + <title>Messaggio da Friendika + + + + + + + + + + + + + + + + + +
    Friendika
    $from ha scritto sulla tua bacheca.
    $from
    $body
    Vai su $siteurl per vedere o cancellare il post.
    Grazie,
    L'amministratore di $sitename
    + + \ No newline at end of file diff --git a/view/it/wall_received_text_body_eml.tpl b/view/it/wall_received_text_body_eml.tpl new file mode 100644 index 0000000000..327557ea1e --- /dev/null +++ b/view/it/wall_received_text_body_eml.tpl @@ -0,0 +1,18 @@ + +Caro $username, + + '$from' ha scritto sulla tua bacheca. + +----- +$body +----- + +Vai su $siteurl per vedere o cancellare il post: + +$display + +Grazie, + L'amministratore di $sitename + + + diff --git a/view/jot-header.tpl b/view/jot-header.tpl index 8174026abb..5eb07db44c 100644 --- a/view/jot-header.tpl +++ b/view/jot-header.tpl @@ -142,7 +142,7 @@ function initEditor(cb){ if(reply && reply.length) { reply = bin2hex(reply); $('#profile-rotator').show(); - $.get('parse_url?url=' + reply, function(data) { + $.get('parse_url?binurl=' + reply, function(data) { tinyMCE.execCommand('mceInsertRawHTML',false,data); $('#profile-rotator').hide(); }); diff --git a/view/like.tpl b/view/like.tpl index ce5af04cef..f4f2e1671f 100644 --- a/view/like.tpl +++ b/view/like.tpl @@ -1,6 +1,6 @@ diff --git a/view/pt-br/strings.php b/view/pt-br/strings.php index 4df7930410..0cf143db49 100644 --- a/view/pt-br/strings.php +++ b/view/pt-br/strings.php @@ -1,6 +1,6 @@ 1); } ; diff --git a/view/ru/strings.php b/view/ru/strings.php index 97904f0946..4578c37e89 100644 --- a/view/ru/strings.php +++ b/view/ru/strings.php @@ -1,6 +1,6 @@ =2 && $n%10<=4 && ($n%100<10 || $n%100>=20) ? 1 : 2); } ; diff --git a/view/theme/dispy/jot-header.tpl b/view/theme/dispy/jot-header.tpl index 0093bf82a8..79b10fd40c 100644 --- a/view/theme/dispy/jot-header.tpl +++ b/view/theme/dispy/jot-header.tpl @@ -163,7 +163,7 @@ function initEditor(cb) { if(reply && reply.length) { reply = bin2hex(reply); $('#profile-rotator').show(); - $.get('parse_url?url=' + reply, function(data) { + $.get('parse_url?binurl=' + reply, function(data) { tinyMCE.execCommand('mceInsertRawHTML',false,data); $('#profile-rotator').hide(); }); diff --git a/view/theme/dispy/jot.tpl b/view/theme/dispy/jot.tpl index d5e81a925d..f6bf91ffa2 100644 --- a/view/theme/dispy/jot.tpl +++ b/view/theme/dispy/jot.tpl @@ -9,7 +9,7 @@
    - + diff --git a/view/theme/duepuntozero/style.css b/view/theme/duepuntozero/style.css index acd7d5bb54..2bb24ec451 100644 --- a/view/theme/duepuntozero/style.css +++ b/view/theme/duepuntozero/style.css @@ -219,6 +219,20 @@ section { margin-right: 1em; } +#tabs-wrapper { + height: 27px; + background-image: url(head.jpg); + background-repeat: repeat-x; + background-position: 0px -20px; + border-bottom: 1px solid #babdb6; +} +.tabs { + display:block; + float:left; + padding: 0.4em; + margin-right: 1em; +} + /* footer */ footer { @@ -2749,6 +2763,7 @@ a.mail-list-link { .off { background-position: 0px -48px; } .starred { background-position: -16px -48px; } .unstarred { background-position: -32px -48px; } +.tagged { background-position: -48px -48px; } .icon.dim { opacity: 0.3;filter:alpha(opacity=30); } diff --git a/view/theme/greenzero/greenicons.png b/view/theme/greenzero/greenicons.png index b20ac5c0db..2644e42843 100644 Binary files a/view/theme/greenzero/greenicons.png and b/view/theme/greenzero/greenicons.png differ diff --git a/view/theme/loozah/style.css b/view/theme/loozah/style.css index 8636f1085e..dda980366f 100644 --- a/view/theme/loozah/style.css +++ b/view/theme/loozah/style.css @@ -1587,6 +1587,26 @@ padding: 5px 10px 0px; clear: both; } +.tabs { + padding: 4px; + margin-top: 10px; + margin-bottom: 10px; + margin-right: 5px; + /*border: 1px solid #CCC;*/ + /*background: #F8F8F8;*/ + font-size: 0.8em; + font-weight: bold; + background-color: #ECECEC; + border: 1px solid #858585; +} +.tabs:hover { + background-color: #0CBEFE; + color: #F5F6FB; + border: 1px solid #F5F6FB; + /*cursor: pointer;*/ +} + + .comment-edit-text-empty { color: gray; height: 30px; @@ -2732,6 +2752,7 @@ a.mail-list-link { .off { background-position: 0px -48px; } .starred { background-position: -16px -48px; } .unstarred { background-position: -32px -48px; } +.tagged { background-position: -48px -48px; } .icon.dim { opacity: 0.3;filter:alpha(opacity=30); } diff --git a/view/theme/testbubble/calendar.png b/view/theme/testbubble/calendar.png new file mode 100644 index 0000000000..705a75b8a8 Binary files /dev/null and b/view/theme/testbubble/calendar.png differ diff --git a/view/theme/testbubble/connect.png b/view/theme/testbubble/connect.png new file mode 100644 index 0000000000..b76fc13dce Binary files /dev/null and b/view/theme/testbubble/connect.png differ diff --git a/view/theme/testbubble/contact_edit.tpl b/view/theme/testbubble/contact_edit.tpl new file mode 100644 index 0000000000..59747c62db --- /dev/null +++ b/view/theme/testbubble/contact_edit.tpl @@ -0,0 +1,67 @@ + +

    $header

    + +
    $name
    + +$nettype + + + + +
    + +
    + $alt_text +
    + $name +
    +
    +
    +
    + + +
    + + {{ if $poll_enabled }} +
    +
    $lastupdtext$last_update
    +
    $updpub
    + $poll_interval + +
    + {{ endif }} +
    +
    + +$insecure +$blocked +$ignored + + +$lblsuggest + +
    +

    $lbl_info1

    + +
    +
    + + + +
    +

    $lbl_vis1

    +

    $lbl_vis2 +

    +
    +$profile_select +
    + + + + +
    diff --git a/view/theme/testbubble/group_drop.tpl b/view/theme/testbubble/group_drop.tpl new file mode 100644 index 0000000000..f088fc06ff --- /dev/null +++ b/view/theme/testbubble/group_drop.tpl @@ -0,0 +1,8 @@ + +
    diff --git a/view/theme/testbubble/group_edit.tpl b/view/theme/testbubble/group_edit.tpl new file mode 100644 index 0000000000..b867568f31 --- /dev/null +++ b/view/theme/testbubble/group_edit.tpl @@ -0,0 +1,19 @@ +

    $title

    + + +
    +
    +
    + + +
    + +
    +
    +
    + $drop + +
    $desc
    +
    +
    +
    diff --git a/view/theme/testbubble/groups.png b/view/theme/testbubble/groups.png new file mode 100644 index 0000000000..a65a7218c9 Binary files /dev/null and b/view/theme/testbubble/groups.png differ diff --git a/view/theme/testbubble/icons.png b/view/theme/testbubble/icons.png new file mode 100644 index 0000000000..57c4bfb052 Binary files /dev/null and b/view/theme/testbubble/icons.png differ diff --git a/view/theme/testbubble/icons.svg b/view/theme/testbubble/icons.svg new file mode 100644 index 0000000000..b435ba6653 --- /dev/null +++ b/view/theme/testbubble/icons.svg @@ -0,0 +1,1442 @@ + + + + + + + + + + + + + + + + + + + image/svg+xml + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + YouTube + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + Lorem Ip + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + ? + ? + + diff --git a/view/theme/testbubble/jot-header.tpl b/view/theme/testbubble/jot-header.tpl new file mode 100644 index 0000000000..1555950561 --- /dev/null +++ b/view/theme/testbubble/jot-header.tpl @@ -0,0 +1,251 @@ + + + + + + diff --git a/view/theme/testbubble/jot.tpl b/view/theme/testbubble/jot.tpl new file mode 100644 index 0000000000..d60e8adc22 --- /dev/null +++ b/view/theme/testbubble/jot.tpl @@ -0,0 +1,75 @@ + +
    +
    +
     
    + +
    + +
    +
    + +
    + + + + + + + + + + + {{ if $content }}{{ endif }} + + + + + + + + + + + + + + +
    + +
    +
    + $acl +
    +
    $emailcc
    +
    + $jotnets +
    +
    + +
    +
    +
    diff --git a/view/theme/testbubble/login-bg.gif b/view/theme/testbubble/login-bg.gif new file mode 100644 index 0000000000..cde836c893 Binary files /dev/null and b/view/theme/testbubble/login-bg.gif differ diff --git a/view/theme/testbubble/login.tpl b/view/theme/testbubble/login.tpl new file mode 100644 index 0000000000..2c879d69a7 --- /dev/null +++ b/view/theme/testbubble/login.tpl @@ -0,0 +1,25 @@ + +
    + +
    + + +
    +
    +
    + + +
    +
    +
    + + $lostlink +
    +
    + +
    +
    + diff --git a/view/theme/testbubble/lrarrow.gif b/view/theme/testbubble/lrarrow.gif new file mode 100644 index 0000000000..fa26769446 Binary files /dev/null and b/view/theme/testbubble/lrarrow.gif differ diff --git a/view/theme/testbubble/mail_head.tpl b/view/theme/testbubble/mail_head.tpl new file mode 100644 index 0000000000..89615cbd03 --- /dev/null +++ b/view/theme/testbubble/mail_head.tpl @@ -0,0 +1,7 @@ +

    $messages

    + + diff --git a/view/theme/testbubble/menu-user-pin.jpg b/view/theme/testbubble/menu-user-pin.jpg new file mode 100644 index 0000000000..26449569f4 Binary files /dev/null and b/view/theme/testbubble/menu-user-pin.jpg differ diff --git a/view/theme/testbubble/menu-user-pin.png b/view/theme/testbubble/menu-user-pin.png new file mode 100644 index 0000000000..6becfbb663 Binary files /dev/null and b/view/theme/testbubble/menu-user-pin.png differ diff --git a/view/theme/testbubble/nav.tpl b/view/theme/testbubble/nav.tpl new file mode 100644 index 0000000000..f206833669 --- /dev/null +++ b/view/theme/testbubble/nav.tpl @@ -0,0 +1,54 @@ +$langselector + + + +
    + {{ if $nav.network }}{{ endif }} + {{ if $nav.home }}{{ endif }} + {{ if $nav.notifications }}{{ endif }} + {{ if $nav.messages }}{{ endif }} +
    + +
    + $sitelocation + + +
    + + +{{ if $nav.apps }}$nav.apps.1{{ endif }} + + + diff --git a/view/theme/testbubble/next.png b/view/theme/testbubble/next.png new file mode 100644 index 0000000000..353e2e72a6 Binary files /dev/null and b/view/theme/testbubble/next.png differ diff --git a/view/theme/testbubble/notifications.png b/view/theme/testbubble/notifications.png new file mode 100644 index 0000000000..803257fec0 Binary files /dev/null and b/view/theme/testbubble/notifications.png differ diff --git a/view/theme/testbubble/photo-menu.jpg b/view/theme/testbubble/photo-menu.jpg new file mode 100644 index 0000000000..b96a96fa15 Binary files /dev/null and b/view/theme/testbubble/photo-menu.jpg differ diff --git a/view/theme/testbubble/photo_view.tpl b/view/theme/testbubble/photo_view.tpl new file mode 100644 index 0000000000..4582751c60 --- /dev/null +++ b/view/theme/testbubble/photo_view.tpl @@ -0,0 +1,40 @@ +
    +

    $album.1

    + + + +
    + {{ if $prevlink }}{{ endif }} + + {{ if $nextlink }}{{ endif }} +
    + +
    +
    $desc
    +{{ if $tags }} +
    $tags.0
    +
    $tags.1
    +{{ endif }} +{{ if $tags.2 }}{{ endif }} + +{{ if $edit }}$edit{{ endif }} + +{{ if $likebuttons }} +
    + $likebuttons + $like + $dislike +
    +{{ endif }} + +$comments + +$paginate + diff --git a/view/theme/testbubble/photography.png b/view/theme/testbubble/photography.png new file mode 100644 index 0000000000..7ec919f2b3 Binary files /dev/null and b/view/theme/testbubble/photography.png differ diff --git a/view/theme/testbubble/premium.png b/view/theme/testbubble/premium.png new file mode 100644 index 0000000000..1ad601c0f1 Binary files /dev/null and b/view/theme/testbubble/premium.png differ diff --git a/view/theme/testbubble/prev.png b/view/theme/testbubble/prev.png new file mode 100644 index 0000000000..0ae6022af5 Binary files /dev/null and b/view/theme/testbubble/prev.png differ diff --git a/view/theme/testbubble/profile_entry.tpl b/view/theme/testbubble/profile_entry.tpl new file mode 100644 index 0000000000..82c04cc20d --- /dev/null +++ b/view/theme/testbubble/profile_entry.tpl @@ -0,0 +1,11 @@ + +
    +
    +$alt +
    +
    + +
    $visible
    +
    +
    + diff --git a/view/theme/testbubble/profile_tabs.tpl b/view/theme/testbubble/profile_tabs.tpl new file mode 100644 index 0000000000..c236490b28 --- /dev/null +++ b/view/theme/testbubble/profile_tabs.tpl @@ -0,0 +1,9 @@ + +
    + $status + $profile + $photos + {{ if $events }}$events{{ endif }} + {{ if $notes }}$notes{{ endif }} +
    +
    diff --git a/view/theme/testbubble/search.png b/view/theme/testbubble/search.png new file mode 100644 index 0000000000..51c428594b Binary files /dev/null and b/view/theme/testbubble/search.png differ diff --git a/view/theme/testbubble/search_item.tpl b/view/theme/testbubble/search_item.tpl new file mode 100644 index 0000000000..76fbee6ba3 --- /dev/null +++ b/view/theme/testbubble/search_item.tpl @@ -0,0 +1,39 @@ +
    +
    +
    +
    + + $name + menu +
    +
      + $item_photo_menu +
    +
    +
    +
    +
    {{ if $location }}$location {{ endif }}
    +
    +
    $lock
    +
    + $drop +
    +
    +
    $title
    +
    +
    $body
    +
    +
    + $name +
    $ago
    + +
    + +
    +
    $conv
    +
    +
    + +
    \ No newline at end of file diff --git a/view/theme/testbubble/star.png b/view/theme/testbubble/star.png new file mode 100644 index 0000000000..a327ba14e4 Binary files /dev/null and b/view/theme/testbubble/star.png differ diff --git a/view/theme/testbubble/style.css b/view/theme/testbubble/style.css new file mode 100644 index 0000000000..ba3b520997 --- /dev/null +++ b/view/theme/testbubble/style.css @@ -0,0 +1,3277 @@ +/* + style.css + TestBubble + + Created by Anne Walk and Devlon Duthie on 2011-09-24. + Based loosely on the Dipsy theme. +*/ +/* ========== */ +/* = Colors + +Red links - #b20202 +Red link hover - #db0503 +Red Gradients (buttons and other gradients) - #b20202 and #d60808 + +Grey/body text - #626262 +Grey Gradients (buttons and other gradients) - #bdbdbd and #a2a2a2 + +Dark Grey Gradients - #7c7d7b and #555753 + +You can switch out the colors of the header, buttons and links by using a find and replace in your text editor. + + = */ +/* ========== */ + +body { + margin: 0px; + padding: 0px; + font-family: freesans,helvetica,arial,clean,sans-serif; + font-size: 15px; + color: #626262; + width: 100%; +} + +img { border: 0 none; max-width: 550px; } + +a { color: #b20202; text-decoration: none; margin-bottom:1px;} +a:hover { color: #db0503; padding-bottom: 0px;} + +h3 > a, h4 > a { + font-size: 18px; + color: #626262; +} + +h3 { + margin: 0px; + margin-bottom: 5px; + font-size: 18px; + color: #626262; +} + +h2 { + color: #626262; +} + +p { + + max-width: 600px; +} + +label { + font-variant:small-caps; +} + +li { + list-style: none; +} + +.required { display: inline; color: #b20202; } +.fakelink { color: #b20202; cursor: pointer; } +.fakelink :hover { color: #db0503; } + +input[type=text] { + border: 2px solid #b0b0b0; + padding: 2px; + -webkit-border-radius: 3px 3px 3px 3px; + -moz-border-radius: 3px 3px 3px 3px; + border-radius: 3px 3px 3px 3px; +} + +input[type=submit] { + margin-top: 10px; + border: none; + font-size: 0.9em; + padding: 5px 5px 5px 5px; + -moz-box-shadow:inset 0px 1px 0px 0px #cfcfcf; + -webkit-box-shadow:inset 0px 1px 0px 0px #cfcfcf; + box-shadow:inset 0px 1px 0px 0px #cfcfcf; + background:-webkit-gradient( linear, left top, left bottom, color-stop(0.05, #bdbdbd), color-stop(1, #a2a2a2) ); + background:-moz-linear-gradient( center top, #bdbdbd 5%, #a2a2a2 100% ); + filter:progid:DXImageTransform.Microsoft.gradient(startColorstr='#bdbdbd', endColorstr='#a2a2a2'); + background-color:#bdbdbd; + -moz-border-radius:5px; + -webkit-border-radius:5px; + border-radius:5px; + color:#efefef; + text-align: center; +} + +input[type=submit]:hover { + border: none; + background:-webkit-gradient( linear, left top, left bottom, color-stop(0.05, #b20202), color-stop(1, #d60808) ); + background:-moz-linear-gradient( center top, #b20202 5%, #d60808 100% ); + filter:progid:DXImageTransform.Microsoft.gradient(startColorstr='#b20202', endColorstr='#d60808'); + background-color:#b20202; + color: #efefef; +} +input[type=submit]:active { + position:relative; + top:1px; +} + +.smalltext { font-size: 0.7em } + +::selection { background:#fdf795; color: #000; /* Safari and Opera */ } +::-moz-selection { background:#fdf795; color: #000; /* Firefox */ } + +section { + margin: 10px 11% 0px 11%; + font-size: 0.9em; + line-height: 1.2em; + padding-right: 230px; +} + +#wall-item-lock { + margin-left: 10px; +} + +/* ========= */ +/* = Login = */ +/* ========= */ + +#login-name-wrapper { + vertical-align: middle; + margin: auto; +} + +#login-name-wrapper input { + width: 120px; + margin-left: 20px; +} + +#login-password-wrapper { + vertical-align: middle; + margin: auto; +} + +#login-extra-links { + width: 90px; + margin-top: 20px; + border: none; + font-size: 0.9em; + -moz-box-shadow:inset 0px 1px 0px 0px #cfcfcf; + -webkit-box-shadow:inset 0px 1px 0px 0px #cfcfcf; + box-shadow:inset 0px 1px 0px 0px #cfcfcf; + background:-webkit-gradient( linear, left top, left bottom, color-stop(0.05, #bdbdbd), color-stop(1, #a2a2a2) ); + background:-moz-linear-gradient( center top, #bdbdbd 5%, #a2a2a2 100% ); + filter:progid:DXImageTransform.Microsoft.gradient(startColorstr='#bdbdbd', endColorstr='#a2a2a2'); + background-color:#bdbdbd; + -moz-border-radius:5px; + -webkit-border-radius:5px; + border-radius:5px; + color:#efefef; + text-align: center; +} + +#login-extra-links a { + display: block; + margin: 10px; + padding: 5px 0px 5px 0px; + color: #efefef; + text-align: center; + margin-right: 20px; +} + +#login-extra-links:hover { + border: none; + background:-webkit-gradient( linear, left top, left bottom, color-stop(0.05, #b20202), color-stop(1, #d60808) ); + background:-moz-linear-gradient( center top, #b20202 5%, #d60808 100% ); + filter:progid:DXImageTransform.Microsoft.gradient(startColorstr='#b20202', endColorstr='#d60808'); + background-color:#b20202; + color: #efefef; +} + +#login-extra-links:active { + position:relative; + top:1px; +} + +#login-extra-filler { + display: none; +} + +/* ========= */ +/* = Panel = */ +/* ========= */ + +#panel { + position: absolute; + font-size:0.8em; + -webkit-border-radius: 5px ; + -moz-border-radius: 5px; + border-radius: 5px; + border: 1px solid #494948; + background-color: #2e3436; + opacity:50%; + color: #eeeeec; + padding:1em; + z-index: 200; + -moz-box-shadow: 7px 7px 12px #434343; + -webkit-box-shadow: 7px75px 12px #434343; + box-shadow: 7px 7px 10px #434343; +} + +/* ========= */ +/* = Pager = */ +/* ========= */ + +.pager { + padding-top: 30px; + display:block; + clear: both; + text-align: center; +} + +.pager a { + color: #626262; +} + +.pager span { padding: 4px; margin:4px; } +.pager_current { background-color: #b20202; color: #ffffff; } + +/* ======= */ +/* = Nav = */ +/* ======= */ + +nav { + height: 50px; + display: block; + position: relative; + padding: 0px 10%; + color: #efefef; + background:-webkit-gradient( linear, left top, left bottom, color-stop(0.05, #7c7d7b), color-stop(1, #555753) ); + background:-moz-linear-gradient( center top, #7c7d7b 5%, #555753 100% ); + filter:progid:DXImageTransform.Microsoft.gradient(startColorstr='#7c7d7b', endColorstr='#555753'); + background-color:#7c7d7b; + border-bottom: 1px solid #494948; +} +nav a { text-decoration: none; color: #eeeeec; border:0px;} +nav a:hover { text-decoration: none; color: #eeeeec; border:0px;} + +nav #banner { + display: block; + position: absolute; + margin-left: 20px; + margin-top: 5px; + padding-bottom:5px; +} +nav #banner #logo-text a { + display: hidden; + font-size: 40px; + font-weight: bold; + margin-left: 3px; +} + +nav #user-menu { + display: block; + width: 250px; + float: right; + margin-right:15px; + margin-top: 10px; + padding: 3px; + position: relative; + vertical-align: middle; + background:-webk/* margin-right:10px;*/it-gradient( linear, left top, left bottom, color-stop(0.05, #797979), color-stop(1, #898988) ); + background:-moz-linear-gradient( center top, #797979 5%, #898988 100% ); + filter:progid:DXImageTransform.Microsoft.gradient(startColorstr='#797979', endColorstr='#898988'); + background-color:#898988; + -moz-border-radius:5px; + -webkit-border-radius:5px; + border-radius:5px; + color:#efefef; + text-decoration:none; + text-align: center; + border: 1px solid #9a9a9a; +} + +nav #user-menu-label:after{ + content: url("menu-user-pin.png") no-repeat; + padding-left: 15px; +} + +nav #user-menu-label { + vertical-align: middle; + font-size: 12px; + padding: 5px; + text-align: center; +} + +ul#user-menu-popup { + display: none; + position: absolute; + background:-webk/* margin-right:10px;*/it-gradient( linear, left top, left bottom, color-stop(0.05, #797979), color-stop(1, #898988) ); + background:-moz-linear-gradient( center top, #797979 5%, #898988 100% ); + filter:progid:DXImageTransform.Microsoft.gradient(startColorstr='#797979', endColorstr='#898988'); + background-color:#898988; + width: 100%; + padding: 10px 0px; + margin: 0px; + top: 20px; + left: 0px; + border: 1px solid #9a9a9a; + border-top: none; + -webkit-border-radius: 0px 0px 5px 5px; + -moz-border-radius: 0px 0px 5px 5px; + border-radius: 0px 0px 5px 5px; + -moz-box-shadow: 5px 5px 10px #242424; + -webkit-box-shadow: 5px 5px 10px #242424; + box-shadow: 5px 5px 10px #242424; + z-index: 10000; +} + +ul#user-menu-popup li { display: block; } +ul#user-menu-popup li a { display: block; padding: 5px; } +ul#user-menu-popup li a:hover { + color: #efefef; + background:-webkit-gradient( linear, left top, left bottom, color-stop(0.05, #d60808), color-stop(1, #b20202) ); + background:-moz-linear-gradient( center top, #d60808 5%, #b20202 100% ); + filter:progid:DXImageTransform.Microsoft.gradient(startColorstr='#d60808', endColorstr='#b20202'); + background-color:#d60808; +} + +ul#user-menu-popup li a.nav-sep { border-top: 1px solid #989898; border-style:inset; } + +/* ============= */ +/* = Notifiers = */ +/* ============= */ + +#notifications { + height: 32px; + position: absolute; + top:10px; left: 650px; +} +.nav-ajax-update { + width: 44px; + height: 32px; + background: transparent url('notifications.png') 0px 0px no-repeat; + color: #efefef; + font-weight: bold; + font-size: 0.8em; + padding-top: 0.5em; + float: left; + padding-left: 11px; + display: none; +} +#net-update { background-position: 0px 0px; } +#mail-update { background-position: 0px -42px; } +#notify-update { background-position: 0px -84px; } +#home-update { background-position: 0px -126px; } + +#lang-select-icon { + cursor: pointer; + position: absolute; + left: 5px; + top: 5px; +} + +#language-selector { + position: absolute; + top: 0; + left: 16px; +} + +/* =================== */ +/* = System Messages = */ +/* =================== */ + +#sysmsg_info, #sysmsg { + position:fixed; + bottom: 0px; right:20%; + -moz-box-shadow: 7px 7px 12px #434343; + -webkit-box-shadow: 7px75px 12px #434343; + box-shadow: 7px 7px 10px #434343; + padding: 10px; + background:-webkit-gradient( linear, left top, left bottom, color-stop(0.05, #b20202), color-stop(1, #d60808) ); + background:-moz-linear-gradient( center top, #b20202 5%, #d60808 100% ); + filter:progid:DXImageTransform.Microsoft.gradient(startColorstr='#b20202', endColorstr='#d60808'); + background-color:#b20202; + -webkit-border-radius: 5px 5px 0px 0px; + -moz-border-radius: 5px 5px 0px 0px; + border-radius: 5px 5px 0px 0px; + border: 1px solid #da2c2c; + border-bottom:0px; + padding-bottom: 50px; + z-index: 1000; + color: #efefef; + font-style: bold; +} + +#sysmsg_info br, +#sysmsg br { + display:block; + margin:2px 0px; + border-top: 1px solid #dddddd; +} + +/* ================= */ +/* = Aside/Sidebar = */ +/* ================= */ + +aside { + position: absolute; + width: 260px; + right: 11%; + font-size: 0.8em; + font-style: bold; +} + +aside a{ + padding-bottom: 5px; + +} + +.vcard { + font-size: 1em; + font-variant:small-caps; +} + +.marital { + font-size: 1em; + font-variant:small-caps; +} + +.homepage-label { + font-size: 1em; + font-variant:small-caps; +} + +.vcard .fn { + font-size: 1.4em; + font-weight: bold; + border-bottom: none; + padding-top: 10px; +} + +.vcard #profile-photo-wrapper { + margin: 10px 0px; + padding: 12px; + width: 175px; + background-color: #f3f3f3; + border: 1px solid #dddddd; + -moz-box-shadow: 3px 3px 4px #959494; + -webkit-box-shadow: 3px 3px 4px #959494; + box-shadow: 3px 3px 4px #959494; +} + +aside h4 { font-size: 1.3em; } + +aside #viewcontacts { + text-align: center; + font-weight: bold; + font-variant:small-caps; + font-size: 1.1em; + padding-top: 5px; +} + +#viewcontacts a{ + color: #898989; +} + +#profile-extra-links ul { margin-left: 0px; padding-left: 0px; list-style: none; } + +#dfrn-request-link { + -moz-box-shadow:inset 0px 1px 0px 0px #a65151; + -webkit-box-shadow:inset 0px 1px 0px 0px #a65151; + box-shadow:inset 0px 1px 0px 0px #a65151; + background:-webkit-gradient( linear, left top, left bottom, color-stop(0.05, #d60808), color-stop(1, #b20202) ); + background:-moz-linear-gradient( center top, #d60808 5%, #b20202 100% ); + filter:progid:DXImageTransform.Microsoft.gradient(startColorstr='#d60808', endColorstr='#b20202'); + background-color:#d60808; + -moz-border-radius:5px; + -webkit-border-radius:5px; + border-radius:5px; + border:1px solid #fc5656; + display:inline-block; + color:#f0e7e7; + font-family:Trebuchet MS; + font-size:19px; + font-weight:bold; + text-align: center; + padding:10px; + width: 185px; + text-decoration:none; + text-shadow:1px 1px 0px #b36f6f; +} + +#dfrn-request-link:hover { + background:-webkit-gradient( linear, left top, left bottom, color-stop(0.05, #b20202), color-stop(1, #d60808) ); + background:-moz-linear-gradient( center top, #b20202 5%, #d60808 100% ); + filter:progid:DXImageTransform.Microsoft.gradient(startColorstr='#b20202', endColorstr='#d60808'); + background-color:#b20202; +} + +#dfrn-request-link:active { + position:relative; + top:1px; +} + +#dfrn-request-intro { + width: 600px; +} + +#netsearch-box { + background-color: #f6f6f6; + padding: 10px 10px 10px 20px; +} + +h3#search:before { + content: url("search.png"); + padding-right: 10px; + vertical-align: middle; +} + +#network-new-link { + background-color: #f3f3f3; + border: 1px solid #cdcdcd; + margin-bottom: 10px; + -webkit-border-radius: 5px 5px 5px 5px; + -moz-border-radius: 5px 5px 5px 5px; + border-radius: 5px 5px 5px 5px; +} + +#group-sidebar { + vertical-align: middle; + margin: auto; + margin-top: 20px; + padding-bottom: 10px; +} + +#sidebar-group-list { + margin-left: 30px; + margin-right: 30px; +} + +#sidebar-group-list > a{ + padding-bottom: 10px; +} + +.widget { + margin-top: 20px; + -moz-box-shadow: 1px 2px 6px 0px #959494; + -webkit-box-shadow: 1px 2px 6px 0px #959494; + box-shadow: 1px 2px 6px 0px #959494; + background:-webkit-gradient( linear, left top, left bottom, color-stop(0.05, #f8f8f8), color-stop(1, #f6f6f6) ); + background:-moz-linear-gradient( center top, #f8f8f8 5%, #f6f6f6 100% ); + filter:progid:DXImageTransform.Microsoft.gradient(startColorstr='#f8f8f8', endColorstr='#f6f6f6'); + background-color:#f8f8f8; + -moz-border-radius:5px; + -webkit-border-radius:5px; + border-radius:5px; + border:1px solid #eee; + color:#e6e6e6; + text-shadow:-1px 0px 0px #bdbdbd; + border: 1px solid #cdcdcd; +} + +#sidebar-new-group { + padding:7px; + width: 165px; + margin: auto; + margin-left: 40px; + -moz-box-shadow:inset 0px 1px 0px 0px #cfcfcf; + -webkit-box-shadow:inset 0px 1px 0px 0px #cfcfcf; + box-shadow:inset 0px 1px 0px 0px #cfcfcf; + background:-webkit-gradient( linear, left top, left bottom, color-stop(0.05, #bdbdbd), color-stop(1, #a2a2a2) ); + background:-moz-linear-gradient( center top, #bdbdbd 5%, #a2a2a2 100% ); + filter:progid:DXImageTransform.Microsoft.gradient(startColorstr='#bdbdbd', endColorstr='#a2a2a2'); + background-color:#bdbdbd; + -moz-border-radius:5px; + -webkit-border-radius:5px; + border-radius:5px; + display:inline-block; + color:#efefef; + text-decoration:none; + text-align: center; +} + +#sidebar-new-group:hover { + background:-webkit-gradient( linear, left top, left bottom, color-stop(0.05, #b20202), color-stop(1, #d60808) ); + background:-moz-linear-gradient( center top, #b20202 5%, #d60808 100% ); + filter:progid:DXImageTransform.Microsoft.gradient(startColorstr='#b20202', endColorstr='#d60808'); + background-color:#b20202; +} + +#sidebar-new-group:active { + position:relative; + top:1px; +} + +#sidebar-new-group a { + color: #efefef; + font-size: 14px; + text-align: center; + margin: auto; +} + +ul .sidebar-group-li{ + list-style: none; + font-size: 1.2em; + padding-bottom: 5px; +} + +ul .sidebar-group-li img{ + display: none; +} + +.widget h3{ + background:-webkit-gradient( linear, left top, left bottom, color-stop(0.05, #f0edf0), color-stop(1, #e2e2e2) ); + background:-moz-linear-gradient( center top, #f0edf0 5%, #e2e2e2 100% ); + filter:progid:DXImageTransform.Microsoft.gradient(startColorstr='#f0edf0', endColorstr='#e2e2e2'); + background-color:#f0edf0; + -moz-border-radius:5px 5px 0px 0px; + -webkit-border-radius:5px 5px 0px 0px; + border-radius:5px 5px 0px 0px; + border:1px solid #e2e2e2; + border-bottom: 1px solid #cdcdcd; + padding-top:5px; + padding-bottom: 5px; + vertical-align: baseline; + text-align: center; + text-shadow:-1px 0px 0px #bdbdbd; +} + +#group-sidebar h3:before{ + content: url("groups.png"); + padding-right: 10px; + vertical-align: middle; +} + +#saved-search-list{ + margin-top: 15px; + padding-bottom: 20px; +} + +.saved-search-li { + list-style: none; + font-size: 1.2em; +} + +.saved-search-li .icon { + margin-right: 5px; +} + +/** +* contacts block +*/ +.contact-block-img { + width: 42px; + height: 42px; + padding-right: 2px; +} +.contact-block-div { + float: left; +} + +.contact-block-textdiv { width: 150px; height: 34px; float: left; } +#contact-block-end { clear: both; } + +/* ======= */ +/* = Jot = */ +/* ======= */ + +#profile-jot-text_tbl { margin-bottom: 10px; } +#profile-jot-text_ifr { width: 99.9%!important } +#profile-jot-submit-wrapper { +} + +#profile-jot-perms, #profile-jot-submit { + width: 60px; + font-size: 12px; + -moz-box-shadow:inset 0px 1px 0px 0px #cfcfcf; + -webkit-box-shadow:inset 0px 1px 0px 0px #cfcfcf; + box-shadow:inset 0px 1px 0px 0px #cfcfcf; + background:-webkit-gradient( linear, left top, left bottom, color-stop(0.05, #bdbdbd), color-stop(1, #a2a2a2) ); + background:-moz-linear-gradient( center top, #bdbdbd 5%, #a2a2a2 100% ); + filter:progid:DXImageTransform.Microsoft.gradient(startColorstr='#bdbdbd', endColorstr='#a2a2a2'); + background-color:#bdbdbd; + -moz-border-radius:5px; + -webkit-border-radius:5px; + border-radius:5px; + display:inline-block; + color:#efefef; + text-decoration:none; + text-align: center; +} + +#profile-jot-perms { + width: 30px; + overflow: hidden; + border: 0px; + margin-left:5px; +} + +#jot-perms-perms .icon { + height: 1px; +} + +#profile-jot-submit { + float: left; + margin-right:5px; + border: 0px; + margin-top: 0px; + margin-left: -30px; +} + +#profile-jot-perms:hover, #profile-jot-submit:hover { + background:-webkit-gradient( linear, left top, left bottom, color-stop(0.05, #b20202), color-stop(1, #d60808) ); + background:-moz-linear-gradient( center top, #b20202 5%, #d60808 100% ); + filter:progid:DXImageTransform.Microsoft.gradient(startColorstr='#b20202', endColorstr='#d60808'); + background-color:#b20202; +} +#profile-jot-perms:active, #profile-jot-submit:active { + position:relative; + top:1px; +} + +#character-counter { + /*float: left; padding: 8px 10px;*/ + position: absolute: right: 100px; top:100px; +} +#profile-rotator-wrapper { + float: right; +} + +.jot-tool { + float: left; + margin-right: 5px; +} +#profile-jot-tools-end, +#profile-jot-banner-end { clear: both; } + +#profile-jot-email-wrapper { + margin: 10px 10% 0px 10%; + border: 1px solid #eeeeee; + border-bottom: 0px; +} +#profile-jot-email-label { background-color: #555753; color: #ccccce; padding: 5px;} +#profile-jot-email { margin: 5px; width: 98%; } + +#profile-jot-networks { + margin: 0px 10%; + border: 1px solid #eeeeee; + border-top: 0px; + border-bottom: 0px; + padding: 5px; +} +#profile-jot-acl-wrapper { + margin: 0px 10px; + border: 1px solid #eeeeee; + border-top: 0px; + display:block!important; +} +#group_allow_wrapper, +#group_deny_wrapper, +#acl-permit-outer-wrapper { width: 47%; float: left; } + +#contact_allow_wrapper, +#contact_deny_wrapper, +#acl-deny-outer-wrapper { width: 47%; float: right; } + +#acl-permit-text {background-color: #555753; color: #ccccce; padding: 5px; float: left;} +#jot-public {background-color: #555753; color: #ff0000; padding: 5px; float: left;} +#acl-deny-text {background-color: #555753; color: #ccccce; padding: 5px; float: left;} + +#acl-permit-text-end, +#acl-deny-text-end { clear: both; } +#profile-jot-wrapper { + margin-top: 0px; + padding-top: 0px; +} + +profile-jot-banner-wrapper { + padding: 0px; + margin: 0px; +} + +.contact-h4 { + font-size: 1.2em; +} + +/* ======== */ +/* = Tabs = */ +/* ======== */ + +.tabs-wrapper { + width: 450px; + list-style: none; + padding: 10px; + margin: 0px 0px 10px 0px; + border-bottom: 1px solid #efefef; +} +.tabs-wrapper li { display: inline;} + +.tabs { + padding: 5px 10px 5px 10px; + margin-right: 5px; + font-style: bold; + -moz-box-shadow:inset 0px 1px 0px 0px #cfcfcf; + -webkit-box-shadow:inset 0px 1px 0px 0px #cfcfcf; + box-shadow:inset 0px 1px 0px 0px #cfcfcf; + background:-webkit-gradient( linear, left top, left bottom, color-stop(0.05, #bdbdbd), color-stop(1, #a2a2a2) ); + background:-moz-linear-gradient( center top, #bdbdbd 5%, #a2a2a2 100% ); + filter:progid:DXImageTransform.Microsoft.gradient(startColorstr='#bdbdbd', endColorstr='#a2a2a2'); + background-color:#bdbdbd; + -moz-border-radius:5px; + -webkit-border-radius:5px; + border-radius:5px; + color:#efefef; + text-decoration:none; + text-align: center; +} + +.tabs:hover { + background:-webkit-gradient( linear, left top, left bottom, color-stop(0.05, #b20202), color-stop(1, #d60808) ); + background:-moz-linear-gradient( center top, #b20202 5%, #d60808 100% ); + filter:progid:DXImageTransform.Microsoft.gradient(startColorstr='#b20202', endColorstr='#d60808'); + background-color:#b20202; + color:#efefef; + padding: 5px 10px 5px 10px; + margin-right: 5px; +} +.tabs:active { + position:relative; + top:1px; + color:#efefef; + padding: 5px 10px 5px 10px; + margin-right: 5px; +} + +/* ========= */ +/* = Posts = */ +/* ========= */ + +.wall-item-outside-wrapper { + margin-top: 50px; +} +.wall-item-outside-wrapper-end { clear: both;} +.wall-item-content-wrapper { position: relative; max-width: 95%; } +.wall-item-photo-menu { display: none;} +.wall-item-photo-menu-button { + display:none; + text-indent: -99999px; + background: #eeeeee url("menu-user-pin.png") no-repeat 75px center; + position: absolute; + overflow: hidden; + height: 20px; width: 90px; + top: 85px; left: -1px; + -webkit-border-radius: 0px 0px 5px 5px; + -moz-border-radius: 0px 0px 5px 5px; + border-radius: 0px 0px 5px 5px; +} + +.wall-item-info { float: left; width: 140px; } +.wall-item-photo-wrapper { + width: 80px; height: 80px; + position: relative; + padding: 5px; + background-color: #eeeeee; + border: 1px solid #dddddd; + -moz-box-shadow: 3px 3px 4px #959494; + -webkit-box-shadow: 3px 3px 4px #959494; + box-shadow: 3px 3px 4px #959494; +} + +.wall-item-tools { + filter: alpha(opacity=60); + opacity: 0.7; + -webkit-transition: all 0.25s ease-in-out; + -moz-transition: all 0.25s ease-in-out; + -o-transition: all 0.25s ease-in-out; + -ms-transition: all 0.25s ease-in-out; + transition: all 0.25s ease-in-out; + margin-left: 140px; + margin-top: 10px; + padding-bottom: 6px; +} + +.wall-item-tools:hover { + filter: alpha(opacity=100); + opacity: 1; + -webkit-transition: all 0.25s ease-in-out; + -moz-transition: all 0.25s ease-in-out; + -o-transition: all 0.25s ease-in-out; + -ms-transition: all 0.25s ease-in-out; + transition: all 0.25s ease-in-out; + margin-left: 140px; +} + +.wall-item-outside-wrapper.comment .wall-item-tools { + margin: 5px 5px 10px 60px; + float: left; +} + +.wall-item-like-buttons { + float: left; +} +.wall-item-like-buttons a.icon { + float: left; + margin-right: 5px; + display: inline; +} +.wall-item-links-wrapper { + width: 20px; + float: left; +} +.wall-item-delete-wrapper { + float: left; +} +.wall-item-links-wrapper a.icon { + float: left; + margin-right: 5px; + display: inline; +} +.pencil { + float: left; +} + +.star-item { + margin-left: 5px; + margin-right: 2px; + float: left; +} +.wall-item-title { font-size: 1.2em; font-weight: bold;} +.wall-item-body { margin-left: 140px; padding-right: 20px; } +.wall-item-body p { + max-width: 600px; + font-size: 0.8em; +} +.wall-item-lock-wrapper { float: right; } +.wall-item-dislike, +.wall-item-like, +.wall-item-author { + clear: left; + font-size: 0.9em; + margin: 4px 0px 0px 140px; + font-variant:small-caps; +} + +.wall-item-author a { + color: #898989; +} + +.wall-item-ago { display: inline; padding-left: 10px; color: #898989;} +.wall-item-wrapper-end { clear:both; } +.wall-item-location { + margin-top:5px; + width: 100px; + overflow: hidden; + text-overflow: ellipsis; + -o-text-overflow: ellipsis; +} + +.wall-item-location .icon { float: left; } +.wall-item-location > a { + margin-left: 25px; + font-size: 0.9em; + display: block; + font-variant:small-caps; + color: #898989; +} + +.wall-item-location .smalltext { margin-left: 25px; font-size: 0.9em; display: block;} +.wall-item-location > br { display: none; } +.wall-item-conv a{ + font-size: 0.9em; + color: #898989; + font-variant:small-caps; +} + +.wallwall .wwto { + left: -10px; + margin: 0; + position: absolute; + top: 65px; + width: 30px; + z-index: 10001; + width: 30px; + height: 30px; +} + +.wallwall .wwto img { width: 30px!important; height: 30px!important;} +.wallwall .wall-item-photo-end { clear: both; } +.wall-item-arrowphoto-wrapper { + position: absolute; + left: 20px; + top: 70px; + z-index: 10002; +} + +.wall-item-photo-menu { + min-width: 92px; + color: #2e3436; + border-top: 0px; + background: #eeeeee; + border-right: 1px solid #dddddd; + border-left: 1px solid #dddddd; + border-bottom: 1px solid #dddddd; + position: absolute; + left: -2px; top: 101px; + display: none; + z-index: 10000; + -webkit-border-radius: 0px 5px 5px 5px; + -moz-border-radius: 0px 5px 5px 5px; + border-radius: 0px 5px 5px 5px; + -moz-box-shadow: 3px 3px 4px #959494; + -webkit-box-shadow: 3px 3px 4px #959494; + box-shadow: 3px 3px 4px #959494; +} + +.wall-item-photo-menu-button { + border-right: 1px solid #dddddd; + border-left: 1px solid #dddddd; + border-bottom: 1px solid #dddddd; + -moz-box-shadow: 3px 3px 4px #959494; + -webkit-box-shadow: 3px 3px 4px #959494; + box-shadow: 3px 3px 4px #959494; +} + +.fakelink wall-item-photo-menu-button { + -webkit-border-radius: 0px 5px 5px 5px; + -moz-border-radius: 0px 5px 5px 5px; + border-radius: 0px 5px 5px 5px; + -moz-box-shadow: 3px 3px 4px #959494; + -webkit-box-shadow: 3px 3px 4px #959494; + box-shadow: 3px 3px 4px #959494; +} + +.wall-item-photo-menu ul { margin:0px; padding: 0px; list-style: none } +.wall-item-photo-menu li a { white-space: nowrap; display: block; padding: 5px 2px; color: #2e3436; } +.wall-item-photo-menu li a:hover { + color: #efefef; + background:-webkit-gradient( linear, left top, left bottom, color-stop(0.05, #b20202), color-stop(1, #d60808) ); + background:-moz-linear-gradient( center top, #b20202 5%, #d60808 100% ); + filter:progid:DXImageTransform.Microsoft.gradient(startColorstr='#b20202', endColorstr='#d60808'); + background-color:#b20202; + order-bottom: none; +} + +.icon.drop, +.icon.drophide { float: left; } +#item-delete-selected { overflow: auto; width: 100%;} +.wall-item-outside-wrapper { + max-width: 90%; + border-bottom: 1px solid #dedede; + margin-top: 20px; +} + +/* ============ */ +/* = Comments = */ +/* ============ */ + + .ccollapse-wrapper { + font-size: 0.9em; + color: #898989; + margin-left: 80px; + font-variant:small-caps; +} + +.wall-item-outside-wrapper.comment { margin-left: 80px; } +.wall-item-outside-wrapper.comment .wall-item-photo { width: 40px!important; height: 40px!important;} +.wall-item-outside-wrapper.comment .wall-item-photo-wrapper {width: 40px; height: 40px; } +.wall-item-outside-wrapper.comment .wall-item-photo-menu-button { + width: 50px; + top: 45px; + background-position: 35px center; +} +.wall-item-outside-wrapper.comment .wall-item-info { width: 60px; } +.wall-item-outside-wrapper.comment .wall-item-body { margin-left: 60px; max-width: 600px;} +.wall-item-outside-wrapper.comment .wall-item-author { margin-left: 60px;} + +.wall-item-outside-wrapper.comment .wall-item-photo-menu { + min-width: 50px; + top: 60px; +} +.icollapse-wrapper { + font-size: 0.9em; + color: #898989; + font-variant:small-caps; +} + +.comment-wwedit-wrapper, +.comment-edit-wrapper { margin: 30px 0px 0px 80px;} +.comment-wwedit-wrapper img, +.comment-edit-wrapper img { width: 20px; height: 20px; } +.comment-edit-photo-link { float: left; width: 40px;} +.comment-edit-text-empty { + width: 80%; + height: 20px; + border: 0px; + color: #babdb6; + -webkit-transition: all 0.5s ease-in-out; + -moz-transition: all 0.5s ease-in-out; + -o-transition: all 0.5s ease-in-out; + -ms-transition: all 0.5s ease-in-out; + transition: all 0.5s ease-in-out; +} +.comment-edit-text-empty:hover { color: #999999;} +.comment-edit-text-full { width: 80%; height: 6em; + -webkit-transition: all 0.5s ease-in-out; + -moz-transition: all 0.5s ease-in-out; + -o-transition: all 0.5s ease-in-out; + -ms-transition: all 0.5s ease-in-out; + transition: all 0.5s ease-in-out; +} +.comment-edit-submit-wrapper { width: 80%; margin-left: 40px; text-align: right; } +.comment-edit-submit { + height: 22px; + background-color: #a2a2a2; + color: #eeeeec; + -webkit-border-radius: 5px; + -moz-border-radius: 5px; + border-radius: 5px; + border: 0px; +} + +.comment-edit-submit:hover { + background-color: #b20202; +} + +.comment-edit-submit:active { + background-color: #b20202; +} + +#item-delete-selected-desc { + color: #898989; +} + +/** + * item text style + **/ +.wall-item-body code { + border-color: #CCCCCC; + border-style: solid; + border-width: 1px 1px 1px 10px; + display: block; + padding-left: 10px; +} + +/* =========== */ +/* = Profile = */ +/* =========== */ + +.advanced-profile-content { + margin-top: 5px; + margin-bottom: 10px; + margin-left: 30px; + width: 60%; +} + +.advanced-profile-label { + margin-top: 10px; + margin-bottom: 0px; + padding-bottom: 5px; + font-size: 18px; + font-variant:small-caps; +} + +div[id$="wrapper"] { height: 100%;} +div[id$="wrapper"] br { clear: left; } +#advanced-profile-with { margin-left: 20px;} + +#profile-listing-desc { + float: left; + display: inline; + padding: 5px 10px 5px 10px; + width: 150px; + margin-bottom:20px; + margin-top: 20px; + -moz-box-shadow:inset 0px 1px 0px 0px #cfcfcf; + -webkit-box-shadow:inset 0px 1px 0px 0px #cfcfcf; + box-shadow:inset 0px 1px 0px 0px #cfcfcf; + background:-webkit-gradient( linear, left top, left bottom, color-stop(0.05, #bdbdbd), color-stop(1, #a2a2a2) ); + background:-moz-linear-gradient( center top, #bdbdbd 5%, #a2a2a2 100% ); + filter:progid:DXImageTransform.Microsoft.gradient(startColorstr='#bdbdbd', endColorstr='#a2a2a2'); + background-color:#bdbdbd; + -moz-border-radius:5px; + -webkit-border-radius:5px; + border-radius:5px; + display:inline-block; + color:#efefef; + font-style: bold; + text-align: center; +} + +#profile-listing-desc:hover { + background:-webkit-gradient( linear, left top, left bottom, color-stop(0.05, #b20202), color-stop(1, #d60808) ); + background:-moz-linear-gradient( center top, #b20202 5%, #d60808 100% ); + filter:progid:DXImageTransform.Microsoft.gradient(startColorstr='#b20202', endColorstr='#d60808'); + background-color:#b20202; +} + +#profile-listing-desc:active { + background-color: #b20202; + position:relative; + top:1px; +} + +#profile-listing-desc a { + color: #efefef; +} + +#profile-listing-new-link-wrapper { + float: left; + display: inline; + width: 130px; + margin-left:5px; + margin-top: 20px; + -moz-box-shadow:inset 0px 1px 0px 0px #cfcfcf; + -webkit-box-shadow:inset 0px 1px 0px 0px #cfcfcf; + box-shadow:inset 0px 1px 0px 0px #cfcfcf; + background:-webkit-gradient( linear, left top, left bottom, color-stop(0.05, #bdbdbd), color-stop(1, #a2a2a2) ); + background:-moz-linear-gradient( center top, #bdbdbd 5%, #a2a2a2 100% ); + filter:progid:DXImageTransform.Microsoft.gradient(startColorstr='#bdbdbd', endColorstr='#a2a2a2'); + background-color:#bdbdbd; + -moz-border-radius:5px; + -webkit-border-radius:5px; + border-radius:5px; + padding: 5px 10px 5px 10px; + font-style: bold; + color:#efefef; + text-align: center; +} + +#profile-listing-new-link-wrapper:hover { + background:-webkit-gradient( linear, left top, left bottom, color-stop(0.05, #b20202), color-stop(1, #d60808) ); + background:-moz-linear-gradient( center top, #b20202 5%, #d60808 100% ); + filter:progid:DXImageTransform.Microsoft.gradient(startColorstr='#b20202', endColorstr='#d60808'); + background-color:#b20202; +} + +#profile-listing-new-link-wrapper:active { + background-color: #b20202; + position:relative; + top:1px; +} + +#profile-listing-new-link-wrapper a { + color: #efefef; +} + +.profile-listing-name { + font-size: 1em; + font-variant: small-caps; +} +.profile-listing-name a { + color: #898989; +} + +.profile-listing-visible { + width: 90px; + margin-bottom:20px; + margin-top: 10px; + -moz-box-shadow:inset 0px 1px 0px 0px #cfcfcf; + -webkit-box-shadow:inset 0px 1px 0px 0px #cfcfcf; + box-shadow:inset 0px 1px 0px 0px #cfcfcf; + background:-webkit-gradient( linear, left top, left bottom, color-stop(0.05, #bdbdbd), color-stop(1, #a2a2a2) ); + background:-moz-linear-gradient( center top, #bdbdbd 5%, #a2a2a2 100% ); + filter:progid:DXImageTransform.Microsoft.gradient(startColorstr='#bdbdbd', endColorstr='#a2a2a2'); + background-color:#bdbdbd; + -moz-border-radius:5px; + -webkit-border-radius:5px; + border-radius:5px; + padding: 5px 10px 5px 10px; + margin-right: 5px; + color:#efefef; + text-align: center; +} + +.profile-listing-visible:hover { + background:-webkit-gradient( linear, left top, left bottom, color-stop(0.05, #b20202), color-stop(1, #d60808) ); + background:-moz-linear-gradient( center top, #b20202 5%, #d60808 100% ); + filter:progid:DXImageTransform.Microsoft.gradient(startColorstr='#b20202', endColorstr='#d60808'); + background-color:#b20202; +} + +.profile-listing-visible:active { + background-color: #b20202; + position:relative; + top:1px; +} + +.profile-listing-visible a { + color: #efefef; +} + +.profile-listing-photo { + padding: 5px; + background-color: #efefef; + border: 2px dotted #eeeeee; + -moz-box-shadow: 3px 3px 4px #959494; + -webkit-box-shadow: 3px 3px 4px #959494; + box-shadow: 3px 3px 4px #959494; +} + +#profile-edit-links li { + display: inline; + width: 150px; + margin-bottom:20px; + margin-top: 20px; + background-color: #a2a2a2; + color: #eeeeec; + padding: 5px 10px 5px 10px; + margin-right: 5px; + font-style: bold; + -webkit-border-radius: 5px 5px 5px 5px; + -moz-border-radius: 5px 5px 5px 5px; + border-radius: 5px 5px 5px 5px; +} + +#profile-edit-links li a { + color: #efefef; +} + +#profile-edit-links li:hover { + background-color: #b20202; +} + +#profile-edit-links li:active { + background-color: #b20202; +} + +#cropimage-wrapper { float:left; } +#crop-image-form { clear:both; } + +.profile-match-name a{ + color: #999; + font-variant: small-caps; + font-size: 1em; +} + +.profile-match-name a:hover { + color: #999; +} + +.profile-match-wrapper { + width: 300px; + padding: 5px; + margin-bottom:10px; + background-color: #f6f6f6; + border: 1px solid #dddddd; + -moz-box-shadow: 3px 3px 4px #959494; + -webkit-box-shadow: 3px 3px 4px #959494; + box-shadow: 3px 3px 4px #959494; +} + +/* ========== */ +/* = Photos = */ +/* ========== */ + +#side-bar-photos-albums li { + font-size: 1.2em; +} + +#photo-top-links { + width: 130px; + margin-bottom:20px; + margin-top: 20px; + background-color: #a2a2a2; + color: #eeeeec; + padding: 5px 10px 5px 10px; + margin-right: 5px; + font-style: bold; + -webkit-border-radius: 5px 5px 5px 5px; + -moz-border-radius: 5px 5px 5px 5px; + border-radius: 5px 5px 5px 5px; +} +#photo-top-links a { + color: #efefef; +} + +#photo-top-links:hover { + background-color: #b20202; +} + +#photo-top-links:active { + background-color: #b20202; +} + +.photo-album-image-wrapper, +.photo-top-image-wrapper { + float: left; + margin: 0px 10px 10px 0px; + border: 1px solid #dddddd; + -moz-box-shadow: 3px 3px 6px #959494; + -webkit-box-shadow: 3px 3px 6px #959494; + box-shadow: 3px 3px 6px #959494; + background-color: #efefef; + padding: 10px; + padding-bottom: 30px; + position:relative; +} + +#photo-photo { max-width: 100% } +#photo-photo img { max-width: 100% } + +.photo-top-image-wrapper a:hover, +#photo-photo a:hover, +.photo-album-image-wrapper a:hover { + border-bottom: 0px; +} + +.photo-top-photo, +.photo-album-photo {} + +.photo-top-album-name { + position: absolute; + bottom: 0px; + padding: 0px 5px; + font-weight: bold; + font-stretch:semi-expanded; + font-variant:small-caps; +} + +.photo-top-album-name a{ + text-align: center; + color: #6e6e6e; +} +.caption { + position: absolute; + bottom: 0px; + margin: 0px 5px; + text-align: center; + color: #6e6e6e; + font-size: 0.9em; + font-variant: small-caps; +} + +#photo-photo{ + position: relative; + float:left; + border: 1px solid #dddddd; + -moz-box-shadow: 3px 3px 6px #959494; + -webkit-box-shadow: 3px 3px 6px #959494; + box-shadow: 3px 3px 6px #959494; + background-color: #efefef; + padding: 10px; +} + +#photo-caption { + margin-top: 10px; + color: #6E6E6E; + font-variant:small-caps; + font-size: 1.1em; +} + +#photo-photo-end { clear: both; } +#photo-prev-link, +#photo-next-link{ + position: absolute; + width:10%; + height: 100%; + background-color: rgba(255,255,255,0.2); + opacity: 0; + -webkit-transition: all 0.2s ease-in-out; + -moz-transition: all 0.2s ease-in-out; + -o-transition: all 0.2s ease-in-out; + -ms-transition: all 0.2s ease-in-out; + transition: all 0.2s ease-in-out; + background-position: center center; + background-repeat: no-repeat; +} + +#photo-prev-link { left:0px; top:0px; background-image: url('prev.png'); } +#photo-next-link { right:0px; top:0px; background-image: url('next.png');} +#photo-prev-link a, +#photo-next-link a{ + display: block; width: 100%; height: 100%; + overflow: hidden; + text-indent: -900000px; +} + +#photo-prev-link:hover, +#photo-next-link:hover { + opacity: 1; + -webkit-transition: all 0.2s ease-in-out; + -moz-transition: all 0.2s ease-in-out; + -o-transition: all 0.2s ease-in-out; + -ms-transition: all 0.2s ease-in-out; + transition: all 0.2s ease-in-out; +} + +#photo-next-link .icon, +#photo-prev-link .icon { display: none } + +#photos-upload-spacer, +#photos-upload-new-wrapper, +#photos-upload-exist-wrapper { margin-bottom: 1em; } +#photos-upload-existing-album-text, +#photos-upload-newalbum-div { + background-color: #fff; + color: #909090; + font-size: 1.2em; + padding: 3px 0px; + padding-left: 0px; + width: 300px; +} + +#photos-upload-album-select, +#photos-upload-newalbum { width: 400px; } + +#photos-upload-perms-menu { + width: 180px; + -moz-box-shadow:inset 0px 1px 0px 0px #cfcfcf; + -webkit-box-shadow:inset 0px 1px 0px 0px #cfcfcf; + box-shadow:inset 0px 1px 0px 0px #cfcfcf; + background:-webkit-gradient( linear, left top, left bottom, color-stop(0.05, #bdbdbd), color-stop(1, #a2a2a2) ); + background:-moz-linear-gradient( center top, #bdbdbd 5%, #a2a2a2 100% ); + filter:progid:DXImageTransform.Microsoft.gradient(startColorstr='#bdbdbd', endColorstr='#a2a2a2'); + background-color:#bdbdbd; + -moz-border-radius:5px; + -webkit-border-radius:5px; + border-radius:5px; + padding: 7px; + text-align: center; + font-size: 0.9em; + color: #efefef; +} + +#photos-upload-perms-menu:hover { + text-align: center; + font-size: 0.9em; + width: 180px; + padding: 7px; + color: #efefef; + background:-webkit-gradient( linear, left top, left bottom, color-stop(0.05, #b20202), color-stop(1, #d60808) ); + background:-moz-linear-gradient( center top, #b20202 5%, #d60808 100% ); + filter:progid:DXImageTransform.Microsoft.gradient(startColorstr='#b20202', endColorstr='#d60808'); + background-color:#b20202; +} + +#photos-upload-perms-menu:active { + text-align: center; + font-size: 0.9em; + width: 180px; + padding: 7px; + background-color: #b20202; + position:relative; + top:1px; +} + +#photos-upload-perms-menu a { + color: #efefef; +} + +#photos-upload-perms-menu .icon { + display: none; +} + +select[size], select[multiple], select[size][multiple] { + -webkit-appearance: listbox; + border: 2px solid #b0b0b0; + padding: 2px; + -webkit-border-radius: 3px 3px 3px 3px; + -moz-border-radius: 3px 3px 3px 3px; + border-radius: 3px 3px 3px 3px; +} + +select { + -webkit-appearance: menulist; + box-sizing: border-box; + -webkit-box-align: center; + cursor: default; + border: 2px solid #b0b0b0; + padding: 2px; + -webkit-border-radius: 3px 3px 3px 3px; + -moz-border-radius: 3px 3px 3px 3px; + border-radius: 3px 3px 3px 3px; +} + +keygen, select { + -webkit-border-radius: ; +} + +input, textarea, keygen { + font-size: 0.9em; + letter-spacing: normal; + word-spacing: normal; + line-height: 1.2em; + text-transform: none; + text-indent: 0px; + text-shadow: none; + display: inline-block; + text-align: -webkit-auto; + border: 2px solid #b0b0b0; + padding: 2px; + -webkit-border-radius: 3px 3px 3px 3px; + -moz-border-radius: 3px 3px 3px 3px; + border-radius: 3px 3px 3px 3px; +} + +.qq-upload-button { + background-color: none; + -moz-box-shadow:inset 0px 1px 0px 0px #a65151; + -webkit-box-shadow:inset 0px 1px 0px 0px #a65151; + box-shadow:inset 0px 1px 0px 0px #a65151; + background:-webkit-gradient( linear, left top, left bottom, color-stop(0.05, #d60808), color-stop(1, #b20202) ); + background:-moz-linear-gradient( center top, #d60808 5%, #b20202 100%); + filter:progid:DXImageTransform.Microsoft.gradient(startColorstr='#d60808', endColorstr='#b20202'); + background-color:#d60808; + -moz-border-radius:5px; + -webkit-border-radius:5px; + border-radius:5px; + border:1px solid #fc5656; + display:inline-block; + color:#f0e7e7; + text-shadow:1px 1px 0px #b36f6f; + text-align: center; + font-size: 0.9em; + color: #efefef; + width: 91px; + padding: 7px; +} + +.qq-upload-button:hover { + text-align: center; + font-size: 0.9em; + color: #efefef; + width: 91px; + padding: 7px; + background:-webkit-gradient( linear, left top, left bottom, color-stop(0.05, #b20202), color-stop(1, #d60808) )!important; + background:-moz-linear-gradient( center top, #b20202 5%, #d60808 100% )!important; + filter:progid:DXImageTransform.Microsoft.gradient(startColorstr='#b20202', endColorstr='#d60808')!important; + background-color:#b20202; +} + +.qq-upload-button:active { + text-align: center; + font-size: 0.9em; + color: #efefef; + background-color: #B20202; + width: 91px; + padding: 7px; + position:relative; + top:1px; +} + +#album-edit-link { + width: 70px; + margin-bottom:20px; + margin-top: 20px; + background-color: #a2a2a2; + color: #eeeeec; + padding: 5px 10px 5px 10px; + margin-right: 5px; + font-style: bold; + -webkit-border-radius: 5px 5px 5px 5px; + -moz-border-radius: 5px 5px 5px 5px; + border-radius: 5px 5px 5px 5px; +} + +#album-edit-link a { + color: #efefef; +} + +#album-edit-link:hover { + background-color: #b20202; +} + +#photo-edit-link-wrap { + margin-bottom: 10px; +} + +#photo_edit_form { + width: 500px; + margin-top:20px; + text-align: left; +} + +input#photo_edit_form { + display: block; + width: 100%; +} + +#photo-edit-perms-menu { + float: left; + display: inline; + margin-top: 10px; + margin-right: 10px; + -moz-box-shadow:inset 0px 1px 0px 0px #cfcfcf; + -webkit-box-shadow:inset 0px 1px 0px 0px #cfcfcf; + box-shadow:inset 0px 1px 0px 0px #cfcfcf; + background:-webkit-gradient( linear, left top, left bottom, color-stop(0.05, #bdbdbd), color-stop(1, #a2a2a2) ); + background:-moz-linear-gradient( center top, #bdbdbd 5%, #a2a2a2 100% ); + filter:progid:DXImageTransform.Microsoft.gradient(startColorstr='#bdbdbd', endColorstr='#a2a2a2'); + background-color:#bdbdbd; + -moz-border-radius:5px; + -webkit-border-radius:5px; + border-radius:5px; + padding: 4px; + color: #efefef; + text-align: center; + font-size: 0.9em; + width: 100px; +} + +#photo-edit-perms-menu:hover { + color: #efefef; + background:-webkit-gradient( linear, left top, left bottom, color-stop(0.05, #b20202), color-stop(1, #d60808) ); + background:-moz-linear-gradient( center top, #b20202 5%, #d60808 100% ); + filter:progid:DXImageTransform.Microsoft.gradient(startColorstr='#b20202', endColorstr='#d60808'); + background-color:#b20202; +} + +#photo-edit-perms-menu:active { + background-color: #b20202; + position:relative; + top:1px; +} + +#photo-edit-perms-menu a { + color: #efefef; +} + +#photo-edit-perms-menu .icon { + display: none; +} + +#photo-edit-delete-button { + float: left; + display: inline; + margin-left: 190px; +} + +#side-bar-photos-albums h3:before { + content: url("photography.png"); + padding-right: 10px; + vertical-align: middle; +} + +#side-bar-photos-albums li { + margin-bottom: 5px; +} + +#photo-album-edit-wrapper { + margin-bottom: 10px; +} + +/* ============ */ +/* = Messages = */ +/* ============ */ + +#prvmail-wrapper, .mail-conv-detail, .mail-list-detail { + position: relative; + width: 500px; + padding: 50px; + margin: 20px auto; + background-color: #fff; + -webkit-box-shadow: 0 0 4px rgba(0, 0, 0, 0.2), inset 0 0 50px rgba(0, 0, 0, 0.1); + -moz-box-shadow: 0 0 4px rgba(0, 0, 0, 0.2), inset 0 0 50px rgba(0, 0, 0, 0.1); + box-shadow: 0 0 5px rgba(0, 0, 0, 0.2), inset 0 0 50px rgba(0, 0, 0, 0.1); +} + +#prvmail-wrapper:before, #prvmail-wrapper:after, .mail-conv-detail:before, .mail-conv-detail:after, .mail-list-detail:before, .mail-list-detail:after { + position: absolute; + width: 40%; + height: 10px; + content: ' '; + left: 12px; + bottom: 12px; + background: transparent; + -webkit-transform: skew(-5deg) rotate(-5deg); + -moz-transform: skew(-5deg) rotate(-5deg); + -ms-transform: skew(-5deg) rotate(-5deg); + -o-transform: skew(-5deg) rotate(-5deg); + transform: skew(-5deg) rotate(-5deg); + -webkit-box-shadow: 0 6px 12px rgba(0, 0, 0, 0.3); + -moz-box-shadow: 0 6px 12px rgba(0, 0, 0, 0.3); + box-shadow: 0 6px 12px rgba(0, 0, 0, 0.3); + z-index: -1; +} + +#prvmail-wrapper:after, .mail-conv-detail:after, .mail-list-detail:after { + left: auto; + right: 12px; + -webkit-transform: skew(5deg) rotate(5deg); + -moz-transform: skew(5deg) rotate(5deg); + -ms-transform: skew(5deg) rotate(5deg); + -o-transform: skew(5deg) rotate(5deg); + transform: skew(5deg) rotate(5deg); +} + +.prvmail-text { + width: 100%; +} + +#prvmail-form input + +#prvmail-subject { width: 490px;; padding-left: 10px; font-size: 1.1em; font-style: bold;} +#prvmail-subject .input{ + border: none !important ; +} + +#prvmail-subject-label { + font-variant:small-caps; +} + +#prvmail-to { + padding-left: 10px; +} +#prvmail-to-label { + font-variant:small-caps; +} + +#prvmail-message-label { + font-variant:small-caps; + font-size: 1em; +} + + +#prvmail-submit-wrapper { margin-top: 10px; } +#prvmail-submit { + float: right; + margin-top: 0px; + margin-right: 90px; +} + +#prvmail-upload { +margin-left: 90px; +} + +#prvmail-submit-wrapper > div { + margin-right: 5px; + float: left; +} + +.mail-list-outside-wrapper { + margin-top: 20px; +} + +.mail-list-sender { + float: left; + padding: 5px; + background-color: #efefef; + border: 2px dotted #eeeeee; + -moz-box-shadow: 3px 3px 4px #959494; + -webkit-box-shadow: 3px 3px 4px #959494; + box-shadow: 3px 3px 4px #959494; +} + +.mail-list-detail { + margin-left: 100px; + width: 300px; + min-height: 70px; + padding: 20px; + padding-top:10px; + border: 1px solid #dddddd; + } + +.mail-list-sender-name { + font-size: 1.1em; + display: inline; + font-variant:small-caps; +} + +.mail-list-date { + float: right; + clear: block; + display: inline; + font-size: 0.8em; + padding-left: 10px; + font-stretch:ultra-condensed; + font-variant:small-caps; +} + +.mail-list-subject { + clear: block; + font-size: 1.5em; + padding-top: 20px; + padding-right: 50px; +} + +.mail-list-delete-wrapper { float: left; margin-right:550px; } +.mail-list-outside-wrapper-end { + clear: both; +} + +.mail-conv-sender {float: left; margin: 0px 5px 5px 0px; } +.mail-conv-sender-photo { + width: 64px; + height: 64px; + padding: 5px; + background-color: #efefef; + border: 1px solid #dddddd; + -moz-box-shadow: 3px 3px 4px #959494; + -webkit-box-shadow: 3px 3px 4px #959494; + box-shadow: 3px 3px 4px #959494; +} + +.mail-conv-sender-name { float: left; font-variant:small-caps; font-style: bold; } +.mail-conv-date { float: right; font-variant:small-caps; } +.mail-conv-subject { clear: right; font-weight: bold; font-size: 1.2em } +.mail-conv-body { + clear: both; +} + +.mail-conv-detail { + width: 500px; + padding: 30px; + margin-left: 20px; + vertical-align: middle; + margin: auto; + border: 1px solid #dddddd; +} +.mail-conv-break { display: none; border: none;} +.mail-conv-delete-wrapper { margin-top: 5px; width: 650px; text-align: right; } + +/* ================= */ +/* = Notifications = */ +/* ================= */ + +#notification-show-hide-wrapper { + width: 160px; + -moz-box-shadow:inset 0px 1px 0px 0px #cfcfcf; + -webkit-box-shadow:inset 0px 1px 0px 0px #cfcfcf; + box-shadow:inset 0px 1px 0px 0px #cfcfcf; + background:-webkit-gradient( linear, left top, left bottom, color-stop(0.05, #bdbdbd), color-stop(1, #a2a2a2) ); + background:-moz-linear-gradient( center top, #bdbdbd 5%, #a2a2a2 100% ); + filter:progid:DXImageTransform.Microsoft.gradient(startColorstr='#bdbdbd', endColorstr='#a2a2a2'); + background-color:#bdbdbd; + -moz-border-radius:5px; + -webkit-border-radius:5px; + border-radius:5px; + padding: 5px 10px 5px 10px; + margin-right: 5px; + margin-top: 10px; + font-style: bold; + color: #efefef; + text-align: center; +} + +#notification-show-hide-wrapper:hover { + color: #efefef; + background:-webkit-gradient( linear, left top, left bottom, color-stop(0.05, #b20202), color-stop(1, #d60808) ); + background:-moz-linear-gradient( center top, #b20202 5%, #d60808 100% ); + filter:progid:DXImageTransform.Microsoft.gradient(startColorstr='#b20202', endColorstr='#d60808'); + background-color:#b20202; +} + +#notification-show-hide-wrapper:active { + background-color: #b20202; + position:relative; + top:1px; +} + +#notification-show-hide-wrapper a { + color: #efefef; +} + +/* ============ */ +/* = Contacts = */ +/* ============ */ + +#contacts-main { + margin-bottom: 10px; +} + +.view-contact-wrapper, +.contact-entry-wrapper { + float: left; + margin-right: 30px; + margin-bottom: 20px; + width: 88px; + height: 120px; + position: relative; +} + +.contact-entry-direction-wrapper {position: absolute; top: 20px;} +.contact-entry-edit-links { position: absolute; top: 60px; } +#contacts-show-hide-link { margin-bottom: 20px; margin-top: 10px; font-weight: bold;} +.contact-entry-photo { + padding: 3px; + background-color: #eeeeee; + border: 1px solid #dddddd; + -moz-box-shadow: 3px 3px 4px #959494; + -webkit-box-shadow: 3px 3px 4px #959494; + box-shadow: 3px 3px 4px #959494; +} + +.contact-entry-name { + width: 100px; + overflow: hidden; + font: #999; + font-size: 12px; + text-align:center; + font-variant:small-caps; + font-weight: bold; + margin-top:5px; +} + +.contact-entry-photo { + position: relative; +} + +.contact-entry-edit-links .icon { + border: 1px solid #babdb6; + -webkit-border-radius: 3px; + -moz-border-radius: 3px; + border-radius: 3px; + background-color: #ffffff; +} + +#contact-edit-banner-name { font-size: 1.5em; margin-left: 30px; font-variant: small-caps; } +#contact-edit-photo-wrapper {position: relative; float: left; padding: 20px;} +#contact-edit-direction-icon { position: absolute; top: 60px; left:0px;} +#contact-edit-nav-wrapper { margin-left: 210px; } +#contact-edit-links { float: left; margin-top: 23px; } +#contact-drop-links {/*position: absolute; top: 150px; left: 348px;*/} +#contact-edit-nav-wrapper .icon { + border: 1px solid #babdb6; + -webkit-border-radius: 3px; + -moz-border-radius: 3px; + border-radius: 3px; +} + +#contact-edit-nettype { + font-size: 1em; + font-variant: small-caps; + margin-left: 30px; + margin-bottom: 0px; + padding-bottom: 0px; +} + +#contact-edit-poll-wrapper { margin-left: 50px; width: 300px;} +#contact-edit-last-update-text { margin-bottom: 15px; padding-top: 20px; padding-left: 10px; font-size: 0.9em; max-width: 300px; } +#contact-edit-last-updated { font-weight: bold; } +#contact-edit-poll-text { display: inline; font-size: 0.9em; padding-left: 10px; } +#contact-edit-end { clear: both; margin-bottom: 65px;} + +#contact-edit-update-now { + width: 80px; + -moz-box-shadow:inset 0px 1px 0px 0px #cfcfcf; + -webkit-box-shadow:inset 0px 1px 0px 0px #cfcfcf; + box-shadow:inset 0px 1px 0px 0px #cfcfcf; + background:-webkit-gradient( linear, left top, left bottom, color-stop(0.05, #bdbdbd), color-stop(1, #a2a2a2) ); + background:-moz-linear-gradient( center top, #bdbdbd 5%, #a2a2a2 100% ); + filter:progid:DXImageTransform.Microsoft.gradient(startColorstr='#bdbdbd', endColorstr='#a2a2a2'); + background-color:#bdbdbd; + -moz-border-radius:5px; + -webkit-border-radius:5px; + border-radius:5px; + padding: 5px 10px 5px 10px; + margin-left: 125px; + margin-top: 10px; + font-style: bold; + color: #efefef; +} + +#contact-edit-update-now:hover { + color: #efefef; + background:-webkit-gradient( linear, left top, left bottom, color-stop(0.05, #b20202), color-stop(1, #d60808) ); + background:-moz-linear-gradient( center top, #b20202 5%, #d60808 100% ); + filter:progid:DXImageTransform.Microsoft.gradient(startColorstr='#b20202', endColorstr='#d60808'); + background-color:#b20202; +} + +#contact-edit-update-now:active { + background-color: #b20202; + position:relative; + top:1px; +} + +#contact-edit-update-now a { + color: #efefef; +} + + +#contact-edit-profile-select-text > p { + font-size: 1em; +} + +.contact-photo-menu-button { + position: absolute; + background-image: url("photo-menu.jpg"); + background-position: top left; + background-repeat: no-repeat; + margin: 0px; padding: 0px; + width: 16px; + height: 16px; + top: 64px; left:0px; + overflow: hidden; + text-indent: 40px; + display: none; +} + +#contact-edit-photo { + padding: 10px; + background-color: #f1f1f1; + border: 1px solid #dedede; + margin-bottom: 5px; + -moz-box-shadow: 5px 5px 8px #959494; + -webkit-box-shadow: 5px 5px 8px #959494; + box-shadow: 5px 5px 8px #959494; +} +.contact-photo-menu { + width: auto; + border: 1px solid #ddd; + background: #f1f1f1; + position: absolute; + left: 0px; top: 90px; + display: none; + z-index: 10000; + -moz-box-shadow: 3px 3px 5px #888; + -webkit-box-shadow: 3px 3px 5px #888; + box-shadow: 3px 3px 5px #888; +} + +.contact-photo-menu ul { margin:0px; padding: 0px; list-style: none } +.contact-photo-menu li a { display: block; padding: 3px; color: #626262; font-size: 1em; } +.contact-photo-menu li a:hover { + color: #FFFFFF; + background:-webkit-gradient( linear, left top, left bottom, color-stop(0.05, #b20202), color-stop(1, #d60808) ); + background:-moz-linear-gradient( center top, #b20202 5%, #d60808 100% ); + filter:progid:DXImageTransform.Microsoft.gradient(startColorstr='#b20202', endColorstr='#d60808'); + background-color:#b20202; + text-decoration: none; +} + +.view-contact-photo { + padding: 5px; + background-color: #efefef; + border: 1px solid #dddddd; + -moz-box-shadow: 3px 3px 4px #959494; + -webkit-box-shadow: 3px 3px 4px #959494; + box-shadow: 3px 3px 4px #959494; +} + +.view-contact-name { + font-variant: small-caps; +} + +#div.side-link { + background-color: #efefef; + padding: 10px; + margin-top:20px; +} + +#follow-sidebar { + margin-bottom: 20px; +} + +#follow-sidebar h3:before { + content: url("user.png"); + padding-right: 10px; + vertical-align: middle; +} + +#follow-sidebar input[type="text"] { + margin-left: 30px; + margin-bottom: 10px; +} + +#side-match-link { + width: 180px; + padding: 10px; + margin: auto; + margin-bottom: 20px; + -moz-box-shadow:inset 0px 1px 0px 0px #cfcfcf; + -webkit-box-shadow:inset 0px 1px 0px 0px #cfcfcf; + box-shadow:inset 0px 1px 0px 0px #cfcfcf; + background:-webkit-gradient( linear, left top, left bottom, color-stop(0.05, #bdbdbd), color-stop(1, #a2a2a2) ); + background:-moz-linear-gradient( center top, #bdbdbd 5%, #a2a2a2 100% ); + filter:progid:DXImageTransform.Microsoft.gradient(startColorstr='#bdbdbd', endColorstr='#a2a2a2'); + background-color:#bdbdbd; + -moz-border-radius:5px; + -webkit-border-radius:5px; + border-radius:5px; + padding: 5px 10px 5px 10px; + color: #efefef; + font-size: 1.2em; + text-align: center; +} + +#side-match-link:hover { + color: #efefef; + background:-webkit-gradient( linear, left top, left bottom, color-stop(0.05, #b20202), color-stop(1, #d60808) ); + background:-moz-linear-gradient( center top, #b20202 5%, #d60808 100% ); + filter:progid:DXImageTransform.Microsoft.gradient(startColorstr='#b20202', endColorstr='#d60808'); + background-color:#b20202; +} + +#side-match-link:active { + background-color: #b20202; + position:relative; + top:1px; +} + +#side-match-link a { + color: #efefef; +} + +#side-invite-link { + width: 180px; + padding: 10px; + margin: auto; + margin-bottom: 20px; + -moz-box-shadow:inset 0px 1px 0px 0px #cfcfcf; + -webkit-box-shadow:inset 0px 1px 0px 0px #cfcfcf; + box-shadow:inset 0px 1px 0px 0px #cfcfcf; + background:-webkit-gradient( linear, left top, left bottom, color-stop(0.05, #bdbdbd), color-stop(1, #a2a2a2) ); + background:-moz-linear-gradient( center top, #bdbdbd 5%, #a2a2a2 100% ); + filter:progid:DXImageTransform.Microsoft.gradient(startColorstr='#bdbdbd', endColorstr='#a2a2a2'); + background-color:#bdbdbd; + -moz-border-radius:5px; + -webkit-border-radius:5px; + border-radius:5px; + padding: 5px 10px 5px 10px; + color: #efefef; + font-size: 1.2em; + text-align: center; +} + +#side-invite-link:hover { + color: #efefef; + background:-webkit-gradient( linear, left top, left bottom, color-stop(0.05, #b20202), color-stop(1, #d60808) ); + background:-moz-linear-gradient( center top, #b20202 5%, #d60808 100% ); + filter:progid:DXImageTransform.Microsoft.gradient(startColorstr='#b20202', endColorstr='#d60808'); + background-color:#b20202; +} + +#side-invite-link:active { + background-color: #b20202; + position:relative; + top:1px; +} + +#side-invite-link a { + color: #efefef; +} + +#invite-message, #invite-recipients, #invite-recipient-text { + padding: 10px; +} + +#side-follow-wrapper{ + font-size: 1em; + font-weight: bold; + font-stretch:semi-expanded; + background-color: #f3f3f3; + border: 1px solid #cdcdcd; + padding: 10px; + margin-top: 20px; + -webkit-border-radius: 5px 5px 5px 5px; + -moz-border-radius: 5px 5px 5px 5px; + border-radius: 5px 5px 5px 5px; +} + +#side-follow-wrapper label{ + font-size: 1.1em; + font-variant: normal; +} + +#contact-view-recent { + float: left; + width: 150px; + padding: 10px; + margin-bottom: 20px; + -moz-box-shadow:inset 0px 1px 0px 0px #cfcfcf; + -webkit-box-shadow:inset 0px 1px 0px 0px #cfcfcf; + box-shadow:inset 0px 1px 0px 0px #cfcfcf; + background:-webkit-gradient( linear, left top, left bottom, color-stop(0.05, #bdbdbd), color-stop(1, #a2a2a2) ); + background:-moz-linear-gradient( center top, #bdbdbd 5%, #a2a2a2 100% ); + filter:progid:DXImageTransform.Microsoft.gradient(startColorstr='#bdbdbd', endColorstr='#a2a2a2'); + background-color:#bdbdbd; + -moz-border-radius:5px; + -webkit-border-radius:5px; + border-radius:5px; + padding: 5px 10px 5px 10px; + color: #efefef; + font-size: 1.2em; + text-align: center; +} + +#contact-view-recent:hover{ + color: #efefef; + background:-webkit-gradient( linear, left top, left bottom, color-stop(0.05, #b20202), color-stop(1, #d60808) ); + background:-moz-linear-gradient( center top, #b20202 5%, #d60808 100% ); + filter:progid:DXImageTransform.Microsoft.gradient(startColorstr='#b20202', endColorstr='#d60808'); + background-color:#b20202; +} + +#contact-view-recent:active { + background-color: #b20202; + position:relative; + top:1px; +} + +#contact-view-recent a { + color: #efefef; +} + +#contact-suggest { + float: left; + margin-left: 10px; + width: 120px; + padding: 10px; + margin-bottom: 20px; + -moz-box-shadow:inset 0px 1px 0px 0px #cfcfcf; + -webkit-box-shadow:inset 0px 1px 0px 0px #cfcfcf; + box-shadow:inset 0px 1px 0px 0px #cfcfcf; + background:-webkit-gradient( linear, left top, left bottom, color-stop(0.05, #bdbdbd), color-stop(1, #a2a2a2) ); + background:-moz-linear-gradient( center top, #bdbdbd 5%, #a2a2a2 100% ); + filter:progid:DXImageTransform.Microsoft.gradient(startColorstr='#bdbdbd', endColorstr='#a2a2a2'); + background-color:#bdbdbd; + -moz-border-radius:5px; + -webkit-border-radius:5px; + border-radius:5px; + padding: 5px 10px 5px 10px; + color: #efefef; + font-size: 1.2em; + text-align: center; +} + +#contact-suggest:hover { + color: #efefef; + background:-webkit-gradient( linear, left top, left bottom, color-stop(0.05, #b20202), color-stop(1, #d60808) ); + background:-moz-linear-gradient( center top, #b20202 5%, #d60808 100% ); + filter:progid:DXImageTransform.Microsoft.gradient(startColorstr='#b20202', endColorstr='#d60808'); + background-color:#b20202; +} + +#contact-suggest:active { + background-color: #b20202; + position:relative; + top:1px; +} + +#contact-suggest a { + color: #efefef; +} + +#contact-edit-info-wrapper { + clear: both; +} + +/* ===================================== */ +/* = Register, Settings, Profile Forms = */ +/* ===================================== */ + +#id_openid_url, +.openid { + background: url(login-bg.gif) no-repeat; + background-position: 0 50%; + padding-left: 18px; + width: 385px; +} + +#profile-tabs-wrapper { + padding-top: 10px; +} + +/*#profile-tab-status-link { + padding: 5px 10px 5px 10px; + margin-right: 5px; + margin-top: 10px; + font-style: bold; + -moz-box-shadow:inset 0px 1px 0px 0px #cfcfcf; + -webkit-box-shadow:inset 0px 1px 0px 0px #cfcfcf; + box-shadow:inset 0px 1px 0px 0px #cfcfcf; + background:-webkit-gradient( linear, left top, left bottom, color-stop(0.05, #bdbdbd), color-stop(1, #a2a2a2) ); + background:-moz-linear-gradient( center top, #bdbdbd 5%, #a2a2a2 100% ); + filter:progid:DXImageTransform.Microsoft.gradient(startColorstr='#bdbdbd', endColorstr='#a2a2a2'); + background-color:#bdbdbd; + -moz-border-radius:5px; + -webkit-border-radius:5px; + border-radius:5px; + color: #efefef; +}*/ + +#profile-tab-status-link:hover { + border: 0px; + padding: 5px 10px 5px 10px; + font-style: bold; + color: #efefef; + background:-webkit-gradient( linear, left top, left bottom, color-stop(0.05, #b20202), color-stop(1, #d60808) ); + background:-moz-linear-gradient( center top, #b20202 5%, #d60808 100% ); + filter:progid:DXImageTransform.Microsoft.gradient(startColorstr='#b20202', endColorstr='#d60808'); + background-color:#b20202; +} + +#profile-tab-status-link:active { + border: 0px; + padding: 5px 10px 5px 10px; + font-style: bold; + background-color: #b20202; + position:relative; + top:1px; +} + +#profile-tab-status-link a { + color: #efefef; +} + +#uexport-link a { + color: #efefef; +} + +#profile-tab-profile-link:hover { + border: 0px; + padding: 5px 10px 5px 10px; + font-style: bold; + color: #efefef; + background:-webkit-gradient( linear, left top, left bottom, color-stop(0.05, #b20202), color-stop(1, #d60808) ); + background:-moz-linear-gradient( center top, #b20202 5%, #d60808 100% ); + filter:progid:DXImageTransform.Microsoft.gradient(startColorstr='#b20202', endColorstr='#d60808'); + background-color:#b20202; +} + +#profile-tab-profile-link:active { + border: 0px; + padding: 5px 10px 5px 10px; + font-style: bold; + background-color: #b20202; + position:relative; + top:1px; +} + +#profile-tab-profile-link a { + color: #efefef; +} + +#uexport-link { + width: 140px; + -moz-box-shadow:inset 0px 1px 0px 0px #cfcfcf; + -webkit-box-shadow:inset 0px 1px 0px 0px #cfcfcf; + box-shadow:inset 0px 1px 0px 0px #cfcfcf; + background:-webkit-gradient( linear, left top, left bottom, color-stop(0.05, #7c7d7b), color-stop(1, #555753) ); + background:-moz-linear-gradient( center top, #7c7d7b 5%, #555753 100% ); + filter:progid:DXImageTransform.Microsoft.gradient(startColorstr='#7c7d7b', endColorstr='#555753'); + background-color:#7c7d7b; + -moz-border-radius:5px; + -webkit-border-radius:5px; + border-radius:5px; + padding: 5px 10px 5px 10px; + margin-bottom: 10px; +} + +#uexport-link:hover { + color: #efefef; + background:-webkit-gradient( linear, left top, left bottom, color-stop(0.05, #555753), color-stop(1, #7c7d7b) ); + background:-moz-linear-gradient( center top, #555753 5%, #7c7d7b 100% ); + filter:progid:DXImageTransform.Microsoft.gradient(startColorstr='#555753', endColorstr='#7c7d7b'); + background-color:#555753; +} + +#uexport-link:active { + color: #efefef; + background:-webkit-gradient( linear, left top, left bottom, color-stop(0.05, #b20202), color-stop(1, #d60808) ); + background:-moz-linear-gradient( center top, #b20202 5%, #d60808 100% ); + filter:progid:DXImageTransform.Microsoft.gradient(startColorstr='#b20202', endColorstr='#d60808'); + background-color:#b20202; + position:relative; + top:1px; +} + +#settings-default-perms { + width: 160px; + text-align: center; + -moz-box-shadow:inset 0px 1px 0px 0px #cfcfcf; + -webkit-box-shadow:inset 0px 1px 0px 0px #cfcfcf; + box-shadow:inset 0px 1px 0px 0px #cfcfcf; + background:-webkit-gradient( linear, left top, left bottom, color-stop(0.05, #7c7d7b), color-stop(1, #555753) ); + background:-moz-linear-gradient( center top, #7c7d7b 5%, #555753 100% ); + filter:progid:DXImageTransform.Microsoft.gradient(startColorstr='#7c7d7b', endColorstr='#555753'); + background-color:#7c7d7b; + -moz-border-radius:5px; + -webkit-border-radius:5px; + border-radius:5px; + padding: 5px 10px 5px 10px; + margin-bottom: 10px; +} + +#settings-default-perms .fakelink { + color: #efefef; +} + +#settings-default-perms:hover { + color: #efefef; + background:-webkit-gradient( linear, left top, left bottom, color-stop(0.05, #555753), color-stop(1, #7c7d7b) ); + background:-moz-linear-gradient( center top, #555753 5%, #7c7d7b 100% ); + filter:progid:DXImageTransform.Microsoft.gradient(startColorstr='#555753', endColorstr='#7c7d7b'); + background-color:#555753; +} + +#settings-default-perms:active { + color: #efefef; + background:-webkit-gradient( linear, left top, left bottom, color-stop(0.05, #b20202), color-stop(1, #d60808) ); + background:-moz-linear-gradient( center top, #b20202 5%, #d60808 100% ); + filter:progid:DXImageTransform.Microsoft.gradient(startColorstr='#b20202', endColorstr='#d60808'); + background-color:#b20202; + position:relative; + top:1px; +} + +#settings-nickname-desc { + width: 80%; + background-color: #efefef; + margin-bottom: 10px; + -webkit-border-radius: 5px; + -moz-border-radius: 5px; + border-radius: 5px; + padding: 5px; +} + +#register-form div, +#profile-edit-form div { + clear: both; +} + +#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; +} + +.settings-submit-wrapper, +.profile-edit-submit-wrapper { margin: 30px 0px;} +.profile-listing { float: left; clear: both; margin: 20px 20px 0px 0px} + +#profile-edit-links ul { margin: 20px 0px; padding: 0px; list-style: none; } + + +#register-sitename { display: inline; font-weight: bold;} + +/* ===================== */ +/* = Contacts Selector = */ +/* ===================== */ + +#group-edit-wrapper { + margin-bottom: 10px; +} + +#group-edit-name-wrapper { + margin-bottom: 0px; + display: inline; +} +#group-edit-submit-wrapper { + margin-bottom: 10px; + margin-right: 400px; + float: right; + display: inline; +} +#group-delete-icon-11 { position: absolute; left: 360px; top: 103px; } +#group-edit-desc { margin: 10px 0xp; } +#group-new-text {font-size: 1.1em;} +#group-members, +#prof-members { + width: 83%; + height: 200px; + overflow: auto; + border: none; + background-color: #f0edf0; + color: #555753; + border: 1px solid #ccc; + margin-bottom: 10px; + padding: 10px; +} + +#group-all-contacts, +#prof-all-contacts { + width: 83%; + height: 200px; + overflow: auto; + border: 1px solid #ccc; + background-color: #f0edf0; + padding: 10px; +} + +#group-members h3, +#group-all-contacts h3, +#prof-members h3, +#prof-all-contacts h3{ + color: #555753; + margin: 0px; + padding: 5px; +} + +#group-separator, +#prof-separator { display: none;} + +/* ========== */ +/* = Events = */ +/* ========== */ + +.clear { clear: both; } +.eventcal { + float: left; + font-size: 20px; + padding: 20px; +} + +.vevent { + position: relative; + width: 400px; + padding: 20px; + padding-top: 10px; + margin: 0 0px; + background-color: #fff; + -webkit-box-shadow: 0 0 4px rgba(0, 0, 0, 0.2), inset 0 0 50px rgba(0, 0, 0, 0.1); + -moz-box-shadow: 0 0 4px rgba(0, 0, 0, 0.2), inset 0 0 50px rgba(0, 0, 0, 0.1); + box-shadow: 0 0 5px rgba(0, 0, 0, 0.2), inset 0 0 50px rgba(0, 0, 0, 0.1); +} + +.vevent:before, .vevent:after { + position: absolute; + width: 40%; + height: 10px; + content: ' '; + left: 12px; + bottom: 12px; + background: transparent; + -webkit-transform: skew(-5deg) rotate(-5deg); + -moz-transform: skew(-5deg) rotate(-5deg); + -ms-transform: skew(-5deg) rotate(-5deg); + -o-transform: skew(-5deg) rotate(-5deg); + transform: skew(-5deg) rotate(-5deg); + -webkit-box-shadow: 0 6px 12px rgba(0, 0, 0, 0.3); + -moz-box-shadow: 0 6px 12px rgba(0, 0, 0, 0.3); + box-shadow: 0 6px 12px rgba(0, 0, 0, 0.3); + z-index: -1; +} + +.vevent:after { + left: auto; + right: 12px; + -webkit-transform: skew(5deg) rotate(5deg); + -moz-transform: skew(5deg) rotate(5deg); + -ms-transform: skew(5deg) rotate(5deg); + -o-transform: skew(5deg) rotate(5deg); + transform: skew(5deg) rotate(5deg); +} + +.vevent .event-description { + margin-left: 10px; + margin-right: 10px; + text-align:center; + font-size: 1.2em; + font-weight:bolder; +} + + .vevent .event-location{ + margin-left: 10px; + margin-right: 10px; + font-size: 1em; + font-style: oblique; + text-align: center; + +} + +.vevent .event-start, .vevent .event-end { + margin-left: 20px; + margin-right: 20px; + margin-bottom: 2px; + margin-top: 2px; + font-size: 0.9em; + font-variant: small-caps; + text-align: left; +} + +#new-event-link{ + width: 130px; + padding: 7px; + margin-bottom: 10px; + margin-left: 170px; ; + -moz-box-shadow:inset 0px 1px 0px 0px #cfcfcf; + -webkit-box-shadow:inset 0px 1px 0px 0px #cfcfcf; + box-shadow:inset 0px 1px 0px 0px #cfcfcf; + background:-webkit-gradient( linear, left top, left bottom, color-stop(0.05, #bdbdbd), color-stop(1, #a2a2a2) ); + background:-moz-linear-gradient( center top, #bdbdbd 5%, #a2a2a2 100% ); + filter:progid:DXImageTransform.Microsoft.gradient(startColorstr='#bdbdbd', endColorstr='#a2a2a2'); + background-color:#bdbdbd; + -moz-border-radius:5px; + -webkit-border-radius:5px; + border-radius:5px; + color: #efefef; +} + +#new-event-link:hover { + color: #efefef; + background:-webkit-gradient( linear, left top, left bottom, color-stop(0.05, #b20202), color-stop(1, #d60808) ); + background:-moz-linear-gradient( center top, #b20202 5%, #d60808 100% ); + filter:progid:DXImageTransform.Microsoft.gradient(startColorstr='#b20202', endColorstr='#d60808'); + background-color:#b20202; +} + +#new-event-link:active { + background-color: #b20202; + position:relative; + top:1px; +} + +#new-event-link a { + color: #efefef; + text-align: center; +} + +.edit-event-link, .plink-event-link { + float: left; + margin-top: 4px; + margin-right: 4px; + margin-bottom: 15px; +} + +.event-description:before { + content: url('calendar.png'); + margin-right: 15px; + vertical-align: middle; +} + +.event-start, .event-end { + margin-left: 10px; + width: 330px; +} + +.event-start .dtstart, .event-end .dtend { + float: right; +} + +.event-list-date { + color: #626262; + margin-bottom: 10px; + font-variant:small-caps; + font-stretch:condensed; +} + +.prevcal, .nextcal { + float: left; + margin-left: 32px; + margin-right: 32px; + margin-top: 64px; +} + +.event-calendar-end { + clear: both; +} + +.calendar { + font-family: Helvetica, Arial, sans-serif; + padding: 10px; + background-color: #f1f1f1; + border: 1px solid #dedede; + margin-bottom: 10px; + -moz-box-shadow: 5px 5px 8px #959494; + -webkit-box-shadow: 5px 5px 8px #959494; + box-shadow: 5px 5px 8px #959494; +} + +.calendar caption{ + background:-webkit-gradient( linear, left top, left bottom, color-stop(0.05, #d60808), color-stop(1, #b20202) ); + background:-moz-linear-gradient( center top, #d60808 5%, #b20202 100% ); + filter:progid:DXImageTransform.Microsoft.gradient(startColorstr='#d60808', endColorstr='#b20202'); + background-color: #b20202; + width: 300px; + padding: 10px; + color: #ffffff; + font-weight: bold; + text-align:center; + font-variant:small-caps; + -moz-box-shadow: 5px 2px 8px #959494; + -webkit-box-shadow: 5px 2px 8px #959494; + box-shadow: 5px 2px 8px #959494; +} + +tr { + border: 1px solid #eeeeee; +} + +.calendar td { + font-size: 14px; + text-align: center; + padding: 3px 0px; +} + +.calendar td > a { + background-color: #cdcdcd; + padding: 2px; + color: #000; +} + +.calendar th { + font-size: 16px; +} + +.today { + font-weight: bold; + text-align: center; + background-color: #b20202; + color: #fff; +} + +#event-start-text, +#event-finish-text { + margin-top: 10px; + margin-bottom: 5px; +} + +#event-nofinish-checkbox, +#event-nofinish-text, +#event-adjust-checkbox, +#event-adjust-text, +#event-share-checkbox { + float: left; +} + +#event-datetime-break { + margin-bottom: 10px; +} + +#event-nofinish-break, +#event-adjust-break, +#event-share-break { + clear: both; +} + +#event-desc-text, +#event-location-text { + margin-top: 10px; + margin-bottom: 5px; +} + +#event-submit { + margin-top: 10px; +} + +/* ============= */ +/* = Directory = */ +/* ============= */ + +.directory-item { + float: left; + margin: 50px 50px 0px 0px; + padding: 10px; + background-color: #f1f1f1; + border: 1px solid #dedede; + margin-bottom: 5px; + -moz-box-shadow: 5px 5px 8px #959494; + -webkit-box-shadow: 5px 5px 8px #959494; + box-shadow: 5px 5px 8px #959494; +} + +.directory-details { + font-size: 0.9em; + font-variant: small-caps; + width: 160px; +} + +.directory-name { + font-size: 1em; + font-variant: small-caps; + width: 150px; +} + +/* ========= */ +/* = Admin = */ +/* ========= */ + +#adminpage { + width: 80%; +} + +#pending-update { + float:right; + color: #ffffff; + font-weight: bold; + background-color: #FF0000; + padding: 0em 0.3em; +} + +.admin.linklist { + border: 0px; padding: 0px; +} + +.admin.link { + list-style-position: inside; + font-size: 1em; + padding: 3px; +} + +#adminpage dl { + clear: left; + margin-bottom: 2px; + padding-bottom: 2px; + border-bottom: 1px solid black; +} + +#adminpage dt { + width: 200px; + float: left; + font-weight: bold; +} + +#adminpage dd { + margin-left: 200px; +} +#adminpage h3 { + border-bottom: 1px solid #898989; + margin-bottom: 5px; + margin-top: 10px; +} + +#adminpage .submit { + clear:left; +} + +#adminpage #pluginslist { + margin: 0px; padding: 0px; +} + +#adminpage .plugin { + list-style: none; + display: block; + border: 1px solid #888888; + padding: 1em; + margin-bottom: 5px; + clear: left; +} + +#adminpage .toggleplugin { + float:left; + margin-right: 1em; +} + +#adminpage table {width:100%; border-bottom: 1p solid #000000; margin: 5px 0px;} +#adminpage table th { text-align: left;} +#adminpage td .icon { float: left;} +#adminpage table#users img { width: 16px; height: 16px; } +#adminpage table tr:hover { background-color: #eeeeee; } +#adminpage .selectall { text-align: right; } + +/* =============== */ +/* = Form Fields = */ +/* =============== */ + +.field { + margin-bottom: 5px; + padding-bottom: 10px; + overflow: auto; + width: 90%; +} + +.field label { + float: left; + width: 200px; +} + +.field input, +.field textarea { + width: 400px; +} +.field textarea { height: 100px; } +.field_help { + display: block; + margin-left: 100px; + color: #666666; +} + +.field .onoff { + float: left; + width: 80px; +} +.field .onoff a { + display: block; + border:1px solid #c1c1c1; + background-image:url("../../../images/onoff.jpg"); + background-repeat: no-repeat; + padding: 4px 2px 2px 2px; + height: 16px; + text-decoration: none; +} +.field .onoff .off { + border-color:#c1c1c1; + padding-left: 40px; + background-position: left center; + background-color: #cccccc; + color: #666666; + text-align: right; +} + +.field .onoff .on { + border-color:#c1c1c1; + padding-right: 40px; + background-position: right center; + background-color: #b20202; + color: #FFFFFF; + text-align: left; +} + +.hidden { display: none!important; } + +.field.radio .field_help { margin-left: 0px; } + +/* ========= */ +/* = Icons = */ +/* ========= */ + +.icon { + display: block; width: 20px; height: 20px; + background-image: url('icons.png'); +} +.starred { + background-image: url("star.png"); + repeat: no-repeat; +} +.unstarred { + background-image: url("premium.png"); + repeat: no-repeat; +} + + +.border { + border: 1px solid #c1c1c1; + -webkit-border-radius: 3px; + -moz-border-radius: 3px; + border-radius: 3px; +} + +.article { background-position: -50px 0px;} +.audio { background-position: -70px 0px;} +.block { background-position: -90px 0px;} +.drop { background-position: -110px 0px;} +.drophide { background-position: -130px 0px;} +.edit { background-position: -150px 0px;} +.camera { background-position: -170px 0px;} +.dislike { background-position: -190px 0px;} +.like { background-position: -210px 0px;} +.link { background-position: -230px 0px;} + +.globe { background-position: -50px -20px;} +.noglobe { background-position: -70px -20px;} +.no { background-position: -90px -20px;} +.pause { background-position: -110px -20px;} +.play { background-position: -130px -20px;} +.pencil { background-position: -150px -20px;} +.small-pencil { background-position: -170px -20px;} +.recycle { background-position: -190px -20px;} +.remote-link { background-position: -210px -20px;} +.share { background-position: -230px -20px;} + +.tools { background-position: -50px -40px;} +.lock { background-position: -70px -40px;} + +.unlock { + background-position: -90px -40px; + background-image: none; + width: 70px; + height: 20px; +} + +.sharePerms { + background-image: url(icons.png); + width: 20px; + height: 20px; + margin: 2px 0px 2px 3px; + display: block; +} + +.video { background-position: -110px -40px;} +.youtube { background-position: -130px -40px;} + +.attach { background-position: -190px -40px;} +.language { background-position: -210px -40px;} + + +.on { background-position: -50px -60px;} +.off { background-position: -70px -60px;} +.prev { background-position: -90px -60px;} +.next { background-position: -110px -60px;} + +.icon.dim { opacity: 0.3;filter:alpha(opacity=30); } + +.attachtype { + display: block; width: 20px; height: 23px; + background-image: url('../../../images/content-types.png'); +} + +.type-video { background-position: 0px 0px; } +.type-image { background-position: -20px 0px; } +.type-audio { background-position: -40px 0px; } +.type-text { background-position: -60px 0px; } +.type-unkn { background-position: -80px 0px; } + +/* ========== */ +/* = Footer = */ +/* ========== */ + +.cc-license { margin-top: 100px; font-size: 0.7em; } +footer { display: block; margin: 50px 20%; clear: both; } + +#profile-jot-text { + height: 20px; + color:#cccccc; + border: 1px solid #cccccc; +} + +/* ======= */ +/* = ACL = */ +/* ======= */ + +#photo-edit-perms-select, +#photos-upload-permissions-wrapper, +#profile-jot-acl-wrapper{ + display:block!important; +} + +#acl-wrapper { + width: 690px; + float:left; +} +#acl-search { + float:right; + background: #ffffff url("../../../images/search_18.png") no-repeat right center; + padding-right:20px; +} +#acl-showall { + float: left; + display: block; + font-size: 1em; + font-style: bold; + text-align: center; + padding: 3px; + margin-bottom: 5px; + background-color: #cccccc; + background-position: 7px 7px; + background-repeat: no-repeat; + padding: 5px; + -webkit-border-radius: 5px ; + -moz-border-radius: 5px; + border-radius: 5px; + color: #999999; +} +#acl-showall.selected { + color: #fff; + background-color: #b20202; +} + +#acl-list { + height: 210px; + border: 1px solid #cccccc; + background-color: #efefef; + clear: both; + margin-top: 30px; + overflow: auto; +} + +#acl-list-content { + margin-left: 20px; +} + +.acl-list-item { + display: block; + width: 150px; + height: 40px; + border: 1px solid #cccccc; + background-color: #fff; + margin: 5px; + float: left; + -moz-box-shadow: 2px 2px 3px #c1c1c1; + -webkit-box-shadow: 2px 2px 3px #c1c1c1; + box-shadow: 2px 2px 3px #c1c1c1; +} +.acl-list-item img{ + width:30px; + height: 30px; + float: left; + margin: 5px; +} + +.acl-list-item p { + color: #999; + height: 12px; + font-size: 0.7em; + margin: 0px; + padding: 2px 0px 1px; + overflow: hidden; +} + +.acl-list-item a { + font-size: 10px; + display: block; + float: left; + color: #efefef; + background-color: #898989; + background-position: 3px 3px; + background-repeat: no-repeat; + margin-right: 5px; + -webkit-border-radius: 2px ; + -moz-border-radius: 2px; + border-radius: 2px; + padding: 3px; +} + +#acl-wrapper a:hover { + text-decoration: none; + background-color:#b20202; +} + +.acl-button-show.selected { + color: #efefef; + background-color: #b20202; +} + +.acl-button-hide.selected { + color: #efefef; + background-color: #a2a2a2; +} + +.acl-list-item.groupshow { border-color: #b20202; } +.acl-list-item.grouphide { border-color: #a2a2a2; } + +/* ========================= */ +/* = Global Directory Link = */ +/* ========================= */ + +#global-directory-link { + width: 130px; + padding: 7px; + margin-bottom: 10px; + margin-left: 0px; + -moz-box-shadow:inset 0px 1px 0px 0px #cfcfcf; + -webkit-box-shadow:inset 0px 1px 0px 0px #cfcfcf; + box-shadow:inset 0px 1px 0px 0px #cfcfcf; + background:-webkit-gradient( linear, left top, left bottom, color-stop(0.05, #bdbdbd), color-stop(1, #a2a2a2) ); + background:-moz-linear-gradient( center top, #bdbdbd 5%, #a2a2a2 100% ); + filter:progid:DXImageTransform.Microsoft.gradient(startColorstr='#bdbdbd', endColorstr='#a2a2a2'); + background-color:#bdbdbd; + -moz-border-radius:5px; + -webkit-border-radius:5px; + border-radius:5px; + color: #efefef; + text-align: center; +} + +#global-directory-link:hover { + color: #efefef; + background:-webkit-gradient( linear, left top, left bottom, color-stop(0.05, #b20202), color-stop(1, #d60808) ); + background:-moz-linear-gradient( center top, #b20202 5%, #d60808 100% ); + filter:progid:DXImageTransform.Microsoft.gradient(startColorstr='#b20202', endColorstr='#d60808'); + background-color:#b20202; +} + +#global-directory-link:active { + background-color: #b20202; + position:relative; + top:1px; +} + +#global-directory-link a { + color: #efefef; +} + +#global-directory-link { + -webkit-padding-start: 0px; +} + +a.active { + background:-webkit-gradient( linear, left top, left bottom, color-stop(0.05, #b20202), color-stop(1, #d60808) ); + background:-moz-linear-gradient( center top, #b20202 5%, #d60808 100% ); + filter:progid:DXImageTransform.Microsoft.gradient(startColorstr='#b20202', endColorstr='#d60808'); + background-color:#b20202; + color:#efefef; + padding: 5px 10px 5px 10px; + margin-right: 5px; +} \ No newline at end of file diff --git a/view/theme/testbubble/user.png b/view/theme/testbubble/user.png new file mode 100644 index 0000000000..df899e7e08 Binary files /dev/null and b/view/theme/testbubble/user.png differ diff --git a/view/theme/testbubble/wall_item.tpl b/view/theme/testbubble/wall_item.tpl new file mode 100644 index 0000000000..b8af3685fc --- /dev/null +++ b/view/theme/testbubble/wall_item.tpl @@ -0,0 +1,51 @@ + +
    +
    +
    +
    + + $name + + menu +
    +
      + $item_photo_menu +
    +
    +
    +
    +
    {{ if $location }}$location {{ endif }}
    +
    +
    $lock
    +
    +
    $title
    +
    +
    $body
    +
    + +
    + $vote + $plink + $edpost + $star + $drop +
    + +
    + $name +
    $ago
    + +
    +
    +
    + +
    $dislike
    +
    + $comment +
    +
    + +
    + diff --git a/view/theme/testbubble/wallwall_item.tpl b/view/theme/testbubble/wallwall_item.tpl new file mode 100644 index 0000000000..4fe677ab4d --- /dev/null +++ b/view/theme/testbubble/wallwall_item.tpl @@ -0,0 +1,51 @@ +
    +
    +
    +
    + + $owner_name +
    +
    $wall
    +
    + + $name + menu +
    +
      + $item_photo_menu +
    +
    + +
    +
    +
    {{ if $location }}$location {{ endif }}
    +
    +
    $lock
    +
    + $vote + $plink + $edpost + $drop +
    +
    +
    $title
    +
    +
    $body
    +
    +
    + $name +
    $ago
    +
    +
    +
    + +
    $dislike
    +
    + $comment +
    +
    + +
    + diff --git a/view/xrd_host.tpl b/view/xrd_host.tpl index f1d9707d57..ee687ffa9d 100644 --- a/view/xrd_host.tpl +++ b/view/xrd_host.tpl @@ -9,4 +9,17 @@ + + + + + + + + diff --git a/view/xrd_person.tpl b/view/xrd_person.tpl index fd11ad600d..7373499bf5 100644 --- a/view/xrd_person.tpl +++ b/view/xrd_person.tpl @@ -5,6 +5,17 @@ $accturi $profile_url + + + + + +