Arson Posted March 22, 2007 Share Posted March 22, 2007 I was wondering if anyone knew how to do a code function like this: On my site, people can submit their scripts, when they submit them and view the preview of it, they see it as they typed it, brackets and all. None of the code is parsed. But when its submitted, and on the page, my site parses the code. So say I post code that makes a table with some info in it. It would show the table and info in it. But I want it to show the source code. </pre> <table>cell</table how would i make it show up like that on the page? Quote Link to comment Share on other sites More sharing options...
Arson Posted March 23, 2007 Author Share Posted March 23, 2007 Re: How do I use a type function on a normal page? i need automatic linebreaks and whatnot too Quote Link to comment Share on other sites More sharing options...
Decepti0n Posted March 23, 2007 Share Posted March 23, 2007 Re: How do I use a type function on a normal page? download SMF/phpBB/MybB/any other forum or CMS and see how they do it? Quote Link to comment Share on other sites More sharing options...
Arson Posted March 23, 2007 Author Share Posted March 23, 2007 Re: How do I use a type function on a normal page? i have, i somewhat got it working but it disables my automatic line breaks thing... i use php fusion, it has forums with that function. when people make a statement and put a questionmark behind it they are trying to be a smartass. dont reply to my post if ur gonna be a smartass. Quote Link to comment Share on other sites More sharing options...
Decepti0n Posted March 23, 2007 Share Posted March 23, 2007 Re: How do I use a type function on a normal page? glad you got it somehow working can i also ask where you're able to tell what tone of voice im using when i write posts :) considering i was trying to be helpful, and recommend something that i do often when i have a problem, i wasn't being a smartass. taking into account the fact its a free forum and i can post where i want, dont jump at people and throw accusations when they dont help you straight away Quote Link to comment Share on other sites More sharing options...
seanybob Posted March 24, 2007 Share Posted March 24, 2007 Re: How do I use a type function on a normal page? @ arson - if you just had the text post to a textarea onscreen would that solve the prob? Last time I checked, code in textareas werent parsed... its been a while though, I may be totally off here Quote Link to comment Share on other sites More sharing options...
Arson Posted March 24, 2007 Author Share Posted March 24, 2007 Re: How do I use a type function on a normal page? Well you should be more careful with your choice of words and punctuation then next time Decepti0n. @ arson - if you just had the text post to a textarea onscreen would that solve the prob? Last time I checked, code in textareas werent parsed... its been a while though, I may be totally off here You rock seanybob! I never thought about doing that. Simple, yet effective. +1 to you mate. Quote Link to comment Share on other sites More sharing options...
Arson Posted March 24, 2007 Author Share Posted March 24, 2007 Re: How do I use a type function on a normal page? Another problem now. If someone types </textarea> They can end the textarea and enter any code they want.... Quote Link to comment Share on other sites More sharing options...
CraigF Posted March 24, 2007 Share Posted March 24, 2007 Re: How do I use a type function on a normal page? disable </textarea> Quote Link to comment Share on other sites More sharing options...
CraigF Posted March 24, 2007 Share Posted March 24, 2007 Re: How do I use a type function on a normal page? if its a forum site i thought you said, maybe im wrong but anyway, if its forum site go into administration panel and put </textarea> with the swear words lol Quote Link to comment Share on other sites More sharing options...
Decepti0n Posted March 24, 2007 Share Posted March 24, 2007 Re: How do I use a type function on a normal page? use <pre></pre> Quote Link to comment Share on other sites More sharing options...
seanybob Posted March 24, 2007 Share Posted March 24, 2007 Re: How do I use a type function on a normal page? or just do a simple string replace... just replace the exact phrase </textarea> with a space Quote Link to comment Share on other sites More sharing options...
Arson Posted March 25, 2007 Author Share Posted March 25, 2007 Re: How do I use a type function on a normal page? my site is a scripting site where people can post codes i want them to be able to use </textarea> but i just want it to show up like anything else without actually being parsed. if someone could post the exact part of a forum for the function then I could use that, but I have tried time and time again to look through forums, the code is so jumbled and mixed up i have a hard time reading it and cant really find anything..Plus I dont even really know what Im looking for lol... Quote Link to comment Share on other sites More sharing options...
Vorlen Posted March 25, 2007 Share Posted March 25, 2007 Re: How do I use a type function on a normal page? replace string </textarea> with maybe the code for greater than and less than and the slash, then text area in there as usual. Would that not then print it, as opposed to use it as code? Just a question, as it may come in handy later for me. :) Quote Link to comment Share on other sites More sharing options...
mdshare Posted March 27, 2007 Share Posted March 27, 2007 Re: How do I use a type function on a normal page? I don't really see what the problem is, alter like deception said a phpBB/ipb/vbulletin/smf bbcode mod isn't so hard to do Quote Link to comment Share on other sites More sharing options...
UCC Posted March 27, 2007 Share Posted March 27, 2007 Re: How do I use a type function on a normal page? Well you should be more careful with your choice of words and punctuation then next time Decepti0n. You might want to take a look at yourself sometime. It's been clear to me you're very sensative to anything you dont like. And I'm not just talking about this thread. But speaking of this thread, there was absolutely nothing wrong/disrespectful with the way Deception posted his reponse. Quote Link to comment Share on other sites More sharing options...
Guest Anonymous Posted March 27, 2007 Share Posted March 27, 2007 Re: How do I use a type function on a normal page? Well you should be more careful with your choice of words and punctuation then next time Decepti0n. You might want to take a look at yourself sometime. It's been clear to me you're very sensative to anything you dont like. And I'm not just talking about this thread. But speaking of this thread, there was absolutely nothing wrong/disrespectful with the way Deception posted his reponse. AGREED! Quote Link to comment Share on other sites More sharing options...
a2z22a Posted June 3, 2007 Share Posted June 3, 2007 Re: How do I use a type function on a normal page? the textarea tag is good - use CSS to customize it to make it look pretty :lol: Quote Link to comment Share on other sites More sharing options...
hamster01 Posted June 3, 2007 Share Posted June 3, 2007 Re: How do I use a type function on a normal page? I have found a script that has the same as smf's bcc, if not better. Had to modify it alot though. Ill have to dig for it .. Quote Link to comment Share on other sites More sharing options...
stryker Posted June 5, 2007 Share Posted June 5, 2007 Re: How do I use a type function on a normal page? if the text area is inclosed in an echo or print statement then it won't parse Quote Link to comment Share on other sites More sharing options...
Matty Posted June 6, 2007 Share Posted June 6, 2007 Re: How do I use a type function on a normal page? Sorry if this is a bit late but, Arson what are you on? download SMF/phpBB/MybB/any other forum or CMS and see how they do it? That was an obvious recommendation. and see how they do it? The question mark there is like saying perhaps, or maybe... " see how they do it perhaps " Re-read it. A smartass version of it on the other hand would be something like " Have you even tried to download SMF/phpBB/MybB/any other forum or CMS to see how its done. " Deception was offering help, its very bad that you judge people from there punctuation. Quote Link to comment Share on other sites More sharing options...
stryker Posted June 6, 2007 Share Posted June 6, 2007 Re: How do I use a type function on a normal page? arson uses smf but that has nothing to do with the question, he is not asking how to make a forum enclosed page with bb code enabled he s asking how to do it with a normal php page, why are there so many fucking idiots on here? read it before you answer. Quote Link to comment Share on other sites More sharing options...
Decepti0n Posted June 6, 2007 Share Posted June 6, 2007 Re: How do I use a type function on a normal page? I'd like to know where you came up with using textarea in an echo or print statement, which is PROBABLY WHAT HAPPENS ANYWAY, it doesn't mean it doesn't get parsed, besides i answered it on the first page with <pre> tags Quote Link to comment Share on other sites More sharing options...
stryker Posted June 6, 2007 Share Posted June 6, 2007 Re: How do I use a type function on a normal page? actually no it does not get parsed. have you tried to post it in a textbox before? did it parse and make the code go through? no if it did then this wouldn't work print "<textarea></textarea>"; Quote Link to comment Share on other sites More sharing options...
Decepti0n Posted June 6, 2007 Share Posted June 6, 2007 Re: How do I use a type function on a normal page? We already established that, but typing </textarea> would end it Quote Link to comment Share on other sites More sharing options...
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.