[support] Referencing images / multimedia content

John Fletcher fletchnet at internode.net.au
Tue Feb 26 00:14:04 UTC 2008


Ernie,

I think you have misunderstood... I'm not concerned about modules, nor
actually about allowing non-technical users to upload pictures.

My issue is that I've designed pages in full HTML/CSS, naturally including
references to img files which exist on the page.  Where should I put my
images?  If I put them all in sites/sitename/files then it will work but if
I ever want to change the sitename or this path for some reason then all
links to my images from my content will be broken. 

This guy talks about the same problem:
http://drupal.org/node/53705#comment-246019

I think symbolic links is the way to go.  Then I have flexibility.

Regards,
John

-----Original Message-----
From: support-bounces at drupal.org [mailto:support-bounces at drupal.org] On
Behalf Of Earnie Boyd
Sent: Monday, 25 February 2008 2:41 AM
To: support at drupal.org
Subject: Re: [support] Referencing images / multimedia content

Quoting John Fletcher <fletchnet at internode.net.au>:

> Thanks Ernie,
>
> That's certainly a solution.  The main problem comes when you have
multiple
> Drupal instances off one code base... or you just want to change some
paths.
>

Not really a problem.  You put the module in 
sites/all/modules/5.x/mymod or sites/all/modules/6.x/mymod to affect 
all sites in your multisite.  If the module affects just one or two 
sites you put the module in sites/all/sample.com/modules/5.x/mymod, etc.

> One idea would be to use symbolic links on my file system... I found
another
> guy complaining about the same problem on the Drupal site and complaining
> that he had no better solution than symbolic links - which at least
> indicates that symbolic links is a solution.
>

I use symlinks.  I have the core of Drupal in one place and symlink the 
root of the site to it.  I also moved sites out of Drupal root and add 
a symlink for sites to the location I moved it because I also do have 
more than one version of Drupal installed and used.

> Just link /files/sitename (or whatever you like) to /sites/sitename/files/
>

Certainly works but isn't what the original post wanted to solve.

> John
>
> -----Original Message-----
>
> You could write a module that would hook the node and manipulate a
> marker [img:picfile].  The hook would apply the file_directory_path and
> what else was needed to replace [img:picfile].
>

This resolves the issue of ordinary users needing to input the IMG tag 
and have to format the correct path in the SRC argument.  The picfile 
is only the filename and not the file path in full.  The module would 
do its magic to correctly format the IMG with the proper SRC.

Earnie -- http://for-my-kids.com/
-- http://give-me-an-offer.com/

-- 
[ Drupal support list | http://lists.drupal.org/ ]



More information about the support mailing list