Need deverloper

bigu_c
bigu_c's picture

Joined: 2007-10-28
Posts: 421
Posted: Mon, 2012-12-03 14:23

Hi all,

I'm looking for who can do this for me: http://gallery.menalto.com/node/110104

If you can please PM me total price.

Thanks.

 
tempg

Joined: 2005-12-17
Posts: 1857
Posted: Thu, 2012-12-27 15:20

The issue in the post you linked is that we don't see what you want it to do.
When I click http://imgs.mi9.com/uploads/3d/4767/3d-design-widescreen-wallpaper_1920x1200_86320.jpg I get the image.

Are you saying that when you click it, you don't see the big image load in your browser?

Either way, if it's a redirect of some sort, it's doable.

 
bigu_c
bigu_c's picture

Joined: 2007-10-28
Posts: 421
Posted: Thu, 2012-12-27 15:24
tempg wrote:
The issue in the post you linked is that we don't see what you want it to do.
When I click http://imgs.mi9.com/uploads/3d/4767/3d-design-widescreen-wallpaper_1920x1200_86320.jpg I get the image.

Are you saying that when you click it, you don't see the big image load in your browser?

Either way, if it's a redirect of some sort, it's doable.

You can try this: http://mgs.mi9.com/uploads/landscape/4829/hd-landscape-wallpaper_1920x1080_88642.jpg

Thank you.

 
tempg

Joined: 2005-12-17
Posts: 1857
Posted: Thu, 2012-12-27 15:40

Same as before. A large image of a castle, water, clouds, etc.

 
bigu_c
bigu_c's picture

Joined: 2007-10-28
Posts: 421
Posted: Thu, 2012-12-27 15:45
tempg wrote:
Same as before. A large image of a castle, water, clouds, etc.

Sorry I don't understand you.

But what I want, why he can redirect http://mgs.mi9.com/uploads/landscape/4829/hd-landscape-wallpaper_1920x1080_88642.jpg

To the photo page contains it?

 
tempg

Joined: 2005-12-17
Posts: 1857
Posted: Thu, 2012-12-27 15:53
bigu_c wrote:
But what I want, why he can redirect http://mgs.mi9.com/uploads/landscape/4829/hd-landscape-wallpaper_1920x1080_88642.jpg

To the photo page contains it?

He doesn't. When I click the link, I get a big image in the browser window. That's it: No page, no html, no formatting; just the raw image.

If you wanted to do a redirect, it could be done, but it's site specific and I can't help you do that without access to your specific site and your specific setup.

 
floridave
floridave's picture

Joined: 2003-12-22
Posts: 27300
Posted: Thu, 2012-12-27 15:54

Normally a picture is worth a thousand words, but in your case it does not explain the behavior you are looking for.
Perhaps a good long user story is what you need to explain what you are trying to do.

This is what I _think_ you want to do:
http://www.langleycom.com/gallery3/index.php/dog
in the description there is a link to the full sized image. is that what you are after?

Dave
_____________________________________________
Blog & G2 || floridave - Gallery Team

 
tempg

Joined: 2005-12-17
Posts: 1857
Posted: Thu, 2012-12-27 15:58

@floridave: I think that he's trying to make it so that if you click the link you have in the description, it will still route you back to the photo page (that you were already on) so that no one can get to the full-sized image. I think that's what he's after.

 
floridave
floridave's picture

Joined: 2003-12-22
Posts: 27300
Posted: Thu, 2012-12-27 22:28

Lots of thinking here! :-)

Dave
_____________________________________________
Blog & G2 || floridave - Gallery Team

 
bigu_c
bigu_c's picture

Joined: 2007-10-28
Posts: 421
Posted: Fri, 2012-12-28 00:30
tempg wrote:
@floridave: I think that he's trying to make it so that if you click the link you have in the description, it will still route you back to the photo page (that you were already on) so that no one can get to the full-sized image. I think that's what he's after.

No,

I want this feature (option) to prevent hotlinking.

For example:

+ Here is my photo page: http://citywallpaper.org/Astana/Bayterek/Bayterek-Desktop-Astana-City-Kazakhstan-Wallpaper-1920x1200

If you click on resized photo, then it will open a new window for full-size photo.

+ But if you click on this link: http://citywallpaper.org/var/albums/Astana/Bayterek/Bayterek-Desktop-Astana-City-Kazakhstan-Wallpaper-1920x1200.jpg (direct on this forum), you will return to my homepage.

+ And, what I want is: it will redirect to above photo page.

Hope you understand me :D

 
tempg

Joined: 2005-12-17
Posts: 1857
Posted: Fri, 2012-12-28 14:28

@bigu_c_: Yes, as I said above, it can be done, but it's site specific. I'm assuming the links you provide are actually your site. That makes it even more the case that I really need to see your site code (really just the htaccess). Somewhere, there's already a redirect happening; that one needs to be modified/changed/deleted or any other redirects may not work as expected.

Having said that, you can try adding this to the bottom section of gallery's htaccess file:
<IfModule mod_rewrite.c>
Options +FollowSymLinks
RewriteEngine On
RewriteBase /
...
RewriteCond %{HTTP_HOST} !^citywallpaper.org$ [NC]
RewriteCond %{THE_REQUEST} (.*)\.((jpeg)|(jpg)|(png)|(gif))$
RewriteRule ^/var/albums/(.*)\.((jpeg)|(jpg)|(png)|(gif))$ http://citywallpaper.org/$1 [R=302,L]

RewriteCond %{REQUEST_FILENAME} !-f
RewriteCond %{REQUEST_FILENAME} !-d
...

EDIT: I'm not sure how big a deal search engine indexing is for you, but know that this will prevent Google Images, Bing Images, Yahoo!, etc from indexing the images in the "/var/albums" directory; they'll still pick up the pages (and maybe the resizes and thumbs), but not the images in the "albums" directory. You can work around that, but it gets a bit more involved and would likely defeat the purpose anyway.

floridave wrote:
Lots of thinking here!

And I was still wrong. Lol.

 
bigu_c
bigu_c's picture

Joined: 2007-10-28
Posts: 421
Posted: Fri, 2012-12-28 14:39

My current .htaccess content:

RewriteCond %{HTTP_REFERER} !^http://(www\.)?citywallpaper.org/.*$ [NC]
RewriteRule \.(gif|jpg|jpeg|png)$ http://citywallpaper.org/ [R=302,L]

This will redirect hotlinking to homepage.

But I want the better way is redirect to photo page contains that photo.

(I tried your code above but not working).

Thank you.

 
tempg

Joined: 2005-12-17
Posts: 1857
Posted: Fri, 2012-12-28 15:03

First, I mistyped (oops!); should have been:
<IfModule mod_rewrite.c>
Options +FollowSymLinks
RewriteEngine On
RewriteBase /
...
RewriteCond %{HTTP_REFERER} !^citywallpaper.org$ [NC]
RewriteCond %{THE_REQUEST} (.*)\.((jpeg)|(jpg)|(png)|(gif))$
RewriteRule ^/var/albums/(.*)\.((jpeg)|(jpg)|(png)|(gif))$ http://citywallpaper.org/$1 [R=302,L]
RewriteCond %{REQUEST_FILENAME} !-f
RewriteCond %{REQUEST_FILENAME} !-d
...

Second, if it doesn't work, you'll have to give me more than that for your htaccess content. Not sure what htaccess file that's in and not sure where it is within the file (and what else is there).

Third:

bigu_c wrote:
This will redirect hotlinking to homepage.

There are easier ways to stop hotlinking.

 
tempg

Joined: 2005-12-17
Posts: 1857
Posted: Sat, 2012-12-29 20:13

@bigu_c: I received your pm. The first thing I noticed is that you're putting the lines in the wrong place; you can't just add them to the bottom. Look at where I put them above. Secondly, if you're adding the lines I suggested, you also have to delete the redirect lines you had already added. Also, you left out a few parentheses. Try making the bottom section look like this and let me know what happens:

