forum.coppermine-gallery.net

Support => cpg1.4 plugins => cpg1.4.x Support => Older/other versions => cpg1.4 plugin contributions => Topic started by: wperry1 on August 15, 2007, 09:13:35 pm

Title: HTML Embedding Plugin
Post by: wperry1 on August 15, 2007, 09:13:35 pm
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.
Title: Re: HTML Embedding Plugin
Post by: cyberboy on August 16, 2007, 06:44:48 am
Hi ... can it be generate to bbcode as well? thanks...
Title: Re: HTML Embedding Plugin
Post by: Joachim Müller 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.
Title: Re: HTML Embedding Plugin
Post by: wperry1 on August 16, 2007, 04:11:55 pm
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
Title: Re: HTML Embedding Plugin
Post by: Joachim Müller on August 16, 2007, 07:55:18 pm
copy/ paste bbcode img URL below intermediate image v1.1 (http://forum.coppermine-gallery.net/index.php?topic=36302.0)
Title: Re: HTML Embedding Plugin
Post by: Davide Renda on August 19, 2007, 11:48:55 am
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.
Title: Re: HTML Embedding Plugin
Post by: 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.

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
Title: Re: HTML Embedding Plugin
Post by: 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?
Title: Re: HTML Embedding Plugin
Post by: wperry1 on September 04, 2007, 03:21:53 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.

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.

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
Title: Re: HTML Embedding Plugin
Post by: lifter on September 04, 2007, 04:44:50 pm
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!  :-\
Title: Re: HTML Embedding Plugin
Post by: 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?

My coppermine link http://photo.sikod.com (http://photo.sikod.com)
Title: Re: HTML Embedding Plugin
Post by: wperry1 on September 13, 2007, 09:51:26 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
Title: Re: HTML Embedding Plugin
Post by: lifter on September 14, 2007, 02:40:20 am
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
Title: Re: HTML Embedding Plugin
Post by: 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?
Title: Re: HTML Embedding Plugin
Post by: Joachim Müller on September 14, 2007, 08:44:23 am
With this plugin: not at all.
Title: Re: HTML Embedding Plugin
Post by: angsikod on September 14, 2007, 08:46:50 am
Well, anyway to resize the image?
Title: Re: HTML Embedding Plugin
Post by: Joachim Müller on September 14, 2007, 08:52:29 am
Using another mod/plugin: maybe. Unrelated questions should not be asked here. Only question related to this lpugin are allowed here.
Title: Re: HTML Embedding Plugin
Post by: wperry1 on September 14, 2007, 08:15:19 pm
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
Title: Re: HTML Embedding Plugin
Post by: Basetballjones on November 08, 2007, 12:56:18 am
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.
Title: Re: HTML Embedding Plugin
Post by: jaks on January 28, 2008, 04:48:04 pm
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?
Title: Re: HTML Embedding Plugin
Post by: bl4kdev1l on February 08, 2008, 06:23:22 pm
this plugin doesnt work for me i dont know why :S
Title: Re: HTML Embedding Plugin
Post by: Joachim Müller on February 08, 2008, 08:23:36 pm
Meaning what? Not a valid report nor is your reply a valid support request. ::)
Title: Re: HTML Embedding Plugin
Post by: nazcarpine on July 27, 2008, 08:05:55 am
Thanks.. this is great plugin. I am using it right now to my site. :)
Title: Re: HTML Embedding Plugin
Post by: 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.
Title: Re: HTML Embedding Plugin
Post by: Scott O on September 08, 2008, 10:33:08 pm
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.
Title: Re: HTML Embedding Plugin
Post by: brandon0007 on January 08, 2009, 01:01:29 pm
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
Title: Re: HTML Embedding Plugin
Post by: Deus on January 08, 2009, 06:15:54 pm
Code: [Select]
$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.
Code: [Select]
<img src=http://localhost/gallery/albums/wpw-20081231/ps3_screenshot14.jpg height=360 width=640>Thanks,
Darron
Title: Re: HTML Embedding Plugin
Post by: Cmaniac on July 05, 2009, 01:51:14 pm
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..

Code: [Select]
$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 ;)
Title: Re: HTML Embedding Plugin
Post by: wutacrock on January 21, 2011, 03:52:07 am
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.
Title: Re: HTML Embedding Plugin
Post by: Phill Luckhurst on January 21, 2011, 04:56:22 am
If you want a version for 1.5.x then you will need to search the boards or code it.