I couldn't find a quick and easy way to stick images from Coppermine into my Blogger blog so I wrote a plug-in that will generate HTML to embed an image from your Coppermine gallery into any other HTML page.
You can see it in use in my gallery here: http://photos.harrisonperry.net
WP
Edit: Updated to add a BBCode textbox.
Edit: The attachment below should work but I am making some changes on my site so it is not currently visible there.
Hi ... can it be generate to bbcode as well? thanks...
There already are plugins/mods that can accomplish this. Use them instead of asking your question here.
Quote from: GauGau on August 16, 2007, 07:40:46 AM
There already are plugins/mods that can accomplish this. Use them instead of asking your question here.
If there is something that has already been done it was probably done better than this since this is my first foray into php scripting but I couldn't find it. Could you post a link to the thread or the name of the plugin or mod?
WP
copy/ paste bbcode img URL below intermediate image v1.1 (http://forum.coppermine-gallery.net/index.php?topic=36302.0)
Seems quite interesting and I'm currently using in one of my galleries. The embed code is somewhere hidden on the picture information, but imho, less intrusive then "copy/past bbcode" plugin.
Mod looks great - 20x better than the link to another mod GauGau posted, so thanks for adding BBC support. Unless I'm missing something though, after making some selections to how I would like the embed code to parse, nothing appears in the link box (on your site anyway). I'm going to try and test it on mine but I'm not sure what's wrong that way.
I'm wondering if you could program another similar type of mod that would allow you to copy and paste a batch code for thumbnails/links of an entire album, and/or also for you to open up some sort of album browser (could look similar to the browser that you can use when using the 'batch add files' (searchnew.php / minibrowser.php) to grab the code for multiple pics at once! That would be amazing! :o
Tried to install this on my site and it doesn't work.... :'(
I installed the plugin, went to a gallery page, scrolled down past the image and there is no change... no selection for embed codes/etc... do I need to enable it somewhere?
Quote from: lifter on September 02, 2007, 08:15:41 PM
Mod looks great - 20x better than the link to another mod GauGau posted, so thanks for adding BBC support. Unless I'm missing something though, after making some selections to how I would like the embed code to parse, nothing appears in the link box (on your site anyway). I'm going to try and test it on mine but I'm not sure what's wrong that way.
The one on my site should be working now. I was working on adding some options (Size, link target, etc...) but time has been sparse so I never finished. I put the one on my site back to the original (HTML/BBC) version and it is working again.
Quote from: lifter on September 02, 2007, 08:15:41 PM
I'm wondering if you could program another similar type of mod that would allow you to copy and paste a batch code for thumbnails/links of an entire album, and/or also for you to open up some sort of album browser (could look similar to the browser that you can use when using the 'batch add files' (searchnew.php / minibrowser.php) to grab the code for multiple pics at once! That would be amazing! :o
When I have some time I will look into this. It may be beyond my PHP coding ability though. This little mod is my first bit of PHP beyond "Hello World" so far.
Quote from: lifter on September 02, 2007, 08:42:09 PM
Tried to install this on my site and it doesn't work.... :'(
I installed the plugin, went to a gallery page, scrolled down past the image and there is no change... no selection for embed codes/etc... do I need to enable it somewhere?
It should install like any other plugin...
1. Unzip to your plugins/html_embed
2. Go to Config -> General Settings -> Manage Plugins and click the (i) next to it in the list
The links will show up at the bottom of the file information when you are viewing an image.
WP
I've installed about 15 other plugins... this one didn't work though :'(
I see you're no longer trying to have it able to link to the page instead of the picture now though, I'm going to have to look into getting someone to customize it! :-\
This plugin is great!! I have installed the plugin. But I could not see the file information. How to you show the file information?
My coppermine link http://photo.sikod.com (http://photo.sikod.com)
Quote from: angsikod on September 13, 2007, 07:28:43 PM
This plugin is great!! I have installed the plugin. But I could not see the file information. How to you show the file information?
Look on the CPG Config page under Image View. Make sure that "File information is visible by default" is set to yes.
WP
Quote from: wperry1 on September 13, 2007, 09:51:26 PM
Look on the CPG Config page under Image View. Make sure that "File information is visible by default" is set to yes.
WP
This was the mistake I made... I didn't realize it would be listed under file information
Thanks it shows up now. :)
I have another question. How do you resize the embedded image on the blog?
With this plugin: not at all.
Well, anyway to resize the image?
Using another mod/plugin: maybe. Unrelated questions should not be asked here. Only question related to this lpugin are allowed here.
Quote from: angsikod on September 14, 2007, 04:08:31 AM
Thanks it shows up now. :)
I have another question. How do you resize the embedded image on the blog?
I wrote this to be pretty simple. It uses the intermediate picture in the embed so the only way to resize the embedded images would be to change the size of your intermediate pictures in CPG.
WP
Fine job! This is a wonderful plugin. I had actually uninstalled coppermine 1.3 something because I could not make it easy enough for my members to embed their media into our own forum- This plgin makes it as easy as youtube, putfile, etc.
And now that I've seen how you did it, I don't know why I didn't think of it before, brilliant!
Once again, good work, and this should be added or appended to the plugin pack in the future.
I'm new to Coppermine but I think you saved the zip file wrong. Inside the zip is a folder called plugins then the actual html_embed folder is inside it. It doesn't seem to do anything once installed even on the default theme. Does it work with 1.4.x?
this plugin doesnt work for me i dont know why :S
Meaning what? Not a valid report nor is your reply a valid support request. ::)
Thanks.. this is great plugin. I am using it right now to my site. :)
I have been thinking of, how can I edit the generated HTML/BB code? I want to add extra code on it like a simple text link, which link back to my site.
Quote from: nazcarpine on July 27, 2008, 08:34:07 AM
I have been thinking of, how can I edit the generated HTML/BB code? I want to add extra code on it like a simple text link, which link back to my site.
I would like to do this as well.
I wasn't a fan of the thumbnails and your url code, so I changed it.
Here is an example.
http://i304.photobucket.com/albums/nn183/rememberthesedaysforever/ExampleBBcode.jpg
I just wanted the basic url and full image BBCode.
Thanks for the plugin, though. Works great with the changes I made. ;D
$info['Embed URL'] = '<table cellpadding="0" cellspacing="1" border="0">';
$info['Embed URL'] .= '<tr><td>HTML:</td><td><textarea name="htmlcode" class="textinput" rows="3" cols="60" wrap="on"
style="overflow:hidden;height:65px;" onfocus="this.select();" onclick="this.select();"><a href="' . $CONFIG["ecards_more_pic_target"] .
get_pic_url($CURRENT_PIC_DATA, 'fullsize') . '" target="_blank"><img src="' . $CONFIG["ecards_more_pic_target"] . get_pic_url($CURRENT_PIC_DATA, 'fullsize') .
'" border="0"></a></textarea></td></tr>';
I've made a cosmetic change to increase the text inputbox so the whole code is visible.
But I also have a slight problem with the intermediates, I dont use them. So the html out put does'nt show and image, but does link to the correct image when you click the link.
Is there a way of getting the full size image dimensions and adding height= and width= to the final html to around half the size of the original?
I just want to save time typing and calculating the image everytime.
<img src=http://localhost/gallery/albums/wpw-20081231/ps3_screenshot14.jpg height=360 width=640>
Thanks,
Darron
Well, I Did a change, too, at the code of this plugin. Sorry for bumping, but I wanted to contribute on that.
Here is the $info section I've implemented on my cpg running this plugin..
$info['Embed URL'] = '<table cellpadding="0" cellspacing="1" border="0">';
$info['Embed URL'] .= '<tr><td>BBCode Normal</td></tr><tr><td><textarea name="bbcode" class="textinput" rows="1" cols="80%" wrap="off" style="overflow:hidden;height:15px;" onfocus="this.select();" onclick="this.select();">[url=' . $CONFIG["ecards_more_pic_target"] . 'displayimage.php?pos=-'.$CURRENT_PIC_DATA['pid'].'][img]' . $CONFIG["ecards_more_pic_target"].get_pic_url($CURRENT_PIC_DATA, 'normal').'[/img][/url]</textarea></td></tr>';
$info['Embed URL'] .= '<tr><td>BBCode thumb:</td></tr><tr><td><textarea name="bbcode" class="textinput" rows="1" cols="80%" wrap="off" style="overflow:hidden;height:15px;" onfocus="this.select();" onclick="this.select();">[url=' . $CONFIG["ecards_more_pic_target"] . 'displayimage.php?pos=-'.$CURRENT_PIC_DATA['pid'].'][img]' . $CONFIG["ecards_more_pic_target"].get_pic_url($CURRENT_PIC_DATA, 'thumb').'[/img][/url]</textarea></td></tr>';
$info['Embed URL'] .= '</table>';
It makes a bbcode link to the actual Picture ID and it has two choices: thumbnail and normal picture.
Also there is a cosmetic change, based on relative size.
Might be a bad coding (I was never a coding expert) but it does the work for me ;)
Anyone know if this will work for 1.5x? I didn't one for 1.5x so thought I would ask if anyone use it for 1.5x.
If you want a version for 1.5.x then you will need to search the boards or code it.