Register

If this is your first visit, please click the Sign Up now button to begin the process of creating your account so you can begin posting on our forums! The Sign Up process will only take up about a minute of two of your time.

Results 1 to 4 of 4
  1. #1
    Junior Member
    Join Date
    May 2017
    Posts
    1
    Member #
    56531

    What is considered a Local Folder?

    Recently I was laying out a sight which uses those automated drag and drop selections. I choose the Photo Gallery tool. All seemed well except it apparently would only write the code for a local folder. By a local folder in this case I mean a folder on the PC I was using to design and layout the webpages.

    It was writing code like href = "images/http://mywebsite.com/images/imagename.jpg" . It was also doing the same thing for the src= string as well.

    The response I got back from the software company was that the picture gallery tool was only for local sites and was using the "images/" prefix looking for a local folder.

    Now I am thinking who these days designs a website to only run on their local pc.

    Then this got me to wondering... Just what is a local folder?

    I mean if your designing a website and posting it up to a web-server and that server has on it your website code be it HTML or PHP or CSS or whatever and you have a subfolder on that webserver named "images" would that not be a local folder to the actual web-server.?

    Now I was told that the layout tool I was using was not designed to use direct links. What the hell? Since when can't you use a direct link to an actual image file that you want to display on your web page.

    Please open my mind and show me the error of my thinking regarding this local folder requirement.

    Thanks

  2.  

  3. #2
    Unpaid WDF Intern TheGAME1264's Avatar
    Join Date
    Dec 2002
    Location
    Not from USA
    Posts
    14,483
    Member #
    425
    Liked
    2783 times
    To answer this question first:
    Now I am thinking who these days designs a website to only run on their local pc.

    Me, for starters. I have a few reasons for doing this:

    1) Development work. Best way to test changes quickly.

    2) Intranet apps. I have a couple that I use for various things. Mind you, the data itself resides remotely.

    Mind you, I also recognize that I'm in the vast, vast minority.

    With regard to your software company's specific issue, this is one of the many, many unwanted and unintended side effects of using drag and drop software. You can't code, you can't adjust things, and you're limited to whatever the drag and drop software determines that you're limited to.
    I mean if your designing a website and posting it up to a web-server and that server has on it your website code be it HTML or PHP or CSS or whatever and you have a subfolder on that webserver named "images" would that not be a local folder to the actual web-server.?

    For the most part, yes. There are instances where the folder can exist outside of your actual web server structure, but those are few, far between, and strange.
    If I've helped you out in any way, please pay it forward. My wife and I are walking for Autism Speaks. Please donate, and thanks.

    If someone helped you out, be sure to "Like" their post and/or help them in kind. The "Like" link is on the bottom right of each post, beside the "Share" link.

    My stuff (well, some of it): My bowling alley site | Canadian Postal Code Info (beta)

  4. #3
    Junior Member codin's Avatar
    Join Date
    Mar 2017
    Location
    Cornwall, UK
    Posts
    21
    Member #
    56380
    Liked
    3 times
    The links they are using are best practice for all websites.

    If they created the link as "www.website.com/images/imagename.jpg" it would only work on "www.website.com"
    Using "/images/" < it will work on any website it is installed on, all they have to do is create an images folder and it will point towards it.

    I think the issue here might be that you are using external links and not relative links for your images.

    You only need to put the filename and extension for the image and place the image in a folder called images relative to the position of the gallery plugin.

    It's called relative link. You are trying to use absolute links.

    You will find most developers use relative links for compatibility, using absolute links would require them to change the code for the gallery for every single website it is installed on, where with a relative link it will work on everything.

    This is pretty common and a development best practice that nearly everyone uses.

  5. #4
    Unpaid WDF Intern TheGAME1264's Avatar
    Join Date
    Dec 2002
    Location
    Not from USA
    Posts
    14,483
    Member #
    425
    Liked
    2783 times
    Then I'm not most developers. I use absolute links for everything I do, and I have a very good reason for doing so: I develop locally on my desktop. I will set up IIS applications on my desktop along the lines of localhost/application/ and then I will code from there. I have a variable in either an include file or in the case of the .NET sites that I develop global.asax that detects the server that I'm using and then will assign the site, image, CSS, Javascript, and any other root paths. That will allow me to assign absolute paths to everything and avoid certain crawling issues caused by bots (in particular Googlebot) and by relative paths not being universal.

    This also comes in handy if I want to create a staging area for a client and they don't have the ability to (or don't want to) use a subdomain. They want to use a subfolder under their main domain for whatever reason. Yes, it happens and happens quite a bit.

    Point being: this isn't a "best practice" as such...like a lot of "best practices", it doesn't work in all cases.
    If I've helped you out in any way, please pay it forward. My wife and I are walking for Autism Speaks. Please donate, and thanks.

    If someone helped you out, be sure to "Like" their post and/or help them in kind. The "Like" link is on the bottom right of each post, beside the "Share" link.

    My stuff (well, some of it): My bowling alley site | Canadian Postal Code Info (beta)


Remove Ads

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  
All times are GMT -6. The time now is 10:35 AM.
Powered by vBulletin® Version 4.2.3
Copyright © 2019 vBulletin Solutions, Inc. All rights reserved.
vBulletin Skin By: PurevB.com