Rocksolid Light

Welcome to novaBBS

register   nodelist   faq  

Your account also provides newsreader access to all groups at news.i2pn2.org port 119 or 563 (TLS)


rocksolid / Programming / Re: newsportal code

SubjectAuthor
* vichan outgoing attachments (2)Retro Guy
+* i have been working on a similar problemAnonymous
|`- Re: i have been working on a similar problemRetro Guy
+* he, that is richAnonymous
|`- Re: he, that is richRetro Guy
+- works with messages posted on def4Anonymous
+* NoneAnonymous
|`- Re: Vichan header (w/attachment)Retro Guy
+- the line beforeAnonymous
+* ok, bbs puts it in both linesAnonymous
|`* Re: ok, bbs puts it in both linesRetro Guy
| `- Re: ok, bbs puts it in both linesRetro Guy
+- ok, then it is settledAnonymous
+- yeah sureAnonymous
+* ok fixedAnonymous
|`* Re: ok fixedRetro Guy
| `* Re: ok fixedanon
|  `- Re: ok fixedRetro Guy
`* newsportal codeAnonymous
 `* Re: newsportal codeRetro Guy
  `- Re: newsportal codeRetro Guy

Pages:123
Subject: Re: newsportal code
From: Retro ...@example.com (Retro Guy)
Newsgroups: rocksolid.programming
Organization: rslight Debian test site
Date: Mon, 15 Jun 2020 10:58 UTC
Path: i2pn2.org!.POSTED!not-for-mail
From: Retro Guy@example.com (Retro Guy)
Newsgroups: rocksolid.programming
Subject: Re: newsportal code
Date: Mon, 15 Jun 2020 10:58 UTC
Organization: rslight Debian test site
Message-ID: <8669527f6d921bf899d980a3d292593c$1@192.168.0.220>
References: <code.430.1t4lmb@anon.com> <25b145458efe010770c0f0dba6b171ee$1@www.rocksolidbbs.com>
Mime-Version: 1.0
Content-Type: text/plain; charset=utf-8; format=flowed
Content-Transfer-Encoding: 8bit
Injection-Info: i2pn2.org; posting-account="retrobbs1";
logging-data="3864"; mail-complaints-to="usenet@i2pn2.org"
User-Agent: Rocksolid Light (news.novabbs.com/getrslight)
X-Spam-Checker-Version: SpamAssassin 3.4.2 (2018-09-13) on i2pwall.i2p
X-Rslight-Site: $2y$10$Xprx1qKZIEv/ZzIfVYVH0.3ApTS3oOa3KBLM3WC1uFyP4OCEeF88i
Xref: rslight2 rocksolid.programming:94
Message-ID: <8669527f6d921bf899d980a3d292593c$1@192.168.0.220>
Retro Guy wrote:

  To: Anonymous
Anonymous wrote:

and also not think it has an attachment if it does not (it checks that something is really there).

this caused the sync routine for vichan to hang on several messages (older ones from /ts), where there was a mime attachment announced, but then wasn't there.

This hopefully is solved in the latest file. You can see in rslight when an attachment is announced, but doesn't really exist (it says 'Attachments: (text/plain)', but nothing to click on. Once I finished the mod, this isn't happening as no attachment is announced.

I've just made a minor change in message_parse that may be of interest to you. Note: I have uploaded the new message.inc.php.txt to my download site.

rslight checks attachment mime-type by checking the actual file, not depending on the file extension (this is safer), but was not doing that for inline attachments. This mod changes from checking file extension to checking the file itself.

The latest file available for download contains this change, but you must add the below function for it to call. I don't put it in the file because I have it in newsportal.php, but you'll need it in your script so you can use it:

function get_mimetype_by_string($filedata) {
  $f = finfo_open();
  return finfo_buffer($f, $filedata, FILEINFO_MIME_TYPE);
}

This simply receives the uudecoded data, and returns the mimetype. You really want to be displaying to users the accurate mime-type, not just based on whatever extension the file has.

Retro Guy



--
Posted on: rslight Debian test site
192.168.0.220


Pages:123
rocksolid light 0.6.6
clearnet i2p tor