Web CMS Designs: Forums
 

 
Post new topic Reply to topic
Message
Display posts from previous:       
PostPosted: Fri Aug 10, 2012 8:52 am
Reply with quote Back to top
nextgen
Newbie
Newbie
Joined: Aug 05, 2012
Posts: 49
Location: Maryland

View user's profile Send private message Send e-mail Visit poster's website Yahoo Messenger MSN Messenger
Buddy i found a perfect solution for html5 in RN so all W3C checks show valid and am working on the theme right now. As soon as i get a base theme done i will pass along to you. Is a great resolution till RN 3 arrives.
nextgenwith Kindness comes many rewards.
 
PostPosted: Sat Aug 18, 2012 8:24 am
Reply with quote Back to top
spasticdonkey
Newbie
Newbie
Joined: Nov 18, 2010
Posts: 106
Location: Texas

View user's profile Send private message Visit poster's website
Sounds cool I look forward to seeing what you come up with. Just a note, while most all of the deprecated html tags in html5 have been removed from RN v2.5, there is still a long way to go regarding tables.

Most notably the usage of attributes such as cellpadding, cellspacing, valign, align, and improper border values (border attribute can have two values: "1 "and "")

Also, there is still too much usage of tables for presentation, which is discouraged in html5. Nowadays tables should only really be used for data and for html5 compatibility should use a minimalistic markup.

That being said, most browsers that support html5 should be tolerant of these issues, just trying to raise awareness of the work ahead. It gets even more complicated in terms of mobile optimization as most tables contain too much data to be legible on mobile devices. I spent several hours trying to get the blocks acp to fit a 320px screen, and eventually got there with some complicated css selectors but it was more difficult than it should have been... But I digress..
spasticdonkeywebcmsdesigns
 
PostPosted: Thu Aug 23, 2012 2:49 am
Reply with quote Back to top
nextgen
Newbie
Newbie
Joined: Aug 05, 2012
Posts: 49
Location: Maryland

View user's profile Send private message Send e-mail Visit poster's website Yahoo Messenger MSN Messenger
I found the following pains in the rear in the forums code. All edits need to be inline as far as class, ID etc.

You do need to watch and see just what does work with IE7 + and it is very well noted so should not be an issue to see just what works in older browsers. Not sure why IE is still lagging behind but if the html5 and css3 code is still years away from becoming a standard i can see that they do have more important things on their plates. After all the "Diamond" which is Windows 8 is ready for release and they are scrambling to grab some ground in the mobile market as well.

I love HTML5 and want to use it so bad but even as of right now i am tempted to revert my 2 themes i am doing back away from html5 as the headache of display between firefox, chrome and IE are the headache of a lifetime for me.

If i had spastics knowledge i could have banged out 5 themes by now in comparison to his theme which is very feature rich and fast loading.

Spastc, you need to share your knowledge in a book and send me about 5 copies as i have never seen you be stumped or beaten by any issue.
nextgenwith Kindness comes many rewards.
 
PostPosted: Thu Aug 23, 2012 5:55 am
Reply with quote Back to top
spasticdonkey
Newbie
Newbie
Joined: Nov 18, 2010
Posts: 106
Location: Texas

View user's profile Send private message Visit poster's website
Believe me I get stumped all the time and probably wouldn't enjoy it as much if it wasn't a constant challenge. Not sure when I would have time to write a book, but if I do you can have a signed copy Razz

I wouldn't worry too much about HTML5 support in older browsers at this point. There are some good JS libraries for adding unsupported features in lame browsers, but I'll need to ask around what library is best suited for the job. I would get it working in Chrome/Firefox first, and worry about IE later... But that's just me, and I have at times ran into issues with that approach.

Creating a quality theme is time consuming, especially when it gets into the forum templates (regardless of doctype)... I have been working on this theme off and on for a couple years, and it's still probably not finished completely. Rolling Eyes

If my site is loading fast, that's great Smile Although I have to admit it is not a lightweight theme, nor is it properly optimized or efficient as it could be from a CSS perspective. The faster than average load times are probably due to the fact I'm using minify http://code.google.com/p/minify/ to serve my CSS and JS files. Instead of the browser having to download 30+ individual CSS/JS files they are compressed (and cached) and served as three. If you look at the source code you'll see some crazy URL's for my CSS/JS loads

