project blog

digital diary of diverse diversions
To be conscious that you are ignorant is a great step to knowledge... ~Benjamin Disraeli

20 September 2005

Automatic Polling of B2Evolution Antispam Update List

Written by Yours Truly ( Contact the author of this post )
Published on September 20th, 2005 @ 02:52:13 pm, using 220 words, 69 views

In b2evolution 0.9.x automatically updating the antispam database involves the creation of a local file which will process the new entries and add them to the database. First, create a file in your b2evolution blog's /admin/ folder (in this example we name the file b2antispam_poll.php) and paste the following code into it:

<?php
require_once( dirname(__FILE__) . '/../conf/_config.php' );
$login_required = false;
require_once( dirname(__FILE__) . "/$admin_dirout/$core_subdir/_main.php" );
require_once (dirname(__FILE__).'/'.$admin_dirout.'/'.$core_subdir.'/_functions_antispam.php');
b2evonet_poll_abuse();
?> 

Then, create the following crontab:

0 */6 * * * /path/to/php /path/to/blog/admin/b2antispam_poll.php

When CRON executes the b2antispam_poll.php file, the central antispam database is polled for new entries which are then entered into the local antispam database. Essentially, this process automates the task of updating the antispam list, eliminating the need for an administrator to manually keep the local antispam blacklist up to date.

(The above CRON syntax specifies that CRON will execute the b2antispam_poll.php file at the top of the hour, every six hours. Read this page for additional information on CRONtab syntax.)

Contemporaneous Auditory Narcotics:
or, What my speakers are currently pumping...
Quannum - I Changed My Mind

15 September 2005

B2Evolution Code for Linkblog Inclusion

Written by Yours Truly ( Contact the author of this post )
Published on September 15th, 2005 @ 09:57:06 pm, using 123 words, 54 views

The following block of PHP code will insert a blogroll or linkblog into the sidebar of your b2evolution 0.9.x blog. A blogroll is an aggregatated listing of external links which are stored, typically, on a dedicated 'linkblog' blog on a b2evolution system, and displayed as a list in the sidebar of other blogs on the same system.

<!-- ============== LINKBLOG ============= -->
<!-- =========== START SIDEITEM 7 ============ -->
<div class="bSideItem">
<!-- <h3><?php echo T_('Linkblog') ?></h3>-->
<?php require( dirname(__FILE__).'/_linkblog.php' ); // LINKBLOG INCLUDED HERE ?>
</div>
<!-- ============ END SIDEITEM 7 ============= -->

Contemporaneous Auditory Narcotics:
or, What my speakers are currently pumping...
Orbital - In Sides (U.S. Bonus Disc, Second Version)

11 September 2005

B2Evolution 'smallhead' Div Source Code

Written by Yours Truly ( Contact the author of this post )
Published on September 11th, 2005 @ 06:33:12 pm, using 167 words, 45 views

This block of PHP code shows the original 'smallhead' div in a typical b2evo 0.9.x blog skin. It displays the categories, author, post-time, and wordcount of each post. This code is located in the /skins/skinname/_main.php file of a typical b2evo skin, and is shown here for reference purposes in case changes are made which break something in the template:

<div class="bSmallHead">
<?php
$Item->issue_time();
echo '&nbsp; |&nbsp; ', T_('Categories'), ': ';
$Item->categories();
?>
<br />
Posted by: <a href="<?php $Blog->disp( 'blogurl', 'raw' ) ?>?author=<?php the_author_ID() ?>" title="<?php echo T_('Browse all posts by this author') ?>"><?php $Item->Author->prefered_name() ?></a>&nbsp; |&nbsp;
<?php
$Item->wordcount();
echo ' ', T_('words');
?>
</div>

Contemporaneous Auditory Narcotics:
or, What my speakers are currently pumping...
Hallucinogen - Promotheus Process EP

10 September 2005

Sticky Post

Written by Yours Truly ( Contact the author of this post )
Published on September 10th, 2005 @ 07:23:45 pm, using 1758 words, 1970 views

