| View previous topic :: View next topic |
| Author |
Message |
Jesse202
Joined: 07 May 2010 Posts: 150
|
Posted: Jan 04, 2011 2:20 am Post subject: Question on direct to image link |
|
|
Just wondering how we can supply direct links to the images without seeing the download page? Just the normal full size image. If you remove the _t on the image src you get the full size image. That's what I'm after
edit: I know you're given it once once you first upload the image, but I'm looking to show it on the download page with the other links.
If you use <TMPL_VAR image_url> like on the upload results page, you get a super long url that includes /cgi-bin, but for some reason on the upload_results page its a shorter url and clean looking. |
|
| Back to top |
|
 |
PowerChaos
Joined: 19 Dec 2009 Posts: 440 Location: belguim
|
Posted: Jan 04, 2011 10:49 am Post subject: |
|
|
because it is you
here is the code that you need to use
it is up to you to see how you can intregrate it
but now you got atleast the code you need to start messing around ( its in download1.html )
| Code: |
<TMPL_VAR image_url>
|
and this is for tumbnails
| Code: |
<TMPL_VAR thumb_url>
|
and here is a example , special for you to show that they work if you do it right
image code (see source)
hotlink code
http://download.boosterking.com/i/00002/rgqfmansvlte.gif
and tumbnail code
and tumbnail direct code
http://download.boosterking.com/i/00002/rgqfmansvlte_t.jpg
as you can see , it works good for me that way
and it is the only code i used (limited to premium users only to use hotlink and members only for tumbnails)
now it is up to you to intregrate it where you like it
Greets From PowerChaos |
|
| Back to top |
|
 |
Jesse202
Joined: 07 May 2010 Posts: 150
|
Posted: Jan 04, 2011 11:53 am Post subject: |
|
|
| When I use the image URL code on the upload result page it works just fine. I get a normal URL like that. When I out it on download1 I get a really long link that includes cgi-bin in it. It also starts a file download when you add it in the address bar |
|
| Back to top |
|
 |
PowerChaos
Joined: 19 Dec 2009 Posts: 440 Location: belguim
|
Posted: Jan 04, 2011 12:06 pm Post subject: |
|
|
you need to see at the direct image link that get generated to show the previeuw (before you press the download button )
| Code: |
<TMPL_IF image_url>
<p><img src="<TMPL_VAR image_url>" class="pic" alt="<TMPL_VAR file_name>" onLoad="scaleImg(this)" style="-ms-interpolation-mode:bicubic" GALLERYIMG="no"></p>
</TMPL_IF>
|
i use exact the same code as above , only mixed to fit into a tab
here is a example of what i use
| Code: |
<div class="tabbertab">
<h2>HotLink</h2>
<textarea id="ic5-<TMPL_VAR file_id>" style="width:98%;" cols=24 rows=3 onFocus="copy(this);"><TMPL_VAR image_url></textarea>
<div id="c5-<TMPL_VAR file_id>" class="btndiv"><TMPL_VAR lang_copy_clipboard></div>
</div>
|
but before using that code
can you give me a link to the site/image , so i can see where your image is coming from ??
as it takes exact the same link as the previeuw , and i only show that link as a link instead as a image
if the image shows a cgi dir then there is something wrong with your mod rewrite
i use 2 servers , 1 web and 1 file server , if you use the same server for both then you need to check mod rewrite
as all images get rewritten to the provided url (symlinks)
be sure that you enable hotlinking to on the script settings
| Code: |
Images mod Enabled [?]
Hotlink original image Enabled
|
else it will not work eather
it would help if you provide me a link in the first place , then i can check what is wrong or why you get super long url's
Greets From PowerChaos |
|
| Back to top |
|
 |
Jesse202
Joined: 07 May 2010 Posts: 150
|
Posted: Jan 04, 2011 6:56 pm Post subject: |
|
|
sure http://www.imgkeep.com
thanks for helping man. it all works fine on the upload result page. I even made another tab for direct link. I wanted to add the same tab on the download page. hotlinking and image mod is enabled. I'd imagine mod rewrite is working fine as it works on the one page. |
|
| Back to top |
|
 |
