Archive for the ‘PHP’ Category

Recent phpBB Topics on Wordpress Plugin v0.4

phpBB Recent Topics Admin interface in Wordpress
Admin GUI

It’s been a year since the last release so perhaps this version should be called “about time!” v0.4 has primarily been released as a bugfix version, if you’re happy with v0.3 and have it running fine then don’t bother, in fact edit phpbb_recent_topics.php so that WordPress stops complaining about finding a newer version.

Download phpBB_Recent_Topics_0.4 from wordpress.org

What’s New?

  • Most importantly I have tested this plugin with phpBB3 and WP2.5 so I’ve updated the readme.txt to reflect this.
  • I finally quashed the install bug where by phpbb-recent-topics was confused with phpbb_recent_topics.

Call to undefined function: register_sidebar_widget

So WP2.5 is out, and I figured it was about time I squashed that load bug on phpbb_recent_topics, while I’m at it I figure I’ll wigetize it.

The problem is that the example on the automattic site doesn’t actually work! If you paste…

function widget_myuniquewidget($args) {
    extract($args);
?>
        <?php echo $before_widget; ?>
            <?php echo $before_title
                . 'My Unique Widget'
                . $after_title; ?>
            Hello, World!
        <?php echo $after_widget; ?>
<?php
}
register_sidebar_widget('My Unique Widget','widget_myuniquewidget');

Into a blank plugin you get this in your logs…

PHP - Simple Validate E-Mail function.

I found this by accident, but thought it was useful to take a note as my regular expression knowledge is basic to say the least…


function ValidateEmail($e,$v=-1) {
global $verbose;
/*
Return codes:
0: appears to be a valid email
1: didn't match pattern of a valid email
*/
if ($v==-1) { $v=$verbose; }
if (!preg_match("/^[a-z0-9.+-_]+@([a-z0-9-]+(.[a-z0-9-]+)+)$/i”, $e, $grab)) {
return 1;
}
return 0;
}

Usage is simple….


if(!(empty($_POST['email']))){
$email = ValidateEmail($_POST['email'],$v=-1);
}
// check E-Mail Syntax
if ($email == 1) {
echo “Incorrect Email Address Submitted.
“;
}

Thanks Shane Marriott :)

Whoops! - Files back online.

I thought I’d post a quick note to say thanks Tobias for letting me know that my files download area was broken, I was playing with mod_rewrite over the weekend and forgot to check that - DOH !

Anywho, all is sorted now, sorry to those that couldn’t get to my wordpress goodies!

Recent phpBB Topics on Wordpress Plugin v0.3

UPDATE: This Plugin has been updated, please download the update from http://wordpress.org/extend/plugins/phpbb-recent-topics/, and please comment on the new post, thanks.

phpBB recent topics admin interface in WP 2.3.x
Admin GUI

Another day, another plug-in update…..Version 0.2 never saw the light of day, after fixing my compatibility issue I moved straight into setting up the admin interface. So here we have it, a proper implementation :)

Download phpBB Recent Topics

Installation

  • Unzip phpbb_recent_topics.tgz in your `/wp-content/plugins/` directory. (You’ll have a new directory, with this plugin in /wp-content/plugins/phpbb_recent_topics)
  • Activate the plugin through the ‘Plugins’ menu in WordPress

root cookie v1.2 (wordpress plugin)

I’ve been a bit slow, aja pointed out the fault a few days ago, but I’ve been a bit slow off the mark :(

Anyway, here’s the official announcement,

root cookie version 1.2

This version primarily fixed the logout issue, and yup, I’ve learnt by my mistakes it loads it gently too ;)

Compatability issues with phpbb recent topics plugin ?

I’ve recently run into a compatibility problem with my phpbb topic plugin, basically I tried to copy the code I did ( the ob_start / stop buffer thing ) and I found that the second time I ran the loop it didn’t work !

Anyway in lieu of working on an admin interface for setting up the phpbb connection I’m solving this, if anyone is having a similar issue please let me know.

Oh, and this might be of interest…

———- Forwarded message ———-
From: Nick
Date: 12-Mar-2007 11:38
Subject: Re: Recent phpBB Topics on Wordpress Plugin
To: Paul Stokes

Recent phpBB Topics on Wordpress Plugin

UPDATE: This Plugin has been updated, the latest version is available on wordpress.org please comment on the new post, thanks.

Written primarily for my wife to use in the future, but I’ve developed a pluging that allows you to post a list of recent phpBB threads/topics within wordpress.

If found this plugin by Brandon Alexander but it wasn’t right for my needs, firstly he looks up usernames from phpBB, now my phpBB & wordpress installs don’t share databases and I thought it was a bit of a security risk giving wordpress access to my users password hashes… and secondly that plugin gives a list of recent posts, not what I wanted, and wanted threads (topics).

bbCode plugin for bbPress

I’ve ported the bbCode Plugin for Wordpress by Jeff Moore to bbPress, seems to work fine; not all the bbCode is marked up as it’s not allowed by default with bbPress, I plan to fix that in version 0.2, but for now Enjoy !

Download bbCode Plugin for bbPress

Installation is simple in the current implementation of bbpress, just rename bbpress_bbcode.txt to bbpress_bbcode.php and place in your my-plugins directory (See bbpPress documentation for full details.)

This plugin has been tested on v0.75 & 1.0-Alpha so hopefully will work on anything in the middle.

Root Cookie WordPress - Plugin updated !

UPDATE: This Plugin has been updated, see please the new post, thanks.

Unless there’s a security risk, I’m always slow to upgrade my blog to the latest & greatest WP, the reason is plugins, when there’s a major revision update, plugins cause problems, so it’s usually best to wait for the maintainers to fix them before upgrading.

Anyway, I started to test the upgrade, and realised that I had a plugin that didn’t work, and yes you guessed it, it was the one I wrote ! - DOH !

Avatar « bbPress plugin browser

I’ve been playing with bbpress, by default there are no Avatars, I’ve made a little adjustment to the plugin by Joshua Hutchins

Here is my Forum Post: Avatar « bbPress plugin browser

I wrote an extra function for your plugin so that the avatar can be displayed on the profile page…

function profile_avatar() {
global $user;
if ( get_avatar_loc ( $user->ID ) ) {
echo '<img src="' . get_avatar_loc( $user->ID ) . '" alt="' . $user->user_login . 's Avatar"' . ' />';
}
}

Styles & img sizes could be added into the tag as desired…. then in profile.php template, add…

Blog CheckUp - WordPress: Improve with SEO

I noticed the other day, that the google rank for linickx.com has dropped from a respectable 4, to a pitiful 0 !

The reason for the drop is obvious, November & December have been busy real work months for me, and I’ve not been able to post much online.. no art, no php, no comments, nothing ! Now photomatt has recently blogged about the disconnect between productive good techies and people who have time to blog, so I won’t go into it here; I will just say that I agree, and I think my blog reflects that. What I didn’t realise about my google rank is that the age of your links contributes to your overall PR. So although all those other links to linickx.com still exist on the web they’re getting older so they must not count as much; of course this is speculation, google keep to themselves how their ranking is made up, but it’s the only thing that’s changed.

Cookie Path Plugin For WordPress 2.0 (root Cookie)

UPDATE: This Plugin has been updated, the below links to the new file, but please comment on the new post, thanks.

I’ve been busy this AM, my site is a little bit integrated with WordPress, basically I call the header and footer from WP so that my custom code changes themes when WordPress does :)

I want to take it further and use the authentication cookie, so that my code recognizes me when I log in (in the same way WordPress does). In order for linickx.com to see the cookie set by linickx.com/blog, I need to change the COOKIEPATH. The change is actually quite simple, in fact the “set cookie” function is a pluggable one :D

h4×0r on themes.wordpress.net

Tiz cool when things get published on other sites, my h4×0r theme is on themes.wordpress.net

missing_image_goes_here

cool :cool:

shame i can’t work out how to link to them properly !

h4×0r (Hacker) / The Matrix Theme for WordPress

My h4x0r Theme

I thought I’d try something different ;)

I’ve been playing with wordpress for nearly a year now, and thought it’d be cool to make a publicly available theme, I wasn’t sure on what to do so I thought I’d start with a simple pallet. My theme is a black on green code looking theme, you know the hacker site style; to make it more interesting I added some matrix references, and silly bits of php code.

The theme has been tested on wp 1.5 & 2.01 (including a blank one as requested on the codex) , there is a screenshot and I’ve also installed a theme switcher so you can demo it :D