html Code:
<link rel="stylesheet" href="min/f=themes/Chameleon/style/gsearch.css,themes/ravennuke.css,themes/Chameleon/style/style.css,includes/jquery/css/colorbox.css,includes/nukeSEO/nukePIE.css,includes/jquery/css/nukeNAV.css,themes/Chameleon/style/nukeNAV.css,modules/News/css/socialicons.css,modules/Tags/css/tags.css,themes/Chameleon/style/searchblock.css,./themes/Chameleon/style/ctopics.css" type="text/css" />

<script type="text/javascript" language="JavaScript" src="min/f=includes/jquery/jquery.js,themes/Chameleon/style/jquery.tools.min.js,themes/Chameleon/style/smoothanchors.js,themes/Chameleon/style/jquery.tablesorter.min.js,themes/Chameleon/style/jquery.truncator.js,themes/Chameleon/style/jquery.filestyle.mini.js,includes/rn.js,includes/jquery/jquery.colorbox-min.js,includes/jquery/colorbox-settings.js,includes/boxover/boxover.js,includes/jquery/jquery.hoverIntent.minified.js,includes/jquery/superfish.js,includes/jquery/supersubs.js,includes/jquery/nukeNAV.js"></script>


If your interested in trying this, these are the modified functions in mainfile, just make sure you have minify setup and working properly prior to trying this... They have testing scripts and documentation available, which I would recommend. It was a little finicky to setup for me, but I got there. Consider this somewhat "BETA" in nature as I haven't had any feedback from experienced coders on these modifications. So use at your own risk Smile

I've been using without issue for about a month now, but note that it does consume some server space as minify has to cache 2 versions of every possible comination of CSS and JS files. At current I have about 300 files @ 20MB related to the minify cache, which will vary from site to site. One last cool note is that minify will also serve a GZ compressed version of the files to browsers/devices that support it, which equates to a huge difference in filesize, for instance file.js (155kb) or file.gz (52kb)

Ok, I said "without issue" but just remembering I did have to remove any CSS references to files wrapped in double quotes, I.E.
background: transparent url("../images/pageback4.jpg");
should be
background: transparent url(../images/pageback4.jpg);
. This was an issue because minify has to rewrite all file paths within the CSS file since it is served from a different location..

EXAMPLE
Before Minify
background: transparent url(../images/pageback4.jpg);

After Minify
background: transparent url(/themes/YOUR_THEME/images/pageback4.jpg);


For whatever reason minify did not properly rewrite the paths if wrapped in double quotes, so if needed edit your css files and just remove them (replacing with single quotes may, or may not, work too).

Edited Functions:

php Code:
function writeHEAD() {

global $headCSS, $headJS;
if (is_array($headCSS) && count($headCSS) > 0) {
$comma = $cssList = $cssInline = '';
foreach($headCSS AS $css) {
if ($css[0]=='file') {
$cssList .= $comma . $css[1];
$comma = ',';
} else {
$cssInline .= $css[1];
}
}
echo '<link rel="stylesheet" href="min/f=' . $cssList . '" type="text/css" />' . "\n";
echo $cssInline;
}

if (is_array($headJS) && count($headJS) > 0) {
$comma = $jsList = $jsInline = '';
foreach($headJS AS $js) {
if ($js[0] == 'file') {
$jsList .= $comma . $js[1];
$comma = ',';
} else {
$jsInline .= $js[1];
}
}
if(defined('HTML5')){
echo '<script type="text/javascript" src="min/f=' . $jsList . '"></script>' . "\n";
} else {
echo '<script type="text/javascript" language="JavaScript" src="min/f=' . $jsList . '"></script>' . "\n";
}
echo $jsInline;
}
return;
}

php Code:
function writeBODYJS() {

global $bodyJS;
if (is_array($bodyJS) && count($bodyJS) > 0) {
$comma = $jsList = $jsInline = '';
foreach($bodyJS AS $js) {
if ($js[0] == 'file') {
$jsList .= $comma . $js[1];
$comma = ',';
} else {
$jsInline .= $js[1];
}
}
if(defined('HTML5')){
echo '<script type="text/javascript" src="min/f=' . $jsList . '"></script>' . "\n";
} else {
echo '<script type="text/javascript" language="JavaScript" src="min/f=' . $jsList . '"></script>' . "\n";
}
echo $jsInline;
}
return;
}


This was originally discussed at Guardian's site (he is still out of town), but I wanted to be clear about what code I used as a few examples were posted there. I tweaked the approach from his first example as the files are grouped by the functions above, not the builder ap which comes with minify. Minify requires a mod-rewrite enabled server, btw..
http://www.code-authors.com/ftopicp-5838.html

