zchannel rename to new_channel

This commit is contained in:
friendica
2012-10-29 21:59:49 -07:00
parent f608373d08
commit dca20f4227
10 changed files with 67 additions and 67 deletions
+1 -1
View File
@@ -35,7 +35,7 @@ function manage_content(&$a) {
}
$links = array(
array( 'zchannel', t('Create a new channel'), t('New Channel'))
array( 'new_channel', t('Create a new channel'), t('New Channel'))
);
+4 -4
View File
@@ -2,7 +2,7 @@
require_once('include/identity.php');
function zchannel_init(&$a) {
function new_channel_init(&$a) {
$cmd = ((argc() > 1) ? argv(1) : '');
@@ -57,7 +57,7 @@ function zchannel_init(&$a) {
}
function zchannel_post(&$a) {
function new_channel_post(&$a) {
$arr = $_POST;
@@ -90,7 +90,7 @@ function zchannel_post(&$a) {
function zchannel_content(&$a) {
function new_channel_content(&$a) {
if(! get_account_id()) {
notice( t('Permission denied.') . EOL);
@@ -101,7 +101,7 @@ function zchannel_content(&$a) {
$nickname = ((x($_REQUEST,'nickname')) ? $_REQUEST['nickname'] : "" );
$o = replace_macros(get_markup_template('zchannel.tpl'), array(
$o = replace_macros(get_markup_template('new_channel.tpl'), array(
'$title' => t('Add a Channel'),
'$desc' => t('A channel is your own collection of related web pages. A channel can be used to hold social network profiles, blogs, conversation groups and forums, celebrity pages, and much more. You may create as many channels as your service provider allows.'),
+1 -1
View File
@@ -105,7 +105,7 @@ function register_post(&$a) {
authenticate_success($result['account'],true,false,true);
if(! strlen($next_page = get_config('system','workflow_register_next')))
$next_page = 'zchannel';
$next_page = 'new_channel';
$_SESSION['workflow'] = true;
+9 -9
View File
@@ -16,6 +16,15 @@ function get_theme_config_file($theme){
function settings_init(&$a) {
// default is channel settings in the absence of other arguments
if(argc() == 1) {
$a->argc = 2;
$a->argv[] = 'channel';
}
$tabs = array(
array(
'label' => t('Account settings'),
@@ -83,10 +92,6 @@ function settings_post(&$a) {
if(x($_SESSION,'submanage') && intval($_SESSION['submanage']))
return;
if(argc() == 1) {
$a->argc = 2;
$a->argv[] = 'channel';
}
if(count($a->user) && x($a->user,'uid') && $a->user['uid'] != local_user()) {
notice( t('Permission denied.') . EOL);
@@ -432,11 +437,6 @@ function settings_content(&$a) {
$o = '';
nav_set_selected('settings');
if(argc() == 1) {
$a->argc = 2;
$a->argv[] = 'channel';
}
if(! local_user()) {
notice( t('Permission denied.') . EOL );
@@ -4,36 +4,36 @@ h2 {
margin-top: 15%;
}
#zchannel-form {
#newchannel-form {
font-size: 1.4em;
margin-left: 15%;
margin-top: 5%;
width: 50%;
}
#zchannel-form .descriptive-paragraph {
#newchannel-form .descriptive-paragraph {
color: #888;
margin-left: 20px;
margin-bottom: 25px;
}
.zchannel-label {
.newchannel-label {
float: left;
width: 275px;
}
.zchannel-input {
.newchannel-input {
float: left;
width: 275px;
padding: 5px;
}
.zchannel-feedback {
.newchannel-feedback {
float: left;
margin-left: 5px;
}
.zchannel-field-end {
.newchannel-field-end {
clear: both;
margin-bottom: 20px;
}
+17
View File
@@ -0,0 +1,17 @@
$(document).ready(function() {
$("#newchannel-name").blur(function() {
var zreg_name = $("#newchannel-name").val();
$.get("newchannel/autofill.json?f=&name=" + encodeURIComponent(zreg_name),function(data) {
$("#newchannel-nickname").val(data);
zFormError("#newchannel-name-feedback",data.error);
});
});
$("#newchannel-nickname").blur(function() {
var zreg_nick = $("#newchannel-nickname").val();
$.get("newchannel/checkaddr.json?f=&nick=" + encodeURIComponent(zreg_nick),function(data) {
$("#newchannel-nickname").val(data);
zFormError("#newchannel-nickname-feedback",data.error);
});
});
});
-17
View File
@@ -1,17 +0,0 @@
$(document).ready(function() {
$("#zchannel-name").blur(function() {
var zreg_name = $("#zchannel-name").val();
$.get("zchannel/autofill.json?f=&name=" + encodeURIComponent(zreg_name),function(data) {
$("#zchannel-nickname").val(data);
zFormError("#zchannel-name-feedback",data.error);
});
});
$("#zchannel-nickname").blur(function() {
var zreg_nick = $("#zchannel-nickname").val();
$.get("zchannel/checkaddr.json?f=&nick=" + encodeURIComponent(zreg_nick),function(data) {
$("#zchannel-nickname").val(data);
zFormError("#zchannel-nickname-feedback",data.error);
});
});
});
+29
View File
@@ -0,0 +1,29 @@
<h2>$title</h2>
<form action="newchannel" method="post" id="newchannel-form">
<div id="newchannel-desc" class="descriptive-paragraph">$desc</div>
<label for="newchannel-name" id="label-newchannel-name" class="newchannel-label" >$label_name</label>
<input type="text" name="name" id="newchannel-name" class="newchannel-input" value="$name" />
<div id="newchannel-name-feedback" class="newchannel-feedback"></div>
<div id="newchannel-name-end" class="newchannel-field-end"></div>
<div id="newchannel-name-help" class="descriptive-paragraph">$help_name</div>
<label for="newchannel-nickname" id="label-newchannel-nickname" class="newchannel-label" >$label_nick</label>
<input type="text" name="nickname" id="newchannel-nickname" class="newchannel-input" value="$nickname" />
<div id="newchannel-nickname-feedback" class="newchannel-feedback"></div>
<div id="newchannel-nickname-end" class="newchannel-field-end"></div>
<div id="newchannel-nick-desc" class="descriptive-paragraph">$nick_desc</div>
<input type="checkbox" name="import" id="newchannel-import" value="1" />
<label for="newchannel-import" id="label-newchannel-import">$label_import</label>
<div id="newchannel-import-end" class="newchannel-field-end"></div>
<input type="submit" name="submit" id="newchannel-submit-button" value="$submit" />
<div id="newchannel-submit-end" class="newchannel-field-end"></div>
</form>
-29
View File
@@ -1,29 +0,0 @@
<h2>$title</h2>
<form action="zchannel" method="post" id="zchannel-form">
<div id="zchannel-desc" class="descriptive-paragraph">$desc</div>
<label for="zchannel-name" id="label-zchannel-name" class="zchannel-label" >$label_name</label>
<input type="text" name="name" id="zchannel-name" class="zchannel-input" value="$name" />
<div id="zchannel-name-feedback" class="zchannel-feedback"></div>
<div id="zchannel-name-end" class="zchannel-field-end"></div>
<div id="zchannel-name-help" class="descriptive-paragraph">$help_name</div>
<label for="zchannel-nickname" id="label-zchannel-nickname" class="zchannel-label" >$label_nick</label>
<input type="text" name="nickname" id="zchannel-nickname" class="zchannel-input" value="$nickname" />
<div id="zchannel-nickname-feedback" class="zchannel-feedback"></div>
<div id="zchannel-nickname-end" class="zchannel-field-end"></div>
<div id="zchannel-nick-desc" class="descriptive-paragraph">$nick_desc</div>
<input type="checkbox" name="import" id="zchannel-import" value="1" />
<label for="zchannel-import" id="label-zchannel-import">$label_import</label>
<div id="zchannel-import-end" class="zchannel-field-end"></div>
<input type="submit" name="submit" id="zchannel-submit-button" value="$submit" />
<div id="zchannel-submit-end" class="zchannel-field-end"></div>
</form>