This thread is for all your simple questions about installing and running Wakaba or Kareha, that just require quick answers. Please don't create new threads for issues like that, post them in here instead.
Before posting, check that the question has not already been answered in this thread, or in the previous two threads:
Also check the documentation: http://wakaba.c3.cx/docs/docs.html
There is also a setup guide by Anon: http://wiki.iiichan.net/index.php?title=Wakaba_and_Kareha_Setup_Guide
Questions about "500 Internal Server Errors" go in this thread: http://wakaba.c3.cx/sup/kareha.pl/1109033191/
The header of the board still points to the support thread part 2. Just thought I'd tell you.
Here's a simple one, can you add boards? Is it done through the config file or the Management Panel? Thanks.
You copy your Kareha directory somewhere else. There's no option of sub-forums or anything like that. You can only have different instances of Kareha in different folders.
Why are there secret options in the first place? Wouldn't it be easier to release them and be done with it instead of being secretive?
>>5
What secret options are you talking about? If you're referring to the SecretFeatures page on the documentation wiki, that's just undocumented features which are included.
Because they are jokes and not meant to be used.
>>8
If we have "useless" functions like that, why not go for stupid things like stickies too?
>>9
because the joke features are amusing, while stickies just turn boards into shit.
from previous thread
987 Name: Anonymous
Wakaba
i turned on function stops Wakaba from renaming image files, but the cyrillic characters look really weird, like укр.jpg.
Can you help me make wakaba show cyrillic names correctly?
989 Name: akane!!xU6Yb/f1
>>987 use UTF-8?
990 Name: Anonymous
>>989
i do use!
i set use encoding 'utf-8' in the beginning of Strings_en, but it does not help
991 Name: Anonymous
>>990
Check your server's configuration. The files have to be served as UTF-8, and that is outside of Wakaba's realm. Specifically, the Content-Type header needs to have a charset=utf-8.
--------------------------------
I added line <meta http-equiv="Content-Type" content="text/html; charset=utf-8" /> to futaba_style.pl but nothing changed. Am I doing smthing wrong?
>>13
name your files in utf-8 instead of whatever weird encoding you're using.
>>15
on most sane operating systems, utf-8 is the default for filenames, and it's easy to change the encoding.
but i'm guessing you're on windows, and i'm not sure how to do it on windows.
you could figure out what encoding your operating system is using and modify wakaba to convert from that to utf-8, but that would break it for anyone who is using any other encoding (including utf-8). you could do some hacks to try to guess the right encoding, but even then it will get some filenames wrong, at the cost of greatly increased code complexity. really, the best option is to just have it rename the files. that's why the default is the way it is.
I've got wakaba up and running and it works for every function EXCEPT uploading images
If you don't select a file everything works fine and thread save and everything
If you try to select a file and submit it hangs indefinitely (Using chrome I see in the bottom left "Uploading: 8%" and it stays there forever)
Any suggestions?
Is there something I can edit in the config file? or is it server issue?
PS: I'm using lighttpd server, not apache
PPS: Apperently there's a max size somewhere other than the config file, I can upload very very small images, but if the image is over 1kb or something it hangs.
This is probably server-side, but I'm not very familiar with that, under lighttpd does anyone know where this problem might be originating from?
#use constant MAX_LINES_SHOWN => 15; # Max lines of a comment shown on the main page (0 = no limit)
If one sets MAX_LINES_SHOWN to 0, one just gets empty posts instead of no limit. Looks like a bug to me.
I want to allow the TXT files on my Wakaba board.
I uncomment the line in config.pl:
use constant FILETYPES => (
And add a line:
# # Other files
txt => 'icons/txt.png'
But it does not work, I get an error:
"no" not allowed in expression at config.pl line 177, at end of line
syntax error at config.pl line 177, near "no encoding"
Compilation failed in require at /var/www/chan/nichan.net/st/wakaba.pl line 16.
BEGIN failed--compilation aborted at /var/www/chan/nichan.net/st/wakaba.pl line 16.
What am I doing wrong?
how can I get this ID Heaven on my imageboard?
I set:
use constant DISPLAY_ID => 1;
use constant EMAIL_ID => 'Heaven';
write an email in message, but still I get regular ID
>>25use constant DISPLAY_ID => 'link';
I think the 0/1 is a lingering old example that doesn't work anymore.
one more question:
i added txt, mp3, doc, ogg, aac, rar, 7z as supported formats. how can i make wakaba rename them? cause wakaba saves their filenames
use constant DATE_STYLE => 'localtime'; # Date style ('futaba', '2ch', 'localtime', 'tiny')
use constant DISPLAY_ID => 'link'; # How to display user IDs (0 or '': don't display,
# 'day' and 'board' in any combination: make IDs change for
each day or board,
# 'mask': display masked IP address (similar IPs look
similar, but are still encrypted)
# 'sage': don't display ID when user sages, 'link': don't
display ID when the user fills out the link field,
# 'ip': display user's IP, 'host': display user's host)
use constant DISPLAY_ID => 1; # Display user IDs (0: never, 1: if no email, 2:always)
use constant EMAIL_ID => 'Heaven'; # ID string to use when DISPLAY_ID is 1 and the user uses an email.
#use constant TRIPKEY => '!'; # this character is displayed before tripcodes
is it rights?
then how do I get ID:Heaven?
is there some way to display pages other than 0 in kareha?
an automatized one i mean, like the wakaba one, since i can't find anything for that in the config and end up manually linking to every page from the header/footer.
so a textboard can't have that? that kind of sucks, i don't really want to replace it with an imageboard (if i'm right, i have to delete the old one and install an imageboard version?).
makes me wonder why does it even generate more pages then, if they can't be accessed unless the users start guessing the links or the admin adds the links manually, and then edit the headers every so often to include every new page/delete nonexistant ones.
You could have it, but it would take some work by hand to write a "hybrid" template supporting the features you want. Out of the box, you have one or the other.
(Generate what now?)
>(Generate what now?)
extra pages with older threads.
i have a generic kareha text board with "use constant PAGE_GENERATION => 'paged';" enabled, and it creates 1.html, 2.html, 3.html etc. with the threads that fell off page 0, so all it'd have to do is link to the existing ones and disable the currently viewed one.
can i apply reCaptcha on wakaba?
>>34
Yes. I made a mod for that, but it depends on the Captcha::reCAPTCHA CPAN library.
i added txt, mp3, doc, ogg, aac, rar, 7z as supported formats. how can i make wakaba rename them? cause wakaba saves their filenames
Find this line in wakaba.pl:
if($filetypes{$ext}) # externally defined filetype - restore the name
and replace it with if (0)
. Hackish but the simplest way to do that.
I tried that on my board once, though, and people really didn't like it.
i dont want kareha to prefill in the name and link fields based off cookie info, how do i fix this?
i dont want kareha to prefill in the name and link fields based off cookie info, how do i fix this?
I dont want kareha to fill out the name and link fields with cookie info, how do i fix this?
WAHa, I was just wondering why you use -size/-geometry in the ImageMagick command instead of -resize. The latter works much faster on my computer than the first. Just asking.
How do you change what the bullet statements below "password" say on the main board?
for example if i change what file types are allowed or file sizes or just want to post the rules there?
I'm trying to cobble together something similar to 4chan/tg/'s dice rolling function. If "dice XdY+Z" is in the email field when the post is submitted, the script will randomly generate numbers to simulate rolling X-number of Y-sided dice, add modifier Z, and put the result into the posted post. So "2d6+5" would result in something like
Rolled 4, 3 + 5 = 12
Rest of post derp herp blahblah etc
The perl script I've found is different in that it can process negative modifiers instead of just adding, but the basic idea is the same.
#!/usr/bin/perl -wl
use strict;
$_ = shift or die 'Invalid argument passed';
s/\s+//g;
/^(\d+)[dD](\d+)([+-]\d+)?$/ or die 'Invalid argument passed';
my $sum = 0;
$sum += 1 + int rand $2 for 1..$1;
$sum += $3 if defined $3;
print $sum;
The problem is I don't know anything about perl or coding aside from some basic concepts like variables and subroutines, so I don't know how to integrate the rolling script with Kareha.
I started off looking through kareha.pl to see where it called rotator.pl (banner image randomizer), so I could modify the function for my own purposes, and have had no luck. I'm probably looking for the wrong thing, or in the wrong place, or have seen exactly what I need but didn't recognize it...
Any help at all is appreciated.
> similar to 4chan
First ask yourself why you need to make a copy of something that already exists. And I can't figure out why you're bringing up banner images, either.
But disregarding that... try putting this in wakaba.pl, right after the message text formatting. You'll probably have to work with it because I didn't test this and I never get perl to work right on the first try. Also I don't remember what the variables are called offhand. Probably they're both wrong.
# mostly your same regex, except with the word 'dice'
# (and with /x, because cramped-up regexes are unreadable)
if ($link =~ /dice \s* ( # $1 = everything after 'dice'
(\d+) # $2 = old $1
\s* d \s* # the letter 'd', literally
(\d+) # $3 = old $2
\s* # some space!
([+-]\d+)? # $4 = old $3, maybe
)/xi) {
# this is the same
my $sum = 0;
$sum += 1 + int rand $3 for 1..$2;
$sum += $4 if defined $4;
$message = '<p>Rolled ' + $1
+ ' = <strong>' + $sum + '</strong></p>'
+ $message;
}
And after you get it to work, maybe post the functioning code to the patch thread. (http://wakaba.c3.cx/sup/kareha.pl/1256252904/l50)
How do I stop the thread numbers from reseting to 1? Eg. "No.1"
>>53
Use Wakaba instead of Kareha.
There's probably ways to patch kareha to keep a running post count, but it'd be a deep change.
Thanks, but I have no idea on how to set up the sql database for Wakaba... If anyone could help me with that, I'd greatly appreciate it.
>>55
You don't have to set anything up. Wakaba does that for you. All you do is fill out the server/username/password in the config, which your host should have given you.
Or you could also try uncommenting the second SQL_DBI_SOURCE line (the one that says "SQLite") instead, and leave everything else blank, if you have the perl sqlite module installed.
All the transparent PNGs I upload get a white background. Where can I disable this?
"Disable" it how? Thumbnails are JPEGs, they can't be transparent. It has to be SOME colour.
>>58
Well is there a way to create the thumbnails in the original format then? I've seen transparent PNG thumbnails and even transparent, animated thumbnails on various chans.
>>59
Of course it's possible, if you rewrite the thumbnail-making code.
use constant DISPLAY_ID => 'day'; # How to display user IDs (0 or '': don't display,
IDs don't seem to be changing daily. Am I doing something wrong here?
Whenever I make a post that has any space between lines, the blank line doesn't show up in the Photon theme. Does anyone know what I need to modify to get Photon to recognize the double-space?
Left is Photon, right is Burichan
>>62
Seek and destroy this rule:
blockquote p {
margin: 0;
padding: 0;
}
Bump for some help with >>61
Seriously. If I'm doing something stupid, just say so. Otherwise, I could really use some help as this seems to be broken.
So there was talk of using a sage checkbox instead of having a link box...
http://wakaba.c3.cx/sup/kareha.pl/1141929669/657
Did anyone ever try that? I'm using an anonymous board where that's the only use for the link box. Kinda awkward.
Also, the mailto:sage thing is silly. Only sage posts turn the name into a mailto link, and that doesn't do anything useful.
Any particular reason why Wakaba stores the IP of posters as an integer?
>>67 That's the only portable way to compare addresses and deal with CIDR ranges.
>>65
Yeah, I've done this on my boards for some time now. Though, we kept the ability to also put sage into the email field, since not everyone is intelligent enough to notice the checkbox. It works well.
>>69
Did you make it so sageing doesn't add a mailto link, or just add a checkbox option? I was thinking of changing this line in kareha.pl:
$link="mailto:$link" if $link and $link!~/^$protocol_re/;
so that there's another condition that $link not be "sage", but I'm not sure if that will break the sage function.
Hello man,
I have accidently moved a couple of threads to archive. How to return them to an imageboards from archive? Simply copying files from /src/, /res/, /thumbs/ doesnt help - e.g., in /res/ html files of threads even disappear after cache update! How to revive threads from archive?
How can I add transparency to previews of the pictures on my wakaba board?
Some of the full image has transparency, but previews never have.
>>74
You need to modify the code to write previews as something other than jpg.
could you help me? Or where can I find info? I want the png and gif images to keep their transparency even in previews.
Hello everyone,
I have a trouble - oekaki applet doesnt work. I can draw normally, uplaod the picture, but after that it says "management password incorrect". Regular posts are sent normally. Why management password incorrect? Maybe wakaba encodes management password incorrect due to encoding? I have utf-8 installed
Lol, problem solved, dunno how
77-kun
How can I get this USER WAS BANNED FOR THIS POST message on Wakaba?
You can't. That's a feature.
I've setup my board, and every thing is working. But the board look itself is odd.
The favicon does not show up, and the text font is different in most places. places is a deferent font than the install of Kareha at The Society for the Study of Imageboard Culture. Even in the input boxes. In fact as I was typing this I noticed that mine is actually like this board here. Why is text on The Society for the Study of Imageboard Culture look different from this board here and mine?
>>81
Because The Society for the Study of Modern Imageboard Culture uses SHIFT_JIS encoding (which you should avoid, unless you're Japanese or a huge weeaboo).
>>82
Oh I understand. You say I should avoid it though The Society for the Study of Modern Imageboard Culture does not seem to have any problems with it. What would be the disadvantages of using SHIFT_JIS?
>>83
Unicode characters won't work. You should rather use a bit of CSS if you absolutely must have the Japanese fonts.
So...
10 pages worth of threads for my Kareha image board disappeared a couple of days ago, and I wanna know why. I haven't touched anything in the FTP files in months.
Could anyone explain why this happened and how to get them back/prevent it from happening?
No, that's not it. After conducting an experiment, it seems like the pages are only able to be at 0 and 1 from now on. It can't make a page 2 anymore for some reason.
Maybe i should just reinstall it?
So, where do I get this url shortening decoder for Wakaba?
I am running small Kareha board. Somehow one thread got disappeared I don't know how. Limits are disabled (manually of by default) or set to other values, so threads shouldn't be autodeleted, I think.
There were 5 pages, and that thread was on 0 page (though it was old, but most active, post limit and bump limit was not reached). OP didn't deleted it too. Where could be the problem?
Also, TRIM_METHOD is better to set to 1? Maybe because of this that thread was gone.
I keep getting this error not matter what I do. Advice?
No SQL settings defined in the configuration at config_defaults.pl line 11.
BEGIN failed--compilation aborted at config_defaults.pl line 126.
Compilation failed in require at wakaba.pl line 17.
BEGIN failed--compilation aborted at wakaba.pl line 17.
To continue about >>89
Could it be because of no space left on disk and that thread was bumped (posted in it)?
I have a small question regarding the the "posts omitted" message in Wakaba. Is there any possible way to accomplish what I'm showing on the bottom half of this image?
>>92
Yes, you can misspell "omitted" by editing strings_en.pl
.
>>96
Doesn't really solve my problem, but okay.
Hi,
I'm using lighttpd and perl on a openwrt.
I'm getting the following error if I'm posting anything:
---
Software error:
Attempt to reload Encode.pm aborted.
Compilation failed in require at wakautils.pl line 616.
---
The Section is creating something for a cookie. How can I fix his?
Don't use lighttpd, probably. I don't think anyone's managed to get wakaba to work with it.
It's working on my debian box with lighttpd.
>>100
I actually have it running perfectly on my Debian box as well.
I believe this problem have something to do with the used perl version for openwrt.
I only installed the "missing" packages, but maybe I missed a few.
It isn't possible to install all perl packages at all, because there is not enough space left on the device
>>106
Only the bare minimum ones needed to run and connect to the database.
Well, better check that again, then. Remember not to comment it out, either.
Trying to set up a Kareha board, however, I've noticed that unless I delete kareha.pl, re-upload it and run it no changes take effect. Is this normal, or am I missing out on something?
>>109
Rebuild the caches from the admin panel after you make changes.
Well I got it working.
Sort of.
http://chansoft.heliohost.org/demos/wakaba/wakaba.html
I'm guessing it depends on the host's control panel, but just how would I do that?
wAHA, what do you think of youtube embedding in the post? Some users want it but I find it annoying when they just start posting a lot of embedded videos instead of images, or text, or at least links.
Would anyone mind telling me if i should be using the same cryptographic secret key across all boards?
If you want secure tripcodes to be the same across all boards, yes.
I get a 404 when I try to Preview Post using Opera (11.51). Does anyone else have this problem?
Got the Page-Load Problem solved. It was missing .pm file.
CGI::Carp qw ( fatalstobrowser does not work correctly on lighttpd.
use the following lines instead:
-> kareha.pl
#use CGI::Carp qw(fatalsToBrowser);
BEGIN {
use CGI::Carp qw ( carpout);
open ( LOG, ">>/tmp/cgi.log" ) or die ("Unable to open cgi.log");
carpout (LOG);
}
So you'll find the perl errors in /tmp/cgi.log
Anyone an idea to solve the problem, that I only see the new posts with a "refresh" of the page .. with lighttpd ??
Hi,
I am using wakaba 3.0.8, apache/2.2.21 and mysql 5.1.56.
Although the site is accessible, I can't post anything. The site just loads for about a second when i use the Submitbutton. There are no errors in the Apache or mysql logs. Any help would be appreciated.
>Anyone an idea to solve the problem, that I only see the new posts with a "refresh" of the page .. with lighttpd ??
I'm having this same exact problem with Wakaba (and maybe Kareha; too early to tell). Any solutions?
>>121
Configure lighttpd to serve HTML files with an "Expires" header set to a date in the past.
Rebuild caches.
Has anyone here ever tried to port Kareha/Wakaba into php-based framework app?
sorry for my bad english
wakaba.pl: Can't locate config.pl in @INC (@INC contains: . /etc/perl /usr/local/lib/perl/5.12.4 /usr/local/share/perl/5.12.4 /usr/lib/perl5 /usr/share/perl5 /usr/lib/perl/5.12 /usr/share/perl/5.12 /usr/local/lib/site_perl) at /var/www/waka/wakaba.pl line 16.
[Wed Oct 26 22:18:00 2011] wakaba.pl: BEGIN failed--compilation aborted at /var/www/waka/wakaba.pl line 16.
how do i fix this?
Hi, I'm trying use Kareha in image mode, but keeping the textboard look, basically what this board is doing. I've setup kareha in text mode and image mode before, but how I set it up in imageboard mode and make it keep the textboard mode look?
The same thing is done on this board: http://www.secchan.net/niche/
>>127
set it up in textboard mode, then enable image posting in config.pl.
So I setup Wakaba on my hosts server and everything was working except for thumbnail generation. In place of the thumbnail you would see a dotted borderlined square, and in it is simple the words "No thumbnail." You click in and it opens the image just fine, but there is never any thumbnail.
Now, I just setup Kareha on the server in image mode, and the very same thing is happening. A dotted boarderlined square with the words "No thumbnail" inside it. And clicking the words brings up the image just fine. But neither will create thumbnails.
Is there anything that could cause this very same problem with both Kareha and Wakaba? I've tried what I could and now I'm stumped.
Help please?
My host uses Apache 2.2.17, by the way.
>>129
Get your host to install Imagemagick (the command line version).
>>129
Kareha and Wakaba need an external program to work? Lame. Well it can't be helped.
But, if I am unable to get them to install it, is there a workaround?
A BIG Thanks :)
>>131
get an imagemagick binary that will run on your server, put it on the server, and set the location in config.pl.
Hey guys, I'm trying to add spoiler text support to wakaba, and I'm new to perl so this is a lot harder for me than it should be. Is there any reason why adding the following to `sub do_wakabamark($;$$)' is not working?
elsif(/^\[spoiler\]/) # spoilers{
if ($lines[0]=~/^\[spoiler\](.*)/){
while !($lines[0]=~/\[\/spoiler\]$/){
push @spoiler,$1; shift @lines;
}
}
$res.="<span class='spoiler'>".(join "<br />",@spoiler)."</span>";
}
Thanks in advance!!
>>135
Oh and if it matters, I'm getting a regex error in this section for some reason, and I don't understand what that has to do with my changes:
# do ^H
if($]>5.007)
{
my $regexp;
$regexp=qr/(?:&#?[0-9a-zA-Z]+;|[^&<>])(?<!\^H)(??{$regexp})?\^H/;
$line=~s{($regexp)}{"<del>".(substr $1,0,(length $1)/3)."</del>"}gex;
}
>>135
>>136
>>138
Made a bunch of changes and got it working for the most part, but now I can't make the spoilers work if post contains any other text before or after the tags. Here's what I have:
elsif(/.*\[spoiler\].*/) # spoilers
{
my @spoiler;
if ($lines[0]=~/.*\[spoiler\](.*)/){
shift @lines;
while ($lines[0]!~/\[\/spoiler\]$/){
push @spoiler,$lines[0]; shift @lines;
}
shift @lines;
if ($lines[0]=~/\[\/spoiler\]$/){
$lines[0]="";
}
}
$res.="<span class='spoiler'>".(join "<br />",@spoiler)."</span>";
}
Not sure what to do next...
Okay, so I moved it until after WakabaMark finishes messing with the text, and did my best to work around the strange placement of the tags it introduced. Here's my "final" solution (until I get rid of Wakabamark completely and start from scrath):
if($res=~/.*\[spoiler\].*/){
$res=~s/\[spoiler\]*/\<span class\=\'spoiler\'\>/g;
$res=~s/\[\/spoiler\]*/\<\/span\>/g;
$res=~s/\<p\>/ /g;
$res=~s/\<\/p\>/\<br \/\>\<br \/\>/g;
$res=~s/\<br \/>/ /;
$res=~s/\<\/span\>\<br \/\>\<br \/\>/\<\/span\>/g;
}
Protip: Don't do that. It seems like it's easy to write a simple text formatter using a bunch of chained regexes.
It is not.
Every single regex is going to interact with every other regex, in subtle ways you will not predict, and you will open yourself up to mis-formatting and HTML injections. Hunting these down will be painful, and once you are done (which you never really are) you will have an utterly unmaintainable monster.
If you want write a text formatter, you will need to use some kind or other of actual parser.
>>141
Interesting. Well, I'm going to take your advice and keep trying to get spoilers working in a Wakabamark like fashion. Any advice?
Anyone know why both Wakaba and Kareha's generated HTML looks like this? If it matters, it happens under both nginx and lighttpd.
>>143
That's intentional. If you want to read the HTML code, use Firebug or similar.
There is little need for people to read it, and adding linebreaks just makes the code and output bigger for no real benefit.
I can post and it shows that in my admin management menu, but I don't see the posts in wakaba.html
How come they won't show?
>>147
Tried to F5/clear browser cache? If that works, use the included example.htaccess file to avoid the problem.
Is there a way for 2 people from 2 computer locations to share control over a Wakaba board? By control I mean fixing config.pl, changing link on top of the site, adding template style, etc.
How do you add boards?
I'm having minor cache problem with wakaba: new posts won't appear unless the page is refreshed, happened in both Firefox and Chrome. Is there a way to fix this?
How do I get rid of the /wakaba.html part from the main URL, as well as .html extension from every page?
I'd tried to use .htaccess but it doesn't fix the problem permanently: after posting, /wakaba.html returned.
>>155
Sorry I don't know, I have a friend hosted+coded the site and he's away atm. The private test board I set up is on Apache.
Last time I mention about removing /wakaba.html, he only said it can't be done even though I've seen some sites did it. So now I'm searching around. Does the methods for each differ much? It might be a good idea to document them.
>>156
Set Apache's directory index to wakaba.html or change wakaba.html to index.html in the config, then either 1) add rewrite rules to redirect wakaba.html to the board's root directory or 2) modify wakaba.pl to always redirect to the board's root directory.
>>100 uh what? i was using lighttpd on chansluts/male general/tranchan/chanchan/intern3ts/etc for about two years.
Is there anyway to force re generation of thumbnails? My older thumbnails are sized differently than my newer ones due to a different configuration, and I was wondering what I could do to make it more uniform other than resizing them in the browser.
Nope, sorry. Unless you write your own script to do it and update the database.
>>160
Might not even have to update the database now that I think about it. Aren't the file names more or less the same in the thumbs folder and the image folder? I'm guessing I can just run some sort of script that will resize the originals and add "t" to the end.
You need to update the image sizes. I think those are in the database.
>>163
Yes it would. Every thumbnail gets displayed with width and height attributes taken from the database.
>>164
I already changed how thumbnails were displayed in futabastyle.pl. I didn't change the larger ones though, since upscaling looks ugly.
>>165
Did you remove the width and height attributes? That's kind of stupid, because the page is going to bounce around like crazy while loading it, especially on slow connections.
>remove
No, I just set the width of all the reply thumbnails to 127px (apparently the height is adjusted accordingly), and my plan is to have the OP thumbnails display at 250px, which kinda has to be the native res if I don't want them to look like shit.
Try posting a 1x1000 pixel image now.
>>168
That -would- be annoying. Well, either way thumbnails are still resized with a 250px max height using imagemagick by default, so it still won't be that much of a problem
Is it possible to start an online archive for Wakaba board similar to how 4chan did it?
Is anyone else having problems logging into Wakaba on Dreamhost? I noticed they seemed to have broken REMOTE_ADDR which made the login not work at all for me.
Anyone else?
>>171
Works fine for me. Sounds like that is a server-specific issue.
>>135-141
So I FINALLY got spoilers working properly. I don't remember who told me, but the only way to get this to work without completely rewriting wakabamark was to hold off on the spoiler function until AFTER all wakabamark related things were completed. Anyways, I went ahead and put my code right after:
# restore >>1 references hidden in code blocks
$comment=~s/>gt;/> >/g;
...which was on line 846 in my version of wakaba.pl. Next is the actual spoiler code:
# new spoiler code (can't put it in 'do_wakabamark' because of 'do_spans' messing with the order of tags
if($comment=~/.*\[spoiler\].*/){
$comment=~s/\[spoiler\]*/\<span class\=\'spoiler\'\>/g;
$comment=~s/\[\/spoiler\]*/\<\/span\>/g;
$comment=~s/\<span class\=\'spoiler\'\>\<br \/\>/\<span class\=\'spoiler\'\>/g;
$comment=~s/\<\/span\>\<br \/\>/\<\/span\>/g;
}
Hopefully this helped -someone- out.
does anyone know why my kareha isnt generating an rss and backlog? the files are there, theyre just blank. my kareha is installed in imageboard mode if it makes any diff
nevermind i just copied the templates from the non imageboard file
Is there any way make individual posts display SJIS art properly in Wakaba like they Kareha does? Or is this something I'll have to add in myself.
>>179
There's no built-in way to do that, but you achieve it with a few quick additions to the templates.
Find something like this in the templates (it should occur twice, IIRC):
<blockquote>
<var $comment>
Replace it with this:
<blockquote<if $email=~/^aa$/i> class="aa"</if>>
<var $comment>
Then add this to either the global stylesheet in the header template, or to each individual stylesheet:
.aa { font-family: 'MS PGothic', MS Pゴシック, IPAMonaPGothic, Mona; }
Finally, to post with SJIS art, just enter "aa" in the email field. Note that I haven't tested this.
Speaking of CSS, was there any significance to .reply blockquote, blockquote :last-child { margin-bottom: 0em }
in futaba_style.pl? Most seem to consider the way it looks odd, and both 4chan and 2chan are rendered the way Wakaba would be without it.
Probably something about emulating the exact look at Futaba at the time it was written.
>>183
It works you do /aa$/i
as well. I didn't think to add mailto:
.
Im running apache2 on ubuntu, and I am not able to access .pl files from my web browser for some reason I get 403 errors every time. Its my own server, what have i messed up?
I did configure it for .pl and .cgi files in apache2.conf
Ask on an Ubuntu forum. And when you do, actually tell them what you did. People can't read your mind over the internet.
After I was making changes to config.pl in Wakaba 3.0.8 and uploading the revisions, I noticed that I can't get into the management panel without getting a software error, nor can anyone make any posts on the board without getting the same error. It says ADMIN_PASS and NUKE_PASS aren't defined. I didn't make any changes to those passwords while making my revisions and I don't know how to fix it. This is not my imageboard either. I'm just helping a friend and I don't want him to know.
Is there a way to disable WakabaMark rendering when posting SJIS art on Wakaba 3.0.7? i.e. don't bold or italicize asterisk and underscore pairs.
Quick question:
Is there a way to get the management panel to link to actual posts or show its thread? Currently it shows post numbers, name, subject, comment, IP, etc.
No ADMIN_PASS or NUKE_PASS defined in the configuration at /usr/lib/perl5/5.8.8/CGI/Carp.pm line 314.
BEGIN failed--compilation aborted at config_defaults.pl line 125.
Compilation failed in require at wakaba.pl line 17.
BEGIN failed--compilation aborted at wakaba.pl line 17.
Line 17 says
BEGIN { require "config_defaults.pl"; }
Kareha: When I move my board, including all scripts and files to another directory, nothing works right because it doesn't reflect the new path. Everything works fine in admin.pl and elsewhere if I add my /path/ to the address. I've tried rebuilding caches in admin.pl as well as deleting all of the html files and running kareha.pl in a browser to recreate them. I've tried recopying default config and all of the pl files. Is there something I am missing?
How would one go about disabling code formatting in Wakaba? Deleting this
elsif(/^(?: |\t)/) # code sections
{
my @code;
while($lines[0]=~/^(?: |\t)(.*)/) { push @code,$1; shift @lines; }
$res.="".(join "<br />",@code)."";
}
Doesn't seem to do anything but cause wakaba.pl to get stuck in and endless loop and consume 100% of my CPU.
>>193
You shouldn't really touch the parser unless you know what you're doing. That being said, you can probably fix the problem if you also change while($lines[0]!~/^(?:\s*$|1\. |[\*\+\-] |>| |\t)/) { push @text,shift @lines; }
to while($lines[0]!~/^(?:\s*$|1\. |[\*\+\-] |>)/) { push @text,shift @lines; }
.
>>194
That seemed to do it. I can't seem to figure out why though...
Running Kareha, 2ch mode. Every post (regardless of poster) got the same ID, which made me curious. When I saw the IP attached to the posts in admin.pl, it turned out that all posts were made by 127.0.0.1, somehow.
That seems pretty impossible and I have no idea what’s going wrong.
Are you infected with some kind of PHP malware that rewrites links? Check your .htaccess files for mysterious junk.
Yes, the parser is a terrible regex monster, and is not really understandable by anyone, including me. Lesson learned: Don't do parsers as a series of regex transformations, this never turns out well.
So, I've recently created an imageboard, but found out that with my host, I don't have permission to do exec(). Needless to say, this causes problems, because I cannot use the convert command to create thumbnails.
Is there any alternative to imagemagick, or other libraries that use exec() for displaying thumbnails? I like my host otherwise, and would rather not switch if at all possible.
thanks!
>>202
This sounds weird. CGI works by executing a process on the server, so the problem isn't there. It's more likely that exec()
is disabled for PHP, which doesn't affect CGI scripts at all, and that the server is simply missing binaries for imagemagick.
Hello,
I had a a few quick questions regarding the subback page - not sure if I should have started a new thread for this.
I am wanting to do one of two things:
I'm very new to perl, well to programming in general... I think this has to do with "use constant", although I'm not too sure. I've been toying with it, and have had no luck yet.
2. Pagnating the subback page with "older" and "newer".
Any help would be greatly appreciated.
So, my Kareha textboard started giving an error. I haven't made any changes in it in a while so I don't know what it would be. It's okay from the front page, and you can post from the front page, yet if you try to open a whole page the error occurs and it crashes. It says it's looking for a <br> tag, and not finding it.
View the whole thing by loading a thread: http://chansoft.heliohost.org/grey/kareha.pl/1321138418/l50
Please help me find a fix. Thank you.
>>206
Have you changed your template at all?
>>207
By "template" do you mean the .html files in the "includes" folder?
Yes. And you can see it on the board. I had the footer.html changed a while back but I reverted it back to the original.
I need the Kreha last 50 post option but for wakaba. How can I do this?
In order to do the last 50 posts thing in wakaba, I'd need to generate in res 2 files for every thread: 1, the thread as normal and 2, the thread with just the last fifty posts and a link to get back to the original full thread in the "omitted" area. I'd also need to place a link in line with the reply link that points to the <thread number>_l50.html called "Last 50." I know what needs to be done, I just can't code it. If anyone could help: I'd appreciate it.
How exactly would one go about printing the contents of a constant array in futaba_style.pl? I noticed that Wakaba seems to use a template system of its own, and there's no real documentation...
>>211
...Never mind just figured out what was going wrong. I just needed to escape the > with a \
Does anyone know if its possible to move a thread from one board to another in Wakaba? I'm assuming all I have to do is move the data from one comments table to another, but I'm worried that there might be some crazy date/sorting related stuff that will fuck it all up for me.
Anyone a little more matter on the topic hanging around here?
Moving the rows to the other table, and moving any images in src/ and thumb/, and then rebuilding caches should work. You'd probably want a program to do it for you though.
>>214
Is there anything you recommend? I thought I might be able to try it out in the SQL interface, and then add a function to wakaba.pl once I'm sure it works 100%. I just wanted to make sure the thread wouldn't magically render in the wrong order, or post numbers wouldn't collide. Would it be a good idea to change all of those values to make sure nothing gets in the way of each other?
>>213-216
It seems like there's an unintended side effect to simply "moving" the thread over. The post numbers on the new board get bumped up (what would happen if they were lower on the source board? More problems I'd imagine). I guess the only way to avoid this is manually editing each field or changing everything problematically...
I can't seem to figure out where posts
in my ($parent,@replies)=@{$$thread{posts}};
comes from in sub build_cache_page($$@)
Can anyone help me solve this?
Can anyone walk me through this? I'm a bit lost as to what this is doing exactly.
while($row=get_decoded_hashref($sth))
{
if(!$$row{parent})
{
push @threads,{posts=>[@thread]};
@thread=($row); # start new thread
}
else
{
push @thread,$row;
}
}
push @threads,{posts=>[@thread]};
Has anyone here successfully configured Kareha with Nginx so that he can paste his config?
>>220
Last I checked there's really nothing you need to do with nginx specifically other than getting Perl running if you haven't already.
>>221 I have, but links like kareha.pl/1326737060/l50 don't work. They throw 404s.
>>222
Kareha uses the PATH_INFO server variable which apparently doesn't work correctly in nginx (see http://www.saltwaterc.eu/how-to-fix-nginx-and-phpfastcgi-path_info-issue.html).
My suggestion would be to change PATH_INFO to QUERY_STRING and modify templates so that links become kareha.pl?/...
instead of kareha.pl/...
.
>>223
Huh... I wonder why I never had that issue.
I think I had some crazy url rewrites(because of some previous reverse proxying that I did) that may have magically fixed the problem.
Are there any other ways to get this working without having to make the URLs less aesthetic?
>>223,224
Any chance the issue's been fixed recently?
Currently, Wakaba's ban feature only prevents the users from posting. Is there a way to ban them from viewing the board as well?
>>226
That has to be done server-side, e.g., using Apache's mod_rewrite or access control directives.
Okay, here's two recently discovered in wakaba vulnerabilities:
1) deny of service: every time user deletes post with "file only" flag wakaba updates db and rebuilds cache, even if there's no file already. so it's possible to "delete" post unlimited number of times, and each will cause complete cache rebuild and DoS as a result
2) wakaba doesn't check "admin" flag when deleting thread with "archive" flag set. so anyone can forge request and put own threat to archive. Post CP, delete to archive, write abuse. profit.
Archiving will only work if there are folders for the archive, and if they have the correct permissions. Simple solution, don't have an archive.
The potential for DoS is more important.
>>229 well, another simple solution is to add
$archive = 0 unless($admin);
in delete_stuff after
$password="" if ($admin);
>>231
wakachan.org have arch on some boards.
iichan.hk (ex iichan.ru) have arch on almost all boards.
Good thing that, although wakaba distribution includes arch directory, there's nothing in manual about setting permissions for it. So it's safe to assume, i think, that by default you don't have an archive.
Second problem (DoS) also kinda easy to fix. I can post a patch against latest wakaba.pl if anyone interested.
>>232
I just wrote up a small fix for my board. I just made a variable called $hasimage
, and I set it to 1 if if($$row{image})
is true. Then when its time to rebuild caches, I just put a make_error()
inside of if(($fileonly)&&($hasimage==0))
.
After I did all of that I realized I could probably just do a make_error()
as an else statement appended to if($$row{image})
, but both will work just fine I think.
>>233
I'd post a patch, but my wakaba.pl is... pretty different at this point compared to the standard one.
>>233
Well, that's not a proper way, as you should just redirect user back if there's nothing to update.
Proper way is: return 1; at the end of delete_post, return 0; as an else statement for if($$row{image})
Also, change UPDATE sql statement to set image=null
(i have no idea, why it's not updating image field now)
Next, change code in delete_stuff to something like this:
my $updated=0;
foreach $post (@posts)
{
$updated+=delete_post($post,$password,$fileonly,$archive);
}
# update the cached HTML pages
build_cache() if ($updated);
>>235
I'm sorry, but how does one decide what's proper or not? If it works, it works.
>>236
Well, first of all, it changes how wakaba behaves. Second - showing an error (which is generated from template every time) is more resource consuming than redirecting to a static file. Also note, that Mr.Manager's code doesn't update db, so $$row{image} will always be true.
Anyways, it's entirely up to you which solution to use.
>>237
If it updated the db before it still should. I'll check it out once I get back from work.
How do I change the folder's name from wakaba to something else without messing things up.
>>239
I think you can just change the folder name and the script will handle the rest...
>>240
Thanks for the answer but that doesn't work
Whenever I change the wakaba folder's name it keeps linking everything else to the wakaba folder.
>>242
Um I don't know exactly what you mean by that :S
Wakaba 3.0.9
Some basic questions for you guys.
• I've searched for a while as to where the place to change what style sheets are used. I assumed it was in futaba_style.pl but after searing through many a perl file I could not locate it. I thought what If I just take the existing styles out of .../css/ and of course replace them with my own and fix it in the config.pl but I don't want to get to install time and have a stupid question. I'd rather get my being stupid done with. Even a thread with the relevant information would be great.
• Would it be better to lower the CAPTCHA_LIFETIME => from 1440 seconds to say 60?
• Does setting TRIM_METHOD => 1 when using ARCHIVE_MODE => 1 make for a correct environment so that the script can archive properly instead of doing some funky unwanted stuff?
• What does NUKING a board do? My thoughts are a nuke, which would mean no more board. I'm clueless on this one since I never had to feel the need to click the button.
• That's about the only problems I'm having as I was successfully able to set up multiple wakaba boards in the past with little difficulty. I just need to get a little more creative and make it my own.
Thanks for having a great script. WAHa :)
Also I wouldn't need .../extras/oekaki, old_perl, translations, and load_balancing directories if I'm not using them right? Don't know if I need any of this miscellaneous.
> I thought what If I just take the existing styles out of .../css/ and of course replace them with my own
That's actually all you need to do.
>What does NUKING a board do? My thoughts are a nuke, which would mean no more board. I'm clueless on this one since I never had to feel the need to click the button.
Pretty much. I mean, the board's still there, but all of the data is deleted.
> Does setting TRIM_METHOD => 1 when using ARCHIVE_MODE => 1 make for a correct environment so that the script can archive properly instead of doing some funky unwanted stuff?
You'll need to make the folders and set up the permissions manually.
>245
Exactly.
Alright cool. Fun times then
Thanks Mr. Manager
I thought the folders in each install were already setup. As in:
I'm not on the computer right now but I believe it's the the "arch" folder that has 3 folders in it. Either way I thought the "arch" folder was reserved for archival needs.
I know you're host has to be cool with .pl scripts as well so that everything gets chmoded proper like when the html get crapped out from the whole archive process.
Another dumbass thought. I was pondering what you wrote about
You'll need to make the folders and set up the
permissions manually.
I figured I might want to look inside of config.pl at the bottom where all directories are listed, or in the archive script which I forgot what it's called. When I get home I'll look in those 2 spots and if it's not there I'll just lurk moar?
Again, many thanks Mr. Manager.
>>248
I was talking about arch
. All you'll need to do now is make sure the permissions are okay, and you should be fine. In my experience, archiving seems to be a little testy on most setups, so I'd experiment with unimportant threads before using it for anything serious. I accidentally lost the first 50 posts of my board because wakaba and my server configuration didn't like arch wasn't owned by www-data.
I'm too stupid sometimes.
config_defaults.pl
Is this for after a nuke?
Lawd. I remember reading somewhere that it'd be good to have the tables (admin and proxy) for all the boards be the same.
For admin tables I get it for banning on all boards. I know about the crypto secret in config.pl (all tripcodes the same). I'd just like some clarification from some pros on the proxy side.
I don't think you're going to need a dedicated server. Get a $15/year VPS from BuyVM if you want to experiment.
Well I'm OK on the web hosting now. I was just tripping out and didn't want to do the wrong thing.
So what about the proxy tables being the same?
Is config_defaults.pl for after a nuke? Does it resort to needing that.
>>255
Sure, and no. Your config is safe after a nuke.
Well thank you good sir.
I was wondering if this thread is dead:
wakaba.c3.cx/sup/kareha.pl/1111785884/
I think it is but I was wondering if you have to have a seperate SQL DB for each notes install?
>>238
Nah, it updated just thumb, leaving image
as it is
>>259
Interesting. Thanks for pointing it out. I would've never noticed.
I'm still thinking that it's one SQL per notes install.
Thanks dudes,
To change the filetypes that are OK to use on a board. Would I go into
wakaba.pl
and go to
sub get_filetypes()
and just add some more
sub get_filetypes()
my %filetypes=FILETYPES;
$filetypes(gif)=$filetypes(jpg)=$filetypes(png)=$filetypes(mp3)=$filetypes(torrent)=$filetypes(swf)=1;
Something like this?
I forgot. it's been about 2 years since I last attempted this.
I just noticed that whole ID thing. I'm on my phone and I guess at&t give their phone network some random IP thing. not too sure. Well I'm setting Wakaba up today, well hopefully.
I'll try and see what I can do and then I'll come back here to see what's good. I was perusing around the internet and was at wakabachan iiichan and some other ones and dome of them had the main board HTML as some funky stuff, other than the generic index.html and I was wondering if that was some normal thing or if you could just rename it in config.pl or some other .pl and then rebuild caches?
Oh yeah did you hear about godaddy getting pwned somehow? All there servers went to crap. Darn news.
> Oh yeah did you hear about godaddy getting pwned somehow?
It's surprising how much I've heard about that... I wouldn't expect people who use GoDaddy to know how to read, let alone type.
>>264
Hey now, I have a single domain with them from a year and a half ago, before I knew any better.
I guess I'll stick with it until I find something better. I might have to make another thread on hosts. since I don't think it's been posted to in quite a while. I for one don't have a ton of money and I'd like a host who isn't going to whine about the stuff I have on the site. Obviously nothing illegal. I do want to have a tgp but that's besides the point.
Anyways I believe we're getting off topic. I'll create a thread for new hosts because I hate being that necroposter Guy.
I think we also need a new thread for the Notes script. because I like it.
> Don't start new threads for every question,
... just sayin'. the existing threads aren't full yet, why not keep using them?
I'm not starting threads for every question. This is the first thread I started.
wakaba.c3.cx/sup/kareha.pl/1347420999/l50
it just doesn't seem like web hosts is this threads topic. the other thread I read and I'm looking for some different answers so I think it's a tad different. I'm not going to argue, I'd just like to get some help or suggestions is all and not waste my money.
my bad. The notes one was just a suggestion. but the web host one is something I'd like to plan out in advance and have it ready to go.
Why is Kareha so slow for large boards? e.g. /dqn/
>>271
I hear its slow all the time, but I just went to DQN and every thread I opened loaded with 1 second.
Ok so I got one test board up so I can figure out what I'm doing wrong and not replicate it. But I have
fuckingdesired.com/a/wakaba.html
and it's letting me know that it's timing out when it tries to get to
https://www.fuckingdesired.com/a/wakaba.pl?task=admin
which is kind of a bummer. I'm allowed to post images, but i was trying to replace the css and rebuild the caches, which should fix the css and make it all good. At least I was thinking. I do have the https, the secure admin thing on in config.pl. I'm thinking I may want to turn that off and try again.
Ok so I'm thinking I was just trying to be too cool. I took off the https secure thing and redid the board and it's semi cool for now. So yay.
Oh my gosh, this is quite frustrating. I got one board set up by some kind of trial and error. I tryed to setup my other boards under the same MySQL
I have the same user & pass for the DB for each board, but with different tables for captcha and comments and the same for admin, and proxy. that the first board has and for some goofy reason it's coming back with an error, a 500 server error to be exact. I figured I'd check here and see if I did something really dumb as crap. You can check it out at
fuckingdesired.com/am/wakaba.pl
or any thing like that since I have them all hanging out. I hate FTP with android. Sooooooo dumb.
If Waha has any questions or want to see the config just send me an email gotabowl at gmail.
what's wrong with utorrent?
I figured it out, I just didn't put the right permissions.
>>278
A lot but that's completely beside the point.
I'm trying to get Wakaba to keep linebreaks in certain parts of the template, specifically things that are included, but I can't seem to figure out how to get the whitespace successfully preserved in include() to not get stripped away in compile_template().
Any ideas? I have half of it working, I just need to find a way to make everything else play along.
>>280
Find sub include($)
in wakautils.pl
, and change the whole block to something like this:
sub include($;$)
{
my ($filename,$nostrip)=@_;
open FILE,$filename or return '';
my $file=do { local $/; <FILE> };
unless($nostrip)
{
$file=~s/^\s+//;
$file=~s/\s+$//;
$file=~s/\n\s*/ /sg;
}
return $file;
}
Then use something like include("file.html", 1)
in the templates. The second argument will tell it to not strip whitespace.
I coulda sworn I already replied to >>281, but I don't see it here.
Anyways, I already got it not to strip whitespace in include(), but it's getting stripped later on in compile_template(). That's where my problem is.
I'm using Kareha on a board I made, but for some reason every new thread's number is 1, even though it should auto-increment.
Now in Wakaba it would just be setting the MySQL table's thread number value to auto-increment, but since Kareha doesn't use SQL, how do I do this?
That's how it works.
I was wondering how I can get different, or other file types to be able to be uploaded, rather than the default jpg, PNG, and GIF.
I've searched for a solution but I guess I'm obviously retarded
>>286
There's an option in the config for this last time I checked...
Well like I said, I might be a tad retarded, I'll take a look for it again. Thanks for the reply though.
I am using Wakaba and I checked the config.pl again
#use constant ALLOW_UNKNOWN
#use constant MUNGE_UNKNOWN
#use constant FORBIDDEN_EXTENSIONS
These are what I came up with. This is my first time set up so I'm not that knowledgeable on where this would be located but when I look at the setting listed above it just seems like those are the files that aren't allowed. I'd rather not mess around with it because I know I'll mess it up. I waited a month last time because I put a & in the
use constant TITLE
field.
Ok well I think I got it figured, my brain is full of hurt.
So my guess is that I uncomment the filestypes I'd like to use as long as there are images for them. I'd like to include .rtf, .txt, .docx
# Icons for filetypes - file extensions specified here will not be renamed, and will get icons
# (except for the built-in image formats). These example icons can be found in the extras/ directory.
#use constant FILETYPES => (
So all I have to do, I think is include the randoms after these ones and uncomment the ones I want? Like so?
# # Other files
# swf => 'icons/flash.png',
# torrent => 'icons/torrent.png',
rtf => 'icons/rtf.png',
docx => 'icons/docx.png',
txt => 'icons/txt.png',
odt => 'icons/odt.png',
Blimy
ok so where I'm testing this at is
fuckingdesired.com/test/
and I got the filetypes to display on the rules.html but when I tried to post a txt file I got this:
Software error:
Possible IE XSS exploit in file at wakautils.pl line 1118.
I went to line 1118 where it told me it's having a problem
# Check for IE MIME sniffing XSS exploit - thanks, MS, totally appreciating this
read $file,my $buffer,256;
seek $file,0,0;
die "Possible IE XSS exploit in file" if $buffer=~/<(?:body|head|html|img|plaintext|pre|script|table|title|a href|channel|scriptlet)/;
Looked through this a bit and decided I didn't know what it did but it was quite a bummer. Thought I had figured this out. So I went back to the config.pl and uncommented these hoping it'd make it work but nope
use constant ALLOW_UNKNOWN => 1;
use constant MUNGE_UNKNOWN => '.unknown';
So now my head is full of fudge again but I'll attempt to play around and figure it out which is why I made a test board.
Good gawrsh...
Ok jeeze didn't take too long to figure out.
I went into wakaba.pl line 1613 and added this business
sub get_filetypes()
{
my %filetypes=FILETYPES;
$filetypes{gif}=$filetypes{jpg}=$filetypes{png}=$filetypes{rtf}=$filetypes{doc}=$filetypes{docx}=$filetypes{txt}=$filetypes{odt}=$filetypes{odf}=1;
return join ", ",map { uc } sort keys %filetypes;
But for some reason the images I made aren't showing up even though I defined where they live in the config.pl? kind of odd
I guess I figured it mostly out so now I can try to figure the next portion out.
The test board is at
fuckingdesired.com/test/
>>285,280,282
Any advice on this? I'm starting to think it may be impossible because of the way the template system is coded, but I'm really hoping someone could tell me otherwise.
>>294
I believe compile_template takes an optional second argument which preserves whitespace. Simply change }.NORMAL_FOOT_INCLUDE);
at the end of each template to }.NORMAL_FOOT_INCLUDE, 1);
.
>>295
You'd probably be better off asking your question here: http://www.wrongplanet.net/
Lol, I don't know how that'd be any bit more helpful than I am asking
questions here. Kind of figured I'd get that response.
I guess I'll have to go to freelancer.com and pay someone
to set up the extra stuff I want. Been thinking about it for a while,
I am learning Perl but I'm still on Learning Perl
but I don't think that's going to help anytime soon.
So I think that's my best bet.
Thanks for all the great helpful help Anon.
Guess I'll email Waha and if I get nothing from that
I'll shell out $500 I don't have to get someone who knows the answer to the questions I ask. I mean this is a discussion board for
the script, amiright? I'd think someone would come up
with something a tad better then telling me
I don't know what the fuck I'm doing, but shit
it's nice to know that only a couple of people on
here actually do. Not that I'll be switching to
Kusaba X, because I'd see that as traitorous
behavior plus it's just bloated.
Waha, Mr. Manager
Thanks for your help and Wags keep at it.
All I know is I'm not going to ask a question
here ever again, because I know I'll never get a legit
answer from people who want to look down
on me for ... hmmmm .... not understanding
years and years of coding experience.
My goodness, a discussion board for not help.
>>296
I don't think I'm communicating my problem too well. I already know how to preserve ALL whitespace. What I'm attempting to do is preserve it only in certain areas, which is proving impossible.
>>298
Ah, right. The only thing I can think of is to use something like <var include("foo.html")>
in the templates instead of using include() the "normal" way. The only problem is that any template code inside of it won't be evaluated without a bit of extra effort, although <var compile_template(include("foo.html"), 1)-\>()>
could possibly solve that. It's not pretty, however.
>>298,299
Oh, and you'll have to use the modified include()
function I posted earlier, and call it with the second argument.
>>299,300
Thanks. I'll see if it works sometime today. You don't think it could cause performance problems, do you?
>>301
The solution involving compile_template
could, yes.
HTML5 when?
>>303
I don't think WAHa really cares about updating the template when it works just fine by default. If you really care that much (you shouldn't unless you can do something about it yourself), there are a few forks, including my own that output near 100% valid HTML5, and do a few other things Wakaba doesn't my default.
>>305
I'm too embarrassed. Seriously though, if don't know how to do it yourself, you don't need to do it.
Well if you're too embarrassed, shizzle.
Just wanted to check out what you did?
If you could link to a site that'd be cool.
is there a video tutorial? i cant get this woring
when i try to edit config.pl i cant find the lines that are mentiond in the tutorial/documentation
Mr. Manager is very likely one of the two forks I've seen on GitHub. Either frankusrs or dequis. I may be wrong and there may be more than just these two out there. Unfortunately, I can't use either of the ones I listed because of the level of customization of my own script. There are features from frankusrs that I'd love to implement (like the report function), but there's no way to do it at my level of programming.
I don't think there's a video tutorial for any of the imageboard scripts.
Kinda lame but that's how it is I guess.
>309
So what I'm getting from that is that implementing the addition of the forks is something rather hard to do and even much harder for a noob like me?
Doesn't seem like something I'd like to atemot.
But it doesn't mean that you can't pay a programmer to just implement it for you and then copy it across all boards.
I don't know, just an idea.
ok then a good stet by step tutorial on how to install kereha?
That's all you should have to do on a common setup.
on the documentation page it shows that i have lots of options to change in the config but my config shows like this
should i replace with the configs on the documentation page?
MY CONFIG PAGE
print <<END
Content-Type: text/html
<html>
<head><title>Unconfigured board</title></head>
<body>
<h1>This board has not been configured yet.</h1>
<h3>Things you need to do to get the board running:</h3>
<ul>
<li>Choose what kind of board this should be, and copy the files out of the corresponding
<code>mode_*</code> directory into the board directory.</li>
<li>Edit <code>config.pl</code> to suit your needs - remember to uncomment the lines
you change.</li>
<li>Access <code>kareha.pl</code> again (or just reload this page).</li>
</ul>
</body>
</html>
END
;
exit 0;
1;
>>314
I'm not sure how you managed to fuck it up so badly, but all you have to do is follow my instructions exactly, and it will work. You only have to change the first two options too. Change ADMIN_PASS and SECRET, and things will work perfectly without anymore work on your part. Copy the files, change those two constants, set your permissions, and enjoy. There's not much more I can do to clarify. I've never used Kareha before, and I just did it all in under 2 minutes.
the kareha i downloaded was like that form the beginning ... i still cant get it to work... anyways thx for your help
>>316
You downloaded this (http://wakaba.c3.cx/releases/kareha_3.1.4.zip), right?
>>314,316
Read the instructions in that config. You're supposed to copy the files from one of the mode_*
folders, then edit the config. That is also explained in the documentation.
im making progresses now i get this error
No ADMIN_PASS defined in the configuration at config_defaults.pl line 8.
BEGIN failed--compilation aborted at config_defaults.pl line 133.
Compilation failed in require at /home/www/kareha.atwebpages.com/kareha.pl line 13.
BEGIN failed--compilation aborted at /home/www/kareha.atwebpages.com/kareha.pl line 13.
but i changed the config.pl i put a password... do i nned to change something in the config_defaults.pl as well?
>do i nned to change something in the config_defaults.pl as well?
I suggest looking at config.pl VERY carefully until you figure out what you did wrong. This is an incredibly straightforward process.
>>299
Wow, it looks like this actually works. Thanks!
Any reason why Wakaba and Kareha don't wrap long lines with no whitespace? k
>>323
I think this is sensible behaviour. The alternative is 4chan-style mangling of people's comments. Or was that box model hyphenation thing finally implemented?
>>324
4chan adds line breaks every 100 characters, and Tinyboard uses CSS to wrap text.
Is there any reason why either of these is a bad idea? I'd like to avoid horizontal scrollbars if possible. They're very... tacky.
Hello, I just installed Kareha. Both rss and backlog pages are missing. Backlog page has header and footer while rss is completely empty. I've checked source but it seems these pages should just work, I see no onther indications of misconfiguration. Thread list works in admin panel. Do you have any clues what might be happening? Can that possibly be related to mode_image I am using?
And as for nginx configuration, it works for me with two extra lines:
fastcgi_split_path_info ^(.+\.pl)(.*)$;
fastcgi_param PATH_INFO $fastcgi_path_info;
Also, wakabamark loses empty lines, is this intended?
On my kareha installation formatting doesn't work with half of the russian cyrillic symbols:
*ё*
*р*
*с*
*т*
*у*
*ф*
*х*
*ц*
*ч*
*ш*
*щ*
*ъ*
*ы*
*ь*
*э*
*ю*
Is this related to my perl installation, or something else server-side or is it kareha's default and localization should be done for them to work? If so, is there some sort of documentation displaying this process?
>>325
Cutting URLs up so they no longer work is one of the biggest problems.
Text is already wrapped with the standard box model rules. If it's one long word, there's not a lot that can be done. I'm guessing Tinyboard uses the hyphenation/word wrapping stuff implemented in CSS3, so you could probably implement it yourself. div.reply { word-wrap: break-word }
or something like that.
>>328
Sadly this doesn't work perfectly. I can't seem to get the posts to flow "properly" without using display:table
, and word-wrap doesn't work with that property.I wonder what I'm missing...
You might not be able to use word-wrap with tables. I use word-wrap on intern3ts/chansluts/etc, but I converted to divs a long time ago.
>>331
So have I. I'm not using tables, I'm using a CSS property (display:table
) to make divs behave like tables. I'd use display:inline-block
, but that seems to cause other flow issues, especially if I want to keep the >>
's next to replies.
Its not the end of the world though. I'll just concatenate hyperlinks and add breaks to plain text. Its the best I'm capable of doing. If anyone has any better ideas, I'm all ears though.
>>332
I haven't had much of a chance to test this, but I think I figured out how to make this work. I'm not sure just what I did that made it work, but after rearranging CSS properties in every configuration imaginable, I managed to get things to flow properly without needing to pragmatically add line breaks and use display:table
.
Case closed, I guess.
Oh, yes, you should be using table-cell, if you want divs to be beside each other.
>>334
That actually messed up some other formatting inside of my reply div, so I just decided to get rid of everything table related in my CSS.
This is really weird, but I'm having an issue with a user's tripcode appearing incorrectly on my board, while it works perfectly in Tinyboard and on 4chan. I don't recall ever messing with tripcode generation, so I'm not sure what the problem could be. Have there been any similar problems in the past?
>>336
Different board software has minor differences in the ways tripcodes are implemented. He probably has a weird character in his tripcode which causes Wakaba to interpret it "incorrectly".
This might be of help: http://hotaru.thinkindifferent.net/trip.html
>>337
Yeah... I had just hoped it would be seemless between 4chan and Wakaba. Anyways, I just ended up throwing in some code that replaces the trip with the proper one. Also, is hotaru still around?
I've got a Kareha board running on a VPS, Ubuntu 12.04.whateverisnew. Posting is working but replies aren't. For some reason, every directory that is /kareha/numbers/ is 403 Forbidden. You can still do replies if you navigate to /res/numbers.html, but I can't expect my users to do this. I've already chmodded EVERYTHING. Apache Error logs give this line:
Options ExecCGI is off in this directory: /var/www/kareha.pl
But I have in my apache2.conf:
<Directory /var/www/kareha.pl>
Options +ExecCGI
Order allow,deny
Allow from all
</Directory>
I'm at my wit's end. I hate to ask for help, but somebody might know something that I don't.
>>339
Your problem is that kareha.pl
is not a directory, it is a file.
I have
<Files /var/www/kareha.pl>
Options +ExecCGI
order allow,deny
allow from all
</Files>
in the config too, and that still doesn't fix the problem.
> Also, is hotaru still around?
yes, i am still around.
>>341
Perhaps use something like this instead, without the <Files>
block:
Options +ExecCGI
AddHandler cgi-script .pl
Anyone know how to make session cookies or non-persistent cookies in Wakaba?
>>344 here,
Already figured it out on my own. I just ended up adding a few lines to the make_cookies function.
Has anybody written a Futaba-style Catalog mode for Wakaba?
I'm considering writing one myself, but my Perl isn't very good...
>>346
I've written something a little more similar to 4chan's, but I think its close enough. You can copy the relevant code from https://github.com/marlencrabapple/Glaukaba, but I'm not sure if you can just drop it in and have it work. Also, the entire script is pretty much a mess since I started messing with this thing a whole year before I knew what I was doing.
The guys at bunbunmaru (http://bunbunmaru.com/wakaba/general/wakaba.pl?task=cata) made one that may be a little more your speed, and if they're willing to share the code then you should be set.
If neither of those work for you, you can try bothering the guy from http://sovietrussia.org/ since I think he also had a catalog mode in his Wakaba installation.
>>347
I like how you copied my broken signal handling.
You should probably use Plack/PSGI for FastCGI support. Anything else is just ridiculous, and Wakaba seems to leak memory if you run it in a persistent environment without restarting the script regularly. Plack handles that for you.
>>348
I've actually had good luck with it so far. I'm pretty sure its the DB cache that takes up the memory in the first place, and apparently it'll shrink back down given enough time with no DB hits. I was actually looking into a few FastCGI frameworks right before you changed the way you did it, but I thought I might have better luck learning a little more about it before I just switched over. I was hoping that I could eventually "correct" your signal handling too, but I haven't had any issues with random crashes yet, so it hasn't been to pertinent of an issue for me.
Here this is a pretty simple question but it's been pissing me off no end, I'm trying to get a title image to display on my imageboard, the image is uploaded to the /wakaba directory and I've pointed at it in config.pl like so
use constant TITLEIMG => 'header.jpg';
The pic being named header.jpg, obviously. I've googled this many times and this thread just keeps coming up, nothing in documentation anywhere else. Is therre a pixel or size limit on the pic that's not mentioned? Cheers.
Nevermind eh got it wakaba doesn't updayte after I reupload the edited config file straight away, only after a post for some reason.
>>351
It uses a static cache. You need to rebuild them manually for everything to update.
Couldn't write to file "index.html" at wakautils.pl line 1013.
Help?
>>355
Nevermind, fixed by messing with perms.
But now thumbnails aren't showing, has anyone had any luck with ImageMagick on nearlyfreespeech?
>>358
I've tried messing with permissions to no avail. There's no "thmubs" directory being made (hence the picture).
>>359
Make the directory yourself. I think I had a similar problem.
Stupid question, but where is the admin panel?
How do i get it installed in my HTML document at the first place??
>>361
http://www.e-zoos.dik/wakaba.pl?task=admin
>>362
Not entirely sure what you mean.
When I access the pl file through my web browser, am I supposed to see th html code or the actual page?
>>365
First, are you even running a http server? Second, you need Perl installed. Third, you need to configure your http server to pass requests for Perl files to your Perl interpreter.
Looks like >>369 broke the board... I'm surprised that hasn't been fixed yet.
Just wanted to thank you for keeping your software up-to-date and helping your users out, WAHA. Kareha is great. Thanks a bunch!
Running Kareha in Futaba mode. When I delete a post, it still appears in the admin.pl menu as a blank post, i.e. Posted by: 46.105.XXX.XXX - Password: XXXXYYYY - delete post - delete file - ban IP
with no real content beneath it (blank). Is this normal behaviour?
>>378
Didn't think to include an image. This board looks like it's in 2ch mode but it allows image posting. It's confusing me!
This is probably a stupid question, but just how much would a bunch of <if $admin>
's in the regular template slow regular posting down? Obviously, they won't work unless I'm building the pages dynamically for admin users, and of course I already have this all worked out using an almost entirely copypastad version of the normal template for this, but its become a bitch to maintain, and I'd just like to know how bad of an idea combining the two together would be.
>>380
Alternatively, can anyone recommend a good way to benchmark wakaba myself?
>>380<if $admin>
in the templates gets transformed to if ($admin) { ... }
during compilation, so it won't run any slower than a regular if statement in Perl.
>>382
I'm just wondering how much an extra 10 or so of those would effect compilation time.
Benchmark: timing 10000 iterations of fifteen_ifs, five_ifs...
fifteen_ifs: 3 wallclock secs ( 3.13 usr + 0.00 sys = 3.13 CPU) @ 3194.89/s (n=10000)
five_ifs: 2 wallclock secs ( 1.68 usr + 0.00 sys = 1.68 CPU) @ 5952.38/s (n=10000)
Code: http://pastie.org/pastes/7700042/text?key=ofajzssrzghdz6mobzwyg
In other words, the difference is totally insignificant.
please remove my ip from ban-list
when i go to http://wakaba.c3.cx/
i get http 403
In Kareha, is there a simple way to get, say, header.html to automatically include another HTML document? So you could have:
<div id="rules">Some rules here.</div>
<hr />
<div id="navigation">{include nav.html}</div>
Or something. I use the rules.html for my board navigation, and mid.html for announcements. This would make things a mighty sight easier!
>>386
If you're doing it inside of the header and you don't want to mess around to much with the rest of the template, just do something like this
<var include("include/nav.html")>
That should work in Kareha.
I heard that WAHa recommends Kareha over Wakaba for imageboards. Is this true? I use Kareha and was thinking of setting up an imageboard, but I'm not sure if I should choose Wakaba or Kareha. The speed increase seems nice, but if the author recommends against it, I'm more than happy to trust his judgement.
>>388
This is just a guess, but I think he recommends Kareha because most will never need the added speed that Wakaba and a database can bring. That, and 2006-2010 4chan kinda tarnished the imageboard collective... image, so the farther away you get from that paradigm the better, I guess. There's also the fact that Kareha is newer and has more functionality in some ways.
Back when I had to make the choice in 2011, I went with Wakaba, and its worked out for me so far. I've also managed to tack on ~2000 lines of code for some more modern functionality since then too, which is something that would've been a bit more difficult with Kareha, I imagine.
>>379
From what I've gathered (reminding everyone that I know absolutely nothing about programming), the post remains in log.txt
which is why its IP address can still be viewed. It also appears that, while the post is removed from the HTML document, the postcount
number is not lowered.
Make a thread, post two replies. Delete the last reply. Not only will that deleted post still be in log.txt
, but the thread's postcount
remains at 3. Because of this, you can view the post number and IP in admin.pl
, but the post appears to be completely empty.
I'm assuming this behaviour is for one reason only: so that the post numbers contiue to rise up, just like they do in 2ch mode. If we delete that third post then add a reply, the new reply is post #4, not #3. The only difference is that, in 2ch mode, the post will still be visible, but its contents are replaced with 'Post deleted by user.'.
So, AFAIK, it's not a bug, but simply a way of keeping track of the amount of replies the thread has received; it only appears blank because deleted posts aren't visible in Futaba mode, but they are in 2ch mode.
>>386
>>387
Note that any template code inside nav.html
will not be evaluated when doing it this way. If you need this, I believe I posted a hack for it further up in the thread.
>>388
I've heard the same thing, but I don't think it's true. I'd argue that Wakaba is the better choice: it has way better mod tools than Kareha has, SQL makes life easier in the long run and I've encountered weird bugs in Kareha which have resulted in things like cached indexes erroneously displaying single threads and large amounts of posts being wiped.
http://wakaba.c3.cx/sup/css/pseud0ch.css
> .replytext em { font-style: normal; }
Why is this rule here? It stops emphasized text from showing as italic in Pseud0ch.
You're expecting anyone to remember, after all these years?
>>393
I'm surprised I even noticed. It seems all the boards I visit must have fixed it.
How do I get a sage checkbox?
I got it!
<if $thread>No bump <input type="checkbox" name="field_b" value="sage"/></if>
Is there a postcount variable?
I'm making a masterlist of threads and wanted to show the postcount in a table. I've found $curr_replies in wakaba.pl but didn't know how to specify which thread with it.
>>398
Just do "SELECT COUNT(*) FROM ".SQL_TABLE.";"
>>399
But where would I specify the thread number?
>>400
Oh, I thought you wanted ALL of the posts. Try "SELECT COUNT(*) FROM ".SQL_TABLE." WHERE parent=?;"
and just put the thread number in the $sth->execute()
part.
>>401
Sorry, now I'm really confused. I just want to count the number of comments (from the SQL table "comments") for each parent thread.
>>403
Thanks for the additional clarification. I ended up settling for a basic code that needs to be manually adjusted for each new parent thread, but just in case anyone else is interested:
<?php
$con=mysqli_connect("localhost","USER","PASSWORD","TABLENAME");
if (mysqli_connect_errno($con))
{
echo "Failed to connect to MySQL: " . mysqli_connect_error();
}
$result1=mysqli_query($con, "SELECT count(*) as total from comments where parent='1'");
$data1=mysqli_fetch_assoc($result1);
?>
<table>
<tr>
<td>001</td>
<td>
<?php echo $data1['total']; ?>
</td>
</tr>
</table>
>>404
That's not really ideal for multiple reasons. First, why are you using PHP when Wakaba is written in Perl? Second, depending on how many threads you have you could be hitting the database hundreds of times for each user that views the page.
On a side note, thanks to your code, I remembered that my board's thread list does what you wanted, so I thought it might be a good idea to share my code with you, but as I read through I realized I made the same exact mistake as you. Wakaba has a sub routine called count_posts already built in, and I was calling it for each thread
>why are you using PHP when Wakaba is written in Perl?
Because I know more of PHP. My knowledge of Perl is nonexistent; I've never worked with it before.
>you could be hitting the database hundreds of times for each user that views the page
Fair enough. If this were for a popular imageboard, I wouldn't recommend this method. But in a situation where you only have five posters, this manual method works well. Plus, the table from >>404 is a simplified version of the real masterlist table, which contains multiple elements ('type' and 'description') that can't be automatically generated (as they don't exist outside of the masterlist) so I can't just cycle through the parent threads.
>share my code
Oh, I'd definitely be interested in seeing it if you do fix it. Or just the unfixed code. Curious how other people (who know Perl) tackled this problem.
>>406
To be completely honest, I didn't know Perl or PHP when I started messing around with Wakaba, but I've learned a ton because of the time I spent tinkering.
Anyways, it turns out posting my code isn't as simple as copying in pasting the relevant lines, since I don't know just how much I've changed over the last year. I can try implementing it in a plain version of Wakaba sometime tonight, but until then, you can try to track down what you need in my git https://github.com/marlencrabapple/Glaukaba
>>407
I see. Alright, thanks for the link, I'll poke around once I'm done patching up the rest! And wow, a Summer Glau chan. Good taste.
You'll probably have better luck asking at some Apache forum.
I can't seem to get the quote feature to work. I have to type the ">>40" or whatever the number would be. When I click on the post number, doesn't put the quote in the comment box. I am using Wakaba. Here is the link to my imageboard. http://pyroneous.com/wakaba
>>412 It is named wakaba3.js, should I rename it?
>>413
No, just make sure its in the right folder or fix your permissions so that its readable.
How should I get rid of the "Board Look" section?
Is there a way to create hyperlinks with WakabaMark? I'm assuming there is with Markdown.
It's the only reason I ever use HTML formatting, and then I have to add <p>
tags myself.
What can I edit so that I can put a constant PHP header on index.html in Kareha?
>>417
But it would be nice to have hyperlink text, maybe something like [[http://example.com|example]]
.
there would be no point in doing that. it decreases the security of the users and makes hiding spam or malicious urls much simpler.
>>420
You can already do that through the HTML mode, and a lot of spam bots already do (or try to). Plus I doubt many spam bots are set up to use WakabaMark.
It's inconvenient to humans, not robots, and if a human wants to hide a malicious URL that way they already can.
Has anyone made a HTML5 patch/fork before I do it myself?
>>422
Its as simple as changing the doctype for the most part. That said, if you're looking for 100% "valid" html5, then yes, I've done it, along with a ton of other things that might turn you off if you're looking for a barebones experience.
https://github.com/marlencrabapple/Glaukaba
Aside from an option or two missing in global_config.pl, the installation is pretty straightforward, and everything should run as expected. I just installed it myself a week or two ago and it seems to be in a pretty useable state.
I get a software error.
install_driver(mysql) failed: Can't locate DBD/mysql.pm in @INC
As far as I can tell I have installed the thing in my cpanel, so what gives?
Stupid question: is there a reason why no column is set as the primary key in Wakaba? I don't know much about databases, but it seems like that most of web apps do it.
Hi
i have installed kareha, but there are a few problems i am not sure how to deal with.
Software error: Can't locate captcha.pl in @INC (@INC contains: . /usr/local/lib/perl5/5.8.8/x86_64-linux /usr/local/lib/perl5/5.8.8 /usr/local/lib/perl5/site_perl/5.8.8/x86_64-linux /usr/local/lib/perl5/site_perl/5.8.8 /usr/local/lib/perl5/site_perl) at kareha.pl line 15, <FILE> line 7.
BEGIN failed--compilation aborted at kareha.pl line 15, <FILE> line 7.
I temporarily fixed this by commenting the line BEGIN { require 'captcha.pl'; }, but I'd like to fix it properly.
Thanks for your help guise.
How stupid would it be to connect to another db for things like session management? I'm thinking that if I offload something that would be hitting the db pretty often so a separate database server (or a tiny sqlite db) it would decrease access times to my main db server without any consequences. Would there be any noticeable overhead or am I missing something really obvious?
There's no session management, nor any hits to the database at all unless someone posts?
>>429
Sorry I wasn't clear. I'm testing out some stuff I wrote for prevalidating captchas (reCAPTCHA, not the built in one) so you don't have to spend forever uploading an image just to find out you messed up and need to start over. Its pretty simple stuff but of course in most cases it requires an extra db query. After looking into how flood detection and bans are handled its pretty obvious that this would't be that huge of a performance hit, since its pretty much just two extra queries in total, but I'm still curious if offloading it somewhere else (maybe even a simple text file) could improve performance.
besides writing a new .css, what do i have to do to use custom board look?
>>431
In terms of what you HAVE to do that's about it, but you can do a lot more if you really want to.
I'm using waka_utils.pl in another project of mine and I was wondering how safe the templating system is for allowing (paid) users to write their own. If I remember correctly its possible to run code in a template, so I'm kind of wary about just allowing them to access the template system. Is there a way to make it a little more restrictive or am I better off just writing something myself?
>>434
Okay I just tried looking through the compile_template function myself and I think this should take care of it.
if(!$safemode) {
if($closing) {
if($name eq 'if') { $code.='}' }
elsif($name eq 'loop') { $code.='$$_=$__ov{$_} for(keys %__ov);}}' }
}
else {
if($name eq 'var') { $code.='$res.=eval{'.$args.'};' }
elsif($name eq 'const') { my $const=eval $args; $const=~s/(['\\])/\\$1/g; $code.='$res.=\''.$const.'\';' }
elsif($name eq 'if') { $code.='if(eval{'.$args.'}){' }
elsif($name eq 'loop')
{ $code.='my $__a=eval{'.$args.'};if($__a){for(@$__a){my %__v=%{$_};my %__ov;for(keys %__v){$__ov{$_}=$$_;$$_=$__v{$_};}' }
}
}
else {
if(($name eq 'var') and ($args =~ /^\$[a-zA-Z]+$/)) {
$code .= '$res .= eval{' . $args . '};'
}
}
Any obvious gaping holes?
>>435
The only obvious gaping hole I can think of is that you've basically just created an overcomplicated sprintf()
.
>>436
Most of it is part of the templating system already in waka_utils.pl.
I'm trying to wrap my head around the templating system a little more, and I can't quite figure out how the variables passed to the constant value that defines the template are in the same scope as compile_template. How would one access the variables available to compile_template? Are they inside of some magical perl variable? I already checked @_ and all that's in their are the contents of the constant.
>>439
Oh wow I think I got it on my own. I put die %__v->{title}
inside of the my $sub = eval
part and it printed out the value of $title.
How big of a performance hit would it be to change the entire config system from constants to hashes? I'm trying to make it easier to manage multiple boards for less savvy users. Would something like
my $option = sub {
my ($board,$key) = @_;
return BOARDS->{$board}->{$key} || GLOBAL_OPTIONS->{$key};
};
for retrieving a config option be a huge performance hit or security risk?
So now I'm trying to change wakaba's setting so that everytime anon post something, he will be redirected to that same thread he posted on. The way user had to go back to front page after every post is annoying to me.
I found the following supposedly related line in wakaba.pl:
# forward back to the main page
make_http_forward(HTML_SELF,ALTERNATE_REDIRECT);
I have zero knowledge with Perl so I hope someone will help me here.
>>442
There's a patch that adds noko support somewhere on this board.
>>443
Oh I see, found it here
http://wakaba.c3.cx/sup/kareha.pl/1256252904/
But I have no idea how to get the patch from there.
>>444
Looks like it got deleted. I went ahead and wrote a new one. No idea if it works. Haven't ran it myself.
>>445
Okay, I added that patch but every time it gave me an internal server error.
I don't know if it's the new script's fault. After that, I tried to change simple stuffs like
BEGIN { require "strings_en.pl"; }
into
BEGIN { require "strings_eng.pl"; }
with strings_eng.pl in the root folder of course. Yet it still give me 500 error.
How do I remove the 'Manage' option in admin bar? The way it is now, every user can see it and I only want admin to access it.
>>447
Delete the link from the template in futabastyle.pl
>>449
Thanks, I feel like a retard now. Should have figured that out myself.
Hi,
I would like to add an ability to wrap text in spoiler tag just like 4chan now. I appreciate your help.
I need help. I enable encoding to utf-8 in the config.pl and made sure to uncomment the no encoding line at the end to write non-English words. Everything works fine at first but I cannot log on to admin panel after that. It gave me Incorrect management password despite whatever it is stated in config.pl.
In fact, if I turned off the encoding lines I could go to admin panel like nothing.
>>453
Okay this is resolved, thanks for your help. For future reference: it appears moving the "use encoding 'utf-8'" to after the constant admin_pass will make it work.
But now there is another problem: the html files (header, rules and footer) won't show my native language whatsoever. I know I'm a noob but Isn't the use encoding line affects to all html files?
Hello!
I'm trying to incorporate wakaba into my SMF page (php forum).
All I'm trying to figure out is how to add this
[code]<?php
//Require header.php
require('../header.php');
?>[/code]
to all of the topic .html files generated. the header.php being required is the header for my forum and is designed to be called as shown. this works in any standard php page. can this work in the perl system?
picture is of a php page fetching the forum header and footer and fetching wakaba.html in the middle. replying to topics redirects to the individual topic html.
I've managed to change the generated page extensions to .php and fetch my form header, but the reply pages (ie: /res/11.php) will not load. the head will load but the body won't and the page is just left blank.
anyone have some insight for me?
I should mention that my main wakaba.php page generated by the wakaba.pl file works just fine, it's just the pages that are linked via "reply"
After I tried to enter to kareha.pl it gives me:
"couldn't create child process: 720002: kareha.pl"
Wrong section, sorry
heres something for anyone interested in redis/perl. i've found that if your imageboard has a lot of images, the find_md5 function gets slower and slower. i've basically loaded all of the hashes as keys in redis and use it to perform the check, its a lot faster. the key is imageboardname:hash and the values are thread,post,file
this isnt a standard patch, my kareha setup is extremely different from stock (i've split all the posting functions from the main script and run that part in memory) but its only a few changes
>>460
How much of an improvement would something like this bring to Wakaba? I've been thinking of throwing memcache or redis support on it and moving some of the static cache to a ramdisk for faster IO but haven't bothered because I have no idea if it would be worth it or not.
>>461 i'm not familiar with wakaba but if it keeps its information in a database then there won't be much improvement. the problem with kareha was it basically looped through a giant log file every time it checked a hash.
i do keep cache files for phpbb in tmpfs, you may see some improvement. it's hard to tell though since linux caches stuff into memory anyway
>>462
Do you know if dynamically building a JSON reponse from a DB cache like redis or memcache every time a user sends a GET request would be any faster or slower than writing to JSON files on a ramdisk every time they're updated? I'm tempted to do both on a clean Wakaba installation and benchmark them, but even then I have no idea how to benchmark something like that properly.
>>463 if i were to do that i'd use elasticsearch as the backend and just ditch the database. it natively outputs json from lucene indexes, supports updates etc.
http://www.elasticsearch.org/overview/elasticsearch
i've contemplated doing something like this myself
Hi all, I'm trying to install kareha on a basic plan server, which has Perl enabled. I'm used to setting up php software, but I don't code myself. I figured Perl files work in a special way, and they have to be put in a separate forlder, like cgi-bin (?) My question is : which files do I have to put there? Is it all .pl files? Then how do I access these files with a browser, since this folder is outside the main /wwww/ directory? Is there anything else I should know?
>>465
I vaguely remember the documentation explicity stating not to put your Perl files in cgi-bin.
So what's up with get_decoded_hashref()? Its used in very few places and as far as I can tell everything wakaba stores in the db has already been through decode_string. What am I missing?
>>467
See http://perldoc.perl.org/perlunicode.html#Porting-code-from-perl-5.6.X.
The charset situation in Wakaba is a confusing mess. IIRC, the wrapper functions are either used to retain compatibility with Perl 5.6, or to retrieve Unicode data from a non-Unicode database, or both. Note how the utf8
pragma isn't used anywhere in the script, while the encoding
pragma is used sparsely.
It's been a few years since I've done anything with Wakaba, but I recall having to use get_decoded_hashref()
or its arrayref
counterpart every time I wanted to retrieve text that might contain Unicode.
>>468
Just noticed that Wakaba doesn't even set the tables it creates as UTF-8. I wonder how much performance I could gain by ditching compatibility for ancient versions of Perl and non-UTF-8 databases...
Where does one find out how to examine file headers like Wakaba does for images? I added webm support to Wakaba and I can't really do much but rely on ffmpeg to tell me if the file is proper or not. So far it works perfectly but I feel like I should just throw random files at ffmpeg and expect nothing to go wrong.
I was considering adding an index. Only reason I haven't yet is because WAHa didn't in the first place, and I'm pretty sure he still knows better than me in most cases.
Not Acceptable
An appropriate representation of the requested resource link could not be found on this server.
Additionally, a 404 Not Found error was encountered while trying to use an ErrorDocument to handle the request.
I get this when trying to quote with >>number
Any ideas?
>>473
What's your setup like? That doesn't look like an nginx error message so it has to be apache or lighttpd. Do you also get this error when you click on "Last 50 posts"?
I'm using Wakaba. I basically 775'd all the .pl files in the folder's index. Maybe I had to do it wall the files or something?
I'm using wakaba and have a problem with my captcha.
Does anyone else have a problem with Captcha not automatically reloading? After I post, I cannot post again without manually reloading the page and getting a new captcha. If I don't do a manual reload, the captcha stays the same and gives me an error when I try to post again. Is this a browser issue, or something else? I've tried it in Chrome and Firefox, and neither auto-reload the captcha after a post, but the browser does seem to reload because the image and text appear on the page automatically, I just get the same captcha code.
Say I have a persistent version of Kareha. Would caching the log in an array and creating a hash of references to each row in the log with MD5 hashes or IP addresses as keys be an easy to squeeze more performance out of Kareha? If I understand correctly, the hash values shouldn't take up too much extra memory since they're refs, and the array itself shouldn't be any bigger than it would be in plain CGI Kareha. Is there anything I'm missing or misunderstanding?
I have latest version of kareha installed and it takes 2 clicks of the preview button to initiate preview, and in chrome and Safari the default markup is blank with an " undefined " under it until you pick one
>>480
Not sure about the 2 clicks thing but the undefined thing is fixed in https://github.com/marlencrabapple/kareha-psgi/commit/40149edc3f1a7cb9a9f501311b4fe703df415301. Should work in vanilla Kareha verbatim.
Mojibake title. The other text on the page are displayed correctly
Hello. I am deep in trying to run Kareha on an android device. But I am in over my head. First problem is I don't know perl. Second problem is I don't know how to get imagemagick working for android.
So I guess my last recourse is to ask... is anyone willing to try to get this working? I am trying to add on to the Piratebox port for android, which is missing the image-board feature (which on linux is added using kareha).
I got perl working, I think I found an android port of imagemacick, and I think I know how to get the CGI side of things working with the web server piratebox uses...
Anyone interested in helping?
>>483
Interesting idea. I don't know anything about piratebox, but I'm sure any combination busybox and a light web server with CGI support could handle this. Even better, if you can get Perl and cpanminus installed, you can run everything without the need for an outside web server, which is something that I find a lot easier in 2014. I might try it on an old Android phone I have laying around this weekend. I'll let you know what works best on my end.
>>483
here's the easy way to do it:
>>486
I wasn't aware that Wakaba was simply Kareha with a database. Good to know.
I'm having a problem.
Everything is installed correctly (http://freehispa.host-ed.me) But when I try to reply to a specific post (post #1), using >>1 it gives error 403
Forbidden
You don't have permission to access /wakaba.pl on this server.
What am I doing wrong?
Thanks a lot!!
I am trying to use Kareha on Nginx, and the PATH_INFO is not working. Is there a way to modify kareha to using some kind of GET variable instead of pathinfo?
Not sure if anyone would be interested, but I've been refreshing, myself on css lately and made a kareha style based on w3's material design tutorial. Feel free to use/improve it, if you'd like.
Is it possible to remove tripcodes entirely?
>>494
Sure. If you don't want to modify the source code you can set "TRIPKEY" in "config.pl" to something like this:use constant TRIPKEY => "0" x (MAX_FIELD_LENGTH + 1);
For some reason, my Wakaba installation has decided to stop linking thumbnails to the database, or something. Basically, when an image is posted, a thumbnail is generated and placed in the thumb directory, as expected. However, it doesn't display on the board, and instead only shows the "No thumbnail" text. When I do an SQL dump, I notice that the field for where the thumbnail file name would be is simply blank for each entry.
I am using shared hosting (Lithium Hosting), and I really don't know what kind of thumbnailing software they have installed. It's simply worked up until now. With that in mind, anyone know why this would be happening?
Is there any way to receive e-mail when the message is posted on Kareha?
>>497 They changed their software and broke some basic functionality. Get a VPS, it'll probably cost less. Well, your site will be gone in a month or two anyway.
How can I enable webm support?
Image boards are for images, WebM is cancer.
>>504
agreed
pure, virgin textboards are the superior entity, however
>>504
Hm, well, I'd still like to have the option there for those who'd like to use it. Though, the only way of enabling this I can think of would be to allow all types of files and blacklist a few, something I'd rather not do.
So, I want a separate MOD_PASS in addition to an ADMIN_PASS, where MOD_PASS would work on one board and ADMIN_PASS would work on all. I've already set the ADMIN_PASSes to all be the same, created a constant MOD_PASS for each board, and edited check_password to be
sub check_password($$)
{
my ($admin,$password)=@_;
return if($admin eq ADMIN_PASS);
return if($admin eq crypt_password($password));
return if($admin eq MOD_PASS);
make_error(S_WRONGPASS);
}
but...it doesn't work
help pls?
>>503
There is an option in "config.pl".
Uncomment these three lines:use constant FILETYPES => (
[...]
ogg => 'icons/audio-ogg.png',
[...]
);
and add this line: webm => 'icons/audio-ogg.png',
somewhere near "ogg => 'icons/audio-ogg.png',
" line.
I don't actually have any questions about how to get your software to work, it always seemed pretty straightforward and relatively easy for me. In my experience, just like you said;
"if it doesn't, there is something wrong with the configuration of your server, not the software."
I just wanted to thank you for making it.
According to most of what I have read and learned about perl,
most of what you have done is impossible, or would at least require an eight hour long castration process, with a pair of dull garden shears.
Eg; Kareha using javascript flawlessly without needing sixty modules from cpan, and a gcc compiler to choke and quit while compiling on windows (what I use, usually).
I'm still not entirely sure what Kozakana html/pl is, apart from a rocket on the back of a pig (want these skittles, kid? o.O) I'm impressed.
I'd agree though, that should be impossible.
Anyways, thanks for making it.
(PerHP is neat to, and I found it useful momentarily prior to discovering Markup::Perl via your link, which I promptly fell in love with.)
Have a great day. ( ゚∀゚)o彡゜えーりんえーりん!!
Any plans to include .pae file extraction from the PowerArchiver software? Thanks!
My insecure tripcode with a single quotation mark (') produces wrong output, please send help.
Hello! I recently installed Kareha with "mode_image", and I want people to stay in the thread they post in, instead of being thrown out every time. I have been trying to figure this out for a while, and I don't seem to get any closer to a solution. Could anyone here help me out?
I have File does not exist: wakaba.html
I couldnt find solution anywhere. Can u help me please?
Hi.I have a problem with wakaba.
Malformed UTF-8 character (fatal) at wakautils.pl line 41
line 41: if($text) { $chars+=length $text; }
Hi there! Please assist.
Needed to move my discussion board to another host, but now my "wakaba.pl" page does not work (shows server default "moved" page) and also can't create new post, receive "Unknown Iframe Error" message.
Wakaba.pl set to 755. Directories to 755, files to 644, database imported under the same name with the same user and pass. Anything else that needs to be adjusted?
Hi, i tried run wakaba script with xampp and activeperl on windows, all works fine but there is problems with thumbnails. I have installed imagemagick, and thumbnails converted fine - new converted images aprreas in "thumb" folder, but it is empty square plaseholder "no thumbnail" on board page with "class="nothumb". Can anyone help me with it?
hello! can you help with hiding folder names like /res/ and filenames like wakaba.html from the url bar with .htaccess file?
hi! when i move all the files into a subfolder website does not show correctly. for example captchas are not seen. do you know which modifications do i need to make for wakaba to work properly in a subfolder?
Im a noob how would i go about making it so every post gets a random id
Hi.
Why is it that on 10.12.5 the AppStore version of The Unarchiver asks for permission to extract into every new folder that it extracts to? The standalone, non-Appstore version doesn't ask for that. It would be nice if that would be fixed, as, otherwise, it's quite annoying.
>>232
This is several years late, but has that patch been posted anywhere?
Is there any way to do this:
While creating new thread, if there's another thread with "exact" same title, post the message as a reply to the already existed thread.
For example, if there's a thread which has a title as "apple" and someone else tries to create thread for "apple", add the second message to the already created thread before.
Thanks!