Control your content

2nd Sep 2006 ¥åßßå

This plugin was wriiten after a forum request from MrDav.

This plugin filters posts and comments and blocks any that contain words that have been selected as "undesirable" by the admins. The list of words is maintainable from the plugin settings screen in admin.

The plugin works by checking the post or comment against each word in the filter list, if any are found it rejects the post (or comment) with a list off all the offending words. The list is case insensitive and works on whole words only, just in case you run a dog site and want to be able to post about Shitzu's ;)

At the moment it doesn't filter edited comments (will need to request a new hook), although this could probably be worked around.

Future enhancements : allow the choice to block the post or just replace the words with *'s (or a character of admin choice)

I haven't zipped the plugin up yet as it doesn't have a help file etc, hopefully I'll get that done over the next few days

¥

 
 
 
 

Control your comments

29th Jul 2006 ¥åßßå

Before I decided to modify the smilies and bbcode plugins I wrote this plugin ..... which is now obsolete for the use that I was going to put it to (which was to render bbcode/smilies in comments)

This plugin allows you to enable comment rendering for any installed plugin, such as the smilies and bbcode renderers. It has a setting in admin which is a comma seperated list of plugins code for the plugins you want to render comments.

This means that you can now use a post renderer to also render comments [i]even if the renderer isn't set up to render comments[/i]. If I hadn't of modified the smilies and bbcode plugins to render comments then this would have been useful :p

Anyway, it's here if you fancy having a play with it.

¥

 
 
 
 

Ez Comment moderation

21st Jul 2006 ¥åßßå
Introduction

Topic: [keys][Antispam] [Moderation] [Comments] [Improving b2evo][/keys]
Versions: [keys][1.8+][/keys]

 

Ez Comment Moderation

If you employ comment moderation in the default install of b2evolution v1.8 then you'll find this tool a very useful addition to your blog. Instead of having to wade through a load of posts and emails to find all the comments which are awaiting moderation, you can now see a full list right on the front page of your blog.

noteInformation: The AM_allow plug-in is "AM Update" enabled!§. This means that you'll always have the latest version!
_________________
§ "AM Update" is an AstonishMe feature that functions like "auto-update" in many popular software packages. When you're in the back-office, looking at the plugin list, you'll see when an update is available for any of your AstonishMe "AM Update"-enabled plug-ins. Just click to get the newest version. Simple!

As well as the normal "publish", "edit", "delete" buttons, and the link to ban the authors url, it also displays a ban icon beside every url in the spam comment so you can ban all those as well.

Installation (v1.8+) & Usage

"Summer Beta" (v1.8+) Installation

The installation for this plugin is an easy, two-step and click process. Just follow the directions below:

  1. Download: Click on the ZIP file to download it:

    AM_easy_moderation (plug-in for b2evo v1.8)

  2. Unzip & Upload: Unzip the file into the "/plugins" folder of your v1.8+ b2evolution installation. It will make a folder "am_easy_moderation_plugin", which contains one file "am_easy_moderation.plugin.php". Upload the folder and file, to your b2evolution server, putting them into the same "/plugins" location.

  3. Install: In your back-office, under the "App Setting" tab, click the "Plugins" tab. You'll see "AM Easy moderation", in the "Available Plugin" list. Click [Install] in the "Actions" list, on the right.

  4. The skin tags: You then need to wander over to your skin _main.php and add one or both of the following skintags
    1. To list all comments awaiting moderation
      <?php
      	// ------------------------- TITLE FOR THE CURRENT REQUEST -------------------------
      	request_title( '<h2 class="details">', '</h2>' );
      	// ------------------------------ END OF REQUEST TITLE -----------------------------
      ?>
      
      [color=red]<?php[/color]
      [color=red]	// AM Ez Moderation plugin[/color]
      [color=red]	$Plugins->call_by_code( 'am_ezmod', array( 'list_type' => 'full' ) );[/color]
      [color=red]?>[/color]
    2. To list all comments awaiting moderation on each post
      		</div><!-- bSmallPrint -->
      
      [color=red]<?php[/color]
      [color=red]	// AM Ez Moderation plugin[/color]
      [color=red]	$Plugins->call_by_code( 'am_ezmod', array( 'list_type' => 'post' ) );[/color]
      [color=red]?>[/color]
      		<?php
      				// ------------- START OF INCLUDE FOR COMMENTS, TRACKBACK, PINGBACK, ETC. -------------

logged in users who have the right permissions will now be shown a list of spam comments awaiting moderation with a bunch of groovy little icons which will allow you to publish/delete/edit each comment. If there's an author url then there'll be an icon which will allow you to blacklist it, there'll also be an icon allowing you to blacklist each url in the comment because we like to make it easy to fight spammers ;)

Future enhancements