Guess I just got completely off topic, but I thought it was worthy of mentioning Smile
spasticdonkeywebcmsdesigns
 
PostPosted: Fri Sep 07, 2012 10:08 am
Reply with quote Back to top
nextgen
Newbie
Newbie
Joined: Aug 05, 2012
Posts: 49
Location: Maryland

View user's profile Send private message Send e-mail Visit poster's website Yahoo Messenger MSN Messenger
Buddy you use raven web hosting as well ?
nextgenwith Kindness comes many rewards.
 
PostPosted: Fri Sep 07, 2012 11:25 am
Reply with quote Back to top
spasticdonkey
Newbie
Newbie
Joined: Nov 18, 2010
Posts: 106
Location: Texas

View user's profile Send private message Visit poster's website
Yes. Did you have trouble setting up minify? The setting which gave me trouble was
$min_cachePath


Generally it should look just like your .htaccess path (from Sentinel) but with cache at the end instead of .htaccess

$min_cachePath = '/home/user/html/yoursite.com/cache';


There is a testing script available http://code.google.com/p/minify/wiki/TestingMinify which was helpful for me. It still registered a failure or two for me after it was working, and didn't seem to recognize my cache path, which I believe was the issue I had setting it up.
spasticdonkeywebcmsdesigns
 
PostPosted: Sun Sep 09, 2012 5:23 am
Reply with quote Back to top
nextgen
Newbie
Newbie
Joined: Aug 05, 2012
Posts: 49
Location: Maryland

View user's profile Send private message Send e-mail Visit poster's website Yahoo Messenger MSN Messenger
How did you guess LOL. It was pretty much straight forward or so i thought. Smile I removed my import command from my css for the fonts.css and lost the font css. I did add it to the list of css's i wanted minify to pull in so i knew i had something wrong.
nextgenwith Kindness comes many rewards.
 
PostPosted: Sun Sep 09, 2012 5:26 am
Reply with quote Back to top
nextgen
Newbie
Newbie
Joined: Aug 05, 2012
Posts: 49
Location: Maryland

View user's profile Send private message Send e-mail Visit poster's website Yahoo Messenger MSN Messenger
here were my test results:

Quote PASS: environment : DOCUMENT_ROOT should not end in trailing slash (1 of 1 tests run so far have passed)
PASS: environment : DOCUMENT_ROOT should pass realpath() (2 of 2 tests run so far have passed)
PASS: environment : DOCUMENT_ROOT should contain this test file (3 of 3 tests run so far have passed)

Returned content should be 6 bytes and not HTTP encoded.
Headers returned by: http://alterednuke.com/min_unit_tests/test_environment.php?hello=js

array (
0 => 'HTTP/1.1 200 OK',
1 => 'Date: Sat, 08 Sep 2012 19:25:03 GMT',
2 => 'Server: Apache',
3 => 'X-Powered-By: PHP/5.2.16',
4 => 'Cache-Control: max-age=300',
5 => 'Expires: Sat, 08 Sep 2012 19:30:03 GMT',
6 => 'Connection: close',
7 => 'Content-Type: application/x-javascript',
)

!FAIL: environment : PHP/server should not auto-encode application/x-javascript output (1 of 4 tests run so far have failed)

Returned content should be 6 bytes and not HTTP encoded.
Headers returned by: http://alterednuke.com/min_unit_tests/test_environment.php?hello=css

array (
0 => 'HTTP/1.1 200 OK',
1 => 'Date: Sat, 08 Sep 2012 19:25:03 GMT',
2 => 'Server: Apache',
3 => 'X-Powered-By: PHP/5.2.16',
4 => 'Cache-Control: max-age=300',
5 => 'Expires: Sat, 08 Sep 2012 19:30:03 GMT',
6 => 'Connection: close',
7 => 'Content-Type: text/css',
)


Returned content should be 6 bytes and not HTTP encoded.
Headers returned by: http://alterednuke.com/min_unit_tests/test_environment.php?hello=html

array (
0 => 'HTTP/1.1 200 OK',
1 => 'Date: Sat, 08 Sep 2012 19:25:03 GMT',
2 => 'Server: Apache',
3 => 'X-Powered-By: PHP/5.2.16',
4 => 'Connection: close',
5 => 'Content-Type: text/html',
)


Returned content should be 6 bytes and not HTTP encoded.
Headers returned by: http://alterednuke.com/min_unit_tests/test_environment.php?hello=faketype

