How to choose a specific thumbnail photo on like button - javascript

I have a webpage i keep adding a like button app to but whenever i click like i get some random member phot of a lady on facebook representing my page. this is frustrating.
I find all this html script and i cant seem to put it together properly so will you just please give me a simple paste ready like button formula with a set specific thumbnail photo that I can choose to represent my own page?

Use the open graph properties for your webpage defined here:
http://developers.facebook.com/docs/opengraph/

Related

How do I automate my workflow with Javascript to save bunch of images

I am trying to copy paste some stuff from some website which I want to automate. Here is my manual workflow:
There is a master webpage which contains set of links.
When I click on one of those links it opens another (say topic page) page with set of tabs.
I click on one specific of those tabs which loads a page containing several buttons with same html-css applied to them.
On click events of those botton calls a javascript function passing four integer parameters.
The function results in generating a separate popup window with some small content which I then print as pdf.
The issue is that the website blocks right click and text selection. And the popup window contains a image which I print as pdf by right clicking on titlebar and selecting print as pdf. When I checked the source of popup, I found that it uses
"data:image/png;base64,<source for image>"
as value for src of <image>.
Now the big question can I write some script which can run when either master page or topic page to automatically click on buttons on them and get those images saved either directly as png or pdfs? I am good at programming languages java, groovy, python, C#... Also explored javascript a lot. But that's many years ago and really lost in touch with JS. Can I do this with say greasemonkey or any other way. Any pointers (possibly detailed) will be helpful...Or even some small pseudocode which I can paste in console of topic page which will do all clicking of buttons and saving image from the popup, so that I don't have to do button-clicking-&-saving-image manually. This will also serve a lot since there are more buttons per topic page instead of number of topic pages themselves.
Update
Well I know this question is not at all specific, so here is my initial hurdles, since I have started to try it out:
given that I am programmatically call all those function on onclick events, how can I get hold of popups in source? That is, how can I reference the popup that is opened by function call in js?

adding a watermark only to target images (jquery)

I have a question regarding watermarks for images. For instance: I want to display an image (pure HTML). If a user clicks on the image however, there should be a watermark, showing where that photo comes from.
I was thinking about a layer-solution. Putting an invisible layer over the main image and link to another image instead. That would force me to have every photo two times on my server. Not the best idea.
I found a lib called watermark.js (link here: watermark.js).
However, this would only allow me to put watermarks right in the beginning.
To explain the situation: User on my site sees everything without watermark, opening it directly in the browser should add the watermark.
Another solution I had was to always apply a watermark via script, and remove it if the user is currently on my site.
Maybe you have a solution to apply watermarks only on the linked images. I'd like to realize it via jquery.
Thank you in advance.

Magento - Simple Configurable Products Extension

I'm using the Magento SCP extension to change various details on the product page when selecting an option in the configurable product.
I need to extend the functionality so that I can change the description, image etc when clicking on a thumbnail image instead of changing the list options.
As far as I can tell, the function that deals with the changing of product description etc is:
Product.Config.prototype.reloadPrice
I'm not sure how I can run this when I click on a thumbnail, what information do I need to pass to the function to run properly?
Take a look at this site I am working on, this is using bundle products. But I am just looking to get an idea of what you are trying to do..
Click on the individual products to see them load below your selection
Let me know if this is what you are looking to do and I can help guide you
Site Example
The site I am demonstrating is using a custom route I load via Ajax.
I figured it out in the end.
When changing the dropdown values from clicking on an image elsewhere in the page I need to run the following code:
spConfig.configureElement(element)
Where (element) is the Dropdown's ID which I stored in a VAR further up the page.

New page for each Image?

I'm currently working on a website that will have lots of pictures, using mostly only javascript and HTML. My website is going to have lots of images displayed on the home page, and when one is clicked on it will take the user to a page where it shows the image they clicked on, along with a share to Facebook button, a comments section, and a description.
The problem is my site is going to have a lot of image, and it would take forever to create a separate html file for every single one of those images. I do realize I could easily do this with javascript, however i really need each image to have a different url so that the share to Facebook button will work.
I looked at some other picture websites, and 9gag had exactly what i wanted on my site, each image had a number assigned to it in the url, whenever i clicked the next button all it did was change the number at the end of the url, except with 9gag the images are uploaded by users, so the site must somehow create another url each time someone uploads a new image, and I'm looking for a way to do this except I'm the one choosing all of the images.
Generally , the number in the URL is the the ID of the post stored in the database. These numbers are automatically assigned (assuming your ID is auto increment)
Index your picture's names into an array then post the variable in the url so that the page will display that image. Like showimage.html?image_path=picture1

Create multiple different CSS/Javascript pop-up

I'm looking for a way to create CSS/Javascript based pop-up windows. I'm fetching information from my database depending on how many (example) cars there is. I want to be able to create an equal number of CSS/Javascript based pop-up windows to each car I have in the database to show more information about the car in the pop-up.
The trick is - of course - that I want the right information about a certain car to show up when you click on the related link.
How do I solve this?
If you only ever want a popup to be open for one car at any given time, you can have a single popup element that you show/hide and reposition when they click on a link, then load the content for the specific car using AJAX.
If you want them to be able to open popups for multiple cars at any given time, dynamically generate a new popup element when they click on a link, position it correctly and then load the content for the specific car using AJAX.
I'd suggest using a Javascript framework (such as jQuery) because it will make the process considerably easier. There are also a number of plugins that you could look into using that perform this functionality.

Categories

Resources