Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Make it for wakaba #12

Open
desumodo opened this issue Aug 14, 2019 · 4 comments
Open

Make it for wakaba #12

desumodo opened this issue Aug 14, 2019 · 4 comments
Labels

Comments

@desumodo
Copy link

Can you make a version for standard wakaba?

@WagonOfDoubt
Copy link
Owner

WagonOfDoubt commented Sep 5, 2019

Scripts eng-captcha, expand-images and video-player (if you added support for video uploads) should work with vanilla wakaba. Let me know if they don't.
Unfortunately, it's not trivial to adapt quick-reply and hide-threads to original wakaba layout, as threads on board don't have separate containers. So I doubt I ever will add support of this.
However, many wakaba forks do have threads in their own DIVs, and it's pretty easy to do:
In file wakaba/futaba_style.pl:

diff --git a/futaba_style.pl b/futaba_style.pl
index c497869..0568799 100755
--- a/futaba_style.pl
+++ b/futaba_style.pl
@@ -115,6 +115,8 @@ use constant PAGE_TEMPLATE => compile_template(NORMAL_HEAD_INCLUDE.q{
 <loop $threads>
        <loop $posts>
                <if !$parent>
+                       <!-- thread container begin -->
+                       <div id="thread-<var $num>">
                        <if $image>
                                <span class="filesize"><const S_PICNAME><a target="_blank" href="<var expand_image_filename($image)>"><var get_filename($image)></a>
                                -(<em><var $size> B, <var $width>x<var $height></em>)</span>
@@ -203,6 +205,8 @@ use constant PAGE_TEMPLATE => compile_template(NORMAL_HEAD_INCLUDE.q{
                        </td></tr></tbody></table>
                </if>
        </loop>
+       </div>
+       <!-- thread container end -->
        <br clear="left" /><hr />
 </loop>

This arrangement in theory allows hide-threads script to work, I'm not sure about quick-reply though, there might be more to it, but at least this step is required for it.

@desumodo
Copy link
Author

desumodo commented Sep 6, 2019

I got all of them working expect the hide threads script

@WagonOfDoubt
Copy link
Owner

WagonOfDoubt commented Sep 12, 2019

I tested scripts on my local wakaba.
There was minor mistakes in code in my previous comment #12 (comment), I edited it, with this code hide-threads script works fine for me. This script also didn't work properly on localhost, as regular expression was searching for url with top level domain. This was fixed in 3b2c483 so now it should work anywhere.
Script quick-reply don't work for me (posting from quick reply form is broken, captcha is incorrect). Link to post (>>265) is not inserted automatically because inputs named differently (message field called "nya4" on iichan and "field4" on vanilla). If you got all of them working, then how exactly? Does it work for you?
I didn't test video-player yet.

@desumodo
Copy link
Author

Oh crap. I didn't test quick reply that much but it seems that you can reply when posting in thread but not on the board index. And yeah.. i forgot about the insert (>>) thing.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

2 participants