Git Product home page Git Product logo

Comments (8)

nickswalker avatar nickswalker commented on August 22, 2024

What exactly is breaking? Are the style sheets not loading?

from neuegal.

hakimihamdan88 avatar hakimihamdan88 commented on August 22, 2024

yes, css and images are not loading

from neuegal.

nickswalker avatar nickswalker commented on August 22, 2024

I forgot that Windows uses different directory separators, and it took me a while looking at that to realize something was wrong. According to this there's a PHP constant that can be used to get the correct separator for host system. I'll work on fixing this.

from neuegal.

hakimihamdan88 avatar hakimihamdan88 commented on August 22, 2024

(y)

from neuegal.

nickswalker avatar nickswalker commented on August 22, 2024

I've just tagged a new release to address this. Run a composer update and see if it's fixed.

from neuegal.

hakimihamdan88 avatar hakimihamdan88 commented on August 22, 2024

nope, but link is different now

 <link rel="stylesheet"  href="\C:\xampp\htdocs\neuegal\Sample Gallery\\custom-style.css" media="all" />

before

 <link rel="stylesheet"  href="/C:\xampp\htdocs\neuegal\Sample Gallery//custom-style.css" media="all" />

from neuegal.

nickswalker avatar nickswalker commented on August 22, 2024

Hmm. I don't have a Windows box/VM setup to test, but go ahead and try the latest dev commit. Make your composer.json file look like this:

{
"require": {
        "nickswalker/neuegal": "dev-develop"
    }
}

from neuegal.

primehalo avatar primehalo commented on August 22, 2024
function getURLFromPath($path)
{
    return DIRECTORY_SEPARATOR . str_replace($this->publicPathFromRoot, '', $path);
}

$this->publicPathFromRoot has mostly forward slashes with a backslash at the end whereas $path has all backslashes. Also, you're prepending DIRECTORY_SEPARATOR to a URL even though URLs always use forward slashes.

string(22) "C:/Webserver/Websites\"
string(64) "C:\Webserver\Websites\neuegal-master\Sample Gallery\Lavender.jpg"

2018-06-07 UPDATE

This is what I changed it to:

function getURLFromPath($path){
	$this->publicPathFromRoot = strtr($this->publicPathFromRoot, '\\', '/');
	$path = strtr($path, '\\', '/');
	return '/' . str_replace($this->publicPathFromRoot, '', $path);
}

from neuegal.

Related Issues (4)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.