FORUMS CLOSED DUE TO SPAM. YOU STILL CAN ADD POST!

Image insert function/plugin...

Feed 3 posts, 4 voices

Avatar
1 posts

Hello peoples,

I was wondering if there was a neat little plugin or code feature that I could integrate into a site i’m designing that would allow the client to easily insert images…? Any light shed on the matter would be most helpful!

cheers

 
Avatar
180 posts

TinyMCE plugin has function “Insert Image” and in dialog you can select image from directory /public/images/. But this function bugly. I want to rewrite this function in this plugin.

 
Avatar
26 posts

I use a simple function, change it to your needs:

function PlaatsFoto($path, $alt, $txt)
 {
    $url = URL_PUBLIC;
    list($width, $height, $type, $atrib) = getimagesize($path);
    $split = explode('|', $txt);

	$alt = str_replace('"', '"', $alt);
        $alt = str_replace('‘', '‘', $alt);
	$alt = str_replace('’', '’', $alt);
	$alt = str_replace('“', '“', $alt);
	$alt = str_replace('”', '”', $alt);

	$txt = str_replace('"', '"', $txt);
	$txt = str_replace('‘', '‘', $txt);
	$txt = str_replace('’', '’', $txt);
	$txt = str_replace('“', '“', $txt);
	$txt = str_replace('”', '”', $txt);

    echo "<div class=\"foto\"><p><img class=\"geschaald\" src=\"$url$path\" title=\"$alt\" alt=\"$alt\" $atrib></p>" .
        PHP_EOL;
    echo "<p>" . PHP_EOL;
    foreach ($split as $line) {
        echo $line . "<br>" . PHP_EOL;
    }
    echo "</p>" . PHP_EOL;
    echo "</div>" . PHP_EOL;

}
 
Avatar
16 posts

You can check out the Tiny mce plugin I modded by adding a file manager / thumnail chooser

More info on this thread : http://forum.madebyfrog.com/topic/1750