Drupal Image as image with link to a node - php

OK
I've actually spent 3 hours searching for how should I get images correctly on my drupal site so please don't get annoyed with this easy question. (sob...)
I want to upload an image to my front page as a button for redirecting to login page.
How CAN I achieve this?????I mean how should I store image as in Drupal and how can I get it in the position I want on the page???
I tried creating a content type called image and then created a View of block type but it doesn't seems correct to me.
What is the correct set of steps for storing and handling images in drupal??
Thanks

Create a block in your Drupal site and assign it to a region in the front page. Added the Image via PHP code there.

Related

Facebook doesn't display feature image from wordpress post

Recently I am facing a problems with one of my website. I have a website (http://www.sclrship.com) of wordpress that contain feature image and an image inside the post. But over last few days, I saw that while I try to post in facebook, it display "Database Error" instead of displaying image and description from post. For example if I want to share this link (http://www.sclrship.com/ias-sts-long-term-fellowship-programme-for-international-fellows-in-austria/) it will display Database Error.
On the other hand, if I share another post from shame website like (http://www.sclrship.com/eyes-high-doctoral-student-scholarship-for-international-students-at-university-of-calgary-in-canada-2015-2/), then it is displaying everything with image.
Any idea how to fixed this issue?

FB Share pop-up different window than what is posted

I'm new to using the FB share buttons terminology so forgive me if I use the wrong syntax in describing this.
My site is setup to load pages based on the passed parameters in the URL (...?page=somepage&imageid=idnum).
So I have my index file which contains my head, as well as sidebar, etc. Then my main body is generated according to the passed parameter. Simple Enough.
On the homepage, the main body is a gallery of images. When they click on one of those images it takes them to a page that just displays that one image. The page is loaded with parameters of ?page=detail&image_id=1 /*or whatever the id of that image is */
So when they click on the share on FB button on those individual images page, I would like it to populate with the image that is displayed on that page. What I have done is included a php file in my head tag. The php script included gets the page info and passed parameters and then fills out the image url based on the imageid.
echo '<meta property="og:image" content="http://www.chiseledimages.com/clients/vote/'.$imgurl.'"/>';
This works in that when displaying the page source, the meta tag with og:image shows perfectly, also in that when I run it through the FB Object debugger, it gets the correct image and doesn't show me any errors. It even posts the correct image when the users shares on their wall. What is does not do, is show the correct image in the pop window after the uses presses the share button on my site. So even though the result is what I want, the problem with the user not seeing the correct image in the share pop-up, may lead them not to want to share on their wall.
Current location of site: http://www.chiseledimages.com/clients/vote/
Example of a specific pages: http://chiseledimages.com/clients/vote/?page=detail&angel_id=1
Screenshots of pop-up with wrong image, but final posted story having correct image.
How can I make the image in the pop-up match the image that is going to be shared. Thanks.
Edit: I forgot to mention and I'm sure it matters that I'm using Addthis to implement the FB share.
Check https://developers.facebook.com/docs/reference/dialogs/feed/ - look for the 'picture' parameter description
I suggest to you use this http://support.addthis.com/customer/portal/articles/1365475-attribute-based-configuration#.UwPQB6LW6So. just follow their example and you good to go.

Fancybox image gallery with ratings and comments

I have a photo website which gathers images from a folder with PHP, displays their thumbnails on a page and, when clicked, opens a fancybox (fancybox.net) to display the full image. I am pretty satisfied with the result but as users start posting, they start asking for new features, and problems come out since I'm not a programmer. What I would like to do is a photo commenting/rating system (like the one on facebook to get the idea, but obviously not as complex): I've been trying to add a Disqus code to each picture, but it won't get displayed in my fancyboxes...So the question is, can you give me any (easy-to-implement) ideas on how to achieve this? I don't mind using already existing softwares like disqus for comments and polldaddy for ratings, since I guess it would require me to setup a mysql database to do it on my own...
To brief it again:
I have a "thumbs" folder which are gathered on a page.
I have an "originals" folder with the full size images that are called back by the fancybox.
I would like to have comments+rating in the fancybox.
Thanks in advance for any advice you can give me.
For your fancybox implementation I'm assuming that it's just pulling the image into the lightbox, not other content (i.e. a html page). What you'd need to do is set up a page which would grab an image, and output it along with your comments + rating code, then set up your script to use that page as the fancybox URL instead of a direct link to the image.
Without more information to go on I can't really help more than that.
ps for comments the Facebook Comments plugin might be easier for a non programmer to implement than Disqus.

Any way to make image (gd lib) show only on specific page only?

I'm trying to figure out the logistics for a new site that I'm creating, and one of the main issues is to get verification working correctly. One of the verification methods i'd like to incorporate is for a specific image (created via gdlib on the fly) to only work on a web page that is specified in a database field. If the image is shown on the EXACT page that is specified, then it shows the correct image, and if the link is incorrect, then it shows a different image (set by admin). The fields will be created on the admin side, and I'm trying to figure out how to get multiple instances of this working correctly. I'm using PHP and using a tag like [img src="something_here.php"] to show my images. Any suggestions on how to set the coding to verify the site that the image is embedded into?
Update So I got it working, but the request_URI command only works for the extension "ex. login.php", as opposed to adding in the absolute domain also. Any suggestions on how to make it factor in the whole domain address?
If you create an image with gd, you can put any PHP code on the page. for example: if ($_SERVER['REQUEST_URI'] == '/specialWebPage.php') { ... }.

Get website image from google via php

I'm working on a website for a specific client. And he wants to be able to add link to the website, and on mouse hover to have a image of that website appear.
Now, he doesen't want to take an image of the website, he only wants to input the link and have the website do everything else.
So my question is ->
Is there a way (eg. google API) to get a website image only by providing the url via php?
Sort of like in google, when you hover over a lik of a page, a tooltip pops up to the right with an image.
Any help is, as always, appriciated :)
Here is a list of 10 free thumbnail services
http://www.webresourcesdepot.com/10-free-website-thumbnail-generation-services/
You can simply refer to the URLs of these services, e.g.
<img src="http://SnapCasa.com/Get.aspx?code=[code]&size=[size]&url=[url]" />
or make a CURL call from one of your PHP scripts and temporarily store/permanently save the image that was generated.
Have recently developed Thumbnailspro.com. It is currently free to use while in beta testing as we work out the bugs, but so far its getting quite popular, you can request thumbnails directly from your website using the code below :
http://thumbnailspro.com/thumb/http://msn.com&s=150
s=Size, size can be anywhere from 10 to 1000 pixels just add s=300 to display a thumbnail 300 pixels in width. We are trying to add more options as we go for thumbnail requests and at the same time trying to keep it as simple as possible so you don't have to enter something like the code below to get your thumbnails :
http://somethumbnailsite.com/viewurl.php?url=http://msn.com&x=200&y=300&bwidth=1024&bheight=768&rotate=76&what_the_hell%20_is_all_this_crap!
So is much more effecient!
Like the service or have any bugs contact us at admin#thumbnailspro.com!
No. The only way to do this is to request the HTML for the page, render the page and then create a thumbnail from that page render. Google does this because in the process of spidering the web, they already get all that data, and they've got a nice optimized rendering engine (Chrome) that they can put the data through, and then they've got tons of online storage space to store the cached image. There's a lot of work there, though.

Categories