Jump to content
MakeWebGames

How do I use a [code][/code] type function on a normal page?


Arson

Recommended Posts

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?

Link to comment
Share on other sites

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.

Link to comment
Share on other sites

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

Link to comment
Share on other sites

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.

Link to comment
Share on other sites

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...

Link to comment
Share on other sites

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. :)

Link to comment
Share on other sites

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.

Link to comment
Share on other sites

Guest Anonymous

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!

Link to comment
Share on other sites

  • 2 months later...

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.

Link to comment
Share on other sites

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.

Link to comment
Share on other sites

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

Link to comment
Share on other sites

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>";
Link to comment
Share on other sites

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

×
×
  • Create New...