Future enhancements

At the moment, if you click on any of the icons (publish/delete/edit/ban), you're whisked into admin in the normal way to finalise the action or to see the results. As this means that you now need to go back to your blog to continue moderating the list this is not an ideal solution. Personally, we right-click each icon and choose "open in new tab/window" so that we stay on the list.

In a future version of this plugin we'll use javascript, if enabled, to keep you on the list whilst performing all of the actions in the background. As you can imagine, that's going to take a smidge of thinking and coding, and probably a beer or two, so don't delay grabbing the plugin in it's current incarnation ;)

We're also looking at adding a whitelist, and possibly a blacklist, so you can allow chosen commentors to bypass modertion automatically. This list(s) would be fully controlled via admin.

 
 
 
 

Most Comments Plugin

18th Jul 2006 Danny
Introduction

Introduction

This plugin creates a section in your blog sidebar that lists the most commented posts on your blog. It's an easy way to keep track of your most popular/controversial posts. It may even lead to those posts getting more comments.

Installation (v1.8)

Installation

Requires b2evolution 1.8 or later

  1. Download this file: _mostcomments.plugin.php.
  2. Upload it to your b2evolution plugins folder.
  3. In the backoffice, go to Settings > Plugins and find MostComments in the list. Click "install".
  4. Add this bit of code in your skin where you want the list to appear:
    <?php
            // MostComments plugin:
            $Plugins->call_by_code( 'mostCmts', array(
                          'limit'=>5,
                          'list_start'=>'<ol>',
                          'list_end'=>'</ol>'
                          ) );
                          // Add parameters in the array.
    ?>
    You can edit the limit value to make it show more or less in the list. If you want an unordered list instead of an ordered one, then you can change those tags, too.
 
 
 
 

Customise your content

13th Jul 2006 ¥åßßå
Introduction

Topic: [keys][Improving b2evo][/keys]
Versions: [keys][1.8+][/keys]

 

Customise your content

Brief intro re readmore and nextpage

To use :-Upload and install the plugin : instead of using

<!--nextpage-->

now you can enter

<!--nextpage-->the chaptertext<!--endpage-->

advantage : in the old days, a mutipages post had this on the bottom of the article :

Pages 1 2 3 4

since that was not at all descriptive, not many people used it. With this plugin you can have this at the bottom :

Page contents :

  1. Introduction
  2. Download and installation
  3. What files need a change so this works ?
Download and installation

Installing the plugin

*Requires b2evolution 1.8 or later*

  1. Download this file: _am_pagelinks_plugin.zip and unzip it.
  2. Upload the am_pagelinks_plugin folder to your b2evolution plugins folder.
  3. In the backoffice, go to Settings > Plugins and find am_pagelinks in the list. Click "install".

For this plugin to work you need to make a minor change to your skins [b]_main.php[/b], don't worry the change is coded in such a way that if you ever decide to uninstall the plugin then you don't need to undo the skin changes.

The change is very simple, just look for this line of code

<?php link_pages() ?>

and change it to

<?php
		// Check if the plugin is installed
		$have_pages_plugin = $Plugins->get_by_code( 'am_pagelinks' );
		if( isset( $have_pages_plugin->ID ) )
		{
			$Plugins->call_by_code( 'am_pagelinks', array( // parameters to pass to the plugin
					'before_all' => '<div class="tocWrap"><div class="toc"><p>'.T_('Page Contents').'</p><div class="list c'.($Item->main_cat_ID).'"><ol>',
					'after_all' => '</ol></div></div></div>',
					'before_each' => '<li>',
					'after_each' => '</li>',
					)
				);
		}
		else
		{
			link_pages();
		}
?>

That's it, you're now ready to use the custom [i]Read More[/i] and post [i]page links[/i] so wander on to the next page for details on how to use them to your full advantage

Usage

Using the new abilities

Example 1

A post with this stuff in,

This is some teaser text

<!--nextpage-->page 1<!--endpage-->

page 1 stuff

<!--nextpage-->page 2<!--endpage-->

page 2 stuff

<!--nextpage-->page 3<!--endpage-->

page 3 stuff

This will show up as

This is some teaser text

Page Contents

*1. page 1*
*2. page 2*
*3. page 3*

Example 2

 page 1<!--endpage-->

This is the text for page 1 . Page 1 will show up completely. In the other links, You see a simple link to page 1

<!--nextpage-->page 2<!--endpage-->

page 2 stuff

<!--nextpage-->page 3<!--endpage-->

page 3 stuff

This will show up as

This is the text for page 1 . Page 1 will show up completely.
In the other links, you'll see a simple link to page 1

Page Contents

1. page 1
*2. page 2*
*3. page 3*

Want to show all pages of the post together? That's no problem either! You can either choose to do this on a post by post basis by adding the following line to your posts (where you want the link to show up ) :-

