GithubHelp home page GithubHelp logo

wet-boew / wet-boew-php Goto Github PK

View Code? Open in Web Editor NEW
24.0 17.0 21.0 7.59 MB

PHP variant of the Web Experience Toolkit (WET)

Home Page: http://wet-boew-php.azurewebsites.net/demos-php/index.php

License: Other

PHP 100.00%

wet-boew-php's Introduction

wet-boew-php

PHP variant of the Web Experience Toolkit (WET)
Demos site: http://wet-boew-php.azurewebsites.net/demos-php/index.php

Overview

This feature adapts the HTML5 core markup structure for use with PHP on an Apache web server.

##Benefits

  • Helps to minimize the duplication of content and code (such as titles and dates)
  • Improves consistency by separating content from the template code
  • Automates the breadcrumb trail
  • Conforms to WCAG 2.0 AA
  • Uses WAI-ARIA to enhance accessibility
  • Supports Firefox, Opera, Safari, Chrome, and IE 7+

##Minimum Requirements

  • dist folder from WET 3.1 Core
  • PHP 5.3+
  • Apache 2.x Web Server

##Change Log

  • 2013/11/23 Tagged 3.1
  • 2013/11/23 Started work on version 4.0

wet-boew-php's People

Contributors

crochefort avatar ericdunsworth avatar kngai avatar lucas-hay avatar michael-milette avatar nschonni avatar tomkralidis avatar upsonp avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

wet-boew-php's Issues

wet-boew-php demo site doesn't appear to be working

I just tried going to the demo site for wet-boew-php and it doesn't appear to be working. Shouldn't it be?

http://wet-boew-php.azurewebsites.net/demos-php/index.php

Also tried the following, just in case:
http://wet-boew-php.azurewebsites.net/demos-php/

Checked the source code for the page and found the following:

<!-- custom page metadata start -->
<meta name="description" content="English description / Description en anglais" />
<meta name="description" lang="fr" content="French description / Description en français" />
<meta name="dcterms.creator" content="English name of the content author / Nom en anglais de l'auteur du contenu" />
<meta name="dcterms.creator" lang="fr" content="French name of the content author / Nom en français de l'auteur du contenu" />
<!-- end of custom metadata -->

<!-- CustomCSSStart -->
<!-- CustomCSSEnd -->
<!-- Main content start -->
<!-- no content needed for splash page -->
<!-- MainContentEnd -->
<!-- CustomScriptsStart -->
<!-- CustomScriptsEnd -->

Government of Canada FIP signature at the top left of splash page (wet-boew/issues/2667)

From @michael-milette wet-boew/wet-boew#2667 (comment)

This also needs to be fixed in the dist-php variant. The following files are affected:

/dist-php/theme-base/sp-pe/head-nav.php
/dist-php/theme-base/serv/head-nav.php
/dist-php/theme-gcwu-fegc/sp-pe/head-nav.php
/dist-php/theme-gcwu-fegc/serv/head-nav.php
/dist-php/theme-gcwu-intranet/sp-pe/head-nav.php
/dist-php/theme-gcwu-intranet/serv/head-nav.php
/dist-php/theme-gcwu-boew/sp-pe/head-nav.php
/dist-php/theme-gcwu-boew/serv/head-nav.php

See the $SIG_FALL_IMG variable in these files - should be around line 4.

/cc @LaurentGoderre

Setting up $_SITE['wb_php_root'] and $_SITE['wb_core_root'] variables

