Recources GoStock Script - Auto Image-Description Generator with Tags

PureGod

Member
Hello guys,
today I would like to share my auto image description generator with you.

Preview
Screenshot_183.jpg
1. Upload Image without any description.

Screenshot_184.jpg
2. Script will create description with the tags.

Installation
Go to
app/Http/Controllers/ImagesController.php and search for
PHP:
if( !empty( $request->description ) ) {
    $description = Helper::checkTextDb($request->description);
    } else {
    $description = '';
}
replace with
PHP:
if( !empty( $request->description ) )
{
    $description = Helper::checkTextDb($request->description);
}
else
{
    $a_key = explode(",", strtolower($request->tags));
    if(count($a_key) == 0)
        $description = 'This is a great high quality free image';
    else
    {
    $description_get_keys = '';
        foreach ($a_key as &$value)
        {
            if($value == end($a_key) && count($a_key) != 1)
                $description_get_keys = $description_get_keys.' and '.$value.'.';
            else if(count($a_key) == 1)
                $description_get_keys = $value.'.';
            else if (count($a_key) > 1 && $a_key[0] == $value)
                $description_get_keys = $value;
            else
                $description_get_keys = $description_get_keys.', '.$value;
        }
    $description = 'This high quality free image is about '.$description_get_keys;
    }
}

Credits
HowToMedia - PureGod

If you require any help, let me know!​


Best regards,
PureGod.




 

Michael

Administrator
Staff member
Hello guys,
today I would like to share my auto image description generator with you.

Preview
View attachment 115
1. Upload Image without any description.

View attachment 116
2. Script will create description with the tags.

Installation
Go to
app/Http/Controllers/ImagesController.php and search for
PHP:
if( !empty( $request->description ) ) {
    $description = Helper::checkTextDb($request->description);
    } else {
    $description = '';
}
replace with
PHP:
if( !empty( $request->description ) )
{
    $description = Helper::checkTextDb($request->description);
}
else
{
    $a_key = explode(",", strtolower($request->tags));
    if(count($a_key) == 0)
        $description = 'This is a great high quality free image';
    else
    {
    $description_get_keys = '';
        foreach ($a_key as &$value)
        {
            if($value == end($a_key) && count($a_key) != 1)
                $description_get_keys = $description_get_keys.' and '.$value.'.';
            else if(count($a_key) == 1)
                $description_get_keys = $value.'.';
            else if (count($a_key) > 1 && $a_key[0] == $value)
                $description_get_keys = $value;
            else
                $description_get_keys = $description_get_keys.', '.$value;
        }
    $description = 'This high quality free image is about '.$description_get_keys;
    }
}

Credits
HowToMedia - PureGod

If you require any help, let me know!​


Best regards,
PureGod.




Great idea! Thanks for sharing (y)
 

TusharS

New member
Hello guys,
today I would like to share my auto image description generator with you.

Preview
View attachment 115
1. Upload Image without any description.

View attachment 116
2. Script will create description with the tags.

Installation
Go to
app/Http/Controllers/ImagesController.php and search for
PHP:
if( !empty( $request->description ) ) {
    $description = Helper::checkTextDb($request->description);
    } else {
    $description = '';
}
replace with
PHP:
if( !empty( $request->description ) )
{
    $description = Helper::checkTextDb($request->description);
}
else
{
    $a_key = explode(",", strtolower($request->tags));
    if(count($a_key) == 0)
        $description = 'This is a great high quality free image';
    else
    {
    $description_get_keys = '';
        foreach ($a_key as &$value)
        {
            if($value == end($a_key) && count($a_key) != 1)
                $description_get_keys = $description_get_keys.' and '.$value.'.';
            else if(count($a_key) == 1)
                $description_get_keys = $value.'.';
            else if (count($a_key) > 1 && $a_key[0] == $value)
                $description_get_keys = $value;
            else
                $description_get_keys = $description_get_keys.', '.$value;
        }
    $description = 'This high quality free image is about '.$description_get_keys;
    }
}

Credits
HowToMedia - PureGod

If you require any help, let me know!​


Best regards,
PureGod.




Can it be implement on bulk upload.
 
Top