Results 1 to 4 of 4

Thread: Kod [PHP] dalam vBulletin

  1. #1
    Join Date
    Nov 2003
    Location
    dEpAn P©
    Posts
    13
    Rep Power
    0

    Kod [PHP] dalam vBulletin

    salam semua dan apa khabar?

    nak tanya kengkawan semua dalam vBulletin,

    kod untuk [ PHP ]<? echo "Hello, World";?>[ /PHP ]

    macam mana dia boleh extract content dalam code [ PHP ] .... [ / PHP ] tue kepada kod sebenar PHP?

    boleh dapatkan kod tu tak?


    contoh

    PHP Code:
    <? echo "Hello, World";?>
    siap ada warnaČ lagiek...ekekeke

  2. #2
    Join Date
    Jan 2003
    Location
    PJ
    Posts
    51
    Rep Power
    207
    alo ni putera aro ka?

    ko nak wat kaler2 tu ka?

    cth:

    PHP Code:
    $file index.php
    show_source
    ($file); 
    amacam..simple tak..
    Try and Support Malaysia Product.
    http://foto.home.net.my

  3. #3
    Join Date
    Aug 2002
    Location
    somewhere in middle earth
    Posts
    67
    Rep Power
    213
    Quote Originally Posted by putera-
    salam semua dan apa khabar?

    nak tanya kengkawan semua dalam vBulletin,

    kod untuk [ PHP ]<? echo "Hello, World";?>[ /PHP ]

    macam mana dia boleh extract content dalam code [ PHP ] .... [ / PHP ] tue kepada kod sebenar PHP?

    boleh dapatkan kod tu tak?


    contoh

    PHP Code:
    <? echo "Hello, World";?>
    siap ada warnaČ lagiek...ekekeke
    Cara mudah adalah dengan menggunakan function PHP yang dikenali sebagai highlight_string(). Untuk maklumat lanjut tentang function nie search dokumentasi PHP.net.

    Contoh penggunaan PHP-BBCode
    PHP Code:
    <?php


    function code_parser($x$y) {
                
    $resultreturn "";
                
    $y             eregi_replace("\\[/".$x."\\]""[end]"$y);
                
    $bbarray    spliti("\[".$x."\]"$y);
                for(
    $xx 1$xx count($bbarray); $xx++) {
                    
    $bbarrays    spliti("\[end\]"$bbarray[$xx]);
                    if(
    $x != "php")
                        
    $bbarrays[0]     = str_replace("[""["$bbarrays[0]);
                    
    $bbarrays[0]     = str_replace(":"":"$bbarrays[0]);
                    if(
    $x != "php")
                        
    $bbarrays[0]     = str_replace(")"")"$bbarrays[0]);
                    
    $bbarrays[0]     = str_replace("^""^"$bbarrays[0]);
                    if(
    $x == "php")
                        
    $bbarray[$xx]     = "[".$x."]".highlight_string(html_entity_decode($bbarrays[0]), TRUE)."[/".$x."]".$bbarrays[1]; 
                    elseif(
    $x == "doHTML")
                        
    $bbarray[$xx]     = "[".$x."]".html_entity_decode($bbarrays[0])."[/".$x."]".$bbarrays[1]; 
                    else
                        
    $bbarray[$xx]     = "[".$x."]".$bbarrays[0]."[/".$x."]".$bbarrays[1]; 
                }
                foreach(
    $bbarray as $count => $bbs)
                    
    $resultreturn .= $bbs;
                return 
    $resultreturn;
            }
    $bbcode        code_parser("php""[ php ]<?php phpinfo() ?> [ /php ]");
    print 
    $bbcode        preg_replace("#\[php\](.*?)\[\/php\]#s""<div>\\1</div>"$bbcode);
    ?>
    Last edited by cryno; 15-10-2005 at 10:10 AM.

  4. #4
    Join Date
    Nov 2001
    Location
    Johor
    Posts
    772
    Rep Power
    235
    buat jgn x buat! fancy2 lagik
    I hate when:

    vBulletin Message:
    Sorry! The administrator has specified that users can only post one message every 60 seconds

Thread Information

Users Browsing this Thread

There are currently 1 users browsing this thread. (0 members and 1 guests)

Similar Threads

  1. Need Help!! vbulletin
    By washing in forum Website Programming
    Replies: 4
    Last Post: 09-03-2008, 06:03 AM
  2. Vbulletin 3.0.7
    By lcf in forum Website Programming
    Replies: 2
    Last Post: 11-06-2005, 08:42 AM
  3. vbulletin
    By hftey in forum Mamak Stall
    Replies: 6
    Last Post: 01-06-2004, 06:26 PM
  4. vbulletin.com down?
    By certify in forum Mamak Stall
    Replies: 5
    Last Post: 30-03-2004, 01:12 AM
  5. Vbulletin hosting
    By Alex in forum Mamak Stall
    Replies: 9
    Last Post: 01-09-2003, 04:23 PM

Posting Permissions

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

Search Engine Optimization by vBSEO 3.5.0 RC1 PL1

1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 90 91 92 93 94 95 96 97 98 99 100 101 102 103 104 105 106 107 108 109 110 111 112