PowerChaos
Joined: 19 Dec 2009 Posts: 440 Location: belguim
|
Posted: Jan 04, 2011 7:33 pm Post subject: |
|
|
this is the link the script generate
| Code: |
<td><p><img src="http://imgkeep.com/cgi-bin/dl.cgi/3zthlxquzwfwkideuaqmjqyitgqvo2nam472i6yhrm/52c4df922c702e154e5f707d33c1b63c1240523375_full.jpg" class="pic" alt="52c4df922c702e154e5f707d33c1b63c1240523375_full.jpg" onLoad="scaleImg(this)" style="-ms-interpolation-mode:bicubic" GALLERYIMG="no"></p>
</td>
|
if you see it on my site , then you see that it shows this link instead
| Code: |
http://imgkeep.com/i/00005/pzyodm5nfqcn.jpg
|
so that is the link you will get back
as i can see , it points to dl.cgi ( not sure why )
so if you right click on it , it force to download
so if you use the code , it will show that download link instead and not the image hotlink
i see that you used a custom template , not sure if it is even version 1.8 because of the uploader i saw
then i noticed a EXTREME slow loading time because of the direct link ( it try to download instead showing a previeuw)
i see to that you use 1 and the same server for files/images
maybe it can have to do with that , that the script does not works like it need to be if you use only 1 server for both things
in my case i use 2 differend servers ( 1 webserver and 1 file server )
if you see my code , then it shows this
| Code: |
<p><img src="http://download.boosterking.com/i/00002/rgqfmansvlte.gif" class="pic" alt="hacking.gif" onLoad="scaleImg(this)" style="-ms-interpolation-mode:bicubic" GALLERYIMG="no"></p>
|
instead of your code
| Code: |
<p><img src="http://imgkeep.com/cgi-bin/dl.cgi/3zthlxquzwfwkideuaqmjqyitgqvo2nam472i6yhrm/52c4df922c702e154e5f707d33c1b63c1240523375_full.jpg" class="pic" alt="52c4df922c702e154e5f707d33c1b63c1240523375_full.jpg" onLoad="scaleImg(this)" style="-ms-interpolation-mode:bicubic" GALLERYIMG="no"></p>
|
dit you checked that you enabled the mod into the config file ( new serial in it , changed the settings you can find in the xfs.pm ?? )
as the problem is that it generate a download symlink instead the shortcut link
only thing i could try is to put the site itself on a other server and the script on a differend server so you got 2 servers , but not sure if that would even help
at this point i am almost sure that it have to do with how it generate the links , instead that it generate the shortcut link ( like your upload script) it start generating a download link
what kind of version are you using ?? (cant see it as catalogus is disabled)
1.6 ? 1.7 ? 1.8 ?
maybe there is something wrong in the script config ( dit you manual edited index.pm ?? dl.cgi or other related files that generate the symlinks ??)
the other posibility that you could try is to upload back the latest version and see if that solved the problem , if it does then just copy your templates over and see when it start to go wrong (be sure to check source code to see when it goes wrong)
thats all i can do at this moment to help you
else i need to check it for myself but then it is possible that i make a bigger mess of it (because i replace files to solve the problems , mainly it generate differend problems but it shows where the problem is that needed to be solved , differend way of working and it eliminates errors generated by users)
hopely this can help you a little better
Greets From PowerChaos |
|
| Back to top |
|
 |
Jesse202
Joined: 07 May 2010 Posts: 150
|
Posted: Jan 04, 2011 7:39 pm Post subject: |
|
|
hmmm. Its 1.8. Not even a custom template. Just changed some colors around is all and set the download page to be in tables to show ads on the top and side, but removed them.
hotlinking is on. Works fine on one page, but not the other. This is strange. I cannot see having the images on another server being any different.
Not sure why the server was so slow for a few minutes there. That's never happened before
never edited files that generate any links. Just the template files
and I don't host files. Just images
Last edited by Jesse202 on Jan 04, 2011 7:47 pm; edited 1 time in total |
|
| Back to top |
|
 |
PowerChaos
Joined: 19 Dec 2009 Posts: 440 Location: belguim
|
Posted: Jan 04, 2011 7:47 pm Post subject: |
|
|
just try to re upload everything from start ( dont forget to cmod) and then try it again to see if it works then
the other strange part i found was that download table
it shows a lot more tables then i have ( mine only shows a <p> </p> and yours shows <center> <table > <p> ... )
this is what it shows for you
| Code: |
</p>
</td>
<td>
</td></tr>
</table>
|
by me the table close at top before the image start
then the form ends like normal
maybe it can have something to do with that part that the script cant take the direct code of it , as it generates the download code instead ??
so like i say , try the default page and see if that could fix the problem or not
if it solves it , try to add your edits 1 per 1 , so add those ads on top and reload , test it again , does it fail , restart and check what you dit wrong with the code
if it fails with default setup , then i can not help anymore and then the admin need to take a look at your site as i do not got enouf knowledge of cgi to check where the error could be then
Greets From PowerChaos |
|
| Back to top |
|
 |
Jesse202
Joined: 07 May 2010 Posts: 150
|
Posted: Jan 04, 2011 8:02 pm Post subject: |
|
|
| PowerChaos wrote: | just try to re upload everything from start ( dont forget to cmod) and then try it again to see if it works then
the other strange part i found was that download table
it shows a lot more tables then i have ( mine only shows a <p> </p> and yours shows <center> <table > <p> ... )
this is what it shows for you
| Code: |
</p>
</td>
<td>
</td></tr>
</table>
|
by me the table close at top before the image start
then the form ends like normal
maybe it can have something to do with that part that the script cant take the direct code of it , as it generates the download code instead ??
so like i say , try the default page and see if that could fix the problem or not
if it solves it , try to add your edits 1 per 1 , so add those ads on top and reload , test it again , does it fail , restart and check what you dit wrong with the code
if it fails with default setup , then i can not help anymore and then the admin need to take a look at your site as i do not got enouf knowledge of cgi to check where the error could be then
Greets From PowerChaos |
oh you mean
<table>
<tr><td>
</td>
<td><p><img src="<TMPL_VAR image_url>" class="pic" alt="<TMPL_VAR file_name>" onLoad="scaleImg(this)" style="-ms-interpolation-mode:bicubic" GALLERYIMG="no"></p>
</td>
<td>
</td></tr>
</table>
there were ads between the <tr><td> but i removed them. kept the tags active in case I wanna throw some in again. Not sure where you see it being incorrect though
took out the tables, tried the original files, but to no avail. support going to be off a while too. |
|
| Back to top |
|
 |
Jesse202
Joined: 07 May 2010 Posts: 150
|
Posted: Jan 04, 2011 8:09 pm Post subject: |
|
|
OMG I got it lol "Show images instantly" has to be turned off lol
Thanks for all your help though
edit...nevermind. images wont show with that disabled, but it does give the link I wanted...
Last edited by Jesse202 on Jan 04, 2011 8:20 pm; edited 1 time in total |
|
| Back to top |
|
 |
PowerChaos
Joined: 19 Dec 2009 Posts: 440 Location: belguim
|
Posted: Jan 07, 2011 9:06 pm Post subject: |
|
|
i got the problem solved
i was having the same problem with my new server ( still need to transfer 300GB :S )
this is how you could solve it (atleast in my case)
cmod the I directory ( /home/user/www/i/ ) to 777
and be sure you use XFS 1.8 to get it to work
that solved my problem
only problem i currently have is that images are not generating like they should be (white image instead previeuw)
Greets From PowerChaos |
|
| Back to top |
|
 |
Jesse202
Joined: 07 May 2010 Posts: 150
|
Posted: Jan 09, 2011 9:40 pm Post subject: |
|
|
| I'll give this a shot later tonight. Thanks man |
|
| Back to top |
|
 |
PowerChaos
Joined: 19 Dec 2009 Posts: 440 Location: belguim
|
Posted: Jan 10, 2011 12:34 am Post subject: |
|
|
i solved the white image problem to
disable the anti DUPE system ( anti dublicates) and it shows the images perfect
but if you see a white image , then it is good to (is image in I Folder)
Greets From PowerChaos |
|
| Back to top |
|
 |
Jesse202
Joined: 07 May 2010 Posts: 150
|
Posted: Jan 10, 2011 7:47 pm Post subject: |
|
|
my folder is already 777  |
|
| Back to top |
|
 |
PowerChaos
Joined: 19 Dec 2009 Posts: 440 Location: belguim
|
Posted: Jan 10, 2011 10:10 pm Post subject: |
|
|
are you using XFS 1.8 ( yes that folder for second server to )
as i only got that error with version 1.6 and not with 1.8
please check the version or re upload the newest version and see if that solved the problem ( and disable anti dupe )
Greets From PowerChaos |
|
| Back to top |
|
 |
|