Jump to content
  • 0
Sign in to follow this  
Followers 0

Question

Posted

I'm trying to use a watermark that automatically adds the watermark image to the bottom of a post thumbnail automatically. I don't want it added on the image, but I want slapped right under it. Like 9GAG! :)

Anyone know anything about this?

Share this post


Link to post
Share on other sites

24 answers to this question

  • 0

Posted

Use CSS then.
[code]
.ImageDIv
{
position: relative;
}

.Image
{
padding-bottom:10px;
}

.Watermark
{
position: absolute;
bottom:0px;
right:0px;
}
[/code]

Share this post


Link to post
Share on other sites
  • 0

Posted

[quote name='n_K' timestamp='1359719658' post='595494268']
Use CSS then.
[code]
.ImageDIv
{
position: relative;
}

.Image
{
padding-bottom:10px;
}

.Watermark
{
position: absolute;
bottom:0px;
right:0px;
}
[/code]
[/quote]

I already have that by doing this:

[code]

#left .crop {
display: block;
overflow: hidden;
margin-top: -40px;
text-align: center;
}

#left .crop img {
margin: 40px auto 0;
}
[/code]

But I'm aiming for a WordPress PHP plugin that creates the watermark automatically. Not like Watermark reloaded though, because I don't wanted added on top of the image, but right under.

Share this post


Link to post
Share on other sites
  • 0

Posted

You don't need a plugin. A watermark is embedded in the image, where yes you'd need a plugin to do it.
Just add the code in between the loop where you get the post thumbnail.

What you want to do isn't really a job for a plugin, more of a theme feature.

Share this post


Link to post
Share on other sites
  • 0

Posted

[quote name='Mr.XXIV' timestamp='1359720706' post='595494288']
I already have that by doing this:

[code]

#left .crop {
display: block;
overflow: hidden;
margin-top: -40px;
text-align: center;
}

#left .crop img {
margin: 40px auto 0;
}
[/code]

But I'm aiming for a WordPress PHP plugin that creates the watermark automatically. Not like Watermark reloaded though, because I don't wanted added on top of the image, but right under.
[/quote]
http://php.net/manual/en/book.image.php
That has all you need to make said plugin.

Share this post


Link to post
Share on other sites
  • 0

Posted

[url="http://wordpress.org/extend/plugins/watermark-reloaded/"]http://wordpress.org/extend/plugins/watermark-reloaded/[/url]

Share this post


Link to post
Share on other sites
  • 0

Posted

[quote name='n_K' timestamp='1359721788' post='595494320']
[url="http://php.net/manual/en/book.image.php"]http://php.net/manua.../book.image.php[/url]
That has all you need to make said plugin.
[/quote]

It'll only just tell me the same thing Watermark Reloaded does in that manual.

[quote name='littleneutrino' timestamp='1359722737' post='595494348']
[url="http://wordpress.org/extend/plugins/watermark-reloaded/"]http://wordpress.org...rmark-reloaded/[/url]
[/quote]

I've had the pro version of Watermark Reloaded before, and it only adds the watermark on top of the image. I want it added under, just like 9GAG where it can be hidden until someone tries to take the image.

Share this post


Link to post
Share on other sites
  • 0

Posted

Do you want the watermark to still be a part of the image, just under it instead of overlaying it?

Share this post


Link to post
Share on other sites
  • 0

Posted

[url="http://wordpress.org/extend/plugins/hotlink2watermark/"]http://wordpress.org/extend/plugins/hotlink2watermark/[/url]

[quote name='palenous' timestamp='1359725729' post='595494422']
Do you want the watermark to still be a part of the image, just under it instead of overlaying it?
[/quote]

I think what they are looking for is a plugin that will not have a watermark on the image until it is either saved onto the client machine or linked out to another page. So on their own website it is not intrusive however, if you steal the image it will have a watermark.

Share this post


Link to post
Share on other sites
  • 0

Posted

[quote name='palenous' timestamp='1359725729' post='595494422']
Do you want the watermark to still be a part of the image, just under it instead of overlaying it?
[/quote]

I do, I don't want them separated. Check out the site http://wtfyo.com. That's what I'm working on. If you move or take the image to the desktop, you'll see the image, but that's only because I photoshopped that watermark on there and CSS'd it to be 40 pixels hidden by overflow & margin.

Another thing is, not only can there be uploads within the dashboard, I have to make sure this function works in a custom upload page.

Share this post


Link to post
Share on other sites
  • 0

Posted

Ok. So you want something like this: [url="http://myers.in/testing/test.php"]http://myers.in/testing/test.php[/url] but without the fading?

And then you can just set a containing div to the correct height with overflow:hidden; to make it appear as if there were no watermark.

Share this post


Link to post
Share on other sites
  • 0

Posted