array (
0 => 'HTTP/1.1 200 OK',
1 => 'Date: Sat, 08 Sep 2012 19:25:03 GMT',
2 => 'Server: Apache',
3 => 'X-Powered-By: PHP/5.2.16',
4 => 'Connection: close',
5 => 'Content-Type: text/faketype',
)
nextgenwith Kindness comes many rewards.
 
PostPosted: Thu Dec 19, 2013 3:38 pm
Reply with quote Back to top
Guardian
Newbie
Newbie
Joined: Sep 22, 2012
Posts: 23

View user's profile Send private message
I need to look into this again for RavenCMS. I know by default we'll likely be using minified CSS any way but if we can process them gziped or get them to parallel load (one http request to encompass several files) it migt be worth the effort.
GuardianScript Shack
 
PostPosted: Tue Dec 24, 2013 10:35 pm
Reply with quote Back to top
spasticdonkey
Newbie
Newbie
Joined: Nov 18, 2010
Posts: 106
Location: Texas

View user's profile Send private message Visit poster's website
I agree as this was on my list of questions for later on. I assume there's a way to extend the header class to do so? Or are you talking about adding minification to the core method? (minify does require some additional setup on the server)

I've been happy with minify and it does have gzip support built-in.
http://code.google.com/p/minify/
spasticdonkeywebcmsdesigns
 
PostPosted: Sun Jan 05, 2014 12:23 pm
Reply with quote Back to top
Guardian
Newbie
Newbie
Joined: Sep 22, 2012
Posts: 23

View user's profile Send private message
I see you mentioned a problem with files using @ import - I'll need to look into that.
Yes, that's the beauty of using a Class. Instead of running around all over the place looking for related code and re-writing code, we know our class handles all our CSS related functions and anything to do with the loading of CSS, HAS to run through the class, so it shouldn't be too complex to implement it.
Since our basic process builds an array of CSS files, we should be able to just pass that, with minor modifications, into the minifier.
The caveat of course is that I think we would need to make it optional, as there is no telling what third parties might have in their own CSS files to potentially break it and the amount of code needs to be kept to a minimum so the class file doesn't turn into a monster.
Of course, we could (subject to the CSS files being suitable) possibly enforce minifing on our Framework and other 'core' CSS by default.

I'll likely be waiting a few days for feedback on Site Guardian (sent you mail about that) so I'll use that time to look into minification.
 
PostPosted: Tue Jan 07, 2014 4:37 am
Reply with quote Back to top
spasticdonkey
Newbie
Newbie
Joined: Nov 18, 2010
Posts: 106
Location: Texas

View user's profile Send private message Visit poster's website
I'll have to review the css import issue with minify. It may have only occurred when using relative paths to the files. The Bootswatch themes use css import but use absolute paths (for the fonts); so they may be ok.

Look forward to checking out your module, but my public RN sites are not at php version 5.3 yet Sad
WARNING! The minimum PHP version is 5.3 your version is 5.2.16
spasticdonkeywebcmsdesigns
 
PostPosted: Sat Jan 11, 2014 3:10 pm
Reply with quote Back to top
Guardian
Newbie
Newbie
Joined: Sep 22, 2012
Posts: 23

View user's profile Send private message
Well at least that bit works Smile
I have actually re-written the file change scanner now. Much faster, only one table instead of the three and changed the file hashing method (had some false positives during testing) but if you need to use it, in the modules admin/installer/install.php just change the PHP version there from 5.3 to 5.2 and it will let you proceed.

Having said that though, I hope to have the proper version released in the next few days so I'll send you a copy of that.

Had a quick look at Minify and not sure we can implement it just yet. We might need to wait until after initial release as it's actually going to require adding a fair bit more code to the header class as we need to remove our auto versioning for local files if minification is turned on, plus some other stuff. Not sure the extra PHP processing and data held in memory is going to offset the speed performance of parallel loading CSS files especially as some browsers (IE) don't like it any way. So much to do, not sure I can spare a few weeks to dive into it Sad
 
PostPosted: Thu Dec 29, 2016 12:34 am
Reply with quote Back to top
laurencemike
Newbie
Newbie
Joined: Dec 28, 2016
Posts: 6

View user's profile Send private message
Html it i very important now a day it is standard method every developer use this format
 
Post new topic Reply to topic Web CMS Designs Forum Index Coding Discussion HTML5
Your AccountNew Members
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum
You cannot attach files in this forum
You cannot download files in this forum


Powered by phpBB © 2001-2008 phpBB Group
 
 
Papa Mike Creations