Jump to content

Two Questions. Code and Solved


 Share

Recommended Posts

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

Link to comment
Share on other sites

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.

Link to comment
Share on other sites

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]

Link to comment
Share on other sites

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.

Link to comment
Share on other sites

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]

Link to comment
Share on other sites

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.

Link to comment
Share on other sites

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.

Link to comment
Share on other sites

This thread is more than a year old.

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

  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.

 Share

×
×
  • Create New...

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.