Find out more about the “Show Off Your Avatar Campaign
RocketTheme  |  General  |  Free/GPL/Tutorials Discussions  |  Topic: How to Comment out « previous next »
Pages: [1] Go Down Print
Author Topic: How to Comment out  (Read 4332 times)
James S!
Muffin Man
RocketTheme
Hero Rocketteer
*
Offline Offline

Posts: 38324


Firebug...Firebug...Firebug!

WWW
How to Comment out
« on: October 08, 2007, 12:28:27 PM »

HTML Commenting

1. Example Code
Quote
<div class="example"></div>
2. Comment
Quote
<!--<div class="example"></div>-->

CSS Commenting

1. Example Code
Quote
div.example{}
2. Comment
Quote
/*div.example{}*/

PHP Commenting

1. Example Code
Quote
<div class="<?php echo $example ?>"></div>
2. Comment
Quote
<div class="<?php /*<?php echo $example ?>*/ ?>"></div>
Logged

Firebug Video Tuts: - Editing HTML - Javascript Errors - Logo Changes

Video tutorials on how to use Firebug, its what we use Smiley
Amgeek
Rocketeer
***
Offline Offline

Posts: 50


This was gonna be soooo easy!

WWW
Re: How to Comment out
« Reply #1 on: October 11, 2007, 05:04:17 AM »

Thanks, James, I needed that.

Just to be sure I understand:
                       HTML method used on files like “index.htm” or “.html”?
                       CSS method on files like template_css.css ?
                       PHP method of files like “index.php”?


Now, how about something like this for solving the problem of multiple or conflicting javascript entries.

                         How to find them,
                         Which one needs to be moved and exactly where to move it
                         Which ones need to be commented out and how
Logged
James S!
Muffin Man
RocketTheme
Hero Rocketteer
*
Offline Offline

Posts: 38324


Firebug...Firebug...Firebug!

WWW
Re: How to Comment out
« Reply #2 on: October 11, 2007, 10:00:39 AM »

Just to be sure I understand:
                       HTML method used on files like “index.htm” or “.html”?
                       CSS method on files like template_css.css ?
                       PHP method of files like “index.php”?
Yes and no. You can find HTML, CSS and PHP in the index.php and vice versa but the norm is as you described. You can tell from the syntax used.

Now, how about something like this for solving the problem of multiple or conflicting javascript entries.

                         How to find them,
                         Which one needs to be moved and exactly where to move it
                         Which ones need to be commented out and how

An example script entry in the index.php
<script type="text/javascript" src="<?php echo $mosConfig_live_site;?>/templates/<?php echo $mainframe->getTemplate(); ?>/js/mootools.js"></script>

For that, use the HTML commenting method.

If there is incompatible, comment out all scripts except ie.js or ie_suckerfish.js which is needed for IE and suckerfish. Examples are reflection.js, rokzoom.js, slimbox.js and rokmoomenu.js

For all <script ... /> syntax in templates, use HTML commenting
Logged

Firebug Video Tuts: - Editing HTML - Javascript Errors - Logo Changes

Video tutorials on how to use Firebug, its what we use Smiley
Pages: [1] Go Up Print 
RocketTheme  |  General  |  Free/GPL/Tutorials Discussions  |  Topic: How to Comment out « previous next »
Jump to: