Swapping sidebar order

Post Reply
User avatar
DarrenDriven
Master Bludit
Posts: 69
Joined: Thu Jan 07, 2016 9:39 am
Location: Portland OR
Contact:

Sun Jan 17, 2016 11:24 pm

I'd like the Tags to display before/above the Page list on the sidebar but I'm not sure which script contains the order of those items so I can switch them around.

The script that calls for the sidebar is /site/themes/future-imperfect/php/sidebar.php with this line:

Code: Select all

<?php Theme::plugins('siteSidebar') ?>
Then I can find the next bit of HTML for the Pages list in siteSidebar() in /site/plugins/pages/plugin.php.

But then immediately after that the same-named function is run in /site/plugins/pages/tags.php.

There has to be another bit that I am missing where the order of these functions is set. I just can't seem to find it.
acrox999
Sr. Bludit
Posts: 30
Joined: Wed Jan 13, 2016 10:35 am
Location: /dev/null
Contact:

Wed Jan 20, 2016 5:19 am

I believe there's a field called "position" in the databases of the plugins, which is most probably used to position them just like the Pages positioning. You can edit the db.php of each of the plugins that you wish by going to /content/databases/plugins/<plugin-name>/db.php and change the value of the "position" field.

And regarding the "Theme::plugins('siteSidebar')" that is just a function used to call the plugins that is placed on the sidebar. There's also siteHead, etc. So this function calls the tags and pages plugin.

EDIT: I tried it myself. Looks like it doesn't work, or maybe that wasn't the purpose of it. It's kind of hard to figure this out since the plugins still do not have their own documentations yet.
https://protecting.faith -- Proudly Powered by Bludit
https://micro.protecting.faith -- Miiro, a stupidly simple microblogging theme for Bludit.
User avatar
DarrenDriven
Master Bludit
Posts: 69
Joined: Thu Jan 07, 2016 9:39 am
Location: Portland OR
Contact:

Wed Jan 20, 2016 6:23 am

I'm usually pretty good at tracing though scripts to figure this stuff out, but after 30+ minutes I decided to go to the source. Hopefully one of them will pop in here soon. :)
dirtdiver2010
Master Bludit
Posts: 101
Joined: Fri Jan 15, 2016 6:07 pm

Wed Jan 20, 2016 4:57 pm

As far as I know, it is not possible to move the order at the moment.
User avatar
DarrenDriven
Master Bludit
Posts: 69
Joined: Thu Jan 07, 2016 9:39 am
Location: Portland OR
Contact:

Wed Jan 20, 2016 7:09 pm

Well ANYTHING is possible in PHP, you just need to know what snippet of code to put where.

Sure, it may not be a configuration option right now, but editing the code can change anything.

For example, check out my tag filter dropdown list sort action that I added to my script in the sidebar:
http://idrewyourcar.com/

Right above it is the Timelines (pages) list that I want to display underneath.
dirtdiver2010
Master Bludit
Posts: 101
Joined: Fri Jan 15, 2016 6:07 pm

Wed Jan 20, 2016 8:30 pm

;) ok, that´ s true...
morvy
Jr. Bludit
Posts: 2
Joined: Sat Mar 05, 2016 10:36 am

Sat Mar 05, 2016 10:40 am

Hi guys, as plugins are loaded in alphabetical order by listing bl-plugins directory, easiest way to reorder plugins is to rename their folders, so for example 01_pages, 02_recent_posts, 03_tags .. and if you already changed default configuration of plugins, you need to rename their "database" folders. It's just a workaround, not proper solution, but I hope it helps somebody..
Post Reply