├── .gitignore ├── css ├── NOTICE.md ├── bg.gif ├── back.png ├── LondrinaSolid.ttf ├── startupPhone320.png ├── startupPhone640.png ├── likebtnstyles.css ├── tinystyles.css └── styles.css ├── sounds ├── alert.mp3 ├── alert.ogg └── alert.wav ├── connect.php ├── README.md ├── initialize-tables.md ├── admin ├── checkadminlogin.php ├── login.php └── index.php ├── checklogin.php ├── get.php ├── config-sample.php ├── detail.php ├── LICENSE.md ├── plugins ├── parsedown │ ├── LICENSE.txt │ └── Parsedown.php ├── add2home.css └── add2home.js ├── like.php ├── login.php ├── image.php └── index.php /.gitignore: -------------------------------------------------------------------------------- 1 | startup*.png -------------------------------------------------------------------------------- /css/NOTICE.md: -------------------------------------------------------------------------------- 1 | back.png is refrenced in script in index.php line 180. -------------------------------------------------------------------------------- /css/bg.gif: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/serverwentdown/picobloggingsys/master/css/bg.gif -------------------------------------------------------------------------------- /css/back.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/serverwentdown/picobloggingsys/master/css/back.png -------------------------------------------------------------------------------- /sounds/alert.mp3: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/serverwentdown/picobloggingsys/master/sounds/alert.mp3 -------------------------------------------------------------------------------- /sounds/alert.ogg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/serverwentdown/picobloggingsys/master/sounds/alert.ogg -------------------------------------------------------------------------------- /sounds/alert.wav: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/serverwentdown/picobloggingsys/master/sounds/alert.wav -------------------------------------------------------------------------------- /css/LondrinaSolid.ttf: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/serverwentdown/picobloggingsys/master/css/LondrinaSolid.ttf -------------------------------------------------------------------------------- /css/startupPhone320.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/serverwentdown/picobloggingsys/master/css/startupPhone320.png -------------------------------------------------------------------------------- /css/startupPhone640.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/serverwentdown/picobloggingsys/master/css/startupPhone640.png -------------------------------------------------------------------------------- /connect.php: -------------------------------------------------------------------------------- 1 | 7 | -------------------------------------------------------------------------------- /README.md: -------------------------------------------------------------------------------- 1 | picobloggingsys 2 | =============== 3 | 4 | Error-prone microblogging system. 5 | Uses PHP, MySQL. 6 | 7 | Copy config-sample.php to config.php and edit database details. 8 | 9 | ## Warning: error-prone. 10 | 11 | I loooove contributors. `:-)`. Help me fix bugs. 12 | -------------------------------------------------------------------------------- /initialize-tables.md: -------------------------------------------------------------------------------- 1 | 2 | Log in to your MySQL server, then run the following: 3 | 4 | ``` 5 | CREATE TABLE microblog ( 6 | id INT(6) UNSIGNED AUTO_INCREMENT PRIMARY KEY, 7 | txt VARCHAR(320) NOT NULL, 8 | tim VARCHAR(40) NOT NULL, 9 | pluses INT(6) UNSIGNED DEFAULT 0 10 | ) 11 | ``` 12 | -------------------------------------------------------------------------------- /admin/checkadminlogin.php: -------------------------------------------------------------------------------- 1 | -------------------------------------------------------------------------------- /checklogin.php: -------------------------------------------------------------------------------- 1 | -------------------------------------------------------------------------------- /get.php: -------------------------------------------------------------------------------- 1 | ".mysqli_real_escape_string($db, $_GET["lastid"])." ORDER BY `$mysql_table`.`id`"; 9 | $result=mysqli_query($db, $qry); 10 | $newlastid=$_GET["lastid"]; 11 | $jspo=array(); 12 | while ($row = mysqli_fetch_array($result)) { 13 | $newlastid=$row["id"]; 14 | array_push($jspo, array("txt"=>stripslashes($row["txt"]), "tim"=>$row["tim"], "id"=>$row["id"])); 15 | } 16 | echo json_encode(array("posts"=>$jspo, "lastid"=>$newlastid)); 17 | 18 | mysqli_close($db); 19 | ?> 20 | -------------------------------------------------------------------------------- /config-sample.php: -------------------------------------------------------------------------------- 1 | github 22 | '); 23 | define('MBLOG_DESC', ' 24 |
25 | BLOG DESCRIPTION 26 |
'); 27 | 28 | 29 | define('MBLOG_PULLEY_TEXT', "What's this?"); 30 | define('MBLOG_TOOLTIPS_TEXT', "Tap post to comment and like. :)"); 31 | ?> 32 | -------------------------------------------------------------------------------- /detail.php: -------------------------------------------------------------------------------- 1 | 14 |'.$text.'
'."\n"; 547 | } 548 | else 549 | { 550 | $markup .= $text; 551 | } 552 | } 553 | else 554 | { 555 | $markup .= ''.$text.'
'."\n"; 556 | } 557 | 558 | break; 559 | 560 | case 'blockquote': 561 | 562 | $text = $this->parse_block_elements($element['lines']); 563 | 564 | $markup .= ''."\n".$text.''."\n"; 565 | 566 | break; 567 | 568 | case 'code_block': 569 | case 'fenced_code_block': 570 | 571 | $text = htmlentities($element['text'], ENT_NOQUOTES); 572 | 573 | strpos($text, "\x1A\\") !== FALSE and $text = strtr($text, $this->escape_sequence_map); 574 | 575 | $markup .= '
'.$text.''."\n";
576 |
577 | break;
578 |
579 | case 'h.':
580 |
581 | $text = $this->parse_span_elements($element['text']);
582 |
583 | $markup .= ''.$element_text.'';
648 |
649 | # encodes element
650 |
651 | $code = "\x1A".'$'.$index;
652 |
653 | $text = str_replace($matches[0], $code, $text);
654 |
655 | $map[$code] = $element;
656 |
657 | $index ++;
658 | }
659 | }
660 |
661 | # inline link or image
662 |
663 | if (strpos($text, '](') !== FALSE and preg_match_all('/(!?)(\[((?:[^\[\]]|(?2))*)\])\((.*?)\)/', $text, $matches, PREG_SET_ORDER)) # inline
664 | {
665 | foreach ($matches as $matches)
666 | {
667 | $url = $matches[4];
668 |
669 | strpos($url, '&') !== FALSE and $url = preg_replace('/&(?!#?\w+;)/', '&', $url);
670 |
671 | if ($matches[1]) # image
672 | {
673 | $element = '