Go Back   Webmaster Malaysia Forum » Website Design & Development » Website Programming

Reply
 
LinkBack Thread Tools Search this Thread Rate Thread Display Modes
  #1 (permalink)  
Old 10-09-2005, 02:51 PM
putera-'s Avatar
Novice Webmaster
 
Join Date: Nov 2003
Location: dEpAn P©
Posts: 13
Rep Power: 0
putera- is on a distinguished road
Send a message via ICQ to putera- Send a message via Yahoo to putera-
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
Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!
Reply With Quote
  #2 (permalink)  
Old 19-09-2005, 03:38 PM
heterozigot's Avatar
Novice Webmaster
 
Join Date: Jan 2003
Location: PJ
Posts: 51
Rep Power: 73
heterozigot is on a distinguished road
Send a message via ICQ to heterozigot Send a message via Yahoo to heterozigot
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
Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!
Reply With Quote
  #3 (permalink)  
Old 15-10-2005, 10:07 AM
cryno's Avatar
Novice Webmaster
 
Join Date: Aug 2002
Location: somewhere in middle earth
Posts: 67
Rep Power: 78
cryno is on a distinguished road
Send a message via MSN to cryno Send a message via Yahoo to cryno
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);
?>
__________________
ChronoSight

Last edited by cryno; 15-10-2005 at 10:10 AM.
Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!
Reply With Quote
  #4 (permalink)  
Old 10-11-2005, 02:33 PM
hymns's Avatar
Senior Webmaster
 
Join Date: Nov 2001
Location: Johor
Posts: 769
Rep Power: 101
hymns is on a distinguished road
Send a message via ICQ to hymns Send a message via Yahoo to hymns
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
Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!
Reply With Quote
Reply



Currently Active Users Viewing This Thread: 1 (0 members and 1 guests)
 
Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes Rate This Thread
Rate This Thread:

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On

Similar Threads
Thread Thread Starter Forum Replies Last Post
vBulletin 3.5.0 Released Mesra FeedBack & Suggestion 0 06-10-2005 01:56 AM
Vbulletin 3.0.7 lcf Website Programming 2 11-06-2005 08:42 AM
vbulletin hftey Mamak Stall 6 01-06-2004 06:26 PM
vbulletin.com down? certify Mamak Stall 5 30-03-2004 01:12 AM



All times are GMT +8. The time now is 02:13 AM. Powered by vBulletin® Version 3.7.3
Copyright ©2000 - 2008, Jelsoft Enterprises Ltd.
LinkBacks Enabled by vBSEO 3.1.0 vBulletin skin by ForumMonkeys.com.


WebmasterMalaysia.com is Proudly Hosted by Exabytes Semi Dedicated Server.

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