Recent Topics

1 Mar 04, 2007 18:39    

My b2evolution Version: 1.9.x

I would like to change the text that says "Permalink" to another word, such as "Link."

This is the link section at the bottom of each blog post:

Permalink • Leave a comment • Edit...

I cannot find where that the text that says, "Permalink," is located. I even did a "Search in files" using my text editor (Ultraedit), but couldn't find it. Could someone tell me which file I can edit to change that word?

Thanks,

Sam

2 Mar 04, 2007 20:47

On the place where you want your permanent link to apear, use this code

$Item->permanent_link( 'other word for my permalink');

This is the complete function

/**
	 * Returns a permalink link to the Item
	 *
	 * Note: If you only want the permalink URL, use {@link Item::get_permanent_url()}
	 *
	 * @param string link text or special value: '#', '#icon#', '#text#', '#title#'
	 * @param string link title
	 * @param string class name
	 */
	function get_permanent_link( $text = '#', $title = '#', $class = '' )
	{
		global $current_User;

		switch( $text )
		{
			case '#':
				$text = get_icon( 'permalink' ).T_('Permalink');
				break;

			case '#icon#':
				$text = get_icon( 'permalink' );
				break;

			case '#text#':
				$text = T_('Permalink');
				break;

			case '#title#':
				$text = format_to_output( $this->title );
				break;
		}

		if( $title == '#' ) $title = T_('Permanent link to full entry');

		$url = $this->get_permanent_url();

		// Display as link
		$r = '<a href="'.$url.'" title="'.$title.'"';
		if( !empty( $class ) ) $r .= ' class="'.$class.'"';
		$r .= '>'.$text.'</a>';

		return $r;
	}

3 Mar 04, 2007 21:40

Thanks for that info... but I still need some help on this.

In which file do I find the code, which you described, where I make the change?

I found this in main.php (inside my skins folder)

<div class="bSmallPrint">
	<?php $Item->permanent_link(); ?>

And I changed that to this:

<div class="bSmallPrint">
	<?php $Item->permanent_link(Link); ?>

And, sure enough it changed it from Permalink to Link, just exactly at the place where I wanted it... but above the new word "Link," at the bottom of each blog entry, I see this:

Notice: Use of undefined constant Link - assumed 'Link' in /home/myusername/public_html/myblog/skins/nifty_corners/_main.php on line 107

Link • Leave a comment • Edit...

Is there another location in the php files (which php file is it?) where I should make the change, that won't do that error message?

4 Mar 04, 2007 21:55

samredman wrote:

<div class="bSmallPrint">
	<?php $Item->permanent_link(Link); ?>

<div class="bSmallPrint">
	<?php $Item->permanent_link('Link'); ?>

5 Mar 04, 2007 22:03

Success! That fixed it just like I needed. Thank you so very much for your help..


Form is loading...