Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

V4.0 #71

Merged
merged 3 commits into from
Jan 14, 2014
Merged

V4.0 #71

merged 3 commits into from
Jan 14, 2014

Conversation

upsonp
Copy link
Member

@upsonp upsonp commented Jan 14, 2014

added demos and other files that were excluded from an earlier push to personal repo.

upsonp added a commit that referenced this pull request Jan 14, 2014
@upsonp upsonp merged commit 55e3e2f into wet-boew:v4.0 Jan 14, 2014
@crochefort
Copy link
Contributor

Took me 2 hours to have 3 page working this morning...

So far this is just what I found.

on the index.php : remove line 20 and 21 since they are already in the config-en/fr ...
Do you want to add this in your index.php ??

<div class="row mrgn-tp-lg">
<div class="col-md-12">
<section class="col-md-6">
<h2 class="h3 text-center"><?php echo $_SITE['wb_site_title_en'] ?></h2>
<a class="btn btn-lg btn-primary btn-block" href="<?php echo $_SITE['wb_site_href_en']; ?>"><?php echo $_SITE['wb_lang_text_en']; ?></a>
<a class="btn btn-lg btn-default btn-block" href="<?php echo $_SITE['wb_terms_href_en']; ?>" rel="license"><?php echo $_SITE['wb_terms_en']; ?></a>
</section>
<section class="col-md-6" lang="fr">
<h2 class="h3 text-center"><?php echo $_SITE['wb_site_title_fr'] ?></h2>
<a class="btn btn-lg btn-primary btn-block" href="<?php echo $_SITE['wb_site_href_fr']; ?>"><?php echo $_SITE['wb_lang_text_fr']; ?></a>
<a class="btn btn-lg btn-default btn-block" href="<?php echo $_SITE['wb_terms_href_fr']; ?>" rel="license"><?php echo $_SITE['wb_terms_fr']; ?></a>
</section>
</div>
</div>

Like this it will be ready. I already change the H2 with the variable.

I know it's not your fault but I don't know if I should just wait to have the new theme but my actual index is looking weard. Since my french is longer than the english, my french is going on 2 line so the box are not perfectly align.

English Text in
|| French
|
__|

I hope it will help you!

@michael-milette
Copy link
Contributor

Hi @upsonp,

Just getting started at my first look. There were just a few initial things I noticed though I haven't done any extensive testing beyond getting to the English home page.

I downloaded v4.0 around noon today. Hope I have the latest. Files seem to be dated January 13 at 7:14 PM.

ISSUE #1

In demos-php/index.php, line 13:

 require_once $path ."/config/theme-gcwu-fegc/config.php";

There is no longer such a file. Should this just be the following now?

 require_once $path ."/config/config.php";

ISSUE #2

I also noticed that the following variables are defined in both config.php and config-path.php located in the demos-php/config directory:

 $_SITE['wb_php_root'] = "";
 $_SITE['wb_core_root'] = "/wet-boew"; 

Is config-path.php still used? If so, I think the config.php file should include it rather than duplicating the code. Otherwise config-path.php should be removed as it can be confusing.

On a side note, for anyone wanting to get this working, if you've structured the folders as follows:

/wet-boew/dist
/wet-boew/dist-php
/wet-boew/dist-demo

Then the above mentioned variables should be defined as:

 $_SITE['wb_php_root'] = "/wet-boew";
 $_SITE['wb_core_root'] = "/wet-boew/dist"; 

... because dist is no longer appended to the variable automatically.

ISSUE #3

In dist-php/inc/sp-pe/head.php, line 3 is:

$_SIG_IMG_ = $_SITE['wb_core_dist_folder'] . $_SITE['wb_theme_folder'] .'/assets/'.$_SITE['wb_sig_image'];

However $_SITE['wb_theme_folder'] is no longer defined. The line should be replaced with:

$_SIG_IMG_ = $_SITE['wb_core_dist_folder'] . '/assets/'.$_SITE['wb_sig_image'];

ISSUE #4

That gets me a blank splash page when I go to demo-php/index.php.

ISSUE #5

Manually skipping along to demo-php/index-en.php, I almost get a working page however PHP gives me the following notice:

Undefined index: wb_lang_cur_en in /wet-boew/dist-php/inc/cont/head.php on line 35

Here is the line it is complaining about:

        $listItem .= '<span>'.$_SITE['wb_lang_cur_'.$_PAGE['lang1']] .'</span>' . "\n";

Haven't taken the time to track down why but I thought I would let you know.

This should get you up and running. Hope this helps!

Best regards,

Michael

@upsonp
Copy link
Member Author

upsonp commented Jan 14, 2014

Thanks @michael-milette I've accepted all of you're solutions and have made the updates. I'm working on my work PC now and will setup the demos here to see if I can confirm & fix issues 4 and 5 you've mentioned.

