Php photo gallery TWG | JFUploader | TWG Flash upload | WFU | Forum

Get help for TinyWebGallery, the best image gallery. The forum is also home for the Joomla JFUploader, TWG Flash Uploader and the Wordpress flash uploader.
It is currently 1. Oct 2022, 20:48

This forum is readonly now. Please use the new forum if you don't find the answer to your question here. The new forum is at https://www.tinywebgallery.com/blog/forum/


All times are UTC + 1 hour [ DST ]




Post new topic Reply to topic  [ 9 posts ] 
Author Message
 Post subject: Remotely hosted pictures
PostPosted: 22. Jul 2006, 01:44 
Hi,

I just installed the software, and I played a bit with it uploading local images and stuff. Now I want to use imageshack.us for hosting the pictures, and then show them with the script. The how-to for this is very sketchy, with a broken sentence, and 2 bullets. Only one of the bullets is explained. If I put the imageshack url in the urls.txt file, I notice that TWG takes a bit longer to display the first time, but then shows the folder containing the urls.txt empty. I don't know what to do, and it's a bit late to read source. Can you update the how-to or write it in full here please?

Thanks in advance!


Top
  
 
 Post subject:
PostPosted: 22. Jul 2006, 01:50 
I immediately have an update:

[~/www/twg] $ grep -r "url.txt" *
admin/.config/mimes.php: "urltxt" => array($GLOBALS["mimes"]["urltxt"],"txt.gif","\url.txt$"),
config.php:$url_file = "url.txt"; // new 1.3 - you can place your images on an extern http - on the local server are only some working images! This only works of fsocksopen is available. Please check the how-to!

Is there even code to use the url.txt file? I can see fsockcode with grep in inc/filefunctions.inc.php... but debugging at 2am is not fun :-)


Top
  
 
 Post subject:
PostPosted: 22. Jul 2006, 02:01 
I'm sorry for this stream of messages, but I've found that the how-to is correct in this view: the url.txt file does need to link to a page that contains links to .jp(e)g files, which are then downloaded. The delay in my viewing of the index file was the downloading of the jpeg to parse it for the "real" jpegs, and none were found. So I guess what I need to do is make a dummy page somewhere on my host, linking to the imageshack images (with real <a href> links), and then it should work.
Is there an easy way? Like in the "upload" box of the admin panel, a checkbox "upload to imageshack/others instead" with a dropdown box? ;-)

Cheers!


Top
  
 
 Post subject:
PostPosted: 22. Jul 2006, 02:59 
Offline
Site Admin
User avatar

Joined: 1. Aug 2005, 12:53
Posts: 11232
quite some text :).

What twg does with url.txt is to scan the url in the url.txt for link to jpg's.
I know that this is no the ultimate solution but i haven't found a bett er http solution yet (I had ftp in mind but not many people use this features and it would be a lot of work ...).

If there is a special treatment for imageshark (I have never used this) that makes sense plese let me know.

/Michael


Top
 Profile  
 
 Post subject:
PostPosted: 22. Jul 2006, 12:14 
Hi again,

here's my situation now: I understand how url.txt works and how it is used. I put a url in to an html page, which links to an image on www.imageshack.us. When I view the gallery, I see a black preview image, and upon clicking, no large image.

In the error log I get that the script tries to getimagesize from the url "http://www.<mywebhosthere>.org/<twg folder>/<htmlfile_with_links>.htm<url of imageshack picture>"
An example: http://www.google.com/twg/Testing/links ... yimage.jpg
This seems wrong.

Are you really sure the feature still works? I don't know how to debug a thing as horrid as image.php, with all its duplications and everything :shock:


Top
  
 
 Post subject:
PostPosted: 23. Jul 2006, 15:02 
Offline
Site Admin
User avatar

Joined: 1. Aug 2005, 12:53
Posts: 11232
Hi,

I'm pretty sure this features does work.

You can test it with the following url in url.txt:
http://twg.tw.funpic.de/pictures/Davos/

image.php is not quite easy but because it's only some big swiches not that hard either (And I have cleaned it up in my local build too ;).)
But the actual work is not done there!

TWG is scanning the html of the page where the remote images should be - normally this is only a files listing from a remote folder (paste the url above into your browser and you'll see).

What is the url you are using?
because the example below is of course wrong.
What TWG does is to scan for the images (*.jpg's there) and add these names to your url.txt url!! I your case this it totally nonsense because I think you have directly linked to the remote host images..

You would have to modify the function checkurl
in the inc/fielfunctions.inc.php that it would not return the url (that is added in from of the images) but an empty String !

/Michael


Top
 Profile  
 
 Post subject:
PostPosted: 24. Jul 2006, 14:00 
Offline
Site Admin
User avatar

Joined: 1. Aug 2005, 12:53
Posts: 11232
did you get it to work?

I'm just thinking to enhance this feature by checking each image if it is already a http ... link and then don't attach the prefix of the domain.

/Michael


Top
 Profile  
 
 Post subject:
PostPosted: 24. Jul 2006, 15:44 
Hello,

I've been looking at the code, it seems unwise to remove the "checkUrl" function by making it return an empty string. The code that needs tweaking I think would be in image.php, with the $remote_image variable. I won't touch it though, since you claim to have a more compact version of that code.
Your idea of checking if the links on the page of url.txt are full links or relative links is probably the best option. That way, people (like me) can store images everywhere on the internet and contain all links in just one html page.
You know the code better than I do, would it be an easy fix for you, or should I attempt a dirty patch just for myself? :)


Top
  
 
 Post subject:
PostPosted: 24. Jul 2006, 15:48 
Offline
Site Admin
User avatar

Joined: 1. Aug 2005, 12:53
Posts: 11232
I think the code is bad enough :). And simply returning "" does not work for all cases ;).

but one thing you can provide: The page you created and you are linking to. This would then be my testpage. You can send me the link by email if you like.

I'll add this then to 1.5

/Michael


Top
 Profile  
 
Display posts from previous:  Sort by  
Post new topic Reply to topic  [ 9 posts ] 

All times are UTC + 1 hour [ DST ]


Who is online

Users browsing this forum: No registered users and 1 guest


You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot post attachments in this forum

Search for:
cron
powered by phpbb | Datenschutz/ Privacy policy