<!--allpages [b]Text for link[/b] -->

The [b]Text for link[/b] can simply be text like [b]Show all pages at once[/b], or even an image! It's entirely up to you! Try it for yourself, to show all pages of this post.

The other method you can use is another plugin call, this can be anywhere in your post loop and works in a very similar manner. The plugin call should be put in your skins [b]_main.php[/b] and looks like this :-

<?php
	// Show "all pages" link if multi paged post
	$Plugins->call_by_code( 'am_pagelinks', array( 'all_pages' => '[b]Text for link[/b]' ) );
?>

Once again the [b]Text for link[/b] can either be text or an image. This will show the link for all multi-paged posts or any post that has [i]read more[/i] text.

When in [b]all pages[/b] mode, the index is removed from the post as well, just to be aesthetically pleasing ;)

Parameters

Customise further with parameters

'before' => '<p class="tocWrap">'.T_('Pages:').'<ul>', // the code/text that should appear before the links
'after' => '</ul></p>', // the code/text that should after the linkblock
'before_each' => '<li>', // the code before each link
'after_each' => '</li>', // the code after each link
'nextpagelink' => T_('Next page') ,
'previouspagelink' => T_('Previous page') ,
'file' => get_bloginfo('blogurl') ,
'next_or_number' => 'number',
 
 
 
 

AM Custom Plug-in

2nd Feb 2006 ¥åßßå
Introduction

Topic: [keys] [CSS] [Improving b2evo] [SEO] [JavaScript][/keys]
Versions: [keys][1.8][/keys]

 

Gentlemen, Optimize Your Search Engines!

noteInformation: This plugin is AM Update enabled. This ensures that you always have the latest version of the code installed on your blog

If you have even the slightest interest in SEO then you may have realized that your b2evolution blog suffers a major flaw - your "description" and "keyword" meta tag content is identical for every single page. (G'won ... have a look)! For White-hat SEO purposes and to be semantically correct, the keywords, description and title should reflect the content of your page, whether you're looking at five disparate posts or one, in single-view mode. In other words, the content in these tags should change!

If you blog about your Persian Cat winning the National Cat Show, but your blog is predominantly about computer programming, it doesn't make much sense to have keywords like "PHP, JavaScript, XHTML, CSS, Perl, C++" when someone is viewing the article about your precious feline, does it?

The "AM Custom Plug-in" allows your tags always reflect your post content. It does this by allowing you to add a post-specific title, description and/or keywords. However, it goes a couple of steps farther, by concatonating post-specific keywords, when more than one post is viewed at a time. It also removes duplicate keywords (something Google doesn't like and bans sites for doing). It doesn't end here, as this plugin also lets you add more meta tags (whichever you might want to add) directly from your posts!

Post-specific CSS Anyone?

Until now, if you've wanted to add one-off styling to your posts, you've had only two choices: put it in your skin's CSS file and load it regardless if the post is being viewed or not -or- add it in-line (mind you, you first have to hack _formatting.php to allow 'style' as a core attribute). Neither are ideal. The first bloats your CSS file and the second undermines the whole point of a CSS file and doesn't allow you to use the pseudo-class ":hover".

Here's a demonstration! If you "view source", you'll see the class name "am_custom_demo". It'll only show if and when THIS post is shown. (Check it out). ;)

No longer! The "AM Custom Plug-in" allows you to put post-specific CSS directly into a post. It'll only load the CSS into the <HEAD> whenever that post is displayed. What could be better than that?

How About a Bit of Milk in Your JavaScript?

That's right! The "AM Custom Plug-in" even lets you add JavaScript, directly in your b2evolution posts. It's a popular request on the b2evolution forums and we're pleased to let you know that it can be done with this plugin.

Want it? Read on for install and usage instructions ...

Install and Information

To make the plugin work properly just delete the bits in red in your skin

[color=red]<title><?php[/color]
	[color=red]$Blog->disp('name', 'htmlhead');[/color]
	[color=red]request_title( ' - ', '', ' - ', 'htmlhead' );[/color]
[color=red]?></title>[/color]
<base href="#" data-code="?php skinbase(); /* Base URL for this skin. You need this to fix relative links! */ ?>" />
[color=red]<meta name="description" content="<?php $Blog->disp( 'shortdesc', 'htmlattr' );?>" />[/color]
[color=red]<meta name="keywords" content="<?php $Blog->disp( 'keywords', 'htmlattr' );?>" />[/color]
How to use the tags

The tags to use are fairly simple, and pretty self explanatory :-

<!--title [i]title to use[/i] -->
The [b]title to use[/b] will be used as the pages html title in single post mode.
<!--description [i]post description[/i] -->
The [b]post description[/b] will be used as the pages description in single post mode
<!--keywords [i]keywords to add[/i] -->
The [b]keywords to add[/b] will be appended to the pages keywords. The plugin also ensures that there are no duplicate keywords
<!--meta [i]meta tag data[/i] -->
This will add a meta tag <meta [b]meta tag data[/b] />
<!--css [i]custom css for post[/i] -->
The [b]custom css for post[/b] will be output between <style> tags
<--script [i]javascript to add[/i] -->
The [b]javascript to add[/b] will be output between <script> tags
WARNING : This will allow any user with posting rights to post javascript, it's disabled by default. To enable javascript you need to manually change the setting in the plugin code.
 
 
 
 

Comments

Anonymous
23rd Jul 2006
One thing I noticed, when using this plugin on my own pages, was that any SEO checking tool complained when using custom [titles]/[descriptions] ...

Reason?

There's a certain maximum # of characters for both these meta tags ... beyond this and they cease to be effective SEO tools.

I use the CSS part ALL THE TIME, though. I've also been meaning to test/use the javascript bit too, but so far, haven't the need.
 
Anonymous
23rd Jul 2006
I can cut the description/title off at ##chars (setting in admin) if that makes any difference? (of course, that means I'll have to detect the current pages b2evo title/description to make it work properly) but the way I see it is that it's a user thing (personally I never use any of this plugins ability :p)

¥
 
Anonymous
25th Sep 2006
Well, then yer a fool, because the custom CSS rocks. And now that you've changed the behavior for title, description and keywords ... the rest rocks too!
 
Anonymous
25th Sep 2006
lol, arse :|

¥
 
Anonymous
26th Sep 2006
OKAY ... I don't have a lot of time for this, as the Oop's dinner is nearly up and the cat is hounding me for food too.

There *appears* to be a problem with the custom plugin. It's not inserting title, description &/or keywords for disp=comments; disp=contact (my personal one) or ANY of the disp=options.

LOL ... I have to live with a SiteScore of 9.2 till it's sorted. :|

Hopefully, I'll get a moment to look deeper, but I thought you'd want to know.

HMMM ... this doesn't look good (it's #2 I'm on about, but what are the other ones?) :o LOOK HERE
 
Anonymous
26th Sep 2006
FFs ... I can't look into it further. :|

My host is so screwed that I cannot connect via FTP (critical xFer errors + disk full msgs). I cannot even begin to test possible solutions.

Was thinking that
function SkinBeginHtmlHead( $params = array() )
{
global $MainList, $Blog, $disp;

if ( !isset( $MainList ) [color=red]|| !isset($disp)[/color] ) return;


Might do it ... but I can't test. :|

GOD ... I need a new hosting server.
 
Anonymous
26th Sep 2006
Alright ... looks like it needs more logic, as $disp="posts" for the $MainList dealie and other things (some of which we may not know?). It's those "other things" that aren't getting the title/descr/keywords added.

I've had way too much wine to sort this out in my mid-packing, pre-moving, post-Oop kind of day. :ss

Anyway ... a bug that needs squishing. :p
 
Anonymous
26th Sep 2006
Hopefully that's cured the keywords bit for disp options

Cured some of the validation errors (rest are caused because you're validating a members only blog ;) )

I've not updated the zip (yet) until you're happy that it works ;)

¥
 

AM Update

19th Jan 2006 ¥åßßå

Ok, we now have an update checker plugin (for the public) and a versioning manager (for us).

How it works :-

am_update
This is a plugin for the user to install on his/her blog. The plugin adds a new tab to the tools tab and allows the user to login and check the versions all of their current am skins and plugins against the master version list on this server. The plugin will also list all other available plugins and skins.
am_manager
this is a plugin for ourselves and basically manages all of the versioning information that is returned to the update plugin. Once again there's a new tab on the tools menu which allows you to add/edit/delete skins/plugins information. It should be fairly self explanatory.

If we release the manager plugin to the public then it'll need a tad of an overhaul first, at the moment urls etc are pretty much hardcoded in. An alternative to releasing the manager is to offer developers the ability to add their own plugins/skins to our lists (and make them "update aware" ....ie. include the function/file required to work).

Anyway, have a play with it and if you break it, let me know how :p

Have fun

¥

P.s. Scott, do me a favour and change your photo-zoom off alt-## quick-key, every time I go to put my sig I end up having to delete all the code it spits out :| (my sig use alt+char code) DONE (stk) 1/19 :roll:

 
 
 
 

Comments

Anonymous
19th Jan 2006
Very cool.
 
Anonymous
19th Jan 2006
It's why we're called AstonishMe ;)

¥
 
Anonymous
20th Jan 2006
lol, thanks Scott ;)

¥
 
 

Recent Comments

     
     

    Archives