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 |
|
|
|
|
![](images/spacer.gif) |
Sponsor Sponsor
![Sponsor Sponsor](templates/subSilver/images/ranks/stars_rank5.gif)
|
|
![](images/spacer.gif) |
Amailer
![](http://compsci.ca/wiki/images/1/19/Avatar.jpg)
|
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) |
|
|
|
|
![](images/spacer.gif) |
Bruski
|
Posted: Tue Oct 07, 2003 11:18 pm Post subject: (No subject) |
|
|
how would i implament it with my forums..that i created |
|
|
|
|
![](images/spacer.gif) |
Amailer
![](http://compsci.ca/wiki/images/1/19/Avatar.jpg)
|
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? |
|
|
|
|
![](images/spacer.gif) |
Bruski
|
Posted: Tue Oct 07, 2003 11:39 pm Post subject: (No subject) |
|
|
ooo all by myself...simple but effective none the less |
|
|
|
|
![](images/spacer.gif) |
Amailer
![](http://compsci.ca/wiki/images/1/19/Avatar.jpg)
|
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??) |
|
|
|
|
![](images/spacer.gif) |
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 |
|
|
|
|
![](images/spacer.gif) |
Bruski
|
|
|
|
![](images/spacer.gif) |
Sponsor Sponsor
![Sponsor Sponsor](templates/subSilver/images/ranks/stars_rank5.gif)
|
|
![](images/spacer.gif) |
Tony
![](http://wiki.compsci.ca/images/f/f4/OniTony.gif)
|
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. |
|
|
|
![](images/spacer.gif) |
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>
|
|
|
|
|
|
![](images/spacer.gif) |
Amailer
![](http://compsci.ca/wiki/images/1/19/Avatar.jpg)
|
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) |
|
|
|
|
![](images/spacer.gif) |
Dan
![](http://wiki.compsci.ca/images/archive/3/3c/20100325043407!Danspic.gif)
|
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! |
|
|
|
![](images/spacer.gif) |
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. |
|
|
|
|
![](images/spacer.gif) |
Dan
![](http://wiki.compsci.ca/images/archive/3/3c/20100325043407!Danspic.gif)
|
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 ![Evil or Very Mad Evil or Very Mad](http://compsci.ca/v3/images/smiles/icon_evil.gif) |
Computer Science Canada
Help with programming in C, C++, Java, PHP, Ruby, Turing, VB and more! |
|
|
|
![](images/spacer.gif) |
PaddyLong
|
Posted: Thu Oct 09, 2003 2:56 pm Post subject: (No subject) |
|
|
misunderstandings can do that ![Razz Razz](images/smiles/icon_razz.gif) |
|
|
|
|
![](images/spacer.gif) |
|