I would like to propose that some documentation be added in the wiki (didn't find any) to covers this topic. I've created a page on the subject at:

https://github.com/wet-boew/wet-boew-php/wiki/Specifying-The-Path-to-the-WET-BOEW-and-WET-BOEW-PHP-Files

While there is some information in the source code of the config-path.php file in the the demo site, unless you know that it's there, there is nothing that prompts you to go looking for it or realize how to correctly configure it so that it works on a new installation.

The Variant Setup and Usage page at https://github.com/wet-boew/wet-boew-php/wiki/Variant-Setup-and-Usage seems to me like a good place to put a link to the information.

Just trying to make it easier for the next person to figure it out.

Best regards,

Michael

Link to Modular Search page

Hi @upsonp,

I was trying to find the Modular Search page created a couple of months back. I finally found a link to using Google in the changelog. Would it be possible to add a link somewhere in the wiki documentation pages?

https://github.com/wet-boew/wet-boew-php/wiki

Maybe under the "Variant Setup and Usage" section?

Here is the link to the modular search page so you don't have to find it:

https://github.com/wet-boew/wet-boew-php/wiki/Modular-search

Best regards,

Michael

Text Correction in a file

in dist-php/config/theme-gcwu-gegc/config.php
Line 49

$_SITE['gcwu_gcnavbar_fr'] = "Barre de navigation de la gouvernement de Canada"; 

Should be
$_SITE['gcwu_gcnavbar_fr'] = "Barre de navigation du gouvernement du Canada";

Lang switch for secured site.

/wet-boew/dist-php/langselect/lang.php

Is it possible to make sure this line take care of https site ?
Line #9
$q = "http://" . $_SERVER['HTTP_HOST'] . $_SERVER['QUERY_STRING'];

Thanks

Invalid HTML Markup

Hi Patrick!

On this file : /inc/head-nav.php

Line 35 .

<a class="wb-sl" href="#wb-cont"><?php echo $_SKIP_1_NAV_TEXT ?><</a>

Should be

<a class="wb-sl" href="#wb-cont"><?php echo $_SKIP_1_NAV_TEXT ?></a>

You have one extre "<" at the end

Grabbing Title as H1 inserts before main heading wrapper.

It appears Html5 will be introducing the "main" element soon, which content creators will probably put at athe top of their content...

The PHP version of the wet grabs the title element, using the demos-php/inc/centre-1.php file, duplicates it and drops it into an h1 at the top of the content... but it would be before the "main" tag something like this:

<h1 id="wb-cont">Title </h1>
<main class="content" role="main">

Currently some content providers are wrapping their content in an "article" tag in which case it shows up like

<h1 id="wb-cont">Title </h1>
<article class="content" role="main">

Or for those with a main DIV

<h1 id="wb-cont">Title </h1>
<div class="content" role="main">

I have some concern that SEO may not pay enough attention to the H1 because it is outside the article... or the main element,,,

thoughts?

Multilingual splash page issues

PHP Search

I had a hard time setting up the search feature for my site. As it stands now the PHP variant uses the /dist-php/inc/search.php file which calls the search file for the specific theme the user has the site set to. It works great in that it looks good, but to make the search form work it requires the user modify the /dist-php/{theme folder}/search.php file. The issue being this breaks the modularity of the PHP variant and would require the user to update the theme search.php file every time there's a new variant update.

I had to customize the /dist-php/theme-gcwu-fegc/search.php file to point it to the search page for my site and add variables in to make the Google site search I'm using work.

I think the best way to handled this would be to move the /dist-php/{theme folder}/search.php file to the /demos-php/{theme folder}/ folder. Then documentation should be written describing how the user can use that search file template to create their own site specific implementation.

README.md for v4.0 refers to wet-boew v3.1

Just starting to look at wet-boew-php v4.0.

The README.md for wet-boew-php v4.0 still says that it requires the dist for wet-boew 3.1 - should this not be the dist folder from wet-boew 4.0?

Best regards,

Michael

Broken links in PHP variant

Just figured I'd pass over an outline of broken links I detected on the RCMP website's current version of this repository (minus section2/.doc placeholder links).

PS: I don't think the current version of the PHP variant on GitHub contains the weird "home.phpl" issue that's all over the place in the below list. Downloaded and forked the repo, but couldn't find any sign of it anywhere. The image referencing issues at the end of the list may still exist in the GitHub repo, though.

http://wet-boew.pub.rcmp-grc.gc.ca/demos-php/theme-gcwu-fegc/application-eng.php
    http://www.servicecanada.gc.ca/eng/home.phpl
      \_____ error code: 404 (not found)

http://wet-boew.pub.rcmp-grc.gc.ca/demos-php/theme-gcwu-fegc/application-fra.php
    http://www.servicecanada.gc.ca/fra/accueil.phpl
      \_____ error code: 404 (not found)

http://wet-boew.pub.rcmp-grc.gc.ca/demos-php/theme-gcwu-fegc/application-nosearchlang-eng.php
    http://www.servicecanada.gc.ca/eng/home.phpl
      \_____ error code: 404 (not found)

http://wet-boew.pub.rcmp-grc.gc.ca/demos-php/theme-gcwu-fegc/application-nosearchlang-fra.php
    http://www.servicecanada.gc.ca/fra/accueil.phpl
      \_____ error code: 404 (not found)

http://wet-boew.pub.rcmp-grc.gc.ca/demos-php/theme-gcwu-fegc/cont-eng.php
    http://www.servicecanada.gc.ca/eng/home.phpl
      \_____ error code: 404 (not found)

http://wet-boew.pub.rcmp-grc.gc.ca/demos-php/theme-gcwu-fegc/cont-fra.php
    http://www.servicecanada.gc.ca/fra/accueil.phpl
      \_____ error code: 404 (not found)

http://wet-boew.pub.rcmp-grc.gc.ca/demos-php/theme-gcwu-fegc/cont-secnav1-eng.php
    http://www.servicecanada.gc.ca/eng/home.phpl
      \_____ error code: 404 (not found)

http://wet-boew.pub.rcmp-grc.gc.ca/demos-php/theme-gcwu-fegc/cont-secnav1-fra.php
    http://www.servicecanada.gc.ca/fra/accueil.phpl
      \_____ error code: 404 (not found)

http://wet-boew.pub.rcmp-grc.gc.ca/demos-php/theme-gcwu-fegc/home-accueil-eng.php
    http://www.servicecanada.gc.ca/eng/home.phpl
      \_____ error code: 404 (not found)
    http://wet-boew.pub.rcmp-grc.gc.ca/demos-php/theme-gcwu-fegc/images/video.jpg
      \_____ error code: 404 (not found)
    http://wet-boew.pub.rcmp-grc.gc.ca/demos-php/theme-gcwu-fegc/images/prio1-eng.png
      \_____ error code: 404 (not found)
    http://wet-boew.pub.rcmp-grc.gc.ca/demos-php/theme-gcwu-fegc/images/prio2-eng.png
      \_____ error code: 404 (not found)
    http://wet-boew.pub.rcmp-grc.gc.ca/demos-php/theme-gcwu-fegc/images/prio3-eng.png
      \_____ error code: 404 (not found)
    http://wet-boew.pub.rcmp-grc.gc.ca/demos-php/theme-gcwu-fegc/images/minister.JPG
      \_____ error code: 404 (not found)

http://wet-boew.pub.rcmp-grc.gc.ca/demos-php/theme-gcwu-fegc/home-accueil-fra.php
    http://wet-boew.pub.rcmp-grc.gc.ca/demos-php/theme-gcwu-fegc/images/video.jpg
      \_____ error code: 404 (not found)
    http://wet-boew.pub.rcmp-grc.gc.ca/demos-php/theme-gcwu-fegc/images/minister.JPG
      \_____ error code: 404 (not found)
    http://www.servicecanada.gc.ca/fra/accueil.phpl
      \_____ error code: 404 (not found)
    http://wet-boew.pub.rcmp-grc.gc.ca/demos-php/theme-gcwu-fegc/images/prio1-fra.png
      \_____ error code: 404 (not found)
    http://wet-boew.pub.rcmp-grc.gc.ca/demos-php/theme-gcwu-fegc/images/prio2-fra.png
      \_____ error code: 404 (not found)
    http://wet-boew.pub.rcmp-grc.gc.ca/demos-php/theme-gcwu-fegc/images/prio3-fra.png
      \_____ error code: 404 (not found)

Breadcrumb trail enhancment

I'd like to add an enhancement to the PHP variant breadcrumb trail generator. At the moment the way the breadcrumb trail is generated is by looking for bt_fa.php files within a directory and then finding bt_fa.php files in parent directories.

The bt_fa.php file looks something like:

<?php
$_NAVPATH['title_eng'] = "Otolith Research Lab";
$_NAVPATH['title_fra'] = "Le Laboratoire de recherche sur les otolithes";
$_NAVPATH['link_eng'] = "/otoliths/index-eng.php";
$_NAVPATH['link_fra'] = "/otoliths/index-fra.php";

?>

Background

The big downfall with the current breadcrumb generator method is breadcrumbs are dependent on where a "subsite" lies in the directory structure. With the above example Otoliths was originally under /science/research-recherche/fisheries-pecheries/otoliths/ on my site. The content owner really wanted the URL to be much shorter for the site, aliasing isn't an option for me, so I moved Otoliths to /science/otoliths/. The navigation to get to the "subsite" from the megamenu and leftside is still the same, but the breadcrumb only shows as (BIO Home > Otoliths) where it should be (BIO Home > Research > Otoliths)

Proposal

I'd like to modify the breadcrumb generator to allow a bt_fa.php file to specify an array to allow more refined control for PHP developers to specify what goes in the trail. The current method as in the example above will still work, but developers will also have the option to use something like:

<?php
$_NAVPATH['title_eng'][0] = "Research";
$_NAVPATH['title_fra'][0] = "Recherche";
$_NAVPATH['link_eng'][0] = "/science/research-recherche/index-eng.php";
$_NAVPATH['link_fra'][0] = "/science/research-recherche/index-fra.php";

$_NAVPATH['title_eng'][1] = "Otolith Research Lab";
$_NAVPATH['title_fra'][1] = "Le Laboratoire de recherche sur les otolithes";
$_NAVPATH['link_eng'][1] = "/otoliths/index-eng.php";
$_NAVPATH['link_fra'][1] = "/otoliths/index-fra.php";
?>

This allows the developer to create an array the breadcrumb generator will use to add additional elements to the trail without requiring a "subsite" to reside under a specific directory.

Empty <h2> element in site footer

Seems like $_TEMPLATE['foot_' . $_PAGE['lang']] does not exist, (nor does any $_TEMPLATE arrays exist), resulting in an empty h2 element.

I fixed this myself simply by opening "php-demo/inc/body-corps-2a.php" and replacing:

$_TEMPLATE['foot_'

with:

$_UNKNOWN['gcwu_foot_'

Broken link in Footer navigation without submenus in mobile view

SUMMARY

If the footer navigation has no submenu, links appear as "undefined" when viewed in mobile view. A live demonstration page has been setup at:
http://wetdev.tngconsulting.ca/demos-php/theme-gcwu-fegc/bug-footer.php

ENVIRONMENT

  • WET version: WET 3.1.2 - Distribution and PHP Variant (as downloaded July 30, 2013). It has not been tested in earlier versions or other variants.
  • Theme: Tested with theme-wet-boew and theme-gcwu-fegc. Did not test theme-gcwu-intranet or theme-base as these themes are missing more default settings than those listed below.
  • Browsers: Tested using all major browsers, both on desktop (Windows based) and smartphones (Android and iOS based)

REPRODUCTING THE ISSUE

The following instructions assume that the downloaded files have not been altered except as described below.
1 .In the root of your web server, extract and copy the following 3 folders from the appropriate ZIP files available on the WET-BOEW download site:
dist, dist-php and demos-php.

  1. Edit the /demos-php/config/config-path.php ensuring that the two variables, $_SITE['wb_php_root'] and $_SITE['wb_core_root'] are both set to an empty string. Example:
    $_SITE['wb_php_root'] = "";
    $_SITE['wb_core_root'] = "";
  2. Add the following lines to the config-path.php file (you get lots of errors without them but that is a different issue):
    $_PAGE['issplash'] = (!isset($_PAGE['issplash']) ? 0 : $_PAGE['issplash']);
    $_PAGE['isapp'] = (!isset($_PAGE['isapp']) ? 0 : $_PAGE['isapp']);
    $_PAGE['isserv'] = (!isset($_PAGE['isserv']) ? 0 : $_PAGE['isserv']);
    $_PAGE['signin'] = (!isset($_PAGE['signin']) ? 0 : $_PAGE['signin']);
    $_PAGE['signout'] = (!isset($_PAGE['signout']) ? 0 : $_PAGE['signout']);
    $_META_LANG = (!isset($_META_LANG) ? '' : $_META_LANG); // for head-end.php
    $META_LANG = (!isset($META_LANG) ? '' : $META_LANG); // for head-doc.php
    $_PAGE['nolang'] = (!isset($_PAGE['nolang']) ? 0 : $_PAGE['nolang']);
    $_PAGE['nosearch'] = (!isset($_PAGE['nosearch']) ? 0 : $_PAGE['nosearch']);
    $_PAGE['nositemenu'] = (!isset($_PAGE['nositemenu']) ? 0 : $_PAGE['nositemenu']);
    $_PAGE['nobcrumb'] = (!isset($_PAGE['nobcrumb']) ? 0 : $_PAGE['nobcrumb']);
  3. Ensure that you can access the splash page by going to: http://[yourdomain.tld]/demos-php/index.php
  4. Delete (or rename) the following four footer menu files located in the /demos-php/menu/ directory: trail-1-eng.php, trail-2-eng.php, trail-3-eng.php and trail-4-eng.php. Don't get rid of the French versions as you can use these for comparison.
  5. Click on the English button to load the English Home page.

DEMONSTRATION OF THE ISSUE

  1. Resize the width of this page (or the English Home page above) to the width of a mobile device - or just use a smartphone.
  2. Click the gear in the upper-right corner to display the pop-up menu.
  3. Click About

In mobile view, the About us, News, Contact us and Stay Connected links all point to a page called undefined yet in the desktop view, the links look (view source) and work click properly.

According to the PHP source code found in /dist-php/theme-gcwu-fegc/cont/foot-nav.php, removal of the footer sub-menu files should produce the desired results as seen in the desktop view.

It might be interesting to note that the Terms and Conditions and the Transparency links work correctly.

Any assistance and/or guidance would be most appreciated.

Best regards,

Michael Milette

Moved Contact Us before News in the footer (#2509)

@michael-milette - I'm opening an issue in referanc to your comment in #2517 and yes I believe I can fix that

Could you address this by implementing this change in the PHP Variant zip download file?

In the /dist-php/config/config-eng.php, (repeat for each of the other languages) change:

$SITE['wb_ft2_menu_file'.$LANG] = $MENU_LOCATION ."/trail-2-eng.php";
$SITE['wb_ft2_href'.$LANG] = "#";
$SITE['wb_ft2_text'.$LANG] = "News";

$SITE['wb_ft3_menu_file'.$LANG] = $MENU_LOCATION ."/trail-3-eng.php";
$SITE['wb_ft3_href'.$LANG] = "#";
$SITE['wb_ft3_text'.$LANG] = "Contact us";
...to...

$SITE['wb_ft2_menu_file'.$LANG] = $MENU_LOCATION ."/trail-3-eng.php";
$SITE['wb_ft2_href'.$LANG] = "#";
$SITE['wb_ft2_text'.$LANG] = "Contact us";

$SITE['wb_ft3_menu_file'.$LANG] = $MENU_LOCATION ."/trail-2-eng.php";
$SITE['wb_ft3_href'.$LANG] = "#";
$SITE['wb_ft3_text'.$LANG] = "News";
By doing it this way, you will ensure compatibility with existing installations.

Best regards,

Michael

V4 Debug function

Patrick, I notice that if you are missing one file that is required, even if you add the report all error option on the top of the file you don't see any error anywhere.

Was working on the Mega Menu and was not able to get it working till I copy all the file from the demo menu folder in my new menu folder.

The menu was just gone.

So is it possible for you to setup a variable in the config to act as a debug option

So Debug ON you see all error
and Debug Off you don't see any error.

Mega Menu and Mobile forms

I dropped my updates to /upsonp/wet-boew-php into my work development server for the BIO website this morning and notices some issues getting mega menu to work consistently. It was really weird, the arrows indicating the menu expands were missing and the mouse over expansion of the mega menu wouldn't work on the English site, but when I flipped over to the French site it worked right away as expected.

I worked on the issue all morning trying a lot of different things including using the wet-boew/wet-boew-php master version of the variant with the same results. Then I broke for lunch, when I came back the English mega menu had the arrows and the drop down worked fine, now I can't seem to break it again. I even removed all traces of the distribution from my dev server and started from scratch with what I had this morning.

Then I tried the mobile version, working on my public site (www.bio.gc.ca) still WET 3.0 using the older 3.0 php variant.

While testing the mobile menu, I also noticed that none of the php form elements were being displayed as mobile elements, which again work on the public version of my site.

I'm trying to narrow down what the issues could be. I think they may be related to the something with AJAX or JQuery. So I'm hoping someone can explain to me how mobile form elements are replaced. I thought it was just different CSS rules, but obviously there's something more going on here.

I notice some differences between the BIO WET 3.0 mobile menu and the newer WET 3.1 mobile menu working example. Which leads me to believe there may have been some changes to the mobile menu JQuery that could be part of the issue I'm having.

This is what the 3.0 mobile menus looked like:
menuIssue

And this is what the 3.1 mobile menu (form http://wet-boew.github.io/wet-boew/demos/theme-gcwu-fegc/cont-secnav2-eng.html) looks like
menuIssue2

@DavidMacDonald - have you tried upgrading anything using the wet-boew / wet-boew-php master PHP variant. Any success?

Signature Images v3.1

I don't know if it matters if I report this for the PHP variant or if it should be reported under wet-boew v3.1. There are two issues here and depending on the solution both may be fix at once.

I noticed when I upgraded to wet-boew to 3.1 GoC signature image in the top left and on the right over the search button were broken. After some investigation I found that wet-boew < 3.1 the images were named sig-eng.gif and wmms.gif. After 3.1 those images have been replaced with sig-eng.png and wmms.png.

This can be fixed in two ways, update the /theme-wet-boew/inc/cont/header-entete.php file to use the proper images or the images in version 3.1 need to be .gifs

Another problem with the sig-eng.png in version 3.1 is it's a transparent background with black text. Here's the image.
sig-eng

It appears over the black navigation bar so all that shows up is the red flag
sigIssue

PHP Variant Working Examples Hosting

@upsonp I'm currently hosting an older version of the PHP variant on our servers (http://wet-boew.pub.rcmp-grc.gc.ca) which is used to link from the Working Examples. I also use it for the SSI variant, which I'm still contributing to.

I'm happy to continue hosting both variants on our servers, even though we aren't contributing/using the PHP variant. I want to update the SSI variant examples on our servers and to keep things working, I'd like to update the PHP variant at the same time. Can I use a copy of your latest master branch to do this? Is it ready to be working example?

Thanks!

3.1 vs 4.0 wiki documetation

Update the wiki in such a way that 3.1 documentation is separate from 4.0 documentation. There's a divergence in the core WET project and 4.0 is not entirely backward compatible with version 3.1.

confused regarding dist vs build folder

The readme.md says the minimum requirements include the build folder... but hasn't that changed to the dist folder?

It seems since OCT 2012, the PHP has changed significantly, seems updating requires start from scratch...
Is there a guide to updating from the versions available last Oct to the current?

Missing Sign-in/Sign-out and Account Settings Buttons

From @michael-milette: The Sign-in/Sign-out and Account Settings block is missing. I didn't see it in the working examples demo for wet-boew or wet-boew-php yet. Can I assuming this will be supported and is still on your To Do list or will I need to devise a new strategy for making these available?

From @upsonp: I commented the variables for this out of the config-xx.php lanugae files. The examples I have to work from don't include the sign in/sign out buttons, but they weren't included in the v3.1 theme-wet-boew samples either. I'm waiting to see what they do with the theme-gcwu-fegc project that's been going for a couple days now. I fully suspect the sign in/sign out buttons will be included in some way, if not we'll get them into the variant some how.

New Customizable Option for BODY Tag

Would it also be possible to add another new variables that would be a placeholder for extra parameters in the tag found in dist-php\inc\head-hav.php?

It would be added just before the initial php closing tag (around line 27):

$_PAGE['bodytag'] = (!isset($_PAGE['bodytag']) ? "" : $_PAGE['bodytag']);

And then in the body tag a few lines down:

  <body vocab="http://schema.org/" typeof="WebPage"<?php echo ' '.$_PAGE['bodytag']; ?>>

The reason for this is because applications, such as the one I work with, sometimes require class and id parameters to be added to the body tag. So far I've been using JavaScript to add them in order to make the application work. I would much rather just be able to set a $_PAGE['bodytag'] variable in order to correctly configure the body tag. The syntax above will help ensure that there is no impact if the $_PAGE['bodytag'] is not set.

Unfortunately (or maybe fortunately?) I am in a spot where I am not to modify the application core code nor the WET core code so as to ensure easy maintenance and support from both communities. While I enjoy the challenge most of the time, that leaves me with the options of customizing the application's theme or creating application plugins (which results in some pretty creative coding at times).

I realize that this request addresses one persons needs but I would imagine that other PHP based web applications might have the similar requirements.

Best regards,

Michael Milette

Not AJAXing in mega menus so extra downloading on every page

WET core is AJAXing in the mega menus to save around 5 - 6 kb of downloads per page (so cached independently). Noticed that you are instead using a server-side include so the mega menu can't be cached separately. Should use the AJAXing approach rather than a server-side approach to maximize caching potential.

php echo not in the file

line 8 on this file

demos-php/menu/prim-megamenu-fr.php
samething for the english

demos-php/menu/prim-megamenu-en.php

<div class="container nvbar"><h2>' . $_SITE['wb_sitenav_' . $_PAGE["lang1"]] .'</h2>

should be

<div class="container nvbar"><h2><?php echo $_SITE['wb_sitenav_' . $_PAGE["lang1"]] ?></h2>

Warning image missing for Archived Content message if /wet-boew/dist folder is not in root of website or has a different name

SUMMARY

The image source link to /wet-boew/dist/js/images/archived/warning.gif (little yellow triangle with an exclamation mark in it) in wet-boew/dist-php/config\config-eng.php and config-fra.php doesn't work if wet-boew/dist is installed in a subdirectory of the webserver. The source path in the current code assumes it is installed in the root.

ENVIRONMENT

  • Latest version of WET-BOEW-PHP downloaded on 2013-11-21.
  • WET-BOEW 3.1.6.

REPRODUCING THE ISSUE

The issue can be reproduced if the /wet-boew/dist/... folder is not be located in the root of the webserver, or if the wet-boew or dist folders have different names.

DEMONSTRATION OF THE ISSUE

2013-11-21 13_39_25-archivedcontentimagemissing

SOLUTION

In each of the following files:
/wet-boew/dist-php/config/config-eng.php
/wet-boew/dist-php/config/config-fra.php

Change the img src in the following line. It is the next to last line in the file which starts with:
$SITE['archived'.$LANG] = "

<img src='/wet-boew/dist/js/images/archived/warning.gif'

Replace it with:
$SITE['archived'.$LANG] = "

<img src='".$_SITE['wb_core_dist_folder']."/js/images/archived/warning.gif'

NOTES

  • The above code is only a small part of the complete line.
  • I noticed that this line are also missing in existing language config files other than French and English.

Let me know if you have any questions.

Best regards,

Michael Milette

New variable defines default language of website

As long as we are in development mode, would it be possible to add a new variables?

In the demos-php/config/config.php file:

This one would control the default language for the website:
$_SITE['defaultlang'] = (!isset($_SITE['defaultlang']) ? 'en' : $_SITE['defaultlang']);

It would be used in several places including to determine:

  • Which language comes first in the splash screen.
  • Which language comes first in the server message page.
  • Which language comes first in the language selection menu in the upper-right corner of content pages so that their positioning is consistent like the HTML version and no longer have to swap as they did in some of the wet-boew-php 3.1 themes.

Best regards,

Michael Milette

OGPL Theme - PHP Variant

Hi @upsonp ,

As there wasn't any, I created the OGPL theme for the PHP variant. It's about 90% done.

It works but there are a few issues. For example, I don't have the language selector working properly and the list of demo pages is incomplete when compared with the WET-BOEW HTML version.

I haven't quite figured posting these updates on GitHub yet but, if you are interested, feel free to download it and include it in future versions of the PHP Variant. It's available from:

http://www.tngconsulting.ca/clients/wet-boew/wet-boew-ogpl.zip

This ZIP file includes both the files under dist-php and demos-php but only those related to this theme.

When I get a chance to work on it more, I'll let you know and send you updates.

Best regards,

Michael Milette

Missing Support for language URL override in v4

Hi @upsonp

In wet-boew-php v3.1, I could override the URL of the default language switcher using the following variables:

  $_SITE['gcwu_cmblang_href_eng']
  $_SITE['gcwu_cmblang_href_fra']

Could you please put back the ability to override language selection links in wet-boew-php v4 ? The 2 letter language code variation would be fine:

  $_SITE['gcwu_cmblang_href_en']
  $_SITE['gcwu_cmblang_href_fr']

Best regards,

Michael

Changing eng/fra filename suffixes to en/fr

Now that we are approaching WET v4.0, we will be aligning with i18n conventions and changing our file name suffixes from eng/fra to en/fr. If you use eng/fra suffixes for any of your files then please migrate to the en/fr suffixes at your convenience.

To ensure you don't disrupt search engine results, please use either 301 redirects or canonical rels to help search engines transiton from providing results with eng/fra to en/fr (WET core is using canonical rels because GitHub gh-pages doesn't support 301 redirects).

AWG - PHP variant - site title does not receive focus

Just to note that the PHP examples, have not been updated with the fix, so that in IE8 when you tab from the language selection link to the site title, the focus is not display when it is on the site title. Tabbing brings the focus to the search field where it is once again displayed. This happens in all the PHP examples, and it has been solved before, just not applied to these examples.

@wet-boew/access-working-group

New requirement for WET 4.0

Hi Patrick ... just got email from @pjackson28 saying that:

We transitioned from the three-letter extension to two-letter extension to align with HTML5 which recommends two letter lang codes where possible. The requirement for three-letter extensions was rescinded with CLF 2.0.

As for what v4.0 will use going forward, that will be the two-letter extension.

So can you please modified this file ?

/wet-boew/dist-php/langselect/lang.php

change everything for this

<?php
/*!
 * Web Experience Toolkit (WET) / Boîte à outils de l'expérience Web (BOEW)
 * wet-boew.github.com/wet-boew/License-eng.txt / wet-boew.github.com/wet-boew/Licence-fra.txt
 */
if ($_SERVER['HTTP_REFERER'] != "") {
    $q = $_SERVER['HTTP_REFERER'];
} else {
    $q = "http://" . $_SERVER['HTTP_HOST'] . $_SERVER['QUERY_STRING'];
}
$q = preg_replace('/#(.*)$/', '', $q);
if (preg_match('/_e\./', $q) > 0) {
    $q = preg_replace('/_e\./', '_f.', $q);
} else if (preg_match('/-en\./', $q) > 0) {
    $q = preg_replace('/-en\./', '-fr.', $q);
} else if (preg_match('/-eng\./', $q) > 0) {
    $q = preg_replace('/-eng\./', '-fra.', $q); 
} else if (preg_match('/_f\./', $q) > 0) {
    $q = preg_replace('/_f\./', '_e.', $q);
} else if (preg_match('/-fr\./', $q) > 0) {
    $q = preg_replace('/-fr\./', '-en.', $q);
} else if (preg_match('/-fra\./', $q) > 0) {
    $q = preg_replace('/-fra\./', '-eng.', $q); 
}
header("Location: " . $q . "\n\n");
exit();
?>

Like that you will be ready !

Leftover Dreamweaver Sync Files

Hi again,

Just figured I'd bring this to your attention. Seems like a bunch of _notes folders and dwsync.xml files are currently scattered throughout this repo.

Thanks :).

Archived Page Title

I just uploaded a whole bunch of archived content to my website and our DFO Accessibility Error Tracking Tool (DFO AETT) went nuts. The tool is suppose to ignore archived content, but according to the DFO AETT:

To be considered as archived, a page must have a title which starts 
with ARCHIVED (in English) or ARCHIVÉ (in French).

@pjackson28 @nschonni
Is this an actual WET requirement or is this just something DFO specifically decided to use for the AETT?

@michael-milette @crochefort
If so, when the $_PAGE["isarchived"] value is used should "ARCHIVED" or "ARCHIVÉ" be added as a prefix to the pages title automatically.

Would there be an issue with me adding this to the PHP variant our should I just make this something I do to my personal site?

Footer Navigation Headings Always a Link (proposed solution included!)

If a heading in the footer navigation (About, Contact us, News, Stay Connected) does not have a URL associated with it, it still shows up as a link instead of just a heading. Not only is this is inconsistent with the examples found in the core HTML variant but it produces results which are not WCAG 2.0 Level AA compliant. It also causes problems in the mobile version of menus where an extra link to "News - main page", for example, is unnecessarily displayed.

The solution is to replace this code:

    //add the four required footer menus
    for( $i=1; isset($_SITE['wb_ft'.$i.'_href_'.$_PAGE['lang1']]); $i++ ) {
        $_LINK_ = $_SITE['wb_ft'.$i.'_href_'.$_PAGE['lang1']];
        $_TEXT_ = $_SITE['wb_ft'.$i.'_text_'.$_PAGE['lang1']];
        $_MENU_ = $_SITE['wb_ft'.$i.'_menu_file_'.$_PAGE['lang1']];
        echo '<div class="span-2"><div class="gcwu-col-head"><a'.$_TARGET_.' href="'.$_LINK_.'">'.$_TEXT_.'</a></div>';
        if( file_exists($_MENU_) ) {
            include $_MENU_;
        }
        echo "</div>";
    }

With this code:

    //add the four required footer menus
    for( $i=1; isset($_SITE['wb_ft'.$i.'_text_'.$_PAGE['lang1']]); $i++ ) {
        $_TEXT_ = $_SITE['wb_ft'.$i.'_text_'.$_PAGE['lang1']];
        if (isset($_SITE['wb_ft'.$i.'_href_'.$_PAGE['lang1']]) && strlen($_SITE['wb_ft'.$i.'_href_'.$_PAGE['lang1']]) > 0) {
            // Add link to text only if available
            $_TEXT_ = '<a'.$_TARGET_.' href="'.$_SITE['wb_ft'.$i.'_href_'.$_PAGE['lang1']].'">'.$_TEXT_.'</a>';
        }
        echo '<section><div class="span-2"><h4 class="gcwu-col-head">'.$_TEXT_.'</h4>'.PHP_EOL;

        $_MENU_ = $_SITE['wb_ft'.$i.'_menu_file_'.$_PAGE['lang1']];
        if( file_exists($_MENU_) ) {
            include $_MENU_;
        }
        echo '</div></section>'.PHP_EOL;
    }

This version checks for the existence of text instead of the href URL (can't have a URL without text but you can have text without a URL) and generates appropriate code.

This solution should be applied to the following files (note: code may vary from one theme to the next):

  • /dist-php/theme-base/cont/foot-nav.php
  • /dist-php/theme-wet-boew/cont/foot-nav.php
  • /dist-php/theme-gcwu-fegc/cont/foot-nav.php
  • /dist-php/theme-gcwu-intranet/cont/foot-nav.php

Let me know if you have any questions.

Best regards,

Michael Milette

Last modified variable

Can we change the last modified variable in the file to be like that?

From:
$_PAGE['modified'] = "2013-06-21";
To:
$_PAGE['modified'] = date("Y-d-m",getlastmod());

Since it's all PHP we can maybe try to put some thing automaticly.

What do you think @upsonp ?

AWG - PHP Variant - Usability comment

In the Home Page when tab from the Headlines in column 1 go to the links below the video placeholder in column 2. When tabbing from these links go back to column 1 to the stay connected links. It would seem to me that the stay connected links should come just before the footer. Otherwise they seem to have more importance and in this case they seem to be more important than the minister's links. (Food for thought: Should stay connected links be part of the content, or not?)

@wet-boew/access-working-group

PHP Variant Directory Structure

As I mentioned I'd like to update the PHP variant directory structure.
The way I use the PHP variant is:

  1. download the latest wet-boew zip file and extract.
  2. copy the dist folder from the extracted /wet-boew-dist-master-dist/ directory to the /wet-boew/ directory at the root of my webserver
  3. download the wet-boew-php variant zip and extract
  4. copy files from the /wet-boew-php/demos-php folder into the /wet-boew/dist/ folder at the root of my web server
  5. Preform several mass find and replaces:
  • /dist -> /wet-boew/dist
  • ../dist -> /wet-boew/dist
  • /demos-php -> /wet-boew/dist
  • /build -> /wet-boew/dist

So what I'd like to do is restructure the php variant so the root directory is also the /dist directory and add a demos folder for the theme-gcwu-fegc, theme-gcwu-intranet and theme-base demo files. to bring the php variant more in-line with the other projects.

The root php variant folder should be /dist same as the wet-boew v3.1 distribution or /php-dist if we want the php files to remain separate from the core wet-boew files.

New addition (Archived webpage)

As per your request :)

At the bottom of

dist-php/inc/head-nav.php

// Archived Section
$_ARCHIVED_TEXT = $_SITE['archived_' . $_PAGE['lang1']];
if( $_PAGE['isarchived'] == "1" ){
                echo $_ARCHIVED_TEXT;
}

Last line for
dist-php/config/config-eng.php

$_SITE['archived_'.$_LANG_] = "<p><img src='/wet-boew/dist/js/images/archived/warning.gif' alt='Warning' title='Warning' class='margin-bottom-none' />The <a href='http://www.tbs-sct.gc.ca/pol/doc-eng.aspx?id=24227'>Standard on Web  Usability</a> replaces this content. This content is archived because Common  Look and Feel 2.0 Standards have been rescinded.</p><div id='archived' data-load='archived' >  <h2>Archived Content</h2>  <p>Information identified as archived is provided for reference, research or  recordkeeping purposes. It is not subject to the Government of Canada Web  Standards and has not been altered or updated since it was archived. Please  contact us to request a format other than those available.</p></div><div class='clear'></div>";

Last line for
dist-php/config/config-fra.php

$_SITE['archived_'.$_LANG_] = "<p><img src='/wet-boew/dist/js/images/archived/warning.gif' alt='Avertissement' title='Avertissement' class='margin-bottom-none' />La <a href='http://www.tbs-sct.gc.ca/pol/doc-fra.aspx?id=24227'>Norme sur la facilit&eacute; d'emploi des sites Web</a> remplace ce contenu. Cette page Web a &eacute;t&eacute; archiv&eacute;e parce que les Normes sur la normalisation des sites Internet 2.0 ont &eacute;t&eacute;s annul&eacute;es.</p><div id='archived' class='wet-boew-archived' data-load='archived'><section><h2>Contenu archiv&eacute;</h2><p>L'information dont il est indiqu&eacute; qu'elle est archiv&eacute;e est fournie &agrave; des fins de r&eacute;f&eacute;rence, de recherche ou de tenue de documents. Elle n'est pas assujettie aux normes Web du gouvernement du Canada et elle n'a pas &eacute;t&eacute; modifi&eacute;e ou mise &agrave; jour depuis son archivage. Pour obtenir cette information dans un autre format, veuillez communiquer avec nous.</p></section></div><div class='clear'></div>";

And on the example page or any page you want

$_PAGE['isarchived'] = "1";

Newsroom and Dynamic Title

I just want to know if someone have an Idea of how to get the title tag working if it's declared in the page and not at the top!

I'm using XML for my newsroom because I will probably not pushing that much content so it fit my need and my RSS feed too. But I cannot find a way to have a dynamic title setup with the article title in the content section.

Hope someone will be able to help me figure out something. At the same time I'll be able to work with the archived variable...

I'm using simpleXMLElement to pull the data from my xml file.

If you ask why XML and not Database ... security ... No DB .. no possibility of hack. :)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.