diff options
author | friendica <info@friendica.com> | 2013-07-14 01:14:03 -0700 |
---|---|---|
committer | friendica <info@friendica.com> | 2013-07-14 01:14:03 -0700 |
commit | 5b73755af7befa171223c6cdb6cc7ec917cedd6f (patch) | |
tree | 69041a7fd1be926904d213b9b8deab5e846ff1d2 | |
parent | 8154268d0a1cc934d7182935258d3f90e43827ba (diff) | |
parent | ba5803bebc144f46fe1a9d29b08e3b6ac71aaecc (diff) | |
download | volse-hubzilla-5b73755af7befa171223c6cdb6cc7ec917cedd6f.tar.gz volse-hubzilla-5b73755af7befa171223c6cdb6cc7ec917cedd6f.tar.bz2 volse-hubzilla-5b73755af7befa171223c6cdb6cc7ec917cedd6f.zip |
Merge https://github.com/friendica/red into zpull
-rwxr-xr-x | boot.php | 5 | ||||
-rw-r--r-- | doc/Home.md | 1 | ||||
-rw-r--r-- | doc/Webpages.md | 14 | ||||
-rw-r--r-- | mod/page.php | 19 | ||||
-rw-r--r-- | mod/webpages.php | 8 | ||||
-rw-r--r-- | view/theme/redbasic/css/dark.css | 14 | ||||
-rw-r--r-- | view/theme/redbasic/css/style.css | 14 | ||||
-rw-r--r-- | view/theme/redbasic/img/bg.png | bin | 119030 -> 0 bytes | |||
-rw-r--r-- | view/theme/redbasic/img/events.png | bin | 1686 -> 0 bytes | |||
-rw-r--r-- | view/theme/redbasic/img/head.jpg | bin | 383 -> 0 bytes | |||
-rw-r--r-- | view/theme/redbasic/img/home.png | bin | 1198 -> 0 bytes | |||
-rw-r--r-- | view/theme/redbasic/img/introductions.png | bin | 1210 -> 0 bytes | |||
-rw-r--r-- | view/theme/redbasic/img/lock.cur | bin | 4286 -> 0 bytes | |||
-rw-r--r-- | view/theme/redbasic/img/message.png | bin | 765 -> 0 bytes | |||
-rw-r--r-- | view/theme/redbasic/img/network.png | bin | 1632 -> 0 bytes | |||
-rw-r--r-- | view/theme/redbasic/img/settings.png | bin | 1609 -> 0 bytes | |||
-rwxr-xr-x | view/tpl/photo_album.tpl | 12 | ||||
-rwxr-xr-x | view/tpl/photo_view.tpl | 11 | ||||
-rw-r--r-- | view/tpl/prettyphoto.tpl | 6 | ||||
-rw-r--r-- | view/tpl/webpagelist.tpl | 21 |
20 files changed, 87 insertions, 38 deletions
@@ -2058,13 +2058,14 @@ function profile_tabs($a, $is_owner=False, $nickname=Null){ 'title' => t('Events and Calendar'), 'id' => 'events-tab', ); + if(feature_enabled(local_user(),'webpages')){ $tabs[] = array( - 'label' => t('Wepages'), + 'label' => t('Webpages'), 'url' => $a->get_baseurl() . '/webpages/' . $nickname, 'sel' => ((argv(0) == 'webpages') ? 'active' : ''), 'title' => t('Manage Webpages'), 'id' => 'webpages-tab', - ); + );} } else { // FIXME diff --git a/doc/Home.md b/doc/Home.md index bf22bd26e..78795c478 100644 --- a/doc/Home.md +++ b/doc/Home.md @@ -10,6 +10,7 @@ Red Documentation and Resources * [Connecting to Channels](help/Connecting-to-Channels) * [Permissions](help/Permissions) * [Tags and Mentions](help/Tags-and-Mentions) +* [Web Pages](help/Webpages) * [Remove Account](help/Remove-Account) **Technical Documentation** diff --git a/doc/Webpages.md b/doc/Webpages.md new file mode 100644 index 000000000..ddde2a401 --- /dev/null +++ b/doc/Webpages.md @@ -0,0 +1,14 @@ +Creating Webpages +================= + +Red enables users to create static webpages. To activate this feature, enable the web pages feature in your Additional Features section. + +Once enabled, a new tab will appear on your channel page labelled "Webpages". Clicking this link will take you to the webpage editor. Here you can create a post using either BBCode or the rich text editor. + +Pages will be accessible at mydomain/page/username/pagelinktitle + +The "page link title" box allows a user to specify the "pagelinktitle" of this URL. If no page link title is set, we will set one for you automatically, using the message ID of the item. + +Beneath the page creation box, a list of existing pages will appear with an "edit" link. Clicking this will take you to an editor, similar to that of the post editor, where you can make changes to your webpages. + +If you are the admin of a site, you can speficy a channel whose webpages we will use at key points around the site. Presently, the only place this is implemented is the home page. If you specify the channel "admin" and then the channel called "admin" creates a webpage called "home", we will display it's content on your websites home page. We expect this functionality to be extended to other areas in future.
\ No newline at end of file diff --git a/mod/page.php b/mod/page.php index 62f9d9204..e1274fff6 100644 --- a/mod/page.php +++ b/mod/page.php @@ -2,6 +2,23 @@ require_once('include/items.php'); require_once('include/conversation.php'); +function page_init(&$a) { + // We need this to make sure the channel theme is always loaded. + $which = argv(1); + $profile = 0; + $channel = $a->get_channel(); + + if((local_user()) && (argc() > 2) && (argv(2) === 'view')) { + $which = $channel['channel_address']; + $profile = argv(1); + } + + profile_load($a,$which,$profile); + +} + + + function page_content(&$a) { @@ -41,4 +58,4 @@ function page_content(&$a) { $o .= prepare_page($r[0]); return $o; -}
\ No newline at end of file +} diff --git a/mod/webpages.php b/mod/webpages.php index 3a3e30309..3cb3ec6bd 100644 --- a/mod/webpages.php +++ b/mod/webpages.php @@ -34,7 +34,7 @@ require_once ('include/conversation.php'); $x = array( 'webpage' => 1, 'is_owner' => true, - 'nickname' => $channel['channel_address'], + 'nickname' => $a->profile['channel_address'], 'lockstate' => (($group || $cid || $channel['channel_allow_cid'] || $channel['channel_allow_gid'] || $channel['channel_deny_cid'] || $channel['channel_deny_gid']) ? 'lock' : 'unlock'), 'bang' => (($group || $cid) ? '!' : ''), 'visitor' => 'block', @@ -65,7 +65,11 @@ $r = q("select * from item_id where uid = %d and service = 'WEBPAGE'", // This isn't pretty, but it works. Until I figure out what to do with the UI, it's Good Enough(TM). return $o . replace_macros(get_markup_template("webpagelist.tpl"), array( - '$pages' => $pages + '$editlink' => t('Edit'), + '$pages' => $pages, + '$channel' => $a->profile['channel_address'], + '$view' => t('View'), + )); diff --git a/view/theme/redbasic/css/dark.css b/view/theme/redbasic/css/dark.css index 74e109f95..43912be69 100644 --- a/view/theme/redbasic/css/dark.css +++ b/view/theme/redbasic/css/dark.css @@ -167,4 +167,16 @@ ul.menu-popup .menu-sep { .my-comment-photo { border-radius: 5px; box-shadow: 4px 4px 3px #000; -}
\ No newline at end of file +} + + +div#pagelist-content-wrapper { +width: 80%; +background: #111; +margin-left: auto; +margin-right: auto; +} + +div.page-list-item { +margin: 20px; +} diff --git a/view/theme/redbasic/css/style.css b/view/theme/redbasic/css/style.css index 762c35a18..9caa9145a 100644 --- a/view/theme/redbasic/css/style.css +++ b/view/theme/redbasic/css/style.css @@ -3893,4 +3893,16 @@ width: 200px; float: left; margin-right: 25px; } -*/
\ No newline at end of file +*/ + + +div#pagelist-content-wrapper { +width: 80%; +background: #fff; +margin-left: auto; +margin-right: auto; +} + +div.page-list-item { +margin: 20px; +} diff --git a/view/theme/redbasic/img/bg.png b/view/theme/redbasic/img/bg.png Binary files differdeleted file mode 100644 index eae49e037..000000000 --- a/view/theme/redbasic/img/bg.png +++ /dev/null diff --git a/view/theme/redbasic/img/events.png b/view/theme/redbasic/img/events.png Binary files differdeleted file mode 100644 index 96dd86899..000000000 --- a/view/theme/redbasic/img/events.png +++ /dev/null diff --git a/view/theme/redbasic/img/head.jpg b/view/theme/redbasic/img/head.jpg Binary files differdeleted file mode 100644 index 6210b76be..000000000 --- a/view/theme/redbasic/img/head.jpg +++ /dev/null diff --git a/view/theme/redbasic/img/home.png b/view/theme/redbasic/img/home.png Binary files differdeleted file mode 100644 index d1ba7b3f3..000000000 --- a/view/theme/redbasic/img/home.png +++ /dev/null diff --git a/view/theme/redbasic/img/introductions.png b/view/theme/redbasic/img/introductions.png Binary files differdeleted file mode 100644 index 9e0498227..000000000 --- a/view/theme/redbasic/img/introductions.png +++ /dev/null diff --git a/view/theme/redbasic/img/lock.cur b/view/theme/redbasic/img/lock.cur Binary files differdeleted file mode 100644 index 892c5e851..000000000 --- a/view/theme/redbasic/img/lock.cur +++ /dev/null diff --git a/view/theme/redbasic/img/message.png b/view/theme/redbasic/img/message.png Binary files differdeleted file mode 100644 index f3fea75ee..000000000 --- a/view/theme/redbasic/img/message.png +++ /dev/null diff --git a/view/theme/redbasic/img/network.png b/view/theme/redbasic/img/network.png Binary files differdeleted file mode 100644 index f3e45c3ec..000000000 --- a/view/theme/redbasic/img/network.png +++ /dev/null diff --git a/view/theme/redbasic/img/settings.png b/view/theme/redbasic/img/settings.png Binary files differdeleted file mode 100644 index a935b225e..000000000 --- a/view/theme/redbasic/img/settings.png +++ /dev/null diff --git a/view/tpl/photo_album.tpl b/view/tpl/photo_album.tpl index 33ab84df7..d2016e41c 100755 --- a/view/tpl/photo_album.tpl +++ b/view/tpl/photo_album.tpl @@ -1,14 +1,4 @@ -{{* - * AUTOMATICALLY GENERATED TEMPLATE - * DO NOT EDIT THIS FILE, CHANGES WILL BE OVERWRITTEN - * - *}} -<script type="text/javascript" charset="utf-8"> - $(document).ready(function(){ - $("a[rel^='prettyPhoto']").prettyPhoto(); - }); -</script> - +{{include file="prettyphoto.tpl"}} <div class="photo-album-image-wrapper" id="photo-album-image-wrapper-{{$id}}"> <a href="{{$photolink}}" class="photo-album-photo-link" id="photo-album-photo-link-{{$id}}" title="{{$phototitle}}" rel="{{$rel}}"> <img src="{{$imgsrc}}" alt="{{$imgalt}}" title="{{$phototitle}}" class="photo-album-photo lframe resize{{$twist}}" id="photo-album-photo-{{$id}}" /> diff --git a/view/tpl/photo_view.tpl b/view/tpl/photo_view.tpl index fce6f6fa8..f825dcba6 100755 --- a/view/tpl/photo_view.tpl +++ b/view/tpl/photo_view.tpl @@ -1,13 +1,4 @@ -{{* - * AUTOMATICALLY GENERATED TEMPLATE - * DO NOT EDIT THIS FILE, CHANGES WILL BE OVERWRITTEN - * - *}} -<script type="text/javascript" charset="utf-8"> - $(document).ready(function(){ - $("a[rel^='prettyPhoto']").prettyPhoto(); - }); -</script> +{{include file="prettyphoto.tpl"}} <div id="live-display"></div> <h3><a href="{{$album.0}}">{{$album.1}}</a></h3> diff --git a/view/tpl/prettyphoto.tpl b/view/tpl/prettyphoto.tpl new file mode 100644 index 000000000..6d047e620 --- /dev/null +++ b/view/tpl/prettyphoto.tpl @@ -0,0 +1,6 @@ +<script type="text/javascript" charset="utf-8"> + $(document).ready(function(){ + $("a[rel^='prettyPhoto']").prettyPhoto(); + }); +</script> + diff --git a/view/tpl/webpagelist.tpl b/view/tpl/webpagelist.tpl index 8ae9a1da8..5c00dee6b 100644 --- a/view/tpl/webpagelist.tpl +++ b/view/tpl/webpagelist.tpl @@ -1,12 +1,13 @@ {{if $pages}} -<div id="pagelist-content-wrapper"> -{{foreach $pages as $key => $items}} -<ul class="page-list"> -{{foreach $items as $item}} -<li><a href="editwebpage/{{$item.url}}">Edit</a> {{$item.title}}</li> -{{/foreach}} -</ul> -<div class="clear"></div> -</div> -{{/foreach}} + + <div id="pagelist-content-wrapper"> + {{foreach $pages as $key => $items}} + {{foreach $items as $item}} + <div class="page-list-item"><a href="editwebpage/{{$item.url}}">{{$editlink}}</a> | <a href="page/{{$channel}}/{{$item.title}}">{{$view}}</a> {{$item.title}}</div> + {{/foreach}} + {{/foreach}} + </div> + + <div class="clear"></div> + {{/if}} |