[ prog / sol / mona ]

prog


How can I run my own instance of this

1 2019-01-21 01:37

Say I want to make a text board using this script How would I go about making more boards in customizing the index to my liking

10 2019-01-28 21:09

>>9
Those are in a fieldset hidden by css:

<FIELDSET class="comment"><LEGEND>do not edit these</LEGEND>
<P><INPUT type="text" name="name" class="name" size="11"><BR>
<TEXTAREA name="message" class="message" rows="1" cols="11"></TEXTAREA></P></FIELDSET>
fieldset.comment {
  display: none;
}

If you see them in your viewer it doesn't respect that rule. The input is "name" and the textarea is "message", but their actual function is something the board owner might elucidate.

11 2019-01-30 08:39 *

>>7
I did run extensive benchmarks for every web servers in Scheme, old and news. I was planning to publish them but I don't have them right now.
>>10
It's a simple honeypot for spambots, better than captchas and other annoyances and good enough for a small textboard. I don't know how you can remove them with emacs, CSS rules do that for web browsers.

12 2019-01-30 17:54

>>9-11
grep and other tools could do it on the webpage so you can probably hide these honeypot fields with emacs. I'd be interested in a solution.

13 2019-04-15 02:34

>>2
New anon here. Cool stuff. I've (somewhat) gotten it working on my local server. Sorry for the stupid question, but is nginx all I would need to make this public-facing?

14 2019-04-15 15:04

>>13
Nevermind, answered my own question. Pretty much works now. Once I've gotten a more permanent setup I'll post a link.
One of my main confusions as of now is the hash file. The file needs to exist fot posts to be made, and its value is present in the html for the input field.I just made a file called hash and gave it arbitrary contents and things started working, but I'm guessing the value is supposed to be changed dynamically (once per post, maybe)? So, what purpose does the file serve?

15 2019-04-15 22:40

>>14
The hash file is read by get-form-hash in bbs.scm. It is called for the value of the ornamentum field by make-post-form and make-thread-form in templates.scm. The ornamentum field is read by validate-form in bbs.scm as the hash of the let. Validate-form then proceeds to do precisely nothing with the hash value. After the size checks it only cares that the message and name fields are empty. Therefore it appears that the hash/ornamentum is intended as another antispam measure that is yet to be implemented, and is currently a no-op.

16 2019-04-23 03:56

>>15
Thanks, that explains why arbitrary values worked.
I haven't properly looked into this, but whenever posts are submitted there is an error about an invalid http header. Despite that, the posts are still accepted, so I haven't focused on that. Any idea as to why such an error would always be thrown?

17 2019-04-23 10:33

>>16

whenever posts are submitted there is an error about an invalid http header
an error would always be thrown

I'm certain the error is not so secret that you can't paste it into the thread.

18 2019-04-29 06:34

test

19 2019-11-26 02:53

Looking at the sources of these two pages:
https://textboard.org/prog/
https://textboard.org/prog/?css=2ch
It's clear that the main difference between them is that a different stylesheet has been requested, and that all internal links preserve the value of the css variable.
When testing this feature on my own instance, this feature doesn't work, and the hard-coded value of default.css in the main-template procedure is always requested.
I was considering changing main-template to take the css parameter as an additional argument, but that won't help with the internal links. Does anyone know how the internal links are modified on this site?

20 2019-11-26 21:38

>>19
In bbs.scm:route the query-string is only passed on to set-preferences, post-thread and post-message. The first one ends up in templates.scm:preferences-view where it is used to initialize the radio button selection. The other two are only used for the final redirection calls. So at first blush it would appear that the functionality in question is not present in the gitlab repo.

There is at least one known instance of the gitlab repo not being updated to reflect the deployed site. There was a request for a change in an overflow setting which the admin graciously granted, but that change did not make it into the gitlab repo.

$ diff schemebbs/static/styles/default.css ~/Downloads/default.css 
121,122c121
<   overflow: hidden;
<   text-overflow: ellipsis;
---
>   overflow: auto;

If the same holds for the internal link rewriting functionality then it appears schemebbs is not quite as open source as it claims to be. Perhaps the admin could rectify that.

30 2020-02-18 21:20

In bbs.scm:view-thread you are recomputing the unchanging (posts-range range) for every single invocation of the lambda that is assigned to filter-func. Just save (posts-range range) in the let* and use it in the lambda.

And a test for lib/markup.scm:quotelink + bbs.scm:posts-range:foo
>>30---,,,---,,,---30

301


VIP:

do not edit these