The WB_LANG_CUR_ variable should be in the dist-php/config/config-en.php and config-fr.php files. I'll have a look just to be sure they weren't excluded from my additional updates last night.

@michael-milette
Copy link
Contributor

Hi @upsonp,

After making the above mentioned changes, I checked the rest of the demo-php site (what you've implemented so far) and it seems to be working quite well except for issue #5 above of course. Haven't looked at the code too much yet other than addressing the above mentioned issues.

Here are a few more notes for you that are related to links.

In the mega menu:

Last but not least, in the footer navigation, under About, the About the Web Experience Toolkit link is missing the http://domain/ part of the URL so it ends up trying to find the page on http://localhost.

The French version of the links probably need to be fixed as well.

The next step for me is to see how it all integrates into my application's theme.

Great work!

Best regards,

Michael

@upsonp
Copy link
Member Author

upsonp commented Jan 14, 2014

@michael-milette Just made a few changes, the wb_lang_cur_ site variable was missing from the language configuration files. I must have forgotten to put it in after externalizing the text, or accidentally removed it when I was restructuring the config files to get rid of unused variables. I've also updated the index.php file to use the same content as the splash page demos.

I've also added the $_SITE['wb_version'] = '4.0.1'; variable we talked about to the main dist-php/config/config.php file.

I'll look into the broken links you mentioned. I imagine they're broken in the core because that's where I copied them from. They should be easy to fix. Good luck with your integration test.

@michael-milette
Copy link
Contributor

Here is the results from my first look at wet-boew-php at the end of the first day. The biggest chunk of the work was converting all of the variables from 3 letter language codes to 2 letters in such a way that it would be backwards compatible with WET 3.1.

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?

The mega menu doesn't work. Can I assuming this is also still on your To Do list @upsonp ? the demo-php site doesn't have any pulldown list examples so I couldn't tell whether it was me or the php code without digging into the wet-boew-php code.

Only the headings for my footer navigation showed up (About, News, etc). The actual content didn't. Again, I might have missed converting some 3 letter language codes to 2 letters and will need to look into that a little more.

The layout of my pages are also quite the mess. I am assuming that's because I will have to make some changes to the HTML structure code of my pages since the demo site pages do appear to display correctly. That's still on my To Do list and fortunately I am customizing a theme and don't have to dig through a whole site of pages.

Any notes and migration tips you have to offer here are most appreciated.

Best regards,

Michael

@upsonp
Copy link
Member Author

upsonp commented Jan 15, 2014

As always thanks for the input @michael-milette,

This will go a long way to helping me make the corrections.

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?

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.

The mega menu doesn't work. Can I assuming this is also still on your To Do list @upsonp ? the demo-php site doesn't have any pulldown list examples so I couldn't tell whether it was me or the php code without digging into the wet-boew-php code.

They did change the code for how the mega menu works I mentioned it in issue #64 somewhere. We're going to have to continue to work on it.

Only the headings for my footer navigation showed up (About, News, etc). The actual content didn't. Again, I might have missed converting some 3 letter language codes to 2 letters and will need to look into that a little more.
I think the code for the tail menus is slightly different as well.

The layout of my pages are also quite the mess. I am assuming that's because I will have to make some changes to the HTML structure code of my pages since the demo site pages do appear to display correctly.

I haven't had time to really look at the structure of the content for the samples, I mostly just copied and pasted, but didn't take time to closely examine it. I think they've done away with the grid layout and are using new CSS classes for page layouts, which is going to really badly affect how easily it is to migrate from 3.1 to 4.0.

My goal at the moment is get it working, get it producing HTML exactly the same as the core v4.0-dist, get some of the 4.0 working examples working correctly using PHP. Then we'll have to figure out what's required to migrate from 3.1 to 4.0. So much has been done away with in the core and file structures have changed I don't see how this would be an easy migration for anyone who's not using a dynamic language like PHP.

@michael-milette
Copy link
Contributor

As long as we are in development mode, would it be possible to add a couple of 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.

The second variable 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 restricted from being able to modify the application core code or the WET core code 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

@nschonni
Copy link
Member

@michael-milette separate issues for each request is usually a good idea

@upsonp
Copy link
Member Author

upsonp commented Jan 16, 2014

@michael-milette Great ideas, As @nschonni suggested could you please open a separate request for each. It'll help me keep track of what has been and what needs to be done. I saw the notice for this request in my e-mail just before bed last night and went looking for it. I had a hard time finding it this morning because it was in a closed request.

@michael-milette
Copy link
Contributor

You got it! I posted two separate issues (#76 and #77) as requested.

Best regards,

Michael

@michael-milette
Copy link
Contributor

FYI: Got the Footer (tail) menu working. It isn't formatted correctly (probably style changes) but now at least it shows up. As expected, it was the change from 3 letter language codes to 2 letters which tripped me up. My files names still had 3 letters.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants