SlideShare a Scribd company logo
H-PaGe
(Home Page Generator)


Svetoslav Nikolov
(http://svetoslavnikolov.wordpress.com)
Background (why)

• The structure of the DTU web pages is quite
  complicated (http://www.oersted.dtu.dk)
• The designer must replicate the menu for
  each web page.
• The idea – keep them separate. The
  designer just writes the content.
What is H-PaGe
• H-PaGe is a program
  for generating
  dynamic web pages.
• Written in PHP.
• Pages do not exist
  physically.
• Created on the fly
  from a specification.
Structure of Ørsted’s Pages
• Pictures:
   – Upper left and right
   – Middle left and right
   – Lower left.
• Menus:
   – Top.
   – Left.
   – Bottom.
• Contents
Structure Of a Web Site

• Here ”web site” means a place to which we
  return when we click on a button ”home”.
  For example Ørsted’s site.
• The personal web sites are located at:
  http://www.oersted.dtu.dk/personal/$USER
Directory Structure
 Each web site has one ROOT DIRECTORY and a
 number of sub-directories


   root_dir            sub_dir_1
                       sub_dir_2
                       sub_dir_3

The ”root_dir” for the personal pages is on the
web server under: /home/$USER/2www/
Create Web Page With H-PaGe

1. Obtain the distribution of H-PaGe.
2. Copy ”index.php” to the root directory, for
   example in ”/home/$user/2www/”.
3. Specify your web site in the file ”web.config”.
   Give color scheme, names of pictures, etc.
   ”web.config” is in the same directory as
   ”index.php”
4. Create the files with the contents for each of the
   web pages in your web site.
What Is ”web.config”?
• ”web.config” is a file with commands to the server
  defining the looks and the structure of the web site.
• ”web.config” is created with a text editor. For example
  Word Pad or NEdit.
• The file looks like this:
 <?
  // This is a comment
  # This is also a comment
  /*This is also a comment*/
  set_style(’green.css’); // This is a command.
 ?>
Define Color Scheme
The color scheme is defined with a command set_style
 <?
      set_style(’name_of_style.css’);
 ?>


Possible options are:
• green.css, red.css, blue.css,
 lila.css, cyan.css, brown.css

These files define not only the colors, but also the font
names, sizes, etc.
Specify Images
 Images are added by the command add_image.
<?
   //add_image(’position’,’file’,’descript’,’link’);
  add_image(’upperright’,’dtu_logo_ur_green.gif’,
            ’DTU’, ’http://www.dtu.dk’);
  add_image(’middleright’,’~/pictures/sn_name.png’,

            ’SN’);
  add_image(’menu_line’,’.pictures/line_blue.gif’);
?>
The Images
upperleft             upperright   (600 x 20)
middleleft                 middleright
(151 x 72)                 (600 x 72)




         menu_line (130 x 3) or (130 x 1)




 lowerleft
(151 x 72)
Create Menus
H-PaGe was initially developed to create the menus
automatically from the directory structure.


/31000 --+-- /Slides
         +-- /Notes                   Home
         +-- /Exam
                                      Slides
                                      Notes
                                      Exam
../31000 contains:
        index.php,
        web.config
Expected Files
In the root directory, say, 31000, it is expected to
have ”index.php”, ”web.config”.
In the rest ot the directories, ”index.php” expects to
find a file with a name ”main.html”, or ”main.htm” or
”main.txt”.


If you make sub-directories, they will appear as
sub-menus.

Only the menu on the left can be created like this.
Other Menus


             top


left




            bottom
Specifying Menus In web.config
Items in the mennu can be added to the web site from
web.config using the command add_menu.

<?
  //add_menu(’position’,’text’,’directory’,’file’)
  // Absolute web address
   add_menu(’top’, ’DTU’, ’http://www.dtu.dk’);
  // Specify only directory
   add_menu(’bottom’, ’Pictures’,’./pictures’);
  // Specify directory and file
   add_menu(’left’,’Links’, ’./’, ’links.html’);
?>
Other Commands
show_updated(’true’);
set_substitute(’true’ | ’false’);
add_bottom_text(’Some text instead of menu’);
set_title(’Some title for the page’);
Some Browser – Title of
page
             http://www.oersted.dtu.dk




                           bottom_text
Last updated: 1 Jan 1970
The Contents
The contents are
simple html files.
Usually their name                          contents
is ”main.html” if
you work with
directory structure.

These files can be created with any editor – text or
web editor. They can even be simple text files
without any HTML formatting.
Things To Remember

• All links are relative to the root directory,
  not to the current file with contents.
• Do not use any formatting on the page like
  ”background color”, ”text color”, etc. The
  CSS files take care of it.
• Make pages as simple as possible.
Let’s Do It !
Simple HTML

• Header1 (title)
  <h1> Some text </h1>
• Header2 (section)
  <h2> Section name</h2>
• Header3 (sub-section)
  <h3>Sub-section name</h3>
Simple HTML

• Link:
  <a href=”http://www.dtu.dk”> DTU </a>
• Itemized list (with bullets):
  <ul>
    <li> Item text </li>
    <li> Item text </li>
  </ul>
Simple HTML

• Enumerated list:
  <ol>
    <li> First item </li>
    <li> Second item </li>
  </ol>
• New paragraph:
  <p> Some text

More Related Content

PPTX
Firefox addons
Gurpreet Singh Sachdeva
 
PPTX
Firefox Extension Development
phamvanvung
 
PDF
How To Write Your First Firefox Extension
Robert Nyman
 
DOC
2190 pertemuan24(polling)
Universitas Bina Darma Palembang
 
PDF
Drupal 8 configuration management
Alexander Tkachev
 
PPT
Firefox Modding
Enreina Annisa Rizkiasri
 
PDF
Firefox extension Development
Abhinav Chittora
 
PDF
PHP Includes
webhostingguy
 
Firefox addons
Gurpreet Singh Sachdeva
 
Firefox Extension Development
phamvanvung
 
How To Write Your First Firefox Extension
Robert Nyman
 
2190 pertemuan24(polling)
Universitas Bina Darma Palembang
 
Drupal 8 configuration management
Alexander Tkachev
 
Firefox Modding
Enreina Annisa Rizkiasri
 
Firefox extension Development
Abhinav Chittora
 
PHP Includes
webhostingguy
 

What's hot (20)

PPTX
Image upload in php MySql
Ishaq Shinwari
 
PPT
Local Drupal MultiSite Set-up
Manuel Felix G. Abejo Jr.
 
DOCX
Freeingwebhost
Mahkota Raja
 
PPTX
Demo lecture ppt
VidyaGholap2
 
PDF
Herodevpres
csshero
 
PPTX
Armsec 2017 | 2 bugs 1 safari
Дмитрий Бумов
 
PDF
Installing And Configuration for your Wordpress blog
igorgentry
 
PDF
0047ecaa6ea3e9ac0a13a2fe96f4de3bfd515c88f5d90c1fae79b956363d7f02c7fa060269
tutorialsruby
 
PPTX
Archives hub ead 2010_lesson
Lisa Jeskins
 
PPT
Wordpress install setup
Mohammed Nayeem
 
PDF
CustomThesis
tutorialsruby
 
PPTX
crtical points for customizing Joomla templates
amit das
 
PDF
Drupal 7 database api
Andrii Podanenko
 
PDF
Htaccess file tutorial and tips
Imam Rosidi
 
PDF
Drupal module development
Damjan Cvetan
 
ODP
Php File Upload
Hiroaki Kawai
 
PDF
Drupal vs WordPress
Walter Ebert
 
PDF
Technical SEO: .htaccess & 301 Redirects
Rob Bertholf
 
PDF
Drupal 8 版型開發變革
Chris Wu
 
PPSX
Steph's Html5 and css presentation
stephy123123
 
Image upload in php MySql
Ishaq Shinwari
 
Local Drupal MultiSite Set-up
Manuel Felix G. Abejo Jr.
 
Freeingwebhost
Mahkota Raja
 
Demo lecture ppt
VidyaGholap2
 
Herodevpres
csshero
 
Armsec 2017 | 2 bugs 1 safari
Дмитрий Бумов
 
Installing And Configuration for your Wordpress blog
igorgentry
 
0047ecaa6ea3e9ac0a13a2fe96f4de3bfd515c88f5d90c1fae79b956363d7f02c7fa060269
tutorialsruby
 
Archives hub ead 2010_lesson
Lisa Jeskins
 
Wordpress install setup
Mohammed Nayeem
 
CustomThesis
tutorialsruby
 
crtical points for customizing Joomla templates
amit das
 
Drupal 7 database api
Andrii Podanenko
 
Htaccess file tutorial and tips
Imam Rosidi
 
Drupal module development
Damjan Cvetan
 
Php File Upload
Hiroaki Kawai
 
Drupal vs WordPress
Walter Ebert
 
Technical SEO: .htaccess & 301 Redirects
Rob Bertholf
 
Drupal 8 版型開發變革
Chris Wu
 
Steph's Html5 and css presentation
stephy123123
 
Ad

Viewers also liked (15)

PPT
Princeton Luxury Homes sold in 2009
Beatrice Bloom
 
PDF
Ch.10 dss future
Dr. Bashir Al-Debyan
 
PDF
Grp Ii
devsvg
 
PPTX
IICTG-Inaugural-v2
gkchang
 
PDF
Darko Lighting Brochure 2009
ioniuy
 
PPS
Life in 1500 history lesson 1
jleungml
 
PPTX
Transducer with non-rectangular elements
Svetoslav Nikolov
 
PPTX
The Community Of Gaming &amp; Hardware Enthusiasts
Mark Reed
 
PDF
Listing presentation
Beatrice Bloom
 
PDF
CH.10 DSS Future
Dr. Bashir Al-Debyan
 
PPSX
65 Linwood Circle Slide
Beatrice Bloom
 
KEY
Autyzm: metody pracy, teoria i praktyka
Terapia Dzieci
 
DOC
DAMS
indarkiras
 
PPTX
Politica agricola comuna in romania
roxanaaj
 
PDF
Certificates
Murlidhar Soni
 
Princeton Luxury Homes sold in 2009
Beatrice Bloom
 
Ch.10 dss future
Dr. Bashir Al-Debyan
 
Grp Ii
devsvg
 
IICTG-Inaugural-v2
gkchang
 
Darko Lighting Brochure 2009
ioniuy
 
Life in 1500 history lesson 1
jleungml
 
Transducer with non-rectangular elements
Svetoslav Nikolov
 
The Community Of Gaming &amp; Hardware Enthusiasts
Mark Reed
 
Listing presentation
Beatrice Bloom
 
CH.10 DSS Future
Dr. Bashir Al-Debyan
 
65 Linwood Circle Slide
Beatrice Bloom
 
Autyzm: metody pracy, teoria i praktyka
Terapia Dzieci
 
Politica agricola comuna in romania
roxanaaj
 
Certificates
Murlidhar Soni
 
Ad

Similar to Hpage (20)

PDF
Creating and Deploying Static Sites with Hugo
Brian Hogan
 
PDF
How to create a basic template
vathur
 
PDF
Z04 etano template_basics
Daouni Monsite
 
DOCX
Creating a basic joomla
shailendra vishwakarma
 
PDF
WordPress Theming 101
Zero Point Development
 
PPT
Joomla Beginner Template Presentation
alledia
 
PPTX
Artistic Web Applications - Week3 - Part 3
Katherine McCurdy-Lapierre, R.G.D.
 
PDF
3. tutorial html web desain
faizibra
 
PPTX
Intermediate Web Design
mlincol2
 
ODP
Drupal 7 install with modules and themes
Geshan Manandhar
 
PDF
puissance-2roue
Daouni Monsite
 
PPT
Drupal 7 theme by ayushi infotech
Mandakini Kumari
 
PPTX
Creating Custom Templates for Joomla! 2.5
Don Cranford
 
PPT
Introduction to HTML, CSS, and Scripting In the world of web development, thr...
SIVASANKARANSIVAKUMA
 
PPTX
Customizing WordPress Themes
Laura Hartwig
 
PPTX
The Way to Theme Enlightenment 2017
Amanda Giles
 
PPT
Lecture1and2
andalibalzaghawi
 
PPT
Unit 2 (html)
manochitra10
 
PDF
How to make a WordPress theme
Hardeep Asrani
 
PPTX
HTML Lists & Llinks
Nisa Soomro
 
Creating and Deploying Static Sites with Hugo
Brian Hogan
 
How to create a basic template
vathur
 
Z04 etano template_basics
Daouni Monsite
 
Creating a basic joomla
shailendra vishwakarma
 
WordPress Theming 101
Zero Point Development
 
Joomla Beginner Template Presentation
alledia
 
Artistic Web Applications - Week3 - Part 3
Katherine McCurdy-Lapierre, R.G.D.
 
3. tutorial html web desain
faizibra
 
Intermediate Web Design
mlincol2
 
Drupal 7 install with modules and themes
Geshan Manandhar
 
puissance-2roue
Daouni Monsite
 
Drupal 7 theme by ayushi infotech
Mandakini Kumari
 
Creating Custom Templates for Joomla! 2.5
Don Cranford
 
Introduction to HTML, CSS, and Scripting In the world of web development, thr...
SIVASANKARANSIVAKUMA
 
Customizing WordPress Themes
Laura Hartwig
 
The Way to Theme Enlightenment 2017
Amanda Giles
 
Lecture1and2
andalibalzaghawi
 
Unit 2 (html)
manochitra10
 
How to make a WordPress theme
Hardeep Asrani
 
HTML Lists & Llinks
Nisa Soomro
 

Hpage

  • 1. H-PaGe (Home Page Generator) Svetoslav Nikolov (http://svetoslavnikolov.wordpress.com)
  • 2. Background (why) • The structure of the DTU web pages is quite complicated (http://www.oersted.dtu.dk) • The designer must replicate the menu for each web page. • The idea – keep them separate. The designer just writes the content.
  • 3. What is H-PaGe • H-PaGe is a program for generating dynamic web pages. • Written in PHP. • Pages do not exist physically. • Created on the fly from a specification.
  • 4. Structure of Ørsted’s Pages • Pictures: – Upper left and right – Middle left and right – Lower left. • Menus: – Top. – Left. – Bottom. • Contents
  • 5. Structure Of a Web Site • Here ”web site” means a place to which we return when we click on a button ”home”. For example Ørsted’s site. • The personal web sites are located at: http://www.oersted.dtu.dk/personal/$USER
  • 6. Directory Structure Each web site has one ROOT DIRECTORY and a number of sub-directories root_dir sub_dir_1 sub_dir_2 sub_dir_3 The ”root_dir” for the personal pages is on the web server under: /home/$USER/2www/
  • 7. Create Web Page With H-PaGe 1. Obtain the distribution of H-PaGe. 2. Copy ”index.php” to the root directory, for example in ”/home/$user/2www/”. 3. Specify your web site in the file ”web.config”. Give color scheme, names of pictures, etc. ”web.config” is in the same directory as ”index.php” 4. Create the files with the contents for each of the web pages in your web site.
  • 8. What Is ”web.config”? • ”web.config” is a file with commands to the server defining the looks and the structure of the web site. • ”web.config” is created with a text editor. For example Word Pad or NEdit. • The file looks like this: <? // This is a comment # This is also a comment /*This is also a comment*/ set_style(’green.css’); // This is a command. ?>
  • 9. Define Color Scheme The color scheme is defined with a command set_style <? set_style(’name_of_style.css’); ?> Possible options are: • green.css, red.css, blue.css, lila.css, cyan.css, brown.css These files define not only the colors, but also the font names, sizes, etc.
  • 10. Specify Images Images are added by the command add_image. <? //add_image(’position’,’file’,’descript’,’link’); add_image(’upperright’,’dtu_logo_ur_green.gif’, ’DTU’, ’http://www.dtu.dk’); add_image(’middleright’,’~/pictures/sn_name.png’, ’SN’); add_image(’menu_line’,’.pictures/line_blue.gif’); ?>
  • 11. The Images upperleft upperright (600 x 20) middleleft middleright (151 x 72) (600 x 72) menu_line (130 x 3) or (130 x 1) lowerleft (151 x 72)
  • 12. Create Menus H-PaGe was initially developed to create the menus automatically from the directory structure. /31000 --+-- /Slides +-- /Notes Home +-- /Exam Slides Notes Exam ../31000 contains: index.php, web.config
  • 13. Expected Files In the root directory, say, 31000, it is expected to have ”index.php”, ”web.config”. In the rest ot the directories, ”index.php” expects to find a file with a name ”main.html”, or ”main.htm” or ”main.txt”. If you make sub-directories, they will appear as sub-menus. Only the menu on the left can be created like this.
  • 14. Other Menus top left bottom
  • 15. Specifying Menus In web.config Items in the mennu can be added to the web site from web.config using the command add_menu. <? //add_menu(’position’,’text’,’directory’,’file’) // Absolute web address add_menu(’top’, ’DTU’, ’http://www.dtu.dk’); // Specify only directory add_menu(’bottom’, ’Pictures’,’./pictures’); // Specify directory and file add_menu(’left’,’Links’, ’./’, ’links.html’); ?>
  • 16. Other Commands show_updated(’true’); set_substitute(’true’ | ’false’); add_bottom_text(’Some text instead of menu’); set_title(’Some title for the page’); Some Browser – Title of page http://www.oersted.dtu.dk bottom_text Last updated: 1 Jan 1970
  • 17. The Contents The contents are simple html files. Usually their name contents is ”main.html” if you work with directory structure. These files can be created with any editor – text or web editor. They can even be simple text files without any HTML formatting.
  • 18. Things To Remember • All links are relative to the root directory, not to the current file with contents. • Do not use any formatting on the page like ”background color”, ”text color”, etc. The CSS files take care of it. • Make pages as simple as possible.
  • 20. Simple HTML • Header1 (title) <h1> Some text </h1> • Header2 (section) <h2> Section name</h2> • Header3 (sub-section) <h3>Sub-section name</h3>
  • 21. Simple HTML • Link: <a href=”http://www.dtu.dk”> DTU </a> • Itemized list (with bullets): <ul> <li> Item text </li> <li> Item text </li> </ul>
  • 22. Simple HTML • Enumerated list: <ol> <li> First item </li> <li> Second item </li> </ol> • New paragraph: <p> Some text