<IfModule mod_rewrite.c>
Options +FollowSymLinks
RewriteEngine On
RewriteBase /
RewriteCond %{HTTP_REFERER} !^citywallpaper.org$ [NC]
RewriteCond %{THE_REQUEST} (.*)\.((jpeg)|(jpg)|(png)|(gif))$
RewriteRule ^/var/albums/(.*)\.((jpeg)|(jpg)|(png)|(gif))$ http://citywallpaper.org/$1 [R=302,L]
RewriteCond %{REQUEST_FILENAME} !-f
RewriteCond %{REQUEST_FILENAME} !-d
RewriteRule ^(.*)$ index.php?kohana_uri=$1 [QSA,PT,L]
RewriteRule ^$ index.php?kohana_uri=$1 [QSA,PT,L]
RewriteRule ^index.php/(.*) $1 [QSA,R,L]
</IfModule>

 
bigu_c
bigu_c's picture

Joined: 2007-10-28
Posts: 421
Posted: Sat, 2012-12-29 23:28

I'm sorry but it's not working here :(

Do you test it on your side?

Thank you.

 
tempg

Joined: 2005-12-17
Posts: 1857
Posted: Sun, 2012-12-30 19:49

Also, you can try changing
RewriteRule ^/var/albums/(.*)\.((jpeg)|(jpg)|(png)|(gif))$ http://citywallpaper.org/$1 [R=302,L]

to
RewriteRule ^var/albums/(.*)\.((jpeg)|(jpg)|(png)|(gif))$ http://citywallpaper.org/$1 [R=302,L]

but not sure that should make a difference.

bigu_c wrote:
it's not working

You have to give me more to work with here. How exactly is it not working? What is this code doing (or not doing) to the URLs?

Did you replace the entire bottom section with the one above? (Best to just copy and paste it.)
Did you delete the lines you'd previously added below this section?

I tried to go to your site to see what's happening, but it's just re-routing back to the home page--meaning that you either put the old code back, or you made changes in addition to what I posted above.

 
bigu_c
bigu_c's picture

Joined: 2007-10-28
Posts: 421
Posted: Mon, 2012-12-31 01:06
tempg wrote:
@bigu_c: I received your pm. The first thing I noticed is that you're putting the lines in the wrong place; you can't just add them to the bottom. Look at where I put them above. Secondly, if you're adding the lines I suggested, you also have to delete the redirect lines you had already added. Also, you left out a few parentheses. Try making the bottom section look like this and let me know what happens:

<IfModule mod_rewrite.c>
Options +FollowSymLinks
RewriteEngine On
RewriteBase /
RewriteCond %{HTTP_REFERER} !^citywallpaper.org$ [NC]
RewriteCond %{THE_REQUEST} (.*)\.((jpeg)|(jpg)|(png)|(gif))$
RewriteRule ^/var/albums/(.*)\.((jpeg)|(jpg)|(png)|(gif))$ http://citywallpaper.org/$1 [R=302,L]
RewriteCond %{REQUEST_FILENAME} !-f
RewriteCond %{REQUEST_FILENAME} !-d
RewriteRule ^(.*)$ index.php?kohana_uri=$1 [QSA,PT,L]
RewriteRule ^$ index.php?kohana_uri=$1 [QSA,PT,L]
RewriteRule ^index.php/(.*) $1 [QSA,R,L]
</IfModule>

Hi,

I tried to replace my last 14 lines in bottom my .htaccess file with your code, clear all cache here but not working. Use can access direct image (hotlinking).

I also tried replace:
RewriteRule ^/var/albums/(.*)\.((jpeg)|(jpg)|(png)|(gif))$ http://citywallpaper.org/$1 [R=302,L]
By:
RewriteRule ^var/albums/(.*)\.((jpeg)|(jpg)|(png)|(gif))$ http://citywallpaper.org/$1 [R=302,L]

But nothing happen here.

Thanks for you help.

 
bigu_c
bigu_c's picture

Joined: 2007-10-28
Posts: 421
Posted: Mon, 2012-12-31 01:13

Hello,

I changed:

RewriteRule ^/var/albums/(.*)\.((jpeg)|(jpg)|(png)|(gif))$ http://citywallpaper.org/$1 [R=302,L]

To:

RewriteRule ^var/albums/(.*)\.(jpeg)|(jpg)|(png)|(gif)$ http://citywallpaper.org/$1 [R=302,L]

And everything work well now.

Thank you very much.