Fixed the fading issue: [url="http://myers.in/testing/test.php"]http://myers.in/testing/test.php[/url]

Share this post


Link to post
Share on other sites
  • 0

Posted

[quote name='palenous' timestamp='1359727586' post='595494476']
Ok. So you want something like this: [url="http://myers.in/testing/test.php"]http://myers.in/testing/test.php[/url] but without the fading?

And then you can just set a containing div to the correct height with overflow:hidden; to make it appear as if there were no watermark.
[/quote]

YES! That's what I want! :D Of course, without the fade haha. I say built in instead of uploading with the watermark is much better and I can prevent images from being linked outside with .htaccess I suppose. :)

Share this post


Link to post
Share on other sites
  • 0

Posted

Alright. That's easy enough to do, but it will take a little bit of work to add compatibility for more than just '.jpg' images. What kind of images will you be displaying (.png, .jpg, etc.)? Also, if you could post a bit of the code where your image handling is done, that would be very helpful.

Share this post


Link to post
Share on other sites
  • 0

Posted

[quote name='palenous' timestamp='1359730866' post='595494636']
Alright. That's easy enough to do, but it will take a little bit of work to add compatibility for more than just '.jpg' images. What kind of images will you be displaying (.png, .jpg, etc.)? Also, if you could post a bit of the code where your image handling is done, that would be very helpful.
[/quote]

For now, just png & jpg. This is running on WordPress, so the image source is ran from [b]<?php the_post_thumbnail('full'); ?>[/b]. But I can get just the post thumbnail url instead of the <img> tag that it creates.

Share this post


Link to post
Share on other sites
  • 0

Posted

Well, this is probably something you would want to happen to the image as soon as it's uploaded. If it's just png and jpg, it shouldn't be very difficult at all, but I actually meant the code that handles the upload, not the code that displays the image after it's uploaded. If you would rather do this to the image per request, that is possible as well, but not as clean...

Share this post


Link to post
Share on other sites
  • 0

Posted

[quote name='palenous' timestamp='1359741143' post='595495024']
Well, this is probably something you would want to happen to the image as soon as it's uploaded. If it's just png and jpg, it shouldn't be very difficult at all, but I actually meant the code that handles the upload, not the code that displays the image after it's uploaded. If you would rather do this to the image per request, that is possible as well, but not as clean...
[/quote]

This is what I'll be using, I used to have it fully modified. It's basically a plugin that utilizes the custom post type and whatnot for WordPress.

Share this post


Link to post
Share on other sites
  • 0

Posted

Hm...what is the media_handle_upload() function in submit_user_images.php on line 171? I can't seem to find it and I believe that is where the image data is actually being handled.

Share this post


Link to post
Share on other sites
  • 0

Posted

[quote name='Mr.XXIV' timestamp='1359724916' post='595494402']
It'll only just tell me the same thing Watermark Reloaded does in that manual.

I've had the pro version of Watermark Reloaded before, and it only adds the watermark on top of the image. I want it added under, just like 9GAG where it can be hidden until someone tries to take the image.
[/quote]
You know what the actual idea of programming is, right? You learn how to code and make things do what you want. You seem to do the hacking idea, well not even that actually - more 'what I needs exist, I do not need to know how it works and cannot make any of it myself'... You will not get far like that in programming at all, in fact if you take a course in programming you'd fail the first test and be kicked out.
Bad programmers copy and paste.
Good programmers write their own code.
Great programmers write their own code, and recheck it and search/plan for areas that might have problems.
Programmers that are the bad link in companies and leave large gaping security holes and broken sites/features are those that don't even know what they're doing, and right now you fit into this category.

Making the watermark appear below the image on something that it overlays over the top is so simple that if you read the PHP GD guide (if you haven't then you shouldn't be doing [b]ANY[/b] manipulation of images at all in PHP) it'd be probably 2 lines of code that you'd change in the whole thing, and you'd know exactly what lines to search for too.

Share this post


Link to post
Share on other sites
  • 0

Posted

[quote name='palenous' timestamp='1359757286' post='595495652']
Hm...what is the media_handle_upload() function in submit_user_images.php on line 171? I can't seem to find it and I believe that is where the image data is actually being handled.
[/quote]

The image handles are still worked through WordPress' core. That's where I'd have trouble too.

[b]Function:[/b] http://codex.wordpress.org/Function_Reference/media_handle_upload

[quote name='n_K' timestamp='1359757580' post='595495662']
You know what the actual idea of programming is, right? You learn how to code and make things do what you want. You seem to do the hacking idea, well not even that actually - more 'what I needs exist, I do not need to know how it works and cannot make any of it myself'... You will not get far like that in programming at all, in fact if you take a course in programming you'd fail the first test and be kicked out.
Bad programmers copy and paste.
Good programmers write their own code.
Great programmers write their own code, and recheck it and search/plan for areas that might have problems.
Programmers that are the bad link in companies and leave large gaping security holes and broken sites/features are those that don't even know what they're doing, and right now you fit into this category.

