Discover Habbo's history
Treat yourself with a Secret Santa gift.... of a random Wiki page for you to start exploring Habbo's history!
Happy holidays!
Celebrate with us at Habbox on the hotel, on our Forum and right here!
Join Habbox!
One of us! One of us! Click here to see the roles you could take as part of the Habbox community!


Results 1 to 7 of 7
  1. #1
    Topps Guest

    Default [BBCODE] Help please?

    OK, I recently decided to use CuteNews again because I haven't got time to create my own news system with being back to school tomorrow and what-not.
    So, because I am using a AJAX Page Fetcher and not an iframe in CuteNews, I tried to edit the BBCode and here is the code I edited the original to...

    Code:
    $find= array(
    
    /* 1 */                              "'\[upimage=([^\]]*?) ([^\]]*?)\]'i",
    /* 2 */                                        "'\[upimage=(.*?)\]'i",
    /* 3 */                                        "'\[b\](.*?)\[/b\]'i",
    /* 4 */                                        "'\[i\](.*?)\[/i\]'i",
    /* 5 */                                        "'\[u\](.*?)\[/u\]'i",
    /* 6 */                                        "'\[link\](.*?)\[/link\]'i",
    /* 7 */                                        "'\[color=(.*?)\](.*?)\[/color\]'i",
    /* 8 */                                        "'\[size=(.*?)\](.*?)\[/size\]'i",
    /* 9 */                                        "'\[font=(.*?)\](.*?)\[/font\]'i",
    /* 10 */                                 "'\[align=(.*?)\](.*?)\[/align\]'i",
    /* 12 */                                 "'\[image=(.*?)\]'i",
    /* 13 */                                 "'\[link](.*?)\[/link\]'i",
    
    /* 14 */                "'\[quote=(.*?)\](.*?)\[/quote\]'i",
    /* 15 */                "'\[quote\](.*?)\[/quote\]'i",
    
    /* 16 */                "'\[list\]'i",
    /* 17 */                "'\[/list\]'i",
    /* 18 */                "'\[\*\]'i",
    
                                "'{nl}'",
                           );
    
                    $replace=array(
    /* 1 */                                        "<img \\2 src=\"${config_http_script_dir}/skins/images/upskins/images/\\1\" style=\"border: none;\" alt=\"\" />",
    /* 2 */                                        "<img src=\"${config_http_script_dir}/skins/images/upskins/images/\\1\" style=\"border: none;\" alt=\"\" />",
    /* 3 */                                        "<strong>\\1</strong>",
    /* 4 */                                        "<em>\\1</em>",
    /* 5 */                                        "<span style=\"text-decoration: underline;\">\\1</span>",
    /* 6 */                                        "<a href=\"javascript:void(0);\" onclick=\"ajaxpagefetcher.load('main', 'news/\\1', false);\">\\1</a>",
    /* 7 */                                        "<span style=\"color: \\1;\">\\2</span>",
    /* 8 */                                        "<span style=\"font-size: \\1pt;\">\\2</span>",
    /* 9 */                                        "<span style=\"font-family: \\1;\">\\2</span>",
    /* 10 */                                "<div style=\"text-align: \\1;\">\\2</div>",
    /* 12 */                                "<img src=\"\\1\" style=\"border: none;\" alt=\"\" />",
    /* 13 */                                "<a href=\"javascript:void(0);\" onclick=\"ajaxpagefetcher.load('main', 'news/\\1\', false);\">\\2</a>",
    But, that just gave me the same as always on the announcements section, which is; http://localhost/Loading.FM/index.ph..._from=&ucat=1& which is just stupid because it opens in a new frame and not the AJAX Page Fetcher, so can anyone help me please?

    Cheers to anyone who helps!

  2. #2
    Join Date
    May 2006
    Posts
    1,797
    Tokens
    0

    Latest Awards:

    Default

    localhost wont work for anyone but you.. so i dont see the point in posting the url :S

    And i have no clue what your asking about.
    Coming and going...
    Highers are getting the better of me

  3. #3
    Topps Guest

    Default

    I know, I was just showing what the link still outcomes as...

  4. #4
    Join Date
    May 2005
    Location
    San Francisco, CA
    Posts
    7,160
    Tokens
    2,331

    Latest Awards:

    Default

    You've done it wrong. Edit shows.inc.php so that all the <a> hrefs use javascript instead of regular html.

  5. #5
    Topps Guest

    Default

    Cheers Simon, how do I fix the division by zero error?

  6. #6
    Join Date
    Jul 2005
    Location
    Belgium
    Posts
    2,492
    Tokens
    147

    Latest Awards:

    Default

    Quote Originally Posted by Topps View Post
    Cheers Simon, how do I fix the division by zero error?
    Normally means you're deviding by 0
    and in math you cant divide by 0.

  7. #7
    Join Date
    Dec 2006
    Location
    Swindon
    Posts
    3,299
    Tokens
    215
    Habbo
    dunko

    Latest Awards:

    Default

    you gonna want to do something like

    <a href="javascriptoadpage('whatever');"></a>

Members who have read this thread: 0

There are no members to list at the moment.

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •