Problem with the basel url in php directory - javascript

I have a problem
i have a index.php in that index
i link a
includes/meta.php
file. in that file i have style .css files and jquery .js files.
i have also
index.php
and a about/index.php
when i link the css from the include/meta.php to index.php the link works,
<link href="vendor/css/style-front.css" type="text/css" rel="stylesheet" />
but does not work in this about/index.php directory
Why?
Someone here for a solution to fix this ?
i have tried this
<link href="http://localhost:8888/vendor/css/style-front.css" type="text/css" rel="stylesheet" />
this works with the localhost:8888
but how fix this with like
<?php
print "<link href='{$base_url}vendor/css/style-front.css'/>";?>
Anyone here ?

Related

Script and css linking

when my index at here
the script url was
<link rel="stylesheet" type="text/css" href="../jquery.fullPage.css" />
<script type="text/javascript" src="../jquery.fullPage.js"></script>
when i move the index file to front folder > untitled 3
which is here
and the url change to
<link rel="stylesheet" type="text/css" href="jquery.fullPage.css" />
<script type="text/javascript" src="jquery.fullPage.js"></script>
but it dint work.
Even the link use browse and select the script file and url given by the system
help~
is that any setting need to change

jsp dont load css and scripts after deploy

I am trying to deploy a java jsp application, but the view not charge .css and .js files, as I can fix this?
the file structure is as follows:
-Project
-META-INF
-WEB_INF
-resources
-CSS
-scripts
-administracion
-control
-inicio
Your could add lines given below:
<script type="text/javascript" src="resources/scripts/your_js_file.js"></script>
<link rel="stylesheet" type="text/css" href="resources/CSS/style.css" />
Add this line in your jsp
<script type="text/javascript" src="scripts/your_js_file.js"></script>
<link rel="stylesheet" type="text/css" href="css/style.css" />
scripts and css are folders outsideWEB-INF and contains .js files and .css files respectively
logically he called .css and .js files from the JSP.
when I'm editing the project work perfectly, but do not load the deployment
<link href="../resources/css/bootstrap.css" rel="stylesheet" type="text/css"/>
<link href="../resources/css/colors.css" rel="stylesheet" type="text/css"/>
<script src="../resources/scripts/jquery.js" type="text/javascript"></script>
<script src="../resources/scripts/bootstrap.js" type="text/javascript"></script>

Minify css and js with PHP compression script in Wordpress child-theme

I want to use next PHP script to serve combined, pre-gzipped and minified JS and CSS files. source code is available here: https://code.google.com/p/compress/
There is a WAMP localhost with wordpress installed.
And what I have done:
added three files (jsmin.php, cssmin.php, compress.php) in child-theme's
folder;
added directory 'min' in child-theme folder;
created file 'compress_timestamp.php'
added code below into header.php (tried functions.php then tried first line
of header.php)
require_once('compress_timestamp.php'); //load timestamp created by compress.php module sets field $compress_stamp=unix_timestamp
if (stripos($_SERVER['HTTP_ACCEPT_ENCODING'],'GZIP')!==false)
$gz='gz';
else
$gz=null;
echo '<link rel="stylesheet" type="text/css" href="min/css_schedule_'.$compress_stamp.'.css'.$gz.'" />',PHP_EOL;
// the following scripts were combined into css_schedule
// echo '<link rel="stylesheet" type="text/css" href="CSS/menu.css" />',PHP_EOL;
// echo '<link rel="stylesheet" type="text/css" href="CSS/ThreeColumnFixed.css" />',PHP_EOL;
// echo '<link rel="stylesheet" type="text/css" href="CSS/sprite.css" />',PHP_EOL;
// echo '<link rel="stylesheet" type="text/css" href="CSS/iCal.css" />',PHP_EOL;
changed lines accordingly to child-theme and parent folders:
echo '<link rel="stylesheet" type="text/css" href="style.css" />',PHP_EOL;
echo '<link rel="stylesheet" type="text/css" href="../twentyfourteen/style.css"
What was missed and what is the right way to make it work?
And finally when all is done how to launch that script remotely on XAMP (VPS)?
There is a really good WordPress plugin, called JCH Optimize, that minify css and javascript. Its very easy to install. It has both a free and paid version that comes with a ton more features that can be used to speed up your wordpress site. They also support Joomla.
The support for it is really good too.

Shadowbox not working once loaded to server

Shadowbox will not work once I publish my page via yahoo sitebuilder and load in either google or ie. I don't understand why. Maybe it's in the code:
HTML for the page head:
<link rel="stylesheet" type="text/css" href="C:\Users\Jason\sitebuilder\sites\UltimateFinishAutoDetailing\files\shadowbox\shadowbox.css">
<script type="text/javascript" src="C:\Users\Jason\sitebuilder\sites\UltimateFinishAutoDetailing\files\shadowbox\shadowbox.js"> </script>
<script type="text/javascript">
Shadowbox.init();
HTML for the element on the page (where i have a thumbnail that is supposed to,once clicked, pop up in shadowbox. For some reason though, it opens up in another page without shadowbox.):
<a href="images/IMG00248-20110527-17522.jpg" rel="shadowbox">
<img src="sitebuilder/images/IMG00248-20110527-17522-100x75.jpg">
</a
Your js and css (C:\User..) are pointing to local paths, it will not work on server. use url or relative paths if the files are in server.
Upload the css and js and keep it in same server folder and work like this ...
<link rel="stylesheet" type="text/css" href="shadowbox.css">
<script type="text/javascript" src="shadowbox.js"> </script>
OR if u have url's then use them on src & href accordingly.

grails: Href and Src to Subfolder not working

i have the files inside the folder lib\Responsive
How to link this inside the GSP file?
i have used the following code but its not working:
<script type="text/javascript" src="/lib/Responsive/Responsive.min.js"></script>
<link rel="stylesheet" href="/css/tablestyle.css"/>
i hope it should be from static folder how to refer ?
<link rel="stylesheet" href="${resource(dir:'css',file:'tablestyle.css')}" />
If css file under wep-app/css/tablestyle.css
.

Categories