# App News

:flag\_fr: App News est une application non officielle de lb-phone. Aucun autre téléphone ne peut supporter cette application. L'application sera disponible pour une seule entreprise (WeazelNews, par exemple) afin de publier des articles. Compatible avec ESX & QBCore.

:flag\_us: App News is an unofficial app from lb-phone. No other phone can support this app. The app will be available for a single company (WeazelNews, for example) to publish articles. Compatible with ESX & QBCore.

***

:flag\_fr: **Fonctionnalités**\
• Framework : ESX & QBCore\
• Supprimer les articles via l'application en étant staff (permissions modifiables)\
• Insertion d'images ou de gifs\
• Système de like Système de configuration simple et efficace (Dépendance d'un script)\
• Afficher l'image en grand via un script externe et gratuit : [lien](https://github.com/skypr0d/ShowScreenshot)

:flag\_us: **Feature :** \
• Framework: ESX & QBCore\
• Delete articles via the app as staff *(modifiable permissions)*\
• Insert images or gifs\
• Like system Simple and effective configuration system *(Script dependency)*\
• Display the image in large size via an external and free script : [link](https://github.com/skypr0d/ShowScreenshot)

***

{% embed url="<https://forum.cfx.re/t/lb-phone-plugin-app-news/5251202>" %}

***

### PREVIEW

{% embed url="<https://youtu.be/Jfcdiqf6F1A>" %}

***

### BUY THE SCRIPT

{% embed url="<https://skyprod.tebex.io/package/6362042>" %}

{% embed url="<https://skyprod.tebex.io/package/6362028>" %}

***

### INSTALLATION

:flag\_fr: \
1\. Téléchargez la ressource sur votre <https://keymaster.fivem.net/asset-grants>\
2\. Insérez la ressource à l'endroit souhaité sur votre serveur\
3\. Lancez la ressource dans le fichier `.cfg`\
4\. Configurez vos fichiers `config.lua` et `config.js` selon vos préférences\
5\. Exécuter le code `.sql` dans votre base de donnée

:flag\_us: \
1\. Download the resource from your <https://keymaster.fivem.net/asset-grants>\
2\. Insert the resource in the desired location on your server\
3\. Launch the resource in the `.cfg` file\
4\. Configure your `config.lua` and `config.js` files as you prefer\
5\. Execute the `.sql` code in your database

***

### Configuration

> Config.lua

```lua
ConfigNewsApp = {
    Framework = 'QBCore', -- ESX & QBCore
    JobRequired = 'weazelnews',
    ['Settings'] = {
        AuthorRequiredCharacters = 2, -- The number of the author of the publication must have at least (2 by default) characters to have his name written (otherwise it is written unknown)
        ESX_StaffsLists = {'owner', 'admin'},
        QBCore_StaffsLists = {'god', 'admin', 'mod'},
    },
    ['Translate'] = {
        -- Client Side 
        UnknownAuthor = "Inconnu",

        -- Server Side 
        TimeAgoIfError = "Aucune information",
        PostIdNotFound = "~r~Le post n'a pas était trouvé",
        PostsDeleted =  "~g~Article n°%s supprimé",
        PostPublished = "~g~Article publié",

        AppNotif_Title = "Nouvelle publication",
        AppNotif_Description = "Le WeazelNews vient de publier un nouvel article.",

        ['TimeAgo'] = {
            Instant = "Il y a quelques instants",
            Minutes = "Il y a %s minute(s)",
            Hours = "Il y a %s heure(s)",
            Day = "Il y a %s jour(s)",
            Months = "Il y a %s mois",
            Years = "Il y a %s an(s)",
        },
    },
    ['ShowNotification'] = function(text) -- Notification type, depending on your framework or external script (Server notifications are forwarded here)
        if ConfigNewsApp.Framework == 'ESX' then 
            TriggerEvent('esx:showNotification', text)
        elseif ConfigNewsApp.Framework == 'QBCore' then 
            TriggerEvent('QBCore:Notify', text)
        end
    end,
}
```

> Config.js

```javascript
const Config = {  
    ColorDeleteArticle : "red", // lb-phone color (red, blue, green)
};

const Translate = {
    UnableLoadImage : "Impossible de charger l'image.",

    PublishedBy : "Publié par",
    Like : "j'aime",

    AlreadyLiked : "Vous avez déjà aimé cette article.",
    LikeArticle : "Vous venez d'aimer cette article.",

    DeleteThisArticle : "Supprimer cette article",

    MustWriteTitle : "Veuillez au minimum écrire un titre à votre article afin de le publier.",
};
```


---

# Agent Instructions: Querying This Documentation

If you need additional information that is not directly available in this page, you can query the documentation dynamically by asking a question.

Perform an HTTP GET request on the current page URL with the `ask` query parameter:

```
GET https://docs.skyprod.ovh/docs-tebex-skypr0d/app-news.md?ask=<question>
```

The question should be specific, self-contained, and written in natural language.
The response will contain a direct answer to the question and relevant excerpts and sources from the documentation.

Use this mechanism when the answer is not explicitly present in the current page, you need clarification or additional context, or you want to retrieve related documentation sections.
