Giter Site home page Giter Site logo

m1k1o / blog Goto Github PK

View Code? Open in Web Editor NEW
300.0 300.0 31.0 4.13 MB

Lightweight self-hosted facebook-styled PHP blog.

Home Page: https://blog.m1k1o.net

License: GNU General Public License v3.0

PHP 51.07% JavaScript 26.08% CSS 22.55% Dockerfile 0.31%
blog docker facebook lightweight php self-hosted

blog's People

Contributors

djfinch avatar m1k1o avatar manulinares avatar nixo-77 avatar phundrak avatar vincentstans avatar vkhurana avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

blog's Issues

Photos from phone posting sideways

Mobile photos are posting sideways. Seems to be a common thing for blogs and posting from your phone. If you can fix that you have a winner!

Raspberry Pi

This blogging system would be perfect for hosting on a Raspberry Pi (4).
I tried it, but doesn't work.

table not exists with docker-compose

my docker-compose.yml

version: "3"

services:
  webserver:
    image: m1k1o/blog:latest
    container_name: blog_apache
    environment:
      TZ: Asia/Taipei
      BLOG_DB_CONNECTION: mysql
      BLOG_MYSQL_HOST: mariadb
      BLOG_MYSQL_PORT: 3306
      BLOG_MYSQL_USER: blog
      BLOG_MYSQL_PASS: blog 
      BLOG_DB_NAME: blog
      BLOG_NICK: blog
      BLOG_PASS: blog
    restart: unless-stopped
    ports:
      - 82:80
    volumes: 
      - ./data:/var/www/html/data
  mariadb:
    image: mariadb:10.1
    container_name: blog_mariadb
    environment:
      MYSQL_USER: blog
      MYSQL_PASSWORD: blog 
      MYSQL_DATABASE: blog
      MYSQL_ROOT_PASSWORD: root 
    restart: unless-stopped
    volumes:
      - mariadb:/var/lib/mysql
      - ./app/db/mysql:/docker-entrypoint-initdb.d:ro
volumes:
  mariadb:

I could login , but can not post anything

error message

SQLSTATE[42S02]: Base table or view not found: 1146 Table 'blog.posts' doesn't exist

any suggestions ?

Support for multiple image and video

Hi.
Sorry for posting here.

I would like to ask is there upcoming changelogs like below:

Features request:

  1. Select multiple image and display multi image
  2. Upload video
  3. Emoji set for expressing the feeling.

docker support

Create Dockerfile or/and docker-compose. Support Docker plug'n'play.

Minor problems + Enhancements

Bugs

  • Error messages should be visible in modal as well. Should have greater z-index.
  • If is content present in post and then is deleted, it won't delete on page.
  • Direcotry permission for /data is not working as expected.
  • If is parse_link requesting from non-residental IPs, it could fail to get proper content. Maybe is problem with user_agent

Enhancements

  • Configs shoud be able to set via environment variables.
  • Configs should migrate to YML file.
  • phpBB should be replaced by Markdown (or for backward compatibility purposes should be able to chose one of them... maybe including playin HTML etc.)
  • The images gotten by parse_link should be saved.
  • There should be posibility to archive content of links, in case they go down (maybe including youtube-dl for storing videos, should be as option)
  • Datetime handling
    • Unified in MySQL & SQLite.
    • Or user could set own format based on l10n.
      Misc
  • Data directory should not be copied to docker image. There should be separate src directory.
  • MySQL tables should be utf8mb4 and allowing 4bytes charactes (such as emojis) instead of stripping them (like is it now done). Convert script.

SQLSTATE[08006] [7] invalid connection option "unix_socket"

New user trying to set things up here. Just set up the docker-compose using postgres. When opening the webpage, I get the error "SQLSTATE[08006] [7] invalid connection option "unix_socket"" as a red popup in the bottom left. I can log in, but I can't post.

If you need more information, let me know! I could give you my folder structure, docker-compose, or the logs from either container if necessary. I just want to make sure if this is something wrong on my end or not, I'm getting more used to docker but I'm not great with linux :s

Ajax output

