[Cpan-forum-commit] rev 83 - in trunk: lib/CPAN templates
svn at pti.co.il
svn at pti.co.il
Sat Feb 5 21:57:58 IST 2005
Author: gabor
Date: 2005-02-05 21:57:58 +0200 (Sat, 05 Feb 2005)
New Revision: 83
Modified:
trunk/lib/CPAN/Forum.pm
trunk/templates/about.tmpl
trunk/templates/editor.tmpl
trunk/templates/pwreminder.tmpl
Log:
remove selection box from the new post form
Modified: trunk/lib/CPAN/Forum.pm
===================================================================
--- trunk/lib/CPAN/Forum.pm 2005-02-04 23:40:30 UTC (rev 82)
+++ trunk/lib/CPAN/Forum.pm 2005-02-05 19:57:58 UTC (rev 83)
@@ -190,7 +190,7 @@
Admin page
Admin can change "From" e-address
Enable <i>, <b> <br> and <a ..> with <p></p> pairs
-
+ Remove the selection box from the post interface as it was not used there.
Admin can change e-mail address of any user
Add paging
@@ -267,11 +267,6 @@
displayed we might prefix it auth:gabor, local:gabor etc. Not nice, any better
way ?
-- Add constraint checking to every field that the user can change by submitting
-information.
-
-- Finalize markup
-
Subject field:
- <= 50 chars
- Can contain any characters, we'll escape them when showing on the web site
@@ -315,9 +310,11 @@
Hmm, do I really need this ? maybe as I cannot just delete a user. (added a
status field that is not used currently)
-=head1 TODO Nice to have
+- Administrator can add a new module manually
+- Script that populates databse should not lock the whole database for a long time
+ Maybe it should fetch all the data to memory and work there.
-- Make sure adding a new module works fine
+- Replace the /post/number link by /post/TITLE_OF_POST ???
- make paging available responses 1..10, 11.20, etc,
@@ -1205,6 +1202,7 @@
if ($rm eq "new_post") {
$new_group = ${$self->param("path_parameters")}[0] || "";
$new_group_id = $q->param('new_group') if $q->param('new_group');
+ $self->log->debug("A: new_group: '$new_group' and id: '$new_group_id'");
if ($new_group) {
if ($new_group =~ /^([\w-]+)$/) {
@@ -1237,9 +1235,10 @@
# TODO should be called whent the module_search is ready
return $self->module_serach_form();
}
+ $self->log->debug("B: new_group: '$new_group' and id: '$new_group_id'");
}
if ($rm eq "process_post") {
- $new_group_id = $q->param("new_group");
+ $new_group_id = $q->param("new_group_id");
if (not $new_group_id) {
return $self->internal_error(
"Missing new_group_id. Accessed PATH_INFO: '$ENV{PATH_INFO}'",
@@ -1262,13 +1261,8 @@
);
}
}
- #warn $new_group;
- #warn $new_group_id;
+ $self->log->debug("C: new_group: '$new_group' and id: '$new_group_id'");
- #$new_group =~ s/-/::/g;
- #(my $dashgroup = $new_group) =~ s/::/-/g;
- #$t->param(dashgroup => $dashgroup);
-
my $title = ""; # of the page
my $editor = 0;
$t->param(editor => 1) if grep {$rm eq $_} (qw(process_post new_post response_form));
@@ -1308,7 +1302,10 @@
$new_group = $post->gid->name;
$new_group_id = $post->gid->id;
}
- $t->param("group_selector" => $self->_group_selector($new_group, $new_group_id));
+ $self->log->debug("D: new_group: '$new_group' and id: '$new_group_id'");
+ #$t->param("group_selector" => $self->_group_selector($new_group, $new_group_id));
+ $t->param(new_group => $new_group);
+ $t->param(new_group_id => $new_group_id);
$t->param(new_text => CGI::escapeHTML($q->param("new_text")));
# for previewing purposes:
@@ -1354,8 +1351,8 @@
($parent_post) = CPAN::Forum::Posts->search(id => $parent);
push @errors, "bad_thing" if not $parent_post;
} else { # assume new post
- if ($q->param("new_group")) {
- push @errors, "bad_group" if not CPAN::Forum::Groups->search(id => $q->param("new_group"));
+ if ($q->param("new_group_id")) {
+ push @errors, "bad_group" if not CPAN::Forum::Groups->search(id => $q->param("new_group_id"));
} else {
push @errors, "no_group";
}
@@ -1401,7 +1398,7 @@
eval {
my $post = CPAN::Forum::Posts->create({
uid => $self->session->param("username"),
- gid => $parent_post ? $parent_post->gid : $q->param("new_group"),
+ gid => $parent_post ? $parent_post->gid : $q->param("new_group_id"),
subject => $q->param("new_subject"),
text => $new_text,
date => time,
@@ -1410,8 +1407,6 @@
$post->parent($parent) if $parent_post;
$post->update;
$pid = $post->id;
- #warn $parent_post ? $parent_post->gid : $q->param("new_group");
- #warn "PG:" . $post->gid;
};
if ($@) {
#push @errors, "subject_too_long" if $@ =~ /subject_too_long/;
Modified: trunk/templates/about.tmpl
===================================================================
--- trunk/templates/about.tmpl 2005-02-04 23:40:30 UTC (rev 82)
+++ trunk/templates/about.tmpl 2005-02-05 19:57:58 UTC (rev 83)
@@ -80,16 +80,15 @@
<p class="about_title">TODO</p>
<ul>
<li> Improve the markup language</li>
- <li> Better design</li>
<li> Paging through all the messages </li>
<li> Enable module authors to configure some aspects of the section of their own module</li>
<li> Posting a message under more than one distribution</li>
<li> Create larger discussion groups (e.g. Web development and All)</li>
- <li> Get a nice favicon.ico</li>
+ <li> Get a nice logo and favicon.ico</li>
<li> xml version of the search results</li>
<li> Admin: hide a comment, disable posting to a distibution, hide a distribution and all
its postings</li>
- <li> Admin: disable user</li>
+ <li> Admin: disable user, change e-mail address, change username ?</li>
<li> Statistics on posts, views etc.</li>
<li> Other (human) languages (?)</li>
<li> Enable sending direct mail to a poster (?) (without disclosing e-mail address)</li>
Modified: trunk/templates/editor.tmpl
===================================================================
--- trunk/templates/editor.tmpl 2005-02-04 23:40:30 UTC (rev 82)
+++ trunk/templates/editor.tmpl 2005-02-05 19:57:58 UTC (rev 83)
@@ -8,20 +8,29 @@
<TMPL_IF bad_group>Bad distribution name<br /></TMPL_IF>
<TMPL_IF bad_data>Bad data<br /></TMPL_IF>
<TMPL_IF subject_too_long>Subject must be up to 50 characters.<br /></TMPL_IF>
- <TMPL_IF text_format>Text format is not correct.<br /></TMPL_IF>
+ <TMPL_IF text_format>Text format is not correct. As we are still in development
+ this might be either a bug or on purpose. If after reading again the rules of posting
+ at the bottom of this page you still think your post should work, please send a copy of
+ it to <a href="mailto:gabor at perl.org.il">szabgab</a><br /></TMPL_IF>
<TMPL_IF bad_thing>Bad thing<br /></TMPL_IF>
</div>
<form method="post" action="/">
<p>
+<input type="submit" name="button" value="Preview" />
+<TMPL_IF preview>
+ <input type="submit" name="button" value="Submit" />
+</TMPL_IF>
+<br />
<input type="hidden" name="rm" value="process_post" />
<input type="hidden" name="new_parent" value="<TMPL_VAR id>" />
-<TMPL_VAR group_selector><br />
-Subject:<br /><input name="new_subject" size="60" value="<TMPL_VAR new_subject>" /><br />
-Text:<br /><textarea name="new_text" rows="15" cols="60"><TMPL_VAR new_text></textarea><br />
-
+<input type="hidden" name="new_group_id" value="<TMPL_VAR new_group_id>">
+Distribution: <TMPL_VAR new_group><br />
+Subject:<br /><input name="new_subject" size="100" value="<TMPL_VAR new_subject>" /><br />
+Text:<br /><textarea name="new_text" rows="15" cols="100"><TMPL_VAR new_text></textarea><br />
+
<input type="submit" name="button" value="Preview" />
<TMPL_IF preview>
<input type="submit" name="button" value="Submit" />
Modified: trunk/templates/pwreminder.tmpl
===================================================================
--- trunk/templates/pwreminder.tmpl 2005-02-04 23:40:30 UTC (rev 82)
+++ trunk/templates/pwreminder.tmpl 2005-02-05 19:57:58 UTC (rev 83)
@@ -17,7 +17,7 @@
<input type="hidden" name="rm" value="pwreminder_process" />
</p>
<table>
- <tr><td>Nickname:</td><td><input name="nickname" value="<TMPL_VAR nickname>" /></td></tr>
+ <tr><td>Nickname:</td><td><input name="nickname" value="<TMPL_VAR nickname>" /> or</td></tr>
<tr><td>Email:</td><td><input name="email" value="<TMPL_VAR email>" /></td></tr>
<tr><td></td><td><input type="submit" value="Remind me" /></td></tr>
</table>
More information about the Cpan-forum-commit
mailing list