Social Media Site – Postblock

This is more a template thing than the technical stuff.

The cool thing is that the “say something” text area has been blended in with the postblock and will auto-resize it’s height as you type (a bit like wordpress). In addition, pressing the “image” button will bring up the file upload window and when you select an image, it will be displayed as card-img-top, which slides down to reveal itself (thanks jquery, you magnificent cunt).

Getting the image sizing right is the challenge. Will update when I have a resolution.


Fixed it. My javascript I stole from stackexchange for displaying the image actually set the height/width, which was fucking with bootstrap.


So this is where I’ve gotten up to tonight:

  • Post block written
    • Image auto updates in the form like other social media sites
    • The “upload image” form is a simple button
    • Pages require a login to access. If you dont have an active session, you get directed to the login page.
    • The login page will accept your username/pass, hash with md5 then compare with database records
    • Logout nukes your sessions

Most of my time has been consumed getting formatting correct. If I get time tomorrow after two-up, I’ll build the posts database and start submitting them.

It should be worth noting that images will not be accessible unless you’re logged in, using a standard php hack I learned ten years ago where a php file displays the image, that way only authenticated users can see it.