diff options
author | Haakon Meland Eriksen <haakon.eriksen@far.no> | 2015-11-21 00:08:17 +0100 |
---|---|---|
committer | Haakon Meland Eriksen <haakon.eriksen@far.no> | 2015-11-21 00:08:17 +0100 |
commit | 6942c715d0342dd83ec035b576aa23f7213cf4e9 (patch) | |
tree | 086e40d3d11c2eeb564b443d97b56aba4c1ae8b0 | |
parent | de1b3d5113a6140d59612a14d3b0f2f17a5beefa (diff) | |
parent | 427652e9bd8e312758f04c6c3e6824fb47cc3033 (diff) | |
download | volse-hubzilla-6942c715d0342dd83ec035b576aa23f7213cf4e9.tar.gz volse-hubzilla-6942c715d0342dd83ec035b576aa23f7213cf4e9.tar.bz2 volse-hubzilla-6942c715d0342dd83ec035b576aa23f7213cf4e9.zip |
Merge remote-tracking branch 'upstream/master'
-rw-r--r-- | doc/faq_developers.bb | 2 | ||||
-rw-r--r-- | doc/roadmapv4.bb | 27 | ||||
-rw-r--r-- | include/bbcode.php | 32 | ||||
-rw-r--r-- | include/identity.php | 11 | ||||
-rw-r--r-- | include/system_unavailable.php | 1 | ||||
-rw-r--r-- | include/text.php | 4 | ||||
-rwxr-xr-x | index.php | 6 | ||||
-rw-r--r-- | mod/profile_photo.php | 3 | ||||
-rw-r--r-- | mod/profiles.php | 16 |
9 files changed, 75 insertions, 27 deletions
diff --git a/doc/faq_developers.bb b/doc/faq_developers.bb index dd7f4cda1..603cf238f 100644 --- a/doc/faq_developers.bb +++ b/doc/faq_developers.bb @@ -285,7 +285,7 @@ An example (large) &$a object showing some of its many members and structures-- "xchan_photo_l": "http://hubzilla/photo/profile/l/2" }, "page": { - "content": "<div id="help-content" class="generic-content-wrapper">\n\t<div class="section-title-wrapper">\n\t<h2>Hubzilla Documentation</h2>\n\t</div>\n\t<div class="section-content-wrapper">\n\t<h2>Documentation for Developers</h2><br /><br /><h3>Technical Documentation</h3><br /><a class="zrl" href="http://hubzilla/help/Zot---A-High-Level-Overview" target="_newwin" >A high level overview of Zot</a><br /><a class="zrl" href="http://hubzilla/help/zot" target="_newwin" >An introduction to Zot</a><br /><a class="zrl" href="http://hubzilla/help/zot_structures" target="_newwin" >Zot Stuctures</a><br /><a class="zrl" href="http://hubzilla/help/comanche" target="_newwin" >Comanche Page Descriptions</a><br /><a class="zrl" href="http://hubzilla/help/Creating-Templates" target="_newwin" >Creating Comanche Templates</a><br /><a class="zrl" href="http://hubzilla/help/Widgets" target="_newwin" >Widgets</a><br /><a class="zrl" href="http://hubzilla/help/plugins" target="_newwin" >Plugins</a><br /><a class="zrl" href="http://hubzilla/help/hooks" target="_newwin" >Hooks</a><br /><a class="zrl" href="http://hubzilla/help/doco" target="_newwin" >Contributing Documentation</a><br /><a class="zrl" href="http://hubzilla/help/DerivedTheme1" target="_newwin" >Creating Derivative Themes</a><br /><a class="zrl" href="http://hubzilla/help/schema_development" target="_newwin" >Schemas</a><br /><a class="zrl" href="http://hubzilla/help/Translations" target="_newwin" >Translations</a><br /><a class="zrl" href="http://hubzilla/help/developers" target="_newwin" >Developers</a><br /><a class="zrl" href="http://hubzilla/help/intro_for_developers" target="_newwin" >Intro for Developers</a><br /><a class="zrl" href="http://hubzilla/help/database" target="_newwin" >Database schema documentation</a><br /><a class="zrl" href="http://hubzilla/help/api_functions" target="_newwin" >API functions</a><br /><a class="zrl" href="http://hubzilla/help/api_posting" target="_newwin" >Posting to the red# using the API</a><br /><a class="zrl" href="http://hubzilla/help/developer_function_primer" target="_newwin" >Red Functions 101</a><br /><a class="zrl" href="http://hubzilla/doc/html/" target="_newwin" >Code Reference (Doxygen generated - sets cookies)</a><br /><a class="zrl" href="http://hubzilla/help/to_do_doco" target="_newwin" >To-Do list for the Red Documentation Project</a><br /><a class="zrl" href="http://hubzilla/help/to_do_code" target="_newwin" >To-Do list for Developers</a><br /><a class="zrl" href="http://hubzilla/help/roadmap" target="_newwin" >Version 3 roadmap</a><br /><a class="zrl" href="http://hubzilla/help/git_for_non_developers" target="_newwin" >Git for Non-Developers</a><br /><a class="zrl" href="http://hubzilla/help/dev_beginner" target="_newwin" >Step-for-step manual for beginning developers</a><br /><br /><h3>Frequently Asked Questions For Developers</h3><br /><a class="zrl" href="http://hubzilla/help/faq_developers" target="_newwin" >FAQ For Developers</a><br /><br /><h3>External Resources</h3><br /><br /><a href="https://zothub.com/channel/one" target="_newwin" >Development Channel</a><br /><a href="https://federated.social/channel/postgres" target="_newwin" >Postgres-specific Hubzilla Admin Support Channel</a><br />\n\t</div>\n</div>\n<script>var homebase = "http://hubzilla/channel/testes";</script>", + "content": "<div id="help-content" class="generic-content-wrapper">\n\t<div class="section-title-wrapper">\n\t<h2>Hubzilla Documentation</h2>\n\t</div>\n\t<div class="section-content-wrapper">\n\t<h2>Documentation for Developers</h2><br /><br /><h3>Technical Documentation</h3><br /><a class="zrl" href="http://hubzilla/help/Zot---A-High-Level-Overview" target="_blank" >A high level overview of Zot</a><br /><a class="zrl" href="http://hubzilla/help/zot" target="_blank" >An introduction to Zot</a><br /><a class="zrl" href="http://hubzilla/help/zot_structures" target="_blank" >Zot Stuctures</a><br /><a class="zrl" href="http://hubzilla/help/comanche" target="_blank" >Comanche Page Descriptions</a><br /><a class="zrl" href="http://hubzilla/help/Creating-Templates" target="_blank" >Creating Comanche Templates</a><br /><a class="zrl" href="http://hubzilla/help/Widgets" target="_blank" >Widgets</a><br /><a class="zrl" href="http://hubzilla/help/plugins" target="_blank" >Plugins</a><br /><a class="zrl" href="http://hubzilla/help/hooks" target="_blank" >Hooks</a><br /><a class="zrl" href="http://hubzilla/help/doco" target="_blank" >Contributing Documentation</a><br /><a class="zrl" href="http://hubzilla/help/DerivedTheme1" target="_blank" >Creating Derivative Themes</a><br /><a class="zrl" href="http://hubzilla/help/schema_development" target="_blank" >Schemas</a><br /><a class="zrl" href="http://hubzilla/help/Translations" target="_blank" >Translations</a><br /><a class="zrl" href="http://hubzilla/help/developers" target="_blank" >Developers</a><br /><a class="zrl" href="http://hubzilla/help/intro_for_developers" target="_blank" >Intro for Developers</a><br /><a class="zrl" href="http://hubzilla/help/database" target="_blank" >Database schema documentation</a><br /><a class="zrl" href="http://hubzilla/help/api_functions" target="_blank" >API functions</a><br /><a class="zrl" href="http://hubzilla/help/api_posting" target="_blank" >Posting to the red# using the API</a><br /><a class="zrl" href="http://hubzilla/help/developer_function_primer" target="_blank" >Red Functions 101</a><br /><a class="zrl" href="http://hubzilla/doc/html/" target="_blank" >Code Reference (Doxygen generated - sets cookies)</a><br /><a class="zrl" href="http://hubzilla/help/to_do_doco" target="_blank" >To-Do list for the Red Documentation Project</a><br /><a class="zrl" href="http://hubzilla/help/to_do_code" target="_blank" >To-Do list for Developers</a><br /><a class="zrl" href="http://hubzilla/help/roadmap" target="_blank" >Version 3 roadmap</a><br /><a class="zrl" href="http://hubzilla/help/git_for_non_developers" target="_blank" >Git for Non-Developers</a><br /><a class="zrl" href="http://hubzilla/help/dev_beginner" target="_blank" >Step-for-step manual for beginning developers</a><br /><br /><h3>Frequently Asked Questions For Developers</h3><br /><a class="zrl" href="http://hubzilla/help/faq_developers" target="_blank" >FAQ For Developers</a><br /><br /><h3>External Resources</h3><br /><br /><a href="https://zothub.com/channel/one" target="_blank" >Development Channel</a><br /><a href="https://federated.social/channel/postgres" target="_blank" >Postgres-specific Hubzilla Admin Support Channel</a><br />\n\t</div>\n</div>\n<script>var homebase = "http://hubzilla/channel/testes";</script>", "page_title": "help", "title": "Help: Develop", "nav": "\t<div class="container-fluid">\n\t\t<div class="navbar-header">\n\t\t\t<button type="button" class="navbar-toggle" data-toggle="collapse" data-target="#navbar-collapse-1">\n\t\t\t\t<span class="icon-bar"></span>\n\t\t\t\t<span class="icon-bar"></span>\n\t\t\t\t<span class="icon-bar"></span>\n\t\t\t</button>\n\t\t\t<button id="expand-tabs" type="button" class="navbar-toggle" data-toggle="collapse" data-target="#tabs-collapse-1">\n\t\t\t\t<i class="icon-circle-arrow-down" id="expand-tabs-icon"></i>\n\t\t\t</button>\n\t\t\t<button id="expand-aside" type="button" class="navbar-toggle" data-toggle="offcanvas" data-target="#region_1">\n\t\t\t\t<i class="icon-circle-arrow-right" id="expand-aside-icon"></i>\n\t\t\t</button>\n\t\t\t\t\t\t\t<img class="dropdown-toggle fakelink" data-toggle="dropdown" id="avatar" src="http://hubzilla/photo/profile/m/2" alt="testes@hubzilla"><span class="caret" id="usermenu-caret"></span>\n\t\t\t\t\t\t\t\t\t<ul class="dropdown-menu" role="menu" aria-labelledby="avatar">\n\t\t\t\t\t\t\t\t\t\t\t\t<li role="presentation"><a href="channel/testes" title="Your posts and conversations" role="menuitem" id="channel_nav_btn">Home</a></li>\n\t\t\t\t\t\t\t\t\t\t\t\t<li role="presentation"><a href="profile/testes" title="Your profile page" role="menuitem" id="profile_nav_btn">View Profile</a></li>\n\t\t\t\t\t\t\t\t\t\t\t\t<li role="presentation"><a href="profiles/2" title="Edit your profile" role="menuitem" id="profiles_nav_btn">Edit Profile</a></li>\n\t\t\t\t\t\t\t\t\t\t\t\t<li role="presentation"><a href="photos/testes" title="Your photos" role="menuitem" id="photos_nav_btn">Photos</a></li>\n\t\t\t\t\t\t\t\t\t\t\t\t<li role="presentation"><a href="cloud/testes" title="Your files" role="menuitem" id="cloud_nav_btn">Files</a></li>\n\t\t\t\t\t\t\t\t\t\t\t\t<li role="presentation"><a href="chat/testes/new" title="Your chatrooms" role="menuitem" id="chat_nav_btn">Chat</a></li>\n\t\t\t\t\t\t\t\t\t\t\t\t<li role="presentation" class="divider"></li>\n\t\t\t\t\t\t\t\t\t\t\t\t<li role="presentation"><a href="settings" title="Account/Channel Settings" role="menuitem" id="settings_nav_btn">Settings</a></li>\t\t\t\t\t\t<li role="presentation"><a href="manage" title="Manage Your Channels" role="menuitem" id="manage_nav_btn">Channel Manager</a></li>\t\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t<li role="presentation" class="divider"></li>\n\t\t\t\t\t\t<li role="presentation"><a href="admin/" title="Site Setup and Configuration" role="menuitem" id="admin_nav_btn">Admin</a></li>\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t<li role="presentation" class="divider"></li>\n\t\t\t\t\t\t<li role="presentation"><a href="logout" title="End this session" role="menuitem" id="logout_nav_btn">Logout</a></li>\n\t\t\t\t\t\t\t\t\t\t\t</ul>\n\t\t\t\t\t\t\t\t\t</div>\n\t\t<div class="collapse navbar-collapse" id="navbar-collapse-1">\n\t\t\t<ul class="nav navbar-nav navbar-left">\n\t\t\t\t\t\t\n\t\t\t\n\t\t\t\t\t\t\t<li class=" hidden-xs">\n\t\t\t\t\t<a href="network" title="Your grid" id="network_nav_btn"><i class="icon-th"></i></a>\n\t\t\t\t\t<span class="net-update badge dropdown-toggle" data-toggle="dropdown" rel="#nav-network-menu"></span>\n\t\t\t\t\t<ul id="nav-network-menu" role="menu" class="dropdown-menu" rel="network">\n\t\t\t\t\t\t\n\t\t\t\t\t\t<li id="nav-network-mark-all"><a href="#" onclick="markRead('network'); return false;">Mark all grid notifications seen</a></li>\n\t\t\t\t\t\t<li class="empty">Loading...</li>\n\t\t\t\t\t</ul>\n\t\t\t\t</li>\n\t\t\t\t<li class=" visible-xs">\n\t\t\t\t\t<a href="network" title="Your grid" ><i class="icon-th"></i></a>\n\t\t\t\t\t<span class="net-update badge" rel="#nav-network-menu"></span>\n\t\t\t\t</li>\n\t\t\t\n\t\t\t\t\t\t\t<li class=" hidden-xs">\n\t\t\t\t\t<a class="" href="channel/testes" title="Channel home" id="home_nav_btn"><i class="icon-home"></i></a>\n\t\t\t\t\t<span class="home-update badge dropdown-toggle" data-toggle="dropdown" rel="#nav-home-menu"></span>\n\t\t\t\t\t<ul id="nav-home-menu" class="dropdown-menu" rel="home">\n\t\t\t\t\t\t\n\t\t\t\t\t\t<li id="nav-home-mark-all"><a href="#" onclick="markRead('home'); return false;">Mark all channel notifications seen</a></li>\n\t\t\t\t\t\t<li class="empty">Loading...</li>\n\t\t\t\t\t</ul>\n\t\t\t\t</li>\n\t\t\t\t<li class=" visible-xs">\n\t\t\t\t\t<a class="" href="channel/testes" title="Channel home" ><i class="icon-home"></i></a>\n\t\t\t\t\t<span class="home-update badge" rel="#nav-home-menu"></span>\n\t\t\t\t</li>\n\t\t\t\n\n\t\t\t\t\t\t\t<li class=" hidden-xs">\n\t\t\t\t\t<a class="" href="mail/combined" title="Private mail" id="mail_nav_btn"><i class="icon-envelope"></i></a>\n\t\t\t\t\t<span class="mail-update badge dropdown-toggle" data-toggle="dropdown" rel="#nav-messages-menu"></span>\n\t\t\t\t\t<ul id="nav-messages-menu" class="dropdown-menu" rel="messages">\n\t\t\t\t\t\t<li id="nav-messages-see-all"><a href="mail/combined">See all private messages</a></li>\n\t\t\t\t\t\t<li id="nav-messages-mark-all"><a href="#" onclick="markRead('messages'); return false;">Mark all private messages seen</a></li>\n\t\t\t\t\t\t<li class="empty">Loading...</li>\n\t\t\t\t\t</ul>\n\t\t\t\t</li>\n\t\t\t\t<li class=" visible-xs">\n\t\t\t\t\t<a class="" href="mail/combined" title="Private mail" ><i class="icon-envelope"></i></a>\n\t\t\t\t\t<span class="mail-update badge" rel="#nav-messages-menu"></span>\n\t\t\t\t</li>\n\t\t\t\n\t\t\t\t\t\t\t<li class=" hidden-xs">\n\t\t\t\t\t<a class="" href="events" title="Event Calendar" id='events_nav_btn'><i class="icon-calendar"></i></a>\n\t\t\t\t\t<span class="all_events-update badge dropdown-toggle" data-toggle="dropdown" rel="#nav-all_events-menu"></span>\n\t\t\t\t\t<ul id="nav-all_events-menu" class="dropdown-menu" rel="all_events">\n\t\t\t\t\t\t<li id="nav-all_events-see-all"><a href="events">See all events</a></li>\n\t\t\t\t\t\t<li id="nav-all_events-mark-all"><a href="#" onclick="markRead('all_events'); return false;">Mark all events seen</a></li>\n\t\t\t\t\t\t<li class="empty">Loading...</li>\n\t\t\t\t\t</ul>\n\t\t\t\t</li>\n\t\t\t\t<li class=" visible-xs">\n\t\t\t\t\t<a class="" href="events" title="Event Calendar" ><i class="icon-calendar"></i></a>\n\t\t\t\t\t<span class="all_events-update badge" rel="#nav-all_events-menu"></span>\n\t\t\t\t</li>\n\t\t\t\n\t\t\t\t\t\t\t<li class=" hidden-xs">\n\t\t\t\t\t<a class="" href="connections/ifpending" title="Connections" id="connections_nav_btn"><i class="icon-user"></i></a>\n\t\t\t\t\t<span class="intro-update badge dropdown-toggle" data-toggle="dropdown" rel="#nav-intros-menu"></span>\n\t\t\t\t\t<ul id="nav-intros-menu" class="dropdown-menu" rel="intros">\n\t\t\t\t\t\t<li id="nav-intros-see-all"><a href=""></a></li>\n\t\t\t\t\t\t<li class="empty">Loading...</li>\n\t\t\t\t\t</ul>\n\t\t\t\t</li>\n\t\t\t\t<li class=" visible-xs">\n\t\t\t\t\t<a class="" href="connections/ifpending" title="Connections" ><i class="icon-user"></i></a>\n\t\t\t\t\t<span class="intro-update badge" rel="#nav-intros-menu"></span>\n\t\t\t\t</li>\n\t\t\t\t\t\n\t\t\t\t\t\t\t<li class=" hidden-xs">\n\t\t\t\t\t<a href="notifications/system" title="Notices" id="notifications_nav_btn"><i class="icon-exclamation"></i></a>\n\t\t\t\t\t<span class="notify-update badge dropdown-toggle" data-toggle="dropdown" rel="#nav-notify-menu"></span>\n\t\t\t\t\t<ul id="nav-notify-menu" class="dropdown-menu" rel="notify">\n\t\t\t\t\t\t<li id="nav-notify-see-all"><a href="notifications/system">See all notifications</a></li>\n\t\t\t\t\t\t<li id="nav-notify-mark-all"><a href="#" onclick="markRead('notify'); return false;">Mark all system notifications seen</a></li>\n\t\t\t\t\t\t<li class="empty">Loading...</li>\n\t\t\t\t\t</ul>\n\t\t\t\t</li>\n\t\t\t\t<li class=" visible-xs">\n\t\t\t\t\t<a href="notifications/system" title="Notices"><i class="icon-exclamation"></i></a>\n\t\t\t\t\t<span class="notify-update badge" rel="#nav-notify-menu"></span>\n\t\t\t\t</li>\n\t\t\t\t\t\t</ul>\n\t\t\t<ul class="nav navbar-nav navbar-right">\n\t\t\t\t<li class="hidden-xs">\n\t\t\t\t\t<form method="get" action="search" role="search">\n\t\t\t\t\t\t<div id="nav-search-spinner"></div><input class="icon-search" id="nav-search-text" type="text" value="" placeholder="&#xf002; @name, #tag, ?doc, content" name="search" title="Search site @name, #tag, ?docs, content" onclick="this.submit();"/>\n\t\t\t\t\t</form>\n\t\t\t\t</li>\n\t\t\t\t<li class="visible-xs">\n\t\t\t\t\t<a href="/search" title="Search site @name, #tag, ?docs, content"><i class="icon-search"></i></a>\n\t\t\t\t</li>\n\n\t\t\t\t\t\t\t\t\t\t<li class="">\n\t\t\t\t\t<a class="" href="directory" title="Channel Directory" id="directory_nav_btn"><i class="icon-sitemap"></i></a>\n\t\t\t\t</li>\n\t\t\t\n\t\t\t\t\t\t\t<li class="">\n\t\t\t\t\t<a class="" href="apps" title="Applications, utilities, links, games" id="apps_nav_btn"><i class="icon-cogs"></i></a>\n\t\t\t\t</li>\n\t\t\t\n\t\t\t\t\t\t\t<li class="active">\n\t\t\t\t\t<a class="" target="hubzilla-help" href="http://hubzilla/help?f=&cmd=help/develop" title="Help and documentation" id="help_nav_btn"><i class="icon-question"></i></a>\n\t\t\t\t</li>\n\t\t\t\t\t\t</ul>\n\t\t</div>\n\t</div>\n", diff --git a/doc/roadmapv4.bb b/doc/roadmapv4.bb new file mode 100644 index 000000000..4670c73b3 --- /dev/null +++ b/doc/roadmapv4.bb @@ -0,0 +1,27 @@ +[h1]Project Roadmap V4[/h1] + +[h2]Hubzilla 2.0 - code name "Universal Thunder"[/h2] + +[h3]Project Core Development[/h3] + +Goals/Highlights: + + +Focus on visual website design tools, widgets, and sharing mechanisms + +App organisation. + +Conversion of core application to a composer format living under the namespace "Zotlabs" + +Conversion of Modules to a more general purpose Controllers layout with DB/memory based +controller routing as opposed to filesystem routing. + +Conversion of core Zot Protocol to a class library + +Abstraction of nomadic identity so that sending/receiving to/from singleton networks to/from any clone works flawlessly - [b]provided[/b] the clone physically connected to that singleton identity is up. + +[h3]Community Development[/h3] + +CalDAV/CardDAV + +E-Commerce
\ No newline at end of file diff --git a/include/bbcode.php b/include/bbcode.php index 05802aa57..a8372d728 100644 --- a/include/bbcode.php +++ b/include/bbcode.php @@ -570,7 +570,7 @@ function bbcode($Text, $preserve_nl = false, $tryoembed = true, $cache = false) $urlchars = '[a-zA-Z0-9\:\/\-\?\&\;\.\=\@\_\~\#\%\$\!\+\,\@]'; if (strpos($Text,'http') !== false) { - $Text = preg_replace("/([^\]\='".'"'."\/]|^|\#\^)(https?\:\/\/$urlchars+)/ism", '$1<a href="$2" target="_newwin" >$2</a>', $Text); + $Text = preg_replace("/([^\]\='".'"'."\/]|^|\#\^)(https?\:\/\/$urlchars+)/ism", '$1<a href="$2" target="_blank" >$2</a>', $Text); } if (strpos($Text,'[/share]') !== false) { @@ -582,21 +582,21 @@ function bbcode($Text, $preserve_nl = false, $tryoembed = true, $cache = false) } } if (strpos($Text,'[/url]') !== false) { - $Text = preg_replace("/\#\^\[url\]([$URLSearchString]*)\[\/url\]/ism", '<span class="bookmark-identifier">#^</span><a class="bookmark" href="$1" target="_newwin" >$1</a>', $Text); - $Text = preg_replace("/\#\^\[url\=([$URLSearchString]*)\](.*?)\[\/url\]/ism", '<span class="bookmark-identifier">#^</span><a class="bookmark" href="$1" target="_newwin" >$2</a>', $Text); - $Text = preg_replace("/\[url\]([$URLSearchString]*)\[\/url\]/ism", '<a href="$1" target="_newwin" >$1</a>', $Text); - $Text = preg_replace("/\[url\=([$URLSearchString]*)\](.*?)\[\/url\]/ism", '<a href="$1" target="_newwin" >$2</a>', $Text); + $Text = preg_replace("/\#\^\[url\]([$URLSearchString]*)\[\/url\]/ism", '<span class="bookmark-identifier">#^</span><a class="bookmark" href="$1" target="_blank" >$1</a>', $Text); + $Text = preg_replace("/\#\^\[url\=([$URLSearchString]*)\](.*?)\[\/url\]/ism", '<span class="bookmark-identifier">#^</span><a class="bookmark" href="$1" target="_blank" >$2</a>', $Text); + $Text = preg_replace("/\[url\]([$URLSearchString]*)\[\/url\]/ism", '<a href="$1" target="_blank" >$1</a>', $Text); + $Text = preg_replace("/\[url\=([$URLSearchString]*)\](.*?)\[\/url\]/ism", '<a href="$1" target="_blank" >$2</a>', $Text); } if (strpos($Text,'[/zrl]') !== false) { - $Text = preg_replace("/\#\^\[zrl\]([$URLSearchString]*)\[\/zrl\]/ism", '<span class="bookmark-identifier">#^</span><a class="zrl bookmark" href="$1" target="_newwin" >$1</a>', $Text); - $Text = preg_replace("/\#\^\[zrl\=([$URLSearchString]*)\](.*?)\[\/zrl\]/ism", '<span class="bookmark-identifier">#^</span><a class="zrl bookmark" href="$1" target="_newwin" >$2</a>', $Text); - $Text = preg_replace("/\[zrl\]([$URLSearchString]*)\[\/zrl\]/ism", '<a class="zrl" href="$1" target="_newwin" >$1</a>', $Text); - $Text = preg_replace("/\[zrl\=([$URLSearchString]*)\](.*?)\[\/zrl\]/ism", '<a class="zrl" href="$1" target="_newwin" >$2</a>', $Text); + $Text = preg_replace("/\#\^\[zrl\]([$URLSearchString]*)\[\/zrl\]/ism", '<span class="bookmark-identifier">#^</span><a class="zrl bookmark" href="$1" target="_blank" >$1</a>', $Text); + $Text = preg_replace("/\#\^\[zrl\=([$URLSearchString]*)\](.*?)\[\/zrl\]/ism", '<span class="bookmark-identifier">#^</span><a class="zrl bookmark" href="$1" target="_blank" >$2</a>', $Text); + $Text = preg_replace("/\[zrl\]([$URLSearchString]*)\[\/zrl\]/ism", '<a class="zrl" href="$1" target="_blank" >$1</a>', $Text); + $Text = preg_replace("/\[zrl\=([$URLSearchString]*)\](.*?)\[\/zrl\]/ism", '<a class="zrl" href="$1" target="_blank" >$2</a>', $Text); } // Perform MAIL Search if (strpos($Text,'[/mail]') !== false) { - $Text = preg_replace("/\[mail\]([$MAILSearchString]*)\[\/mail\]/", '<a href="mailto:$1" target="_newwin" >$1</a>', $Text); - $Text = preg_replace("/\[mail\=([$MAILSearchString]*)\](.*?)\[\/mail\]/", '<a href="mailto:$1" target="_newwin" >$2</a>', $Text); + $Text = preg_replace("/\[mail\]([$MAILSearchString]*)\[\/mail\]/", '<a href="mailto:$1" target="_blank" >$1</a>', $Text); + $Text = preg_replace("/\[mail\=([$MAILSearchString]*)\](.*?)\[\/mail\]/", '<a href="mailto:$1" target="_blank" >$2</a>', $Text); } @@ -886,17 +886,17 @@ function bbcode($Text, $preserve_nl = false, $tryoembed = true, $cache = false) // if video couldn't be embedded, link to it instead. if (strpos($Text,'[/video]') !== false) { - $Text = preg_replace("/\[video\](.*?)\[\/video\]/", '<a href="$1" target="_newwin" >$1</a>', $Text); + $Text = preg_replace("/\[video\](.*?)\[\/video\]/", '<a href="$1" target="_blank" >$1</a>', $Text); } if (strpos($Text,'[/audio]') !== false) { - $Text = preg_replace("/\[audio\](.*?)\[\/audio\]/", '<a href="$1" target="_newwin" >$1</a>', $Text); + $Text = preg_replace("/\[audio\](.*?)\[\/audio\]/", '<a href="$1" target="_blank" >$1</a>', $Text); } if (strpos($Text,'[/zvideo]') !== false) { - $Text = preg_replace("/\[zvideo\](.*?)\[\/zvideo\]/", '<a class="zid" href="$1" target="_newwin" >$1</a>', $Text); + $Text = preg_replace("/\[zvideo\](.*?)\[\/zvideo\]/", '<a class="zid" href="$1" target="_blank" >$1</a>', $Text); } if (strpos($Text,'[/zaudio]') !== false) { - $Text = preg_replace("/\[zaudio\](.*?)\[\/zaudio\]/", '<a class="zid" href="$1" target="_newwin" >$1</a>', $Text); + $Text = preg_replace("/\[zaudio\](.*?)\[\/zaudio\]/", '<a class="zid" href="$1" target="_blank" >$1</a>', $Text); } if ($tryoembed){ @@ -905,7 +905,7 @@ function bbcode($Text, $preserve_nl = false, $tryoembed = true, $cache = false) } } else { if (strpos($Text,'[/iframe]') !== false) { - $Text = preg_replace("/\[iframe\](.*?)\[\/iframe\]/ism", '<a href="$1" target="_newwin" >$1</a>', $Text); + $Text = preg_replace("/\[iframe\](.*?)\[\/iframe\]/ism", '<a href="$1" target="_blank" >$1</a>', $Text); } } diff --git a/include/identity.php b/include/identity.php index 21d919508..4682cf624 100644 --- a/include/identity.php +++ b/include/identity.php @@ -1689,3 +1689,14 @@ function get_channel_default_perms($uid) { return 0; } + + +function profiles_build_sync($channel_id) { + + $r = q("select * from profile where uid = %d", + intval($channel_id) + ); + if($r) { + build_sync_packet($channel_id,array('profile' => $r)); + } +} diff --git a/include/system_unavailable.php b/include/system_unavailable.php index dfe7c5e6b..00a73fc38 100644 --- a/include/system_unavailable.php +++ b/include/system_unavailable.php @@ -1,6 +1,7 @@ <?php /** @file */ function system_down() { +header('HTTP/1.0 503 Service Unavailable'); echo <<< EOT <html> <head><title>System Unavailable</title></head> diff --git a/include/text.php b/include/text.php index 7c8834fc8..eb9171b40 100644 --- a/include/text.php +++ b/include/text.php @@ -1403,13 +1403,13 @@ function prepare_body(&$item,$attach = false) { // if original photo width is <= 640px prepend it to item body if($object['link'][0]['width'] && $object['link'][0]['width'] <= 640) { - $s = '<div class="inline-photo-item-wrapper"><a href="' . zid(rawurldecode($object['id'])) . '" target="_newwin"><img class="inline-photo-item" style="max-width:' . $object['link'][0]['width'] . 'px; width:100%; height:auto;" src="' . zid(rawurldecode($object['link'][0]['href'])) . '"></a></div>' . $s; + $s = '<div class="inline-photo-item-wrapper"><a href="' . zid(rawurldecode($object['id'])) . '" target="_blank"><img class="inline-photo-item" style="max-width:' . $object['link'][0]['width'] . 'px; width:100%; height:auto;" src="' . zid(rawurldecode($object['link'][0]['href'])) . '"></a></div>' . $s; } // if original photo width is > 640px make it a cover photo if($object['link'][0]['width'] && $object['link'][0]['width'] > 640) { $scale = ((($object['link'][1]['width'] == 1024) || ($object['link'][1]['height'] == 1024)) ? 1 : 0); - $photo = '<a href="' . zid(rawurldecode($object['id'])) . '" target="_newwin"><img style="max-width:' . $object['link'][$scale]['width'] . 'px; width:100%; height:auto;" src="' . zid(rawurldecode($object['link'][$scale]['href'])) . '"></a>'; + $photo = '<a href="' . zid(rawurldecode($object['id'])) . '" target="_blank"><img style="max-width:' . $object['link'][$scale]['width'] . 'px; width:100%; height:auto;" src="' . zid(rawurldecode($object['link'][$scale]['href'])) . '"></a>'; } } @@ -36,10 +36,8 @@ require_once('include/dba/dba_driver.php'); if(! $a->install) { $db = dba_factory($db_host, $db_port, $db_user, $db_pass, $db_data, $db_type, $a->install); - if(! $db->connected){ - header('HTTP/1.0 520 Unknown Error'); - // TODO: much friendlier error message - die("Database error, contact admin."); + if(! $db->connected) { + system_unavailable(); } unset($db_host, $db_port, $db_user, $db_pass, $db_data, $db_type); diff --git a/mod/profile_photo.php b/mod/profile_photo.php index 7067a9f76..2884505f0 100644 --- a/mod/profile_photo.php +++ b/mod/profile_photo.php @@ -6,6 +6,7 @@ */ require_once('include/photo/photo_driver.php'); +require_once('include/identity.php'); /* @brief Function for sync'ing permissions of profile-photos and their profile * @@ -195,6 +196,8 @@ function profile_photo_post(&$a) { ); } + profiles_build_sync(local_channel()); + // We'll set the updated profile-photo timestamp even if it isn't the default profile, // so that browsers will do a cache update unconditionally diff --git a/mod/profiles.php b/mod/profiles.php index 19e5ffc50..282d741ac 100644 --- a/mod/profiles.php +++ b/mod/profiles.php @@ -1,5 +1,6 @@ <?php +require_once('include/identity.php'); function profiles_init(&$a) { @@ -37,6 +38,12 @@ function profiles_init(&$a) { if($r) info( t('Profile deleted.') . EOL); + // @fixme this is a much more complicated sync - add any changed abook entries and + // also add deleted flag to profile structure + // profiles_build_sync is just here as a placeholder - it doesn't work at all here + + // profiles_build_sync(local_channel()); + goaway($a->get_baseurl(true) . '/profiles'); return; // NOTREACHED } @@ -118,7 +125,10 @@ function profiles_init(&$a) { dbesc($name) ); info( t('New profile created.') . EOL); - if(count($r3) == 1) + + profiles_build_sync(local_channel()); + + if(($r3) && (count($r3) == 1)) goaway($a->get_baseurl(true) . '/profiles/' . $r3[0]['id']); goaway($a->get_baseurl(true) . '/profiles'); @@ -193,7 +203,6 @@ function profiles_post(&$a) { $namechanged = false; - call_hooks('profile_post', $_POST); // import from json export file. // Only import fields that are allowed on this hub @@ -220,6 +229,7 @@ function profiles_post(&$a) { } } + call_hooks('profile_post', $_POST); if((argc() > 1) && (argv(1) !== "new") && intval(argv(1))) { @@ -564,8 +574,6 @@ function profiles_post(&$a) { } - - function profiles_content(&$a) { $o = ''; |