Making the watermark appear below the image on something that it overlays over the top is so simple that if you read the PHP GD guide (if you haven't then you shouldn't be doing [b]ANY[/b] manipulation of images at all in PHP) it'd be probably 2 lines of code that you'd change in the whole thing, and you'd know exactly what lines to search for too.
[/quote]

Can you stop? Honestly, if this was plain PHP, I'd honestly work a little harder on it because It's more natural to code on, but this is WordPress, I have to comply with the core functions, nevertheless the security I have to ensure. I have priorities right now to build off what I can until I can refine what's most suitable for me.There's a reason why there's a community of developers. Real programmers help each other out.

Share this post


Link to post
Share on other sites
  • 0

Posted (edited)

[quote name='Mr.XXIV' timestamp='1359769551' post='595495940']
but this is WordPress, I have to comply with the core functions, nevertheless the security I have to ensure. I have priorities right now to build off what I can until I can refine what's most suitable for me.There's a reason why there's a community of developers. Real programmers help each other out.
[/quote]
You've listed 2 WP plugins that do it but don't position it correctly, I've linked you to the OFFICIAL PHP guide for how images are manipulated in PHP, if you had any clue about PHP you'd be able to read it and notice that you need to alter a few lines in the existing plugins to get what you want, it is NOT HARD, in fact it's VERY basic PHP-GD, the functions to search for are all listed on the page.
Don't say it's because it's wordpress, you can't do it when a simple solution exists. Try the simple solution instead of repeatedly bashing it and you might learn some PHP in the process.

EDIT: In fact, the [url="http://wordpress.org/extend/plugins/watermark-reloaded/"]http://wordpress.org...rmark-reloaded/[/url] plugin which was mentioned previously says it can already do this;
'Watermark outside picture'. Edited by n_K

Share this post


Link to post
Share on other sites
  • 0

Posted

[quote name='n_K' timestamp='1359770331' post='595495964']
You've listed 2 WP plugins that do it but don't position it correctly, I've linked you to the OFFICIAL PHP guide for how images are manipulated in PHP, if you had any clue about PHP you'd be able to read it and notice that you need to alter a few lines in the existing plugins to get what you want, it is NOT HARD, in fact it's VERY basic PHP-GD, the functions to search for are all listed on the page.
Don't say it's because it's wordpress, you can't do it when a simple solution exists. Try the simple solution instead of repeatedly bashing it and you might learn some PHP in the process.
[/quote]

The process is to add the watermark UNDER the image which creates a new size. Those plugins are just offset alignments. There are people who learned PHP through WordPress and the help of of programmers. Sometimes the book is just not quick enough.

Share this post


Link to post
Share on other sites
  • 0

Posted

[quote name='n_K' timestamp='1359770331' post='595495964']
You've listed 2 WP plugins that do it but don't position it correctly, I've linked you to the OFFICIAL PHP guide for how images are manipulated in PHP, if you had any clue about PHP you'd be able to read it and notice that you need to alter a few lines in the existing plugins to get what you want, it is NOT HARD, in fact it's VERY basic PHP-GD, the functions to search for are all listed on the page.
Don't say it's because it's wordpress, you can't do it when a simple solution exists. Try the simple solution instead of repeatedly bashing it and you might learn some PHP in the process.

EDIT: In fact, the [url="http://wordpress.org/extend/plugins/watermark-reloaded/"]http://wordpress.org...rmark-reloaded/[/url] plugin which was mentioned previously says it can already do this;
'Watermark outside picture'.
[/quote]

You do realize that's a "To-Do" list, right?

Share this post


Link to post
Share on other sites
  • 0

Posted

[quote name='Mr.XXIV' timestamp='1359823132' post='595496954']
You do realize that's a "To-Do" list, right?
[/quote]
*slaps self*
Apologies for not reading right.

Share this post


Link to post
Share on other sites
  • 0

Posted

[quote name='palenous' timestamp='1359757286' post='595495652']
Hm...what is the media_handle_upload() function in submit_user_images.php on line 171? I can't seem to find it and I believe that is where the image data is actually being handled.
[/quote]
[quote name='n_K' timestamp='1359831969' post='595497228']
*slaps self*
Apologies for not reading right.
[/quote]

So I revised the upload function so that it will directly post to the main taxonomies, additionally making them only pending so I can decide whether it's good or not. it utilizes the media function just like Watermark reloaded, so I think the upload & merge function will come pretty handy. :)

Share this post


Link to post
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!


Register a new account

Sign in

Already have an account? Sign in here.


Sign In Now
Sign in to follow this  
Followers 0

  • Recently Browsing   0 members

    No registered users viewing this page.