

Askbox/Submission Box/Guestbook
SQL/PHP
This is my askbox script though it can easily be used for guestbooks too. It has many flaws due to being the first PHP/SQL thing I made on my own, but I tried to bulk it up for public release! It still has a lot of things I've overlooked I'm sure. I think Kaomoji display weirdly sometimes?
Originally I actually wasn't going to release it but it's my most widely asked for script, so it felt a bit mean. So, I sat down and added a frontend for you to see unanswered questions!!
This script uses the an API key from TinyMCE, but you can keep it in plain HTML if you want by just leaving it blank if you want!
Also, if you don't wanna use SQL, I reocmmend Kale's guestbook script which uses a CSV file instead!! I didn't even know you could use CSVs that way. It's too late for me though.
Instructions
This askbox requires a teensy bit of setup, but it's very simple so do not worry..
- Download the files. You can download by clicking this link or navigating to the GitHub page (more download options later)
- Download Link
- Github Page
- In your panel, navigate to databases. It will take you to a very ugly page (in Cloudpanel, it's under Databases. In Cpanel, it's under PHPMyAdmin)
- Make a new database. Different panels handle this differently.
- In Cloudpanel, you make a database and it gives you the user automatically. You can regenerate the password credentials if needed
- In cPanel, you make the databases and users/passwords seperately. You make your user under "Manage my Databases"
- After making your database and user, click the name of that database (under PHPMYAdmin, Recent/Favorites). That will select the table. It will put up a table screen with inputs. Just ignore that.
- Navigate to SQL and paste content of questions.sql into the SQL tab, then click go (bottom right). You're not done with PHPMyAdmin
- You're done with that now!
- Go to your config.php file. Update that with your database credentials (the database name is the name of the table you made- not logs.sql)
- Go to auth.php. Update that with your credentials
- Connect tinyCME (optional)
- Tiny CME is the API I use for the file editor. I included simpleadmin too if you don't want to use TinyCME for whatever reason. You can also get your own editor and replace the WYSIWG too. There's others. TinyCME is simply the best and is the reason I enjoy updating my blog, but people who aren't as image heavy / decorative as me don't really need it.
- You just replace the API key in tinycme.js. It's free also. You make an account on tinycloud, get your key from here, and connect your domain under domains.
- Connect webhook (optional)
- If you want to get notifications when you get ask, you can connect a discord webhook. I stole these instructions from a dead sadgrl page by the way.
- Go to your Discord server, and click on the Settings gear on the channel you would like submissions to go to.
- On the left sidebar, click on Integrations.
- Beside Webhooks, click on Create Webhooks.
- You can set a name that will appear with submissions, or use the provided one.
- Click on Copy Webhook URL
- Go into your config file. Find/Control F discord webhook and paste the hook in place of 'xx'
- Now test to see if you get a notification
Some Notes
- I included a template. If you're going to use this as a guestbook or general submission box, you have to change some wording. You should change stuff anyways, but it's more prevalent with this sort of thing.
- This script is messier than other scripts cause of it's age and me cobbling it together, even the CSS I had to fix a lot for this. I encourage you to rip everything apart to make it better if you want.
- You can preview it with the template here (it's populated with my actual askbox lol don't pay attention too much I may change it later it's just a bit of a bother rn)
Enjoy!!!