1 halcyon07 Oct 01, 2006 05:33
3 halcyon07 Oct 01, 2006 19:09
And where may I find this "blog number order". Thanks.
______
www.UpHayes.org
4 edb Oct 02, 2006 01:46
I don't know - it just happens that way. There is no built in method to make it be one way or another, so you'd have to hack something to change it. Your screen shot shows the back office tabs - correct? I have no idea how to alphabetize that, but I did recently alphabetize the public side. If that's also something you want let me know and I'll dig up the hack.
5 edb Oct 02, 2006 01:51
I just thought of something. Seeing the number of each blog is easy - click on your blog settings tab and it will list blogs in numerical order including the number for each blog. Finding where in the code it makes up the list for the back office is the part I don't know about.
6 halcyon07 Oct 02, 2006 04:44
That isn't the backoffice, actually. It's what displays on the main pages. That's my concern, alphabetically organizing it for the public view. You can see it firsthand on my site. The link is right below.
______
www.UpHayes.org
7 edb Oct 02, 2006 05:15
Ah. I see. It looks so much like the back office ones I thought that's what it was. So the hack for this is very simple but I'll explain a bit before I go into it. It's always best to do hacks in your skin because you'll probably be able to keep your skin intact as you upgrade your b2evolution installation. Hacks anywhere else tend to maybe not carry forward. This hack CAN happen in the your_installation/skins folder, but I moved it to the your_installation/skins/my_skin by moving the contents of skins/_bloglist.php to skins/my_skin/_bloglist.php. If you check the _bloglist.php file in most skins it has a few 'decorator' values then calls skins/_bloglist.php to do all the mechanics of making a bloglist.
Anyway that's what I did: copied skins/_bloglist.php to skins/my_skin/_bloglist.php then made the following edit. Find, towards the end of the full version of that file name, something that looks like this - then make it be like this:
$blog_link .= $blog_item_end;
$blog_links[] = $blog_link;
}
sort($blog_links); // new line
reset($blog_links); // new line
// Output:
echo $blog_list_start;
I then went one step further. I wanted my "home" link to be listed first, but alphabetically that wasn't the case. I viewed my source code and took the bit for that link and added it with a conditional statement to the same area you add the stuff above. Like this:
// Output:
echo $blog_list_start;
if( $blog == 1 ) { ?>
<a href="http://mydomain.tld/index.php" class="BlogButtonCurr" title="Home Page">Home</a> •
<?php } else { ?>
<a href="http://mydomain.tld/index.php" class="BlogButton" title="Home Page">Home</a> •
<?php }
echo implode( $blog_list_separator, $blog_links );
echo $blog_list_end;
The only trick there is calling the proper class if the visitor is on the home page or not.
Hope it helps!
8 halcyon07 Oct 02, 2006 23:04
No sir, that did me no good. I'm starting to worry now.. :-/
I've attached my copies of the original _bloglist of both the /skins and /skins/skinname directories in case that may aid our search for the solution.
I appreciate your help :)
______
www.UpHayes.org
9 halcyon07 Oct 03, 2006 05:13
Hey, thanks for the help thus far, EdB. I've decided to go the surefire route and just manually alphabetize the blogs. :)
Thanks again!
I don't know how to do it for the back office, but the publicly displayed bloglist is a pretty easy hack. BTW this is not a 'stock' feature of b2evolution. You get blog number order, which also happens to be the date of blog creation order.
Lemme know if alphabetizing it for the visitors is worth pasting in here.