Author |
Message |
Bruski
|
Posted: 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

|
|
 |
Amailer

|
Posted: 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
|
Posted: Tue Oct 07, 2003 11:18 pm Post subject: (No subject) |
|
|
how would i implament it with my forums..that i created |
|
|
|
|
 |
Amailer

|
Posted: 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
|
Posted: Tue Oct 07, 2003 11:39 pm Post subject: (No subject) |
|
|
ooo all by myself...simple but effective none the less |
|
|
|
|
 |
Amailer

|
Posted: 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
|
Posted: 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
|
|
|
|
 |
Sponsor Sponsor

|
|
 |
Tony

|
Posted: 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. |
Tony's programming blog. DWITE - a programming contest. |
|
|
|
 |
PaddyLong
|
Posted: Wed Oct 08, 2003 12:36 pm Post subject: (No subject) |
|
|
well... let's see ..
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

|
Posted: 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

|
Posted: Wed Oct 08, 2003 10:35 pm Post subject: (No subject) |
|
|
PaddyLong wrote: well... let's see ..
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
|
Posted: 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

|
Posted: Thu Oct 09, 2003 11:08 am Post subject: (No subject) |
|
|
oh, ok i see what you did, lol. now dont i look dum  |
Computer Science Canada
Help with programming in C, C++, Java, PHP, Ruby, Turing, VB and more! |
|
|
|
 |
PaddyLong
|
Posted: Thu Oct 09, 2003 2:56 pm Post subject: (No subject) |
|
|
misunderstandings can do that  |
|
|
|
|
 |
|