How to implement watermarking of images in YII framework? - image

I want to watermark images at the time of uploading in yii.
Please anyone help me to do that.

If you want to write your own code for that just google "php watermark images" or something similar. You can find many examples here as well like:
Image watermarking in php
php watermark and save image
If you just want to use Yii extension for that just google "yii watermark" for example. It gave me this extension url:
https://github.com/zhdanovartur/yii-easyimage

Related

How can I grab the thumbnail from an external url, much like slack does?

without Embed library.
i'm using Laravel and Vue.js if there is way to get it in Vue.js that's really help full for me.
You can try and search for the og:image meta tag from the open graph protocol.
More info on the url below
https://ogp.me
You can use any html php parser
Here is an example of how its done with php
what is the best way to get og:image meta property
As i'm using Vue.js with laravel i found a solution in vue.js.
https://github.com/nivaldomartinez/link-prevue
it show the image as well as detail you can also edit it.

Playing video in website using codeigniter

I am using php codeigniter. I want to store youtube links of movie trailers in my database and when the user clicks on a thumbnail it should start playing in the website. Pleaseee someone give me idea how to implement this. Thanks in advance ...
check this integration of jquery and flowplayer it works good check here

How to set youtube thumbnail from youtube embed code as featured image in wordpress?

How to set external url of youtube thumbnail (not uploading it inside my site) of an youtube video from iframe embed code of youtube video?
Is it possible to make function which will pull external youtube thumbnail URL and set it as featured image from:
<iframe width="420" height="315" src="www.youtube.com/embed/gTp4sZtjHS" frameborder="0" allowfullscreen></iframe>
Do not ask about OEmbed or similar things, I think question is clear.
The format for pulling the large image from a YouTube video is this http://img.youtube.com/vi/A4a0xZMMlqE/0.jpg just replace "A4a0xZMMlqE" with the video id.
I think the easiest way to set this up would be to forget about using it as a featured image but just pulling it into the template dynamically.
So in your post, make a custom field that will hold the YouTube video ID and in the template do something like:
<img src="http://img.youtube.com/vi/<?php echo get_post_meta($post->ID,'youtubeId');?>/0.jpg"/>
Does that solve your problem?
Otherwise if you're looking at really making it the featured image then you're probably looking at developing a custom plugin: http://net.tutsplus.com/tutorials/wordpress/creating-a-custom-wordpress-plugin-from-scratch/ which will most likely make use of wp_insert_attachment
I also just found media_sideload_image which I wasn't aware of. It will pull an image from a URL (i.e. the youtube link above) and attach it to a post.

Docpad design considerations

I'm coming from a php/mysql background. I'm most familiar with the Kohana PHP framework and I'm trying to learn Docpad. I have a loose understand at this point and I've built out my first website and blog. Static content makes a lot of sense to me on Docpad.
I'm working on my photography site where I want to be able to upload new images to a portfolio. The backend needs to handle an uploaded high-resolution image and create several different copies at different resolutions of the image. My biggest question is how do I keep track of the image meta data that I want to display? Do I generate a physical file for each image that has all the particulars I want to track and use those files as my searchable database, much like how blog posts are setup?
Or should I go the route of using something like MongoDB to store image data there where it can be queried and plugged into a layout?
Regarding handling POST or GET data, should I be reading up on the express.js docs? I'm not really sure where to turn for that.
Wordpress uses TimThumb to re-size it's images: How does WordPress.com resize images dynamically?
Then there is this re-sizing library for node: node package for file attachments and image resizing
If you wanted to created like 3 different image sizes and use the backbone collection in DocPad, then you'd add your different re-sized images to those three different collections/folders. For access the images you might just be able to do it via it's file name. So when you copy, re-size and rename the image, in the rename step, concat the image size at the end, like: coolPhoto-med.jpg and then you could just do hard links to get to the image like /spring-collection/med/coolPhoto-med.jpg or you could use query engine to access them.
The file model has a meta attribute: https://github.com/bevry/docpad/blob/master/src/lib/models/file.coffee#L17
I've yet to learn how to use it yet though.
I know we chatted yesterday on #docpad IRC but I just wanted to answer you here too. If you do code something that re-sizes images for DocPad, please do consider putting it up on Github to share with the community.

Wordpress: Add / relate an image to a page

I’m looking for an easy and simple way to attach an image to a page. Right now I’m using Custom Fields where I insert the image path and then I have some PHP code in my page.php where it finds and displays the image but the people I’m creating the site for are having a seemingly hard time figure out how to do it right. So, I was wondering if there were any plugin available where you simply could select a image (possible from the media library) as the default page image and then be able to call something like get_page_image or some like that on the page?
Hope I’ve explained everything alright otherwise, please let me know.
Sincerely
- Mestika
This is what "Post Thumbnails" are used for. See http://codex.wordpress.org/Post_Thumbnails

Resources