Merge remote-tracking branch 'upstream/master'

This commit is contained in:
Michael Vogel 2013-05-17 08:08:34 +02:00
commit 03c489150c
1228 changed files with 21728 additions and 39859 deletions

104
boot.php
View file

@ -12,7 +12,7 @@ require_once('library/Mobile_Detect/Mobile_Detect.php');
require_once('include/features.php');
define ( 'FRIENDICA_PLATFORM', 'Friendica');
define ( 'FRIENDICA_VERSION', '3.1.1644' );
define ( 'FRIENDICA_VERSION', '3.1.1699' );
define ( 'DFRN_PROTOCOL_VERSION', '2.23' );
define ( 'DB_UPDATE_VERSION', 1163 );
define ( 'EOL', "<br />\r\n" );
@ -383,8 +383,13 @@ if(! class_exists('App')) {
'force_max_items' => 0,
'thread_allow' => true,
'stylesheet' => '',
'template_engine' => 'internal',
'template_engine' => 'smarty3',
);
// array of registered template engines ('name'=>'class name')
public $template_engines = array();
// array of instanced template engines ('name'=>'instance')
public $template_engine_instance = array();
private $ldelim = array(
'internal' => '',
@ -401,6 +406,7 @@ if(! class_exists('App')) {
private $db;
private $curl_code;
private $curl_content_type;
private $curl_headers;
private $cached_profile_image;
@ -417,6 +423,7 @@ if(! class_exists('App')) {
$this->performance["start"] = microtime(true);
$this->performance["database"] = 0;
$this->performance["network"] = 0;
$this->performance["file"] = 0;
$this->performance["rendering"] = 0;
$this->performance["parser"] = 0;
$this->performance["marktime"] = 0;
@ -538,6 +545,17 @@ if(! class_exists('App')) {
$mobile_detect = new Mobile_Detect();
$this->is_mobile = $mobile_detect->isMobile();
$this->is_tablet = $mobile_detect->isTablet();
/**
* register template engines
*/
$dc = get_declared_classes();
foreach ($dc as $k) {
if (in_array("ITemplateEngine", class_implements($k))){
$this->register_template_engine($k);
}
}
}
function get_basepath() {
@ -673,6 +691,14 @@ if(! class_exists('App')) {
return $this->curl_code;
}
function set_curl_content_type($content_type) {
$this->curl_content_type = $content_type;
}
function get_curl_content_type() {
return $this->curl_content_type;
}
function set_curl_headers($headers) {
$this->curl_headers = $headers;
}
@ -703,13 +729,64 @@ if(! class_exists('App')) {
return $this->cached_profile_image[$avatar_image];
}
/**
* register template engine class
* if $name is "", is used class static property $class::$name
* @param string $class
* @param string $name
*/
function register_template_engine($class, $name = '') {
if ($name===""){
$v = get_class_vars( $class );
if(x($v,"name")) $name = $v['name'];
}
if ($name===""){
echo "template engine <tt>$class</tt> cannot be registered without a name.\n";
killme();
}
$this->template_engines[$name] = $class;
}
/**
* return template engine instance. If $name is not defined,
* return engine defined by theme, or default
*
* @param strin $name Template engine name
* @return object Template Engine instance
*/
function template_engine($name = ''){
if ($name!=="") {
$template_engine = $name;
} else {
$template_engine = 'smarty3';
if (x($this->theme, 'template_engine')) {
$template_engine = $this->theme['template_engine'];
}
}
if (isset($this->template_engines[$template_engine])){
if(isset($this->template_engine_instance[$template_engine])){
return $this->template_engine_instance[$template_engine];
} else {
$class = $this->template_engines[$template_engine];
$obj = new $class;
$this->template_engine_instance[$template_engine] = $obj;
return $obj;
}
}
echo "template engine <tt>$template_engine</tt> is not registered!\n"; killme();
}
function get_template_engine() {
return $this->theme['template_engine'];
}
function set_template_engine($engine = 'internal') {
$this->theme['template_engine'] = 'internal';
function set_template_engine($engine = 'smarty3') {
$this->theme['template_engine'] = $engine;
/*
$this->theme['template_engine'] = 'smarty3';
switch($engine) {
case 'smarty3':
@ -719,13 +796,14 @@ if(! class_exists('App')) {
default:
break;
}
*/
}
function get_template_ldelim($engine = 'internal') {
function get_template_ldelim($engine = 'smarty3') {
return $this->ldelim[$engine];
}
function get_template_rdelim($engine = 'internal') {
function get_template_rdelim($engine = 'smarty3') {
return $this->rdelim[$engine];
}
@ -1878,6 +1956,13 @@ if(! function_exists('profile_tabs')){
'title' => t('Photo Albums'),
'id' => 'photo-tab',
),
array(
'label' => t('Videos'),
'url' => $a->get_baseurl() . '/videos/' . $nickname,
'sel' => ((!isset($tab)&&$a->argv[0]=='videos')?'active':''),
'title' => t('Videos'),
'id' => 'video-tab',
),
);
if ($is_owner){
@ -2021,10 +2106,7 @@ function random_digits($digits) {
function get_cachefile($file, $writemode = true) {
$cache = get_config("system","itemcache");
if ($cache == "")
return("");
if (!is_dir($cache))
if ((! $cache) || (! is_dir($cache)))
return("");
$subfolder = $cache."/".substr($file, 0, 2);

138
doc/BBCode.md Normal file
View file

@ -0,0 +1,138 @@
Friendica BBCode tags reference
========================
* [Home](help)
Inline
-----
<pre>[b]bold[/b]</pre> : <strong>bold</strong>
<pre>[i]italic[/i]</pre> : <em>italic</em>
<pre>[u]underlined[/u]</pre> : <u>underlined</u>
<pre>[s]strike[/s]</pre> : <strike>strike</strike>
<pre>[color=red]red[/color]</pre> : <span style="color: red;">red</span>
<pre>[url=http://www.friendica.com]Friendica[/url]</pre> : <a href="http://www.friendica.com" target="external-link">Friendica</a>
<pre>[img]http://friendica.com/sites/default/files/friendika-32.png[/img]</pre> : <img src="http://friendica.com/sites/default/files/friendika-32.png" alt="Immagine/foto">
<pre>[size=xx-small]small text[/size]</pre> : <span style="font-size: xx-small;">small text</span>
<pre>[size=xx-large]big text[/size]</pre> : <span style="font-size: xx-large;">big text</span>
<pre>[size=20]exact size[/size] (size can be any number, in pixel)</pre> : <span style="font-size: 20px;">exact size</span>
Block
-----
<pre>[code]code[/code]</pre>
<code>code</code>
<p style="clear:both;">&nbsp;</p>
<pre>[quote]quote[/quote]</pre>
<blockquote>quote</blockquote>
<p style="clear:both;">&nbsp;</p>
<pre>[quote=Author]Author? Me? No, no, no...[/quote]</pre>
<strong class="author">Author wrote:</strong><blockquote>Author? Me? No, no, no...</blockquote>
<p style="clear:both;">&nbsp;</p>
<pre>[center]centered text[/center]</pre>
<div style="text-align:center;">centered text</div>
<p style="clear:both;">&nbsp;</p>
**Table**
<pre>[table border=1]
[tr]
[th]Tables now[/th]
[/tr]
[tr]
[td]Have headers[/td]
[/tr]
[/table]</pre>
<table border="1"><tbody><tr><th>Tables now</th></tr><tr><td>Have headers</td></tr></tbody></table>
<p style="clear:both;">&nbsp;</p>
**List**
<pre>[list]
[*] First list element
[*] Second list element
[/list]</pre>
<ul class="listbullet" style="list-style-type: circle;">
<li> First list element<br>
</li>
<li> Second list element</li>
</ul>
[list] is equivalent to [ul] (unordered list).
[ol] can be used instead of [list] to show an ordered list:
<pre>[ol]
[*] First list element
[*] Second list element
[/ol]</pre>
<ul class="listdecimal" style="list-style-type: decimal;"><li> First list element<br></li><li> Second list element</li></ul>
For more options on ordered lists, you can define the style of numeration on [list] argument:
<pre>[list=1]</pre> : decimal
<pre>[list=i]</pre> : lover case roman
<pre>[list=I]</pre> : upper case roman
<pre>[list=a]</pre> : lover case alphabetic
<pre>[list=A] </pre> : upper case alphabetic
Embed
------
You can embed video, audio and more in a message.
<pre>[video]url[/video]</pre>
<pre>[audio]url[/audio]</pre>
Where *url* can be an url to youtube, vimeo, soundcloud, or other sites wich supports oembed or opengraph specifications.
*url* can be also full url to an ogg file. HTML5 tag will be used to show it.
<pre>[url]*url*[/url]</pre>
If *url* supports oembed or opengraph specifications the embedded object will be shown (eg, documents from scribd).
Page title with a link to *url* will be shown.
Special
-------
If you need to put literal bbcode in a message, [noparse], [nobb] or [pre] are used to escape bbcode:
<pre>[noparse][b]bold[/b][/noparse]</pre> : [b]bold[/b]

View file

@ -1,6 +1,7 @@
Friendica Developer Guide
===================
Here is how you can join us.
**Here is how you can join us.**
First, get yourself a working git package on the system where you will be
doing development.

View file

@ -3,10 +3,11 @@ Friendica Documentation and Resources
**Contents**
* Generell functions - first steps
* General functions - first steps
* [Account Basics](help/Account-Basics)
* [New User Quick Start](help/Quick-Start-guide)
* [Creating posts](help/Text_editor)
* [BBCode tag reference](help/BBCode)
* [Comment, sort and delete posts](help/Text_comment)
* [Profiles](help/Profiles)
* You and other user

View file

@ -1,4 +1,5 @@
Friendica Installation
===============
We've tried very hard to ensure that Friendica will run on commodity hosting platforms - such as those used to host Wordpress blogs and Drupal websites. But be aware that Friendica is more than a simple web application. It is a complex communications system which more closely resembles an email server than a web server. For reliability and performance, messages are delivered in the background and are queued for later delivery when sites are down. This kind of functionality requires a bit more of the host system than the typical blog. Not every PHP/MySQL hosting provider will be able to support Friendica. Many will. But **please** review the requirements and confirm these with your hosting provider prior to installation.
@ -41,6 +42,12 @@ you might have trouble getting everything to work.]
- and then you can pick up the latest changes at any time with
`git pull`
- make sure folder *view/smarty3* exists and is writable by webserver
`mkdir view/smarty3`
`chown 777 view/smarty3`
- For installing addons

View file

@ -1,4 +1,5 @@
**Friendica Addon/Plugin development**
Friendica Addon/Plugin development
==========================
Please see the sample addon 'randplace' for a working example of using some of these features. The facebook addon provides an example of integrating both "addon" and "module" functionality. Addons work by intercepting event hooks - which must be registered. Modules work by intercepting specific page requests (by URL path).
@ -51,7 +52,8 @@ currently being processed, and generally contains information that is being imme
processed or acted on that you can use, display, or alter. Remember to declare it with
'&' if you wish to alter it.
**Modules**
Modules
--------
Plugins/addons may also act as "modules" and intercept all page requests for a given URL path. In order for a plugin to act as a module it needs to define a function "plugin_name_module()" which takes no arguments and need not do anything.
@ -62,8 +64,29 @@ If this function exists, you will now receive all page requests for "http://my.w
Your module functions will often contain the function plugin_name_content(&$a), which defines and returns the page body content. They may also contain plugin_name_post(&$a) which is called before the _content function and typically handles the results of POST forms. You may also have plugin_name_init(&$a) which is called very early on and often does module initialisation.
Templates
----------
**Current hooks:**
If your plugin need some template, you can use Friendica template system. Friendica use [smarty3](http://www.smarty.net/) as template engine.
Put your tpl files in *templates/* subfolder of your plugin.
In your code, like in function plugin_name_content(), load template file and execute it passing needed values:
# load template file. first argument is the template name,
# second is the plugin path relative to friendica top folder
$tpl = get_markup_template('mytemplate.tpl', 'addon/plugin_name/');
# apply template. first argument is the loaded template,
# second an array of 'name'=>'values' to pass to template
$output = replace_macros($tpl,array(
'title' => 'My beautifull plugin',
));
See also wiki page [Quick Template Guide](https://github.com/friendica/friendica/wiki/Quick-Template-Guide)
Current hooks:
--------------
**'authenticate'** - called when a user attempts to login.
$b is an array

View file

@ -1,40 +1,110 @@
<style>
figure { border: 4px #eeeeee solid; }
figure img { padding: 2px; }
figure figcaption { background: #eeeeee; color: #444444; padding: 2px; font-style: italic;}
</style>
Creating posts
=================
===========
* [Home](help)
Here you can find an overview of the different ways to create and edit your post. <span style="color: red;">Attention: we've used the <b>"diabook"</b> theme. If you're using another theme, some of the icons may be different.</span>
Here you can find an overview of the different ways to create and edit your post.
<img src="doc/img/friendica_editor.png" width="538" height="218" alt="editor">
One click on "Share" text box on top of your Home or Network page, and the post editor shows up:
<i>The different icons</i>
<figure>
<img src="doc/img/friendica_editor.png" alt="default editor">
<figcaption>Default post editor, with default Friendica theme (duepuntozero)</figcaption>
</figure>
<img src="doc/img/camera.png" width="44" height="33" alt="editor" align="left" style="padding-bottom: 20px;"> This symbol is used to upload a picture from your computer. If you only want to add an adress (url), you can also use the "tree" icon at the upper part of the editor. After selecting an image, you'll see a thumbnail in the editor.
Post title is optional, you can set it clicking on "Set title".
Posts can optionally be in one or more categories. Write categories name separated by a comma to file your new post.
The Big Empty Textarea is where you write your new post.
You can simply enter your text there and click "Share" button, and your new post will be public on your profile page and shared to your contact.
If plain text is not so exciting to you, Friendica understands BBCode to spice up your posts: bold, italic, images, links, lists..
See [BBCode tags reference](help/BBCode) page to see all what you can do.
The icons under the text area are there to help you to write posts quickly:
<img src="doc/img/camera.png" width="32" height="32" alt="editor" align="left" style="padding-bottom: 20px;"> Upload a picture from your computer. The image will be uploaded and correct bbcode tag will be added to your post.
<p style="clear:both;"></p>
<img src="doc/img/paper_clip.png" width="44" height="33" alt="paper_clip" align="left"> This symbol is used to add files from your computer. There'll be no preview of the content.
<img src="doc/img/paper_clip.png" width="32" height="32" alt="paper_clip" align="left"> Add files from your computer. Same as picture, but for generic attachment to the post.
<p style="clear:both;"></p>
<img src="doc/img/chain.png" width="44" height="33" alt="chain" align="left"> This symbol is used to add a web address (url). You'll see a short preview of the website.
<img src="doc/img/chain.png" width="32" height="32" alt="chain" align="left"> Add a web address (url). Enter an url and Friendica will add to your post a link to the url and an excerpt from the web site, if possible
<p style="clear:both;"></p>
<img src="doc/img/video.png" width="44" height="33" alt="video" align="left"> This symbol is used to add a web address (url) of a video file. You'll see a small preview of the video.
<img src="doc/img/video.png" width="32" height="32" alt="video" align="left"> Add a video. Enter the url to a video (ogg) or to a video page on youtube or vimeo, and it will be embedded in your post
<p style="clear:both;"></p>
<img src="doc/img/mic.png" width="44" height="33" alt="mic" align="left"> This symbol is used to add a web address (url) of an audio file. You'll see a player in your completed post.
<img src="doc/img/mic.png" width="32" height="32" alt="mic" align="left"> Add an audio. Same as video, but for audio
<p style="clear:both;"></p>
<img src="doc/img/globe.png" width="44" height="33" alt="globe" align="left"> This symbol is used to add your geographic location. This location will be added into a Google Maps search. That's why a note like "New York" or "10004" is already enough.
<img src="doc/img/globe.png" width="32" height="32" alt="globe" align="left"> Set your geographic location. This location will be added into a Google Maps search. That's why a note like "New York" or "10004" is already enough.
<p style="clear:both;"></p>
**Symbols of other themes**
Those icons can change with themes. Some examples:
Cleanzero <img src="doc/img/editor_zero.png" alt="cleanzero.png" style="padding-left: 20px; vertical-align:middle;">
<table>
<tr>
<td>Darkbubble: </td>
<td><img src="doc/img/editor_darkbubble.png" alt="darkbubble.png" style="vertical-align:middle;"></td>
<td><i>(inkl. smoothly, testbubble)</i></td>
</tr>
<tr>
<td>Frost: </td>
<td><img src="doc/img/editor_frost.png" alt="frost.png" style="vertical-align:middle;"> </td>
<td>&nbsp;</td>
</tr>
<tr>
<td>Vier: </td>
<td><img src="doc/img/editor_vier.png" alt="vier.png" style="vertical-align:middle;"></td>
<td><i>(inkl. dispy)</i></td>
</tr>
</table>
<p style="clear:both;">&nbsp;</p>
<p style="clear:both;">&nbsp;</p>
<span style="padding-left: 10px; font-style:italic;">(incl. more "zero"-themes, comix, easterbunny, facepark, slackr </span>
**<img src="doc/img/lock.png" width="32" height="32" alt="lock icon" style="vertical-align:middle;"> The lock**
Darkbubble <img src="doc/img/editor_darkbubble.png" alt="darkbubble.png" style="padding-left: 14px; vertical-align:middle;"> <i>(inkl. smoothly, testbubble)</i>
The last button, the Lock, is the most important feature in Friendica. If the lock is open, your post will be public, and will shows up on your profile page when strangers visit it.
Frost <img src="doc/img/editor_frost.png" alt="frost.png" style="padding-left: 42px; vertical-align:middle;">
Click on it and the *Permission settings* window (aka "*Access Control Selector*" or "*ACL Selector*") pops up. There you can select who can see the post.
<figure>
<img src="doc/img/acl_win.png" alt="Permission settings window">
<figcaption>Permission settings window with some contact selected</figcaption>
</figure>
Click on "show" under contact name to hide the post to everyone but selected.
Click on "Visible to everybody" to make the post public again.
If you have defined some groups, you can check "show" for groups also. All contact in that group will see the post.
If you want to hide the post to one contact of a group selected for "show", click "don't show" under contact name.
Click again on "show" or "don't show" to switch it off.
You can search for contacts or groups with the search box.
See also [Group and Privacy](help/Groups-and-Privacy)
WYSIAWYG (What You See Is About What You Get)
--------------------------------------------------
Friendica can use TinyMCE as rich text editor. This way you can write beatifull post without the need to know [BBCode](help/BBCode).
By default, rich editor is disabled. You can enable it from Settings -> [Aditional features](settings/features) page, turn on Richtext Editor and click "Submit".
<figure>
<img src="doc/img/friendica_rich_editor.png" alt="default editor">
<figcaption>Rich editor, with default Friendica theme (duepuntozero)</figcaption>
</figure>
Vier <img src="doc/img/editor_vier.png" alt="vier.png" style="padding-left: 44px; vertical-align:middle;"> <i>(inkl. dispy)</i>

BIN
doc/img/acl_win.png Normal file

Binary file not shown.

After

Width:  |  Height:  |  Size: 54 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 828 B

After

Width:  |  Height:  |  Size: 895 B

Binary file not shown.

Before

Width:  |  Height:  |  Size: 709 B

After

Width:  |  Height:  |  Size: 356 B

Binary file not shown.

Before

Width:  |  Height:  |  Size: 15 KiB

After

Width:  |  Height:  |  Size: 7.8 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 9.7 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 1.8 KiB

After

Width:  |  Height:  |  Size: 806 B

BIN
doc/img/lock.png Normal file

Binary file not shown.

After

Width:  |  Height:  |  Size: 451 B

Binary file not shown.

Before

Width:  |  Height:  |  Size: 1,017 B

After

Width:  |  Height:  |  Size: 617 B

Binary file not shown.

Before

Width:  |  Height:  |  Size: 1.7 KiB

After

Width:  |  Height:  |  Size: 670 B

Binary file not shown.

Before

Width:  |  Height:  |  Size: 547 B

After

Width:  |  Height:  |  Size: 629 B

View file

@ -407,6 +407,10 @@ function bbcode($Text,$preserve_nl = false, $tryoembed = true, $simplehtml = fal
$Text = preg_replace("/\[url\=([$URLSearchString]*)\](.*?)\[\/url\]/ism", '<a href="$1" target="external-link">$2</a>', $Text);
//$Text = preg_replace("/\[url\=([$URLSearchString]*)\]([$URLSearchString]*)\[\/url\]/ism", '<a href="$1" target="_blank">$2</a>', $Text);
// Red compatibility, though the link can't be authenticated on Friendica
$Text = preg_replace("/\[zrl\=([$URLSearchString]*)\](.*?)\[\/zrl\]/ism", '<a href="$1" target="external-link">$2</a>', $Text);
// we may need to restrict this further if it picks up too many strays
// link acct:user@host to a webfinger profile redirector

View file

@ -377,6 +377,18 @@ function conversation(&$a, $items, $mode, $update, $preview = false) {
$page_writeable = false;
$live_update_div = '';
$arr_blocked = null;
if(local_user()) {
$str_blocked = get_pconfig(local_user(),'system','blocked');
if($str_blocked) {
$arr_blocked = explode(',',$str_blocked);
for($x = 0; $x < count($arr_blocked); $x ++)
$arr_blocked[$x] = trim($arr_blocked[$x]);
}
}
$previewing = (($preview) ? ' preview ' : '');
if($mode === 'network') {
@ -493,6 +505,19 @@ function conversation(&$a, $items, $mode, $update, $preview = false) {
$tpl = 'search_item.tpl';
foreach($items as $item) {
if($arr_blocked) {
$blocked = false;
foreach($arr_blocked as $b) {
if($b && link_compare($item['author-link'],$b)) {
$blocked = true;
break;
}
}
if($blocked)
continue;
}
$threadsid++;
$comment = '';
@ -691,6 +716,21 @@ function conversation(&$a, $items, $mode, $update, $preview = false) {
$threads = array();
foreach($items as $item) {
if($arr_blocked) {
$blocked = false;
foreach($arr_blocked as $b) {
if($b && link_compare($item['author-link'],$b)) {
$blocked = true;
break;
}
}
if($blocked)
continue;
}
// Can we put this after the visibility check?
like_puller($a,$item,$alike,'like');
like_puller($a,$item,$dlike,'dislike');

View file

@ -17,7 +17,7 @@ function notification($params) {
$product = FRIENDICA_PLATFORM;
$siteurl = $a->get_baseurl(true);
$thanks = t('Thank You,');
$sitename = get_config('config','sitename');
$sitename = $a->config['sitename'];
$site_admin = sprintf( t('%s Administrator'), $sitename);
$sender_name = $product;
@ -268,9 +268,15 @@ function notification($params) {
$datarray['type'] = $params['type'];
$datarray['verb'] = $params['verb'];
$datarray['otype'] = $params['otype'];
$datarray['abort'] = false;
call_hooks('enotify_store', $datarray);
if($datarray['abort']) {
pop_lang();
return;
}
// create notification entry in DB
$r = q("insert into notify (hash,name,url,photo,date,uid,link,parent,type,verb,otype)

View file

@ -1,9 +1,11 @@
<?php
require_once "object/TemplateEngine.php";
require_once("library/Smarty/libs/Smarty.class.php");
class FriendicaSmarty extends Smarty {
define('SMARTY3_TEMPLATE_FOLDER','templates');
class FriendicaSmarty extends Smarty {
public $filename;
function __construct() {
@ -14,10 +16,10 @@ class FriendicaSmarty extends Smarty {
// setTemplateDir can be set to an array, which Smarty will parse in order.
// The order is thus very important here
$template_dirs = array('theme' => "view/theme/$theme/smarty3/");
$template_dirs = array('theme' => "view/theme/$theme/".SMARTY3_TEMPLATE_FOLDER."/");
if( x($a->theme_info,"extends") )
$template_dirs = $template_dirs + array('extends' => "view/theme/".$a->theme_info["extends"]."/smarty3/");
$template_dirs = $template_dirs + array('base' => 'view/smarty3/');
$template_dirs = $template_dirs + array('extends' => "view/theme/".$a->theme_info["extends"]."/".SMARTY3_TEMPLATE_FOLDER."/");
$template_dirs = $template_dirs + array('base' => "view/".SMARTY3_TEMPLATE_FOLDER."/");
$this->setTemplateDir($template_dirs);
$this->setCompileDir('view/smarty3/compiled/');
@ -37,7 +39,40 @@ class FriendicaSmarty extends Smarty {
}
return $this->fetch('file:' . $this->filename);
}
}
class FriendicaSmartyEngine implements ITemplateEngine {
static $name ="smarty3";
public function __construct(){
if(!is_writable('view/smarty3/')){
echo "<b>ERROR:</b> folder <tt>view/smarty3/</tt> must be writable by webserver."; killme();
}
}
// ITemplateEngine interface
public function replace_macros($s, $r) {
$template = '';
if(gettype($s) === 'string') {
$template = $s;
$s = new FriendicaSmarty();
}
foreach($r as $key=>$value) {
if($key[0] === '$') {
$key = substr($key, 1);
}
$s->assign($key, $value);
}
return $s->parsed($template);
}
public function get_template_file($file, $root=''){
$a = get_app();
$template_file = get_template_file($a, SMARTY3_TEMPLATE_FOLDER.'/'.$file, $root);
$template = new FriendicaSmarty();
$template->filename = $template_file;
return $template;
}
}

View file

@ -294,7 +294,7 @@ function construct_activity_target($item) {
if(! function_exists('limit_body_size')) {
function limit_body_size($body) {
logger('limit_body_size: start', LOGGER_DEBUG);
// logger('limit_body_size: start', LOGGER_DEBUG);
$maxlen = get_max_import_size();
@ -1180,19 +1180,23 @@ function item_store($arr,$force_parent = false) {
);
}
tag_deliver($arr['uid'],$current_post);
$deleted = tag_deliver($arr['uid'],$current_post);
// Store the fresh generated item into the cache
$cachefile = get_cachefile($arr["guid"]."-".hash("md5", $arr['body']));
// current post can be deleted if is for a communuty page and no mention are
// in it.
if (!$deleted) {
// Store the fresh generated item into the cache
$cachefile = get_cachefile($arr["guid"]."-".hash("md5", $arr['body']));
if (($cachefile != '') AND !file_exists($cachefile)) {
$s = prepare_text($arr['body']);
$a = get_app();
$stamp1 = microtime(true);
file_put_contents($cachefile, $s);
$a->save_timestamp($stamp1, "file");
logger('item_store: put item '.$current_post.' into cachefile '.$cachefile);
}
if (($cachefile != '') AND !file_exists($cachefile)) {
$s = prepare_text($arr['body']);
$a = get_app();
$stamp1 = microtime(true);
file_put_contents($cachefile, $s);
$a->save_timestamp($stamp1, "file");
logger('item_store: put item '.$current_post.' into cachefile '.$cachefile);
}
$r = q('SELECT * FROM `item` WHERE id = %d', intval($current_post));
if (count($r) == 1) {
@ -1201,7 +1205,7 @@ function item_store($arr,$force_parent = false) {
else {
logger('item_store: new item not found in DB, id ' . $current_post);
}
}
return $current_post;
}
@ -1217,10 +1221,15 @@ function get_item_contact($item,$contacts) {
return false;
}
/**
* look for mention tags and setup a second delivery chain for forum/community posts if appropriate
* @param int $uid
* @param int $item_id
* @return bool true if item was deleted, else false
*/
function tag_deliver($uid,$item_id) {
// look for mention tags and setup a second delivery chain for forum/community posts if appropriate
//
$a = get_app();
@ -1262,8 +1271,21 @@ function tag_deliver($uid,$item_id) {
}
}
if(! $mention)
if(! $mention){
if ( ($community_page || $prvgroup) &&
(!$item['wall']) && (!$item['origin']) && ($item['id'] == $item['parent'])){
// mmh.. no mention.. community page or private group... no wall.. no origin.. top-post (not a comment)
// delete it!
logger("tag_deliver: no-mention top-level post to communuty or private group. delete.");
q("DELETE FROM item WHERE id = %d and uid = %d limit 1",
intval($item_id),
intval($uid)
);
return true;
}
return;
}
// send a notification

View file

@ -101,6 +101,7 @@ function fetch_url($url,$binary = false, &$redirects = 0, $timeout = 0, $accept_
}
$a->set_curl_code($http_code);
$a->set_curl_content_type($curl_info['content_type']);
$body = substr($s,strlen($header));
$a->set_curl_headers($header);
@ -818,12 +819,12 @@ function add_fcontact($arr,$update = false) {
}
function scale_external_images($s, $include_link = true, $scale_replace = false) {
function scale_external_images($srctext, $include_link = true, $scale_replace = false) {
$a = get_app();
// Picture addresses can contain special characters
$s = htmlspecialchars_decode($s);
$s = htmlspecialchars_decode($srctext);
$matches = null;
$c = preg_match_all('/\[img.*?\](.*?)\[\/img\]/ism',$s,$matches,PREG_SET_ORDER);
@ -845,7 +846,9 @@ function scale_external_images($s, $include_link = true, $scale_replace = false)
$scaled = str_replace($scale_replace[0], $scale_replace[1], $mtch[1]);
else
$scaled = $mtch[1];
$i = fetch_url($scaled);
$i = @fetch_url($scaled);
if(! $i)
return $srctext;
$cachefile = get_cachefile(hash("md5", $scaled));
if ($cachefile != '') {

View file

@ -1,5 +1,7 @@
<?php
require_once("dba.php");
/**
* translation support
*/

View file

@ -106,8 +106,10 @@ function create_tags_from_item($itemid) {
function create_tags_from_itemuri($itemuri, $uid) {
$messages = q("SELECT `id` FROM `item` WHERE uri ='%s' AND uid=%d", dbesc($itemuri), intval($uid));
foreach ($messages as $message)
create_tags_from_item($message["id"]);
if(count($messages)) {
foreach ($messages as $message)
create_tags_from_item($message["id"]);
}
}
function update_items() {

View file

@ -1,9 +1,11 @@
<?php
require_once 'object/TemplateEngine.php';
define("KEY_NOT_EXISTS", '^R_key_not_Exists^');
class Template {
class Template implements ITemplateEngine {
static $name ="internal";
var $r;
var $search;
var $replace;
@ -256,7 +258,8 @@ class Template {
return $s;
}
public function replace($s, $r) {
// TemplateEngine interface
public function replace_macros($s, $r) {
$this->r = $r;
// remove comments block
@ -276,12 +279,18 @@ class Template {
$count++;
$s = $this->var_replace($s);
}
return $s;
return template_unescape($s);
}
public function get_template_file($file, $root='') {
$a = get_app();
$template_file = get_template_file($a, $file, $root);
$content = file_get_contents($template_file);
return $content;
}
}
$t = new Template;
function template_escape($s) {

View file

@ -15,39 +15,20 @@ if(! function_exists('replace_macros')) {
/**
* This is our template processor
*
* @global Template $t
* @param string|FriendicaSmarty $s the string requiring macro substitution,
* or an instance of FriendicaSmarty
* @param array $r key value pairs (search => replace)
* @return string substituted string
*/
function replace_macros($s,$r) {
global $t;
$stamp1 = microtime(true);
$a = get_app();
if($a->theme['template_engine'] === 'smarty3') {
$template = '';
if(gettype($s) === 'string') {
$template = $s;
$s = new FriendicaSmarty();
}
foreach($r as $key=>$value) {
if($key[0] === '$') {
$key = substr($key, 1);
}
$s->assign($key, $value);
}
$output = $s->parsed($template);
}
else {
$r = $t->replace($s,$r);
$t = $a->template_engine();
$output = $t->replace_macros($s,$r);
$output = template_unescape($r);
}
$a = get_app();
$a->save_timestamp($stamp1, "rendering");
return $output;
@ -582,26 +563,13 @@ function get_markup_template($s, $root = '') {
$stamp1 = microtime(true);
$a = get_app();
if($a->theme['template_engine'] === 'smarty3') {
$template_file = get_template_file($a, 'smarty3/' . $s, $root);
$template = new FriendicaSmarty();
$template->filename = $template_file;
$a->save_timestamp($stamp1, "rendering");
return $template;
}
else {
$template_file = get_template_file($a, $s, $root);
$a->save_timestamp($stamp1, "rendering");
$stamp1 = microtime(true);
$content = file_get_contents($template_file);
$a->save_timestamp($stamp1, "file");
return $content;
}
$t = $a->template_engine();
$template = $t->get_template_file($s, $root);
$a->save_timestamp($stamp1, "file");
return $template;
}}
if(! function_exists("get_template_file")) {
@ -623,6 +591,8 @@ function get_template_file($a, $filename, $root = '') {
$template_file = "{$root}view/theme/$theme/$filename";
elseif (x($a->theme_info,"extends") && file_exists("{$root}view/theme/{$a->theme_info["extends"]}/$filename"))
$template_file = "{$root}view/theme/{$a->theme_info["extends"]}/$filename";
elseif (file_exists("{$root}/$filename"))
$template_file = "{$root}/$filename";
else
$template_file = "{$root}view/$filename";
@ -1315,18 +1285,49 @@ function prepare_body($item,$attach = false) {
return $s;
}
$as = '';
$vhead = false;
$arr = explode('[/attach],',$item['attach']);
if(count($arr)) {
$s .= '<div class="body-attach">';
$as .= '<div class="body-attach">';
foreach($arr as $r) {
$matches = false;
$icon = '';
$cnt = preg_match_all('|\[attach\]href=\"(.*?)\" length=\"(.*?)\" type=\"(.*?)\" title=\"(.*?)\"|',$r,$matches, PREG_SET_ORDER);
if($cnt) {
foreach($matches as $mtch) {
$filetype = strtolower(substr( $mtch[3], 0, strpos($mtch[3],'/') ));
$mime = $mtch[3];
if((local_user() == $item['uid']) && ($item['contact-id'] != $a->contact['id']) && ($item['network'] == NETWORK_DFRN))
$the_url = $a->get_baseurl() . '/redir/' . $item['contact-id'] . '?f=1&url=' . $mtch[1];
else
$the_url = $mtch[1];
if(strpos($mime, 'video') !== false) {
if(!$vhead) {
$vhead = true;
$a->page['htmlhead'] .= replace_macros(get_markup_template('videos_head.tpl'), array(
'$baseurl' => $a->get_baseurl(),
));
$a->page['end'] .= replace_macros(get_markup_template('videos_end.tpl'), array(
'$baseurl' => $a->get_baseurl(),
));
}
$id = end(explode('/', $the_url));
$as .= replace_macros(get_markup_template('video_top.tpl'), array(
'$video' => array(
'id' => $id,
'title' => t('View Video'),
'src' => $the_url,
'mime' => $mime,
),
));
}
$filetype = strtolower(substr( $mime, 0, strpos($mime,'/') ));
if($filetype) {
$filesubtype = strtolower(substr( $mtch[3], strpos($mtch[3],'/') + 1 ));
$filesubtype = strtolower(substr( $mime, strpos($mime,'/') + 1 ));
$filesubtype = str_replace('.', '-', $filesubtype);
}
else {
@ -1350,17 +1351,14 @@ function prepare_body($item,$attach = false) {
$title = ((strlen(trim($mtch[4]))) ? escape_tags(trim($mtch[4])) : escape_tags($mtch[1]));
$title .= ' ' . $mtch[2] . ' ' . t('bytes');
if((local_user() == $item['uid']) && ($item['contact-id'] != $a->contact['id']) && ($item['network'] == NETWORK_DFRN))
$the_url = $a->get_baseurl() . '/redir/' . $item['contact-id'] . '?f=1&url=' . $mtch[1];
else
$the_url = $mtch[1];
$s .= '<a href="' . strip_tags($the_url) . '" title="' . $title . '" class="attachlink" target="external-link" >' . $icon . '</a>';
$as .= '<a href="' . strip_tags($the_url) . '" title="' . $title . '" class="attachlink" target="external-link" >' . $icon . '</a>';
}
}
}
$s .= '<div class="clear"></div></div>';
$as .= '<div class="clear"></div></div>';
}
$s = $s . $as;
// Look for spoiler

View file

@ -1,4 +1,5 @@
<?php
/**
* import account file exported from mod/uexport
* args:
@ -8,242 +9,266 @@
require_once("include/Photo.php");
define("IMPORT_DEBUG", False);
function last_insert_id(){
global $db;
if (IMPORT_DEBUG) return 1;
if($db->mysqli){
$thedb = $db->getdb();
return $thedb->insert_id;
} else {
return mysql_insert_id();
}
}
function last_error(){
global $db;
return $db->error;
}
function db_import_assoc($table, $arr){
if (IMPORT_DEBUG) return true;
if (isset($arr['id'])) unset($arr['id']);
$cols = implode("`,`", array_map('dbesc', array_keys($arr)));
$vals = implode("','", array_map('dbesc', array_values($arr)));
$query = "INSERT INTO `$table` (`$cols`) VALUES ('$vals')";
logger("uimport: $query",LOGGER_TRACE);
return q($query);
}
function last_insert_id() {
global $db;
if (IMPORT_DEBUG)
return 1;
if ($db->mysqli) {
$thedb = $db->getdb();
return $thedb->insert_id;
} else {
return mysql_insert_id();
}
}
function last_error() {
global $db;
return $db->error;
}
/**
* Remove columns from array $arr that aren't in table $table
*
* @param string $table Table name
* @param array &$arr Column=>Value array from json (by ref)
*/
function check_cols($table, &$arr) {
$query = sprintf("SHOW COLUMNS IN `%s`", dbesc($table));
logger("uimport: $query", LOGGER_DEBUG);
$r = q($query);
$tcols = array();
// get a plain array of column names
foreach ($r as $tcol) {
$tcols[] = $tcol['Field'];
}
// remove inexistent columns
foreach ($arr as $icol => $ival) {
if (!in_array($icol, $tcols)) {
unset($arr[$icol]);
}
}
}
/**
* Import data into table $table
*
* @param string $table Table name
* @param array $arr Column=>Value array from json
*/
function db_import_assoc($table, $arr) {
if (isset($arr['id']))
unset($arr['id']);
check_cols($table, $arr);
$cols = implode("`,`", array_map('dbesc', array_keys($arr)));
$vals = implode("','", array_map('dbesc', array_values($arr)));
$query = "INSERT INTO `$table` (`$cols`) VALUES ('$vals')";
logger("uimport: $query", LOGGER_TRACE);
if (IMPORT_DEBUG)
return true;
return q($query);
}
function import_cleanup($newuid) {
q("DELETE FROM `user` WHERE uid = %d", $newuid);
q("DELETE FROM `contact` WHERE uid = %d", $newuid);
q("DELETE FROM `profile` WHERE uid = %d", $newuid);
q("DELETE FROM `photo` WHERE uid = %d", $newuid);
q("DELETE FROM `group` WHERE uid = %d", $newuid);
q("DELETE FROM `group_member` WHERE uid = %d", $newuid);
q("DELETE FROM `pconfig` WHERE uid = %d", $newuid);
q("DELETE FROM `user` WHERE uid = %d", $newuid);
q("DELETE FROM `contact` WHERE uid = %d", $newuid);
q("DELETE FROM `profile` WHERE uid = %d", $newuid);
q("DELETE FROM `photo` WHERE uid = %d", $newuid);
q("DELETE FROM `group` WHERE uid = %d", $newuid);
q("DELETE FROM `group_member` WHERE uid = %d", $newuid);
q("DELETE FROM `pconfig` WHERE uid = %d", $newuid);
}
function import_account(&$a, $file) {
logger("Start user import from ".$file['tmp_name']);
/*
STEPS
1. checks
2. replace old baseurl with new baseurl
3. import data (look at user id and contacts id)
4. archive non-dfrn contacts
5. send message to dfrn contacts
*/
logger("Start user import from " . $file['tmp_name']);
/*
STEPS
1. checks
2. replace old baseurl with new baseurl
3. import data (look at user id and contacts id)
4. archive non-dfrn contacts
5. send message to dfrn contacts
*/
$account = json_decode(file_get_contents($file['tmp_name']), true);
if ($account===null) {
notice(t("Error decoding account file"));
return;
}
$account = json_decode(file_get_contents($file['tmp_name']), true);
if ($account === null) {
notice(t("Error decoding account file"));
return;
}
if (!x($account, 'version')) {
notice(t("Error! No version data in file! This is not a Friendica account file?"));
return;
}
/*
// this is not required as we remove columns in json not in current db schema
if ($account['schema'] != DB_UPDATE_VERSION) {
notice(t("Error! I can't import this file: DB schema version is not compatible."));
return;
}
*/
if (!x($account, 'version')) {
notice(t("Error! No version data in file! This is not a Friendica account file?"));
return;
}
if ($account['schema'] != DB_UPDATE_VERSION) {
notice(t("Error! I can't import this file: DB schema version is not compatible."));
return;
}
// check for username
$r = q("SELECT uid FROM user WHERE nickname='%s'", $account['user']['nickname']);
if ($r===false) {
logger("uimport:check nickname : ERROR : ".last_error(), LOGGER_NORMAL);
if ($r === false) {
logger("uimport:check nickname : ERROR : " . last_error(), LOGGER_NORMAL);
notice(t('Error! Cannot check nickname'));
return;
}
if (count($r)>0) {
notice(sprintf(t("User '%s' already exists on this server!"),$account['user']['nickname']));
if (count($r) > 0) {
notice(sprintf(t("User '%s' already exists on this server!"), $account['user']['nickname']));
return;
}
$oldbaseurl = $account['baseurl'];
$newbaseurl = $a->get_baseurl();
$olduid = $account['user']['uid'];
unset($account['user']['uid']);
foreach($account['user'] as $k => &$v) {
$v = str_replace($oldbaseurl, $newbaseurl, $v);
}
$oldbaseurl = $account['baseurl'];
$newbaseurl = $a->get_baseurl();
$olduid = $account['user']['uid'];
// import user
$r = db_import_assoc('user', $account['user']);
if ($r===false) {
//echo "<pre>"; var_dump($r, $query, mysql_error()); killme();
logger("uimport:insert user : ERROR : ".last_error(), LOGGER_NORMAL);
notice(t("User creation error"));
return;
}
$newuid = last_insert_id();
//~ $newuid = 1;
unset($account['user']['uid']);
foreach ($account['user'] as $k => &$v) {
$v = str_replace($oldbaseurl, $newbaseurl, $v);
}
foreach($account['profile'] as &$profile) {
foreach($profile as $k=>&$v) {
$v = str_replace($oldbaseurl, $newbaseurl, $v);
foreach(array("profile","avatar") as $k)
$v = str_replace($newbaseurl."/photo/".$k."/".$olduid.".jpg", $newbaseurl."/photo/".$k."/".$newuid.".jpg", $v);
}
$profile['uid'] = $newuid;
$r = db_import_assoc('profile', $profile);
if ($r===false) {
logger("uimport:insert profile ".$profile['profile-name']." : ERROR : ".last_error(), LOGGER_NORMAL);
info(t("User profile creation error"));
import_cleanup($newuid);
return;
}
}
$errorcount=0;
foreach($account['contact'] as &$contact) {
if ($contact['uid'] == $olduid && $contact['self'] == '1'){
foreach($contact as $k=>&$v) {
$v = str_replace($oldbaseurl, $newbaseurl, $v);
foreach(array("profile","avatar","micro") as $k)
$v = str_replace($newbaseurl."/photo/".$k."/".$olduid.".jpg", $newbaseurl."/photo/".$k."/".$newuid.".jpg", $v);
}
}
if ($contact['uid'] == $olduid && $contact['self'] == '0') {
switch ($contact['network']){
case NETWORK_DFRN:
// send relocate message (below)
break;
case NETWORK_ZOT:
// TODO handle zot network
break;
case NETWORK_MAIL2:
// TODO ?
break;
case NETWORK_FEED:
case NETWORK_MAIL:
// Nothing to do
break;
default:
// archive other contacts
$contact['archive'] = "1";
}
}
$contact['uid'] = $newuid;
$r = db_import_assoc('contact', $contact);
if ($r===false) {
logger("uimport:insert contact ".$contact['nick'].",".$contact['network']." : ERROR : ".last_error(), LOGGER_NORMAL);
$errorcount++;
} else {
$contact['newid'] = last_insert_id();
}
}
if ($errorcount>0) {
notice( sprintf(tt("%d contact not imported", "%d contacts not imported", $errorcount), $errorcount) );
}
foreach($account['group'] as &$group) {
$group['uid'] = $newuid;
$r = db_import_assoc('group', $group);
if ($r===false) {
logger("uimport:insert group ".$group['name']." : ERROR : ".last_error(), LOGGER_NORMAL);
} else {
$group['newid'] = last_insert_id();
}
}
foreach($account['group_member'] as &$group_member) {
$group_member['uid'] = $newuid;
$import = 0;
foreach($account['group'] as $group) {
if ($group['id'] == $group_member['gid'] && isset($group['newid'])) {
$group_member['gid'] = $group['newid'];
$import++;
break;
}
}
foreach($account['contact'] as $contact) {
if ($contact['id'] == $group_member['contact-id'] && isset($contact['newid'])) {
$group_member['contact-id'] = $contact['newid'];
$import++;
break;
}
}
if ($import==2) {
$r = db_import_assoc('group_member', $group_member);
if ($r===false) {
logger("uimport:insert group member ".$group_member['id']." : ERROR : ".last_error(), LOGGER_NORMAL);
}
}
}
// import user
$r = db_import_assoc('user', $account['user']);
if ($r === false) {
//echo "<pre>"; var_dump($r, $query, mysql_error()); killme();
logger("uimport:insert user : ERROR : " . last_error(), LOGGER_NORMAL);
notice(t("User creation error"));
return;
}
$newuid = last_insert_id();
//~ $newuid = 1;
foreach($account['photo'] as &$photo) {
$photo['uid'] = $newuid;
$photo['data'] = hex2bin($photo['data']);
$p = new Photo($photo['data'], $photo['type']);
$r = $p->store(
$photo['uid'],
$photo['contact-id'], //0
$photo['resource-id'],
$photo['filename'],
$photo['album'],
$photo['scale'],
$photo['profile'], //1
$photo['allow_cid'],
$photo['allow_gid'],
$photo['deny_cid'],
$photo['deny_gid']
);
if ($r===false) {
logger("uimport:insert photo ".$photo['resource-id'].",". $photo['scale']. " : ERROR : ".last_error(), LOGGER_NORMAL);
}
}
foreach($account['pconfig'] as &$pconfig) {
$pconfig['uid'] = $newuid;
$r = db_import_assoc('pconfig', $pconfig);
if ($r===false) {
logger("uimport:insert pconfig ".$pconfig['id']. " : ERROR : ".last_error(), LOGGER_NORMAL);
}
}
// send relocate messages
proc_run('php', 'include/notifier.php', 'relocate' , $newuid);
info(t("Done. You can now login with your username and password"));
goaway( $a->get_baseurl() ."/login");
foreach ($account['profile'] as &$profile) {
foreach ($profile as $k => &$v) {
$v = str_replace($oldbaseurl, $newbaseurl, $v);
foreach (array("profile", "avatar") as $k)
$v = str_replace($newbaseurl . "/photo/" . $k . "/" . $olduid . ".jpg", $newbaseurl . "/photo/" . $k . "/" . $newuid . ".jpg", $v);
}
$profile['uid'] = $newuid;
$r = db_import_assoc('profile', $profile);
if ($r === false) {
logger("uimport:insert profile " . $profile['profile-name'] . " : ERROR : " . last_error(), LOGGER_NORMAL);
info(t("User profile creation error"));
import_cleanup($newuid);
return;
}
}
$errorcount = 0;
foreach ($account['contact'] as &$contact) {
if ($contact['uid'] == $olduid && $contact['self'] == '1') {
foreach ($contact as $k => &$v) {
$v = str_replace($oldbaseurl, $newbaseurl, $v);
foreach (array("profile", "avatar", "micro") as $k)
$v = str_replace($newbaseurl . "/photo/" . $k . "/" . $olduid . ".jpg", $newbaseurl . "/photo/" . $k . "/" . $newuid . ".jpg", $v);
}
}
if ($contact['uid'] == $olduid && $contact['self'] == '0') {
switch ($contact['network']) {
case NETWORK_DFRN:
// send relocate message (below)
break;
case NETWORK_ZOT:
// TODO handle zot network
break;
case NETWORK_MAIL2:
// TODO ?
break;
case NETWORK_FEED:
case NETWORK_MAIL:
// Nothing to do
break;
default:
// archive other contacts
$contact['archive'] = "1";
}
}
$contact['uid'] = $newuid;
$r = db_import_assoc('contact', $contact);
if ($r === false) {
logger("uimport:insert contact " . $contact['nick'] . "," . $contact['network'] . " : ERROR : " . last_error(), LOGGER_NORMAL);
$errorcount++;
} else {
$contact['newid'] = last_insert_id();
}
}
if ($errorcount > 0) {
notice(sprintf(tt("%d contact not imported", "%d contacts not imported", $errorcount), $errorcount));
}
foreach ($account['group'] as &$group) {
$group['uid'] = $newuid;
$r = db_import_assoc('group', $group);
if ($r === false) {
logger("uimport:insert group " . $group['name'] . " : ERROR : " . last_error(), LOGGER_NORMAL);
} else {
$group['newid'] = last_insert_id();
}
}
foreach ($account['group_member'] as &$group_member) {
$group_member['uid'] = $newuid;
$import = 0;
foreach ($account['group'] as $group) {
if ($group['id'] == $group_member['gid'] && isset($group['newid'])) {
$group_member['gid'] = $group['newid'];
$import++;
break;
}
}
foreach ($account['contact'] as $contact) {
if ($contact['id'] == $group_member['contact-id'] && isset($contact['newid'])) {
$group_member['contact-id'] = $contact['newid'];
$import++;
break;
}
}
if ($import == 2) {
$r = db_import_assoc('group_member', $group_member);
if ($r === false) {
logger("uimport:insert group member " . $group_member['id'] . " : ERROR : " . last_error(), LOGGER_NORMAL);
}
}
}
foreach ($account['photo'] as &$photo) {
$photo['uid'] = $newuid;
$photo['data'] = hex2bin($photo['data']);
$p = new Photo($photo['data'], $photo['type']);
$r = $p->store(
$photo['uid'], $photo['contact-id'], //0
$photo['resource-id'], $photo['filename'], $photo['album'], $photo['scale'], $photo['profile'], //1
$photo['allow_cid'], $photo['allow_gid'], $photo['deny_cid'], $photo['deny_gid']
);
if ($r === false) {
logger("uimport:insert photo " . $photo['resource-id'] . "," . $photo['scale'] . " : ERROR : " . last_error(), LOGGER_NORMAL);
}
}
foreach ($account['pconfig'] as &$pconfig) {
$pconfig['uid'] = $newuid;
$r = db_import_assoc('pconfig', $pconfig);
if ($r === false) {
logger("uimport:insert pconfig " . $pconfig['id'] . " : ERROR : " . last_error(), LOGGER_NORMAL);
}
}
// send relocate messages
proc_run('php', 'include/notifier.php', 'relocate', $newuid);
info(t("Done. You can now login with your username and password"));
goaway($a->get_baseurl() . "/login");
}

View file

@ -188,7 +188,11 @@
$("img[data-src]", nnm).each(function(i, el){
// Add src attribute for images with a data-src attribute
$(el).attr('src', $(el).data("src"));
// However, don't bother if the data-src attribute is empty, because
// an empty "src" tag for an image will cause some browsers
// to prefetch the root page of the Friendica hub, which will
// unnecessarily load an entire profile/ or network/ page
if($(el).data("src") != '') $(el).attr('src', $(el).data("src"));
});
}
@ -381,6 +385,9 @@
}
/* autocomplete @nicknames */
$(".comment-edit-form textarea").contact_autocomplete(baseurl+"/acl");
// setup videos, since VideoJS won't take care of any loaded via AJAX
if(typeof videojs != 'undefined') videojs.autoSetup();
});
}

2
js/main.min.js vendored

File diff suppressed because one or more lines are too long

View file

@ -3,8 +3,10 @@
/* Generic exception class
*/
class OAuthException extends Exception {
// pass
if (!class_exists('OAuthException')) {
class OAuthException extends Exception {
// pass
}
}
class OAuthConsumer {

View file

@ -0,0 +1,41 @@
WEBVTT
00:00.700 --> 00:04.110
Captions describe all relevant audio for the hearing impaired.
[ Heroic music playing for a seagull ]
00:04.500 --> 00:05.000
[ Splash!!! ]
00:05.100 --> 00:06.000
[ Sploosh!!! ]
00:08.000 --> 00:09.225
[ Splash...splash...splash splash splash ]
00:10.525 --> 00:11.255
[ Splash, Sploosh again ]
00:13.500 --> 00:14.984
Dolphin: eeeEEEEEeeee!
00:14.984 --> 00:16.984
Dolphin: Squawk! eeeEEE?
00:25.000 --> 00:28.284
[ A whole ton of splashes ]
00:29.500 --> 00:31.000
Mine. Mine. Mine.
00:34.300 --> 00:36.000
Shark: Chomp
00:36.800 --> 00:37.900
Shark: CHOMP!!!
00:37.861 --> 00:41.193
EEEEEEOOOOOOOOOOWHALENOISE
00:42.593 --> 00:45.611
[ BIG SPLASH ]

View file

@ -0,0 +1,30 @@
<!DOCTYPE html>
<html>
<head>
<title>Video.js | HTML5 Video Player</title>
<!-- Chang URLs to wherever Video.js files will be hosted -->
<link href="video-js.css" rel="stylesheet" type="text/css">
<!-- video.js must be in the <head> for older IEs to work. -->
<script src="video.js"></script>
<!-- Unless using the CDN hosted version, update the URL to the Flash SWF -->
<script>
_V_.options.flash.swf = "video-js.swf";
</script>
</head>
<body>
<video id="example_video_1" class="video-js vjs-default-skin" controls preload="none" width="640" height="264"
poster="http://video-js.zencoder.com/oceans-clip.png"
data-setup="{}">
<source src="http://video-js.zencoder.com/oceans-clip.mp4" type='video/mp4' />
<source src="http://video-js.zencoder.com/oceans-clip.webm" type='video/webm' />
<source src="http://video-js.zencoder.com/oceans-clip.ogv" type='video/ogg' />
<track kind="captions" src="demo.captions.vtt" srclang="en" label="English" />
</video>
</body>
</html>

Binary file not shown.

View file

@ -0,0 +1,40 @@
<?xml version="1.0" standalone="no"?>
<!DOCTYPE svg PUBLIC "-//W3C//DTD SVG 1.1//EN" "http://www.w3.org/Graphics/SVG/1.1/DTD/svg11.dtd" >
<svg xmlns="http://www.w3.org/2000/svg">
<metadata>
This is a custom SVG font generated by IcoMoon.
<iconset grid="16"></iconset>
</metadata>
<defs>
<font id="VideoJS" horiz-adv-x="512" >
<font-face units-per-em="512" ascent="480" descent="-32" />
<missing-glyph horiz-adv-x="512" />
<glyph unicode="&#xe000;" d="M 512.00,480.00 L 512.00,272.00 L 432.00,352.00 L 336.00,256.00 L 288.00,304.00 L 384.00,400.00 L 304.00,480.00 ZM 224.00,144.00 L 128.00,48.00 L 208.00-32.00 L 0.00-32.00 L 0.00,176.00 L 80.00,96.00 L 176.00,192.00 Z" />
<glyph unicode="&#xe001;" d="M 96.00,416.00L 416.00,224.00L 96.00,32.00 z" />
<glyph unicode="&#xe002;" d="M 64.00,416.00L 224.00,416.00L 224.00,32.00L 64.00,32.00zM 288.00,416.00L 448.00,416.00L 448.00,32.00L 288.00,32.00z" />
<glyph unicode="&#xe003;" d="M 200.666,440.666 C 213.50,453.50 224.00,449.15 224.00,431.00 L 224.00,17.00 C 224.00-1.15 213.50-5.499 200.666,7.335 L 80.00,128.00 L 0.00,128.00 L 0.00,320.00 L 80.00,320.00 L 200.666,440.666 Z" />
<glyph unicode="&#xe004;" d="M 274.51,109.49c-6.143,0.00-12.284,2.343-16.971,7.029c-9.373,9.373-9.373,24.568,0.00,33.941
c 40.55,40.55, 40.55,106.529,0.00,147.078c-9.373,9.373-9.373,24.569,0.00,33.941c 9.373,9.372, 24.568,9.372, 33.941,0.00
c 59.265-59.265, 59.265-155.696,0.00-214.961C 286.794,111.833, 280.652,109.49, 274.51,109.49zM 200.666,440.666 C 213.50,453.50 224.00,449.15 224.00,431.00 L 224.00,17.00 C 224.00-1.15 213.50-5.499 200.666,7.335 L 80.00,128.00 L 0.00,128.00 L 0.00,320.00 L 80.00,320.00 L 200.666,440.666 Z" />
<glyph unicode="&#xe005;" d="M 359.765,64.235c-6.143,0.00-12.284,2.343-16.971,7.029c-9.372,9.372-9.372,24.568,0.00,33.941
c 65.503,65.503, 65.503,172.085,0.00,237.588c-9.372,9.373-9.372,24.569,0.00,33.941c 9.372,9.371, 24.569,9.372, 33.941,0.00
C 417.532,335.938, 440.00,281.696, 440.00,224.00c0.00-57.695-22.468-111.938-63.265-152.735C 372.049,66.578, 365.907,64.235, 359.765,64.235zM 274.51,109.49c-6.143,0.00-12.284,2.343-16.971,7.029c-9.373,9.373-9.373,24.568,0.00,33.941
c 40.55,40.55, 40.55,106.529,0.00,147.078c-9.373,9.373-9.373,24.569,0.00,33.941c 9.373,9.372, 24.568,9.372, 33.941,0.00
c 59.265-59.265, 59.265-155.696,0.00-214.961C 286.794,111.833, 280.652,109.49, 274.51,109.49zM 200.666,440.666 C 213.50,453.50 224.00,449.15 224.00,431.00 L 224.00,17.00 C 224.00-1.15 213.50-5.499 200.666,7.335 L 80.00,128.00 L 0.00,128.00 L 0.00,320.00 L 80.00,320.00 L 200.666,440.666 Z" />
<glyph unicode="&#xe006;" d="M 445.02,18.98c-6.143,0.00-12.284,2.343-16.971,7.029c-9.372,9.373-9.372,24.568,0.00,33.941
C 471.868,103.771, 496.001,162.03, 496.001,224.00c0.00,61.969-24.133,120.229-67.952,164.049c-9.372,9.373-9.372,24.569,0.00,33.941
c 9.372,9.372, 24.569,9.372, 33.941,0.00c 52.885-52.886, 82.011-123.20, 82.011-197.99c0.00-74.791-29.126-145.104-82.011-197.99
C 457.304,21.323, 451.162,18.98, 445.02,18.98zM 359.765,64.235c-6.143,0.00-12.284,2.343-16.971,7.029c-9.372,9.372-9.372,24.568,0.00,33.941
c 65.503,65.503, 65.503,172.085,0.00,237.588c-9.372,9.373-9.372,24.569,0.00,33.941c 9.372,9.371, 24.569,9.372, 33.941,0.00
C 417.532,335.938, 440.00,281.696, 440.00,224.00c0.00-57.695-22.468-111.938-63.265-152.735C 372.049,66.578, 365.907,64.235, 359.765,64.235zM 274.51,109.49c-6.143,0.00-12.284,2.343-16.971,7.029c-9.373,9.373-9.373,24.568,0.00,33.941
c 40.55,40.55, 40.55,106.529,0.00,147.078c-9.373,9.373-9.373,24.569,0.00,33.941c 9.373,9.372, 24.568,9.372, 33.941,0.00
c 59.265-59.265, 59.265-155.696,0.00-214.961C 286.794,111.833, 280.652,109.49, 274.51,109.49zM 200.666,440.666 C 213.50,453.50 224.00,449.15 224.00,431.00 L 224.00,17.00 C 224.00-1.15 213.50-5.499 200.666,7.335 L 80.00,128.00 L 0.00,128.00 L 0.00,320.00 L 80.00,320.00 L 200.666,440.666 Z" horiz-adv-x="544" />
<glyph unicode="&#xe007;" d="M 256.00,480.00L 96.00,224.00L 256.00-32.00L 416.00,224.00 z" />
<glyph unicode="&#xe008;" d="M 0.00,480.00 L 687.158,480.00 L 687.158-35.207 L 0.00-35.207 L 0.00,480.00 z M 622.731,224.638 C 621.878,314.664 618.46,353.922 597.131,381.656 C 593.291,387.629 586.038,391.042 580.065,395.304 C 559.158,410.669 460.593,416.211 346.247,416.211 C 231.896,416.211 128.642,410.669 108.162,395.304 C 101.762,391.042 94.504,387.629 90.242,381.656 C 69.331,353.922 66.349,314.664 65.069,224.638 C 66.349,134.607 69.331,95.353 90.242,67.62 C 94.504,61.22 101.762,58.233 108.162,53.967 C 128.642,38.18 231.896,33.06 346.247,32.207 C 460.593,33.06 559.158,38.18 580.065,53.967 C 586.038,58.233 593.291,61.22 597.131,67.62 C 618.46,95.353 621.878,134.607 622.731,224.638 z M 331.179,247.952 C 325.389,318.401 287.924,359.905 220.901,359.905 C 159.672,359.905 111.54,304.689 111.54,215.965 C 111.54,126.859 155.405,71.267 227.907,71.267 C 285.79,71.267 326.306,113.916 332.701,184.742 L 263.55,184.742 C 260.81,158.468 249.843,138.285 226.69,138.285 C 190.136,138.285 183.435,174.462 183.435,212.92 C 183.435,265.854 198.665,292.886 223.951,292.886 C 246.492,292.886 260.81,276.511 262.939,247.952 L 331.179,247.952 z M 570.013,247.952 C 564.228,318.401 526.758,359.905 459.74,359.905 C 398.507,359.905 350.379,304.689 350.379,215.965 C 350.379,126.859 394.244,71.267 466.746,71.267 C 524.625,71.267 565.14,113.916 571.536,184.742 L 502.384,184.742 C 499.649,158.468 488.682,138.285 465.529,138.285 C 428.971,138.285 422.27,174.462 422.27,212.92 C 422.27,265.854 437.504,292.886 462.785,292.886 C 485.327,292.886 499.649,276.511 501.778,247.952 L 570.013,247.952 z " horiz-adv-x="687.1578947368421" />
<glyph unicode="&#xe009;" d="M 64.00,416.00L 448.00,416.00L 448.00,32.00L 64.00,32.00z" />
<glyph unicode="&#xe00a;" d="M 192.00,416.00A64.00,64.00 12780.00 1 1 320.00,416A64.00,64.00 12780.00 1 1 192.00,416zM 327.765,359.765A64.00,64.00 12780.00 1 1 455.765,359.765A64.00,64.00 12780.00 1 1 327.765,359.765zM 416.00,224.00A32.00,32.00 12780.00 1 1 480.00,224A32.00,32.00 12780.00 1 1 416.00,224zM 359.765,88.235A32.00,32.00 12780.00 1 1 423.765,88.23500000000001A32.00,32.00 12780.00 1 1 359.765,88.23500000000001zM 224.001,32.00A32.00,32.00 12780.00 1 1 288.001,32A32.00,32.00 12780.00 1 1 224.001,32zM 88.236,88.235A32.00,32.00 12780.00 1 1 152.236,88.23500000000001A32.00,32.00 12780.00 1 1 88.236,88.23500000000001zM 72.236,359.765A48.00,48.00 12780.00 1 1 168.236,359.765A48.00,48.00 12780.00 1 1 72.236,359.765zM 28.00,224.00A36.00,36.00 12780.00 1 1 100.00,224A36.00,36.00 12780.00 1 1 28.00,224z" />
<glyph unicode="&#xe00b;" d="M 224.00,192.00 L 224.00-16.00 L 144.00,64.00 L 48.00-32.00 L 0.00,16.00 L 96.00,112.00 L 16.00,192.00 ZM 512.00,432.00 L 416.00,336.00 L 496.00,256.00 L 288.00,256.00 L 288.00,464.00 L 368.00,384.00 L 464.00,480.00 Z" />
<glyph unicode="&#xe00c;" d="M 256.00,448.00 C 397.385,448.00 512.00,354.875 512.00,240.00 C 512.00,125.124 397.385,32.00 256.00,32.00 C 242.422,32.00 229.095,32.867 216.088,34.522 C 161.099-20.467 95.463-30.328 32.00-31.776 L 32.00-18.318 C 66.268-1.529 96.00,29.052 96.00,64.00 C 96.00,68.877 95.621,73.665 94.918,78.348 C 37.02,116.48 0.00,174.725 0.00,240.00 C 0.00,354.875 114.615,448.00 256.00,448.00 Z" />
<glyph unicode="&#x20;" horiz-adv-x="256" />
<glyph class="hidden" unicode="&#xf000;" d="M0,480L 512 -32L0 -32 z" horiz-adv-x="0" />
</font></defs></svg>

After

Width:  |  Height:  |  Size: 7.2 KiB

Binary file not shown.

Binary file not shown.

View file

@ -0,0 +1,730 @@
/*
VideoJS Default Styles (http://videojs.com)
Version GENERATED_AT_BUILD
*/
/*
REQUIRED STYLES (be careful overriding)
================================================================================ */
/* When loading the player, the video tag is replaced with a DIV,
that will hold the video tag or object tag for other playback methods.
The div contains the video playback element (Flash or HTML5) and controls, and sets the width and height of the video.
** If you want to add some kind of border/padding (e.g. a frame), or special positioning, use another containing element.
Otherwise you risk messing up control positioning and full window mode. **
*/
.video-js {
background-color: #000;
position: relative;
padding: 0;
/* Start with 10px for base font size so other dimensions can be em based and easily calculable. */
font-size: 10px;
/* Allow poster to be vertially aligned. */
vertical-align: middle;
/* display: table-cell; */ /*This works in Safari but not Firefox.*/
}
/* Playback technology elements expand to the width/height of the containing div.
<video> or <object> */
.video-js .vjs-tech {
position: absolute;
top: 0;
left: 0;
width: 100%;
height: 100%;
}
/* Fix for Firefox 9 fullscreen (only if it is enabled). Not needed when checking fullScreenEnabled. */
.video-js:-moz-full-screen { position: absolute; }
/* Fullscreen Styles */
body.vjs-full-window {
padding: 0;
margin: 0;
height: 100%;
overflow-y: auto; /* Fix for IE6 full-window. http://www.cssplay.co.uk/layouts/fixed.html */
}
.video-js.vjs-fullscreen {
position: fixed;
overflow: hidden;
z-index: 1000;
left: 0;
top: 0;
bottom: 0;
right: 0;
width: 100% !important;
height: 100% !important;
_position: absolute; /* IE6 Full-window (underscore hack) */
}
.video-js:-webkit-full-screen {
width: 100% !important; height: 100% !important;
}
/* Poster Styles */
.vjs-poster {
background-repeat: no-repeat;
background-position: 50% 50%;
background-size: contain;
cursor: pointer;
height: 100%;
margin: 0;
padding: 0;
position: relative;
width: 100%;
}
.vjs-poster img {
display: block;
margin: 0 auto;
max-height: 100%;
padding: 0;
width: 100%;
}
/* Text Track Styles */
/* Overall track holder for both captions and subtitles */
.video-js .vjs-text-track-display {
text-align: center;
position: absolute;
bottom: 4em;
left: 1em; /* Leave padding on left and right */
right: 1em;
font-family: Arial, sans-serif;
}
/* Individual tracks */
.video-js .vjs-text-track {
display: none;
font-size: 1.4em;
text-align: center;
margin-bottom: 0.1em;
/* Transparent black background, or fallback to all black (oldIE) */
background: rgb(0, 0, 0); background: rgba(0, 0, 0, 0.50);
}
.video-js .vjs-subtitles { color: #fff; } /* Subtitles are white */
.video-js .vjs-captions { color: #fc6; } /* Captions are yellow */
.vjs-tt-cue { display: block; }
/* Fading sytles, used to fade control bar. */
.vjs-fade-in {
display: block !important;
visibility: visible; /* Needed to make sure things hide in older browsers too. */
opacity: 1;
-webkit-transition: visibility 0.1s, opacity 0.1s;
-moz-transition: visibility 0.1s, opacity 0.1s;
-ms-transition: visibility 0.1s, opacity 0.1s;
-o-transition: visibility 0.1s, opacity 0.1s;
transition: visibility 0.1s, opacity 0.1s;
}
.vjs-fade-out {
display: block !important;
visibility: hidden;
opacity: 0;
-webkit-transition: visibility 1.5s, opacity 1.5s;
-moz-transition: visibility 1.5s, opacity 1.5s;
-ms-transition: visibility 1.5s, opacity 1.5s;
-o-transition: visibility 1.5s, opacity 1.5s;
transition: visibility 1.5s, opacity 1.5s;
/* Wait a moment before fading out the control bar */
-webkit-transition-delay: 2s;
-moz-transition-delay: 2s;
-ms-transition-delay: 2s;
-o-transition-delay: 2s;
transition-delay: 2s;
}
/* Hide disabled or unsupported controls */
.vjs-default-skin .vjs-hidden { display: none; }
.vjs-lock-showing {
display: block !important;
opacity: 1;
visibility: visible;
}
/* DEFAULT SKIN (override in another file to create new skins)
================================================================================
Instead of editing this file, I recommend creating your own skin CSS file to be included after this file,
so you can upgrade to newer versions easier. You can remove all these styles by removing the 'vjs-default-skin' class from the tag. */
/* Base UI Component Classes
-------------------------------------------------------------------------------- */
@font-face{
font-family: 'VideoJS';
src: url('font/vjs.eot');
src: url('font/vjs.eot') format('embedded-opentype'),
url('font/vjs.woff') format('woff'),
url('font/vjs.ttf') format('truetype');
font-weight: normal;
font-style: normal;
}
.vjs-default-skin {
color: #ccc;
}
/* Slider - used for Volume bar and Seek bar */
.vjs-default-skin .vjs-slider {
outline: 0; /* Replace browser focus hightlight with handle highlight */
position: relative;
cursor: pointer;
padding: 0;
background: rgb(50, 50, 50); /* IE8- Fallback */
background: rgba(100, 100, 100, 0.5);
}
.vjs-default-skin .vjs-slider:focus {
background: rgb(70, 70, 70); /* IE8- Fallback */
background: rgba(100, 100, 100, 0.70);
-webkit-box-shadow: 0 0 2em rgba(255, 255, 255, 1);
-moz-box-shadow: 0 0 2em rgba(255, 255, 255, 1);
box-shadow: 0 0 2em rgba(255, 255, 255, 1);
}
.vjs-default-skin .vjs-slider-handle {
position: absolute;
/* Needed for IE6 */
left: 0;
top: 0;
}
.vjs-default-skin .vjs-slider-handle:before {
/*content: "\f111";*/ /* Circle icon = f111 */
content: "\e009"; /* Square icon */
font-family: VideoJS;
font-size: 1em;
line-height: 1;
text-align: center;
text-shadow: 0em 0em 1em #fff;
position: absolute;
top: 0;
left: 0;
/* Rotate the square icon to make a diamond */
-webkit-transform: rotate(-45deg);
-moz-transform: rotate(-45deg);
-ms-transform: rotate(-45deg);
-o-transform: rotate(-45deg);
filter: progid:DXImageTransform.Microsoft.BasicImage(rotation=2);
}
/* Control Bar
-------------------------------------------------------------------------------- */
/* The default control bar. Created by controls.js */
.vjs-default-skin .vjs-control-bar {
display: none; /* Start hidden */
position: absolute;
/* Distance from the bottom of the box/video. Keep 0. Use height to add more bottom margin. */
bottom: 0;
/* 100% width of player div */
left: 0;
right: 0;
/* Controls are absolutely position, so no padding necessary */
padding: 0;
margin: 0;
/* Height includes any margin you want above or below control items */
height: 3.0em;
background-color: rgb(0, 0, 0);
/* Slight blue so it can be seen more easily on black. */
background-color: rgba(7, 40, 50, 0.7);
/* Default font settings */
font-style: normal;
font-weight: normal;
font-family: Arial, sans-serif;
}
/* General styles for individual controls. */
.vjs-default-skin .vjs-control {
outline: none;
position: relative;
float: left;
text-align: center;
margin: 0;
padding: 0;
height: 3.0em;
width: 4em;
}
/* FontAwsome button icons */
.vjs-default-skin .vjs-control:before {
font-family: VideoJS;
font-size: 1.5em;
line-height: 2;
position: absolute;
top: 0;
left: 0;
width: 100%;
height: 100%;
text-align: center;
text-shadow: 1px 1px 1px rgba(0,0,0,0.5);
}
/* Replacement for focus outline */
.vjs-default-skin .vjs-control:focus:before,
.vjs-default-skin .vjs-control:hover:before {
text-shadow: 0em 0em 1em rgba(255, 255, 255, 1);
}
.vjs-default-skin .vjs-control:focus { /* outline: 0; */ /* keyboard-only users cannot see the focus on several of the UI elements when this is set to 0 */ }
/* Hide control text visually, but have it available for screenreaders: h5bp.com/v */
.vjs-default-skin .vjs-control-text { border: 0; clip: rect(0 0 0 0); height: 1px; margin: -1px; overflow: hidden; padding: 0; position: absolute; width: 1px; }
/* Play/Pause
-------------------------------------------------------------------------------- */
.vjs-default-skin .vjs-play-control {
width: 5em;
cursor: pointer;
}
.vjs-default-skin .vjs-play-control:before {
content: "\e001"; /* Play Icon */
}
.vjs-default-skin.vjs-playing .vjs-play-control:before {
content: "\e002"; /* Pause Icon */
}
/* Rewind
-------------------------------------------------------------------------------- */
/*.vjs-default-skin .vjs-rewind-control { width: 5em; cursor: pointer !important; }
.vjs-default-skin .vjs-rewind-control div { width: 19px; height: 16px; background: url('video-js.png'); margin: 0.5em auto 0; }
*/
/* Volume/Mute
-------------------------------------------------------------------------------- */
.vjs-default-skin .vjs-mute-control,
.vjs-default-skin .vjs-volume-menu-button {
cursor: pointer;
float: right;
}
.vjs-default-skin .vjs-mute-control:before,
.vjs-default-skin .vjs-volume-menu-button:before {
content: "\e006"; /* Full volume */
}
.vjs-default-skin .vjs-mute-control.vjs-vol-0:before,
.vjs-default-skin .vjs-volume-menu-button.vjs-vol-0:before {
content: "\e003"; /* No volume */
}
.vjs-default-skin .vjs-mute-control.vjs-vol-1:before,
.vjs-default-skin .vjs-volume-menu-button.vjs-vol-1:before {
content: "\e004"; /* Half volume */
}
.vjs-default-skin .vjs-mute-control.vjs-vol-2:before,
.vjs-default-skin .vjs-volume-menu-button.vjs-vol-2:before {
content: "\e005"; /* Full volume */
}
.vjs-default-skin .vjs-volume-control {
width: 5em;
float: right;
}
.vjs-default-skin .vjs-volume-bar {
width: 5em;
height: 0.6em;
margin: 1.1em auto 0;
}
.vjs-default-skin .vjs-volume-menu-button .vjs-menu-content {
height: 2.9em;
}
.vjs-default-skin .vjs-volume-level {
position: absolute;
top: 0;
left: 0;
height: 0.5em;
background: #66A8CC
url(data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAAYAAAAGCAYAAADgzO9IAAAAP0lEQVQIHWWMAQoAIAgDR/QJ/Ub//04+w7ZICBwcOg5FZi5iBB82AGzixEglJrd4TVK5XUJpskSTEvpdFzX9AB2pGziSQcvAAAAAAElFTkSuQmCC)
-50% 0 repeat;
}
.vjs-default-skin .vjs-volume-bar .vjs-volume-handle {
width: 0.5em;
height: 0.5em;
}
.vjs-default-skin .vjs-volume-handle:before {
font-size: 0.9em;
top: -0.2em;
left: -0.2em;
width: 1em;
height: 1em;
}
.vjs-default-skin .vjs-volume-menu-button .vjs-menu .vjs-menu-content {
width: 6em;
left: -4em;
}
/*.vjs-default-skin .vjs-menu-button .vjs-volume-control {
height: 1.5em;
}*/
/* Progress
-------------------------------------------------------------------------------- */
.vjs-default-skin .vjs-progress-control {
position: absolute;
left: 0;
right: 0;
width: auto;
font-size: 0.3em;
height: 1em;
/* Set above the rest of the controls. */
top: -1em;
/* Shrink the bar slower than it grows. */
-webkit-transition: top 0.4s, height 0.4s, font-size 0.4s, -webkit-transform 0.4s;
-moz-transition: top 0.4s, height 0.4s, font-size 0.4s, -moz-transform 0.4s;
-o-transition: top 0.4s, height 0.4s, font-size 0.4s, -o-transform 0.4s;
transition: top 0.4s, height 0.4s, font-size 0.4s, transform 0.4s;
}
/* On hover, make the progress bar grow to something that's more clickable.
This simply changes the overall font for the progress bar, and this
updates both the em-based widths and heights, as wells as the icon font */
.vjs-default-skin:hover .vjs-progress-control {
font-size: .9em;
/* Even though we're not changing the top/height, we need to include them in
the transition so they're handled correctly. */
-webkit-transition: top 0.2s, height 0.2s, font-size 0.2s, -webkit-transform 0.2s;
-moz-transition: top 0.2s, height 0.2s, font-size 0.2s, -moz-transform 0.2s;
-o-transition: top 0.2s, height 0.2s, font-size 0.2s, -o-transform 0.2s;
transition: top 0.2s, height 0.2s, font-size 0.2s, transform 0.2s;
}
/* Box containing play and load progresses. Also acts as seek scrubber. */
.vjs-default-skin .vjs-progress-holder {
/* Placement within the progress control item */
height: 100%;
}
/* Progress Bars */
.vjs-default-skin .vjs-progress-holder .vjs-play-progress,
.vjs-default-skin .vjs-progress-holder .vjs-load-progress {
position: absolute;
display: block;
height: 100%;
margin: 0;
padding: 0;
/* Needed for IE6 */
left: 0;
top: 0;
}
.vjs-default-skin .vjs-play-progress {
/*
Using a data URI to create the white diagonal lines with a transparent
background. Surprising works in IE8.
Created using http://www.patternify.com
Changing the first color value will change the bar color.
Also using a paralax effect to make the lines move backwards.
The -50% left position makes that happen.
*/
background: #66A8CC
url(data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAAYAAAAGCAYAAADgzO9IAAAAP0lEQVQIHWWMAQoAIAgDR/QJ/Ub//04+w7ZICBwcOg5FZi5iBB82AGzixEglJrd4TVK5XUJpskSTEvpdFzX9AB2pGziSQcvAAAAAAElFTkSuQmCC)
-50% 0 repeat;
}
.vjs-default-skin .vjs-load-progress {
background: rgb(100, 100, 100); /* IE8- Fallback */
background: rgba(255, 255, 255, 0.4);
}
.vjs-default-skin .vjs-seek-handle {
width: 1.5em;
height: 100%;
}
.vjs-default-skin .vjs-seek-handle:before {
padding-top: 0.1em; /* Minor adjustment */
}
/* Time Display
-------------------------------------------------------------------------------- */
.vjs-default-skin .vjs-time-controls {
font-size: 1em;
/* Align vertically by making the line height the same as the control bar */
line-height: 3em;
}
.vjs-default-skin .vjs-current-time { float: left; }
.vjs-default-skin .vjs-duration { float: left; }
/* Remaining time is in the HTML, but not included in default design */
.vjs-default-skin .vjs-remaining-time { display: none; float: left; }
.vjs-time-divider { float: left; line-height: 3em; }
/* Fullscreen
-------------------------------------------------------------------------------- */
.vjs-default-skin .vjs-fullscreen-control {
width: 3.8em;
cursor: pointer;
float: right;
}
.vjs-default-skin .vjs-fullscreen-control:before {
content: "\e000"; /* Enter full screen */
}
.vjs-default-skin.vjs-fullscreen .vjs-fullscreen-control:before {
content: "\e00b"; /* Exit full screen */
}
/* Big Play Button (at start)
---------------------------------------------------------*/
.vjs-default-skin .vjs-big-play-button {
display: block;
z-index: 2;
position: absolute;
top: 2em;
left: 2em;
width: 12.0em;
height: 8.0em;
margin: 0;
text-align: center;
vertical-align: middle;
cursor: pointer;
opacity: 1;
/* Need a slightly gray bg so it can be seen on black backgrounds */
background-color: rgb(40, 40, 40);
background-color: rgba(7, 40, 50, 0.7);
border: 0.3em solid rgb(50, 50, 50);
border-color: rgba(255, 255, 255, 0.25);
-webkit-border-radius: 25px;
-moz-border-radius: 25px;
border-radius: 25px;
-webkit-box-shadow: 0px 0px 1em rgba(255, 255, 255, 0.25);
-moz-box-shadow: 0px 0px 1em rgba(255, 255, 255, 0.25);
box-shadow: 0px 0px 1em rgba(255, 255, 255, 0.25);
-webkit-transition: border 0.4s, -webkit-box-shadow 0.4s, -webkit-transform 0.4s;
-moz-transition: border 0.4s, -moz-box-shadow 0.4s, -moz-transform 0.4s;
-o-transition: border 0.4s, -o-box-shadow 0.4s, -o-transform 0.4s;
transition: border 0.4s, box-shadow 0.4s, transform 0.4s;
}
.vjs-default-skin:hover .vjs-big-play-button,
.vjs-default-skin .vjs-big-play-button:focus {
outline: 0;
border-color: rgb(255, 255, 255);
border-color: rgba(255, 255, 255, 1);
/* IE8 needs a non-glow hover state */
background-color: rgb(80, 80, 80);
background-color: rgba(50, 50, 50, 0.75);
-webkit-box-shadow: 0 0 3em #fff;
-moz-box-shadow: 0 0 3em #fff;
box-shadow: 0 0 3em #fff;
-webkit-transition: border 0s, -webkit-box-shadow 0s, -webkit-transform 0s;
-moz-transition: border 0s, -moz-box-shadow 0s, -moz-transform 0s;
-o-transition: border 0s, -o-box-shadow 0s, -o-transform 0s;
transition: border 0s, box-shadow 0s, transform 0s;
}
.vjs-default-skin .vjs-big-play-button:before {
content: "\e001"; /* Play icon */
font-family: VideoJS;
font-size: 3em;
line-height: 2.66;
text-shadow: 0.05em 0.05em 0.1em #000;
text-align: center; /* Needed for IE8 */
position: absolute;
left: 0;
width: 100%;
height: 100%;
}
/* Loading Spinner
---------------------------------------------------------*/
.vjs-loading-spinner {
display: none;
position: absolute;
top: 50%;
left: 50%;
font-size: 5em;
line-height: 1;
width: 1em;
height: 1em;
margin-left: -0.5em;
margin-top: -0.5em;
opacity: 0.75;
-webkit-animation: spin 1.5s infinite linear;
-moz-animation: spin 1.5s infinite linear;
-o-animation: spin 1.5s infinite linear;
animation: spin 1.5s infinite linear;
}
.vjs-default-skin .vjs-loading-spinner:before {
content: "\e00a"; /* Loading spinner icon */
font-family: VideoJS;
position: absolute;
width: 1em;
height: 1em;
text-align: center;
text-shadow: 0em 0em 0.1em #000;
}
/* Add a gradient to the spinner by overlaying another copy.
Text gradient plus a text shadow doesn't work
and `background-clip: text` only works in Webkit. */
.vjs-default-skin .vjs-loading-spinner:after {
content: "\e00a"; /* Loading spinner icon */
font-family: VideoJS;
position: absolute;
width: 1em;
height: 1em;
text-align: center;
-webkit-background-clip: text;
-webkit-text-fill-color: transparent;
}
@-moz-keyframes spin {
0% { -moz-transform: rotate(0deg); }
100% { -moz-transform: rotate(359deg); }
}
@-webkit-keyframes spin {
0% { -webkit-transform: rotate(0deg); }
100% { -webkit-transform: rotate(359deg); }
}
@-o-keyframes spin {
0% { -o-transform: rotate(0deg); }
100% { -o-transform: rotate(359deg); }
}
@-ms-keyframes spin {
0% { -ms-transform: rotate(0deg); }
100% { -ms-transform: rotate(359deg); }
}
@keyframes spin {
0% { transform: rotate(0deg); }
100% { transform: rotate(359deg); }
}
/* Menu Buttons (Captions/Subtitles/etc.)
-------------------------------------------------------------------------------- */
.vjs-default-skin .vjs-menu-button {
float: right;
cursor: pointer;
}
.vjs-default-skin .vjs-menu {
display: none;
position: absolute;
bottom: 0;
left: 0em; /* (Width of vjs-menu - width of button) / 2 */
width: 0em;
height: 0em;
margin-bottom: 3em;
border-left: 2em solid transparent;
border-right: 2em solid transparent;
border-top: 1.55em solid rgb(0, 0, 0); /* Same top as ul bottom */
border-top-color: rgba(7, 40, 50, 0.5); /* Same as ul background */
}
/* Button Pop-up Menu */
.vjs-default-skin .vjs-menu-button .vjs-menu .vjs-menu-content {
display: block;
padding: 0; margin: 0;
position: absolute;
width: 10em;
bottom: 1.5em; /* Same bottom as vjs-menu border-top */
max-height: 15em;
overflow: auto;
left: -5em; /* Width of menu - width of button / 2 */
background-color: rgb(0, 0, 0);
background-color: rgba(7, 40, 50, 0.7);
-webkit-box-shadow: -20px -20px 0px rgba(255, 255, 255, 0.5);
-moz-box-shadow: 0 0 1em rgba(255, 255, 255, 0.5);
box-shadow: -0.2em -0.2em 0.3em rgba(255, 255, 255, 0.2);
}
/*.vjs-default-skin .vjs-menu-button:focus ul,*/ /* This is not needed because keyboard accessibility for the caption button is not handled with the focus any more. */
.vjs-default-skin .vjs-menu-button:hover .vjs-menu {
display: block;
}
.vjs-default-skin .vjs-menu-button ul li {
list-style: none;
margin: 0;
padding: 0.3em 0 0.3em 0;
line-height: 1.4em;
font-size: 1.2em;
font-weight: normal;
text-align: center;
text-transform: lowercase;
}
.vjs-default-skin .vjs-menu-button ul li.vjs-selected {
background-color: #000;
}
.vjs-default-skin .vjs-menu-button ul li:focus,
.vjs-default-skin .vjs-menu-button ul li:hover,
.vjs-default-skin .vjs-menu-button ul li.vjs-selected:focus,
.vjs-default-skin .vjs-menu-button ul li.vjs-selected:hover {
background-color: rgb(255, 255, 255);
background-color: rgba(255, 255, 255, 0.75);
color: #111;
outline: 0;
-webkit-box-shadow: 0 0 1em rgba(255, 255, 255, 1);
-moz-box-shadow: 0 0 1em rgba(255, 255, 255, 1);
box-shadow: 0 0 1em rgba(255, 255, 255, 1);
}
.vjs-default-skin .vjs-menu-button ul li.vjs-menu-title {
text-align: center;
text-transform: uppercase;
font-size: 1em;
line-height: 2em;
padding: 0;
margin: 0 0 0.3em 0;
font-weight: bold;
cursor: default;
}
/* Subtitles Button */
.vjs-default-skin .vjs-subtitles-button:before { content: "\e00c"; }
/* There's unfortunately no CC button in FontAwesome, so we need
to manually create one. Please +1 the fontawesome request.
https://github.com/FortAwesome/Font-Awesome/issues/968 */
.vjs-default-skin .vjs-captions-button {
font-size: 1em; /* Font icons are 1.5em */
}
.vjs-default-skin .vjs-captions-button:before {
content: "\e008";
font-family: VideoJS;
font-size: 1.5em;
line-height: 2;
position: absolute;
top: 0;
left: 0;
width: 100%;
height: 100%;
text-align: center;
text-shadow: none;
}
/* Replacement for focus outline */
.vjs-default-skin .vjs-captions-button:focus .vjs-control-content:before,
.vjs-default-skin .vjs-captions-button:hover .vjs-control-content:before {
-webkit-box-shadow: 0 0 1em rgba(255, 255, 255, 1);
-moz-box-shadow: 0 0 1em rgba(255, 255, 255, 1);
box-shadow: 0 0 1em rgba(255, 255, 255, 1);
}

Binary file not shown.

File diff suppressed because it is too large Load diff

121
library/video-js/video.js Normal file
View file

@ -0,0 +1,121 @@
/*! Copyright 2013 Brightcove, Inc. https://github.com/videojs/video.js/blob/master/LICENSE */
(function() {var b=void 0,f=!0,h=null,l=!1;function m(){return function(){}}function p(a){return function(){return this[a]}}function r(a){return function(){return a}}var t;document.createElement("video");document.createElement("audio");function u(a,c,d){if("string"===typeof a){0===a.indexOf("#")&&(a=a.slice(1));if(u.Na[a])return u.Na[a];a=u.s(a)}if(!a||!a.nodeName)throw new TypeError("The element or ID supplied is not valid. (videojs)");return a.player||new u.ga(a,c,d)}var v=u;window.xd=window.yd=u;u.Qb="GENERATED_CDN_VSN";
u.Pb="https:"==document.location.protocol?"https://":"http://";u.options={techOrder:["html5","flash"],html5:{},flash:{swf:u.Pb+"vjs.zencdn.net/c/video-js.swf"},width:300,height:150,defaultVolume:0,children:{mediaLoader:{},posterImage:{},textTrackDisplay:{},loadingSpinner:{},bigPlayButton:{},controlBar:{}}};u.Na={};"GENERATED_CDN_VSN"!=u.Qb&&(v.options.flash.swf=u.Pb+"vjs.zencdn.net/"+u.Qb+"/video-js.swf");u.ma=u.CoreObject=m();
u.ma.extend=function(a){var c,d;a=a||{};c=a.init||a.g||this.prototype.init||this.prototype.g||m();d=function(){c.apply(this,arguments)};d.prototype=u.i.create(this.prototype);d.prototype.constructor=d;d.extend=u.ma.extend;d.create=u.ma.create;for(var e in a)a.hasOwnProperty(e)&&(d.prototype[e]=a[e]);return d};u.ma.create=function(){var a=u.i.create(this.prototype);this.apply(a,arguments);return a};
u.d=function(a,c,d){var e=u.getData(a);e.z||(e.z={});e.z[c]||(e.z[c]=[]);d.u||(d.u=u.u++);e.z[c].push(d);e.S||(e.disabled=l,e.S=function(c){if(!e.disabled){c=u.hc(c);var d=e.z[c.type];if(d)for(var d=d.slice(0),k=0,q=d.length;k<q&&!c.mc();k++)d[k].call(a,c)}});1==e.z[c].length&&(document.addEventListener?a.addEventListener(c,e.S,l):document.attachEvent&&a.attachEvent("on"+c,e.S))};
u.t=function(a,c,d){if(u.lc(a)){var e=u.getData(a);if(e.z)if(c){var g=e.z[c];if(g){if(d){if(d.u)for(e=0;e<g.length;e++)g[e].u===d.u&&g.splice(e--,1)}else e.z[c]=[];u.ec(a,c)}}else for(g in e.z)c=g,e.z[c]=[],u.ec(a,c)}};u.ec=function(a,c){var d=u.getData(a);0===d.z[c].length&&(delete d.z[c],document.removeEventListener?a.removeEventListener(c,d.S,l):document.detachEvent&&a.detachEvent("on"+c,d.S));u.Ab(d.z)&&(delete d.z,delete d.S,delete d.disabled);u.Ab(d)&&u.sc(a)};
u.hc=function(a){function c(){return f}function d(){return l}if(!a||!a.Bb){var e=a||window.event;a={};for(var g in e)a[g]=e[g];a.target||(a.target=a.srcElement||document);a.relatedTarget=a.fromElement===a.target?a.toElement:a.fromElement;a.preventDefault=function(){e.preventDefault&&e.preventDefault();a.returnValue=l;a.zb=c};a.zb=d;a.stopPropagation=function(){e.stopPropagation&&e.stopPropagation();a.cancelBubble=f;a.Bb=c};a.Bb=d;a.stopImmediatePropagation=function(){e.stopImmediatePropagation&&e.stopImmediatePropagation();
a.mc=c;a.stopPropagation()};a.mc=d;if(a.clientX!=h){g=document.documentElement;var j=document.body;a.pageX=a.clientX+(g&&g.scrollLeft||j&&j.scrollLeft||0)-(g&&g.clientLeft||j&&j.clientLeft||0);a.pageY=a.clientY+(g&&g.scrollTop||j&&j.scrollTop||0)-(g&&g.clientTop||j&&j.clientTop||0)}a.which=a.charCode||a.keyCode;a.button!=h&&(a.button=a.button&1?0:a.button&4?1:a.button&2?2:0)}return a};
u.k=function(a,c){var d=u.lc(a)?u.getData(a):{},e=a.parentNode||a.ownerDocument;"string"===typeof c&&(c={type:c,target:a});c=u.hc(c);d.S&&d.S.call(a,c);if(e&&!c.Bb())u.k(e,c);else if(!e&&!c.zb()&&(d=u.getData(c.target),c.target[c.type])){d.disabled=f;if("function"===typeof c.target[c.type])c.target[c.type]();d.disabled=l}return!c.zb()};u.Q=function(a,c,d){u.d(a,c,function(){u.t(a,c,arguments.callee);d.apply(this,arguments)})};var w=Object.prototype.hasOwnProperty;
u.e=function(a,c){var d=document.createElement(a||"div"),e;for(e in c)w.call(c,e)&&(-1!==e.indexOf("aria-")||"role"==e?d.setAttribute(e,c[e]):d[e]=c[e]);return d};u.Y=function(a){return a.charAt(0).toUpperCase()+a.slice(1)};u.i={};u.i.create=Object.create||function(a){function c(){}c.prototype=a;return new c};u.i.sa=function(a,c,d){for(var e in a)w.call(a,e)&&c.call(d||this,e,a[e])};u.i.B=function(a,c){if(!c)return a;for(var d in c)w.call(c,d)&&(a[d]=c[d]);return a};
u.i.gc=function(a,c){var d,e,g;a=u.i.copy(a);for(d in c)w.call(c,d)&&(e=a[d],g=c[d],a[d]=u.i.nc(e)&&u.i.nc(g)?u.i.gc(e,g):c[d]);return a};u.i.copy=function(a){return u.i.B({},a)};u.i.nc=function(a){return!!a&&"object"===typeof a&&"[object Object]"===a.toString()&&a.constructor===Object};u.bind=function(a,c,d){function e(){return c.apply(a,arguments)}c.u||(c.u=u.u++);e.u=d?d+"_"+c.u:c.u;return e};u.qa={};u.u=1;u.expando="vdata"+(new Date).getTime();
u.getData=function(a){var c=a[u.expando];c||(c=a[u.expando]=u.u++,u.qa[c]={});return u.qa[c]};u.lc=function(a){a=a[u.expando];return!(!a||u.Ab(u.qa[a]))};u.sc=function(a){var c=a[u.expando];if(c){delete u.qa[c];try{delete a[u.expando]}catch(d){a.removeAttribute?a.removeAttribute(u.expando):a[u.expando]=h}}};u.Ab=function(a){for(var c in a)if(a[c]!==h)return l;return f};u.p=function(a,c){-1==(" "+a.className+" ").indexOf(" "+c+" ")&&(a.className=""===a.className?c:a.className+" "+c)};
u.w=function(a,c){if(-1!=a.className.indexOf(c)){for(var d=a.className.split(" "),e=d.length-1;0<=e;e--)d[e]===c&&d.splice(e,1);a.className=d.join(" ")}};u.ib=u.e("video");u.O=navigator.userAgent;u.Bc=!!u.O.match(/iPhone/i);u.Ac=!!u.O.match(/iPad/i);u.Cc=!!u.O.match(/iPod/i);u.Ub=u.Bc||u.Ac||u.Cc;var aa=u,x;var y=u.O.match(/OS (\d+)_/i);x=y&&y[1]?y[1]:b;aa.qd=x;u.ab=!!u.O.match(/Android.*AppleWebKit/i);var ba=u,z=u.O.match(/Android (\d+)\./i);ba.yc=z&&z[1]?z[1]:h;u.zc=function(){return!!u.O.match("Firefox")};
u.wb=function(a){var c={};if(a&&a.attributes&&0<a.attributes.length)for(var d=a.attributes,e,g,j=d.length-1;0<=j;j--){e=d[j].name;g=d[j].value;if("boolean"===typeof a[e]||-1!==",autoplay,controls,loop,muted,default,".indexOf(","+e+","))g=g!==h?f:l;c[e]=g}return c};u.td=function(a,c){var d="";document.defaultView&&document.defaultView.getComputedStyle?d=document.defaultView.getComputedStyle(a,"").getPropertyValue(c):a.currentStyle&&(d=a["client"+c.substr(0,1).toUpperCase()+c.substr(1)]+"px");return d};
u.yb=function(a,c){c.firstChild?c.insertBefore(a,c.firstChild):c.appendChild(a)};u.Nb={};u.s=function(a){0===a.indexOf("#")&&(a=a.slice(1));return document.getElementById(a)};u.Ha=function(a,c){c=c||a;var d=Math.floor(a%60),e=Math.floor(a/60%60),g=Math.floor(a/3600),j=Math.floor(c/60%60),k=Math.floor(c/3600),g=0<g||0<k?g+":":"";return g+(((g||10<=j)&&10>e?"0"+e:e)+":")+(10>d?"0"+d:d)};u.Gc=function(){document.body.focus();document.onselectstart=r(l)};u.ld=function(){document.onselectstart=r(f)};
u.trim=function(a){return a.toString().replace(/^\s+/,"").replace(/\s+$/,"")};u.round=function(a,c){c||(c=0);return Math.round(a*Math.pow(10,c))/Math.pow(10,c)};u.tb=function(a,c){return{length:1,start:function(){return a},end:function(){return c}}};
u.get=function(a,c,d){var e=0===a.indexOf("file:")||0===window.location.href.indexOf("file:")&&-1===a.indexOf("http");"undefined"===typeof XMLHttpRequest&&(window.XMLHttpRequest=function(){try{return new window.ActiveXObject("Msxml2.XMLHTTP.6.0")}catch(a){}try{return new window.ActiveXObject("Msxml2.XMLHTTP.3.0")}catch(c){}try{return new window.ActiveXObject("Msxml2.XMLHTTP")}catch(d){}throw Error("This browser does not support XMLHttpRequest.");});var g=new XMLHttpRequest;try{g.open("GET",a)}catch(j){d(j)}g.onreadystatechange=
function(){4===g.readyState&&(200===g.status||e&&0===g.status?c(g.responseText):d&&d())};try{g.send()}catch(k){d&&d(k)}};u.dd=function(a){try{var c=window.localStorage||l;c&&(c.volume=a)}catch(d){22==d.code||1014==d.code?u.log("LocalStorage Full (VideoJS)",d):18==d.code?u.log("LocalStorage not allowed (VideoJS)",d):u.log("LocalStorage Error (VideoJS)",d)}};u.jc=function(a){a.match(/^https?:\/\//)||(a=u.e("div",{innerHTML:'<a href="'+a+'">x</a>'}).firstChild.href);return a};
u.log=function(){u.log.history=u.log.history||[];u.log.history.push(arguments);window.console&&window.console.log(Array.prototype.slice.call(arguments))};u.Oc=function(a){var c,d;a.getBoundingClientRect&&a.parentNode&&(c=a.getBoundingClientRect());if(!c)return{left:0,top:0};a=document.documentElement;d=document.body;return{left:c.left+(window.pageXOffset||d.scrollLeft)-(a.clientLeft||d.clientLeft||0),top:c.top+(window.pageYOffset||d.scrollTop)-(a.clientTop||d.clientTop||0)}};
u.c=u.ma.extend({g:function(a,c,d){this.a=a;this.f=u.i.copy(this.f);c=this.options(c);this.L=c.id||(c.el&&c.el.id?c.el.id:a.id()+"_component_"+u.u++);this.Tc=c.name||h;this.b=c.el||this.e();this.D=[];this.rb={};this.R={};if((a=this.f)&&a.children){var e=this;u.i.sa(a.children,function(a,c){c!==l&&!c.loadEvent&&(e[a]=e.X(a,c))})}this.M(d)}});t=u.c.prototype;
t.C=function(){if(this.D)for(var a=this.D.length-1;0<=a;a--)this.D[a].C&&this.D[a].C();this.R=this.rb=this.D=h;this.t();this.b.parentNode&&this.b.parentNode.removeChild(this.b);u.sc(this.b);this.b=h};t.pc=p("a");t.options=function(a){return a===b?this.f:this.f=u.i.gc(this.f,a)};t.e=function(a,c){return u.e(a,c)};t.s=p("b");t.id=p("L");t.name=p("Tc");t.children=p("D");
t.X=function(a,c){var d,e;"string"===typeof a?(e=a,c=c||{},d=c.componentClass||u.Y(e),c.name=e,d=new window.videojs[d](this.a||this,c)):d=a;this.D.push(d);"function"===typeof d.id&&(this.rb[d.id()]=d);(e=e||d.name&&d.name())&&(this.R[e]=d);"function"===typeof d.el&&d.el()&&(this.ra||this.b).appendChild(d.el());return d};
t.removeChild=function(a){"string"===typeof a&&(a=this.R[a]);if(a&&this.D){for(var c=l,d=this.D.length-1;0<=d;d--)if(this.D[d]===a){c=f;this.D.splice(d,1);break}c&&(this.rb[a.id]=h,this.R[a.name]=h,(c=a.s())&&c.parentNode===(this.ra||this.b)&&(this.ra||this.b).removeChild(a.s()))}};t.P=r("");t.d=function(a,c){u.d(this.b,a,u.bind(this,c));return this};t.t=function(a,c){u.t(this.b,a,c);return this};t.Q=function(a,c){u.Q(this.b,a,u.bind(this,c));return this};t.k=function(a,c){u.k(this.b,a,c);return this};
t.M=function(a){a&&(this.$?a.call(this):(this.Qa===b&&(this.Qa=[]),this.Qa.push(a)));return this};t.Ta=function(){this.$=f;var a=this.Qa;if(a&&0<a.length){for(var c=0,d=a.length;c<d;c++)a[c].call(this);this.Qa=[];this.k("ready")}};t.p=function(a){u.p(this.b,a);return this};t.w=function(a){u.w(this.b,a);return this};t.show=function(){this.b.style.display="block";return this};t.v=function(){this.b.style.display="none";return this};t.ja=function(){this.w("vjs-fade-out");this.p("vjs-fade-in");return this};
t.Ga=function(){this.w("vjs-fade-in");this.p("vjs-fade-out");return this};t.oc=function(){this.p("vjs-lock-showing");return this};t.Ua=function(){this.w("vjs-lock-showing");return this};t.disable=function(){this.v();this.show=m();this.ja=m()};t.width=function(a,c){return A(this,"width",a,c)};t.height=function(a,c){return A(this,"height",a,c)};t.Kc=function(a,c){return this.width(a,f).height(c)};
function A(a,c,d,e){if(d!==b)return a.b.style[c]=-1!==(""+d).indexOf("%")||-1!==(""+d).indexOf("px")?d:"auto"===d?"":d+"px",e||a.k("resize"),a;if(!a.b)return 0;d=a.b.style[c];e=d.indexOf("px");return-1!==e?parseInt(d.slice(0,e),10):parseInt(a.b["offset"+u.Y(c)],10)}
u.o=u.c.extend({g:function(a,c){u.c.call(this,a,c);var d=l;this.d("touchstart",function(){d=f});this.d("touchmove",function(){d=l});var e=this;this.d("touchend",function(a){d&&e.n(a);a.preventDefault();a.stopPropagation()});this.d("click",this.n);this.d("focus",this.La);this.d("blur",this.Ka)}});t=u.o.prototype;
t.e=function(a,c){c=u.i.B({className:this.P(),innerHTML:'<div class="vjs-control-content"><span class="vjs-control-text">'+(this.pa||"Need Text")+"</span></div>",ad:"button","aria-live":"polite",tabIndex:0},c);return u.c.prototype.e.call(this,a,c)};t.P=function(){return"vjs-control "+u.c.prototype.P.call(this)};t.n=m();t.La=function(){u.d(document,"keyup",u.bind(this,this.aa))};t.aa=function(a){if(32==a.which||13==a.which)a.preventDefault(),this.n()};
t.Ka=function(){u.t(document,"keyup",u.bind(this,this.aa))};u.J=u.c.extend({g:function(a,c){u.c.call(this,a,c);this.Fc=this.R[this.f.barName];this.handle=this.R[this.f.handleName];a.d(this.qc,u.bind(this,this.update));this.d("mousedown",this.Ma);this.d("touchstart",this.Ma);this.d("focus",this.La);this.d("blur",this.Ka);this.d("click",this.n);this.a.d("controlsvisible",u.bind(this,this.update));a.M(u.bind(this,this.update));this.K={}}});t=u.J.prototype;
t.e=function(a,c){c=c||{};c.className+=" vjs-slider";c=u.i.B({ad:"slider","aria-valuenow":0,"aria-valuemin":0,"aria-valuemax":100,tabIndex:0},c);return u.c.prototype.e.call(this,a,c)};t.Ma=function(a){a.preventDefault();u.Gc();this.K.move=u.bind(this,this.Gb);this.K.end=u.bind(this,this.Hb);u.d(document,"mousemove",this.K.move);u.d(document,"mouseup",this.K.end);u.d(document,"touchmove",this.K.move);u.d(document,"touchend",this.K.end);this.Gb(a)};
t.Hb=function(){u.ld();u.t(document,"mousemove",this.K.move,l);u.t(document,"mouseup",this.K.end,l);u.t(document,"touchmove",this.K.move,l);u.t(document,"touchend",this.K.end,l);this.update()};t.update=function(){if(this.b){var a,c=this.xb(),d=this.handle,e=this.Fc;isNaN(c)&&(c=0);a=c;if(d){a=this.b.offsetWidth;var g=d.s().offsetWidth;a=g?g/a:0;c*=1-a;a=c+a/2;d.s().style.left=u.round(100*c,2)+"%"}e.s().style.width=u.round(100*a,2)+"%"}};
function B(a,c){var d,e,g,j;d=a.b;e=u.Oc(d);j=g=d.offsetWidth;d=a.handle;if(a.f.md)return j=e.top,e=c.changedTouches?c.changedTouches[0].pageY:c.pageY,d&&(d=d.s().offsetHeight,j+=d/2,g-=d),Math.max(0,Math.min(1,(j-e+g)/g));g=e.left;e=c.changedTouches?c.changedTouches[0].pageX:c.pageX;d&&(d=d.s().offsetWidth,g+=d/2,j-=d);return Math.max(0,Math.min(1,(e-g)/j))}t.La=function(){u.d(document,"keyup",u.bind(this,this.aa))};
t.aa=function(a){37==a.which?(a.preventDefault(),this.vc()):39==a.which&&(a.preventDefault(),this.wc())};t.Ka=function(){u.t(document,"keyup",u.bind(this,this.aa))};t.n=function(a){a.stopImmediatePropagation();a.preventDefault()};u.ha=u.c.extend();u.ha.prototype.defaultValue=0;u.ha.prototype.e=function(a,c){c=c||{};c.className+=" vjs-slider-handle";c=u.i.B({innerHTML:'<span class="vjs-control-text">'+this.defaultValue+"</span>"},c);return u.c.prototype.e.call(this,"div",c)};u.na=u.c.extend();
function ca(a,c){a.X(c);c.d("click",u.bind(a,function(){this.Ua()}))}u.na.prototype.e=function(){var a=this.options().Ic||"ul";this.ra=u.e(a,{className:"vjs-menu-content"});a=u.c.prototype.e.call(this,"div",{append:this.ra,className:"vjs-menu"});a.appendChild(this.ra);u.d(a,"click",function(a){a.preventDefault();a.stopImmediatePropagation()});return a};u.I=u.o.extend({g:function(a,c){u.o.call(this,a,c);this.selected(c.selected)}});
u.I.prototype.e=function(a,c){return u.o.prototype.e.call(this,"li",u.i.B({className:"vjs-menu-item",innerHTML:this.f.label},c))};u.I.prototype.n=function(){this.selected(f)};u.I.prototype.selected=function(a){a?(this.p("vjs-selected"),this.b.setAttribute("aria-selected",f)):(this.w("vjs-selected"),this.b.setAttribute("aria-selected",l))};
u.ea=u.o.extend({g:function(a,c){u.o.call(this,a,c);this.ua=this.Fa();this.X(this.ua);this.G&&0===this.G.length&&this.v();this.d("keyup",this.aa);this.b.setAttribute("aria-haspopup",f);this.b.setAttribute("role","button")}});t=u.ea.prototype;t.oa=l;t.Fa=function(){var a=new u.na(this.a);this.options().title&&a.s().appendChild(u.e("li",{className:"vjs-menu-title",innerHTML:u.Y(this.A),jd:-1}));if(this.G=this.sb())for(var c=0;c<this.G.length;c++)ca(a,this.G[c]);return a};t.sb=m();
t.P=function(){return this.className+" vjs-menu-button "+u.o.prototype.P.call(this)};t.La=m();t.Ka=m();t.n=function(){this.Q("mouseout",u.bind(this,function(){this.ua.Ua();this.b.blur()}));this.oa?C(this):D(this)};t.aa=function(a){a.preventDefault();32==a.which||13==a.which?this.oa?C(this):D(this):27==a.which&&this.oa&&C(this)};function D(a){a.oa=f;a.ua.oc();a.b.setAttribute("aria-pressed",f);a.G&&0<a.G.length&&a.G[0].s().focus()}function C(a){a.oa=l;a.ua.Ua();a.b.setAttribute("aria-pressed",l)}
u.ga=u.c.extend({g:function(a,c,d){this.N=a;c=u.i.B(da(a),c);this.r={};this.rc=c.poster;this.Ea=c.controls;c.customControlsOnMobile!==f&&(u.Ub||u.ab)?(a.controls=c.controls,this.Ea=l):a.controls=l;u.c.call(this,this,c,d);this.Q("play",function(a){u.k(this.b,{type:"firstplay",target:this.b})||(a.preventDefault(),a.stopPropagation(),a.stopImmediatePropagation())});this.d("ended",this.Vc);this.d("play",this.Jb);this.d("firstplay",this.Wc);this.d("pause",this.Ib);this.d("progress",this.Yc);this.d("durationchange",
this.Uc);this.d("error",this.Fb);this.d("fullscreenchange",this.Xc);u.Na[this.L]=this;c.plugins&&u.i.sa(c.plugins,function(a,c){this[a](c)},this)}});t=u.ga.prototype;t.f=u.options;t.C=function(){u.Na[this.L]=h;this.N&&this.N.player&&(this.N.player=h);this.b&&this.b.player&&(this.b.player=h);clearInterval(this.Pa);this.va();this.h&&this.h.C();u.c.prototype.C.call(this)};
function da(a){var c={sources:[],tracks:[]};u.i.B(c,u.wb(a));if(a.hasChildNodes())for(var d,e=a.childNodes,g=0,j=e.length;g<j;g++)a=e[g],d=a.nodeName.toLowerCase(),"source"===d?c.sources.push(u.wb(a)):"track"===d&&c.tracks.push(u.wb(a));return c}
t.e=function(){var a=this.b=u.c.prototype.e.call(this,"div"),c=this.N;c.removeAttribute("width");c.removeAttribute("height");if(c.hasChildNodes())for(var d=c.childNodes.length,e=0,g=c.childNodes;e<d;e++)("source"==g[0].nodeName.toLowerCase()||"track"==g[0].nodeName.toLowerCase())&&c.removeChild(g[0]);c.id=c.id||"vjs_video_"+u.u++;a.id=c.id;a.className=c.className;c.id+="_html5_api";c.className="vjs-tech";c.player=a.player=this;this.p("vjs-paused");this.width(this.f.width,f);this.height(this.f.height,
f);c.parentNode&&c.parentNode.insertBefore(a,c);u.yb(c,a);return a};
function E(a,c,d){a.h?F(a):"Html5"!==c&&a.N&&(a.b.removeChild(a.N),a.N.pc=h,a.N=h);a.ba=c;a.$=l;var e=u.i.B({source:d,parentEl:a.b},a.f[c.toLowerCase()]);d&&(d.src==a.r.src&&0<a.r.currentTime&&(e.startTime=a.r.currentTime),a.r.src=d.src);a.h=new window.videojs[c](a,e);a.h.M(function(){this.a.Ta();if(!this.j.Lb){var a=this.a;a.Db=f;a.Pa=setInterval(u.bind(a,function(){this.r.nb<this.buffered().end(0)?this.k("progress"):1==G(this)&&(clearInterval(this.Pa),this.k("progress"))}),500);a.h.Q("progress",
function(){this.j.Lb=f;var a=this.a;a.Db=l;clearInterval(a.Pa)})}this.j.Ob||(a=this.a,a.Eb=f,a.d("play",a.xc),a.d("pause",a.va),a.h.Q("timeupdate",function(){this.j.Ob=f;H(this.a)}))})}function F(a){a.$=l;a.h.C();a.Db&&(a.Db=l,clearInterval(a.Pa));a.Eb&&H(a);a.h=l}function H(a){a.Eb=l;a.va();a.t("play",a.xc);a.t("pause",a.va)}t.xc=function(){this.fc&&this.va();this.fc=setInterval(u.bind(this,function(){this.k("timeupdate")}),250)};t.va=function(){clearInterval(this.fc)};
t.Vc=function(){this.f.loop&&(this.currentTime(0),this.play())};t.Jb=function(){u.w(this.b,"vjs-paused");u.p(this.b,"vjs-playing")};t.Wc=function(){this.f.starttime&&this.currentTime(this.f.starttime)};t.Ib=function(){u.w(this.b,"vjs-playing");u.p(this.b,"vjs-paused")};t.Yc=function(){1==G(this)&&this.k("loadedalldata")};t.Uc=function(){this.duration(I(this,"duration"))};t.Fb=function(a){u.log("Video Error",a)};t.Xc=function(){this.F?this.p("vjs-fullscreen"):this.w("vjs-fullscreen")};
function J(a,c,d){if(a.h&&a.h.$)a.h.M(function(){this[c](d)});else try{a.h[c](d)}catch(e){throw u.log(e),e;}}function I(a,c){if(a.h.$)try{return a.h[c]()}catch(d){throw a.h[c]===b?u.log("Video.js: "+c+" method not defined for "+a.ba+" playback technology.",d):"TypeError"==d.name?(u.log("Video.js: "+c+" unavailable on "+a.ba+" playback technology element.",d),a.h.$=l):u.log(d),d;}}t.play=function(){J(this,"play");return this};t.pause=function(){J(this,"pause");return this};
t.paused=function(){return I(this,"paused")===l?l:f};t.currentTime=function(a){return a!==b?(this.r.vd=a,J(this,"setCurrentTime",a),this.Eb&&this.k("timeupdate"),this):this.r.currentTime=I(this,"currentTime")||0};t.duration=function(a){return a!==b?(this.r.duration=parseFloat(a),this):this.r.duration};t.buffered=function(){var a=I(this,"buffered"),c=this.r.nb=this.r.nb||0;a&&(0<a.length&&a.end(0)!==c)&&(c=a.end(0),this.r.nb=c);return u.tb(0,c)};
function G(a){return a.duration()?a.buffered().end(0)/a.duration():0}t.volume=function(a){if(a!==b)return a=Math.max(0,Math.min(1,parseFloat(a))),this.r.volume=a,J(this,"setVolume",a),u.dd(a),this;a=parseFloat(I(this,"volume"));return isNaN(a)?1:a};t.muted=function(a){return a!==b?(J(this,"setMuted",a),this):I(this,"muted")||l};t.Sa=function(){return I(this,"supportsFullScreen")||l};
t.Ra=function(){var a=u.Nb.Ra;this.F=f;a?(u.d(document,a.Z,u.bind(this,function(){this.F=document[a.F];this.F===l&&u.t(document,a.Z,arguments.callee)})),this.h.j.Ia===l&&this.f.flash.iFrameMode!==f&&(this.pause(),F(this),u.d(document,a.Z,u.bind(this,function(){u.t(document,a.Z,arguments.callee);E(this,this.ba,{src:this.r.src})}))),this.b[a.tc](),this.k("fullscreenchange")):this.h.Sa()?J(this,"enterFullScreen"):(this.Qc=f,this.Lc=document.documentElement.style.overflow,u.d(document,"keydown",u.bind(this,
this.ic)),document.documentElement.style.overflow="hidden",u.p(document.body,"vjs-full-window"),this.k("enterFullWindow"),this.k("fullscreenchange"));return this};function K(a){var c=u.Nb.Ra;a.F=l;c?(a.h.j.Ia===l&&a.f.flash.iFrameMode!==f&&(a.pause(),F(a),u.d(document,c.Z,u.bind(a,function(){u.t(document,c.Z,arguments.callee);E(this,this.ba,{src:this.r.src})}))),document[c.pb](),a.k("fullscreenchange")):a.h.Sa()?J(a,"exitFullScreen"):(L(a),a.k("fullscreenchange"))}
t.ic=function(a){27===a.keyCode&&(this.F===f?K(this):L(this))};function L(a){a.Qc=l;u.t(document,"keydown",a.ic);document.documentElement.style.overflow=a.Lc;u.w(document.body,"vjs-full-window");a.k("exitFullWindow")}
t.src=function(a){if(a instanceof Array){var c;a:{c=a;for(var d=0,e=this.f.techOrder;d<e.length;d++){var g=u.Y(e[d]),j=window.videojs[g];if(j.isSupported())for(var k=0,q=c;k<q.length;k++){var n=q[k];if(j.canPlaySource(n)){c={source:n,h:g};break a}}}c=l}c?(a=c.source,c=c.h,c==this.ba?this.src(a):E(this,c,a)):this.b.appendChild(u.e("p",{innerHTML:'Sorry, no compatible source and playback technology were found for this video. Try using another browser like <a href="http://bit.ly/ccMUEC">Chrome</a> or download the latest <a href="http://adobe.ly/mwfN1">Adobe Flash Player</a>.'}))}else a instanceof
Object?window.videojs[this.ba].canPlaySource(a)?this.src(a.src):this.src([a]):(this.r.src=a,this.$?(J(this,"src",a),"auto"==this.f.preload&&this.load(),this.f.autoplay&&this.play()):this.M(function(){this.src(a)}));return this};t.load=function(){J(this,"load");return this};t.currentSrc=function(){return I(this,"currentSrc")||this.r.src||""};t.Oa=function(a){return a!==b?(J(this,"setPreload",a),this.f.preload=a,this):I(this,"preload")};
t.autoplay=function(a){return a!==b?(J(this,"setAutoplay",a),this.f.autoplay=a,this):I(this,"autoplay")};t.loop=function(a){return a!==b?(J(this,"setLoop",a),this.f.loop=a,this):I(this,"loop")};t.poster=function(a){a!==b&&(this.rc=a);return this.rc};t.controls=function(a){a!==b&&this.Ea!==a&&(this.Ea=!!a,this.k("controlschange"));return this.Ea};t.error=function(){return I(this,"error")};var M,N,O;O=document.createElement("div");N={};
O.rd!==b?(N.tc="requestFullscreen",N.pb="exitFullscreen",N.Z="fullscreenchange",N.F="fullScreen"):(document.mozCancelFullScreen?(M="moz",N.F=M+"FullScreen"):(M="webkit",N.F=M+"IsFullScreen"),O[M+"RequestFullScreen"]&&(N.tc=M+"RequestFullScreen",N.pb=M+"CancelFullScreen"),N.Z=M+"fullscreenchange");document[N.pb]&&(u.Nb.Ra=N);
u.da=u.c.extend({g:function(a,c){u.c.call(this,a,c);a.controls()||this.disable();a.Q("play",u.bind(this,function(){var a,c=u.bind(this,this.ja),g=u.bind(this,this.Ga);this.ja();"ontouchstart"in window||(this.a.d("mouseover",c),this.a.d("mouseout",g),this.a.d("pause",u.bind(this,this.oc)),this.a.d("play",u.bind(this,this.Ua)));a=l;this.a.d("touchstart",function(){a=f});this.a.d("touchmove",function(){a=l});this.a.d("touchend",u.bind(this,function(c){var e;a&&(e=this.s().className.search("fade-in"),
-1!==e?this.Ga():this.ja());a=l;this.a.paused()||c.preventDefault()}))}))}});u.da.prototype.f={wd:"play",children:{playToggle:{},currentTimeDisplay:{},timeDivider:{},durationDisplay:{},remainingTimeDisplay:{},progressControl:{},fullscreenToggle:{},volumeControl:{},muteToggle:{}}};u.da.prototype.e=function(){return u.e("div",{className:"vjs-control-bar"})};u.da.prototype.ja=function(){u.c.prototype.ja.call(this);this.a.k("controlsvisible")};
u.da.prototype.Ga=function(){u.c.prototype.Ga.call(this);this.a.k("controlshidden")};u.Xb=u.o.extend({g:function(a,c){u.o.call(this,a,c);a.d("play",u.bind(this,this.Jb));a.d("pause",u.bind(this,this.Ib))}});t=u.Xb.prototype;t.pa="Play";t.P=function(){return"vjs-play-control "+u.o.prototype.P.call(this)};t.n=function(){this.a.paused()?this.a.play():this.a.pause()};t.Jb=function(){u.w(this.b,"vjs-paused");u.p(this.b,"vjs-playing");this.b.children[0].children[0].innerHTML="Pause"};
t.Ib=function(){u.w(this.b,"vjs-playing");u.p(this.b,"vjs-paused");this.b.children[0].children[0].innerHTML="Play"};u.Ya=u.c.extend({g:function(a,c){u.c.call(this,a,c);a.d("timeupdate",u.bind(this,this.ya))}});
u.Ya.prototype.e=function(){var a=u.c.prototype.e.call(this,"div",{className:"vjs-current-time vjs-time-controls vjs-control"});this.content=u.e("div",{className:"vjs-current-time-display",innerHTML:'<span class="vjs-control-text">Current Time </span>0:00',"aria-live":"off"});a.appendChild(u.e("div").appendChild(this.content));return a};
u.Ya.prototype.ya=function(){var a=this.a.Mb?this.a.r.currentTime:this.a.currentTime();this.content.innerHTML='<span class="vjs-control-text">Current Time </span>'+u.Ha(a,this.a.duration())};u.Za=u.c.extend({g:function(a,c){u.c.call(this,a,c);a.d("timeupdate",u.bind(this,this.ya))}});
u.Za.prototype.e=function(){var a=u.c.prototype.e.call(this,"div",{className:"vjs-duration vjs-time-controls vjs-control"});this.content=u.e("div",{className:"vjs-duration-display",innerHTML:'<span class="vjs-control-text">Duration Time </span>0:00',"aria-live":"off"});a.appendChild(u.e("div").appendChild(this.content));return a};u.Za.prototype.ya=function(){this.a.duration()&&(this.content.innerHTML='<span class="vjs-control-text">Duration Time </span>'+u.Ha(this.a.duration()))};
u.ac=u.c.extend({g:function(a,c){u.c.call(this,a,c)}});u.ac.prototype.e=function(){return u.c.prototype.e.call(this,"div",{className:"vjs-time-divider",innerHTML:"<div><span>/</span></div>"})};u.gb=u.c.extend({g:function(a,c){u.c.call(this,a,c);a.d("timeupdate",u.bind(this,this.ya))}});
u.gb.prototype.e=function(){var a=u.c.prototype.e.call(this,"div",{className:"vjs-remaining-time vjs-time-controls vjs-control"});this.content=u.e("div",{className:"vjs-remaining-time-display",innerHTML:'<span class="vjs-control-text">Remaining Time </span>-0:00',"aria-live":"off"});a.appendChild(u.e("div").appendChild(this.content));return a};
u.gb.prototype.ya=function(){this.a.duration()&&this.a.duration()&&(this.content.innerHTML='<span class="vjs-control-text">Remaining Time </span>-'+u.Ha(this.a.duration()-this.a.currentTime()))};u.Aa=u.o.extend({g:function(a,c){u.o.call(this,a,c)}});u.Aa.prototype.pa="Fullscreen";u.Aa.prototype.P=function(){return"vjs-fullscreen-control "+u.o.prototype.P.call(this)};
u.Aa.prototype.n=function(){this.a.F?(K(this.a),this.b.children[0].children[0].innerHTML="Fullscreen"):(this.a.Ra(),this.b.children[0].children[0].innerHTML="Non-Fullscreen")};u.fb=u.c.extend({g:function(a,c){u.c.call(this,a,c)}});u.fb.prototype.f={children:{seekBar:{}}};u.fb.prototype.e=function(){return u.c.prototype.e.call(this,"div",{className:"vjs-progress-control vjs-control"})};u.Yb=u.J.extend({g:function(a,c){u.J.call(this,a,c);a.d("timeupdate",u.bind(this,this.xa));a.M(u.bind(this,this.xa))}});
t=u.Yb.prototype;t.f={children:{loadProgressBar:{},playProgressBar:{},seekHandle:{}},barName:"playProgressBar",handleName:"seekHandle"};t.qc="timeupdate";t.e=function(){return u.J.prototype.e.call(this,"div",{className:"vjs-progress-holder","aria-label":"video progress bar"})};t.xa=function(){var a=this.a.Mb?this.a.r.currentTime:this.a.currentTime();this.b.setAttribute("aria-valuenow",u.round(100*this.xb(),2));this.b.setAttribute("aria-valuetext",u.Ha(a,this.a.duration()))};
t.xb=function(){return this.a.currentTime()/this.a.duration()};t.Ma=function(a){u.J.prototype.Ma.call(this,a);this.a.Mb=f;this.nd=!this.a.paused();this.a.pause()};t.Gb=function(a){a=B(this,a)*this.a.duration();a==this.a.duration()&&(a-=0.1);this.a.currentTime(a)};t.Hb=function(a){u.J.prototype.Hb.call(this,a);this.a.Mb=l;this.nd&&this.a.play()};t.wc=function(){this.a.currentTime(this.a.currentTime()+5)};t.vc=function(){this.a.currentTime(this.a.currentTime()-5)};
u.bb=u.c.extend({g:function(a,c){u.c.call(this,a,c);a.d("progress",u.bind(this,this.update))}});u.bb.prototype.e=function(){return u.c.prototype.e.call(this,"div",{className:"vjs-load-progress",innerHTML:'<span class="vjs-control-text">Loaded: 0%</span>'})};u.bb.prototype.update=function(){this.b.style&&(this.b.style.width=u.round(100*G(this.a),2)+"%")};u.Wb=u.c.extend({g:function(a,c){u.c.call(this,a,c)}});
u.Wb.prototype.e=function(){return u.c.prototype.e.call(this,"div",{className:"vjs-play-progress",innerHTML:'<span class="vjs-control-text">Progress: 0%</span>'})};u.hb=u.ha.extend();u.hb.prototype.defaultValue="00:00";u.hb.prototype.e=function(){return u.ha.prototype.e.call(this,"div",{className:"vjs-seek-handle"})};u.kb=u.c.extend({g:function(a,c){u.c.call(this,a,c);a.h&&(a.h.j&&a.h.j.T===l)&&this.p("vjs-hidden");a.d("loadstart",u.bind(this,function(){a.h.j&&a.h.j.T===l?this.p("vjs-hidden"):this.w("vjs-hidden")}))}});
u.kb.prototype.f={children:{volumeBar:{}}};u.kb.prototype.e=function(){return u.c.prototype.e.call(this,"div",{className:"vjs-volume-control vjs-control"})};u.jb=u.J.extend({g:function(a,c){u.J.call(this,a,c);a.d("volumechange",u.bind(this,this.xa));a.M(u.bind(this,this.xa));setTimeout(u.bind(this,this.update),0)}});t=u.jb.prototype;t.xa=function(){this.b.setAttribute("aria-valuenow",u.round(100*this.a.volume(),2));this.b.setAttribute("aria-valuetext",u.round(100*this.a.volume(),2)+"%")};
t.f={children:{volumeLevel:{},volumeHandle:{}},barName:"volumeLevel",handleName:"volumeHandle"};t.qc="volumechange";t.e=function(){return u.J.prototype.e.call(this,"div",{className:"vjs-volume-bar","aria-label":"volume level"})};t.Gb=function(a){this.a.volume(B(this,a))};t.xb=function(){return this.a.muted()?0:this.a.volume()};t.wc=function(){this.a.volume(this.a.volume()+0.1)};t.vc=function(){this.a.volume(this.a.volume()-0.1)};u.bc=u.c.extend({g:function(a,c){u.c.call(this,a,c)}});
u.bc.prototype.e=function(){return u.c.prototype.e.call(this,"div",{className:"vjs-volume-level",innerHTML:'<span class="vjs-control-text"></span>'})};u.lb=u.ha.extend();u.lb.prototype.defaultValue="00:00";u.lb.prototype.e=function(){return u.ha.prototype.e.call(this,"div",{className:"vjs-volume-handle"})};
u.fa=u.o.extend({g:function(a,c){u.o.call(this,a,c);a.d("volumechange",u.bind(this,this.update));a.h&&(a.h.j&&a.h.j.T===l)&&this.p("vjs-hidden");a.d("loadstart",u.bind(this,function(){a.h.j&&a.h.j.T===l?this.p("vjs-hidden"):this.w("vjs-hidden")}))}});u.fa.prototype.e=function(){return u.o.prototype.e.call(this,"div",{className:"vjs-mute-control vjs-control",innerHTML:'<div><span class="vjs-control-text">Mute</span></div>'})};u.fa.prototype.n=function(){this.a.muted(this.a.muted()?l:f)};
u.fa.prototype.update=function(){var a=this.a.volume(),c=3;0===a||this.a.muted()?c=0:0.33>a?c=1:0.67>a&&(c=2);this.a.muted()?"Unmute"!=this.b.children[0].children[0].innerHTML&&(this.b.children[0].children[0].innerHTML="Unmute"):"Mute"!=this.b.children[0].children[0].innerHTML&&(this.b.children[0].children[0].innerHTML="Mute");for(a=0;4>a;a++)u.w(this.b,"vjs-vol-"+a);u.p(this.b,"vjs-vol-"+c)};
u.Ca=u.ea.extend({g:function(a,c){u.ea.call(this,a,c);a.d("volumechange",u.bind(this,this.update));a.h&&(a.h.j&&a.h.j.T===l)&&this.p("vjs-hidden");a.d("loadstart",u.bind(this,function(){a.h.j&&a.h.j.T===l?this.p("vjs-hidden"):this.w("vjs-hidden")}));this.p("vjs-menu-button")}});u.Ca.prototype.Fa=function(){var a=new u.na(this.a,{Ic:"div"}),c=new u.jb(this.a,u.i.B({md:f},this.f.zd));a.X(c);return a};u.Ca.prototype.n=function(){u.fa.prototype.n.call(this);u.ea.prototype.n.call(this)};
u.Ca.prototype.e=function(){return u.o.prototype.e.call(this,"div",{className:"vjs-volume-menu-button vjs-menu-button vjs-control",innerHTML:'<div><span class="vjs-control-text">Mute</span></div>'})};u.Ca.prototype.update=u.fa.prototype.update;u.eb=u.o.extend({g:function(a,c){u.o.call(this,a,c);(!a.poster()||!a.controls())&&this.v();a.d("play",u.bind(this,this.v))}});
u.eb.prototype.e=function(){var a=u.e("div",{className:"vjs-poster",tabIndex:-1}),c=this.a.poster();c&&("backgroundSize"in a.style?a.style.backgroundImage='url("'+c+'")':a.appendChild(u.e("img",{src:c})));return a};u.eb.prototype.n=function(){this.a.play()};
u.Vb=u.c.extend({g:function(a,c){u.c.call(this,a,c);a.d("canplay",u.bind(this,this.v));a.d("canplaythrough",u.bind(this,this.v));a.d("playing",u.bind(this,this.v));a.d("seeked",u.bind(this,this.v));a.d("seeking",u.bind(this,this.show));a.d("seeked",u.bind(this,this.v));a.d("error",u.bind(this,this.show));a.d("waiting",u.bind(this,this.show))}});u.Vb.prototype.e=function(){return u.c.prototype.e.call(this,"div",{className:"vjs-loading-spinner"})};
u.Wa=u.o.extend({g:function(a,c){u.o.call(this,a,c);a.controls()||this.v();a.d("play",u.bind(this,this.v))}});u.Wa.prototype.e=function(){return u.o.prototype.e.call(this,"div",{className:"vjs-big-play-button",innerHTML:"<span></span>","aria-label":"play video"})};u.Wa.prototype.n=function(){this.a.play()};u.q=u.c.extend({g:function(a,c,d){u.c.call(this,a,c,d)}});u.q.prototype.n=u.ab?m():function(){this.a.controls()&&(this.a.paused()?this.a.play():this.a.pause())};u.q.prototype.j={T:f,Ia:l,Lb:l,Ob:l};
u.media={};u.media.Va="play pause paused currentTime setCurrentTime duration buffered volume setVolume muted setMuted width height supportsFullScreen enterFullScreen src load currentSrc preload setPreload autoplay setAutoplay loop setLoop error networkState readyState seeking initialTime startOffsetTime played seekable ended videoTracks audioTracks videoWidth videoHeight textTracks defaultPlaybackRate playbackRate mediaGroup controller controls defaultMuted".split(" ");
function ea(){var a=u.media.Va[i];return function(){throw Error('The "'+a+"\" method is not available on the playback technology's API");}}for(var i=u.media.Va.length-1;0<=i;i--)u.q.prototype[u.media.Va[i]]=ea();
u.m=u.q.extend({g:function(a,c,d){this.j.T=u.m.Hc();this.j.Sc=!u.Ub;this.j.Ia=f;u.q.call(this,a,c,d);(c=c.source)&&this.b.currentSrc==c.src?a.k("loadstart"):c&&(this.b.src=c.src);a.M(function(){this.f.autoplay&&this.paused()&&(this.N.poster=h,this.play())});this.d("click",this.n);for(a=u.m.$a.length-1;0<=a;a--)u.d(this.b,u.m.$a[a],u.bind(this.a,this.Nc));this.Ta()}});t=u.m.prototype;t.C=function(){u.q.prototype.C.call(this)};
t.e=function(){var a=this.a,c=a.N;if(!c||this.j.Sc===l)c?(a.s().removeChild(c),c=c.cloneNode(l)):c=u.e("video",{id:a.id()+"_html5_api",className:"vjs-tech"}),c.player=a,u.yb(c,a.s());for(var d=["autoplay","preload","loop","muted"],e=d.length-1;0<=e;e--){var g=d[e];a.f[g]!==h&&(c[g]=a.f[g])}return c};t.Nc=function(a){this.k(a);a.stopPropagation()};t.play=function(){this.b.play()};t.pause=function(){this.b.pause()};t.paused=function(){return this.b.paused};t.currentTime=function(){return this.b.currentTime};
t.cd=function(a){try{this.b.currentTime=a}catch(c){u.log(c,"Video is not ready. (Video.js)")}};t.duration=function(){return this.b.duration||0};t.buffered=function(){return this.b.buffered};t.volume=function(){return this.b.volume};t.hd=function(a){this.b.volume=a};t.muted=function(){return this.b.muted};t.fd=function(a){this.b.muted=a};t.width=function(){return this.b.offsetWidth};t.height=function(){return this.b.offsetHeight};
t.Sa=function(){return"function"==typeof this.b.webkitEnterFullScreen&&(/Android/.test(u.O)||!/Chrome|Mac OS X 10.5/.test(u.O))?f:l};t.src=function(a){this.b.src=a};t.load=function(){this.b.load()};t.currentSrc=function(){return this.b.currentSrc};t.Oa=function(){return this.b.Oa};t.gd=function(a){this.b.Oa=a};t.autoplay=function(){return this.b.autoplay};t.bd=function(a){this.b.autoplay=a};t.loop=function(){return this.b.loop};t.ed=function(a){this.b.loop=a};t.error=function(){return this.b.error};
u.m.isSupported=function(){return!!document.createElement("video").canPlayType};u.m.ob=function(a){return!!document.createElement("video").canPlayType(a.type)};u.m.Hc=function(){var a=u.ib.volume;u.ib.volume=a/2+0.1;return a!==u.ib.volume};u.m.$a="loadstart suspend abort error emptied stalled loadedmetadata loadeddata canplay canplaythrough playing waiting seeking seeked ended durationchange timeupdate progress play pause ratechange volumechange".split(" ");
u.ab&&3>u.yc&&(document.createElement("video").constructor.prototype.canPlayType=function(a){return a&&-1!=a.toLowerCase().indexOf("video/mp4")?"maybe":""});
u.l=u.q.extend({g:function(a,c,d){u.q.call(this,a,c,d);d=c.source;var e=c.parentEl,g=this.b=u.e("div",{id:a.id()+"_temp_flash"}),j=a.id()+"_flash_api";a=a.f;var k=u.i.B({readyFunction:"videojs.Flash.onReady",eventProxyFunction:"videojs.Flash.onEvent",errorEventProxyFunction:"videojs.Flash.onError",autoplay:a.autoplay,preload:a.Oa,loop:a.loop,muted:a.muted},c.flashVars),q=u.i.B({wmode:"opaque",bgcolor:"#000000"},c.params),n=u.i.B({id:j,name:j,"class":"vjs-tech"},c.attributes);d&&(k.src=encodeURIComponent(u.jc(d.src)));
u.yb(g,e);c.startTime&&this.M(function(){this.load();this.play();this.currentTime(c.startTime)});if(c.iFrameMode===f&&!u.zc){var s=u.e("iframe",{id:j+"_iframe",name:j+"_iframe",className:"vjs-tech",scrolling:"no",marginWidth:0,marginHeight:0,frameBorder:0});k.readyFunction="ready";k.eventProxyFunction="events";k.errorEventProxyFunction="errors";u.d(s,"load",u.bind(this,function(){var a,d=s.contentWindow;a=s.contentDocument?s.contentDocument:s.contentWindow.document;a.write(u.l.kc(c.swf,k,q,n));d.player=
this.a;d.ready=u.bind(this.a,function(c){c=a.getElementById(c);var d=this.h;d.b=c;u.d(c,"click",d.bind(d.n));u.l.qb(d)});d.events=u.bind(this.a,function(a,c){this&&"flash"===this.ba&&this.k(c)});d.errors=u.bind(this.a,function(a,c){u.log("Flash Error",c)})}));g.parentNode.replaceChild(s,g)}else u.l.Mc(c.swf,g,k,q,n)}});t=u.l.prototype;t.C=function(){u.q.prototype.C.call(this)};t.play=function(){this.b.vjs_play()};t.pause=function(){this.b.vjs_pause()};
t.src=function(a){a=u.jc(a);this.b.vjs_src(a);if(this.a.autoplay()){var c=this;setTimeout(function(){c.play()},0)}};t.load=function(){this.b.vjs_load()};t.poster=function(){this.b.vjs_getProperty("poster")};t.buffered=function(){return u.tb(0,this.b.vjs_getProperty("buffered"))};t.Sa=r(l);var P=u.l.prototype,Q="preload currentTime defaultPlaybackRate playbackRate autoplay loop mediaGroup controller controls volume muted defaultMuted".split(" "),R="error currentSrc networkState readyState seeking initialTime duration startOffsetTime paused played seekable ended videoTracks audioTracks videoWidth videoHeight textTracks".split(" ");
function fa(){var a=Q[S],c=a.charAt(0).toUpperCase()+a.slice(1);P["set"+c]=function(c){return this.b.vjs_setProperty(a,c)}}function T(a){P[a]=function(){return this.b.vjs_getProperty(a)}}var S;for(S=0;S<Q.length;S++)T(Q[S]),fa();for(S=0;S<R.length;S++)T(R[S]);u.l.isSupported=function(){return 10<=u.l.version()[0]};u.l.ob=function(a){if(a.type in u.l.Pc)return"maybe"};u.l.Pc={"video/flv":"FLV","video/x-flv":"FLV","video/mp4":"MP4","video/m4v":"MP4"};
u.l.onReady=function(a){a=u.s(a);var c=a.player||a.parentNode.player,d=c.h;a.player=c;d.b=a;d.d("click",d.n);u.l.qb(d)};u.l.qb=function(a){a.s().vjs_getProperty?a.Ta():setTimeout(function(){u.l.qb(a)},50)};u.l.onEvent=function(a,c){u.s(a).player.k(c)};u.l.onError=function(a,c){u.s(a).player.k("error");u.log("Flash Error",c,a)};
u.l.version=function(){var a="0,0,0";try{a=(new window.ActiveXObject("ShockwaveFlash.ShockwaveFlash")).GetVariable("$version").replace(/\D+/g,",").match(/^,?(.+),?$/)[1]}catch(c){try{navigator.mimeTypes["application/x-shockwave-flash"].enabledPlugin&&(a=(navigator.plugins["Shockwave Flash 2.0"]||navigator.plugins["Shockwave Flash"]).description.replace(/\D+/g,",").match(/^,?(.+),?$/)[1])}catch(d){}}return a.split(",")};
u.l.Mc=function(a,c,d,e,g){a=u.l.kc(a,d,e,g);a=u.e("div",{innerHTML:a}).childNodes[0];d=c.parentNode;c.parentNode.replaceChild(a,c);var j=d.childNodes[0];setTimeout(function(){j.style.display="block"},1E3)};
u.l.kc=function(a,c,d,e){var g="",j="",k="";c&&u.i.sa(c,function(a,c){g+=a+"="+c+"&amp;"});d=u.i.B({movie:a,flashvars:g,allowScriptAccess:"always",allowNetworking:"all"},d);u.i.sa(d,function(a,c){j+='<param name="'+a+'" value="'+c+'" />'});e=u.i.B({data:a,width:"100%",height:"100%"},e);u.i.sa(e,function(a,c){k+=a+'="'+c+'" '});return'<object type="application/x-shockwave-flash"'+k+">"+j+"</object>"};
u.Dc=u.c.extend({g:function(a,c,d){u.c.call(this,a,c,d);if(!a.f.sources||0===a.f.sources.length){c=0;for(d=a.f.techOrder;c<d.length;c++){var e=u.Y(d[c]),g=window.videojs[e];if(g&&g.isSupported()){E(a,e);break}}}else a.src(a.f.sources)}});function U(a){a.wa=a.wa||[];return a.wa}function V(a,c,d){for(var e=a.wa,g=0,j=e.length,k,q;g<j;g++)k=e[g],k.id()===c?(k.show(),q=k):d&&(k.H()==d&&0<k.mode())&&k.disable();(c=q?q.H():d?d:l)&&a.k(c+"trackchange")}
u.U=u.c.extend({g:function(a,c){u.c.call(this,a,c);this.L=c.id||"vjs_"+c.kind+"_"+c.language+"_"+u.u++;this.uc=c.src;this.Jc=c["default"]||c.dflt;this.kd=c.title;this.ud=c.srclang;this.Rc=c.label;this.ia=[];this.cc=[];this.ka=this.la=0;this.a.d("fullscreenchange",u.bind(this,this.Ec))}});t=u.U.prototype;t.H=p("A");t.src=p("uc");t.ub=p("Jc");t.title=p("kd");t.label=p("Rc");t.readyState=p("la");t.mode=p("ka");t.Ec=function(){this.b.style.fontSize=this.a.F?140*(screen.width/this.a.width())+"%":""};
t.e=function(){return u.c.prototype.e.call(this,"div",{className:"vjs-"+this.A+" vjs-text-track"})};t.show=function(){W(this);this.ka=2;u.c.prototype.show.call(this)};t.v=function(){W(this);this.ka=1;u.c.prototype.v.call(this)};t.disable=function(){2==this.ka&&this.v();this.a.t("timeupdate",u.bind(this,this.update,this.L));this.a.t("ended",u.bind(this,this.reset,this.L));this.reset();this.a.R.textTrackDisplay.removeChild(this);this.ka=0};
function W(a){0===a.la&&a.load();0===a.ka&&(a.a.d("timeupdate",u.bind(a,a.update,a.L)),a.a.d("ended",u.bind(a,a.reset,a.L)),("captions"===a.A||"subtitles"===a.A)&&a.a.R.textTrackDisplay.X(a))}t.load=function(){0===this.la&&(this.la=1,u.get(this.uc,u.bind(this,this.Zc),u.bind(this,this.Fb)))};t.Fb=function(a){this.error=a;this.la=3;this.k("error")};
t.Zc=function(a){var c,d;a=a.split("\n");for(var e="",g=1,j=a.length;g<j;g++)if(e=u.trim(a[g])){-1==e.indexOf("--\x3e")?(c=e,e=u.trim(a[++g])):c=this.ia.length;c={id:c,index:this.ia.length};d=e.split(" --\x3e ");c.startTime=X(d[0]);c.ta=X(d[1]);for(d=[];a[++g]&&(e=u.trim(a[g]));)d.push(e);c.text=d.join("<br/>");this.ia.push(c)}this.la=2;this.k("loaded")};
function X(a){var c=a.split(":");a=0;var d,e,g;3==c.length?(d=c[0],e=c[1],c=c[2]):(d=0,e=c[0],c=c[1]);c=c.split(/\s+/);c=c.splice(0,1)[0];c=c.split(/\.|,/);g=parseFloat(c[1]);c=c[0];a+=3600*parseFloat(d);a+=60*parseFloat(e);a+=parseFloat(c);g&&(a+=g/1E3);return a}
t.update=function(){if(0<this.ia.length){var a=this.a.currentTime();if(this.Kb===b||a<this.Kb||this.Ja<=a){var c=this.ia,d=this.a.duration(),e=0,g=l,j=[],k,q,n,s;a>=this.Ja||this.Ja===b?s=this.vb!==b?this.vb:0:(g=f,s=this.Cb!==b?this.Cb:c.length-1);for(;;){n=c[s];if(n.ta<=a)e=Math.max(e,n.ta),n.Da&&(n.Da=l);else if(a<n.startTime){if(d=Math.min(d,n.startTime),n.Da&&(n.Da=l),!g)break}else g?(j.splice(0,0,n),q===b&&(q=s),k=s):(j.push(n),k===b&&(k=s),q=s),d=Math.min(d,n.ta),e=Math.max(e,n.startTime),
n.Da=f;if(g)if(0===s)break;else s--;else if(s===c.length-1)break;else s++}this.cc=j;this.Ja=d;this.Kb=e;this.vb=k;this.Cb=q;a=this.cc;c="";d=0;for(e=a.length;d<e;d++)c+='<span class="vjs-tt-cue">'+a[d].text+"</span>";this.b.innerHTML=c;this.k("cuechange")}}};t.reset=function(){this.Ja=0;this.Kb=this.a.duration();this.Cb=this.vb=0};u.Rb=u.U.extend();u.Rb.prototype.A="captions";u.Zb=u.U.extend();u.Zb.prototype.A="subtitles";u.Tb=u.U.extend();u.Tb.prototype.A="chapters";
u.$b=u.c.extend({g:function(a,c,d){u.c.call(this,a,c,d);if(a.f.tracks&&0<a.f.tracks.length){c=this.a;a=a.f.tracks;var e;for(d=0;d<a.length;d++){e=a[d];var g=c,j=e.kind,k=e.label,q=e.language,n=e;e=g.wa=g.wa||[];n=n||{};n.kind=j;n.label=k;n.language=q;j=u.Y(j||"subtitles");g=new window.videojs[j+"Track"](g,n);e.push(g)}}}});u.$b.prototype.e=function(){return u.c.prototype.e.call(this,"div",{className:"vjs-text-track-display"})};
u.W=u.I.extend({g:function(a,c){var d=this.ca=c.track;c.label=d.label();c.selected=d.ub();u.I.call(this,a,c);this.a.d(d.H()+"trackchange",u.bind(this,this.update))}});u.W.prototype.n=function(){u.I.prototype.n.call(this);V(this.a,this.ca.L,this.ca.H())};u.W.prototype.update=function(){2==this.ca.mode()?this.selected(f):this.selected(l)};u.cb=u.W.extend({g:function(a,c){c.track={H:function(){return c.kind},pc:a,label:function(){return c.kind+" off"},ub:r(l),mode:r(l)};u.W.call(this,a,c);this.selected(f)}});
u.cb.prototype.n=function(){u.W.prototype.n.call(this);V(this.a,this.ca.L,this.ca.H())};u.cb.prototype.update=function(){for(var a=U(this.a),c=0,d=a.length,e,g=f;c<d;c++)e=a[c],e.H()==this.ca.H()&&2==e.mode()&&(g=l);g?this.selected(f):this.selected(l)};u.V=u.ea.extend({g:function(a,c){u.ea.call(this,a,c);1>=this.G.length&&this.v()}});
u.V.prototype.sb=function(){var a=[],c;a.push(new u.cb(this.a,{kind:this.A}));for(var d=0;d<U(this.a).length;d++)c=U(this.a)[d],c.H()===this.A&&a.push(new u.W(this.a,{track:c}));return a};u.za=u.V.extend({g:function(a,c,d){u.V.call(this,a,c,d);this.b.setAttribute("aria-label","Captions Menu")}});u.za.prototype.A="captions";u.za.prototype.pa="Captions";u.za.prototype.className="vjs-captions-button";u.Ba=u.V.extend({g:function(a,c,d){u.V.call(this,a,c,d);this.b.setAttribute("aria-label","Subtitles Menu")}});
u.Ba.prototype.A="subtitles";u.Ba.prototype.pa="Subtitles";u.Ba.prototype.className="vjs-subtitles-button";u.Sb=u.V.extend({g:function(a,c,d){u.V.call(this,a,c,d);this.b.setAttribute("aria-label","Chapters Menu")}});t=u.Sb.prototype;t.A="chapters";t.pa="Chapters";t.className="vjs-chapters-button";t.sb=function(){for(var a=[],c,d=0;d<U(this.a).length;d++)c=U(this.a)[d],c.H()===this.A&&a.push(new u.W(this.a,{track:c}));return a};
t.Fa=function(){for(var a=U(this.a),c=0,d=a.length,e,g,j=this.G=[];c<d;c++)if(e=a[c],e.H()==this.A&&e.ub()){if(2>e.readyState()){this.sd=e;e.d("loaded",u.bind(this,this.Fa));return}g=e;break}a=this.ua=new u.na(this.a);a.b.appendChild(u.e("li",{className:"vjs-menu-title",innerHTML:u.Y(this.A),jd:-1}));if(g){e=g.ia;for(var k,c=0,d=e.length;c<d;c++)k=e[c],k=new u.Xa(this.a,{track:g,cue:k}),j.push(k),a.X(k)}0<this.G.length&&this.show();return a};
u.Xa=u.I.extend({g:function(a,c){var d=this.ca=c.track,e=this.cue=c.cue,g=a.currentTime();c.label=e.text;c.selected=e.startTime<=g&&g<e.ta;u.I.call(this,a,c);d.d("cuechange",u.bind(this,this.update))}});u.Xa.prototype.n=function(){u.I.prototype.n.call(this);this.a.currentTime(this.cue.startTime);this.update(this.cue.startTime)};u.Xa.prototype.update=function(){var a=this.cue,c=this.a.currentTime();a.startTime<=c&&c<a.ta?this.selected(f):this.selected(l)};
u.i.B(u.da.prototype.f.children,{subtitlesButton:{},captionsButton:{},chaptersButton:{}});
if("undefined"!==typeof window.JSON&&"function"===window.JSON.parse)u.JSON=window.JSON;else{u.JSON={};var Y=/[\u0000\u00ad\u0600-\u0604\u070f\u17b4\u17b5\u200c-\u200f\u2028-\u202f\u2060-\u206f\ufeff\ufff0-\uffff]/g;u.JSON.parse=function(a,c){function d(a,e){var k,q,n=a[e];if(n&&"object"===typeof n)for(k in n)Object.prototype.hasOwnProperty.call(n,k)&&(q=d(n,k),q!==b?n[k]=q:delete n[k]);return c.call(a,e,n)}var e;a=String(a);Y.lastIndex=0;Y.test(a)&&(a=a.replace(Y,function(a){return"\\u"+("0000"+a.charCodeAt(0).toString(16)).slice(-4)}));
if(/^[\],:{}\s]*$/.test(a.replace(/\\(?:["\\\/bfnrt]|u[0-9a-fA-F]{4})/g,"@").replace(/"[^"\\\n\r]*"|true|false|null|-?\d+(?:\.\d*)?(?:[eE][+\-]?\d+)?/g,"]").replace(/(?:^|:|,)(?:\s*\[)+/g,"")))return e=eval("("+a+")"),"function"===typeof c?d({"":e},""):e;throw new SyntaxError("JSON.parse(): invalid or malformed JSON data");}}
u.dc=function(){var a,c,d=document.getElementsByTagName("video");if(d&&0<d.length)for(var e=0,g=d.length;e<g;e++)if((c=d[e])&&c.getAttribute)c.player===b&&(a=c.getAttribute("data-setup"),a!==h&&(a=u.JSON.parse(a||"{}"),v(c,a)));else{u.mb();break}else u.od||u.mb()};u.mb=function(){setTimeout(u.dc,1)};u.Q(window,"load",function(){u.od=f});u.mb();u.$c=function(a,c){u.ga.prototype[a]=c};var Z=this;Z.pd=f;function $(a,c){var d=a.split("."),e=Z;!(d[0]in e)&&e.execScript&&e.execScript("var "+d[0]);for(var g;d.length&&(g=d.shift());)!d.length&&c!==b?e[g]=c:e=e[g]?e[g]:e[g]={}};$("videojs",u);$("_V_",u);$("videojs.options",u.options);$("videojs.cache",u.qa);$("videojs.Component",u.c);u.c.prototype.dispose=u.c.prototype.C;u.c.prototype.createEl=u.c.prototype.e;u.c.prototype.el=u.c.prototype.s;u.c.prototype.addChild=u.c.prototype.X;u.c.prototype.children=u.c.prototype.children;u.c.prototype.on=u.c.prototype.d;u.c.prototype.off=u.c.prototype.t;u.c.prototype.one=u.c.prototype.Q;u.c.prototype.trigger=u.c.prototype.k;u.c.prototype.triggerReady=u.c.prototype.Ta;
u.c.prototype.show=u.c.prototype.show;u.c.prototype.hide=u.c.prototype.v;u.c.prototype.width=u.c.prototype.width;u.c.prototype.height=u.c.prototype.height;u.c.prototype.dimensions=u.c.prototype.Kc;u.c.prototype.ready=u.c.prototype.M;$("videojs.Player",u.ga);u.ga.prototype.dispose=u.ga.prototype.C;$("videojs.MediaLoader",u.Dc);$("videojs.TextTrackDisplay",u.$b);$("videojs.ControlBar",u.da);$("videojs.Button",u.o);$("videojs.PlayToggle",u.Xb);$("videojs.FullscreenToggle",u.Aa);
$("videojs.BigPlayButton",u.Wa);$("videojs.LoadingSpinner",u.Vb);$("videojs.CurrentTimeDisplay",u.Ya);$("videojs.DurationDisplay",u.Za);$("videojs.TimeDivider",u.ac);$("videojs.RemainingTimeDisplay",u.gb);$("videojs.Slider",u.J);$("videojs.ProgressControl",u.fb);$("videojs.SeekBar",u.Yb);$("videojs.LoadProgressBar",u.bb);$("videojs.PlayProgressBar",u.Wb);$("videojs.SeekHandle",u.hb);$("videojs.VolumeControl",u.kb);$("videojs.VolumeBar",u.jb);$("videojs.VolumeLevel",u.bc);
$("videojs.VolumeHandle",u.lb);$("videojs.MuteToggle",u.fa);$("videojs.PosterImage",u.eb);$("videojs.Menu",u.na);$("videojs.MenuItem",u.I);$("videojs.SubtitlesButton",u.Ba);$("videojs.CaptionsButton",u.za);$("videojs.ChaptersButton",u.Sb);$("videojs.MediaTechController",u.q);u.q.prototype.features=u.q.prototype.j;u.q.prototype.j.volumeControl=u.q.prototype.j.T;u.q.prototype.j.fullscreenResize=u.q.prototype.j.Ia;u.q.prototype.j.progressEvents=u.q.prototype.j.Lb;u.q.prototype.j.timeupdateEvents=u.q.prototype.j.Ob;
$("videojs.Html5",u.m);u.m.Events=u.m.$a;u.m.isSupported=u.m.isSupported;u.m.canPlaySource=u.m.ob;u.m.prototype.setCurrentTime=u.m.prototype.cd;u.m.prototype.setVolume=u.m.prototype.hd;u.m.prototype.setMuted=u.m.prototype.fd;u.m.prototype.setPreload=u.m.prototype.gd;u.m.prototype.setAutoplay=u.m.prototype.bd;u.m.prototype.setLoop=u.m.prototype.ed;$("videojs.Flash",u.l);u.l.isSupported=u.l.isSupported;u.l.canPlaySource=u.l.ob;u.l.onReady=u.l.onReady;$("videojs.TextTrack",u.U);u.U.prototype.label=u.U.prototype.label;
$("videojs.CaptionsTrack",u.Rb);$("videojs.SubtitlesTrack",u.Zb);$("videojs.ChaptersTrack",u.Tb);$("videojs.autoSetup",u.dc);$("videojs.plugin",u.$c);$("videojs.createTimeRange",u.tb);})();//@ sourceMappingURL=video.js.map

View file

@ -37,7 +37,12 @@ function attach_init(&$a) {
// Use quotes around the filename to prevent a "multiple Content-Disposition"
// error in Chrome for filenames with commas in them
header('Content-type: ' . $r[0]['filetype']);
header('Content-disposition: attachment; filename="' . $r[0]['filename'] . '"');
header('Content-length: ' . $r[0]['filesize']);
if(isset($_GET['attachment']) && $_GET['attachment'] === '0')
header('Content-disposition: filename="' . $r[0]['filename'] . '"');
else
header('Content-disposition: attachment; filename="' . $r[0]['filename'] . '"');
echo $r[0]['data'];
killme();
// NOTREACHED

View file

@ -29,7 +29,7 @@ function dfrn_poll_init(&$a) {
if(($dfrn_id === '') && (! x($_POST,'dfrn_id'))) {
if((get_config('system','block_public')) && (! local_user()) && (! remote_user())) {
killme();
http_status_exit(403);
}
$user = '';
@ -37,8 +37,10 @@ function dfrn_poll_init(&$a) {
$r = q("SELECT `hidewall`,`nickname` FROM `user` WHERE `user`.`nickname` = '%s' LIMIT 1",
dbesc($a->argv[1])
);
if((! count($r)) || (count($r) && $r[0]['hidewall']))
killme();
if(! $r)
http_status_exit(404);
if(($r[0]['hidewall']) && (! local_user()))
http_status_exit(403);
$user = $r[0]['nickname'];
}

View file

@ -43,7 +43,7 @@ function display_content(&$a, $update = 0) {
$a->profile = array('uid' => intval($update), 'profile_uid' => intval($update));
}
else {
$item_id = (($a->argc > 2) ? intval($a->argv[2]) : 0);
$item_id = (($a->argc > 2) ? $a->argv[2] : 0);
}
if(! $item_id) {
@ -142,16 +142,46 @@ function display_content(&$a, $update = 0) {
WHERE `item`.`uid` = %d AND `item`.`visible` = 1 AND `item`.`deleted` = 0
and `item`.`moderated` = 0
AND `contact`.`blocked` = 0 AND `contact`.`pending` = 0
AND `item`.`parent` = ( SELECT `parent` FROM `item` WHERE ( `id` = '%s' OR `uri` = '%s' ))
AND `item`.`parent` = ( SELECT `parent` FROM `item` WHERE ( `id` = '%s' OR `uri` = '%s' )
AND uid = %d )
$sql_extra
ORDER BY `parent` DESC, `gravity` ASC, `id` ASC ",
intval($a->profile['uid']),
dbesc($item_id),
dbesc($item_id)
dbesc($item_id),
intval($a->profile['uid'])
);
if(!$r && local_user()) {
// Check if this is another person's link to a post that we have
$r = q("SELECT `item`.uri FROM `item`
WHERE (`item`.`id` = '%s' OR `item`.`uri` = '%s' )
LIMIT 1",
dbesc($item_id),
dbesc($item_id)
);
if($r) {
$item_uri = $r[0]['uri'];
if(count($r)) {
$r = q("SELECT `item`.*, `item`.`id` AS `item_id`,
`contact`.`name`, `contact`.`photo`, `contact`.`url`, `contact`.`rel`,
`contact`.`network`, `contact`.`thumb`, `contact`.`self`, `contact`.`writable`,
`contact`.`id` AS `cid`, `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 `item`.`moderated` = 0
AND `contact`.`blocked` = 0 AND `contact`.`pending` = 0
AND `item`.`parent` = ( SELECT `parent` FROM `item` WHERE `uri` = '%s' AND uid = %d )
ORDER BY `parent` DESC, `gravity` ASC, `id` ASC ",
intval(local_user()),
dbesc($item_uri),
intval(local_user())
);
}
}
if($r) {
if((local_user()) && (local_user() == $a->profile['uid'])) {
q("UPDATE `item` SET `unseen` = 0
@ -171,15 +201,17 @@ function display_content(&$a, $update = 0) {
require_once("include/html2plain.php");
$description = trim(html2plain(bbcode($r[0]["body"], false, false), 0, true));
$title = trim(html2plain(bbcode($r[0]["title"], false, false), 0, true));
$author_name = $r[0]["author-name"];
if ($title == "")
$title = $author_name;
$description = htmlspecialchars($description, ENT_COMPAT, 'UTF-8', true); // allow double encoding here
$title = htmlspecialchars($title, ENT_COMPAT, 'UTF-8', true); // allow double encoding here
if ($title == "")
$title = $r[0]["author-name"];
$author_name = htmlspecialchars($author_name, ENT_COMPAT, 'UTF-8', true); // allow double encoding here
//<meta name="keywords" content="">
$a->page['htmlhead'] .= '<meta name="author" content="'.$r[0]["author-name"].'" />'."\n";
$a->page['htmlhead'] .= '<meta name="author" content="'.$author_name.'" />'."\n";
$a->page['htmlhead'] .= '<meta name="title" content="'.$title.'" />'."\n";
$a->page['htmlhead'] .= '<meta name="fulltitle" content="'.$title.'" />'."\n";
$a->page['htmlhead'] .= '<meta name="description" content="'.$description.'" />'."\n";
@ -192,27 +224,26 @@ function display_content(&$a, $update = 0) {
//<meta property="og:image" content="" />
$a->page['htmlhead'] .= '<meta property="og:url" content="'.$r[0]["plink"].'" />'."\n";
$a->page['htmlhead'] .= '<meta property="og:description" content="'.$description.'" />'."\n";
$a->page['htmlhead'] .= '<meta name="og:article:author" content="'.$r[0]["author-name"].'" />'."\n";
$a->page['htmlhead'] .= '<meta name="og:article:author" content="'.$author_name.'" />'."\n";
// article:tag
return $o;
}
$r = q("SELECT `id`,`deleted` FROM `item` WHERE `id` = '%s' OR `uri` = '%s' LIMIT 1",
dbesc($item_id),
dbesc($item_id)
);
if($r) {
if($r[0]['deleted']) {
notice( t('Item has been removed.') . EOL );
}
else {
notice( t('Permission denied.') . EOL );
}
}
else {
$r = q("SELECT `id`,`deleted` FROM `item` WHERE `id` = '%s' OR `uri` = '%s' LIMIT 1",
dbesc($item_id),
dbesc($item_id)
);
if(count($r)) {
if($r[0]['deleted']) {
notice( t('Item has been removed.') . EOL );
}
else {
notice( t('Permission denied.') . EOL );
}
}
else {
notice( t('Item not found.') . EOL );
}
notice( t('Item not found.') . EOL );
}
return $o;

View file

@ -44,6 +44,9 @@ function item_post(&$a) {
logger('postvars ' . print_r($_REQUEST,true), LOGGER_DATA);
$api_source = ((x($_REQUEST,'api_source') && $_REQUEST['api_source']) ? true : false);
$message_id = ((x($_REQUEST,'message_id') && $api_source) ? strip_tags($_REQUEST['message_id']) : '');
$return_path = ((x($_REQUEST,'return')) ? $_REQUEST['return'] : '');
$preview = ((x($_REQUEST,'preview')) ? intval($_REQUEST['preview']) : 0);
@ -590,7 +593,7 @@ function item_post(&$a) {
$notify_type = (($parent) ? 'comment-new' : 'wall-new' );
$uri = item_new_uri($a->get_hostname(),$profile_uid);
$uri = (($message_id) ? $message_id : item_new_uri($a->get_hostname(),$profile_uid));
// Fallback so that we alway have a thr-parent
if(!$thr_parent)

View file

@ -740,8 +740,17 @@ function network_content(&$a, $update = 0) {
}
}
$itemspage_network = get_pconfig(local_user(),'system','itemspage_network');
$itemspage_network = ((intval($itemspage_network)) ? $itemspage_network : 40);
// check if we serve a mobile device and get the user settings
// accordingly
if ($a->is_mobile) {
$itemspage_network = get_pconfig(local_user(),'system','itemspage_mobile_network');
$itemspage_network = ((intval($itemspage_network)) ? $itemspage_network : 20);
} else {
$itemspage_network = get_pconfig(local_user(),'system','itemspage_network');
$itemspage_network = ((intval($itemspage_network)) ? $itemspage_network : 40);
}
// now that we have the user settings, see if the theme forces
// a maximum item number which is lower then the user choice
if(($a->force_max_items > 0) && ($a->force_max_items < $itemspage_network))
$itemspage_network = $a->force_max_items;

View file

@ -258,8 +258,17 @@ function profile_content(&$a, $update = 0) {
}
}
$itemspage_network = get_pconfig(local_user(),'system','itemspage_network');
$itemspage_network = ((intval($itemspage_network)) ? $itemspage_network : 40);
// check if we serve a mobile device and get the user settings
// accordingly
if ($a->is_mobile) {
$itemspage_network = get_pconfig(local_user(),'system','itemspage_mobile_network');
$itemspage_network = ((intval($itemspage_network)) ? $itemspage_network : 20);
} else {
$itemspage_network = get_pconfig(local_user(),'system','itemspage_network');
$itemspage_network = ((intval($itemspage_network)) ? $itemspage_network : 40);
}
// now that we have the user settings, see if the theme forces
// a maximum item number which is lower then the user choice
if(($a->force_max_items > 0) && ($a->force_max_items < $itemspage_network))
$itemspage_network = $a->force_max_items;

View file

@ -455,6 +455,10 @@ function profiles_post(&$a) {
dbesc(datetime_convert()),
intval(local_user())
);
$r = q("UPDATE `user` set `username` = '%s' where `uid` = %d limit 1",
dbesc($name),
intval(local_user())
);
}
if($is_default) {

View file

@ -263,6 +263,9 @@ function settings_post(&$a) {
$itemspage_network = ((x($_POST,'itemspage_network')) ? intval($_POST['itemspage_network']) : 40);
if($itemspage_network > 100)
$itemspage_network = 100;
$itemspage_mobile_network = ((x($_POST,'itemspage_mobile_network')) ? intval($_POST['itemspage_mobile_network']) : 20);
if($itemspage_mobile_network > 100)
$itemspage_mobile_network = 100;
if($mobile_theme !== '') {
@ -271,6 +274,7 @@ function settings_post(&$a) {
set_pconfig(local_user(),'system','update_interval', $browser_update);
set_pconfig(local_user(),'system','itemspage_network', $itemspage_network);
set_pconfig(local_user(),'system','itemspage_mobile_network', $itemspage_mobile_network);
set_pconfig(local_user(),'system','no_smilies',$nosmile);
@ -300,7 +304,8 @@ function settings_post(&$a) {
if((x($_POST,'npassword')) || (x($_POST,'confirm'))) {
$newpass = $_POST['npassword'];
$confirm = $_POST['confirm'];
$confirm = $_POST['confirm'];
$oldpass = hash('whirlpool', $_POST['opassword']);
$err = false;
if($newpass != $confirm ) {
@ -311,7 +316,15 @@ function settings_post(&$a) {
if((! x($newpass)) || (! x($confirm))) {
notice( t('Empty passwords are not allowed. Password unchanged.') . EOL);
$err = true;
}
}
// check if the old password was supplied correctly before
// changing it to the new value
$r = q("SELECT `password` FROM `user`WHERE `uid` = %d LIMIT 1", intval(local_user()));
if( $oldpass != $r[0]['password'] ) {
notice( t('Wrong password.') . EOL);
$err = true;
}
if(! $err) {
$password = hash('whirlpool',$newpass);
@ -394,8 +407,17 @@ function settings_post(&$a) {
if($email != $a->user['email']) {
$email_changed = true;
// check for the correct password
$r = q("SELECT `password` FROM `user`WHERE `uid` = %d LIMIT 1", intval(local_user()));
$password = hash('whirlpool', $_POST['password']);
if ($password != $r[0]['password']) {
$err .= t('Wrong Password') . EOL;
$email = $a->user['email'];
}
// check the email is valid
if(! valid_email($email))
$err .= t(' Not valid email.');
$err .= t(' Not valid email.');
// ensure new email is not the admin mail
if((x($a->config,'admin_email')) && (strcasecmp($email,$a->config['admin_email']) == 0)) {
$err .= t(' Cannot change to that email.');
$email = $a->user['email'];
@ -489,10 +511,12 @@ function settings_post(&$a) {
$r = q("UPDATE `profile`
SET `publish` = %d,
`name` = '%s',
`net-publish` = %d,
`hide-friends` = %d
WHERE `is-default` = 1 AND `uid` = %d LIMIT 1",
intval($publish),
dbesc($username),
intval($net_publish),
intval($hide_friends),
intval(local_user())
@ -793,6 +817,8 @@ function settings_content(&$a) {
$itemspage_network = intval(get_pconfig(local_user(), 'system','itemspage_network'));
$itemspage_network = (($itemspage_network > 0 && $itemspage_network < 101) ? $itemspage_network : 40); // default if not set: 40 items
$itemspage_mobile_network = intval(get_pconfig(local_user(), 'system','itemspage_mobile_network'));
$itemspage_mobile_network = (($itemspage_mobile_network > 0 && $itemspage_mobile_network < 101) ? $itemspage_mobile_network : 20); // default if not set: 20 items
$nosmile = get_pconfig(local_user(),'system','no_smilies');
$nosmile = (($nosmile===false)? '0': $nosmile); // default if not set: 0
@ -816,6 +842,7 @@ function settings_content(&$a) {
'$mobile_theme' => array('mobile_theme', t('Mobile Theme:'), $mobile_theme_selected, '', $mobile_themes, false),
'$ajaxint' => array('browser_update', t("Update browser every xx seconds"), $browser_update, t('Minimum of 10 seconds, no maximum')),
'$itemspage_network' => array('itemspage_network', t("Number of items to display per page:"), $itemspage_network, t('Maximum of 100 items')),
'$itemspage_mobile_network' => array('itemspage_mobile_network', t("Number of items to display per page when viewed from mobile device:"), $itemspage_mobile_network, t('Maximum of 100 items')),
'$nosmile' => array('nosmile', t("Don't show emoticons"), $nosmile, ''),
'$theme_config' => $theme_config,
@ -1043,6 +1070,8 @@ function settings_content(&$a) {
'$h_pass' => t('Password Settings'),
'$password1'=> array('npassword', t('New Password:'), '', ''),
'$password2'=> array('confirm', t('Confirm:'), '', t('Leave password fields blank unless changing')),
'$password3'=> array('opassword', t('Current Password:'), '', t('Your current password to confirm the changes')),
'$password4'=> array('password', t('Password:'), '', t('Your current password to confirm the changes')),
'$oid_enable' => (! get_config('system','no_openid')),
'$openid' => $openid_field,

327
mod/videos.php Normal file
View file

@ -0,0 +1,327 @@
<?php
require_once('include/items.php');
require_once('include/acl_selectors.php');
require_once('include/bbcode.php');
require_once('include/security.php');
require_once('include/redir.php');
function videos_init(&$a) {
if($a->argc > 1)
auto_redir($a, $a->argv[1]);
if((get_config('system','block_public')) && (! local_user()) && (! remote_user())) {
return;
}
$o = '';
if($a->argc > 1) {
$nick = $a->argv[1];
$r = q("SELECT * FROM `user` WHERE `nickname` = '%s' AND `blocked` = 0 LIMIT 1",
dbesc($nick)
);
if(! count($r))
return;
$a->data['user'] = $r[0];
$o .= '<div class="vcard">';
$o .= '<div class="fn">' . $a->data['user']['username'] . '</div>';
$o .= '<div id="profile-photo-wrapper"><img class="photo" style="width: 175px; height: 175px;" src="' . $a->get_cached_avatar_image($a->get_baseurl() . '/photo/profile/' . $a->data['user']['uid'] . '.jpg') . '" alt="' . $a->data['user']['username'] . '" /></div>';
$o .= '</div>';
/*$sql_extra = permissions_sql($a->data['user']['uid']);
$albums = q("SELECT distinct(`album`) AS `album` FROM `photo` WHERE `uid` = %d $sql_extra order by created desc",
intval($a->data['user']['uid'])
);
if(count($albums)) {
$a->data['albums'] = $albums;
$albums_visible = ((intval($a->data['user']['hidewall']) && (! local_user()) && (! remote_user())) ? false : true);
if($albums_visible) {
$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></h3>';
$o .= '<ul>';
foreach($albums as $album) {
// 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')))
continue;
$o .= '<li>' . '<a href="photos/' . $a->argv[1] . '/album/' . bin2hex($album['album']) . '" >' . $album['album'] . '</a></li>';
}
$o .= '</ul>';
}
if(local_user() && $a->data['user']['uid'] == local_user()) {
$o .= '<div id="photo-albums-upload-link"><a href="' . $a->get_baseurl() . '/photos/' . $a->data['user']['nickname'] . '/upload" >' .t('Upload New Photos') . '</a></div>';
}
$o .= '</div>';
}*/
if(! x($a->page,'aside'))
$a->page['aside'] = '';
$a->page['aside'] .= $o;
$tpl = get_markup_template("videos_head.tpl");
$a->page['htmlhead'] .= replace_macros($tpl,array(
'$baseurl' => $a->get_baseurl(),
));
$tpl = get_markup_template("videos_end.tpl");
$a->page['end'] .= replace_macros($tpl,array(
'$baseurl' => $a->get_baseurl(),
));
}
return;
}
function videos_post(&$a) {
return;
// DELETED -- look at mod/photos.php if you want to implement
}
function videos_content(&$a) {
// URLs (most aren't currently implemented):
// videos/name
// videos/name/upload
// videos/name/upload/xxxxx (xxxxx is album name)
// videos/name/album/xxxxx
// videos/name/album/xxxxx/edit
// videos/name/video/xxxxx
// videos/name/video/xxxxx/edit
if((get_config('system','block_public')) && (! local_user()) && (! remote_user())) {
notice( t('Public access denied.') . EOL);
return;
}
require_once('include/bbcode.php');
require_once('include/security.php');
require_once('include/conversation.php');
if(! x($a->data,'user')) {
notice( t('No videos selected') . EOL );
return;
}
//$phototypes = Photo::supportedTypes();
$_SESSION['video_return'] = $a->cmd;
//
// Parse arguments
//
if($a->argc > 3) {
$datatype = $a->argv[2];
$datum = $a->argv[3];
}
elseif(($a->argc > 2) && ($a->argv[2] === 'upload'))
$datatype = 'upload';
else
$datatype = 'summary';
if($a->argc > 4)
$cmd = $a->argv[4];
else
$cmd = 'view';
//
// Setup permissions structures
//
$can_post = false;
$visitor = 0;
$contact = null;
$remote_contact = false;
$contact_id = 0;
$owner_uid = $a->data['user']['uid'];
$community_page = (($a->data['user']['page-flags'] == PAGE_COMMUNITY) ? true : false);
if((local_user()) && (local_user() == $owner_uid))
$can_post = true;
else {
if($community_page && remote_user()) {
if(is_array($_SESSION['remote'])) {
foreach($_SESSION['remote'] as $v) {
if($v['uid'] == $owner_uid) {
$contact_id = $v['cid'];
break;
}
}
}
if($contact_id) {
$r = q("SELECT `uid` FROM `contact` WHERE `blocked` = 0 AND `pending` = 0 AND `id` = %d AND `uid` = %d LIMIT 1",
intval($contact_id),
intval($owner_uid)
);
if(count($r)) {
$can_post = true;
$contact = $r[0];
$remote_contact = true;
$visitor = $cid;
}
}
}
}
// perhaps they're visiting - but not a community page, so they wouldn't have write access
if(remote_user() && (! $visitor)) {
$contact_id = 0;
if(is_array($_SESSION['remote'])) {
foreach($_SESSION['remote'] as $v) {
if($v['uid'] == $owner_uid) {
$contact_id = $v['cid'];
break;
}
}
}
if($contact_id) {
$groups = init_groups_visitor($contact_id);
$r = q("SELECT * FROM `contact` WHERE `blocked` = 0 AND `pending` = 0 AND `id` = %d AND `uid` = %d LIMIT 1",
intval($contact_id),
intval($owner_uid)
);
if(count($r)) {
$contact = $r[0];
$remote_contact = true;
}
}
}
if(! $remote_contact) {
if(local_user()) {
$contact_id = $_SESSION['cid'];
$contact = $a->contact;
}
}
if($a->data['user']['hidewall'] && (local_user() != $owner_uid) && (! $remote_contact)) {
notice( t('Access to this item is restricted.') . EOL);
return;
}
$sql_extra = permissions_sql($owner_uid,$remote_contact,$groups);
$o = "";
// tabs
$_is_owner = (local_user() && (local_user() == $owner_uid));
$o .= profile_tabs($a,$_is_owner, $a->data['user']['nickname']);
//
// dispatch request
//
if($datatype === 'upload') {
return; // no uploading for now
// DELETED -- look at mod/photos.php if you want to implement
}
if($datatype === 'album') {
return; // no albums for now
// DELETED -- look at mod/photos.php if you want to implement
}
if($datatype === 'video') {
return; // no single video view for now
// DELETED -- look at mod/photos.php if you want to implement
}
// Default - show recent videos (no upload link for now)
//$o = '';
$r = q("SELECT hash FROM `attach` WHERE `uid` = %d AND filetype LIKE '%%video%%'
$sql_extra GROUP BY hash",
intval($a->data['user']['uid'])
);
if(count($r)) {
$a->set_pager_total(count($r));
$a->set_pager_itemspage(20);
}
$r = q("SELECT hash, `id`, `filename`, filetype FROM `attach`
WHERE `uid` = %d AND filetype LIKE '%%video%%'
$sql_extra GROUP BY hash ORDER BY `created` DESC LIMIT %d , %d",
intval($a->data['user']['uid']),
intval($a->pager['start']),
intval($a->pager['itemspage'])
);
$videos = array();
if(count($r)) {
foreach($r as $rr) {
if($a->theme['template_engine'] === 'internal') {
$alt_e = template_escape($rr['filename']);
$name_e = template_escape($rr['album']);
}
else {
$alt_e = $rr['filename'];
$name_e = $rr['album'];
}
$videos[] = array(
'id' => $rr['id'],
'link' => $a->get_baseurl() . '/videos/' . $a->data['user']['nickname'] . '/video/' . $rr['resource-id'],
'title' => t('View Video'),
'src' => $a->get_baseurl() . '/attach/' . $rr['id'] . '?attachment=0',
'alt' => $alt_e,
'mime' => $rr['filetype'],
'album' => array(
'link' => $a->get_baseurl() . '/videos/' . $a->data['user']['nickname'] . '/album/' . bin2hex($rr['album']),
'name' => $name_e,
'alt' => t('View Album'),
),
);
}
}
$tpl = get_markup_template('videos_recent.tpl');
$o .= replace_macros($tpl, array(
'$title' => t('Recent Videos'),
'$can_post' => $can_post,
'$upload' => array(t('Upload New Videos'), $a->get_baseurl().'/videos/'.$a->data['user']['nickname'].'/upload'),
'$videos' => $videos,
));
$o .= paginate($a);
return $o;
}

View file

@ -529,7 +529,7 @@ class Item extends BaseObject {
*/
public function get_data_value($name) {
if(!isset($this->data[$name])) {
logger('[ERROR] Item::get_data_value : Item has no value name "'. $name .'".', LOGGER_DEBUG);
// logger('[ERROR] Item::get_data_value : Item has no value name "'. $name .'".', LOGGER_DEBUG);
return false;
}

11
object/TemplateEngine.php Normal file
View file

@ -0,0 +1,11 @@
<?php
require_once 'boot.php';
/**
* Interface for template engines
*/
interface ITemplateEngine {
public function replace_macros($s,$v);
public function get_template_file($file, $root='');
}

View file

@ -26,7 +26,7 @@ echo "New DB VERSION: " . DB_UPDATE_VERSION . "\n";
if($build != DB_UPDATE_VERSION) {
echo "Updating database...";
check_config($a);
check_db($a);
echo "Done\n";
}

File diff suppressed because it is too large Load diff

View file

@ -1,5 +1,7 @@
#!/bin/bash
command -v uglifyjs >/dev/null 2>&1 || { echo >&2 "I require UglifyJS but it's not installed. Aborting."; exit 1; }
MINIFY_CMD=uglifyjs
JSFILES=(

View file

@ -1 +0,0 @@
<h1>$message</h1>

View file

@ -1,26 +0,0 @@
<div id="acl-wrapper">
<input id="acl-search">
<a href="#" id="acl-showall">$showall</a>
<div id="acl-list">
<div id="acl-list-content">
</div>
</div>
<span id="acl-fields"></span>
</div>
<div class="acl-list-item" rel="acl-template" style="display:none">
<img data-src="{0}"><p>{1}</p>
<a href="#" class='acl-button-show'>$show</a>
<a href="#" class='acl-button-hide'>$hide</a>
</div>
<script>
$(document).ready(function() {
if(typeof acl=="undefined"){
acl = new ACL(
baseurl+"/acl",
[ $allowcid,$allowgid,$denycid,$denygid ]
);
}
});
</script>

View file

@ -1,42 +0,0 @@
<script>
// update pending count //
$(function(){
$("nav").bind('nav-update', function(e,data){
var elm = $('#pending-update');
var register = $(data).find('register').text();
if (register=="0") { register=""; elm.hide();} else { elm.show(); }
elm.html(register);
});
});
</script>
<h4><a href="$admurl">$admtxt</a></h4>
<ul class='admin linklist'>
<li class='admin link button $admin.site.2'><a href='$admin.site.0'>$admin.site.1</a></li>
<li class='admin link button $admin.users.2'><a href='$admin.users.0'>$admin.users.1</a><span id='pending-update' title='$h_pending'></span></li>
<li class='admin link button $admin.plugins.2'><a href='$admin.plugins.0'>$admin.plugins.1</a></li>
<li class='admin link button $admin.themes.2'><a href='$admin.themes.0'>$admin.themes.1</a></li>
<li class='admin link button $admin.dbsync.2'><a href='$admin.dbsync.0'>$admin.dbsync.1</a></li>
</ul>
{{ if $admin.update }}
<ul class='admin linklist'>
<li class='admin link button $admin.update.2'><a href='$admin.update.0'>$admin.update.1</a></li>
<li class='admin link button $admin.update.2'><a href='https://kakste.com/profile/inthegit'>Important Changes</a></li>
</ul>
{{ endif }}
{{ if $admin.plugins_admin }}<h4>$plugadmtxt</h4>{{ endif }}
<ul class='admin linklist'>
{{ for $admin.plugins_admin as $l }}
<li class='admin link button $l.2'><a href='$l.0'>$l.1</a></li>
{{ endfor }}
</ul>
<h4>$logtxt</h4>
<ul class='admin linklist'>
<li class='admin link button $admin.logs.2'><a href='$admin.logs.0'>$admin.logs.1</a></li>
</ul>

View file

@ -1,19 +0,0 @@
<div id='adminpage'>
<h1>$title - $page</h1>
<form action="$baseurl/admin/logs" method="post">
<input type='hidden' name='form_security_token' value='$form_security_token'>
{{ inc field_checkbox.tpl with $field=$debugging }}{{ endinc }}
{{ inc field_input.tpl with $field=$logfile }}{{ endinc }}
{{ inc field_select.tpl with $field=$loglevel }}{{ endinc }}
<div class="submit"><input type="submit" name="page_logs" value="$submit" /></div>
</form>
<h3>$logname</h3>
<div style="width:100%; height:400px; overflow: auto; "><pre>$data</pre></div>
<!-- <iframe src='$baseurl/$logname' style="width:100%; height:400px"></iframe> -->
<!-- <div class="submit"><input type="submit" name="page_logs_clear_log" value="$clear" /></div> -->
</div>

View file

@ -1,15 +0,0 @@
<div id='adminpage'>
<h1>$title - $page</h1>
<ul id='pluginslist'>
{{ for $plugins as $p }}
<li class='plugin $p.1'>
<a class='toggleplugin' href='$baseurl/admin/$function/$p.0?a=t&amp;t=$form_security_token' title="{{if $p.1==on }}Disable{{ else }}Enable{{ endif }}" ><span class='icon $p.1'></span></a>
<a href='$baseurl/admin/$function/$p.0'><span class='name'>$p.2.name</span></a> - <span class="version">$p.2.version</span>
{{ if $p.2.experimental }} $experimental {{ endif }}{{ if $p.2.unsupported }} $unsupported {{ endif }}
<div class='desc'>$p.2.description</div>
</li>
{{ endfor }}
</ul>
</div>

View file

@ -1,36 +0,0 @@
<div id='adminpage'>
<h1>$title - $page</h1>
<p><span class='toggleplugin icon $status'></span> $info.name - $info.version : <a href="$baseurl/admin/$function/$plugin/?a=t&amp;t=$form_security_token">$action</a></p>
<p>$info.description</p>
<p class="author">$str_author
{{ for $info.author as $a }}
{{ if $a.link }}<a href="$a.link">$a.name</a>{{ else }}$a.name{{ endif }},
{{ endfor }}
</p>
<p class="maintainer">$str_maintainer
{{ for $info.maintainer as $a }}
{{ if $a.link }}<a href="$a.link">$a.name</a>{{ else }}$a.name{{ endif }},
{{ endfor }}
</p>
{{ if $screenshot }}
<a href="$screenshot.0" class='screenshot'><img src="$screenshot.0" alt="$screenshot.1" /></a>
{{ endif }}
{{ if $admin_form }}
<h3>$settings</h3>
<form method="post" action="$baseurl/admin/$function/$plugin/">
$admin_form
</form>
{{ endif }}
{{ if $readme }}
<h3>Readme</h3>
<div id="plugin_readme">
$readme
</div>
{{ endif }}
</div>

View file

@ -1,98 +0,0 @@
<script src="js/jquery.htmlstream.js"></script>
<script>
/* ajax updater */
function updateEnd(data){
//$("#updatepopup .panel_text").html(data);
$("#remoteupdate_form").find("input").removeAttr('disabled');
$(".panel_action_close").fadeIn()
}
function updateOn(data){
var patt=/§([^§]*)§/g;
var matches = data.match(patt);
$(matches).each(function(id,data){
data = data.replace(/§/g,"");
d = data.split("@");
console.log(d);
elm = $("#updatepopup .panel_text #"+d[0]);
html = "<div id='"+d[0]+"' class='progress'>"+d[1]+"<span>"+d[2]+"</span></div>";
if (elm.length==0){
$("#updatepopup .panel_text").append(html);
} else {
$(elm).replaceWith(html);
}
});
}
$(function(){
$("#remoteupdate_form").submit(function(){
var data={};
$(this).find("input").each(function(i, e){
name = $(e).attr('name');
value = $(e).val();
e.disabled = true;
data[name]=value;
});
$("#updatepopup .panel_text").html("");
$("#updatepopup").show();
$("#updatepopup .panel").hide().slideDown(500);
$(".panel_action_close").hide().click(function(){
$("#updatepopup .panel").slideUp(500, function(){
$("#updatepopup").hide();
});
});
$.post(
$(this).attr('action'),
data,
updateEnd,
'text',
updateOn
);
return false;
})
});
</script>
<div id="updatepopup" class="popup">
<div class="background"></div>
<div class="panel">
<div class="panel_in">
<h1>Friendica Update</h1>
<div class="panel_text"></div>
<div class="panel_actions">
<input type="button" value="$close" class="panel_action_close">
</div>
</div>
</div>
</div>
<div id="adminpage">
<dl> <dt>Your version:</dt><dd>$localversion</dd> </dl>
{{ if $needupdate }}
<dl> <dt>New version:</dt><dd>$remoteversion</dd> </dl>
<form id="remoteupdate_form" method="POST" action="$baseurl/admin/update">
<input type="hidden" name="$remotefile.0" value="$remotefile.2">
{{ if $canwrite }}
<div class="submit"><input type="submit" name="remoteupdate" value="$submit" /></div>
{{ else }}
<h3>Your friendica installation is not writable by web server.</h3>
{{ if $canftp }}
<p>You can try to update via FTP</p>
{{ inc field_input.tpl with $field=$ftphost }}{{ endinc }}
{{ inc field_input.tpl with $field=$ftppath }}{{ endinc }}
{{ inc field_input.tpl with $field=$ftpuser }}{{ endinc }}
{{ inc field_password.tpl with $field=$ftppwd }}{{ endinc }}
<div class="submit"><input type="submit" name="remoteupdate" value="$submit" /></div>
{{ endif }}
{{ endif }}
</form>
{{ else }}
<h4>No updates</h4>
{{ endif }}
</div>

View file

@ -1,116 +0,0 @@
<script>
$(function(){
$("#cnftheme").click(function(){
$.colorbox({
width: 800,
height: '90%',
/*onOpen: function(){
var theme = $("#id_theme :selected").val();
$("#cnftheme").attr('href',"$baseurl/admin/themes/"+theme);
},*/
href: "$baseurl/admin/themes/" + $("#id_theme :selected").val(),
onComplete: function(){
$("div#fancybox-content form").submit(function(e){
var url = $(this).attr('action');
// can't get .serialize() to work...
var data={};
$(this).find("input").each(function(){
data[$(this).attr('name')] = $(this).val();
});
$(this).find("select").each(function(){
data[$(this).attr('name')] = $(this).children(":selected").val();
});
console.log(":)", url, data);
$.post(url, data, function(data) {
if(timer) clearTimeout(timer);
NavUpdate();
$.colorbox.close();
})
return false;
});
}
});
return false;
});
});
</script>
<div id='adminpage'>
<h1>$title - $page</h1>
<form action="$baseurl/admin/site" method="post">
<input type='hidden' name='form_security_token' value='$form_security_token'>
{{ inc field_input.tpl with $field=$sitename }}{{ endinc }}
{{ inc field_textarea.tpl with $field=$banner }}{{ endinc }}
{{ inc field_select.tpl with $field=$language }}{{ endinc }}
{{ inc field_select.tpl with $field=$theme }}{{ endinc }}
{{ inc field_select.tpl with $field=$theme_mobile }}{{ endinc }}
{{ inc field_select.tpl with $field=$ssl_policy }}{{ endinc }}
{{ inc field_checkbox.tpl with $field=$new_share }}{{ endinc }}
{{ inc field_checkbox.tpl with $field=$hide_help }}{{ endinc }}
{{ inc field_select.tpl with $field=$singleuser }}{{ endinc }}
<div class="submit"><input type="submit" name="page_site" value="$submit" /></div>
<h3>$registration</h3>
{{ inc field_input.tpl with $field=$register_text }}{{ endinc }}
{{ inc field_select.tpl with $field=$register_policy }}{{ endinc }}
{{ inc field_input.tpl with $field=$daily_registrations }}{{ endinc }}
{{ inc field_checkbox.tpl with $field=$no_multi_reg }}{{ endinc }}
{{ inc field_checkbox.tpl with $field=$no_openid }}{{ endinc }}
{{ inc field_checkbox.tpl with $field=$no_regfullname }}{{ endinc }}
<div class="submit"><input type="submit" name="page_site" value="$submit" /></div>
<h3>$upload</h3>
{{ inc field_input.tpl with $field=$maximagesize }}{{ endinc }}
{{ inc field_input.tpl with $field=$maximagelength }}{{ endinc }}
{{ inc field_input.tpl with $field=$jpegimagequality }}{{ endinc }}
<h3>$corporate</h3>
{{ inc field_input.tpl with $field=$allowed_sites }}{{ endinc }}
{{ inc field_input.tpl with $field=$allowed_email }}{{ endinc }}
{{ inc field_checkbox.tpl with $field=$block_public }}{{ endinc }}
{{ inc field_checkbox.tpl with $field=$force_publish }}{{ endinc }}
{{ inc field_checkbox.tpl with $field=$no_community_page }}{{ endinc }}
{{ inc field_checkbox.tpl with $field=$ostatus_disabled }}{{ endinc }}
{{ inc field_select.tpl with $field=$ostatus_poll_interval }}{{ endinc }}
{{ inc field_checkbox.tpl with $field=$diaspora_enabled }}{{ endinc }}
{{ inc field_checkbox.tpl with $field=$dfrn_only }}{{ endinc }}
{{ inc field_input.tpl with $field=$global_directory }}{{ endinc }}
{{ inc field_checkbox.tpl with $field=$thread_allow }}{{ endinc }}
{{ inc field_checkbox.tpl with $field=$newuser_private }}{{ endinc }}
{{ inc field_checkbox.tpl with $field=$enotify_no_content }}{{ endinc }}
{{ inc field_checkbox.tpl with $field=$private_addons }}{{ endinc }}
{{ inc field_checkbox.tpl with $field=$disable_embedded }}{{ endinc }}
<div class="submit"><input type="submit" name="page_site" value="$submit" /></div>
<h3>$advanced</h3>
{{ inc field_checkbox.tpl with $field=$no_utf }}{{ endinc }}
{{ inc field_checkbox.tpl with $field=$verifyssl }}{{ endinc }}
{{ inc field_input.tpl with $field=$proxy }}{{ endinc }}
{{ inc field_input.tpl with $field=$proxyuser }}{{ endinc }}
{{ inc field_input.tpl with $field=$timeout }}{{ endinc }}
{{ inc field_input.tpl with $field=$delivery_interval }}{{ endinc }}
{{ inc field_input.tpl with $field=$poll_interval }}{{ endinc }}
{{ inc field_input.tpl with $field=$maxloadavg }}{{ endinc }}
{{ inc field_input.tpl with $field=$abandon_days }}{{ endinc }}
{{ inc field_input.tpl with $field=$lockpath }}{{ endinc }}
{{ inc field_input.tpl with $field=$temppath }}{{ endinc }}
{{ inc field_input.tpl with $field=$basepath }}{{ endinc }}
<h3>$performance</h3>
{{ inc field_checkbox.tpl with $field=$use_fulltext_engine }}{{ endinc }}
{{ inc field_input.tpl with $field=$itemcache }}{{ endinc }}
{{ inc field_input.tpl with $field=$itemcache_duration }}{{ endinc }}
<div class="submit"><input type="submit" name="page_site" value="$submit" /></div>
</form>
</div>

View file

@ -1,40 +0,0 @@
<div id='adminpage'>
<h1>$title - $page</h1>
<dl>
<dt>$queues.label</dt>
<dd>$queues.deliverq - $queues.queue</dd>
</dl>
<dl>
<dt>$pending.0</dt>
<dd>$pending.1</dt>
</dl>
<dl>
<dt>$users.0</dt>
<dd>$users.1</dd>
</dl>
{{ for $accounts as $p }}
<dl>
<dt>$p.0</dt>
<dd>{{ if $p.1 }}$p.1{{ else }}0{{ endif }}</dd>
</dl>
{{ endfor }}
<dl>
<dt>$plugins.0</dt>
{{ for $plugins.1 as $p }}
<dd>$p</dd>
{{ endfor }}
</dl>
<dl>
<dt>$version.0</dt>
<dd>$version.1 - $build</dt>
</dl>
</div>

View file

@ -1,98 +0,0 @@
<script>
function confirm_delete(uname){
return confirm( "$confirm_delete".format(uname));
}
function confirm_delete_multi(){
return confirm("$confirm_delete_multi");
}
function selectall(cls){
$("."+cls).attr('checked','checked');
return false;
}
</script>
<div id='adminpage'>
<h1>$title - $page</h1>
<form action="$baseurl/admin/users" method="post">
<input type='hidden' name='form_security_token' value='$form_security_token'>
<h3>$h_pending</h3>
{{ if $pending }}
<table id='pending'>
<thead>
<tr>
{{ for $th_pending as $th }}<th>$th</th>{{ endfor }}
<th></th>
<th></th>
</tr>
</thead>
<tbody>
{{ for $pending as $u }}
<tr>
<td class="created">$u.created</td>
<td class="name">$u.name</td>
<td class="email">$u.email</td>
<td class="checkbox"><input type="checkbox" class="pending_ckbx" id="id_pending_$u.hash" name="pending[]" value="$u.hash" /></td>
<td class="tools">
<a href="$baseurl/regmod/allow/$u.hash" title='$approve'><span class='icon like'></span></a>
<a href="$baseurl/regmod/deny/$u.hash" title='$deny'><span class='icon dislike'></span></a>
</td>
</tr>
{{ endfor }}
</tbody>
</table>
<div class='selectall'><a href='#' onclick="return selectall('pending_ckbx');">$select_all</a></div>
<div class="submit"><input type="submit" name="page_users_deny" value="$deny"/> <input type="submit" name="page_users_approve" value="$approve" /></div>
{{ else }}
<p>$no_pending</p>
{{ endif }}
<h3>$h_users</h3>
{{ if $users }}
<table id='users'>
<thead>
<tr>
<th></th>
{{ for $th_users as $th }}<th>$th</th>{{ endfor }}
<th></th>
<th></th>
</tr>
</thead>
<tbody>
{{ for $users as $u }}
<tr>
<td><img src="$u.micro" alt="$u.nickname" title="$u.nickname"></td>
<td class='name'><a href="$u.url" title="$u.nickname" >$u.name</a></td>
<td class='email'>$u.email</td>
<td class='register_date'>$u.register_date</td>
<td class='login_date'>$u.login_date</td>
<td class='lastitem_date'>$u.lastitem_date</td>
<td class='login_date'>$u.page_flags {{ if $u.is_admin }}($siteadmin){{ endif }} {{ if $u.account_expired }}($accountexpired){{ endif }}</td>
<td class="checkbox">
{{ if $u.is_admin }}
&nbsp;
{{ else }}
<input type="checkbox" class="users_ckbx" id="id_user_$u.uid" name="user[]" value="$u.uid"/></td>
{{ endif }}
<td class="tools">
{{ if $u.is_admin }}
&nbsp;
{{ else }}
<a href="$baseurl/admin/users/block/$u.uid?t=$form_security_token" title='{{ if $u.blocked }}$unblock{{ else }}$block{{ endif }}'><span class='icon block {{ if $u.blocked==0 }}dim{{ endif }}'></span></a>
<a href="$baseurl/admin/users/delete/$u.uid?t=$form_security_token" title='$delete' onclick="return confirm_delete('$u.name')"><span class='icon drop'></span></a>
{{ endif }}
</td>
</tr>
{{ endfor }}
</tbody>
</table>
<div class='selectall'><a href='#' onclick="return selectall('users_ckbx');">$select_all</a></div>
<div class="submit"><input type="submit" name="page_users_block" value="$block/$unblock" /> <input type="submit" name="page_users_delete" value="$delete" onclick="return confirm_delete_multi()" /></div>
{{ else }}
NO USERS?!?
{{ endif }}
</form>
</div>

View file

@ -1,15 +0,0 @@
<div id="photo-album-edit-wrapper">
<form name="photo-album-edit-form" id="photo-album-edit-form" action="photos/$nickname/album/$hexalbum" method="post" >
<label id="photo-album-edit-name-label" for="photo-album-edit-name" >$nametext</label>
<input type="text" size="64" name="albumname" value="$album" >
<div id="photo-album-edit-name-end"></div>
<input id="photo-album-edit-submit" type="submit" name="submit" value="$submit" />
<input id="photo-album-edit-drop" type="submit" name="dropalbum" value="$dropsubmit" onclick="return confirmDelete();" />
</form>
</div>
<div id="photo-album-edit-end" ></div>

View file

@ -1,66 +0,0 @@
<config>
<site>
<name>$config.site.name</name>
<server>$config.site.server</server>
<theme>default</theme>
<path></path>
<logo>$config.site.logo</logo>
<fancy>true</fancy>
<language>en</language>
<email>$config.site.email</email>
<broughtby></broughtby>
<broughtbyurl></broughtbyurl>
<timezone>UTC</timezone>
<closed>$config.site.closed</closed>
<inviteonly>false</inviteonly>
<private>$config.site.private</private>
<textlimit>$config.site.textlimit</textlimit>
<ssl>$config.site.ssl</ssl>
<sslserver>$config.site.sslserver</sslserver>
<shorturllength>30</shorturllength>
</site>
<license>
<type>cc</type>
<owner></owner>
<url>http://creativecommons.org/licenses/by/3.0/</url>
<title>Creative Commons Attribution 3.0</title>
<image>http://i.creativecommons.org/l/by/3.0/80x15.png</image>
</license>
<nickname>
<featured></featured>
</nickname>
<profile>
<biolimit></biolimit>
</profile>
<group>
<desclimit></desclimit>
</group>
<notice>
<contentlimit></contentlimit>
</notice>
<throttle>
<enabled>false</enabled>
<count>20</count>
<timespan>600</timespan>
</throttle>
<xmpp>
<enabled>false</enabled>
<server>INVALID SERVER</server>
<port>5222</port>
<user>update</user>
</xmpp>
<integration>
<source>StatusNet</source>
</integration>
<attachments>
<uploads>false</uploads>
<file_quota>0</file_quota>
</attachments>
</config>

View file

@ -1,7 +0,0 @@
<!-- TEMPLATE APPEARS UNUSED -->
<users type="array">
{{for $users as $u }}
{{inc api_user_xml.tpl with $user=$u }}{{endinc}}
{{endfor}}
</users>

View file

@ -1,6 +0,0 @@
<hash>
<remaining-hits type="integer">$hash.remaining_hits</remaining-hits>
<hourly-limit type="integer">$hash.hourly_limit</hourly-limit>
<reset-time type="datetime">$hash.reset_time</reset-time>
<reset_time_in_seconds type="integer">$hash.resettime_in_seconds</reset_time_in_seconds>
</hash>

View file

@ -1,46 +0,0 @@
<status>{{ if $status }}
<created_at>$status.created_at</created_at>
<id>$status.id</id>
<text>$status.text</text>
<source>$status.source</source>
<truncated>$status.truncated</truncated>
<in_reply_to_status_id>$status.in_reply_to_status_id</in_reply_to_status_id>
<in_reply_to_user_id>$status.in_reply_to_user_id</in_reply_to_user_id>
<favorited>$status.favorited</favorited>
<in_reply_to_screen_name>$status.in_reply_to_screen_name</in_reply_to_screen_name>
<geo>$status.geo</geo>
<coordinates>$status.coordinates</coordinates>
<place>$status.place</place>
<contributors>$status.contributors</contributors>
<user>
<id>$status.user.id</id>
<name>$status.user.name</name>
<screen_name>$status.user.screen_name</screen_name>
<location>$status.user.location</location>
<description>$status.user.description</description>
<profile_image_url>$status.user.profile_image_url</profile_image_url>
<url>$status.user.url</url>
<protected>$status.user.protected</protected>
<followers_count>$status.user.followers</followers_count>
<profile_background_color>$status.user.profile_background_color</profile_background_color>
<profile_text_color>$status.user.profile_text_color</profile_text_color>
<profile_link_color>$status.user.profile_link_color</profile_link_color>
<profile_sidebar_fill_color>$status.user.profile_sidebar_fill_color</profile_sidebar_fill_color>
<profile_sidebar_border_color>$status.user.profile_sidebar_border_color</profile_sidebar_border_color>
<friends_count>$status.user.friends_count</friends_count>
<created_at>$status.user.created_at</created_at>
<favourites_count>$status.user.favourites_count</favourites_count>
<utc_offset>$status.user.utc_offset</utc_offset>
<time_zone>$status.user.time_zone</time_zone>
<profile_background_image_url>$status.user.profile_background_image_url</profile_background_image_url>
<profile_background_tile>$status.user.profile_background_tile</profile_background_tile>
<profile_use_background_image>$status.user.profile_use_background_image</profile_use_background_image>
<notifications></notifications>
<geo_enabled>$status.user.geo_enabled</geo_enabled>
<verified>$status.user.verified</verified>
<following></following>
<statuses_count>$status.user.statuses_count</statuses_count>
<lang>$status.user.lang</lang>
<contributors_enabled>$status.user.contributors_enabled</contributors_enabled>
</user>
{{ endif }}</status>

View file

@ -1 +0,0 @@
<ok>$ok</ok>

View file

@ -1,90 +0,0 @@
<feed xml:lang="en-US" xmlns="http://www.w3.org/2005/Atom" xmlns:thr="http://purl.org/syndication/thread/1.0" xmlns:georss="http://www.georss.org/georss" xmlns:activity="http://activitystrea.ms/spec/1.0/" xmlns:media="http://purl.org/syndication/atommedia" xmlns:poco="http://portablecontacts.net/spec/1.0" xmlns:ostatus="http://ostatus.org/schema/1.0" xmlns:statusnet="http://status.net/schema/api/1/">
<generator uri="http://status.net" version="0.9.7">StatusNet</generator>
<id>$rss.self</id>
<title>Friendica</title>
<subtitle>Friendica API feed</subtitle>
<logo>$rss.logo</logo>
<updated>$rss.atom_updated</updated>
<link type="text/html" rel="alternate" href="$rss.alternate"/>
<link type="application/atom+xml" rel="self" href="$rss.self"/>
<author>
<activity:object-type>http://activitystrea.ms/schema/1.0/person</activity:object-type>
<uri>$user.url</uri>
<name>$user.name</name>
<link rel="alternate" type="text/html" href="$user.url"/>
<link rel="avatar" type="image/jpeg" media:width="106" media:height="106" href="$user.profile_image_url"/>
<link rel="avatar" type="image/jpeg" media:width="96" media:height="96" href="$user.profile_image_url"/>
<link rel="avatar" type="image/jpeg" media:width="48" media:height="48" href="$user.profile_image_url"/>
<link rel="avatar" type="image/jpeg" media:width="24" media:height="24" href="$user.profile_image_url"/>
<georss:point></georss:point>
<poco:preferredUsername>$user.screen_name</poco:preferredUsername>
<poco:displayName>$user.name</poco:displayName>
<poco:urls>
<poco:type>homepage</poco:type>
<poco:value>$user.url</poco:value>
<poco:primary>true</poco:primary>
</poco:urls>
<statusnet:profile_info local_id="$user.id"></statusnet:profile_info>
</author>
<!--Deprecation warning: activity:subject is present only for backward compatibility. It will be removed in the next version of StatusNet.-->
<activity:subject>
<activity:object-type>http://activitystrea.ms/schema/1.0/person</activity:object-type>
<id>$user.contact_url</id>
<title>$user.name</title>
<link rel="alternate" type="text/html" href="$user.url"/>
<link rel="avatar" type="image/jpeg" media:width="106" media:height="106" href="$user.profile_image_url"/>
<link rel="avatar" type="image/jpeg" media:width="96" media:height="96" href="$user.profile_image_url"/>
<link rel="avatar" type="image/jpeg" media:width="48" media:height="48" href="$user.profile_image_url"/>
<link rel="avatar" type="image/jpeg" media:width="24" media:height="24" href="$user.profile_image_url"/>
<poco:preferredUsername>$user.screen_name</poco:preferredUsername>
<poco:displayName>$user.name</poco:displayName>
<poco:urls>
<poco:type>homepage</poco:type>
<poco:value>$user.url</poco:value>
<poco:primary>true</poco:primary>
</poco:urls>
<statusnet:profile_info local_id="$user.id"></statusnet:profile_info>
</activity:subject>
{{ for $statuses as $status }}
<entry>
<activity:object-type>$status.objecttype</activity:object-type>
<id>$status.message_id</id>
<title>$status.text</title>
<content type="html">$status.statusnet_html</content>
<link rel="alternate" type="text/html" href="$status.url"/>
<activity:verb>$status.verb</activity:verb>
<published>$status.published</published>
<updated>$status.updated</updated>
<link rel="self" type="application/atom+xml" href="$status.self"/>
<link rel="edit" type="application/atom+xml" href="$status.edit"/>
<statusnet:notice_info local_id="$status.id" source="$status.source" >
</statusnet:notice_info>
<author>
<activity:object-type>http://activitystrea.ms/schema/1.0/person</activity:object-type>
<uri>$status.user.url</uri>
<name>$status.user.name</name>
<link rel="alternate" type="text/html" href="$status.user.url"/>
<link rel="avatar" type="image/jpeg" media:width="48" media:height="48" href="$status.user.profile_image_url"/>
<georss:point/>
<poco:preferredUsername>$status.user.screen_name</poco:preferredUsername>
<poco:displayName>$status.user.name</poco:displayName>
<poco:address/>
<poco:urls>
<poco:type>homepage</poco:type>
<poco:value>$status.user.url</poco:value>
<poco:primary>true</poco:primary>
</poco:urls>
</author>
<link rel="ostatus:conversation" type="text/html" href="$status.url"/>
</entry>
{{ endfor }}
</feed>

View file

@ -1,26 +0,0 @@
<rss xmlns:atom="http://www.w3.org/2005/Atom" version="2.0" xmlns:georss="http://www.georss.org/georss" xmlns:twitter="http://api.twitter.com">
<channel>
<title>Friendica</title>
<link>$rss.alternate</link>
<atom:link type="application/rss+xml" rel="self" href="$rss.self"/>
<description>Friendica timeline</description>
<language>$rss.language</language>
<ttl>40</ttl>
<image>
<link>$user.link</link>
<title>$user.name's items</title>
<url>$user.profile_image_url</url>
</image>
{{ for $statuses as $status }}
<item>
<title>$status.user.name: $status.text</title>
<description>$status.text</description>
<pubDate>$status.created_at</pubDate>
<guid>$status.url</guid>
<link>$status.url</link>
<twitter:source>$status.source</twitter:source>
</item>
{{ endfor }}
</channel>
</rss>

View file

@ -1,20 +0,0 @@
<statuses type="array" xmlns:statusnet="http://status.net/schema/api/1/">
{{ for $statuses as $status }} <status>
<text>$status.text</text>
<truncated>$status.truncated</truncated>
<created_at>$status.created_at</created_at>
<in_reply_to_status_id>$status.in_reply_to_status_id</in_reply_to_status_id>
<source>$status.source</source>
<id>$status.id</id>
<in_reply_to_user_id>$status.in_reply_to_user_id</in_reply_to_user_id>
<in_reply_to_screen_name>$status.in_reply_to_screen_name</in_reply_to_screen_name>
<geo>$status.geo</geo>
<favorited>$status.favorited</favorited>
{{ inc api_user_xml.tpl with $user=$status.user }}{{ endinc }} <statusnet:html>$status.statusnet_html</statusnet:html>
<statusnet:conversation_id>$status.statusnet_conversation_id</statusnet:conversation_id>
<url>$status.url</url>
<coordinates>$status.coordinates</coordinates>
<place>$status.place</place>
<contributors>$status.contributors</contributors>
</status>
{{ endfor }}</statuses>

View file

@ -1,46 +0,0 @@
<user>
<id>$user.id</id>
<name>$user.name</name>
<screen_name>$user.screen_name</screen_name>
<location>$user.location</location>
<description>$user.description</description>
<profile_image_url>$user.profile_image_url</profile_image_url>
<url>$user.url</url>
<protected>$user.protected</protected>
<followers_count>$user.followers_count</followers_count>
<friends_count>$user.friends_count</friends_count>
<created_at>$user.created_at</created_at>
<favourites_count>$user.favourites_count</favourites_count>
<utc_offset>$user.utc_offset</utc_offset>
<time_zone>$user.time_zone</time_zone>
<statuses_count>$user.statuses_count</statuses_count>
<following>$user.following</following>
<profile_background_color>$user.profile_background_color</profile_background_color>
<profile_text_color>$user.profile_text_color</profile_text_color>
<profile_link_color>$user.profile_link_color</profile_link_color>
<profile_sidebar_fill_color>$user.profile_sidebar_fill_color</profile_sidebar_fill_color>
<profile_sidebar_border_color>$user.profile_sidebar_border_color</profile_sidebar_border_color>
<profile_background_image_url>$user.profile_background_image_url</profile_background_image_url>
<profile_background_tile>$user.profile_background_tile</profile_background_tile>
<profile_use_background_image>$user.profile_use_background_image</profile_use_background_image>
<notifications>$user.notifications</notifications>
<geo_enabled>$user.geo_enabled</geo_enabled>
<verified>$user.verified</verified>
<lang>$user.lang</lang>
<contributors_enabled>$user.contributors_enabled</contributors_enabled>
<status>{{ if $user.status }}
<created_at>$user.status.created_at</created_at>
<id>$user.status.id</id>
<text>$user.status.text</text>
<source>$user.status.source</source>
<truncated>$user.status.truncated</truncated>
<in_reply_to_status_id>$user.status.in_reply_to_status_id</in_reply_to_status_id>
<in_reply_to_user_id>$user.status.in_reply_to_user_id</in_reply_to_user_id>
<favorited>$user.status.favorited</favorited>
<in_reply_to_screen_name>$user.status.in_reply_to_screen_name</in_reply_to_screen_name>
<geo>$user.status.geo</geo>
<coordinates>$user.status.coordinates</coordinates>
<place>$user.status.place</place>
<contributors>$user.status.contributors</contributors>
{{ endif }}</status>
</user>

View file

@ -1,7 +0,0 @@
<h3>$title</h3>
<ul>
{{ for $apps as $ap }}
<li>$ap</li>
{{ endfor }}
</ul>

View file

@ -1,29 +0,0 @@
<?xml version="1.0" encoding="utf-8" ?>
<feed xmlns="http://www.w3.org/2005/Atom"
xmlns:thr="http://purl.org/syndication/thread/1.0"
xmlns:at="http://purl.org/atompub/tombstones/1.0"
xmlns:media="http://purl.org/syndication/atommedia"
xmlns:dfrn="http://purl.org/macgirvin/dfrn/1.0"
xmlns:as="http://activitystrea.ms/spec/1.0/"
xmlns:georss="http://www.georss.org/georss"
xmlns:poco="http://portablecontacts.net/spec/1.0"
xmlns:ostatus="http://ostatus.org/schema/1.0"
xmlns:statusnet="http://status.net/schema/api/1/" >
<id>$feed_id</id>
<title>$feed_title</title>
<generator uri="http://friendica.com" version="$version">Friendica</generator>
<link rel="license" href="http://creativecommons.org/licenses/by/3.0/" />
$hub
$salmon
$community
<updated>$feed_updated</updated>
<dfrn:owner>
<name dfrn:updated="$namdate" >$name</name>
<uri dfrn:updated="$uridate" >$profile_page</uri>
<link rel="photo" type="image/jpeg" dfrn:updated="$picdate" media:width="175" media:height="175" href="$photo" />
<link rel="avatar" type="image/jpeg" dfrn:updated="$picdate" media:width="175" media:height="175" href="$photo" />
$birthday
</dfrn:owner>

View file

@ -1,29 +0,0 @@
<?xml version="1.0" encoding="utf-8" ?>
<feed xmlns="http://www.w3.org/2005/Atom"
xmlns:thr="http://purl.org/syndication/thread/1.0"
xmlns:at="http://purl.org/atompub/tombstones/1.0"
xmlns:media="http://purl.org/syndication/atommedia"
xmlns:dfrn="http://purl.org/macgirvin/dfrn/1.0"
xmlns:as="http://activitystrea.ms/spec/1.0/"
xmlns:georss="http://www.georss.org/georss"
xmlns:poco="http://portablecontacts.net/spec/1.0"
xmlns:ostatus="http://ostatus.org/schema/1.0"
xmlns:statusnet="http://status.net/schema/api/1/" >
<id>$feed_id</id>
<title>$feed_title</title>
<generator uri="http://friendica.com" version="$version">Friendica</generator>
<link rel="license" href="http://creativecommons.org/licenses/by/3.0/" />
$hub
$salmon
$community
<updated>$feed_updated</updated>
<author>
<name dfrn:updated="$namdate" >$name</name>
<uri dfrn:updated="$uridate" >$profile_page</uri>
<link rel="photo" type="image/jpeg" dfrn:updated="$picdate" media:width="175" media:height="175" href="$photo" />
<link rel="avatar" type="image/jpeg" dfrn:updated="$picdate" media:width="175" media:height="175" href="$photo" />
$birthday
</author>

View file

@ -1,17 +0,0 @@
<dfrn:mail>
<dfrn:sender>
<dfrn:name>$name</dfrn:name>
<dfrn:uri>$profile_page</dfrn:uri>
<dfrn:avatar>$thumb</dfrn:avatar>
</dfrn:sender>
<dfrn:id>$item_id</dfrn:id>
<dfrn:in-reply-to>$parent_id</dfrn:in-reply-to>
<dfrn:sentdate>$created</dfrn:sentdate>
<dfrn:subject>$subject</dfrn:subject>
<dfrn:content>$content</dfrn:content>
</dfrn:mail>

View file

@ -1,17 +0,0 @@
<dfrn:relocate>
<dfrn:url>$url</dfrn:url>
<dfrn:name>$name</dfrn:name>
<dfrn:photo>$photo</dfrn:photo>
<dfrn:thumb>$thumb</dfrn:thumb>
<dfrn:micro>$micro</dfrn:micro>
<dfrn:request>$request</dfrn:request>
<dfrn:confirm>$confirm</dfrn:confirm>
<dfrn:notify>$notify</dfrn:notify>
<dfrn:poll>$poll</dfrn:poll>
<dfrn:sitepubkey>$sitepubkey</dfrn:sitepubkey>
</dfrn:relocate>

View file

@ -1,11 +0,0 @@
<dfrn:suggest>
<dfrn:url>$url</dfrn:url>
<dfrn:name>$name</dfrn:name>
<dfrn:photo>$photo</dfrn:photo>
<dfrn:request>$request</dfrn:request>
<dfrn:note>$note</dfrn:note>
</dfrn:suggest>

View file

@ -1,37 +0,0 @@
<h1>$header</h1>
<p id="dfrn-request-intro">
$page_desc<br />
<ul id="dfrn-request-networks">
<li><a href="http://friendica.com" title="$friendica">$friendica</a></li>
<li><a href="http://joindiaspora.com" title="$diaspora">$diaspora</a> $diasnote</li>
<li><a href="http://ostatus.org" title="$public_net" >$statusnet</a></li>
{{ if $emailnet }}<li>$emailnet</li>{{ endif }}
</ul>
</p>
<p>
$invite_desc
</p>
<p>
$desc
</p>
<form action="dfrn_request/$nickname" method="post" />
<div id="dfrn-request-url-wrapper" >
<label id="dfrn-url-label" for="dfrn-url" >$your_address</label>
<input type="text" name="dfrn_url" id="dfrn-url" size="32" value="$myaddr" />
<div id="dfrn-request-url-end"></div>
</div>
<div id="dfrn-request-info-wrapper" >
</div>
<div id="dfrn-request-submit-wrapper">
<input type="submit" name="submit" id="dfrn-request-submit-button" value="$submit" />
<input type="submit" name="cancel" id="dfrn-request-cancel-button" value="$cancel" />
</div>
</form>

View file

@ -1,10 +0,0 @@
{{ if $count }}
<div id="birthday-notice" class="birthday-notice fakelink $classtoday" onclick="openClose('birthday-wrapper');">$event_reminders ($count)</div>
<div id="birthday-wrapper" style="display: none;" ><div id="birthday-title">$event_title</div>
<div id="birthday-title-end"></div>
{{ for $events as $event }}
<div class="birthday-list" id="birthday-$event.id"> <a href="$event.link">$event.title</a> $event.date </div>
{{ endfor }}
</div>
{{ endif }}

File diff suppressed because it is too large Load diff

File diff suppressed because it is too large Load diff

View file

@ -1,12 +0,0 @@
<div id="categories-sidebar" class="widget">
<h3>$title</h3>
<div id="nets-desc">$desc</div>
<ul class="categories-ul">
<li class="tool"><a href="$base" class="categories-link categories-all{{ if $sel_all }} categories-selected{{ endif }}">$all</a></li>
{{ for $terms as $term }}
<li class="tool"><a href="$base?f=&category=$term.name" class="categories-link{{ if $term.selected }} categories-selected{{ endif }}">$term.name</a></li>
{{ endfor }}
</ul>
</div>

View file

@ -1,39 +0,0 @@
{{ if $threaded }}
<div class="comment-wwedit-wrapper threaded" id="comment-edit-wrapper-$id" style="display: block;">
{{ else }}
<div class="comment-wwedit-wrapper" id="comment-edit-wrapper-$id" style="display: block;">
{{ endif }}
<form class="comment-edit-form" style="display: block;" id="comment-edit-form-$id" action="item" method="post" onsubmit="post_comment($id); return false;">
<input type="hidden" name="type" value="$type" />
<input type="hidden" name="profile_uid" value="$profile_uid" />
<input type="hidden" name="parent" value="$parent" />
{#<!--<input type="hidden" name="return" value="$return_path" />-->#}
<input type="hidden" name="jsreload" value="$jsreload" />
<input type="hidden" name="preview" id="comment-preview-inp-$id" value="0" />
<input type="hidden" name="post_id_random" value="$rand_num" />
<div class="comment-edit-photo" id="comment-edit-photo-$id" >
<a class="comment-edit-photo-link" href="$mylink" title="$mytitle"><img class="my-comment-photo" src="$myphoto" alt="$mytitle" title="$mytitle" /></a>
</div>
<div class="comment-edit-photo-end"></div>
<textarea id="comment-edit-text-$id" class="comment-edit-text-empty" name="body" onFocus="commentOpen(this,$id);" onBlur="commentClose(this,$id);" >$comment</textarea>
{{ if $qcomment }}
<select id="qcomment-select-$id" name="qcomment-$id" class="qcomment" onchange="qCommentInsert(this,$id);" >
<option value=""></option>
{{ for $qcomment as $qc }}
<option value="$qc">$qc</option>
{{ endfor }}
</select>
{{ endif }}
<div class="comment-edit-text-end"></div>
<div class="comment-edit-submit-wrapper" id="comment-edit-submit-wrapper-$id" style="display: none;" >
<input type="submit" onclick="post_comment($id); return false;" id="comment-edit-submit-$id" class="comment-edit-submit" name="submit" value="$submit" />
<span onclick="preview_comment($id);" id="comment-edit-preview-link-$id" class="fakelink">$preview</span>
<div id="comment-edit-preview-$id" class="comment-edit-preview" style="display:none;"></div>
</div>
<div class="comment-edit-end"></div>
</form>
</div>

View file

@ -1,12 +0,0 @@
<div class="profile-match-wrapper">
<div class="profile-match-photo">
<a href="$url">
<img src="$photo" alt="$name" width="80" height="80" title="$name [$url]" />
</a>
</div>
<div class="profile-match-break"></div>
<div class="profile-match-name">
<a href="$url" title="$name[$tags]">$name</a>
</div>
<div class="profile-match-end"></div>
</div>

View file

@ -1,5 +0,0 @@
<ul class="tabs">
{{ for $tabs as $tab }}
<li id="$tab.id"><a href="$tab.url" class="tab button $tab.sel"{{ if $tab.title }} title="$tab.title"{{ endif }}>$tab.label</a></li>
{{ endfor }}
</ul>

View file

@ -1,14 +0,0 @@
<center>
<form action="$confirm_url" id="confirm-form" method="$method">
<span id="confirm-message">$message</span>
{{ for $extra_inputs as $input }}
<input type="hidden" name="$input.name" value="$input.value" />
{{ endfor }}
<input class="confirm-button" id="confirm-submit-button" type="submit" name="$confirm_name" value="$confirm" />
<input class="confirm-button" id="confirm-cancel-button" type="submit" name="canceled" value="$cancel" />
</form>
</center>

View file

@ -1,12 +0,0 @@
<div id="contact-block">
<h4 class="contact-block-h4">$contacts</h4>
{{ if $micropro }}
<a class="allcontact-link" href="viewcontacts/$nickname">$viewcontacts</a>
<div class='contact-block-content'>
{{ for $micropro as $m }}
$m
{{ endfor }}
</div>
{{ endif }}
</div>
<div class="clear"></div>

View file

@ -1,88 +0,0 @@
<h2>$header</h2>
<div id="contact-edit-wrapper" >
$tab_str
<div id="contact-edit-drop-link" >
<a href="contacts/$contact_id/drop" class="icon drophide" id="contact-edit-drop-link" onclick="return confirmDelete();" title="$delete" onmouseover="imgbright(this);" onmouseout="imgdull(this);"></a>
</div>
<div id="contact-edit-drop-link-end"></div>
<div id="contact-edit-nav-wrapper" >
<div id="contact-edit-links">
<ul>
<li><div id="contact-edit-rel">$relation_text</div></li>
<li><div id="contact-edit-nettype">$nettype</div></li>
{{ if $lost_contact }}
<li><div id="lost-contact-message">$lost_contact</div></li>
{{ endif }}
{{ if $insecure }}
<li><div id="insecure-message">$insecure</div></li>
{{ endif }}
{{ if $blocked }}
<li><div id="block-message">$blocked</div></li>
{{ endif }}
{{ if $ignored }}
<li><div id="ignore-message">$ignored</div></li>
{{ endif }}
{{ if $archived }}
<li><div id="archive-message">$archived</div></li>
{{ endif }}
<li>&nbsp;</li>
{{ if $common_text }}
<li><div id="contact-edit-common"><a href="$common_link">$common_text</a></div></li>
{{ endif }}
{{ if $all_friends }}
<li><div id="contact-edit-allfriends"><a href="allfriends/$contact_id">$all_friends</a></div></li>
{{ endif }}
<li><a href="network/0?nets=all&cid=$contact_id" id="contact-edit-view-recent">$lblrecent</a></li>
{{ if $lblsuggest }}
<li><a href="fsuggest/$contact_id" id="contact-edit-suggest">$lblsuggest</a></li>
{{ endif }}
</ul>
</div>
</div>
<div id="contact-edit-nav-end"></div>
<form action="contacts/$contact_id" method="post" >
<input type="hidden" name="contact_id" value="$contact_id">
{{ if $poll_enabled }}
<div id="contact-edit-poll-wrapper">
<div id="contact-edit-last-update-text">$lastupdtext <span id="contact-edit-last-updated">$last_update</span></div>
<span id="contact-edit-poll-text">$updpub</span> $poll_interval <span id="contact-edit-update-now" class="button"><a href="contacts/$contact_id/update" >$udnow</a></span>
</div>
{{ endif }}
<div id="contact-edit-end" ></div>
{{inc field_checkbox.tpl with $field=$hidden }}{{endinc}}
<div id="contact-edit-info-wrapper">
<h4>$lbl_info1</h4>
<textarea id="contact-edit-info" rows="8" cols="60" name="info">$info</textarea>
<input class="contact-edit-submit" type="submit" name="submit" value="$submit" />
</div>
<div id="contact-edit-info-end"></div>
<div id="contact-edit-profile-select-text">
<h4>$lbl_vis1</h4>
<p>$lbl_vis2</p>
</div>
$profile_select
<div id="contact-edit-profile-select-end"></div>
<input class="contact-edit-submit" type="submit" name="submit" value="$submit" />
</form>
</div>

View file

@ -1,30 +0,0 @@
<script language="javascript" type="text/javascript"
src="$baseurl/library/tinymce/jscripts/tiny_mce/tiny_mce_src.js"></script>
<script language="javascript" type="text/javascript">
tinyMCE.init({
theme : "advanced",
mode : "$editselect",
elements: "contact-edit-info",
plugins : "bbcode",
theme_advanced_buttons1 : "bold,italic,underline,undo,redo,link,unlink,image,forecolor",
theme_advanced_buttons2 : "",
theme_advanced_buttons3 : "",
theme_advanced_toolbar_location : "top",
theme_advanced_toolbar_align : "center",
theme_advanced_styles : "blockquote,code",
gecko_spellcheck : true,
entity_encoding : "raw",
add_unload_trigger : false,
remove_linebreaks : false,
//force_p_newlines : false,
//force_br_newlines : true,
forced_root_block : 'div',
content_css: "$baseurl/view/custom_tinymce.css"
});
</script>

View file

@ -1,31 +0,0 @@
<div class="contact-entry-wrapper" id="contact-entry-wrapper-$contact.id" >
<div class="contact-entry-photo-wrapper" >
<div class="contact-entry-photo mframe" id="contact-entry-photo-$contact.id"
onmouseover="if (typeof t$contact.id != 'undefined') clearTimeout(t$contact.id); openMenu('contact-photo-menu-button-$contact.id')"
onmouseout="t$contact.id=setTimeout('closeMenu(\'contact-photo-menu-button-$contact.id\'); closeMenu(\'contact-photo-menu-$contact.id\');',200)" >
<a href="$contact.url" title="$contact.img_hover" /><img src="$contact.thumb" $contact.sparkle alt="$contact.name" /></a>
{{ if $contact.photo_menu }}
<span onclick="openClose('contact-photo-menu-$contact.id');" class="fakelink contact-photo-menu-button" id="contact-photo-menu-button-$contact.id">menu</span>
<div class="contact-photo-menu" id="contact-photo-menu-$contact.id">
<ul>
{{ for $contact.photo_menu as $c }}
{{ if $c.2 }}
<li><a target="redir" href="$c.1">$c.0</a></li>
{{ else }}
<li><a href="$c.1">$c.0</a></li>
{{ endif }}
{{ endfor }}
</ul>
</div>
{{ endif }}
</div>
</div>
<div class="contact-entry-photo-end" ></div>
<div class="contact-entry-name" id="contact-entry-name-$contact.id" >$contact.name</div>
<div class="contact-entry-end" ></div>
</div>

View file

@ -1,17 +0,0 @@
<script src="$baseurl/library/jquery_ac/friendica.complete.js" ></script>
<script>
$(document).ready(function() {
var a;
a = $("#contacts-search").autocomplete({
serviceUrl: '$base/acl',
minChars: 2,
width: 350,
});
a.setOptions({ params: { type: 'a' }});
});
</script>

View file

@ -1,26 +0,0 @@
<h1>$header{{ if $total }} ($total){{ endif }}</h1>
{{ if $finding }}<h4>$finding</h4>{{ endif }}
<div id="contacts-search-wrapper">
<form id="contacts-search-form" action="$cmd" method="get" >
<span class="contacts-search-desc">$desc</span>
<input type="text" name="search" id="contacts-search" class="search-input" onfocus="this.select();" value="$search" />
<input type="submit" name="submit" id="contacts-search-submit" value="$submit" />
</form>
</div>
<div id="contacts-search-end"></div>
$tabs
{{ for $contacts as $contact }}
{{ inc contact_template.tpl }}{{ endinc }}
{{ endfor }}
<div id="contact-edit-end"></div>
$paginate

View file

@ -1,6 +0,0 @@
$vcard_widget
$follow_widget
$groups_widget
$findpeople_widget
$networks_widget

View file

@ -1,2 +0,0 @@
<div id="content-begin"></div>
<div id="content-end"></div>

View file

@ -1,29 +0,0 @@
$live_update
{{ for $threads as $thread }}
<div id="tread-wrapper-$thread.id" class="tread-wrapper">
{{ for $thread.items as $item }}
{{if $item.comment_firstcollapsed}}
<div class="hide-comments-outer">
<span id="hide-comments-total-$thread.id" class="hide-comments-total">$thread.num_comments</span> <span id="hide-comments-$thread.id" class="hide-comments fakelink" onclick="showHideComments($thread.id);">$thread.hide_text</span>
</div>
<div id="collapsed-comments-$thread.id" class="collapsed-comments" style="display: none;">
{{endif}}
{{if $item.comment_lastcollapsed}}</div>{{endif}}
{{ inc $item.template }}{{ endinc }}
{{ endfor }}
</div>
{{ endfor }}
<div id="conversation-end"></div>
{{ if $dropping }}
<div id="item-delete-selected" class="fakelink" onclick="deleteCheckedItems();">
<div id="item-delete-selected-icon" class="icon drophide" title="$dropping" onmouseover="imgbright(this);" onmouseout="imgdull(this);" ></div>
<div id="item-delete-selected-desc" >$dropping</div>
</div>
<div id="item-delete-selected-end"></div>
{{ endif }}

View file

@ -1,46 +0,0 @@
<form id="crepair-form" action="crepair/$contact_id" method="post" >
<h4>$contact_name</h4>
<label id="crepair-name-label" class="crepair-label" for="crepair-name">$label_name</label>
<input type="text" id="crepair-name" class="crepair-input" name="name" value="$contact_name" />
<div class="clear"></div>
<label id="crepair-nick-label" class="crepair-label" for="crepair-nick">$label_nick</label>
<input type="text" id="crepair-nick" class="crepair-input" name="nick" value="$contact_nick" />
<div class="clear"></div>
<label id="crepair-attag-label" class="crepair-label" for="crepair-attag">$label_attag</label>
<input type="text" id="crepair-attag" class="crepair-input" name="attag" value="$contact_attag" />
<div class="clear"></div>
<label id="crepair-url-label" class="crepair-label" for="crepair-url">$label_url</label>
<input type="text" id="crepair-url" class="crepair-input" name="url" value="$contact_url" />
<div class="clear"></div>
<label id="crepair-request-label" class="crepair-label" for="crepair-request">$label_request</label>
<input type="text" id="crepair-request" class="crepair-input" name="request" value="$request" />
<div class="clear"></div>
<label id="crepair-confirm-label" class="crepair-label" for="crepair-confirm">$label_confirm</label>
<input type="text" id="crepair-confirm" class="crepair-input" name="confirm" value="$confirm" />
<div class="clear"></div>
<label id="crepair-notify-label" class="crepair-label" for="crepair-notify">$label_notify</label>
<input type="text" id="crepair-notify" class="crepair-input" name="notify" value="$notify" />
<div class="clear"></div>
<label id="crepair-poll-label" class="crepair-label" for="crepair-poll">$label_poll</label>
<input type="text" id="crepair-poll" class="crepair-input" name="poll" value="$poll" />
<div class="clear"></div>
<label id="crepair-photo-label" class="crepair-label" for="crepair-photo">$label_photo</label>
<input type="text" id="crepair-photo" class="crepair-input" name="photo" value="" />
<div class="clear"></div>
<input type="submit" name="submit" value="$lbl_submit" />
</form>

Some files were not shown because too many files have changed in this diff Show more