How to use Invision’s BBCode

Using Invision’s BBCode isn’t straight forward. Chances are that you need to invoke the BBCode parser if you want to create a plugin or hook for Invision Powered Board. Here’s the rough code to do so, with $topics being the array containing all the topics from the database to be parsed:

[code lang=”php”]setAllowHtml( 1 );
//—————————————–
// Return the data
//—————————————–
foreach ($topics as &$topic) {
$topic[“formattedPost”] = $editor->process($topic[“post”]);
IPSText::getTextClass(“bbcode”)->parsing_section = “topics”;
IPSText::getTextClass(“bbcode”)->parse_smilies = TRUE;
IPSText::getTextClass(“bbcode”)->parse_bbcode = TRUE;
IPSText::getTextClass(“bbcode”)->parse_html = FALSE;
IPSText::getTextClass(“bbcode”)->parse_nl2br = TRUE;
IPSText::getTextClass(“bbcode”)->bypass_badwords = FALSE;
$topic[“formattedPost”] = IPSText::getTextClass(“bbcode”)->preDisplayParse( $topic[“formattedPost”] );
}
?>[/code]

For the parsing_section, you should put a value that corresponds to the editor section. In my case, I need it to ‘topics’. To get the full list, you may need to look up Invision Powered Board’s source code which I cannot provide.

I wrote this down more as a personal note and I hope it benefits you as it did for me. If you have any questions, feel free to post and I can attempt answering.

How to integrate Google Analytics into IP.Board

Google Analytics is easy to integrate to track your visitors and how they found your website. In the case of IP.Board or Invision Powered Board, integrating is very simple too.

First you will need to get your Google Analytics tracking code from your Google Analytics Admin page. If you don’t have the ‘Tracking Code’ option, it could be that you are assigned with admin permissions to your website.
Continue reading “How to integrate Google Analytics into IP.Board”

What KahWee tweeted on 2009-03-13

  • Currently at Media Business Forum #mbf09 #
  • Saw Zhu Hou Ren 朱厚任 in Media Business Forum, we are the only ones using laptop it seems. #mbf09 #
  • The new iPod Shuffle is nice, but, shame on Apple restricting the users’ earphone choices. #
  • I always found stretched presentations awful to look at. #mbf09 #
  • Over the next 5 years, SGD230m would be injected into the media sector, expected to spur creation of 2,000 jobs. #mbf09 #
  • Media Training and Attachment (META) matches 150 local media professionals to companies starting Apr’09. #mbf09 #
  • Six more presentations and I’m hungry now! #mbf09 #
  • Michael Yap talking about regulations in the Singapore media sector. #mbf09 #
  • @molemole: You so fast sleepy liao? #
  • Can the media industry be more competitive in Singapore without hurting local companies? #mbf09 #
  • Digitalization enables more spectrum in Singapore. No, I don’t know what I’m talking about. #mbf09 #
  • We love the MDA Rap music video don’t we? #mbf09 The superman in the video is talking right now. #
  • Powerpoint yellow, powerpoint gold, powerpoint cyan and your favorite Arial font, MDA presentation could’ve looked better. #mbf09 #
  • Achievement in broadcast, 2180 local hours, 900 jobs! #mbf09 #
  • The Little Nyonya (by MediaCorp Studios) is the highest rated show in 15 years, viewed by 1 in 3 in Singapore. #mbf09 #
  • MDA targets 2380 local hours and 1280 jobs for broadcast in 2009. #mbf09 #
  • Public Service Programmes are values we believe in? And it can be international? Seems contradictory. #mbf09 #
  • MDA thinking of partnering with Joost? #mbf09 #
  • Yet another government agency using the word “hub”. We want to be another hub again… #mbf09 #
  • @claudia10 I got 3 hours more! #
  • I just asked @uzyn if Kenneth Tan (COO, MDA) is in the video too. LOL #mbf09 #
  • Kenneth Tan’s presentation has a text line height problem. Plus it is stretched. #mbf09 #
  • @claudia10, mine is a 6 cell instead of a usual 3-cell. Anyway, the battery bar always lies. When it says 3hr, it’s actually 2. #
  • Kenneth breaks down the ecosystem of film: Optioning, development, production, distribution, exhibition. #mbf09 #
  • Kenneth adds that Singapore is lacking in optioning and development process. #mbf09 #
  • Stereoscopy is the 3D glasses thingy. #mbf09 #
  • People need to learn PowerPoint from @claudia10. #mbf09 #
  • Government service love acronyms. #mbf09 INSPIRE: Internationalization of Singaporean Production Initiative, Representation & Enterprise. #
  • INSPIRE acronym got problem loh. #mbf09 Is Singapore and not Singapore. @uzyn spotted it. #
  • I mean it is Singapore, not Singaporean. #mbf09 #
  • INSPIRE does some sort of a matchmaking service for the media. Helps in distribution. #mbf09 #
  • The current vein diagram is problematic. PowerPoint has Smart Art now by the way. #mbf09 #
  • @uzyn wants you to know that it’s “venn” and not “vein”. Okay I lost one. #mbf09 #
  • SPINE is Spearheading Publishing Innovation for New Enterprise. Yay for more acronyms. This is just like army. #mbf09 #
  • Call for proposals – stereoscopic 3D ecosystem developer. Due March 26! #mbf09 #
  • Mr. IDM talks again; Michael Yap shares on Interactive Media & Games. #
  • @melvinkee Well, that’s why I tweet – to keep awake. #
  • No, this is NOT a live image. #mbf09 #
  • Garena is ranked 1164th website, ahead of zaobao.com which is ranked 1209th. #
  • MDA expects 500 to 900 new jobs #mbf09 #
  • Anyhow use images from Google Images. #mbf09 #
  • Catalytic Project should ignite the growth of the game sector. #mbf09 #
  • @claudia10 Why would we get arrested? #mbf09 MDA also regulate social media now? #
  • @cheeaun: I seen before if (hello == true) { /* some code */ } elseif (hello == false) { /* some code */ } #
  • More call for proposals at #mbf09. Call for FutureMobile applications by SingTel, Apple, Friendster and Mozat. #
  • What the hell are the 5Cs? #mbf09 Why people keep talking about it? #
  • Money Manpower & Mediapolis by Mr. Seto #mbf09 #
  • I think government supported companies slow down startup ideas because startups just wait for funds. #mbf09 #
  • Mr. Seto speaks like a preacher I know. #mbf09 #
  • Mediapolis actually sounds exciting but I hope it won’t be like Biopolis. #mbf09 #
  • This is like the Biopolis slides. #mbf09 #
  • Imaginary headlines? Oh this is something new. #mbf09 #
  • MDA hopes to generate pathfinder projects with key partners in regions such as Beijing, Shanghai, Tokyo and Bristol. #
  • MDA has co-production treaties in AU, CA, Korea and NZ. Currently negotiating with CN and IT. #
  • Oh no I’m hungry. #mbf09 #
  • End of presentations at #mbf09. #
  • @melvinkee I have no idea about it. The talk wasn’t clear on these partnerships. #mbf09 in reply to melvinkee #
  • @trudinger Since startups can get gov funds, they may be less inclined to start things by their own and just wait for gov. Waiting hurts. in reply to trudinger #
  • @echoz you at the IT Show? I hate the squeezing and decided against going! Haha #
  • @echoz A gigabit switch? Why would u need that? in reply to echoz #
  • @trudinger There’s always garage style development, haha in reply to trudinger #