Download Latest Version gojohnny8_2017-07-10.7z (1.4 MB)
Email in envelope

Get an email when there's a new version of Panglossa go!Johnny PHP class library

Home / gojohnny7 / classes
Name Modified Size InfoDownloads / Week
Parent folder
fancy 2013-04-15
basic 2013-04-15
auxclasses 2013-04-15
_basic.php 2013-04-15 1.5 kB
wbr.php 2013-04-15 376 Bytes
video.php 2013-04-15 1.9 kB
ul.php 2013-04-15 649 Bytes
tr.php 2013-04-15 1.3 kB
textarea.php 2013-04-15 554 Bytes
test2.inc 2013-04-15 130 Bytes
test.inc 2013-04-15 130 Bytes
table.php 2013-04-15 4.1 kB
select.php 2013-04-15 4.7 kB
ruby.php 2013-04-15 982 Bytes
progress.php 2013-04-15 731 Bytes
page.php 2013-04-15 8.1 kB
output.php 2013-04-15 522 Bytes
ol.php 2013-04-15 622 Bytes
object.php 2013-04-15 8.8 kB
meter.php 2013-04-15 831 Bytes
menu.php 2013-04-15 659 Bytes
label.php 2013-04-15 546 Bytes
keygen.php 2013-04-15 766 Bytes
jsa.php 2013-04-15 746 Bytes
johnnycode.php 2013-04-15 2.0 kB
input_week.php 2013-04-15 726 Bytes
input_url.php 2013-04-15 698 Bytes
input_time.php 2013-04-15 718 Bytes
input_text.php 2013-04-15 728 Bytes
input_tel.php 2013-04-15 698 Bytes
input_submit.php 2013-04-15 644 Bytes
input_search.php 2013-04-15 704 Bytes
input_reset.php 2013-04-15 645 Bytes
input_range.php 2013-04-15 833 Bytes
input_radio.php 2013-04-15 958 Bytes
input_password.php 2013-04-15 646 Bytes
input_number.php 2013-04-15 828 Bytes
input_month.php 2013-04-15 711 Bytes
input_image.php 2013-04-15 764 Bytes
input_hidden.php 2013-04-15 642 Bytes
input_file.php 2013-04-15 1.1 kB
input_email.php 2013-04-15 702 Bytes
input_datetimelocal.php 2013-04-15 771 Bytes
input_datetime.php 2013-04-15 760 Bytes
input_date.php 2013-04-15 718 Bytes
input_color.php 2013-04-15 5.3 kB
input_checkbox.php 2013-04-15 909 Bytes
input.php 2013-04-15 933 Bytes
img.php 2013-04-15 1.4 kB
iframe.php 2013-04-15 950 Bytes
hr.php 2013-04-15 374 Bytes
h.php 2013-04-15 1.3 kB
form.php 2013-04-15 1.5 kB
filelist.php 2013-04-15 2.1 kB
fieldset.php 2013-04-15 1.0 kB
embed.php 2013-04-15 744 Bytes
element.php 2013-04-15 8.5 kB
dl.php 2013-04-15 1.0 kB
details.php 2013-04-15 723 Bytes
db.php 2013-04-15 15.9 kB
datalist.php 2013-04-15 452 Bytes
data.php 2013-04-15 630 Bytes
comment.php 2013-04-15 402 Bytes
command.php 2013-04-15 558 Bytes
code.php 2013-04-15 1.6 kB
cite.php 2013-04-15 470 Bytes
caption.php 2013-04-15 313 Bytes
button.php 2013-04-15 531 Bytes
br.php 2013-04-15 375 Bytes
blockquote.php 2013-04-15 633 Bytes
bdo.php 2013-04-15 376 Bytes
audio.php 2013-04-15 867 Bytes
area.php 2013-04-15 1.1 kB
abbr.php 2013-04-15 629 Bytes
a.php 2013-04-15 1.6 kB
Totals: 75 Items   108.8 kB 0
README FILE
Panglossa go!Johnny PHP Library
version 7.0
release 2013-04-13
Author: Sérgio Domingues (known aliases: panglossa, QVASIMODO, Darth Andur)
panglossa@yahoo.com.br
Licensed under the GPL, please see:
http://www.gnu.org/licenses/gpl-3.0-standalone.html
Araçatuba - SP - Brazil - 2013






