[kdewebdev-site] Problem with the site layout
Eric Laffoon
sequitur at easystreet.com
Tue Mar 1 13:36:46 EST 2005
On Tuesday 01 March 2005 08:54 am, Andras Mantia wrote:
> Hi,
>
> I'm trying to create a kallery homepage that follows the current
> layout, but have some problems. applib.php contains rules that should
> grab the common files (CSS and PHP files) from the main kdewebdev site:
> if ($_SERVER["HTTP_HOST"] == "kallery.kdewebdev.org") {
> $_libpath = "/home/kdewebdev/public_html/include/";
> $_imgmain = "/home/kdewebdev/public_html/images/";
> $_css = "/home/kdewebdev/public_html/css/";
> $_mainsite = "http://kdewebdev.org/";
> $_quanta = "http://quanta.kdewebdev.org/";
> $_kallery = "http://kallery.kdewebdev.org/";
> $_kommander = "http://kommander.kdewebdev.org/";
> $_kxsldbg = "http://kxsldbg.kdewebdev.org/";
> $_kime = "http://kimagemapeditor.kdewebdev.org/";
> $_kfr = "http://kfilereplace.kdewebdev.org/";
> $_kls = "http://klinkstatus.kdewebdev.org/";
> }
> include_once ($_libpath."left.inc.php");
>
> With the above code, nothing is found, the layout is totally broken. If
> I use
> $_css = "http://kdewebdev.org/css/";
>
> The CSS file is found, but the pictures used in the CSS file are not.
> Example from there:
> background-image:url("../images/page/bg_line_.gif");
>
> I suppose if I change the url to
> background-image:url("http://kdewebdev.org/images/page/bg_line_.gif");
> it will work.
>
> But this will not solve the problem with the common PHP files. How can
> we do that
> include_once ($_libpath."left.inc.php");
>
> always includes the left.inc.php from the main kdewebdev?
>
> Andras
>
> PS: Of course locally works this, as the applib.php has an "else" part
> where relative paths are used.
Sorry, I was working to fix this last night and fell asleep. Also lately I
seem to need a vacation as I have had some brain fade. For instance trying to
figure out why my new function cased an error on the line with
$in_array(currentPage(),$left_Logo_kh_pages)
Of course the accidental "$" was the error. :-(
In some private discussions mention was made that the http reference for CSS
might have a problem. In fact I am not sure what I missed in not uploading
things but I actually created a file (cssimage.php) in my delusional
confusion and desperation that is going to be removed. The problem I had
uploading however was solved. I deleted the upload profile and recreated it
and now it works fine. Who knows what the problem was, but now I can upload
the project and stop getting screwed up.
So I have fixed the problem for including kallery and other subdomains. This
is handled by the domain local file applib.php and you simply set the
application variable $_application. The working example is in the kommander
subdomain. It needs to be duplicated for all subdomains. As to questions
about how and what it's doing, the comments in the file should explain. In
simple terms the server configuration and security introduces issues for
sharing files with subdomains and soft linking on the server would require
all developers to do so with their test bench.
I will post an active do list shortly. WRT kallery, it's part of the
applications here but not part of the official kdewebdev packages. Should we
put it on the main menu?
More information about the kdewebdev-site
mailing list