This PHP hack for b2evo skins gives the ability to designate a particular post in each blog on a b2evolution system as a "sticky post" (i.e. that post will always appear at the top of the blog, and will not be listed chronologically). This is useful for creating a post which describes the contents of the blog or category, or which contains some other information which would be useful to have shown always on the entry page to a specific b2evo blog.

First, modify your "blogs" table so you can assign a post ID as 'sticky' for each blog. You will be able to set this in the b2evolution back office later. Assigning a value of 0 (zero) will mean no sticky post. I altered the b2evo blogs table via phpMyAdmin with the following mySQL command:

ALTER TABLE `evo_blogs` ADD `blog_stickypost_ID` INT( 10 ) DEFAULT '0' NOT NULL

Read the full text of this post...

B2Evolution Hack: Exit to Active Blog

Written by Yours Truly ( Contact the author of this post )
Published on September 10th, 2005 @ 06:41:28 pm, using 539 words, 1303 views

This hack allows you to avoid the annoyingness of exiting to the first blog/stub after creating or editing a post in a sub-blog. In short, it saves a mouse-click and a little confusion... This hack for the b2evolution 0.9.x admin interface only works for people who use stubfiles to access their b2evo blogs, and who have correctly configured their stubfiles in their server's .htaccess file.

In /admin/_menutop.php find:

<div id="headfunctions">
<?php echo T_('Style:') ?>
<a href="#" onclick="setActiveStyleSheet('Variation'); return false;" title="Variation (Default)">V</a>&middot;<a href="#" onclick="setActiveStyleSheet('Desert'); return false;" title="Desert">D</a>&middot;<a href="#" onclick="setActiveStyleSheet('Legacy'); return false;" title="Legacy">L</a><?php if( is_file( dirname(__FILE__).'/custom.css' ) ) { ?>&middot;<a href="#" onclick="setActiveStyleSheet('Custom'); return false;" title="Custom">C</a><?php } ?>
&bull;
<a href="<?php echo $htsrv_url ?>/login.php?action=logout"><?php echo T_('Logout') ?></a>
&bull;
<a href="<?php echo $baseurl ?>"><?php echo T_('Exit to blogs') ?> <img src="img/close.gif" width="14" height="14" class="top" alt="" title="<?php echo T_('Exit to blogs') ?>" /></a><br />
</div> 

and change it to:

Read the full text of this post...

project blog

A journal containing the assorted projects and diversions which occupy my interest, including such things as Photoshop graphic design and standards compliant web design, web development, advanced css layouts, photography and photo-manipulation... whatever...


Currently Into

Image from Amazon
CSS Mastery: Advanced Web Standards Solutions by Andy Budd, Simon Collison, Cameron Moll
Image from Amazon
Transcending CSS: The Fine Art of Web Design (Voices That Matter) by Andy Clarke, Molly E. Holzschlag, Aaron Gustafson, Mark Boulton
Image from Amazon
The Man in the High Castle by Philip K. Dick

Zeitgeist

Most-viewed Posts

Most-verbose Posts

Journal Summary

  • 43 posts written between 15 July, 2004 and 14 April, 2008
  • 46,975 total words
  • 144,906 total views since 30 July, 2007
  • 36 comments left by readers

Choose skin

  • Switch to the candleglow skin
  • Switch to the sojourn skin
  • Switch to the december skin
  • Switch to the viper_flats skin
  • Switch to the wheelz_blue skin
  • Switch to the route_53 skin
  • Switch to the lush skin
  • Switch to the ravehands skin
  • Switch to the underground skin
  • Switch to the vastitude skin
  • Switch to the tunnel_vision skin

Miscellany

XML Feeds

Users Currently Online

  • Guest Users: 31

The Extras

Contact the admin     Engine: b2evolution     Hosting: Hostgator.com
Content Copyright ©2004-2008 TheDarksighed. All Rights Reserved.