========================================
What is it?
========================================
The go!Johnny library is a set of classes built with the purpose of automating the generation of html code in your projects. This approach allows you to write only php code, without bothering to mix up html (except in special cases). Each HTML5 tag has its own class. Besides, there are some special classes for html pages, databases, configuration and more. As an example, instead of writing the whole HTML markup for a page, you can do just this:

----------------------------------------
TPage(
	'Here goes the page title', 
	'Here you add any content you want the page to include.', 
	'mypage.ico'
	)->render();
----------------------------------------

and the whole html5 markup, from <!DOCTYPE html><html ... to ... /html>, will be generated for you.

However, the classes are highly flexible, so there are many ways in which you can create a page. You can, for example, instantiate a TPage class object, then change its properties (like js files and css stylesheets to include, page title, page icon), add content to it, then, when everything is in place, render it to the client browser. Ex.:

----------------------------------------
$page = TPage();
$page->css[] = 'mystyle.css';
$page->js[] = 'myscript.js';
$page->icon = 'myicon.ico';
$page->title = 'Testing';
$page->add(TH1('Hello!'));
$page->add(TDiv('This is some text inside a div.'));
$page->render();
----------------------------------------

Each element can also be handled in a similar manner. Ex.:
----------------------------------------
$panel = new TDiv();
$panel->add('Some text');
$panel->properties['id'] = 'panel1';
$panel->properties['onclick'] = "alert('you clicked me');";
$panel->properties['style']['background-color'] = 'silver';
$page->add($panel);
----------------------------------------

There are shortcuts for almost everything. Ex., the code above can be rewritten as:
----------------------------------------
$panel = TDiv('Some text');
$panel->setID('panel1');
$panel->p('onclick', "alert('you clicked me');");
$panel->style('background-color', 'silver');
$page->add($panel);
----------------------------------------

and even as a one-liner:
----------------------------------------
$page->add(o(array('id' => 'panel1', 'onclick' => "alert('you clicked me');", 'style' => 'background-color:silver'), TDiv('Some text')));
----------------------------------------

where the function o() stands for "object instantiation".

The idea this library is that the classes should adapt to the user's preferences, not the opposite.










========================================
What it is not
========================================
This is not a framework. At least not as what is commonly understood by the word 'framework'. It can be used in a similar manner, after you get used to work with it. But we see it as it was designed to be: a set of usefull classes.








========================================
The Latest Version
========================================
You can always get the latest version at sourceforge:

https://sourceforge.net/projects/gojohnny/







========================================
Documentation
========================================
The documentation is still being written. Full tutorials, including videos, are planned. However, as for now, the only documentation is this README file you are looking at.








========================================
Installation & Use
========================================
These classes have been tested with the latest versions of apache and php (version 5.0 required), both on Windows and on Linux (Debian) machines. You have to unzip the package contents to a folder in your server that your php scripts have access to. Then, in your scripts, you set some options in the global variable $gj_options and include the main <classes.php> file. Ex.:
----------------------------------------
global $gj_options = array(
	'LOCALPATH' => '/usr/share/gojohnny6',
	'WEBPATH' => 'http://myserveraddress/gojohnny6'
	);
require_once("{$gj_options['LOCALPATH']}/classes.php");
----------------------------------------


Obs.:
1. $gj_options['LOCALPATH'] is an internal path, used by php; it must contain the path to where you placed the library files (viz. the classes.php file), in a format understood by your server's local filesystem.
2. $gj_options['WEBPATH'] is an external path, used by javascript and css; it must refer to the same path, but in the format of a url, i.e., a format that a client browser can understand. This one is not necessary if you use full urls when referring to javascripts or css files.

The classes make use of third-party libraries, when available. These have to be placed in the <lib> subfolder. The blueprint css framework and the jQuery library are included by default, both in the release package and in the page's js and css references. The latest versions of these libraries can be found at: 

http://www.blueprintcss.org/

and

http://jquery.com/






========================================
Licensing
========================================
http://creativecommons.org/licenses/by-sa/3.0/deed.en_GB
You can use any of the files in this release as you want. If you use re-publish any portion of this project in any medium or if you use it in a project of your own, please be sure to credit the original author or at least include a link to the project's main page (https://sourceforge.net/projects/gojohnny/).
Source: README.txt, updated 2013-04-15