vb.org Archive

vb.org Archive (https://vborg.vbsupport.ru/index.php)
-   vB4 Programming Discussions (https://vborg.vbsupport.ru/forumdisplay.php?f=252)
-   -   A question about ending PHP comments with //--> (https://vborg.vbsupport.ru/showthread.php?t=263301)

TWood 05-07-2011 05:54 PM

A question about ending PHP comments with //-->
 
I notice that in some of the templates the PHP comments must be ended with //--> in order to work properly. Others allow the standard --> ending. Is there a rationale to when one must be used over the other?

Thanx

Lynne 05-07-2011 07:41 PM

There should be no php in the templates, so I'm not sure what you are talking about. What you are showing above is regular html comment tags, not php comment tags.

TWood 05-07-2011 09:43 PM

My bad then, but what I see is that

<!-- works as a comment -->

but

<!--
code
-->

sometimes works and sometimes doesn't work to disable code, and there are times when I see

<!--
code
//-->

that works to disable the code in the templates.

kh99 05-07-2011 10:19 PM

I've noticed that <!-- --> doesn't always work in a template, but I think it has to do with what happens to be between the comment markers. I'm guessing the template parser doesn't look for html comments so sometimes they mess it up (but I'm not sure).

I always thought that <!-- ... //--> was used when you want to protect javascript against browsers that don't understand it (which I'm not sure is really much of a concern these days), because the //--> will look like a comment in javascript.


All times are GMT. The time now is 07:56 AM.

Powered by vBulletin® Version 3.8.12 by vBS
Copyright ©2000 - 2025, vBulletin Solutions Inc.

X vBulletin 3.8.12 by vBS Debug Information
  • Page Generation 0.02016 seconds
  • Memory Usage 1,705KB
  • Queries Executed 10 (?)
More Information
Template Usage:
  • (1)ad_footer_end
  • (1)ad_footer_start
  • (1)ad_header_end
  • (1)ad_header_logo
  • (1)ad_navbar_below
  • (1)footer
  • (1)gobutton
  • (1)header
  • (1)headinclude
  • (6)option
  • (1)post_thanks_navbar_search
  • (1)printthread
  • (4)printthreadbit
  • (1)spacer_close
  • (1)spacer_open 

Phrase Groups Available:
  • global
  • postbit
  • showthread
Included Files:
  • ./printthread.php
  • ./global.php
  • ./includes/init.php
  • ./includes/class_core.php
  • ./includes/config.php
  • ./includes/functions.php
  • ./includes/class_hook.php
  • ./includes/modsystem_functions.php
  • ./includes/class_bbcode_alt.php
  • ./includes/class_bbcode.php
  • ./includes/functions_bigthree.php 

Hooks Called:
  • init_startup
  • init_startup_session_setup_start
  • init_startup_session_setup_complete
  • cache_permissions
  • fetch_threadinfo_query
  • fetch_threadinfo
  • fetch_foruminfo
  • style_fetch
  • cache_templates
  • global_start
  • parse_templates
  • global_setup_complete
  • printthread_start
  • bbcode_fetch_tags
  • bbcode_create
  • bbcode_parse_start
  • bbcode_parse_complete_precache
  • bbcode_parse_complete
  • printthread_post
  • printthread_complete