Forum Search:
phpHtmlLib
Fast Uncompromising Discussions. FUDforum will get your users talking.

Home » phpHtmlLib » Development » Customise path problem and probably solution
Customise path problem and probably solution Wed, 18 January 2006 21:37
alucard  is currently offline alucard
Messages: 2
Registered: December 2005
Newbie

From: *uac69.hknet.com
Hi all.

I am now using phphtmllib 2.5.4. This project make a very interesting suggestion that, the whole extraced folder: phphtmllib should be placed in root directory to make the whole library work.

However, for some reasons I cannot put this folder under root dir. What I did is I create a folder for my project, place the phphtmllib under this folder. This project is a subdir for my root web site. To make things clear, here is the pic:

root website
|
|--myProject
|
|--phphtmllib
| |
| |-css
| |
| |-widgets
|
|--index.php

However, when I start using CSS which this library provided, the path to some CSS picture and .css file are not found (). i.e. the path isn't correct.

After digging into the phphtmllib library, I found that the following help:

1. BaseWidgets::set_image_path_prefix(<the_CSS_path>)
This method can be used to set the image path which the widget use, which is by default: /phphtmllib/image/widgets (searching in root directory, which is not correct)

2. phphtmllib/css/local_includes.inc
This file is, by default without any method which can change it and can only edit it directly, pointing to ALSO the root directory. What I did is changing this 3 lines (actually only add 1 line):

//$doc_root = $_SERVER["DOCUMENT_ROOT"];
//$phphtmllib = $doc_root."/phphtmllib";
$phphtmllib = "../../phphtmllib";

Then, I did both the above 2 to make everything work! CSS is also OK now.

Hope my experience will help those who don't want to put the library under root but in other place.

All in all, I think the assumption of putting phphtmllib under root is not always work. Wish the coming version of phphtmllib will change this.
Previous Topic:and Rich text fields
Next Topic:FormElement->create_element_name()
Goto Forum:
  


Current Time: Wed Jun 19 04:29:24 PDT 2013

Total time taken to generate the page: 0.25955 seconds
.:: Contact :: Home ::.

Powered by: FUDforum 3.0.0.
Copyright ©2001-2009 FUDforum Bulletin Board Software