[PHP] and [CODE]

This is a discussion on [PHP] and [CODE] within the A Brief History of Cprogramming.com forums, part of the Community Boards category; PHP Code: Has a scrollbar  ----------------------------------------------------------------------------------->  Code: Doesn't have a scrollbar --------------------------------------------------------------------------> Which is a shame because everyone uses the code tags ...

  1. #1
    Devil's Advocate SlyMaelstrom's Avatar
    Join Date
    May 2004
    Location
    Out of scope
    Posts
    4,077

    [PHP] and [CODE]

    PHP Code:
    Has a scrollbar -----------------------------------------------------------------------------------> 
    Code:
    Doesn't have a scrollbar -------------------------------------------------------------------------->
    Which is a shame because everyone uses the code tags and as you can see, the page occasionally requires a scroll. I personally find it more convienient when the code block has the bar.

    I don't know if vBulletin's source can be edited, though I'd imagine it's PHP, but it'd be nice if anyone knew a way to fiddle around with the tags functionality so the code tag would work the same as the PHP tag.
    Sent from my iPadŽ

  2. #2
    C++ Witch laserlight's Avatar
    Join Date
    Oct 2003
    Location
    Singapore
    Posts
    22,271
    Yeah, using the php bbcode tags seems natural on a PHP centric forum... what if we have [ccode] or [cpp] bbcode tags too?
    C + C++ Compiler: MinGW port of GCC
    Version Control System: Bazaar

    Look up a C++ Reference and learn How To Ask Questions The Smart Way

  3. #3
    Devil's Advocate SlyMaelstrom's Avatar
    Join Date
    May 2004
    Location
    Out of scope
    Posts
    4,077
    If it's possible to add them, then I'm all for it. Though I'm not sure if vBulliten is just a code package that you load onto your web server or if it's some sort of uneditable(or any other way you'd like to make this word up) compiled object package that you just install onto the server. If those things are changed, then I'd even be willing to look at the source and see what I could do. A good code tag with good formatting and color-coding could do wonders for this forum.
    Sent from my iPadŽ

  4. #4
    chococoder
    Join Date
    Nov 2004
    Posts
    515
    php is an interpreted language similar to Perl, there is no compilation stage.

  5. #5
    Devil's Advocate SlyMaelstrom's Avatar
    Join Date
    May 2004
    Location
    Out of scope
    Posts
    4,077
    Yes, I understand that... but I was thinking along the lines of something like a lockfile. Ever work with MS Access? You know how you can create an .mde which can basically restrict the user's ability to do anything but use the database(no editing). I wasn't sure if vBulletin did something like that to their package. Sorry for using the word compile.
    Sent from my iPadŽ

  6. #6
    C++ Witch laserlight's Avatar
    Join Date
    Oct 2003
    Location
    Singapore
    Posts
    22,271
    php is an interpreted language similar to Perl, there is no compilation stage.
    While this is true for the most part, Zend Encoder and ionCube PHP Encoder are sometimes used to distribute PHP scripts in a form such that humans cannot edit them.
    C + C++ Compiler: MinGW port of GCC
    Version Control System: Bazaar

    Look up a C++ Reference and learn How To Ask Questions The Smart Way

  7. #7
    Devil's Advocate SlyMaelstrom's Avatar
    Join Date
    May 2004
    Location
    Out of scope
    Posts
    4,077
    Quote Originally Posted by laserlight
    While this is true for the most part, Zend Encoder and ionCube PHP Encoder are sometimes used to distribute PHP scripts in a form such that humans cannot edit them.
    Bingo.
    Sent from my iPadŽ

  8. #8
    chococoder
    Join Date
    Nov 2004
    Posts
    515
    I'm wondering why a C(++) site would resort to a php based forum system anyway, and not use proper cgi
    Sun threw a tantrum when the company they'd outsourced the development of their forums to built the thing in ASP, they quickly reverted to a JSP solution...

  9. #9
    ---
    Join Date
    May 2004
    Posts
    1,379
    I always liked the [source] tags on gamedev.net forums

  10. #10
    & the hat of GPL slaying Thantos's Avatar
    Join Date
    Sep 2001
    Posts
    5,681
    What scrollbars? (See attached)

    Quote Originally Posted by jwenting
    I'm wondering why a C(++) site would resort to a php based forum system anyway, and not use proper cgi
    Sun threw a tantrum when the company they'd outsourced the development of their forums to built the thing in ASP, they quickly reverted to a JSP solution...
    Because CGI is slow for use as a message board. Just because you do something doesn't mean you should.


    Yes you can modify the vBulletin's code base.
    Attached Images Attached Images  

  11. #11
    chococoder
    Join Date
    Nov 2004
    Posts
    515
    I was only in part serious
    at least vBulletin is a LOT better than phpNuke which seems incredibly popular.
    I'd still prefer Jive though, but mainly because it rubs my ego to see something used that I played a small part in building.

  12. #12
    & the hat of GPL slaying Thantos's Avatar
    Join Date
    Sep 2001
    Posts
    5,681
    Forgot to mention that when this site was upgraded to vBulletin 3 there were scrollbars in the code blocks. After much complaining they were removed.

  13. #13
    C++ Witch laserlight's Avatar
    Join Date
    Oct 2003
    Location
    Singapore
    Posts
    22,271
    Forgot to mention that when this site was upgraded to vBulletin 3 there were scrollbars in the code blocks. After much complaining they were removed.
    Ah. [php] provides syntax highlighting, [code] does not. Perhaps there can be [source], which would work like [code], but with automatic horizontal scrollbars. Then in the future say, [cpp] can be used with syntax highlighting.
    C + C++ Compiler: MinGW port of GCC
    Version Control System: Bazaar

    Look up a C++ Reference and learn How To Ask Questions The Smart Way

  14. #14
    Cat without Hat CornedBee's Avatar
    Join Date
    Apr 2003
    Posts
    8,893
    The reason vBulletin always provided [php] is that PHP provides automatic source highlighting for PHP, so implementing it was no extra work. All other highlightings (like vbforums.com's [vbcode]) need to be implemented by hand, as vBulletin extensions.

    The scrollbars in [code] and [php] are just skin settings - a style sheet setting, to be precise.
    All the buzzt!
    CornedBee

    "There is not now, nor has there ever been, nor will there ever be, any programming language in which it is the least bit difficult to write bad code."
    - Flon's Law

  15. #15
    Registered User major_small's Avatar
    Join Date
    May 2003
    Posts
    2,787
    the simple answer: yes, you can add any tags you wish.
    the complex answer: you wanna write the code?

    PHP syntax is very close to C++ syntax, and I've seen it suggested that you just use the [php] tags for C/C++ code...

    I have syntax highlighter written (by me) in Java if anybody wants to fix it up. I was eventually going to code it in PERL or PHP or C++ or some other language, make it CGI-compliant, and host it somewhere, but I just don't have the time for that...

    PM if you want the code... I'm a little busy to check back very often
    Join is in our Unofficial Cprog IRC channel
    Server: irc.phoenixradio.org
    Channel: #Tech


    Team Cprog Folding@Home: Team #43476
    Download it Here
    Detailed Stats Here
    More Detailed Stats
    52 Members so far, are YOU a member?
    Current team score: 1223226 (ranked 374 of 45152)

    The CBoard team is doing better than 99.16% of the other teams
    Top 5 Members: Xterria(518175), pianorain(118517), Bennet(64957), JaWiB(55610), alphaoide(44374)

    Last Updated on: Wed, 30 Aug, 2006 @ 2:30 PM EDT

Page 1 of 2 12 LastLast
Popular pages Recent additions subscribe to a feed

Similar Threads

  1. c++ game [code] need help
    By mario fortunato in forum Game Programming
    Replies: 3
    Last Post: 02-24-2006, 08:41 AM
  2. [code] Recursive Search Function
    By anonytmouse in forum Windows Programming
    Replies: 1
    Last Post: 12-17-2004, 11:21 PM
  3. [code] Enumerate IE instances and retrieve interfaces.
    By anonytmouse in forum Windows Programming
    Replies: 1
    Last Post: 05-05-2004, 09:01 AM
  4. intersection and union
    By BaAa3 in forum C Programming
    Replies: 2
    Last Post: 02-29-2004, 04:39 AM

1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21