1. Read
  2. Vote
  3. Old
  4. New
  5. Hot
  6. Reply

Topnew CSS v 2023

The frontend - Topnew CSS v 2023

  1. Grid system
  2. Box
  3. Colors
  4. Shapes
  5. Text
  6. JS related
Cat: CMS | Read: 725 | 10/04/2022
Tags: CSS

How to install databases

Install ubuntu 24.04 LAMP via wsl, PHP 8 MySQL 8 PostgreSQL 13 etc

A - Install Git Bash for windows

If you are already on Linux or Mac, this is optional.

Tool "Git Bash", on "gitforwindows.org", it says "Git for windows", when installed, it is called "MINGW64".

This tool for window
Cat: SIDU | Read: 894728 | 01/01/2013 | Like: 2

Wiki: Topnew DB helper

Wiki: Topnew DB Helper v 2018.08.08
Topnew DB provides a full list of database functions for PHP PDO only. Generally there are 5 groups of functions:

A - General duties:

1. Database connection

$conn = [
'eng' => 'mysql', // pgsql | sqlite | m
Cat: SIDU | Read: 183960 | 05/11/2018 | Like: 1

Finding the Nth Fibonacci number via PHP

Here is an example of Fibonacci numbers:

0, 1, 1, 2, 3, 5, 8, 13, 21, 34, 55, ...

Write a function f(x) so that return the following eg:

f(2) = 1 f(4) = 2 f(6) = 5 f(8) = 13 etc

And here is the code: function f($x = 0) { if ($x < 2) { return $x; } else { return f($x - 2) + f($x - 1); } }
Cat: General | Read: 58877 | 01/11/2018 | Like: 1

Blog Docs 4 - Admin staff users

Use your existing user table, and only import user_id in to blog_cat.cat = 1001 eg

REPLACE INTO blog_cat(cat,name,info) VALUES
(1001,'blog_staff','{"1":[1,2],"181130":[102,108]}');

staff user id is a json of: catetory and user ids, above means:

cat = 1 (all categories i.e. Admin staff)
user_id = 1, 2

cat = 181130 (i.e. staff or moderators for cat = 181130)
user_id = 102, 108 etc
Cat: Blog | Read: 22473 | 25/01/2019 | Like: 3
  1. 1
  2. 2
  3. 3
  4. 4
  5. »

Category