开发者 |
Watershed Studio LLC
Matthias Bauer |
---|---|
更新时间 | 2008年4月13日 12:43 |
<!--sphereit-->
in the text of a post.
You can force a Sphere link NOT to be inserted by including <!--nosphereit-->
in the text of your post.
If you're not sure what to do, leave the settings below at their default value.
1. You can always force a Sphere link to be inserted into a post by putting
<!--sphereit-->
anywhere into the post's text. That comment will not be displayed, but will force
a Sphere link to be inserted for that post.
1. Conversely, You can keep a Sphere link from being inserted in a post by adding
<!--nosphereit-->
to that post. Again, this marker will not be displayed, but will prevent
a Sphere link from being shown for that post.
1. If you want to override the default placement of the link, you should:
i) Turn off $auto_sphereit by setting
$auto_sphereit = FALSE;
in sphere-related-content.php (search for auto_sphereit to find that line).
ii) Put this tag anywhere with in a post context (either in your index, archive or single post templates):
<?= get_sphereit_link( get_permalink(), $post->post_content ) ?>
If you want to wrap a block-level element around the Sphere link you can do something like this:
<?= (enableSphereItLink($post->post_content) ? '<p class="sphere">'.get_sphereit_link(get_permalink(), $post->post_content).'</p>' : '') ?>
The enableSphereItLink() check makes sure that your
tags are only gong to show up if the Sphere link is turned on
for that post, as decided by the length of your post or your overrides.
If you're doing your own block-level element like this, you'll want to define stules for in your CSS template, e.g.
.sphere { padding: 10px; margin: 10px; border-left: 2px solid red; }
Note these styles are an example only, you can go crazy with the styles and make it look just so in your blog.
That's it, you're ready to discover Sphere Related Content. Automatically.