Linux 软件免费装

slink

开发者 chris@bywrights.com
更新时间 2009年5月19日 01:14
捐献地址: 去捐款
PHP版本: 2.0.2 及以上
WordPress版本: 2.7

标签

php inline img href smart-link

下载

0.1 0.1.1 0.2

详情介绍:

slink provides a way to insert named links into pages and posts, and have those links translated into HTML or execute PHP as defined in a separate configuration file. It uses a Markdown-like syntax that should be understandable by anyone who uses Markdown. The possibilities of slink are boundless, some example uses are: slink's intended audience is: Version History 0.2 0.1 Post/Page Syntax To use a named tag in a page or post, use this syntax: [name: text] ( uri ) name : the name of the link, as defined in the configuration file text : the text that the user wants to appear associated with this link. uri : the uri of the link. Usage is dependent on the type of link, for example an anchor might use this as part of the href, whereas an img might use it as part of the src. Configuration File The slink_config.php file should be edited to establish named links: HTML slink_html( 'name', 'html' ); name : Case-insensitive name of the named link. html : The html to insert. $text and $uri can be inserted into the html to refer to those parameters as entered in the post/page. slink_html( 'name', '<img src="http://my.media.com/$uri" alt="$text"/>' ); PHP slink_php( 'name', 'code' ); name : Case-insensitive name of the named link. code : The php code to execute. Like the HTML, $text and $uri can be used to refer to those parameters as entered in the post/page. The code need not return any value, but if it does, it should be a string, which will be inserted into the php. If you want to apply slink filtering to your return value, return slink_filter( $result ). slink_php( 'name', 'return my_php_function( $uri, $text );' );

安装:

  1. Unzip slink.zip to the /wp-content/plugins/ directory
  2. Copy the slink_config_default.php to slink_config.php. Edit this file to define your named links (see Configuration File for instructions).
  3. Activate the plugin through the 'Plugins' menu in WordPress
  4. Place named links in your WordPress content (see Post/Page Syntax for instructions).

常见问题:

slink's version is 0.x, does that mean it is incomplete?

Yes. As of this writing, the plugin has only been used on a few sites. So feedback from other users will of course improve it. If adoption is great enough, we will probably put an admin panel onto slink. Don't worry, if we do that, your config file settings will get imported by the upgrade.

How can I get help?

The documentation here is the best place to start. Failing that, you can always send me an email.

Why won't the include_page tag work?

Two reasons: