B2 evolution help
Mr. Dhalgren has some questions about our mutual blogging application, b2 evolution.
1. how to remove the silly American flags?
2. how to remove the “recent referrers” and “top referrers” from the sidebar
3. how to remove the calendar? (why would I need a calendar?)
I’ll address these in order. Except for the first item, everything you want to do here requires that you edit the main.php template. Which in turn requires you know what in heck you’re doing with the code, which I don’t necessarily, but I know enough to accomplish everything Dhalgren wants to do here.
First things first. Removing the silly American flags does not require that you edit the template. They may not be removable, though. Rather than being an expression of patriotism on the part of Monsieur Fran�ois Laplanque (he is French after all), these flags denote what region and language the blog is written in. It may seem irrelevant, but b2 is a multilingual blogging application. You can try to remove the flag by the following means:
Go to the “Settings” template. In the page that opens, you’ll see another set of three tabs. You’re in “General.” You want to click on “Regional.” You can try to turn off the multilingual features of b2 by un checking all the check boxes on this page. Personally, I don’t think you can turn it off, though, so you may have to just live with it. You’ll notice that your default locale is English (U.S.) and there is a comment beside it that reads “Overriden by browser config, user locale or blog locale (in this order).” This suggests that your blog will be displayed in another language depending on user location?
When I visited Laplanque’s b2 blog, it displayed in English because I am in America, but the blog was written in French, I think.
Personally, I’d just live with the flags.
OK, numero deux. To remove the “referrers” boxes (something I am going to do myself). You need to go the Admin section of your blog as if you were going to write a new post. Go to the “Templates” tab. Click on the file main.php and it will open in the code editor. Unfortunately, Mozilla’s “find” command does not work inside these text boxes. So you need to scroll down through the code until you see some mention of “referrers” in the code.
Now before you delete anything, do a “select all” and save all of your code into a temporary text file in case things go awry.
Now you can delete with impunity. Where you want to start deleting is with this bit of code. Note I had to change the sideways karets to parentheses before the b2 parser would let me post:
(div class=”bSideItem”)
(h3)(?php echo T_(’Recent Referers’) ?)(/h3)
Highlight all the way down to the close div tag and delete.
I just tried this with my blog, and it works.
Theoretically, if you really want to do away with the calendar, it works the same way. There’s a small bit of code that calls up the calendar in a kind of box with the title CALENDAR INCLUDED HERE. Delete that starting at the opening tag (?php and ending with the close tag ?) just after the END OF CALENDAR, and that should remove it.
However, the calendar also serves a purpose. You’ll notice some dates are hot links, meaning you can click that date and see all posts on that day. It’s kind of like an archive interface. I like it.
But I understand the need to clean up the sidebar. I’ve modified mine pretty heavily in order to make it more user friendly.
Hope some of this helps.
Matt
6 Comments »
RSS feed for comments on this post. TrackBack URI
Leave a comment
Line and paragraph breaks automatic, e-mail address never displayed, HTML allowed: <a href="" title=""> <abbr title=""> <acronym title=""> <b> <blockquote cite=""> <cite> <code> <del datetime=""> <em> <i> <q cite=""> <strike> <strong>





It doesn’t work. We are allowed to create a new locale however. But what I think I would prefer to do is create my own flag:
“The flags are stored in subdirectories from /img/flags/. Their filename is equal to the country part of the locale (characters 4-5); file extension is .gif .”
That would be rather fun
Comment by Todd — Tuesday, 26 October 2004 @ 11:08 am
That would be an interesting project. Probably wouldn’t take long to do, either. Well, I hope I helped somewhat anyhow.
Comment by Matthew — Tuesday, 26 October 2004 @ 11:11 am
Deleting the referers worked perfectly first time through! Thanks.
I think I am going to fiddle with the flag just a little bit before getting to my real work. . .
Comment by Todd — Tuesday, 26 October 2004 @ 11:17 am
The simplest way to be “rid” of the flag is to make it all white. Or make it match the background. I’ve tweaked mine so it is not quite as obnoxiously patriotic. . .
Comment by Todd — Tuesday, 26 October 2004 @ 11:27 am
I ended up just trashing the code for the flags similar to how you deleted the referer stuff.
Just dump this little line of code: locale_flag( $Item->locale, ‘h10px’ );
I know they are there for a purpose, but I figure that 99% of people visiting my site will be Americans, and if they aren’t, they probably grew up with a school system that requires the learning of multiple languages.
Yeah, and because they just look dumb…
Comment by travis — Tuesday, 26 October 2004 @ 1:04 pm
I may just do that. I prefer a very clean interface,
Comment by Todd — Tuesday, 26 October 2004 @ 4:22 pm