BBCode Enhancements

Discussion in 'Support & Feedback' started by digitalpoint, Sep 4, 2005.

  1. #1
    [search] BBCode

    There is now a [search] BBCode available, which lets you display search results from Google, Yahoo or MSN. For example:

    [search=google]Digital Point Solutions[/search] will give you this: [search=google]Digital Point Solutions[/search]

    [search=yahoo]isp billing software[/search] will give you this: [search=yahoo]isp billing software[/search]
    etc...


    [php] BBCode

    The existing [php] tags output differently now (includes line numbers, hyperlinks to the manual where the function is defined, etc.)

    <?php
    	$str = "Mary Had A Little Lamb and She LOVED It So";
    	$str = strtolower($str);
    	echo $str; // Prints mary had a little lamb and she loved it so
    ?>
    PHP:

    [html] BBCode

    The existing [html] tags output differently now (includes line numbers, hyperlinks to a location where the attribute is defined, etc.)

    <table class="tborder" cellpadding="6" cellspacing="1" border="0" width="100%" align="center">
    <tr>
    	<td class="tcat" colspan="2">Search Engine Results<a name="search"></a></td>
    </tr>
    <tr>
    	<td class="thead" colspan="2" style="font-weight:normal">The [search] tag allows you to display search engine results from Google, Yahoo or MSN.</td>
    </tr>
    <tr valign="top">
    	<td class="alt1" width="20%"><strong>Usage</strong></td>
    	<td class="alt1">[search=<span class="highlight">Search Engine</span>]<span class="highlight">searchterm</span>[/search]<br /><span style="font-size: 10px; margin: 0 0 0 20px;"><span class="highlight">Search Engine</span> can be one of; <span class="highlight">google</span>, <span class="highlight">yahoo</span>, <span class="highlight">msn</span></span></td>
    </tr>
    <tr valign="top">
    	<td class="alt2" width="20%"><strong>Example Usage</strong></td>
    	<td class="alt2">[search=google]this is a search[/search]</td>
    </tr>
    <tr valign="top">
    	<td class="alt1" width="20%"><strong>Example Output</strong></td>
    	<td class="alt1"><a href="http://www.google.com/search?q=this+is+a+search" target="_blank">this is a search</a></td>
    </tr>
    </table>
    HTML:

    [code] BBCode

    The existing [code] tag has been enhanced so that if you use an option (which defines the language) you will get a nice output. A list of currently supported languages can be found here. For example [code=xml] would give you something like:

    <?xml version="1.0"?>
    <?xml-stylesheet type="text/css" href="nutrition.css"?>
    <nutrition>
    
    <daily-values>
            <total-fat units="g">65</total-fat>
            <saturated-fat units="g">20</saturated-fat>
            <cholesterol units="mg">300</cholesterol>
            <sodium units="mg">2400</sodium>
            <carb units="g">300</carb>
            <fiber units="g">25</fiber>
            <protein units="g">50</protein>
    </daily-values>
    </nutrition>
    Code (xml):
     
    digitalpoint, Sep 4, 2005 IP
    dct likes this.
  2. Infiniterb

    Infiniterb Well-Known Member

    Messages:
    1,314
    Likes Received:
    51
    Best Answers:
    0
    Trophy Points:
    168
    #2
    Were these your own custom additions, or something vbulletin put into 3.5?
     
    Infiniterb, Sep 4, 2005 IP
  3. SaN-DeeP

    SaN-DeeP Well-Known Member

    Messages:
    590
    Likes Received:
    12
    Best Answers:
    0
    Trophy Points:
    140
    #3
    these additions were already made for vb 3.x versions.
    All the code,php,html extensions are fine, but i read about problems with the search bbcode.. give a check before finalizing it.

    Regards,
     
    SaN-DeeP, Sep 5, 2005 IP
  4. digitalpoint

    digitalpoint Overlord of no one Staff

    Messages:
    38,334
    Likes Received:
    2,613
    Best Answers:
    462
    Trophy Points:
    710
    Digital Goods:
    29
    #4
    Well if someone else did it, I didn't know about it... so whatever code is out there isn't what I'm using, mine is custom. My stuff is specific to 3.5 (100% using the new plug-in architecture so I don't need to touch any PHP files).
     
    digitalpoint, Sep 5, 2005 IP
  5. Infiniterb

    Infiniterb Well-Known Member

    Messages:
    1,314
    Likes Received:
    51
    Best Answers:
    0
    Trophy Points:
    168
    #5
    That's awesome man. Well done.
     
    Infiniterb, Sep 5, 2005 IP
  6. digitalpoint

    digitalpoint Overlord of no one Staff

    Messages:
    38,334
    Likes Received:
    2,613
    Best Answers:
    462
    Trophy Points:
    710
    Digital Goods:
    29
    #6
    BTW, I didn't code all the syntax highlighting stuff. I'm using GeSHi for that. Plus it's modular, so just drop a new language into the folder and the forum then supports it.
     
    digitalpoint, Sep 5, 2005 IP
  7. SaN-DeeP

    SaN-DeeP Well-Known Member

    Messages:
    590
    Likes Received:
    12
    Best Answers:
    0
    Trophy Points:
    140
    #7
    [search=google]Great Work[/search] digitalpoint, lets test it for some time now :)
     
    SaN-DeeP, Sep 5, 2005 IP
  8. SEbasic

    SEbasic Peon

    Messages:
    6,317
    Likes Received:
    318
    Best Answers:
    0
    Trophy Points:
    0
    #8
    How easy is the new plugin architecture in vB3.5 to work with?

    I really like the additions BTW. :)
     
    SEbasic, Sep 5, 2005 IP
  9. digitalpoint

    digitalpoint Overlord of no one Staff

    Messages:
    38,334
    Likes Received:
    2,613
    Best Answers:
    462
    Trophy Points:
    710
    Digital Goods:
    29
    #9
    It's easy if you are a coder (and familiar with classes, sub-classes, etc.)
     
    digitalpoint, Sep 5, 2005 IP
  10. SEbasic

    SEbasic Peon

    Messages:
    6,317
    Likes Received:
    318
    Best Answers:
    0
    Trophy Points:
    0
    #10
    I'm not - but trying to learn... :)
     
    SEbasic, Sep 5, 2005 IP