Recent Topics

1 Dec 22, 2007 18:03    

My b2evolution Version: Not Entered

Using the evocamp skin - can't find where to edit the footer or sidebar.

The code for _body_footer is


// Display additional credits (see /conf/):
		// If you can add your own credits without removing the defaults, you'll be very cool :))
		// Please leave this at the bottom of the page to make sure your blog gets listed on b2evolution.net
		credits( array(
				'list_start'  => ' | ',
				'list_end'    => ' ',
				'separator'   => '|',
				'item_start'  => ' ',
				'item_end'    => ' ',
			) );
		?>

What file is all that information in?

(sidebar content is called the same way)
I'm not looking to "remove" what's there, just would like to rearrange and add to it.

thanks

2 Dec 22, 2007 18:38

Just view your blog, or the [url=http://demo.b2evolution.net/]demo[/url] if you wish. On the bottom you see some links. The styling of those links (like the | between them) is done in this array. You could do:

    credits( array(
            'list_start'  => ' | ',
            'list_end'    => ' ',
            'separator'   => '|',
            'item_start'  => ' <span style="color: green">',
            'item_end'    => '</span> ',
         ) );
      ?> 


for green links.

3 Dec 22, 2007 18:55

But how would one add to the credits_array? Like for example let's say I want my host listed in the credits? Or whatever. Is there a way to add a credit without hard-coding it in the skin?

4 Dec 22, 2007 23:22

EdB wrote:

But how would one add to the credits_array? Like for example let's say I want my host listed in the credits? Or whatever. Is there a way to add a credit without hard-coding it in the skin?

That's exactly what I'm trying to figure out...where is this "array" coming from?

5 Dec 23, 2007 05:21

Adding credits is easy in /conf/_application.php line 50 onward:

/**
 * Here you can give credit where credit is due ;)
 * These will appear in the footer of all skins (if the skins are compatible)
 * You can also add site sponsors here.
 *
 * If you can add your own credits without removing the defaults, you'll be very cool :))
 *
 * Note: some plugins may add their own credit at the end of this array.
 * (Not recommended for plugins with potential security weaknesses)
 *
 * @global array of arrays
 */
$credit_links = array(
		// array( 'http://example.com/', 'Example' ),
	);

7 Nov 17, 2008 09:06

Uhm. I wanted to add some credits, too. Opened /conf/_application.php ... but there is no such stuff. *lol* It ends with line 48 or something like that. And the comment and array is not in there.

I'm running b2evolution 2.4.5

Should I just add that part and it will work? or do I have to edit a different file now??

8 Nov 20, 2008 20:10

I'm using 2.4.2

I have absolutely no clue what I'm doing with php, however, just playing around I managed to figure the following out.

In \blog\inc\core\_template.funcs.php on line 639, roughly, it has:

if( empty( $cred_links ) )
{ // Use basic default:
$cred_links = unserialize('a:2:{i:0;a:3:{i:0;s:24:"http://b2evolution.net/r";i:1;s:18:"free blog software";}i:1;a:2:{i:0;s:36:"http://b2evolution.net/hosting/r";i:1;s:19:"quality web hosting";}}');
}

At first I tried to add stuff in this, but apparently my ability to modify serialized array data sucks so nothing happened.

I tried adding $credit_links array to the _application.php file and well, that failed too b/c that's how older versions did it.

I got to thinking about that IF statement further up and decided why not, I'll just stuff an array named:
$cred_links = array( array('link', 'linkname')); right before the IF statement. This way the IF statement fails and it should use the the array that I define.

And voila! It worked. So this may not be the most proper way to do things but I inserted this:

$cred_links = array(array('http://www.messiah.edu','Messiah'),array('http://b2evolution.net/r','FreeBlogSoftware'), array('http://www.google.com','Search'));

I kept the Freeblogsoftware one because let's be honest, these folks are awesome and deserve it, I however got rid of the hosting services one :p

Hope this was helpful to those of you who couldn't figure it out :)

9 Nov 29, 2008 07:59

Thank you so much. That sure did help! Same here. Kept the link for b2evolution because I love this blogsoftware but the webhosting annoyed me.. added my own credits.

Thanks again for posting this.

10 Dec 14, 2008 12:44

can i put a widget on the footer like an html or something?

I checked my blog setting >> widgets and no option to add..

11 Dec 14, 2008 13:03

I like your thinking - may well put that into effect this evening :)

freddy wrote:

I'm using 2.4.2

I have absolutely no clue what I'm doing with php, however, just playing around I managed to figure the following out.

In \blog\inc\core\_template.funcs.php on line 639, roughly, it has:

if( empty( $cred_links ) )
{ // Use basic default:
$cred_links = unserialize('a:2:{i:0;a:3:{i:0;s:24:"http://b2evolution.net/r";i:1;s:18:"free blog software";}i:1;a:2:{i:0;s:36:"http://b2evolution.net/hosting/r";i:1;s:19:"quality web hosting";}}');
}

At first I tried to add stuff in this, but apparently my ability to modify serialized array data sucks so nothing happened.

I tried adding $credit_links array to the _application.php file and well, that failed too b/c that's how older versions did it.

I got to thinking about that IF statement further up and decided why not, I'll just stuff an array named:
$cred_links = array( array('link', 'linkname')); right before the IF statement. This way the IF statement fails and it should use the the array that I define.

And voila! It worked. So this may not be the most proper way to do things but I inserted this:

$cred_links = array(array('http://www.messiah.edu','Messiah'),array('http://b2evolution.net/r','FreeBlogSoftware'), array('http://www.google.com','Search'));

I kept the Freeblogsoftware one because let's be honest, these folks are awesome and deserve it, I however got rid of the hosting services one :p

Hope this was helpful to those of you who couldn't figure it out :)


Form is loading...