

Public Member Functions | |
| image ($path, $prjName=Z_PROJECT_NAME) | |
| returns the Path to the Image | |
| javaScript ($path, $prjName=Z_PROJECT_NAME) | |
| returns the Path to the javascript File | |
| css ($path, $prjName=Z_PROJECT_NAME) | |
| returns the Path to the CSS | |
| vbScript ($path, $prjName=Z_PROJECT_NAME) | |
| returns the Path to the VB Scripts | |
| uploadedImage ($path, $prjName=Z_PROJECT_NAME) | |
| returns the Path to the Uploaded Image | |
| downloadedImage ($path, $prjName=Z_PROJECT_NAME) | |
| returns the Path to the Downloadable Image | |
e.g. shared::image('file.png') wil return a String Like /zigmoyd/projects/main/path/to/file.png. a Shared Content belongs to a project so its expected that all shared contents resides in usr/share directory of your project's directory. like all images resides in usr/share/pix, all javascripts resides int usr/share/scripts/js directory. all stylesheets resides in usr/share/css Directory.
Now Loading it has nsimple too.in your css you used to code background: boring/image/path.png; before and now you will code it like this.
background: shared::image('imageName.png');
background: /path/to/usr/share/pix/imageName.png But when you prepend an ? or an </tt> symbol with it it will use smart url system by hiding the original path to image.
for Shared Content routing Zigmoyd actually uses a script called rt.php you will find it on yor Zigmoyd Installation directory. when ? or an </tt> symbol is used it uses rt.php to serve the content . e.g. it specifies the file name and type to rt.php as an get request and rt.php delivers that shared content. so if you use shared::image('?imageName.png'); or shared::image('.png'); the original path to the image will be kept hidden.
and If you use ? it will not utilize rewrite engine. else if </tt> is used it will utilize rewrite engine.
Definition at line 46 of file shared_helper.php.
| shared::image | ( | $ | path, | |
| $ | prjName = Z_PROJECT_NAME | |||
| ) |
returns the Path to the Image
| $path | string Path to the Image (relative to usr/share/pix Directory) | |
| $prjName | string Optionally If you specify a project You can use Contents from that Projects |
Definition at line 54 of file shared_helper.php.
References Z_PROJECT_DIR.
00054 { 00055 if($path[0] == '?') 00056 return pathinfo($_SERVER['SCRIPT_NAME'], PATHINFO_DIRNAME)."/rt.php/$prjName/p/".substr($path, 1, (strlen($path)-1)); 00057 elseif($path[0] == '@') 00058 return pathinfo($_SERVER['SCRIPT_NAME'], PATHINFO_DIRNAME)."/r/$prjName/p/".substr($path, 1, (strlen($path)-1)); 00059 else 00060 return pathinfo($_SERVER['SCRIPT_NAME'], PATHINFO_DIRNAME)."/".Z_DIR_PROJECTS."/".Z_PROJECT_DIR."/".Z_DIR_IMG."/".$path; 00061 }
| shared::javaScript | ( | $ | path, | |
| $ | prjName = Z_PROJECT_NAME | |||
| ) |
returns the Path to the javascript File
| $path | string Path to the JavaScript (relative to usr/share/scripts/js Directory) | |
| $prjName | string Optionally If you specify a project You can use Contents from that Projects |
Definition at line 69 of file shared_helper.php.
References Z_PROJECT_DIR.
00069 { 00070 if($path[0] == '?') 00071 return pathinfo($_SERVER['SCRIPT_NAME'], PATHINFO_DIRNAME)."/rt.php/$prjName/j/".substr($path, 1, (strlen($path)-1)); 00072 elseif($path[0] == '@') 00073 return pathinfo($_SERVER['SCRIPT_NAME'], PATHINFO_DIRNAME)."/r/$prjName/j/".substr($path, 1, (strlen($path)-1)); 00074 else 00075 return pathinfo($_SERVER['SCRIPT_NAME'], PATHINFO_DIRNAME)."/".Z_DIR_PROJECTS."/".Z_PROJECT_DIR."/".Z_DIR_JS."/".$path; 00076 }
| shared::css | ( | $ | path, | |
| $ | prjName = Z_PROJECT_NAME | |||
| ) |
returns the Path to the CSS
| $path | string Path to the JavaScript (relative to usr/share/scripts/css Directory) | |
| $prjName | string Optionally If you specify a project You can use Contents from that Projects |
Definition at line 84 of file shared_helper.php.
References Z_PROJECT_DIR.
00084 { 00085 if($path[0] == '?') 00086 return pathinfo($_SERVER['SCRIPT_NAME'], PATHINFO_DIRNAME)."/rt.php/$prjName/c/".substr($path, 1, (strlen($path)-1)); 00087 if($path[0] == '@') 00088 return pathinfo($_SERVER['SCRIPT_NAME'], PATHINFO_DIRNAME)."/r/$prjName/c/".substr($path, 1, (strlen($path)-1)); 00089 else 00090 return pathinfo($_SERVER['SCRIPT_NAME'], PATHINFO_DIRNAME)."/".Z_DIR_PROJECTS."/".Z_PROJECT_DIR."/".Z_DIR_CSS."/".$path; 00091 }
| shared::vbScript | ( | $ | path, | |
| $ | prjName = Z_PROJECT_NAME | |||
| ) |
returns the Path to the VB Scripts
| $path | string Path to the JavaScript (relative to usr/share/scripts/vbs Directory) | |
| $prjName | string Optionally If you specify a project You can use Contents from that Projects |
Definition at line 99 of file shared_helper.php.
References Z_PROJECT_DIR.
00099 { 00100 if($path[0] == '?') 00101 return pathinfo($_SERVER['SCRIPT_NAME'], PATHINFO_DIRNAME)."/rt.php/$prjName/v/".substr($path, 1, (strlen($path)-1)); 00102 if($path[0] == '@') 00103 return pathinfo($_SERVER['SCRIPT_NAME'], PATHINFO_DIRNAME)."/r/$prjName/v/".substr($path, 1, (strlen($path)-1)); 00104 else 00105 return pathinfo($_SERVER['SCRIPT_NAME'], PATHINFO_DIRNAME)."/".Z_DIR_PROJECTS."/".Z_PROJECT_DIR."/".Z_DIR_VBS."/".$path; 00106 }
| shared::uploadedImage | ( | $ | path, | |
| $ | prjName = Z_PROJECT_NAME | |||
| ) |
returns the Path to the Uploaded Image
| $path | string Path to the JavaScript (relative to the Upload Directory) | |
| $prjName | string Optionally If you specify a project You can use Contents from that Projects |
Definition at line 114 of file shared_helper.php.
00114 { 00115 return pathinfo($_SERVER['SCRIPT_NAME'], PATHINFO_DIRNAME)."/rt.php/$prjName/u/$path"; 00116 }
| shared::downloadedImage | ( | $ | path, | |
| $ | prjName = Z_PROJECT_NAME | |||
| ) |
returns the Path to the Downloadable Image
| $path | string Path to the JavaScript (relative to the Download Directory) | |
| $prjName | string Optionally If you specify a project You can use Contents from that Projects |
Definition at line 124 of file shared_helper.php.
00124 { 00125 return pathinfo($_SERVER['SCRIPT_NAME'], PATHINFO_DIRNAME)."/rt.php/$prjName/d/$path"; 00126 }
1.5.6