Uploading PDF file with mod package file

Started by GL700Wing, July 09, 2024, 07:26:42 PM

Previous topic - Next topic

GL700Wing

I've just submitted a new mod for approval and one of the files I wanted to upload in addition to the mod package file was a PDF file containing some additional information but whenever I clicked on 'Save' all I got was a WSOD.


Edit: Attached the PDF I was trying to upload with the new mod.
Life doesn't have to be perfect to be wonderful ...

Slava
Ukraini!
"Before you allow people access to your forum, especially in an administrative position, you must be aware that that person can seriously damage your forum. Therefore, you should only allow people that you trust, implicitly, to have such access." -Douglas

SleePy

You are trying to upload a PDF?
Odd I've never tested that, what mod are you updating?
Jeremy D ~ Site Team / SMF Developer ~ GitHub Profile ~ Join us on IRC @ Libera.chat/#smf ~ Support the SMF Support team!

GL700Wing

#2
Quote from: SleePy on July 12, 2024, 08:45:34 PMYou are trying to upload a PDF?
Odd I've never tested that, what mod are you updating?
It's a new mod I've submitted for approval (see Always Modify Own Posts) and I want to include some information about how to use the mod in the description in a table with borders because not having borders can make tables difficult to read in forum posts/readme files.

However, and because I cannot create tables with borders using BBCode, I would like to be able to include this information in a PDF.  I know I can add it to the package file but I'd like to be able to make its existence obvious by adding it as a separate file to the mod in the same way image files can be added.

I guess PDFs aren't a supported/allowed file format for mods but I would have thought I would get an error message rather than a WSOD.

Finally, and given it's only a two page PDF, I could save each page as an image and then add the images to the package ...
Life doesn't have to be perfect to be wonderful ...

Slava
Ukraini!
"Before you allow people access to your forum, especially in an administrative position, you must be aware that that person can seriously damage your forum. Therefore, you should only allow people that you trust, implicitly, to have such access." -Douglas

Antechinus

Why not just save them as HTML? It should only need a few headings and some paragraphs, and a few lines break or hr's or whatever. A basic boilerplate should make it quick and easy.

GL700Wing

Quote from: Antechinus on July 13, 2024, 03:06:55 AMWhy not just save them as HTML? It should only need a few headings and some paragraphs, and a few lines break or hr's or whatever. A basic boilerplate should make it quick and easy.
Is HTML supported/allowed in readme files for mods?  I've only ever seen/used BBCodes for formatting ...
Life doesn't have to be perfect to be wonderful ...

Slava
Ukraini!
"Before you allow people access to your forum, especially in an administrative position, you must be aware that that person can seriously damage your forum. Therefore, you should only allow people that you trust, implicitly, to have such access." -Douglas

Antechinus

Dunno. Never tried it. HTML files are pretty basic stuff though. Or even .txt in a pinch. TBH I've always found PDF's to be a bit of a nuisance anyway, especially on a phone, so personally I'd go for something else.

GL700Wing

Quote from: Antechinus on July 13, 2024, 03:43:20 AMDunno. Never tried it. HTML files are pretty basic stuff though. Or even .txt in a pinch.
I've had a look at using HTML but even if the BBCode setting 'Enable basic HTML in posts' is enabled this will only allow the posting of some basic HTML tags:
  • <b>, <u>, <i>, <s>, <em>, <strong>, <ins>, <del>
  • <a href="">
  • <img src="" alt="" />
  • <br>, <hr>
  • <pre>, <blockquote>

No table stuff or styles ...

QuoteTBH I've always found PDF's to be a bit of a nuisance anyway, especially on a phone, so personally I'd go for something else.
Wasn't really figuring that forum admins would be doing serious admin stuff like installing mods from their phones - figured they would be more likely to use tablets/PCs for that sort of stuff.
Life doesn't have to be perfect to be wonderful ...

Slava
Ukraini!
"Before you allow people access to your forum, especially in an administrative position, you must be aware that that person can seriously damage your forum. Therefore, you should only allow people that you trust, implicitly, to have such access." -Douglas

SleePy

HTML is not supported.  But if you submit it via GitHub, you can use markdown, as its pulled from the repos README.md.  I can't recall if the markdown parser BBC has borders on the table.
Jeremy D ~ Site Team / SMF Developer ~ GitHub Profile ~ Join us on IRC @ Libera.chat/#smf ~ Support the SMF Support team!

GL700Wing

Quote from: SleePy on July 13, 2024, 09:08:36 AMHTML is not supported.  But if you submit it via GitHub, you can use markdown, as its pulled from the repos README.md.  I can't recall if the markdown parser BBC has borders on the table.
Not an insurmountable problem really - I can always add the PDF as an attachment to the first post in the mod topic - mainly wanted to let folks know about the WSOD issue.
Life doesn't have to be perfect to be wonderful ...

Slava
Ukraini!
"Before you allow people access to your forum, especially in an administrative position, you must be aware that that person can seriously damage your forum. Therefore, you should only allow people that you trust, implicitly, to have such access." -Douglas

Diego Andrés

It also detects markdown without GitHub, simply include a README.md in the package and it will be parsed, I think it has the highest priority.

https://www.markdownguide.org/getting-started/

SMF Tricks - Free & Premium Responsive Themes for SMF.

Advertisement: