Textpattern CMS support forum
You are not logged in. Register | Login | Help
- Topics: Active | Unanswered
Pages: 1
#1 2005-10-03 05:21:40
- Chief
- New Member
- From: Maleny, Queensland, Australia
- Registered: 2005-08-06
- Posts: 9
Can't Reference image by name.
Using Textpattern 4.0.1, I upload imagex.jpg and it gets renamed in the webserver file system to 7.jpg. Using the image tag doesn’t work unless I use 7.jpg If I reference it using imagex.jpg I get a broken link??
This is a test of trying to display an image:
1) <- doesn’t work
2) <- doesn’t work
3) <- doesn’t work
4) <- works
I don’t understand what the point is of giving a file a name if you can’t reference by it?
What am I missing.
Thanks
Offline
Re: Can't Reference image by name.
You aren’t missing anything. If you want to use file names you can but you will need to FTP them to your images directory and not use the built-in upload facility. You will also need to put your image links in manually and not use TXP tags.
Stuart
In a Time of Universal Deceit
Telling the Truth is Revolutionary.
Offline
#3 2005-10-04 04:28:29
- Mary
- Sock Enthusiast
- Registered: 2004-06-27
- Posts: 6,236
Re: Can't Reference image by name.
> “…what the point is of giving a file a name if you can’t reference by it?”
But I do think that images shouldn’t be numbered, but whatever name you want (and so you are responsible for not having collisions, just like if you didn’t use Textpattern), the links to both images and files output by tags should also use the name, rather than their id number in the table.
Offline
Re: Can't Reference image by name.
I agree with Mary. It is confusing, and not spiderbot friendly.
Last edited by Jeremie (2005-10-04 04:36:12)
Offline
Re: Can't Reference image by name.
I think it could be managed like that TXP can keep the image’s name and put a date and time after the name…So the chance of naming collision reduce to almost zero. So if you have a pic named like “blue_tulips.jpg”, it could be renamed by txp to blue_tulips_301120051855.jpg so SEs has its pic names, and everyone is happy :)
And in this case you can refer to the pic by its id, but the pic won’t be renamed inside the database to just a number.
Last edited by sipke (2005-11-30 18:00:42)
Offline
#6 2005-12-01 02:40:30
- Mary
- Sock Enthusiast
- Registered: 2004-06-27
- Posts: 6,236
Re: Can't Reference image by name.
An interesting idea, but that still means when you want to call it by name you’d have to enter “blue_tulips_301120051855.jpg” rather than “blue_tulips.jpg”. As mentioned, files keep their original names. But the image management existed long before the file management addition, explaining the difference of approach.
Offline
Re: Can't Reference image by name.
mary wrote:
As mentioned, files keep their original names. But the image management existed long before the file management addition, explaining the difference of approach.
But are called without the name of the file in the URL, and some PHP thingy spiderbots don’t seems to like. Not as bad as images, but still in need of tweaking/fixing.
Offline
#8 2006-01-04 10:19:38
- wmike1503
- Member
- Registered: 2006-01-03
- Posts: 11
Re: Can't Reference image by name.
Hi All,
A newbie here, I’m afraid.
I’m just getting my head around TextPattern [after having a look at PHP-Nuke – ugly!].
I am anable to view my images when testing on my local machine [using XAMPP].
Link example – [url]http://forum.textpattern.com/[/url]img src=“images/keyboardsmall.jpg” width=“150” height=“113”- this fails – no image, but the rest of the page displays fine.
If I reference to the image on my current website – no problem.
the images are all located in the correct image directory in my TextPattern installation.
Any ideas, please?
By the way – excellent to see a commitment to CSS in such a complex CMS model!
Regards,
Mike
Offline
Re: Can't Reference image by name.
If your TXP is in webserver root, try src"/images/xxxx"
. Or (or if it’s not in root), try src="../images/xxx"
.
Offline
#10 2006-01-04 11:28:50
- wmike1503
- Member
- Registered: 2006-01-03
- Posts: 11
Re: Can't Reference image by name.
Hi Jermie,
Thanks for the rapid response – both fail to resolve the problem, unfortunately.
Many thanks, anyway.
Mike
Offline
#11 2006-01-04 13:01:35
- zem
- Developer Emeritus
- From: Melbourne, Australia
- Registered: 2004-04-08
- Posts: 2,579
Re: Can't Reference image by name.
Mike,
Textpattern has nothing to do with <img ../>
tags, so the problem lies elsewhere. Most likely the URL is simply incorrect. There’s some info in the FAQ.
Alex
Offline
Re: Can't Reference image by name.
Can you precisely describe your folder organization under the public_html (or www/ or whatever) folder ? Where is the images/, where is TXP installed, where is the root, etc. ?
Offline
Pages: 1