Jump to content
MakeWebGames

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


Recommended Posts

Posted

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?

Posted

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.

Posted

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

Posted

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

Posted

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.

Posted

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

Posted

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

Posted

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

Posted

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

Posted

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

Posted

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.

Guest Anonymous
Posted

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!

  • 2 months later...
Posted

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

Posted

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.

Posted

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.

Posted

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

Posted

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>";

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