Welcome Guest, Not a member yet? Register   Sign In
Assets Library Issue
#1

[eluser]Unknown[/eluser]
Hey, I am new the CI community, not new to PHP development.

I just started using the Assets Library and i have encountered a few issues.

Issue 1:
-------------------------------------------------------------------->>

Using the $this->assets->load('my_stylesheet.css');
When used with URL_SUFFIX which is set in CI config.php file, it produces a location in which the stylesheet will not load.

Link produced
"http://mywebsite/ci/index.php/assets/public.html/my_stylesheet.css"


-------------------------------------------------------------------->>

Issue 2:
-------------------------------------------------------------------->>

The default build of the Assets library, in the function display_header_assets()

I noticed that the function does not add the trailing slash "/" after the foldername when including a (JavaScript / StyleSheet).

In order to fix, i had to add the trailing slash to the output variable
** NOTE ** I cannot add the script Tags as its parsed out by the XSS filtering engine

I added - ."/" after the site_url("assets")

My variable now looks like this.
** NOTE ** Same added to the Script output.

$output .= "<link type='text/css' rel='stylesheet' href='".site_url("assets")."/".str_replace(".css",""$file)."/' />\n";

-------------------------------------------------------------------->>


If there is a more efficient way to do this, i mulled threw the config file for CI and the Assets file to try and find an alternate way of doing this.

Please understand I am a CI newbie. If there is any error's or reason's why this should not be done, please provide constructive criticism.

Thanks in advanced.
Nathan
#2

[eluser]Unknown[/eluser]
I think i have this thread in the wrong topic.




Theme © iAndrew 2016 - Forum software by © MyBB