Ravens PHP Scripts: Forums
 

 

View next topic
View previous topic
Post new topic   Reply to topic    Ravens PHP Scripts And Web Hosting Forum Index -> RavenNuke(tm) v2.5x
Author Message
neralex
Site Admin



Joined: Aug 22, 2007
Posts: 1774

PostPosted: Mon Apr 09, 2012 12:02 pm Reply with quote

hey guys!

i found into the mimetype.php, located in the includes folder, a crazy markup of the DOCTYPE. the same crazy markup was in RN 2.4.x, too. there is an explanation for why this was not only written in php? such a spell, I do not even know of you. Smile

near line 100:
Code:
if (DOCTYPE == "strict") { ?>

<!DOCTYPE html
     PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN"
     "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">
<html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en" lang="en">
<?php } else if (DOCTYPE == "frameset") { ?>
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Frameset//EN"
   "http://www.w3.org/TR/xhtml1/DTD/xhtml1-frameset.dtd">
<html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en" lang="en">
<?php } else if (DOCTYPE == "math") { ?>
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.1 plus MathML 2.0//EN"
               "http://www.w3.org/TR/MathML2/dtd/xhtml-math11-f.dtd">
<html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en">
<?php } else { ?>
<!DOCTYPE html
   PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN"
   "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en" lang="en">
<?php } ?>
<head>
<?php
if(!isset($dhMETA)) $dhMETA = array('title' => array(1 => ''));
if (strlen(trim($dhMETA['title'][1]))>0) {?>
   <title><?php echo $dhMETA['title'][1]; // nukeSEO(tm) Dynamic HEAD ?></title>
<?php } ?>
<meta http-equiv="Content-Type" content="<?php echo $mime ?>;charset=<?php echo $charset ?>" />


in this way is not much clearer?

Code:
if (DOCTYPE == "strict") {

   echo '<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">'."\n";
   echo '<html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en" lang="en">'."\n";
} else if (DOCTYPE == "frameset") {
   echo '<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Frameset//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-frameset.dtd">'."\n";
   echo '<html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en" lang="en">'."\n";
} else if (DOCTYPE == "math") {
   echo '<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.1 plus MathML 2.0//EN" "http://www.w3.org/TR/MathML2/dtd/xhtml-math11-f.dtd">'."\n";
   echo '<html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en">'."\n";
} else {
   echo '<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">'."\n";
   echo '<html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en" lang="en">'."\n";
}
   echo '<head>';

if(!isset($dhMETA)) $dhMETA = array('title' => array(1 => ''));
if (strlen(trim($dhMETA['title'][1]))>0) {
   echo '<title>'.$dhMETA['title'][1].'</title>'."\n"; // nukeSEO(tm) Dynamic HEAD
}
   echo '<meta http-equiv="Content-Type" content="'.$mime.';charset='.$charset.'" />'."\n";
?>
 
View user's profile Send private message
spasticdonkey
RavenNuke(tm) Development Team



Joined: Dec 02, 2006
Posts: 1693
Location: Texas, USA

PostPosted: Tue Apr 10, 2012 8:13 am Reply with quote

I agree that reads much better and the current file is somewhat a mess, imo. No promises as some of our priorities are still being ironed out, but It's likely that file will be removed and/or replaced by a better method in the next major release.
 
View user's profile Send private message Visit poster's website
kguske
Site Admin



Joined: Jun 04, 2004
Posts: 6433

PostPosted: Sun Jan 23, 2022 2:59 pm Reply with quote

Was looking for info on mimetype and found this old post. Just wanted to add for anyone interested that you can have a theme-specific mimetype file in themes/YourTheme/mimetype.php

This will completely replace the mimetype file that came with RN.

_________________
I search, therefore I exist...
nukeSEO - nukeFEED - nukePIE - nukeSPAM - nukeWYSIWYG
 
View user's profile Send private message
neralex







PostPosted: Tue Jan 25, 2022 9:11 am Reply with quote

Which is the only statement, which I found:
[ Only registered users can see links on this board! Get registered or login! ]

But yeah, there is a way to add it.
 
Display posts from previous:       
Post new topic   Reply to topic    Ravens PHP Scripts And Web Hosting Forum Index -> RavenNuke(tm) v2.5x

View next topic
View previous topic
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 can attach files in this forum
You can download files in this forum


Powered by phpBB © 2001-2007 phpBB Group
All times are GMT - 6 Hours
 
Forums ©