Wakaba/Kareha patches (107)

1 Name: Anonymous : 2009-10-22 16:08 ID:0RX4zZms [Del]

Wakaba and Kareha are refreshingly malleable, and I find it surprising that there isn't already a thread for all the "extras" can be patched onto a board, so here goes.

For the record, here are some existing patches on this board:

2 Name: Anonymous : 2009-10-22 16:17 ID:Heaven (Image: 0x0 patch, 2 kb) [Del]

And here's a new one to forever answer the question "what thread was that from?" This patch adds a nifty feature to jump to the thread an image was posted in, by adding /thread at the end of the image's URL. For example:

http://example.com/board/src/1234567890123.jpg/thread

Put this patch in the same directory as wakaba.pl, and apply with patch -p1 < show_thread.patch.

3 Post deleted by user.

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);

5 Post deleted by moderator.

6 Name: Anonymous : 2010-02-01 02:10 ID:INUNzn/6 [Del]

>>4
Any chance to get this working in kareha?

Name: Link:
Leave these fields empty (spam trap):
More options...
Verification: