Basic question, why are a lot of the vBulletin php tags not enclosed properly?

Collapse
X
 
  • Time
  • Show
Clear All
new posts
  • pisymbol
    New Member
    • Jul 2009
    • 18

    [Forum] Basic question, why are a lot of the vBulletin php tags not enclosed properly?

    I am a total n00b. However, I notice that a lot of the source does not end the php code tag. Why? My sandbox on my local machine works but is there any reason for this?

    i.e. page starts at the top "<?php" but there is no "?>" to finish it.

    e.g. misc.php , forum.php etc. etc. Its all over the place, it looks like the download script that marks each source file truncates this or am I way off?
  • steven s
    Senior Member
    • Jul 2004
    • 3722
    • 3.8.x

    #2
    What little I know,
    PHP Code:
    ?> 
    is not necessary with the current version of PHP.
    There is still a lot of cleaning up to do in the templates too.
    I see
    HTML Code:
    <!-- -->
    which I believe is being replaced with
    Code:
    <vb:comment> </vb:comment>
    Last edited by steven s; Sun 10 Jan '10, 6:18am.
    ...steven
    www.318ti.org (vB3.8) | www.nccbmwcca.org (vB4.2)
    bmwcca.org/forum | m135i.net
    "I tried to clean this up but this thread is beyond redemption." - Steve Machol

    Comment

    • Dody
      Senior Member
      • Aug 2004
      • 1896
      • 3.8.x

      #3
      This is intentional, to prevent PHP from outputting a whitespace that can break your forum.
      while(true){
      if(
      $someone->needsHelp() && $i->canHelp()) $post->help();
      if(
      $i->findBug()) $post->bug();
      }

      Comment

      • Trevor Hannant
        vBulletin Support
        • Aug 2002
        • 24358
        • 5.7.X

        #4
        The problem with writing for the current version of PHP is that not everyone is using it....
        Vote for:

        - Admin Settable Paid Subscription Reminder Timeframe (vB6)
        - Add Admin ability to auto-subscribe users to specific channel(s) (vB6)

        Comment

        • pisymbol
          New Member
          • Jul 2009
          • 18

          #5
          Got it. Yea I'm just new to the PHP world. The newline issue is bizarre to me given how ancient it is.

          Comment

          widgetinstance 262 (Related Topics) skipped due to lack of content & hide_module_if_empty option.
          Working...