diff options
| author | Antonio Gallo <tonicucoz@gmail.com> | 2012-12-31 06:17:27 +0000 | 
|---|---|---|
| committer | Antonio Gallo <tonicucoz@gmail.com> | 2012-12-31 06:17:27 +0000 | 
| commit | 4ad856927ba7174a569b706340aebebfbf85e922 (patch) | |
| tree | 248b6c08376734f821d3ec09f95c88b21624c2e1 | |
| parent | b381d1188565cf2ed5a2fc8e0b634af282922d28 (diff) | |
improved the way the template is built 
27 files changed, 320 insertions, 63 deletions
| diff --git a/h-source/Application/Include/vendorTranslations.php b/h-source/Application/Include/vendorTranslations.php index 6d5eb53..45df63b 100644 --- a/h-source/Application/Include/vendorTranslations.php +++ b/h-source/Application/Include/vendorTranslations.php @@ -34,6 +34,7 @@ function betterVendor($string)  		"One-Laptop-per-Child-Non-Profit"	=>	"One Laptop per Child (Non-Profit)",  		"ZaReason-Inc"	=>	"ZaReason, Inc",  		"Blue-Light"	=>	"Blue Light", +		"Openpandora-Ltd"	=>	"Openpandora Ltd.",  	);  	return (array_key_exists($string,$exceptions)) ? $exceptions[$string] : $vendors->getFullName($string); diff --git a/h-source/Application/Views/Desktop/Contact/index.php b/h-source/Application/Views/Desktop/Contact/index.php index 8b5c101..9d4d806 100644 --- a/h-source/Application/Views/Desktop/Contact/index.php +++ b/h-source/Application/Views/Desktop/Contact/index.php @@ -20,12 +20,13 @@  // along with h-source.  If not, see <http://www.gnu.org/licenses/>.  ?> -	<div id="left"> -		 -		<div class="position_tree_box"> -			<a href="<?php echo $this->baseUrl."/home/index/$lang";?>">Home</a> » contact -		</div> -		 -		<p>write in the file <b>Application/Views/Contact/index.php</b> your contact information</p> -	 -	</div> +<?php +	if (file_exists(ROOT."/Template/".Params::$viewSubfolder."/Contact/index_$lang.php")) +	{ +		include(ROOT."/Template/".Params::$viewSubfolder."/Contact/index_$lang.php"); +	} +	else +	{ +		include(ROOT."/Template/".Params::$viewSubfolder."/Contact/index.php"); +	} +?> diff --git a/h-source/Application/Views/Desktop/Home/left.php b/h-source/Application/Views/Desktop/Home/left.php index 82c6ac0..01b7f7f 100644 --- a/h-source/Application/Views/Desktop/Home/left.php +++ b/h-source/Application/Views/Desktop/Home/left.php @@ -20,17 +20,14 @@  // along with h-source.  If not, see <http://www.gnu.org/licenses/>.  ?> -	<div id="left"> -		 -		<div class="position_tree_box"> -			Home -		</div> -		 -		<?php echo $htmlNewsBox;?>	 -	 -		<p>it works!!</p> -		 -		<p>modify the file <b>Application/Views/Home/left.php</b> in order to change the english version of your homepage</p> +<?php +	if (file_exists(ROOT."/Template/".Params::$viewSubfolder."/Home/left_$lang.php")) +	{ +		include(ROOT."/Template/".Params::$viewSubfolder."/Home/left_$lang.php"); +	} +	else +	{ +		include(ROOT."/Template/".Params::$viewSubfolder."/Home/left.php"); +	} +?> -		<p>modify the file <b>Application/Include/languages.php</b> in order to add new languages</p> -	</div> diff --git a/h-source/Application/Views/Desktop/Project/index.php b/h-source/Application/Views/Desktop/Project/index.php index 7bbad78..0ca0dad 100644 --- a/h-source/Application/Views/Desktop/Project/index.php +++ b/h-source/Application/Views/Desktop/Project/index.php @@ -20,12 +20,14 @@  // along with h-source.  If not, see <http://www.gnu.org/licenses/>.  ?> -	<div id="left"> -		 -		<div class="position_tree_box"> -			<a href="<?php echo $this->baseUrl."/home/index/$lang";?>">Home</a> » h-project -		</div> -		 -		<p>write in the file <b>Application/Views/Project/index.php</b> your project information</p> -	 -	</div> +<?php +	if (file_exists(ROOT."/Template/".Params::$viewSubfolder."/Project/index_$lang.php")) +	{ +		include(ROOT."/Template/".Params::$viewSubfolder."/Project/index_$lang.php"); +	} +	else +	{ +		include(ROOT."/Template/".Params::$viewSubfolder."/Project/index.php"); +	} +?> + diff --git a/h-source/Application/Views/Mobile/Contact/index.php b/h-source/Application/Views/Mobile/Contact/index.php index e5fd9ca..9d4d806 100644 --- a/h-source/Application/Views/Mobile/Contact/index.php +++ b/h-source/Application/Views/Mobile/Contact/index.php @@ -20,12 +20,13 @@  // along with h-source.  If not, see <http://www.gnu.org/licenses/>.  ?> -	<div data-role="content"> -		 -		<div class="position_tree_box"> -			<a href="<?php echo $this->baseUrl."/home/index/$lang";?>">Home</a> » contact -		</div> -		 -		<p>write in the file <b>Application/Views/Contact/index.php</b> your contact information</p> -	 -	</div> +<?php +	if (file_exists(ROOT."/Template/".Params::$viewSubfolder."/Contact/index_$lang.php")) +	{ +		include(ROOT."/Template/".Params::$viewSubfolder."/Contact/index_$lang.php"); +	} +	else +	{ +		include(ROOT."/Template/".Params::$viewSubfolder."/Contact/index.php"); +	} +?> diff --git a/h-source/Application/Views/Mobile/Home/left.php b/h-source/Application/Views/Mobile/Home/left.php index ea43b56..156ec85 100644 --- a/h-source/Application/Views/Mobile/Home/left.php +++ b/h-source/Application/Views/Mobile/Home/left.php @@ -20,17 +20,13 @@  // along with h-source.  If not, see <http://www.gnu.org/licenses/>.  ?> -	<div data-role="content"> -		 -		<div class="position_tree_box"> -			Home -		</div> -		 -		<?php echo $htmlNewsBox;?> -	 -		<p>it works!!</p> -		 -		<p>modify the file <b>Application/Views/Home/left.php</b> in order to change the english version of your homepage</p> - -		<p>modify the file <b>Application/Include/languages.php</b> in order to add new languages</p> -	</div> +<?php +	if (file_exists(ROOT."/Template/".Params::$viewSubfolder."/Home/left_$lang.php")) +	{ +		include(ROOT."/Template/".Params::$viewSubfolder."/Home/left_$lang.php"); +	} +	else +	{ +		include(ROOT."/Template/".Params::$viewSubfolder."/Home/left.php"); +	} +?> diff --git a/h-source/Application/Views/Mobile/Project/index.php b/h-source/Application/Views/Mobile/Project/index.php index 8fe1bd2..3fa494d 100644 --- a/h-source/Application/Views/Mobile/Project/index.php +++ b/h-source/Application/Views/Mobile/Project/index.php @@ -20,12 +20,13 @@  // along with h-source.  If not, see <http://www.gnu.org/licenses/>.  ?> -	<div data-role="content"> -		 -		<div class="position_tree_box"> -			<a href="<?php echo $this->baseUrl."/home/index/$lang";?>">Home</a> » h-project -		</div> -		 -		<p>write in the file <b>Application/Views/Project/index.php</b> your project information</p> -	 -	</div> +<?php +	if (file_exists(ROOT."/Template/".Params::$viewSubfolder."/Project/index_$lang.php")) +	{ +		include(ROOT."/Template/".Params::$viewSubfolder."/Project/index_$lang.php"); +	} +	else +	{ +		include(ROOT."/Template/".Params::$viewSubfolder."/Project/index.php"); +	} +?> diff --git a/h-source/Template/Desktop/Contact/index.php b/h-source/Template/Desktop/Contact/index.php new file mode 100644 index 0000000..67904f9 --- /dev/null +++ b/h-source/Template/Desktop/Contact/index.php @@ -0,0 +1,31 @@ +<?php if (!defined('EG')) die('Direct access not allowed!'); ?> + +<?php +// h-source, a web software to build a community of people that want to share their hardware information. +// Copyright (C) 2010  Antonio Gallo (h-source-copyright.txt) +// +// This file is part of h-source +// +// h-source is free software: you can redistribute it and/or modify +// it under the terms of the GNU General Public License as published by +// the Free Software Foundation, either version 3 of the License, or +// (at your option) any later version. +//  +// h-source is distributed in the hope that it will be useful, +// but WITHOUT ANY WARRANTY; without even the implied warranty of +// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the +// GNU General Public License for more details. +//  +// You should have received a copy of the GNU General Public License +// along with h-source.  If not, see <http://www.gnu.org/licenses/>. +?> + +	<div id="left"> +		 +		<div class="position_tree_box"> +			<a href="<?php echo $this->baseUrl."/home/index/$lang";?>">Home</a> » contact +		</div> +		 +		<p>write in the file <b>Template/Desktop/Contact/index.php</b> your contact information</p> +	 +	</div> diff --git a/h-source/Application/Views/Desktop/Contact/index_es.php b/h-source/Template/Desktop/Contact/index_es.php index 28d91c6..28d91c6 100644 --- a/h-source/Application/Views/Desktop/Contact/index_es.php +++ b/h-source/Template/Desktop/Contact/index_es.php diff --git a/h-source/Application/Views/Desktop/Contact/index_it.php b/h-source/Template/Desktop/Contact/index_it.php index 28d91c6..28d91c6 100644 --- a/h-source/Application/Views/Desktop/Contact/index_it.php +++ b/h-source/Template/Desktop/Contact/index_it.php diff --git a/h-source/Template/Desktop/Home/left.php b/h-source/Template/Desktop/Home/left.php new file mode 100644 index 0000000..43069fb --- /dev/null +++ b/h-source/Template/Desktop/Home/left.php @@ -0,0 +1,36 @@ +<?php if (!defined('EG')) die('Direct access not allowed!'); ?> + +<?php +// h-source, a web software to build a community of people that want to share their hardware information. +// Copyright (C) 2010  Antonio Gallo (h-source-copyright.txt) +// +// This file is part of h-source +// +// h-source is free software: you can redistribute it and/or modify +// it under the terms of the GNU General Public License as published by +// the Free Software Foundation, either version 3 of the License, or +// (at your option) any later version. +//  +// h-source is distributed in the hope that it will be useful, +// but WITHOUT ANY WARRANTY; without even the implied warranty of +// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the +// GNU General Public License for more details. +//  +// You should have received a copy of the GNU General Public License +// along with h-source.  If not, see <http://www.gnu.org/licenses/>. +?> + +	<div id="left"> +		 +		<div class="position_tree_box"> +			Home +		</div> +		 +		<?php echo $htmlNewsBox;?>	 +	 +		<p>it works!!</p> +		 +		<p>modify the file <b>Template/Desktop/left.php</b> in order to change the english version of your homepage</p> + +		<p>modify the file <b>Application/Include/languages.php</b> in order to add new languages</p> +	</div> diff --git a/h-source/Application/Views/Desktop/Home/left_es.php b/h-source/Template/Desktop/Home/left_es.php index 3350599..3350599 100644 --- a/h-source/Application/Views/Desktop/Home/left_es.php +++ b/h-source/Template/Desktop/Home/left_es.php diff --git a/h-source/Application/Views/Desktop/Home/left_fr.php b/h-source/Template/Desktop/Home/left_fr.php index c69674d..c69674d 100644 --- a/h-source/Application/Views/Desktop/Home/left_fr.php +++ b/h-source/Template/Desktop/Home/left_fr.php diff --git a/h-source/Application/Views/Desktop/Home/left_it.php b/h-source/Template/Desktop/Home/left_it.php index c69674d..c69674d 100644 --- a/h-source/Application/Views/Desktop/Home/left_it.php +++ b/h-source/Template/Desktop/Home/left_it.php diff --git a/h-source/Template/Desktop/Project/index.php b/h-source/Template/Desktop/Project/index.php new file mode 100644 index 0000000..e4d44c5 --- /dev/null +++ b/h-source/Template/Desktop/Project/index.php @@ -0,0 +1,31 @@ +<?php if (!defined('EG')) die('Direct access not allowed!'); ?> + +<?php +// h-source, a web software to build a community of people that want to share their hardware information. +// Copyright (C) 2010  Antonio Gallo (h-source-copyright.txt) +// +// This file is part of h-source +// +// h-source is free software: you can redistribute it and/or modify +// it under the terms of the GNU General Public License as published by +// the Free Software Foundation, either version 3 of the License, or +// (at your option) any later version. +//  +// h-source is distributed in the hope that it will be useful, +// but WITHOUT ANY WARRANTY; without even the implied warranty of +// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the +// GNU General Public License for more details. +//  +// You should have received a copy of the GNU General Public License +// along with h-source.  If not, see <http://www.gnu.org/licenses/>. +?> + +	<div id="left"> +		 +		<div class="position_tree_box"> +			<a href="<?php echo $this->baseUrl."/home/index/$lang";?>">Home</a> » h-project +		</div> +		 +		<p>write in the file <b>Template/Desktop/Project/index.php</b> your project information</p> +	 +	</div> diff --git a/h-source/Application/Views/Desktop/Project/index_es.php b/h-source/Template/Desktop/Project/index_es.php index d46fa19..d46fa19 100644 --- a/h-source/Application/Views/Desktop/Project/index_es.php +++ b/h-source/Template/Desktop/Project/index_es.php diff --git a/h-source/Application/Views/Desktop/Project/index_it.php b/h-source/Template/Desktop/Project/index_it.php index d46fa19..d46fa19 100644 --- a/h-source/Application/Views/Desktop/Project/index_it.php +++ b/h-source/Template/Desktop/Project/index_it.php diff --git a/h-source/Template/Mobile/Contact/index.php b/h-source/Template/Mobile/Contact/index.php new file mode 100644 index 0000000..b3d502f --- /dev/null +++ b/h-source/Template/Mobile/Contact/index.php @@ -0,0 +1,31 @@ +<?php if (!defined('EG')) die('Direct access not allowed!'); ?> + +<?php +// h-source, a web software to build a community of people that want to share their hardware information. +// Copyright (C) 2010  Antonio Gallo (h-source-copyright.txt) +// +// This file is part of h-source +// +// h-source is free software: you can redistribute it and/or modify +// it under the terms of the GNU General Public License as published by +// the Free Software Foundation, either version 3 of the License, or +// (at your option) any later version. +//  +// h-source is distributed in the hope that it will be useful, +// but WITHOUT ANY WARRANTY; without even the implied warranty of +// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the +// GNU General Public License for more details. +//  +// You should have received a copy of the GNU General Public License +// along with h-source.  If not, see <http://www.gnu.org/licenses/>. +?> + +	<div data-role="content"> +		 +		<div class="position_tree_box"> +			<a href="<?php echo $this->baseUrl."/home/index/$lang";?>">Home</a> » contact +		</div> +		 +		<p>write in the file <b>Template/Mobile/Contact/index.php</b> your contact information</p> +	 +	</div> diff --git a/h-source/Application/Views/Mobile/Contact/index_es.php b/h-source/Template/Mobile/Contact/index_es.php index a38814c..a38814c 100644 --- a/h-source/Application/Views/Mobile/Contact/index_es.php +++ b/h-source/Template/Mobile/Contact/index_es.php diff --git a/h-source/Application/Views/Mobile/Contact/index_it.php b/h-source/Template/Mobile/Contact/index_it.php index a38814c..a38814c 100644 --- a/h-source/Application/Views/Mobile/Contact/index_it.php +++ b/h-source/Template/Mobile/Contact/index_it.php diff --git a/h-source/Template/Mobile/Home/left.php b/h-source/Template/Mobile/Home/left.php new file mode 100644 index 0000000..33cb671 --- /dev/null +++ b/h-source/Template/Mobile/Home/left.php @@ -0,0 +1,36 @@ +<?php if (!defined('EG')) die('Direct access not allowed!'); ?> + +<?php +// h-source, a web software to build a community of people that want to share their hardware information. +// Copyright (C) 2010  Antonio Gallo (h-source-copyright.txt) +// +// This file is part of h-source +// +// h-source is free software: you can redistribute it and/or modify +// it under the terms of the GNU General Public License as published by +// the Free Software Foundation, either version 3 of the License, or +// (at your option) any later version. +//  +// h-source is distributed in the hope that it will be useful, +// but WITHOUT ANY WARRANTY; without even the implied warranty of +// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the +// GNU General Public License for more details. +//  +// You should have received a copy of the GNU General Public License +// along with h-source.  If not, see <http://www.gnu.org/licenses/>. +?> + +	<div data-role="content"> +		 +		<div class="position_tree_box"> +			Home +		</div> +		 +		<?php echo $htmlNewsBox;?> +	 +		<p>it works!!</p> +		 +		<p>modify the file <b>Template/Mobile/left.php</b> in order to change the english version of your homepage</p> + +		<p>modify the file <b>Application/Include/languages.php</b> in order to add new languages</p> +	</div> diff --git a/h-source/Application/Views/Mobile/Home/left_es.php b/h-source/Template/Mobile/Home/left_es.php index 1c961e8..1c961e8 100644 --- a/h-source/Application/Views/Mobile/Home/left_es.php +++ b/h-source/Template/Mobile/Home/left_es.php diff --git a/h-source/Application/Views/Mobile/Home/left_fr.php b/h-source/Template/Mobile/Home/left_fr.php index 7b53682..7b53682 100644 --- a/h-source/Application/Views/Mobile/Home/left_fr.php +++ b/h-source/Template/Mobile/Home/left_fr.php diff --git a/h-source/Application/Views/Mobile/Home/left_it.php b/h-source/Template/Mobile/Home/left_it.php index 7b53682..7b53682 100644 --- a/h-source/Application/Views/Mobile/Home/left_it.php +++ b/h-source/Template/Mobile/Home/left_it.php diff --git a/h-source/Template/Mobile/Project/index.php b/h-source/Template/Mobile/Project/index.php new file mode 100644 index 0000000..0aefcc0 --- /dev/null +++ b/h-source/Template/Mobile/Project/index.php @@ -0,0 +1,31 @@ +<?php if (!defined('EG')) die('Direct access not allowed!'); ?> + +<?php +// h-source, a web software to build a community of people that want to share their hardware information. +// Copyright (C) 2010  Antonio Gallo (h-source-copyright.txt) +// +// This file is part of h-source +// +// h-source is free software: you can redistribute it and/or modify +// it under the terms of the GNU General Public License as published by +// the Free Software Foundation, either version 3 of the License, or +// (at your option) any later version. +//  +// h-source is distributed in the hope that it will be useful, +// but WITHOUT ANY WARRANTY; without even the implied warranty of +// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the +// GNU General Public License for more details. +//  +// You should have received a copy of the GNU General Public License +// along with h-source.  If not, see <http://www.gnu.org/licenses/>. +?> + +	<div data-role="content"> +		 +		<div class="position_tree_box"> +			<a href="<?php echo $this->baseUrl."/home/index/$lang";?>">Home</a> » h-project +		</div> +		 +		<p>write in the file <b>Template/Mobile/Project/index.php</b> your project information</p> +	 +	</div> diff --git a/h-source/Template/Mobile/Project/index_es.php b/h-source/Template/Mobile/Project/index_es.php new file mode 100644 index 0000000..02a4c27 --- /dev/null +++ b/h-source/Template/Mobile/Project/index_es.php @@ -0,0 +1,31 @@ +<?php if (!defined('EG')) die('Direct access not allowed!'); ?> + +<?php +// h-source, a web software to build a community of people that want to share their hardware information. +// Copyright (C) 2010  Antonio Gallo (h-source-copyright.txt) +// +// This file is part of h-source +// +// h-source is free software: you can redistribute it and/or modify +// it under the terms of the GNU General Public License as published by +// the Free Software Foundation, either version 3 of the License, or +// (at your option) any later version. +//  +// h-source is distributed in the hope that it will be useful, +// but WITHOUT ANY WARRANTY; without even the implied warranty of +// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the +// GNU General Public License for more details. +//  +// You should have received a copy of the GNU General Public License +// along with h-source.  If not, see <http://www.gnu.org/licenses/>. +?> + +	<div data-role="content"> +		 +		<div class="position_tree_box"> +			<a href="<?php echo $this->baseUrl."/home/index/$lang";?>">Home</a> » h-project +		</div> +		 +		 +	 +	</div> diff --git a/h-source/Template/Mobile/Project/index_it.php b/h-source/Template/Mobile/Project/index_it.php new file mode 100644 index 0000000..02a4c27 --- /dev/null +++ b/h-source/Template/Mobile/Project/index_it.php @@ -0,0 +1,31 @@ +<?php if (!defined('EG')) die('Direct access not allowed!'); ?> + +<?php +// h-source, a web software to build a community of people that want to share their hardware information. +// Copyright (C) 2010  Antonio Gallo (h-source-copyright.txt) +// +// This file is part of h-source +// +// h-source is free software: you can redistribute it and/or modify +// it under the terms of the GNU General Public License as published by +// the Free Software Foundation, either version 3 of the License, or +// (at your option) any later version. +//  +// h-source is distributed in the hope that it will be useful, +// but WITHOUT ANY WARRANTY; without even the implied warranty of +// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the +// GNU General Public License for more details. +//  +// You should have received a copy of the GNU General Public License +// along with h-source.  If not, see <http://www.gnu.org/licenses/>. +?> + +	<div data-role="content"> +		 +		<div class="position_tree_box"> +			<a href="<?php echo $this->baseUrl."/home/index/$lang";?>">Home</a> » h-project +		</div> +		 +		 +	 +	</div> | 
