• Welcome to the Chevereto user community!

    Here users from all over the world gather around to learn the latest about Chevereto and contribute with ideas to improve the software.

    Please keep in mind:

    • 😌 This community is user driven. Be polite with other users.
    • 👉 Is required to purchase a Chevereto license to participate in this community (doesn't apply to Pre-sales).
    • 💸 Purchase a Pro Subscription to get access to active software support and faster ticket response times.

use api for custom url shortner

toron

Chevereto Member
hello,
im using yourls.org short url service and i would like to connect it to my chevereto site.
i am not very strong in php, please tell me what files do i need to modify in chevereto in order this to work?
link to yourls api:http://yourls.org/#API

thanks for your help.
 
You only need to edit includes/config.php

PHP:
/**
* short_url_service
* Remember $config['short_url'] There we set up wich service we want to use.
* default: tinyurl
*/
$config['short_url_service'] = 'tinyurl'; // Values: tinyurl | google | isgd | bitly | custom
 
 
/**
* custom_short_url_api
* If you set short_url_service to custom you need to specify the API url for your custom service
* including user login, output format (raw text) and at the end the empty url param (see the example)
* Note: Your service must have raw text output via GET.
*/
$config['custom_short_url_api'] = ''; // Example: http://yoursite.com/yourls-api.php?format=simple&action=shorturl&username=<USERNAME>&password=<PASSWORD>&url=
 
these are the changes made in config.php:
PHP:
$config['short_url_service'] = 'custom'; // Values: tinyurl | google | isgd | bitly | custom

PHP:
$config['custom_short_url_api'] = 'http://zik.co.il/yourls-api.php?format=simple&action=shorturl&username=<****>&password=
<*******>&url='; /

after this done, when i upload an image i get a forbidden error:

Forbidden

You don't have permission to access /yourls-api.php on this server.

Additionally, a 404 Not Found error was encountered while trying to use an ErrorDocument to handle the request.
Apache Server at zik.co.il Port 80
" />

please advice.
 
Well, if the standalone version of the YOURLs API: http://zik.co.il/yourls-api.php doesn't work it's pretty sure that it won't work also when Chevereto try to fetch it. Try to go to yourls support to know what you are doing wrong in your YOURLs setup.
 
Back
Top