Pokiaľ vznikne chyba počas behu skriptu, nieje nijak odchytená, a zobrazí sa v Ajaxe. Tým pádom už nieje výstup ajaxu platný JSON.

Reasons why this project is outdated

It's almost 8 years since initial release of this project, and there are some reasons why this project might be outdated in the current context. Although it is still fully functional and well satisfies the initial usecase, the times have changed and following features would be raelly beneficial for at least the upcomming decade to keep this project alive (sorted by importance):

  • versions upgrade - still using PHP 7.4 and old version of jquery. probably switching to vue3 or svelte would be beneficial. or keeping in vanilla js, since jquery is not relevant anymore.
  • bbcode replaced with markdown - bbcode is not relevant anymore, markdown is what cool kids use, we should switch to that.
  • data export - there should be a way to export all the data (or just specified time range) as an static page with all the pohots, that can be archived.
  • bigger screens - now everyone has bigger screens, fullHD, 2k or 4k. the blog is just a thin slice in the middle of the screen for such users. it should leverage more space and use new CSS features such as flexbox or grid.
  • multiple photos per post - now we can only upload a single photo per post but we should be able to handle multiple of them as a slideshow or a grid.
  • link archiver - when we post some links they might be dead, in the past 8 years it happens with multiple links or images. we should have possiblity to store linked pages with an archived copy so that they stay preserved.

Having implemented at least the first 4 points would be considered that this project is not outdated.

View more

After editing long text, view more appers twice.

Sort order, date input and picture width

Thanks for this great pice of software. It's pretty much perfect for my little blog, but I have three questions.
This is in no way a change request, just questions if it's easily achievable, or maybe it already possible and I just don't know it.

  1. is it possible to reverse the sort order? The default order is quite perfect, but if someone wants to view the complete history of my project, it would be nice to have the order reversed (oldest first). Something like url.com/sort=reverse, the link then should be located in the cover (head-banner).
  2. to change the date doesnt let you change the year. It's only doable through changing the month. The first picture in my blog is from 01/1993 - this was a lot of clicking going back 30 years. Would it be possible to make the year clickable (changable) in the date-picker?
  3. I'd love to increase the width of each post to the size of the head-banner. I managed to extend the box size with mounting the modified css to the corresponding path, but this doesn't workfor the pictures itself, thy remain 476px. Would this be easily achievable, maybe by myself?

Thx a lot!

Unable to enable Dark Mode.

Hey I'm losing my mind trying to figure out how to set dark mode. I've tried "theme02-dark" since thats the filename of the dark screenshot but have had no luck.

BBCode Cheatsheet

I know there are a lot of BBCode cheatsheets out there, but is there any documentation for what does/doesn't work within Blog?

For example, [b]Bold[/b], [i]Italicize[/i], and [u]Underline[/u] work, but not [s]Strike-through[/s] or any of the list formats I've seen, such as:

[list]
[*] Item A
[*] Item B
[*] Item C
[/list]

EDIT: If it's not clear, I'm not asking you to add in more features- I just want to know if there's documentation for the BBcode that we already have. Thanks!

Default privacy mode

How to set the default privacy mode to for example public.
I will only post public posts and it would be handy if the privacy settings persist or is change able

Respect timezone on post save.

Since the time zone cannot be specified anywhere, the wrong time zone is always saved when writing a post. In my case two hours early.

UP: SQLSTATE[42S02]: Base table or view not found: 1146 Table 'blog.posts' doesn't exist

Duplicate of https://github.com/m1k1o/blog/issues/28

Config:

version: "3"
services:
  webserver:
    image: m1k1o/blog:latest
    container_name: blog_apache
    environment:
      TZ: Europe/Moscow
      BLOG_DB_CONNECTION: mysql
      BLOG_MYSQL_HOST: mariadb
      BLOG_MYSQL_PORT: 3306
      BLOG_MYSQL_USER: blog
      BLOG_MYSQL_PASS: blog # use secure password
      BLOG_DB_NAME: blog
    restart: unless-stopped
    ports:
      - 9999:80
    volumes: 
      - ${DATA-./data}:/var/www/html/data
  mariadb:
    image: mariadb:10.1
    container_name: blog_mariadb
    environment:
      MYSQL_USER: blog
      MYSQL_PASSWORD: blog # use secure password
      MYSQL_DATABASE: blog
      MYSQL_ROOT_PASSWORD: root # use secure password
    restart: unless-stopped
    volumes:
      - mariadb:/var/lib/mysql
      - ./app/db/mysql:/docker-entrypoint-initdb.d:ro
volumes:
  mariadb:

Error: [:crit] [pid 1] (38)Function not implemented: AH00141: Could not initialize random number generator not starting

Running standard docker-compose.yaml on Synology NAS Docker.

Error and restarting [:crit] [pid 1] (38)Function not implemented: AH00141: Could not initialize random number generator

Not starting. Tried with different credentials.

I used:

version: "3"
services:
  blog:
    image: m1k1o/blog:latest
    restart: unless-stopped
    environment:
        TZ: Europe/Zurich
        BLOG_TITLE: MyName
        BLOG_NAME: user
        BLOG_NICK: nick
        BLOG_PASS: password
        BLOG_LANG: en
    ports:
      - 8033:80
    volumes:
      - /volume1/docker/blog/data:/var/www/html/data

Support for multiple image and video, comment, etc... please...

Hello. I'm Korean. (S.Korea)
Sorry for posting here ...

I would like to ask is there upcoming changelogs like below :

Features request :

  1. Select multiple image and display multi image
  2. Upload video and display video
  3. Emoji set for expressing the feeling.
  4. Upload multiple types of files.
  5. COMMENT function.

Please ... ( T-T )

Truenas scale can't post on blog SQLSTABLE[42P01] errors

Hello.
I have Truenas Scale and when I install this app, I can't do anything

when I open app, error >
SQLSTABLE[42P01]: Undefined tanle: 7 error: relation "post" does not exist LINE 5: FROM "posts"

when I tried to post > SQLSTABLE[42P01]: Undefined tanle: 7 error: relation "post" does not exist LINE 1: INSERT INTO "posts" ("text", "plain_text", "feeling", "perso...

can you help me? I tried dataset with permisions on www-data, root, apps, even me and nothing working.

Postgres

Hello! Thanks for your job the blog is nice! Could you add support of PostgreSQL?

favicon

Hi,
I'm running blog in docker with sqlite.
Is there a way to change the favicon? Didn't find anything in the config.ini.
Thanks a lot!

403 - Forbidden: Access is Denied

I can see the page but on other devices I get "403 - Forbidden: Access is Denied. You do not have permission to view this directory or page." Guessing there's a setting somewhere to allow access to it?

Lost "Login"

Hey there! I hope you're well!

I've updated the latest image and I have had a problem. The button login has been lost, also I can't see my posts. Screenshot here - https://ibb.co/y03GRL3

The browser console is empty, has no errors. I see no errors in my logs too.

Any ideas?

Youtube grabbing metadata fail

There won't be collected metadata about youtube videos:

  • No Thumbnail.
  • No Title.
  • No Description.

Youtube must have changed something, because open.spotify.com works.

Tags doens't work with postgres

Hello again!

I've deployed your blog in Kube with my own Postgres it works fine! Thanks! But it has a problem with tags

SQLSTATE[42P18]: Indeterminate datatype: 7 ERROR: could not determine data type of parameter $1

The same bad issue with location :(

Feature: PIN

If there is something admin wants to show to its viewers always (eg.: public login username and password), regardless of what kind of stuff the user puts there after, a pin would come in handy.

Document friends feature

I don't understand after reading the readme how it determines who is friend vs who is public.

Please document what you mean by this and how we control who friends are.

Website grabber - relative links

If there is relative link in metadata (which should not be, but can), then it fails to grab base URL.

image

<meta content="/uploads/-/system/project/avatar/1139/mat2.png" property="og:image">

SQLite support

Add SQLite support, so this can be installed out of the box, without need for DB container. Ideal for small blogs.

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.