diff options
-rw-r--r-- | mod/manage.php | 2 | ||||
-rw-r--r-- | mod/new_channel.php (renamed from mod/zchannel.php) | 8 | ||||
-rw-r--r-- | mod/register.php | 2 | ||||
-rw-r--r-- | mod/settings.php | 18 | ||||
-rw-r--r-- | view/css/mod_new_channel.css (renamed from view/css/mod_zchannel.css) | 12 | ||||
-rw-r--r-- | view/js/mod_new_channel.js | 17 | ||||
-rw-r--r-- | view/js/mod_zchannel.js | 17 | ||||
-rw-r--r-- | view/php/mod_new_channel.php (renamed from view/php/mod_zchannel.php) | 0 | ||||
-rw-r--r-- | view/tpl/new_channel.tpl | 29 | ||||
-rw-r--r-- | view/tpl/zchannel.tpl | 29 |
10 files changed, 67 insertions, 67 deletions
diff --git a/mod/manage.php b/mod/manage.php index 557a19375..57d33d086 100644 --- a/mod/manage.php +++ b/mod/manage.php @@ -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')) ); diff --git a/mod/zchannel.php b/mod/new_channel.php index eca22b0a9..e815b2a73 100644 --- a/mod/zchannel.php +++ b/mod/new_channel.php @@ -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.'), diff --git a/mod/register.php b/mod/register.php index 6326c8238..dbf8d25b7 100644 --- a/mod/register.php +++ b/mod/register.php @@ -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; diff --git a/mod/settings.php b/mod/settings.php index 430fc5187..a9f625056 100644 --- a/mod/settings.php +++ b/mod/settings.php @@ -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 ); diff --git a/view/css/mod_zchannel.css b/view/css/mod_new_channel.css index 1b4527a99..3b9c80953 100644 --- a/view/css/mod_zchannel.css +++ b/view/css/mod_new_channel.css @@ -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; } diff --git a/view/js/mod_new_channel.js b/view/js/mod_new_channel.js new file mode 100644 index 000000000..02b6f857e --- /dev/null +++ b/view/js/mod_new_channel.js @@ -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); + }); + }); + + }); diff --git a/view/js/mod_zchannel.js b/view/js/mod_zchannel.js deleted file mode 100644 index 9f85295d7..000000000 --- a/view/js/mod_zchannel.js +++ /dev/null @@ -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); - }); - }); - - }); diff --git a/view/php/mod_zchannel.php b/view/php/mod_new_channel.php index e7709cbd8..e7709cbd8 100644 --- a/view/php/mod_zchannel.php +++ b/view/php/mod_new_channel.php diff --git a/view/tpl/new_channel.tpl b/view/tpl/new_channel.tpl new file mode 100644 index 000000000..b9171644a --- /dev/null +++ b/view/tpl/new_channel.tpl @@ -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> diff --git a/view/tpl/zchannel.tpl b/view/tpl/zchannel.tpl deleted file mode 100644 index d714d8a59..000000000 --- a/view/tpl/zchannel.tpl +++ /dev/null @@ -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> |