offsprg01 Posted February 8, 2007 Share Posted February 8, 2007 ok so for the life of me i can figure out how to make code in a post appear in the nifty code box. and how do i mark a topic i created solved? or can i? Quote Link to comment https://forums.phpfreaks.com/topic/37639-two-questions-code-and-solved/ Share on other sites More sharing options...
Daniel0 Posted February 8, 2007 Share Posted February 8, 2007 To display your code inside a code box, do this: Your code in here To mark it as solved, click the solved button. I think it is located near "reply | notify | etc." at the bottom/top. It is only available in forums where questions are supposed to be posted (e.g. "PHP help"). Quote Link to comment https://forums.phpfreaks.com/topic/37639-two-questions-code-and-solved/#findComment-180066 Share on other sites More sharing options...
wildteen88 Posted February 8, 2007 Share Posted February 8, 2007 To add code in code boxes warap your code in the code ( ) tags. You can also wrap short snippets of code in PHP ( ) tags too. Examples: code tags <?php echo "hello world"; ?> php tags <?php echo "hello world"; ?> To solve a topic you have created click the Topic Solved button at the very bottom of the post and just before the quick reply box. Note some boards do not have this available. Quote Link to comment https://forums.phpfreaks.com/topic/37639-two-questions-code-and-solved/#findComment-180070 Share on other sites More sharing options...
offsprg01 Posted February 8, 2007 Author Share Posted February 8, 2007 thanks guys. Quote Link to comment https://forums.phpfreaks.com/topic/37639-two-questions-code-and-solved/#findComment-180072 Share on other sites More sharing options...
The Little Guy Posted February 8, 2007 Share Posted February 8, 2007 I never knew you could use ([ php][/code]) On a VBulletin board, they have 3 code type buttons: - HTML - CODE - PHP Would It be possible to add these to this message board? Quote Link to comment https://forums.phpfreaks.com/topic/37639-two-questions-code-and-solved/#findComment-180151 Share on other sites More sharing options...
Daniel0 Posted February 8, 2007 Share Posted February 8, 2007 I am personally against the -tag for two reasons: [*]It does not use a monospace font. [*]It does not add a box clearly seperating code from content and which also allows you to scroll. Generally my opinion is that [i]all[/i] code should be enclosed in [code]-tags. May it be CSS, HTML, PHP, JavaScript or whatever. Also note: There is a tag called [nobbc]. Any BBcodes within that will not be parsed. It is especially useful when you want to mention a specific tag so you do not have to do something like [ php], but rather [php]. Example: [code]The [nobbc][php][/nobbc]-tag[/code] Quote Link to comment https://forums.phpfreaks.com/topic/37639-two-questions-code-and-solved/#findComment-180166 Share on other sites More sharing options...
wildteen88 Posted February 9, 2007 Share Posted February 9, 2007 I never knew you could use ([ php][/code]) On a VBulletin board, they have 3 code type buttons: - HTML - CODE - PHP Would It be possible to add these to this message board? Do you mean add the php code button in to the reply box next to the code button? I am personally against the -tag for two reasons: [*]It does not use a monospace font. [*]It does not add a box clearly seperating code from content and which also allows you to scroll. Generally my opinion is that [i]all[/i] code should be enclosed in [code]-tags. May it be CSS, HTML, PHP, JavaScript or whatever. Also note: There is a tag called [nobbc]. Any BBcodes within that will not be parsed. It is especially useful when you want to mention a specific tag so you do not have to do something like [ php], but rather [php]. Example: [code]The [nobbc][php][/nobbc]-tag[/code] I agree with what you say about the PHP BBCodes. I usually only use these tags for posting small snippets of code - they are great for posting inline code within sentances/paragraphs in the post. Then use the code BBCcodes for big snippets of code. Quote Link to comment https://forums.phpfreaks.com/topic/37639-two-questions-code-and-solved/#findComment-180806 Share on other sites More sharing options...
The Little Guy Posted February 12, 2007 Share Posted February 12, 2007 I never knew you could use ([ php][/code]) On a VBulletin board, they have 3 code type buttons: - HTML - CODE - PHP Would It be possible to add these to this message board? Do you mean add the php code button in to the reply box next to the code button? the php button (on VBulletin), doesn't even require you to use <?php or <? to colorize the code, it just colorizes it for you. Below are 2 attachments, the first one is output, and the second one is the coding. [attachment deleted by admin] Quote Link to comment https://forums.phpfreaks.com/topic/37639-two-questions-code-and-solved/#findComment-183043 Share on other sites More sharing options...
wildteen88 Posted February 12, 2007 Share Posted February 12, 2007 Its the same here too: echo "hello world"; yeilds: echo "hello world"; <?php echo "hello world"; ?> yeilds: <?php echo "hello world"; ?> Except SMF doesn't have HTML highlighting. However I'll try: <table><tr><td>balh</td></tr></table> yeilds: <table><tr><td>balh</td></tr></table> Yep SMF doesnt have html code highlighting. Prehaps ask SMF team (not us) to add it in for the next version. Quote Link to comment https://forums.phpfreaks.com/topic/37639-two-questions-code-and-solved/#findComment-183045 Share on other sites More sharing options...
The Little Guy Posted February 12, 2007 Share Posted February 12, 2007 Could it be possible to put a box around the PHP code? Is there even a button on the message box to do that? When the code/php box gets too long, does a scroll bar appear? In VBulletin, a scroll bar appears after, my guess 20 lines, then the page won't get so long. Example: http://www.webdeveloper.com/forum/showthread.php?t=101466 -- This is also a good image upload example. Quote Link to comment https://forums.phpfreaks.com/topic/37639-two-questions-code-and-solved/#findComment-183060 Share on other sites More sharing options...
The Little Guy Posted February 12, 2007 Share Posted February 12, 2007 I take the scoll bar thing back... this form does do it. Quote Link to comment https://forums.phpfreaks.com/topic/37639-two-questions-code-and-solved/#findComment-183064 Share on other sites More sharing options...
ober Posted February 13, 2007 Share Posted February 13, 2007 This is not VBulletin. Either make requests like this on www.simplemachines.org or stop complaining. Quote Link to comment https://forums.phpfreaks.com/topic/37639-two-questions-code-and-solved/#findComment-183236 Share on other sites More sharing options...
The Little Guy Posted February 13, 2007 Share Posted February 13, 2007 I'm not complaining Quote Link to comment https://forums.phpfreaks.com/topic/37639-two-questions-code-and-solved/#findComment-183258 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.