mirror of
https://github.com/LinkStackOrg/LinkStack.git
synced 2025-02-09 08:38:49 +01:00
This displays an update notice if a new version of LittleLink Custom has been released. This one is definitely a messy one. Everything I added is commented, but I'm going to try explaining it here one more time. General outcome: • This feature checks the local version against the newest version stored on a separate server. Error prevention: • I used 'file_get_contents' to get the version number from a JSON file. If 'file_get_contents' cant find the file, PHP will throw an Error Exception. • To prevent this, I put the update section in an if-statement that only applies if the following conditions are met. Check if files exist: • To test whether the file on the server exists (remember, if the server can't be reached, you will get an Error Exception) I used a function that checks if the URL to the file on the server successfully returns a '200 OK' response (see https://developer.mozilla.org/en-US/docs/Web/HTTP/Status/200). • If this condition is met, it sets the variable '$ServerExists' to true, if not to false. • Now, the previous mentioned if-statement simply checks if the local file exists and the '$ServerExists' variable equals 'true' to proceed. Get version number: • If all previous conditions are met, two variables get defined via 'file_get_contents' '$Vgit' and '$Vlocal'. • Both the file on the server and the local file simply contain the version number. • The variable '$Vgit' is the newest version number retrieved from the server. • The variable '$Vlocal' is the local version number. Display update notice: • To finally display the version number (added with HTML) one last check via an if-statement is performed. This simply checks if the current user is an admin AND if the version retrieved from the server is higher than the local one. • If both conditions are met, the notice is displayed. In addition, I should mention that I put the existing 'Watch Page' link as well as the update notice in a div with the class 'row' to display both links next to another instead of them being stacked.
⚙️ LittleLink Admin
Forked from littlelink-admin
LittleLink Admin is an admin panel for littlelink that provides you a website similar linktree.
📑 Features
- creating a link page with more than 20 buttons
- raising important links on the page
- button hover animations (new) | demo
- ordering links (new)
- custom link option (new)
- Social Share Preview for individual users (new)
- counting clicks
- managing users and pages and links
- and ...
🔨 Install
git clone https://github.com/JulianPrieber/littlelink-admin
cd littlelink-admin
cp .env.example .env
composer update -vvv
- edit .env file
DB_DATABASE=YOUR_DB_NAME
DB_USERNAME=YOUR_DB_USER
DB_PASSWORD=YOUR_DB_PASS
APP_NAME="YOUR_APP_NAME"
- run migration & db seed
php artisan migrate
php artisan db:seed
(or commands below)
php artisan db:seed --class="AdminSeeder"
php artisan db:seed --class="PageSeeder"
php artisan db:seed --class="ButtonSeeder"
php artisan key:generate
php artisan serve (optional)
- login:
email: admin@admin.com
password: 12345678
💞 Partners
🎲 Donate
@khashayarzavosh bitcoin: 1FQJWCZJoLKfJei7NFisTH65yNUjugJRi4
Description
LinkStack è una piattaforma per la gestione e la condivisione dei link online. Offre un sito web simile a Linktree, che consente agli utenti di superare la limitazione di poter aggiungere un solo link sulle piattaforme dei social media.
https://l.devol.it
Readme
AGPL-3.0
48 MiB
Languages
PHP
65.5%
Blade
34.5%