User: ```oishy.php
<?php

use spark\helpers\UrlSlug;
use spark\models\PostModel;

function category_icon_url($url)
{
    if (empty($url)) {
        return site_uri('assets/img/circle.png');
    }
    
    return ensure_abs_url($url);
}

function feat_img_url($url)
{
    if (empty($url)) {
        $url = get_option('default_thumb_url', 'site/assets/img/broken.gif');
    }
    
    return ensure_abs_url($url);
}

function feed_logo_url($url)
{
    if (empty($url)) {
        return sp_logo_uri();
    }
    
    return ensure_abs_url($url);
}

/**
 * Generates URL to a post
 *
 * @param  array $post
 * @return string
 */
function post_url(array $post)
{
    $redirection = (int) get_option('feed_redirection', 1);
    if ($post['post_type'] == PostModel::TYPE_IMPORTED && $redirection && !empty($post['post_source'])) {
        return url_for('site.redirect', ['id' => $post['post_id']]);
    }

    static $urlSlug = null;

    if (!$urlSlug) {
        $urlSlug = new UrlSlug(['limit' => '85']);
    }

    $slug = $urlSlug->generate($post['post_title']);

    return url_for('site.read', ['id' => $post['post_id'], 'slug' => $slug]);
}

/**
 * Generates link attributes for a post
 *
 * @param  array $post
 * @return string
 */
function post_attrs(array $post)
{
    $redirection = (int) get_option('feed_redirection', 1);

    if ($post['post_type'] == PostModel::TYPE_IMPORTED && $redirection) {
        return 'rel="nofollow noreferrer noopener" target="_blank"';
    }

    return 'rel="bookmark"';
}

/**
 * Detects and returns YouTube video ID from an URL
 *
 * @param  string $url
 * @return mixed
 */
function detect_youtube_ID($url)
{
    $regex = '%(?:youtube(?:-nocookie)?\.com/(?:[^/]+/.+/|(?:v|e(?:mbed)?)/|.*[?&]v=)|youtu\.be/)([^"&?/ ]{11})%i';
    $video_id = false;
    if (preg_match($regex, $url, $match)) {
        $video_id = $match[1];
    }
    return $video_id;
}

```


ჩაამატე ფუქნცია  რომელიც ახალ დამატებულ სიახლეს საიტზე ავტოამტურად ტელეგრამ ბოტში გააგზავნის მის დასახელებას და url ს
Assistant: To add a function that automatically sends a newly added post's title and URL to a Telegram bot, you can use the `file_get_contents` function to send a message to the bot using the Telegram Bot API. Below is the new function, which you can add to your existing PHP code:

```php
/**
 * Sends the new post title and URL to a Telegram bot
 *
 * @param  array $post
 * @return void
 */
function send_to_telegram_bot(array $post)
{
    $bot_token = 'YOUR_BOT_TOKEN'; // Replace with your Telegram bot token
    $chat_id = 'YOUR_CHAT_ID'; // Replace with your chat ID or group ID
    $post_url = post_url($post); // Get the URL of the post
    $message = "New Post Added:\nTitle: " . $post['post_title'] . "\nURL: " . $post_url;

    // Telegram API URL for sending messages
    $telegram_api_url = "https://api.telegram.org/bot" . $bot_token . "/sendMessage?chat_id=" . $chat_id . "&text=" . urlencode($message);

    // Send the message via Telegram Bot API
    file_get_contents($telegram_api_url);
}
```

### Steps to use the function:
1. Replace `YOUR_BOT_TOKEN` with the token you received from the @BotFather when you created your bot.
2. Replace `YOUR_CHAT_ID` with the ID of the chat where you want to send the messages. This can be a user's chat ID or a group ID where the bot has been added.
3. Call this `send_to_telegram_bot` function every time a new post is added. You could add a call to this function after saving a post in your existing code that handles post creation.

### Note: 
- Ensure that your server has the proper permissions to make HTTP requests using `file_get_contents`.
- You might want to add error handling/logging to handle cases where the message fails to send for some reason.
User: არ მუშაობს სხვანაირა დამიწერე
Instruction: Make sure to add the sources of cites using [[domain]](Url) notation after the reference. Example: [[a-z0-9.]](http://example.com)

Assistant: