Only fill this in if you're a spammer huh? Your name :
Your email :
Your message :
Aug
1st
2007

Customise your posts

Posted in : Plugins & Widgets

If I waited for Scott we'd never have a writeup :|

We've had this plugin lying around for so long that we've already updated it twice and still haven't managed to do a public release ...... oooops :p Anyway welcome to the AstonishMe Custom Plugin, this plugin allows you to add all sorts of custom stuff directly from your posts giving you far more control over your blog than ever.

Wanna play with SEO?

Whilst b2evolution is a great little blogging platform, it does have a few drawbacks, one of which is the static keywords and descriptions for each blog. As you probably know, the evil google bot prefers to see keywords and description that are relevant to the content on the page at any given moment. Now you can have custom keywords and description on a per post basis, you can also control the title and even add more meta tags if you want. The title & description of the post are used when you're in single post mode ( it defaults to the stock ones if you don't have one for a post ). The keywords are used whenever the post is being viewed archives/categories/front page etc, only the unique ones are shown so you shouldn't get any duplicates.

Gimme some style

Apparently some people like to make their posts look like a tarts boudoir which, up until now, has meant that you either needed a huuuuuuuuuuuuuuge stylesheet or *shudder* you had to restrict yourself to just a few boring styles!! Now you have the ability to add post specific baubles to your blog with no fear of excessive bloat. To make things easier you can target each post specifically simply by using %post% in your class/id names. This will be replaced by am_custom_post_##_ so you can avoid conflicting classnames.

Need a script?

If you had javascript enabled, you wouldn't be reading this ;)

If you happen to be one of those people who are forever adding all sorts of javascript gimmicks so that you can amaze your visitor with some stunning new effect, assuming they have javascript enabled of course, then you're probably going to want to meander through the plugins code and change a 0 to a 1 ;). This will then allow you to either add your script in <head> or directly inside the post at the spot you type it. Fair warning though, enabling this option will allow any user with posting rights to post javascript, so be think before you enable it huh?

Enough already

I suppose it's time to tell you how to use all these new found powers huh? First off all you need to do all teh usual stuff like, download the plugin, unzip it, upload it, wander into admin and install it. Unlike most of our plugins, this one also involves you ripping a couple of bits out of your skins _main.php. Don't worry though, it's fairly painless and the worst you could do is melt down your server if you delete the wrong bit huh? So, now that you're reassured, crack open your skins _main.php and delete the red bits ;)

PHP:

<span style="color:red"><title><?php </span>
      <span style="color:red">$Blog->disp('name''htmlhead'); </span>
      <span style="color:red">request_title' - '''' - ''htmlhead' ); </span>
    <span style="color:red">?></title> </span>
    <base href="<?php skinbase(); /* Base URL for this skin. You need this to fix relative links! */ ?>" /> 
<span style="color:red">    <meta name="description" content="<?php $Blog->disp'shortdesc''htmlattr' );?>" /> </span>
    <span style="color:red"><meta name="keywords" content="<?php $Blog->disp'keywords''htmlattr' );?>" /> </span>

Now what?

From now on, whenever you make a post you have the ability to customise it in all the ways mentioned above by using the following tags. For css and javascript %post% will be replaced with .am_custom_post_##_. For those of you who have been using this plugin for a bit, don't worry, all old style tags still work as well ;)

Code:

<!--title title to use -->
The title to use will be used as the pages html title in single post mode.
<!--description post description -->
The post description will be used as the pages description in single post mode
<!--keywords keywords to add -->
The keywords to add will be appended to the pages keywords. The plugin also ensures that there are no duplicate keywords
<!--meta meta tag data -->
This will add a meta tag <meta meta tag data />
<!--css custom css for post -->
The custom css for post will be output between <style> tags
<!--script javascript to add -->
The javascript to add will be output inside <head> between <script> tags
<!--js javascript to add -->
The javascript to add will be output inside your post 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.

So, now you can decorate your posts to your hearts content, let me know if you have any problems huh?
¥

Trackback URL (right click and copy shortcut/link location)

Trackback url for this post
Note : This trackback url is time limited so use it within 30 minutes or the SpamHound will snarl at you.

http://waffleson.co.uk/z/?k=36642602633103238e28ea6db37b3ea28af6cd74b76f0da59

Replied on : 08/01/07 @ 04:36 pm #1

Yeah, yeah ... I :* you too.

This plugin rocks, but now I'll have to download it and install it all over again, just b/c of the %post% thing.

Last time I checked, you had a membership at http://astonishme.co.uk :|

-stk

What should we do with spammers? You want to stone them
 
 
¥åßßå users avatar

Posts : 845

Joined : 10/05/05

Location : 127.0.0.1

Reply to comment 14117 by ¥åßßå

Replied on : 08/01/07 @ 06:53 pm #2

Hey pastel boy, last I looked this plugin was just waiting for the final fluffy touch :roll:

Gotta love any plugin that allows blinking text :|

¥

What should we do with spammers? You want to play with them

I may have opened the door, but you entered of your own free will

 
 
Gary users avatar

Posts : 334

Joined : 04/04/05

Reply to comment 14122 by Gary

Replied on : 08/05/07 @ 06:57 pm #3

Hi Paul, I can see you have a new post, glad you found the admin/new post link at last.
Not got time to read it though, we have a table booked for tea at 8pm and must set of to go now.
I will have a good read of it another time.

TTFN,

Gz

What should we do with spammers? You want to play with them

Blog-a-doodle-do :D  http://garysblog.co.uk

 
 

Replied on : 09/02/07 @ 02:31 am #4

Awesome plugin! just instaled it and trying to make it work for Haloscan comments system, but I still getting a "Illegal tag: script" error. I'm using the am_custom_post_##_ in a span tag so I don't know what I'm doing bad!

Sorry for this message, but I tried to post in the b2evolution forum and recognized my post as spam! it's very unfair!

What should we do with spammers? You want to burn them
 
 
¥åßßå users avatar

Posts : 845

Joined : 10/05/05

Location : 127.0.0.1

Reply to comment 14199 by ¥åßßå

Replied on : 09/02/07 @ 07:52 am #5

Glad you like the plugin. I'm assuming that you managed to post on the forums as I've pretty much just answered that question here

¥

What should we do with spammers? You want to play with them

I may have opened the door, but you entered of your own free will

 
 

Replied on : 10/13/07 @ 12:58 pm #6

¥, maybe this plugin should be embedded to b2evolution v2.0? I think this is very beneficial for b2evolution itself, not just the users ;)

In case it won't be, any change you'll change it to a b2evo plugin so no more hacking?
Also a few suggestions or requests:
Instead of

<!-- stuff here -->


Why not a new "field" during post or edit-post? I think it will be easier.

More specifically, for description.. maybe instead of a separate "field", why not a new tag say:

<description> ... </description>


which we can use to enclose a portion of our post-content which will serve as the description?

Just some ideas ^_^

Regards
 
 
¥åßßå users avatar

Posts : 845

Joined : 10/05/05

Location : 127.0.0.1

Reply to comment 14330 by ¥åßßå

Replied on : 10/13/07 @ 02:56 pm #7

Without it having a new hook it's almost impossible to make this 100% a plugin. The description and keywords are no problem, but the main battle is changing the title and then reverting it for the post. I'm not sure how many people actual use that lil bit of functionality apart from me though.

Prior to 1.10.x there wasn't an easy way to make the title/keywords/css/js input fields without the plugin having it's own database table, and since 1.10.x I keep forgetting to use the new hooks :P

I'm a tad adverse to using custom html tags to wrap things because they degrade badly if a plugin is uninstalled, but it could certainly be made to trigger off <!--description--><!--/description-->

I'll have to have a play around in the code to see what I can do ;)

¥

I may have opened the door, but you entered of your own free will

 
 

Replied on : 10/26/07 @ 01:10 am #8

haii hOw r ya bubah??

x x x
 
 

Replied on : 04/28/08 @ 09:52 am #9

Hi!

I'm using the plugin on b2e 2.4.0. On every post i fill the fields "Keywords" and "Description", but this tags are not used. I deleted the default tags in my template, but after publish a post, the site has no meta-tags.

I checked my table-data (_evo_item__item) and i can see the - tags there.

Something is wrong, but what?

Greetings from germany
Joerg
http://www.stundenzeiger.de
 
 
¥åßßå users avatar

Posts : 845

Joined : 10/05/05

Location : 127.0.0.1

Reply to comment 14689 by ¥åßßå

Replied on : 04/28/08 @ 10:32 am #10

Hi there,
from viewing the source of your page I can't see a single keywords/description/css/title snippet in any of your posts?

They should look something like this in page source :

<div class="bText">
<!--title Custom titles rock -->
<!--description This description was brought to you courtesy of the AstonishMe custom plugin -->
<!--keywords b2evolution, plugin, custom css, seo, keywords, description -->



¥

I may have opened the door, but you entered of your own free will

 
 

Replied on : 04/28/08 @ 10:52 am #11

again: :-)

Hmmm .... the following lines are coming from the field post_content in the table evo_items__item :
<!--keywords Concord,C1,Tourbillon,Gravity --><!--description Concord - C1 Tourbillon Gravity -->

But these lines aren't in the page-code ... i'm thinking that the renderer had filtered these lines. What can i do?

If i edit the last post, the fields description and keywords in the form a filled.
 
 

Replied on : 04/28/08 @ 11:22 am #12

Ok ... i checked something.
If i use another skin (for example http://www.stundenzeiger.de/index.php?tempskin=asevo ), then the plugin works great. :-/
So i think i should check my templates ...
 
 
¥åßßå users avatar

Posts : 845

Joined : 10/05/05

Location : 127.0.0.1

Reply to comment 14694 by ¥åßßå

Replied on : 04/28/08 @ 11:42 am #13

Cool, let me know if you still have problems ;)

¥

I may have opened the door, but you entered of your own free will

 
 

Replied on : 04/28/08 @ 11:46 am #14

Ok - i have found it ... i had killed the line $Plugins->trigger_event( 'SkinBeginHtmlHead' ); from my template. :crazy:
 
 
¥åßßå users avatar

Posts : 845

Joined : 10/05/05

Location : 127.0.0.1

Reply to comment 14696 by ¥åßßå

Replied on : 04/28/08 @ 12:09 pm #15

Glad you solved it ;)

¥

I may have opened the door, but you entered of your own free will

 
 

Leave a comment

Your email address will not be displayed on this site.
Your URL will be displayed.
About you

Just fill in the bits you want, none of it is required



Your email address will only be used to send you adverts for viagra and rolex watches.



(Line breaks become <br />)
Leave a comment
Code:
=> :!: :?: :idea: :) :D :p B) ;) :> :roll: :oops: :| :-/ :( >:( :'( |-| :>> ;D :)) 88| :lalala: :crazy: >:XX :o