How to change php code html code and code like this ?

Reply

Join Date: Aug 2007
Posts: 4
Reputation: satforce is an unknown quantity at this point 
Solved Threads: 0
satforce satforce is offline Offline
Newbie Poster

How to change php code html code and code like this ?

 
0
  #1
Aug 25th, 2007
Hello,

I really need your help in vbulletin forum .. I am owner of vbulletin forum designed for arab and it's specialised in html and php tutorial how can I highlight code like daniweb forum ?? I dom't know if administrator can help me or not but I hope !!

wating for you answers !!

Please help !
Reply With Quote Quick reply to this message  
Join Date: Aug 2007
Posts: 189
Reputation: martin5211 is an unknown quantity at this point 
Solved Threads: 14
martin5211 martin5211 is offline Offline
Junior Poster

Re: How to change php code html code and code like this ?

 
0
  #2
Aug 25th, 2007
Have you hear about GeSHi? It is a good syntax colorizer and very unobtrusive. This is the code to put on:

  1. include_once('geshi.php');
  2.  
  3. $geshi =& new GeSHi($source, "php");
  4.  
  5. echo $geshi->parse_code();

There are a bbcode tutorial at phpit.net. You can use preg_replace to get the content of code tags and use it as source.
Last edited by martin5211; Aug 25th, 2007 at 5:18 pm.
Reply With Quote Quick reply to this message  
Join Date: Aug 2007
Posts: 4
Reputation: satforce is an unknown quantity at this point 
Solved Threads: 0
satforce satforce is offline Offline
Newbie Poster

Re: How to change php code html code and code like this ?

 
0
  #3
Aug 25th, 2007
thank you for your help but can you help me a little bite more .. I mean you know more explanation ..
Reply With Quote Quick reply to this message  
Join Date: Aug 2007
Posts: 4
Reputation: satforce is an unknown quantity at this point 
Solved Threads: 0
satforce satforce is offline Offline
Newbie Poster

Re: How to change php code html code and code like this ?

 
0
  #4
Aug 25th, 2007
ok how I can add Geshi to vbulletin forum ?
Reply With Quote Quick reply to this message  
Join Date: Aug 2007
Posts: 4
Reputation: satforce is an unknown quantity at this point 
Solved Threads: 0
satforce satforce is offline Offline
Newbie Poster

Re: How to change php code html code and code like this ?

 
0
  #5
Aug 26th, 2007
Ok you are right I found the hack tu add through vb and it's working but still how to put Toggle Plain Text ?
Reply With Quote Quick reply to this message  
Join Date: Aug 2007
Posts: 189
Reputation: martin5211 is an unknown quantity at this point 
Solved Threads: 14
martin5211 martin5211 is offline Offline
Junior Poster

Re: How to change php code html code and code like this ?

 
0
  #6
Aug 26th, 2007
The link calls a javascript function that hide the content with GeSHi and show the next div with a textarea and plain text as value (trimming the bbcodes). For example add the following ID properties to that <div> elements: "geshi" and "plaintext". Then add a JS function like this:

function plainText () {
var geshi = document.getElementById('geshi');
var plaintext = document.getElementById('plaintext');

geshi.style.display = "none";
plaintext.style.display = "block";
}

By this way, we're changing CSS properties of some elements (geshi and plaintext) when you call this function.
Add the plainText () call on onload property of your link to toggle text.

These modifications has to be done in the view of vb board.
Last edited by martin5211; Aug 26th, 2007 at 10:44 am.
Reply With Quote Quick reply to this message  
Reply

This thread is more than three months old.
Perhaps start a new thread instead?
Message:


Thread Tools Search this Thread



About Us | Contact Us | Advertise | DaniWeb | Acceptable Use Policy | RSS Feed

©2003 - 2009 DaniWeb® LLC