Programming C, C++, Java, PHP, Ruby, Turing, VB
Computer Science Canada 
Programming C, C++, Java, PHP, Ruby, Turing, VB  

Username:   Password: 
 RegisterRegister   
 BBCode syntax highlighting
Index -> Programming, PHP -> PHP Help
View previous topic Printable versionDownload TopicSubscribe to this topicPrivate MessagesRefresh page View next topic
Author Message
Bruski




PostPosted: Tue Oct 07, 2003 10:45 pm   Post subject: BBCode syntax highlighting

i wrote a simple code like the one that is on this website to hightlight the syntax...is there anyway to do it like a .phps file...cuz i built a forum and i want to give the users the power to post code , but it would be nice if it would be nicly higlighted...any suggesitons
Sponsor
Sponsor
Sponsor
sponsor
Amailer




PostPosted: Tue Oct 07, 2003 10:57 pm   Post subject: (No subject)

show_source() type?
i got a phpbb code on my forum ([php] [/php])

EDIT: NVM FOUND IT!
http://phpbbhacks.com/viewhack.php?id=181


thats the main part of it i think (THIS IS FOR PHPBB FORUM)
Bruski




PostPosted: Tue Oct 07, 2003 11:18 pm   Post subject: (No subject)

how would i implament it with my forums..that i created
Amailer




PostPosted: Tue Oct 07, 2003 11:34 pm   Post subject: (No subject)

you created the whole forum your self?
or are you using a forum like this one? phpbb?
Bruski




PostPosted: Tue Oct 07, 2003 11:39 pm   Post subject: (No subject)

ooo all by myself...simple but effective none the less
Amailer




PostPosted: Tue Oct 07, 2003 11:41 pm   Post subject: (No subject)

Ok, well it depends on how you write your code (got an i.e??)
Bruski




PostPosted: Tue Oct 07, 2003 11:48 pm   Post subject: (No subject)

what kind of example do you need... =[ ...i just want it to do the same as the code thing in this forum does...i modified a script i found but it wont highlight it just formats it into a diff text fieild
Bruski




PostPosted: Tue Oct 07, 2003 11:51 pm   Post subject: (No subject)

damn wont display the code http://bruski.hell-yeah.net/forums/index.phpsTry here
Sponsor
Sponsor
Sponsor
sponsor
Tony




PostPosted: Wed Oct 08, 2003 12:31 am   Post subject: (No subject)

I'm not sure how [code] works on phpBB, but my guess would be that it just places it in a table and puts <font> tags around it. Shouldn't be too hard to implement.
Latest from compsci.ca/blog: Tony's programming blog. DWITE - a programming contest.
PaddyLong




PostPosted: Wed Oct 08, 2003 12:36 pm   Post subject: (No subject)

well... let's see ..
code:
test


code:

<table width="90%" cellspacing="1" cellpadding="3" border="0" align="center">
<tr>
          <td><span class="genmed"><b>Code:</b></span></td>
        </tr>
        <tr>
          <td class="code">test</td>
        </tr>
</table>
Amailer




PostPosted: Wed Oct 08, 2003 5:45 pm   Post subject: (No subject)

they also give the tag an sid
[php:1:cd70b2d9c1] or something like that (when saved in the database)
Dan




PostPosted: Wed Oct 08, 2003 10:35 pm   Post subject: (No subject)

PaddyLong wrote:
well... let's see ..
code:
test


code:

<table width="90%" cellspacing="1" cellpadding="3" border="0" align="center">
<tr>
          <td><span class="genmed"><b>Code:</b></span></td>
        </tr>
        <tr>
          <td class="code">test</td>
        </tr>
</table>


if you where trying to get html code to acualy wrok in 2nd thing there it did not b/c i moded code tag to not run/load any codes in a code tag (makes sence to me).

this is what the 1st one whould look like in html
code:

 <td class="code">test</td>
Computer Science Canada Help with programming in C, C++, Java, PHP, Ruby, Turing, VB and more!
PaddyLong




PostPosted: Thu Oct 09, 2003 10:57 am   Post subject: (No subject)

if I wanted it to work as html I wouldn't have put it in the code tag.
Dan




PostPosted: Thu Oct 09, 2003 11:08 am   Post subject: (No subject)

oh, ok i see what you did, lol. now dont i look dum Evil or Very Mad
Computer Science Canada Help with programming in C, C++, Java, PHP, Ruby, Turing, VB and more!
PaddyLong




PostPosted: Thu Oct 09, 2003 2:56 pm   Post subject: (No subject)

Wink misunderstandings can do that Razz
Display posts from previous:   
   Index -> Programming, PHP -> PHP Help
View previous topic Tell A FriendPrintable versionDownload TopicSubscribe to this topicPrivate MessagesRefresh page View next topic

Page 1 of 1  [ 15 Posts ]
Jump to:   


Style:  
Search: