Antonio Conte Posted June 5, 2012 Share Posted June 5, 2012 Hey, everyone. Working on a pluginen for Wordpress right now. It will allow you to comment articles as a phpBB3 user. The problem has to do with phpBB3s native session solution. By including the file "common.php" and doing some authentification against phpBB3, you'll have support for phpBB3 sessions outside of the forum solution. The problem is that both phpBB3 and Wordpress are polluting the global namespace. Global variables such as $db, $theme, etc, is used by both system. We also have function naming conflicts. Functions are pretty manageable. Because I can run those few functions I need inside my own classes, this works fine. The problem is those global variables that crash WP when included from phpBB3. Is there a way to unset the global variables or a way to use PHPs new namespaces to solve this issue? I guess both PHP and JavaScript developers might be able to answer me that. Link to comment Share on other sites More sharing options...
Larry Posted June 7, 2012 Share Posted June 7, 2012 You can definitely use unset() on the global variables to remove them. And I would consider using namespaces, especially if you're having collusion issues. Sounds like a tedious project! Link to comment Share on other sites More sharing options...
Antonio Conte Posted June 7, 2012 Author Share Posted June 7, 2012 I will try using unset(). That's not such a bad idea. The problem with namespaces, is that I do not know how to use them yet. Will try it. The customer does not require the native sessions to work, but as I see there's demand for such a plugin, I want to implement it. Counting the number of threads on the WP board, there's definitly a marked. Link to comment Share on other sites More sharing options...
Antonio Conte Posted June 13, 2012 Author Share Posted June 13, 2012 For the sake of updating, I'll tell you I'm done with the plugin. I found out creating my own sessions was enough considering frequency of logins. A cookie would be the next step instead of implementing phpBB3's own session with all the pain that brings to the table. Link to comment Share on other sites More sharing options...
Larry Posted June 13, 2012 Share Posted June 13, 2012 Thanks for the update. Are you happy with the end result? Link to comment Share on other sites More sharing options...
Antonio Conte Posted June 13, 2012 Author Share Posted June 13, 2012 Very. The development went better than expected. I only had to use two functions from WP and phpBB combined, one of them phpBBs hashing function. I guess the plugin will perform very stable, won't be easily affected by updates and should be hard to break. you only need to change comments.php in your theme, no edits on the WP or phpBB core. Anyone here have experience earning money on plugins? I don't know where to sell it, for how much or if I should take donations. Any advice is appreciated. Link to comment Share on other sites More sharing options...
Larry Posted June 13, 2012 Share Posted June 13, 2012 I recently came across a site that sells all sorts of people's WP plug-ins: http://codecanyon.net/ Link to comment Share on other sites More sharing options...
Recommended Posts