Wakaba/Kareha patches (107)

4 Name: Anonymous : 2010-01-31 09:40 ID:Ws0iREB1 (Image: 1008x561 png, 24 kb) [Del]

src/1264959653901.png: 1008x561, 24 kb

Sorry for my terrible english, my native language is russian. This is Wakaba patch, added 2 radiobuttons with redirect to thread\board after posting. User choise written to cookie.

Replace in futaba_style.pl string

<if ENABLE_CAPTCHA>

with string

<tr id="trgetback"><td class="postblock">Return to</td> <td><label><input name="gb2" value="board" type="radio" /> board</label> <label><input name="gb2" value="thread" checked="checked" type="radio" /> thread</label> </td></tr>
<if ENABLE_CAPTCHA>

Replace in wakaba.pl

elsif($task eq "post")
{
my $parent=$query->param("parent");

with

elsif($task eq "post")
{
my $parent=$query->param("parent");
my $gb2=$query->param("gb2");

Replace in wakaba.pl

post_stuff($parent,$name,$email,$subject,$comment,$file,$file,$password,$nofile,$captcha,$admin,$no_captcha,$no_format,$postfix);

with

post_stuff($parent,$name,$email,$gb2,$subject,$comment,$file,$file,$password,$nofile,$captcha,$admin,$no_captcha,$no_format,$postfix);

Replace in wakaba.pl

my ($parent,$name,$email,$subject,$comment,$file,$uploadname,$password,$nofile,$captcha,$admin,$no_captcha,$no_format,$postfix)=@_;

with

my ($parent,$name,$email,$gb2,$subject,$comment,$file,$uploadname,$password,$nofile,$captcha,$admin,$no_captcha,$no_format,$postfix)=@_;

Replace in wakaba.pl

# set up cookies
my $c_name=$name;
my $c_email=$email;
my $c_password=$password;

with

# set up cookies
my $c_name=$name;
my $c_email=$email;
my $c_password=$password;
my $c_gb2=$gb2;

Replace in wakaba.pl

make_cookies(name=>$c_name,email=>$c_email,password=>$c_password,

with

make_cookies(name=>$c_name,email=>$c_email,gb2=>$c_gb2,password=>$c_password,

Replace in wakaba.pl

# forward back to the main page
make_http_forward(HTML_SELF,ALTERNATE_REDIRECT);

with

# forward back to the main page
make_http_forward(HTML_SELF,ALTERNATE_REDIRECT) if ($parent eq '0');
make_http_forward(RES_DIR.$parent.PAGE_EXT,ALTERNATE_REDIRECT) if ($c_gb2=~/thread/i);
make_http_forward(HTML_SELF,ALTERNATE_REDIRECT);
Name: Link:
Leave these fields empty (spam trap):
More options...
Verification: