melnikov.net.ru


Posts tagged with 'WordPress'

« Previous Entries

Mask Wordpress version number

2008-02-09 08:03

This is the text of simple plugin that hide real Wordpress version number from evil eyes. Don’t treat it like the single security fix for your Wordpress install, it’s just one simple step in security process. (read more…)

Tags: plugin, security, WordPress | 11 Comments »

Web-based bug tracker

2008-01-23 06:25

For one small (web)project I need bug tracker / issue tracker / workflow system / name-is-as-you-wish tool. (read more…)

Tags: Debian, IT, php, WordPress | Comment this! »

Vanilla and WordPress integration

2006-11-26 01:28

This is mall manual describing steps to integrate Vanilla forum “to the middle” of Wordpress blog: surround forum engine output with Wordpress header, footer, sidebars, etc.

This must be done after you will read and done “official” Wordpress integration manuall for Vanilla. This will allow two apps use the same users base and same authorization.

There are solution existing already on
Vanilla community forum, but my is slightly more elegant way. The benefit ot this solution is slightly better performance — no connection closing and reopening.

Steps:

(1) Go to /library/Framework/ folder. There are file ‘Framework.Class.MySQL.php’ file. Copy it to the same folder, but with name ‘Framework.Class.WordpressDB.php’.

(2) Edit this new file:

(2.1) replace ‘class MySQL extends Database {’ line with:

class WordpressDB extends Database {

(2.2) replace function GetConnection() with this one:

function GetConnection() {
## use DB connection established by WordPress
global $wpdb;
if( $wpdb->dbh ){
$this->Connection = $wpdb->dbh;
} else {
$this->Context->ErrorManager->AddError($this->Context, $this->Name, ‘GetConnection’, ‘$wpdb->dbh does not exist, Wordpress is not initialised:’, $php_errormsg);
}
return $this->Connection;
}

(2.3) replace function MySql(&$Context) with this:

function WordpressDB(&$Context) {
$this->Name = ‘WordpressDB’;
$this->Context = &$Context;
}

(3) in your /conf/settings.php or your /conf/database.php add line:

$Configuration['DATABASE_SERVER'] = ‘WordpressDB’;

(4) go to database and comment out all strings tarting with $Configuration['DATABASE_ -- you will not need them anymore.

If now Vanilla works, create new theme for it and customize it: replace some Vanilla code with WP calls like get_header(), get_footer(), etc.

If you need to change Vanilla templates rendering order, use $Configuration['CONTROL_POSITION_ (...) variables. In my /conf/settings.php file there are two such lines:

$Configuration['CONTROL_POSITION_MENU'] = '598';
$Configuration['CONTROL_POSITION_PANEL'] = ‘599′;

Note that both engines will co-exist in the same space, so conflicts could happens. For example, if you have ‘Role Manager’ Wordpress plugin installed, it will conflict with Vanilla object with the same name.

Tags: php, WordPress | Comment this! »

Wordpress Plugin: Theme Icon for Admin Panel

2006-11-10 05:22

This plugin will show ’shortcut icon’ (usually from ‘favicon.ico’ file) from your current theme as shortcut icon for admin panel of your blog.

Usually you just need to drop your favicon.ico file in root of your html and it will shown without any plugins. But in my case I used one install of WordPress for couple of sites, so solution was to put icon to theme folder and specify it in theme ‘header.php’:
<link rel="SHORTCUT ICON" href="<?php bloginfo('template_url'); ?>/favicon.ico"></link>

But such solution works only for result pages, not the WordPress Admin Panel, so here is special (small) plugin. Download file, rename it to *.php, put to your plugins folder and activate in ‘Plugns’ menu.

Tags: plugin, WordPress | Comment this! »

Wordpress Plugin: Dates for Humans (Russian version)

2006-02-23 02:34

Сегодня написал ма-а-аленький плагин для WordPress, который решает две задачи:

  1. Функция mnr_human_date() показывает дату записи (или любую другую дату) в виде строки ‘Сегодня’, ‘Вчера’, ‘3 дня назад’, ‘61 день назад’ и т.д.

    Параметры:

    • $echo: true, если полученную строку сразу выводим на экран, false, если возвращаем строку в месте вызова
    • $date: дата в любом формате, который поймет PHP-функция strtotime(); если дата отсутствует, будет использоваться дата поста (внутри Wordpress The_Loop, естественно)
    • $firstLetterUpperCase: true, если надо начинать слова ‘Вчера’ и ‘Сегодня’ с большой буквы

    Собственно, это чуть переделанная функция из плагина Dates for Humans; его автор Troy Mcilvena).

  2. Функция mnr_numeral_noun_ru() подставляет после числа русское существительное с правильным окончанием (FixMe: дописать доку)

mnr-human-dates-ru.phps (v0.1)

Tags: plugin, WordPress | Comment this! »

« Previous Entries

  • grub
    xen
    security
    windows remote
    serial
    virtualBox
    ups
    windows
    virtualization
    psy
    webTech
    linux
    unix
    RAID
    blogs
    humor
    plugin
    php
    WordPress
    IT
    Debian
    • about this site
    • contact me