Page 1 of 3 123 LastLast
Results 1 to 10 of 26

Thread: Showing php in bbcode

  1. #1
    Join Date
    Oct 2005
    Posts
    255
    Thanks
    1
    Thanked 0 Times in 0 Posts

    Post Showing php in bbcode

    Hi, I am trying to figure out how to show php in bbcode

    on dd its

    but I can figure out the bbcode for it, how to show it without it actin as a code.. can anyone help me please....

    PHP Code:
       $message str_replace("[phptags]""<code>"$message);
       
    $message str_replace("[/phptags]""</code>"$message); 
    That is what i use for my bbcode but I dont know what to put into where the code tags are? please help me!
    Hey new design new look, goto xudas for personal webdsign help.. (:

  2. #2
    Join Date
    Mar 2006
    Location
    Illinois, USA
    Posts
    12,164
    Thanks
    265
    Thanked 690 Times in 678 Posts

    Default

    http://www.dynamicdrive.com/forums/s...ad.php?t=17549
    And look at blm's post a bit down there, with a regular expressions version.
    Daniel - Freelance Web Design | <?php?> | <html>| español | Deutsch | italiano | português | català | un peu de français | some knowledge of several other languages: I can sometimes help translate here on DD | Linguistics Forum

  3. #3
    Join Date
    Oct 2005
    Posts
    255
    Thanks
    1
    Thanked 0 Times in 0 Posts

    Default

    thats doesn't tell you how to show php in bbcode.. for example..

    Code:
    PHP code here <?php echo "what"; ?>
    he doesnt have php tags in there, and i am trying to put php tags in my but no one knows how to do it wtf...?
    Hey new design new look, goto xudas for personal webdsign help.. (:

  4. #4
    Join Date
    Mar 2006
    Location
    Illinois, USA
    Posts
    12,164
    Thanks
    265
    Thanked 690 Times in 678 Posts

    Default

    Daniel - Freelance Web Design | <?php?> | <html>| español | Deutsch | italiano | português | català | un peu de français | some knowledge of several other languages: I can sometimes help translate here on DD | Linguistics Forum

  5. #5
    Join Date
    Oct 2005
    Posts
    255
    Thanks
    1
    Thanked 0 Times in 0 Posts

    Default

    no not the highlighting...

    the tags to show php!
    Code:
    [PHPp][/PHPp]
    but remove the lowercase p's..

    I want to know what is the bbcode to show php in the forum.....
    Hey new design new look, goto xudas for personal webdsign help.. (:

  6. #6
    Join Date
    Jun 2005
    Location
    英国
    Posts
    11,876
    Thanks
    1
    Thanked 180 Times in 172 Posts
    Blog Entries
    2

    Default

    What are you talking about?

    In what forum? Show it how? You can show it by just typing <?php echo 'something like this, look, you can see this PHP code!'; ?> Is that what you want? Or do you not want to just show it? Do you want to do something else to it as well? Highlight it? Daniel showed you how to do that. If not highlighting, then what?
    Twey | I understand English | 日本語が分かります | mi jimpe fi le jbobau | mi esperanton komprenas | je comprends français | entiendo español | tôi ít hiểu tiếng Việt | ich verstehe ein bisschen Deutsch | beware XHTML | common coding mistakes | tutorials | various stuff | argh PHP!

  7. #7
    Join Date
    Oct 2005
    Posts
    255
    Thanks
    1
    Thanked 0 Times in 0 Posts

    Default

    I have a forum on my site, ok...
    I want users on my site be able to use tags on my site, but i can't find any code or php tutorial on it..

    So users can post a php section.. Example below-
    PHP Code:
     I want users to be able to do thisso they can put php code in here and show it on my forum!!! 
    I want users to be able to post php content.....
    I want users to be able to post php content.....
    I want users to be able to post php content.....
    Hey new design new look, goto xudas for personal webdsign help.. (:

  8. #8
    Join Date
    Jun 2005
    Location
    英国
    Posts
    11,876
    Thanks
    1
    Thanked 180 Times in 172 Posts
    Blog Entries
    2

    Default

    You've been given all the code necessary to do this... just combine the BBCode code from post #2 with the highlighting from post #4.
    Twey | I understand English | 日本語が分かります | mi jimpe fi le jbobau | mi esperanton komprenas | je comprends français | entiendo español | tôi ít hiểu tiếng Việt | ich verstehe ein bisschen Deutsch | beware XHTML | common coding mistakes | tutorials | various stuff | argh PHP!

  9. #9
    Join Date
    Oct 2005
    Posts
    255
    Thanks
    1
    Thanked 0 Times in 0 Posts

    Default

    yeh but post #2 does not have php tags in it.. omg how many times do i have to say that....
    Hey new design new look, goto xudas for personal webdsign help.. (:

  10. #10
    Join Date
    Jun 2005
    Location
    英国
    Posts
    11,876
    Thanks
    1
    Thanked 180 Times in 172 Posts
    Blog Entries
    2

    Default

    You mean you want to use <?php ?> rather than [phptags] [/phptags]? I'm sure you can figure out how to replace one string with another...
    omg how many times do i have to say that....
    That's a bit unfriendly, we're trying our best to work out what you're trying to say.
    Twey | I understand English | 日本語が分かります | mi jimpe fi le jbobau | mi esperanton komprenas | je comprends français | entiendo español | tôi ít hiểu tiếng Việt | ich verstehe ein bisschen Deutsch | beware XHTML | common coding mistakes | tutorials | various stuff | argh PHP!

Bookmarks

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •