Recent Topics

1 Jun 23, 2009 00:42    

My b2evolution Version: 2.x

Evening,

I wonder if someone could help me with this one - I'd like to change the way links to other sites display. For example take this post here
http://geeg.info/blog4.php/2009/06/detention-of-the-week (it links to a picture offsite)

instead of displaying the actual URL of the image I'd like to display something like "click here to view link"

I've poked around but I can't find where that link gets created.

Thanks,
Rob

2 Jun 23, 2009 08:29

i recommend not using the "link to url", unless there's some advantage to it that i've been missing.

just put the link in the body of the post and make it say whatever you want using the link button.

3 Jun 23, 2009 20:21

Well , the advantage would be not having to do the link, title and alt attribs every time to achieve the same result....

my page is mainly a linkblog - so I do 200 plus links a month ...

Up for any suggestions.....

4 Jun 23, 2009 21:18

	/**
	 * Template function: Display link to item related url.
	 *
	 * By default the link is displayed as a link.
	 * Optionally some smart stuff may happen.
	 */
	function url_link( $params = array() )
	{
		global $rsc_url;

		if( empty( $this->url ) )
		{
			return;
		}

		// Make sure we are not missing any param:
		$params = array_merge( array(
				'before'        => ' ',
				'after'         => ' ',
				'text_template' => '$url$',
				'url_template'  => '$url$',
				'target'        => '',
				'format'        => 'htmlbody',
				'podcast'       => '#',						// handle as podcast. # means depending on post type
				'before_podplayer' => '<div class="podplayer">',
				'after_podplayer'  => '</div>',
			), $params );

chances are that you could play with the params in your skin ;)

		// URL link, if the post has one:
		$Item->url_link( array(
				'before'        => $params['before_url_link'],
				'after'         => $params['after_url_link'],
				'text_template' => '$url$',
				'url_template'  => '$url$',
				'target'        => '',
				'podcast'       => '#',        // auto display mp3 player if post type is podcast (=> false, to disable)
			) );

¥


Form is loading...