View Full Version : Sidebar Modules
nybble
February 21st, 2006, 01:46
Does not exist anymore.
lisa
February 21st, 2006, 06:01
Oh, thank you! I can only hope that someday soon MH is able to integrate this directly into K2 (if you let him, of course ;)).
This will be so handy, to keep from having to re-edit the sidebar each time an update comes out.
Kenneth Stein
February 21st, 2006, 09:57
It appears there's a typo in the sidebar-modules.php file Nybble. On line 511 you make a call to 'SbModulesAdd', but you earlier defined the function as 'SbModulesAddUser'. Thanks for the really nice hack and feel free to check out my 'still in the works' blog. Summum Bonum.
nybble
February 21st, 2006, 10:40
Thanks for spotting that, I was playing around with a few things for the next revision. Uploaded the corrected version.
lisa
February 22nd, 2006, 07:18
Nybble, I installed the latest version (from the link above),at http://unsympathetic.net and before I even logged into my admin panel, I got the error:
Warning: Invalid argument supplied for foreach() in /home/.sagan/daria/unsympathetic.net/wp-content/themes/k2/sidebar.php on line 11
When I did login, the K2 options page showed:
Sidebar modules
* Enabled modules
* Disabled modules
Add a module: Add module
Edit your sidebar modules. Drag and drop to change the order. Click the module's ID to view more options.
But without any of the javascripty goodness. I hadn't altered any of the original K2 files (except my style sheet) until I uploaded your files.
Can you give me any pointers on where/how to fix this?
Thanks so much for your help!
nybble
February 22nd, 2006, 09:50
The silly update event wasn't firing, fixed. I had to boot up the version number to r167b so it'll work for you.
billyfoxtrot
February 22nd, 2006, 07:39
Some of my modules are showing up on my homepage but not my other pages, even though I've checked them off.
You can check out my website here (http://www.billyfoxtrot.com/). Try clicking on a post, and the "about" text, as well as my last module disappear.
Am I doing something wrong or is this a bug?
nybble
February 22nd, 2006, 08:04
I'm not sure where the problem is there, I can't re-create it as a bug. Are you sure you asked to save the K2 options when you checked the boxes? Re-check if the boxes are still checked, if they are then I'll have to look into it more.
billyfoxtrot
February 22nd, 2006, 08:17
Okay, well I looked at it and I guess I hadn't saved my last module correctly, so now that one works. But the problem still exists for the "about" text. It is currently showing up on my homepage, category and archive pages, but not on the permalinks.
nybble
February 22nd, 2006, 08:56
If you look at the default K2 theme, the about text won't appear on posts. This hack works with the original code to decide what to display in the sidebar, therefore nothing will be shown. When this code goes to final, I'll be making alterations to the sidebar code to fix stuff like this. For now, find the code:
<?php /* If this is the frontpage */ if (is_home()) { ?>
<p><?php echo stripslashes($k2about); ?></p>
and change it to:
<?php /* If this is the frontpage */ if (is_home() || is_single()) { ?>
<p><?php echo stripslashes($k2about); ?></p>
That should work.
lisa
February 22nd, 2006, 09:09
The silly update event wasn't firing, fixed. I had to boot up the version number to r167b so it'll work for you.
Everything's just peachy, now. Thanks :p
davidbabylon
February 23rd, 2006, 04:23
What a great plugin! I agree with Lisa in hoping Micheal decides to include this in a future version of K2.
AlexF
February 23rd, 2006, 04:33
Thanks nybble for this excellent hack..
lisa
February 24th, 2006, 12:24
Has anyone else had problems with asides since they installed this hack?
Granted, I hadn't posted any asides on my blog before the hack, but they worked on my localhost, with the same version and style. The onlything I've changed is uploading the hack files.
The asides class doesn't seem to be working at all. They don't work in the sidebar when selected, and they don't format differently when inline is selected.
Does anyone have any idea what could be keeping the asides from working?
Edit: Apparently livesearch isn't working, either. When I get home from work I'll upload the default K2 files, see if I have a problem, and go from there.
nybble
February 24th, 2006, 01:03
Make sure you've checked radio button that puts asides in the sidebar, works for me. Search is contained in a seperate include file that I haven't modified.
lisa
February 24th, 2006, 03:46
Make sure you've checked radio button that puts asides in the sidebar, works for me. Search is contained in a seperate include file that I haven't modified.
I did... This afternoon I double checked everything I could... before I posted :)
Okay, so it's definitely not the hack. I uploaded the original K2 files, and asides worked. Then I uploaded the hack, and asides still work.
However... Live search is borked (I have no idea how), and now the asides are posting as both a regular post, and as an aside. So the post is showing on two places on the main page. :confused:
Geez, I have no idea what I did... I suppose I have the evening ahead of me to find out. :(
Any ideas on what's going on would be appreciated..
lisa
February 25th, 2006, 03:23
NM, asides are back to normal... Just ignore me over here :)
saiajin
February 25th, 2006, 10:52
Just a "YAY!" for this update..thanx nybble!!!
noir
February 27th, 2006, 03:27
Thanks for the plugin. My check boxes aren't showing up though.
museum
February 27th, 2006, 04:47
I wonder how to add a new module?
(Like the delicious linkrolls function for ex.)
great plugin, thanks
nybble
February 27th, 2006, 07:59
Thanks for the plugin. My check boxes aren't showing up though.
How so? Are you rolling down each modules' section and they're not there? A screenshot would help.
I wonder how to add a new module?
(Like the delicious linkrolls function for ex.)
Type the name in the "Add module" box, and add it. Then type the PHP code into the textbox for that module. You're away! ;)
noir
February 27th, 2006, 08:41
Here is what I am getting...
http://www.kennbivins.com/k2_screenshot.gif
billyfoxtrot
February 27th, 2006, 09:01
noir,
did you try double-clicking a module?
noir
February 27th, 2006, 09:21
D'OH!!
DOUBLE click. LOL sorry. It works when I DOUBLE click it.
Thanks. :D
noir
February 27th, 2006, 09:22
Awesome plugin!!!!
nybble
February 27th, 2006, 09:31
Hmm, it shouldn't need a double click... Which browser are you using?
noir
February 27th, 2006, 10:28
Initially, it needed a double click but it works normal now. Latest Firefox on Mac OS X.
museum
February 27th, 2006, 11:43
@nybble
Type the name in the "Add module" box, and add it. Then type the PHP code into the textbox for that module. You're away!
works perfectly! this is amazing! thanks..
Harrad
March 1st, 2006, 08:10
Cheers for the great hack...
I don't know if this is a stupid question or not... it might just fall into the "internet explorer sucks" catorgory. But, I've added my new module; 'Gallery' and added the code...
<ul>
<li><a href="?page_id=5" title="Video">Video</a></li>
<li><a href="?page_id=14" title="Journey">Journey</a></li>
<li><a href="?page_id=7" title="Drawings">Drawings</a></li>
<li><a href="?page_id=10" title="Reference">Reference</a></li>
</ul>
into the little code box. This all works fine in firefox, but in internet explorer it add what looks like a line break between the module title and its contents. I can't figure out why its adding this gap, as all the standard modules seem to apper as they do in firefox. Am i using the wrong code? anyideas?
cheers
nybble
March 2nd, 2006, 03:29
Try removing the top margin of the <ul> element?
jutecht
March 2nd, 2006, 08:21
Thanks for this, you just saved me loads of time! What a great add-on!
jcinacio
March 2nd, 2006, 11:40
This works great, but i have one simple question:
how do i delete a sidebar block? :confused:
nybble
March 2nd, 2006, 02:01
If it's a custom one then you can remove it from the database by expanding it, then clicking the "Delete module" link. If it's an inbuilt module you can't delete it, just drag it to the "Disabled modules" section and it won't display.
lindaq
March 2nd, 2006, 02:01
I love the plug-in, thank you Nybble!
I'm curious though: is there any way to show nested categories/subcategories when using this plug-in? I'm working on a real estate site right now and the subcategories would better help potential buyers find what they need. For example, under the category "Team" I would like there to be a subcategory of each employee's name: "Bob Smith", "John Doe", et cetera.
If this is an easy fix (I hope), can someone give me the solution? I'm not quite up there on code modification yet--I can change a little but this is totally out of my league.
Thank you so much! ;)
jcinacio
March 2nd, 2006, 05:00
If it's a custom one then you can remove it from the database by expanding it, then clicking the "Delete module" link.
:o ups... my bad! i think it's past my coffee time
thanks
onthedry
March 3rd, 2006, 09:34
Okay, I have a question about customizing some of the styling. The website I'm working on is www.dryfly.ca/myhouse/
Currently .secondary h2 controls the styling of the sidebar headings, and the list links. I would like to add another style so that the lists have a different color.
For example, look at www.dryfly.ca/blog/
Here I have h2 as the grey color. It controls the headings and lists (ie list of Links). But then I add a class=.sidebar-title (orange color) to the headings. For example:
<h2 class=.sidebar-title>Links</h>
<?php list_cats() ?>
So the orange overrides the heading.
Is it possible to do this with the sidebar module? I have trouble identifying where I would add the class. I see this code:
<div id="sb-<?php echo($sb_module); ?>" class="sb-<?php echo($sb_module); ?>">
which looks like I can do what I want, by perhaps defining a bunch of classes with names like sb-link, sb-category, etc.
Is this correct? If so, what are all the names of $sb_module?
As a trial, I added this code to my style sheet to see if it would change the "Search" heading:
.sb-search {
color: #fff;
}
but that didn't work.
Any help on this would be appreciated. I apologize ahead of time if my question seems a bit scattered.
thanks
nybble
March 4th, 2006, 10:17
...defining a bunch of classes with names like sb-link, sb-category, etc.
Is this correct? If so, what are all the names of $sb_module?
Yes, that's correct. The names are either built in, or are sb- followed by the custom module name. The easiest way to find out is by looking at the HTML code generated by the PHP, much easier to read.
As a trial, I added this code to my style sheet to see if it would change the "Search" heading:
.sb-search {
color: #fff;
}
but that didn't work.
That wouldn't work, as the heading has it's own colour already defined it'll take precedence over your definition.
MetalDudu
March 4th, 2006, 03:13
its a easy tool,great
onthedry
March 4th, 2006, 04:18
That wouldn't work, as the heading has it's own colour already defined it'll take precedence over your definition.
Okay, I think I know what you mean. The heading color is defined by h2, correct? In the case above,
<h2 class='sidebar-title'>
the sidebar-title class took precedence. But the sidebar module code puts the h2 style after sb-class:
<div id="sb-categories" class="sb-categories">
<h2>Categories</h2>
and therefore the h2 takes precedence?
Can I reorder this code:
<div id="sb-<?php echo($sb_module); ?>" class="sb-<?php echo($sb_module); ?>">
<?php if(isset($sb_module_options['data'])) { ?>
<h2><?php _e($sb_module_options['title']); ?></h2>
in the way I did it with sidebar-title? Of course I'll try it, but perhaps you can comment on this (I have a feeling that I will run into trouble.
cheers
nybble
March 4th, 2006, 05:50
When you define a colour for H2s, then any H2s in your page, reguardless of container, will have that colour. To change it, you have to specifically over-ride the H2s for that container, so:
.sb-search h2 { color: #123; }
would change the colour for any H2s in the container with a class of "sb-search".
I wouldn't re-order that code, it's set up so that titles will relate to the module correctly and you may have some ugly problems.
Creelove
March 7th, 2006, 06:14
I've uploaded the sidebar module successfully and can add/drag categories, but cannot seem to edit them. I've tried both clicking and double-clicking and neither works.
(Also, a couple of my 'enabled' modules aren't showing up, though this is probably due to not being able to edit that individual module.)
I downloaded the module on 3/7/2006, whatever version that is. I'm using the newest version of Wordpress.
I'm using Internet Explorer 6 on a company PC (maybe some javascript options are disabled). I'll give it a try at home tonight on Firefox.
neville
March 11th, 2006, 09:43
Ben, what a terrific hack. Thanks for developing it. I've just installed it and it works perfectly.
Quick question. I'm running Wordpress 2.0.1 - I assume it will work under the latest version 2.0.2 just released?
nybble
March 11th, 2006, 05:03
Been rather busy the last week on other stuff.
I'll give it a try at home tonight on Firefox.
Did you get it to work under FF?
Quick question. I'm running Wordpress 2.0.1 - I assume it will work under the latest version 2.0.2 just released?
No idea, I didn't know about that release until you told me... Give it a spin, if it dosn't work then I'll patch it.
A general note: My development for this is now going to be focussed on the version of K2 in Subversion as the architecture is totally different. I'm going to be changing the interface and whatnot to make it more intuitive. Any suggestions feel free to suggest away! ;)
neville
March 11th, 2006, 06:28
Ben, it's really a great hack, but I encountered major problems with logging in to WP after installing it. Whether this is because of Sidebar Modules or not, I have no idea. So disabled it for the time being. Looking for some advice and help here!
Details in this thread:
http://getk2.com/forum/showthread.php?t=453
nybble
March 11th, 2006, 11:20
It's working fine for me under v2.0.2. I'm not sure what's causing your problems.
Lostnomad
March 12th, 2006, 06:11
Everything seems to be working ok except for the major reason I downloaded and installed this - to get the "comments" category to show up on the sidebar on my home page (http://www.lostnomad.org). It wasn't there by default after I installed K2 and it's still not showing up anywhere after I installed this hack. :(
divauno
March 12th, 2006, 10:47
Is it possible to add posting in this module? I want to have small post on my sidebar but still be able to post regularly within my blog. If this is possible how is it done?
divauno
March 12th, 2006, 11:02
Never mind I think I figured it out.
Lostnomad
March 12th, 2006, 11:15
I just found out that for almost everything in K2, you need a plugin...the things one would expect to show up by default...don't unless you tell them to, usually with another plugin. How weird is that?
nybble
March 13th, 2006, 02:46
A little ramble...
Although I'm not sure whether this hack will continue to be necessary because of Wordpress Widgets, I've still been thinking about the next gen version, and here's what I've decided would be done. Generally, re-writing the whole thing... ;)
1) Throw away my Javascript kludge. It's worked well, but I need to move to a more modular version. Therefore, I'd replace it with the scriptaculous DnD script. Much easier for me to maintain.
2) The big change: totally re-structure the way modules are managed. Right now modules are hard-coded into the sidebar, and you can only have one instance of them. I'd like to implement the multiple-module style way of working where you can drag in a module of a specific type multiple times. To do this I'd have to maintain a list of possible modules, and a list of enabled modules. The other big change to module management would be modularisation of the code in each module, i.e. taking each module out of the kludged-up sidebar.php and putting them in a PHP file like this:
<?php
/*
* del.icio.us module for the K2 sidebar
*
* Name: del.icio.us
* Author: K2
* Description: del.icio.us module
* Requires: delicious
*/
class sbmoduledelicious extends k2sbmodule {
var $login;
var $num_links;
var $tags;
function display() {
delicious($k2deliciousname);
}
function setup() {
// Show on these pages
$this->show_home = true;
// Setup default options
$this->login = "myname";
$this->num_links = 40;
$this->tags = "";
}
}
?>
This would be useful in that new modules could be quickly added to the codebase. The other upshot is that administration would be easier - I could use object reflection to create an administration screen for each module. Object serialisation could be used to store each module - that would clean sidebar.php up no end. Hopefully this wouldn't take too long, I've got some code lying around from a PHP framework I developed that used concepts like this.
That's about it. Tell me what you think / any suggestions, and we'll see what happens.
AlexF
March 14th, 2006, 02:05
Perhaps for the new version you could add the delete module link to always display. Here is why I say it: I had added a module with no code, no title and not sure if I checked off any pages. I then went back to delete it, but it does not show the delete module link.
TIA,
Alex
http://fulltimefishing.com
kretze
March 18th, 2006, 03:21
Great Hack. BUT i use the "german version" of the k2 theme and everytime i add an own module it shows up correctly BUT just before the module text from the german PO-file gets posted.
Project-Id-Version: WordPress 2.0 POT-Creation-Date: 2006-01-03 09:54+0200 PO-Revision-Date: 2006-01-11 01:20+0100 Last-Translator: Mathias Language-Team: WordPress.de MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit
(see: http://www.jkretzschmar.de)
nybble
March 19th, 2006, 12:48
Great Hack. BUT i use the "german version" of the k2 theme and everytime i add an own module it shows up correctly BUT just before the module text from the german PO-file gets posted.
I really have no idea why this happens, sorry.
goaliegirl
March 22nd, 2006, 03:14
I apologize if this is a completely noob question. :)
I've got the sidebar module installed (way cool, btw) but some of my modules don't show up even though they are in the "enabled" section. One of them is "latest delicious links" -- do I have to do something to get it to show up on my sidebar? I have the box checked for it to show up on the home page, but it doesn't.
*scratching head*
Chris Legend
March 22nd, 2006, 04:22
I'm having the same problem that Noir (http://getk2.com/forum/showpost.php?p=1537&postcount=22) was having. The checkboxes do not appear. I've clicked and double-clicked and it's still not working. I can move the modules from "enabled" to "disabled" but am clueless as to why I'm unable to do anything else with them. Any help is appreciated.
zeinobia
March 22nd, 2006, 04:35
same thing here like Chris , I guess it is something in the Javascripts , already I tried from both IE and opera yet got no checkboxes at all only moving and enabling/disabling the modules
nybble
March 25th, 2006, 01:27
@goaliegirl - Have you installed the del.icio.us plugin?
In regards to the JS, it's probably the event mess with the onclick for the links being over-ridden by the drag and drop script. I'm not at all sure how to fix this, but it does work in Firefox.
Seing as how it seems most likely that Wordpress Widgets will be used in the upcoming K2 (when it's a plugin) I don't see much point in continuing development, unless a substantial amount of K2 users want it to. I'll hack you all up an uninstall script to cleanup the database when WP Widgets comes out.
billytheradponi
March 25th, 2006, 08:34
Thank you so much, now I can actually update my K2 version without re-coding te new one!
divauno
March 25th, 2006, 10:57
Now since I have my blog totally up and working and designed for all browser as closely as possible. I can finally come in here and tell you that this plug-in is awesome!!!
I don't know what Wordpress has planned for the future or K2 for that matter... but this plug-in just makes adding and organizing things in the sidebar so easy.
Thank you for it!
olive77ny
March 26th, 2006, 05:02
hi,
i've installed the sidebar 'plugin' and it appears in the k2 presentation page, but i can't find how i can identify my flickr or delicious username. is it in the php?
thanks for your help!
olivier
postermagazine.com (http://www.postermagazine.com)
lisa
March 26th, 2006, 07:58
For the del.icio.us one, you have to have the del.icio.us cached plugin installed and activated. Then the K2 options page will have a place for you to enter in your username.
I would assume the flickr one would work the same way, but I don't use flickr, so I have no idea.
Heilemann
March 26th, 2006, 07:37
Thought I'd just chime in to let everyone know that I added support for WordPress Widgets a few days ago after getting a copy of the plugin from Matt.
nybble
March 30th, 2006, 11:43
Widgets are now public, and SVN K2 has support.
http://automattic.com/code/widgets
I've uploaded an uninstaller for the options I added. Download the txt file: http://files.nybblelabs.org.uk/snippets/rm_sbm.txt and upload it as a php file to your K2 folder. Then just browse to:
http://your-domain.com/wp-content/themes/k2/rm_sbm.php
Thanks for all the nice comments I've recieved.
nolawi
March 30th, 2006, 08:10
hey guys this thing used to work nice for me and then, any request i make using this module is completely ignored.....
i would suggest this not get included in the k2 till all the bugs are fixed...
what do u suggest i try..
lisa
March 31st, 2006, 07:39
hey guys this thing used to work nice for me and then, any request i make using this module is completely ignored.....
i would suggest this not get included in the k2 till all the bugs are fixed...
what do u suggest i try..
If you read above, Ben said he wasn't going to support it once the widgets went into K2, since they do the same things. MH has posted and said that wigets are in the SVN, so obviously this hack won't be included since it would be redundant.
nolawi
March 31st, 2006, 10:41
great you know i didnt know if i had to get all the new files from the svn, it was kinda confusing becuase they have new folders with new files...and some files are still left in the main k2 folder and also in options/app/ folder.... like functions and archive php files...
divauno
April 2nd, 2006, 10:21
I am testing this new widget thing...
IMHO... it's not very user friendly! I don't understand it.
Nothing is correctly labeled... and I don't see how you disable things.
I visited the site and there is just way too many instructions for something as small as a sidebar. And way too much sarcasm.
I feel like I'm trying to troubleshoot CSS for IE!!!
Kartoen
April 2nd, 2006, 02:23
Hi,
Total newbie question here:
I installed Sidebar Modules looking for a way to change the displaying order of my existing link categories.
Now I can create new modules, but these are not connected to the link categories I created earlier... Is there any way to "import" existing link categories as modules?
OR: is there another way (without the Sidebar Modules) to change the order the categories in the sidebar?
nybble
April 2nd, 2006, 03:26
I am testing this new widget thing...
IMHO... it's not very user friendly! I don't understand it.
Nothing is correctly labeled... and I don't see how you disable things.
I visited the site and there is just way too many instructions for something as small as a sidebar. And way too much sarcasm.
I feel like I'm trying to troubleshoot CSS for IE!!!
If you're referring to automattic's widget plugin, I have nothing to do with it.
@Kartoen You'll have to tweak WP's options to re-order link categories, it's all handled internally.
divauno
April 2nd, 2006, 04:12
^^ Yeah I know you have nothing to do with it... I like your plugin better!
Kartoen
April 2nd, 2006, 04:40
In the meanwhile I found this (http://geekyweekly.com/mylinkorder/) plugin which seems to fit my needs.
Never mind then :-)
nolawi
April 3rd, 2006, 12:25
^^ Yeah I know you have nothing to do with it... I like your plugin better!
me too i hate the widjet...
zeinobia
April 3rd, 2006, 01:11
me too i hate the widjet...
I will join both of you too ,I don't like the widgets, I like the modules
Lost Girl
April 4th, 2006, 06:32
just want to say thanks. the widget thing not for me but this is great.
nybble
April 4th, 2006, 12:57
Personally, I don't think the widget plugin offers me the control I want, so I'll be turning modules into a plugin at some point in the near future. If there's a feature you badly want, now is the time to ask for it, but please don't ask for fixes to the current JS code, it's being totally re-written.
zeinobia
April 6th, 2006, 11:45
okay here is a feature I think Nybble you should add it , it is from the widget plugin the RSS module , that is the only thing I found useful in the widget plugin other than that your Sidebar module rules
zeinobia
May 2nd, 2006, 01:25
hey Nybble is there no news about the Sidebar Modules!? no updates or what !?
nybble
May 3rd, 2006, 09:11
All my programming energies are going into my uni coursework. I've got other bits and bobs that are taking up the rest of my free time. My exams are also starting in a few months, so revision is on the menu. I haven't forgotten about this, but I won't be working on it until I have the time to do so. Hopefully that'll be after the coursework is done, but if I get swamped with work it'll be after the exams.
holly
May 4th, 2006, 12:25
this is amazing. thanks a lot!
madmac
May 4th, 2006, 12:48
I hope the next sidebar module revision includes multi sidebar support.
Vulturo
May 4th, 2006, 01:25
I prefer modules to widgets and would definitely look forward to the new version.
zeinobia
May 4th, 2006, 04:16
well good luck at your exams Nybble
and yes for sure Modules are better than Widgets
nybble
May 5th, 2006, 04:36
Cheers.
@madmac: Yes, there will be exciting multiple sidebar goodness. ;)
madmac
May 6th, 2006, 06:31
Thank you Nybble I am forced to use widgets right now, because they support 2 sidebars, but I realized that it is way to hard to create a widget.
madmac
May 9th, 2006, 05:15
hey Nybble if you were to happen to foward me your amazon wishlist, would your sidebar module's current progress increase?:D
nybble
May 10th, 2006, 02:35
I had rather a nasty cold today, so decided to take it easy. Did a bit of GUI design for SBM:
http://files.nybblelabs.org.uk/snippets/screenies/sbm-preview-1.png
Nothing too spectacular, and it's mainly mock-up, but the major elements of the codebase are now in. (I've done a bit more since it was taken too) Now, three questions for you all.
Firstly, I can either develop SBM to use AJAX coding, where changes made in the plugin's panel are immediately reflected on the blog, or to use the conventional approach the hack (and WP Widgets) took, where you must explicitly save the sidebar for it to be updated. Personally, I don't mind which people prefer, but that needs to be decided upon before the rest of the code can be written.
Secondly, do you like how the sidebars are deliminated in the example above, or would you rather I used tabs like on the tab bar on the right for them?
Finally, do you want the hooks for development of Modules to be the same as that for Widgets? If you want them to be the same / slightly different then it will be possible you to just re-use widgets as modules. Or do you just despise the widget hooks, and want a total change? ;)
hey Nybble if you were to happen to foward me your amazon wishlist, would your sidebar module's current progress increase?:D
I may actually be able to finish this tomorrow (day off, hurrah) but if you want to reward my working, there's a wishlist under my donate page. ;)
madmac
May 10th, 2006, 03:07
1 I prefer AJAX
2 I think its' fine except I think each Sidebar should have its own verticle column
3 I prefer the old method used, because I cannot for the life of me create a widget, but I would like widgets to work also.
madmac
May 10th, 2006, 03:13
BTW: how many dollars are in 5 europeo's
Or wait is that pounds, yeah 5 pounds.
nybble
May 10th, 2006, 09:59
Wasn't able to totally finish it today. Hopefully this screenshot is the sort of interface you're after.
http://files.nybblelabs.org.uk/snippets/screenies/sbm-preview-2.png
I've started interfacing the interface with the backend using AJAX. Prototype & scriptaculous are making my life a bit easier. I've also been chewing through the Widgets codebase to see how to make multiple instances of widgets. I think i've found an approach that will work, so I'm pleased about that. (Yet to test it though)
In regards to being able to make modules like before, I'm adding a PHP module that will replace it. (Unlike Widgets there won't be a set limit on how many modules like this will be allowed in the sidebar)
It's about 2 USD per 1 GBP.
Right, that's about it. I'm now hoping for a release by the end of the week. Later than I'd like, but the oddities of the Widgets plugin are slowing me down a bit.
AlexF
May 11th, 2006, 02:07
Firstly, I can either develop SBM to use AJAX coding, where changes made in the plugin's panel are immediately reflected on the blog, or to use the conventional approach the hack (and WP Widgets) took, where you must explicitly save the sidebar for it to be updated. Personally, I don't mind which people prefer, but that needs to be decided upon before the rest of the code can be written.
I prefer AJAX.
Secondly, do you like how the sidebars are deliminated in the example above, or would you rather I used tabs like on the tab bar on the right for them?
Tab bar.
Finally, do you want the hooks for development of Modules to be the same as that for Widgets? If you want them to be the same / slightly different then it will be possible you to just re-use widgets as modules. Or do you just despise the widget hooks, and want a total change? ;)
No preference.
Thanks for the chance to shout out our opinions... :)
madmac
May 13th, 2006, 12:17
Looking good, and thats what I meant about the look. To much scrolling if both sidebars share the same column.
craigatkinson
May 14th, 2006, 02:20
well i cant get this to work. All I want is to have my links show on every page in my WP. My site is here, www.craigatkinson.co.uk/blog please let me know what I'm doing wrong. The things intalled and I see the drag and drop screen etc, I've checked akll the boxes but the links still arent showing! hmm
madmac
May 18th, 2006, 07:20
I can't wait either I need it for my new theme.
looks fantastic. Any idea on a ETA?
madmac
May 26th, 2006, 02:41
I asked him the same question, but have yet to recieve a reply.
lisa
May 26th, 2006, 06:32
He's in "semester end - finals mode." I'm sure he'll pop up sometime after he's done with all that :) Lord knows I'm glad I'm done for the semester. :)
madmac
May 26th, 2006, 06:36
I figured that but I'm so friggin' anquious.
nybble
May 26th, 2006, 05:51
The good news, my computer science project is over - that was one hungry time monster. Bad news, the exams are still to come. So it's revision time!
I'm not even going to hazard an ETA - I know it just won't happen. I really don't think there's that much left to do, I just want enough time to be able to do it all in one shot. So it's possible I'll have a release at some point soonish, but it's also possible I'll have to wait until exams are done.
madmac
May 26th, 2006, 06:00
When will exams be done?
shepdave
June 6th, 2006, 10:53
Just got this yesterday, and it's great! Thanks!
But I am trying to display latest comments and I see nothing. Is there some extra plugin thing or something I need?
Latest comments should be showing up right after categories and before latest posts. The module is properly placed in my list, and turned on for home page, but nothing.
nybble
June 8th, 2006, 04:36
http://meidell.dk/archives/2005/03/21/brians-latest-comments-15/
Slowfinger
June 27th, 2006, 05:39
Hi all and many thanks nybble for this TERRIFIC hack, can't wait for its new version to be released!
Possibly not the place to post this, but just a question after using it for some time, and hope someone can help.
I have been experiencing some trouble using the --more-- and --nextpage-- tags in the text editor, resulting in my sidebar disappearing and being pushed all the way down the page in the main content column only when either is applied. Someone in the WP Italian forum has prompted this may have to do with some improperly nested divs, but I really have no clue (coding noob here). Has anyone else using Sidebar Modules noticed the same problem? I've been quite baffled at this, as this is the only hack I applied to my K2 installation (well, reverted back from previous Widgets installation before discoverying SM ;) ), so I thought I'd ask here... Tests warmly welcome, thanks for any clue.
Slow
Slowfinger
July 1st, 2006, 11:27
Also, after using SBM for a while, I keep getting an incompletely loaded K2 options page. The "save options" button at the bottom won't ever show up and this will drop my connection any time after a (good) while.
This has been occurring since shifting from sidebar to inline asides, which may have caused some conflict with the "latest asides" sidebar module still enabled.
Please help, I need my SBM working and really hope there still is any support available for this hack out there!
madmac
July 1st, 2006, 04:10
Aren you using the svn? Because the sbm is not for the svn.
Slowfinger
July 2nd, 2006, 11:55
Aren you using the svn? Because the sbm is not for the svn.
No, I'm using Beta Two r167b.
Also, I tried a new sbm install via ftp in case files were corrupted, and the full page load WORKED. The only reason I can guess for this behaviour is that I have too many modules enabled? Is there a limit for this?
Of course I don't feel like editing my sbm now they look OK, but I need to.
zeinobia
July 3rd, 2006, 08:52
well I don't have a clue , I prefer that you upload again K2 to your blog with the modules ,then upload the module
then began to enable module one by one to see its effect
I just wish that Nybble finishes soon ,as really I need it now
Slowfinger
July 5th, 2006, 07:33
well I don't have a clue , I prefer that you upload again K2 to your blog with the modules ,then upload the module
then began to enable module one by one to see its effect
I just wish that Nybble finishes soon ,as really I need it now
Thanks, I'm trying on a quicker connection, no loading issue but no sbm edits seem to take effect...
nybble
July 8th, 2006, 01:25
That was a long month.
I've completed a preview version of the plugin. It seems to act fairly stable for me, but your mileage may vary. Grab a copy from here (http://files.nybblelabs.org.uk/sbm/sbm.zip). It is very, very important that you disable Wordpress Widgets before you activate this plugin! Any widget-compatable theme *should* work out of the box with it, but no promises. It should also handle installed widgets, however, I will not be providing any support for unworking widgets.
I've not tested this with a multi-sidebar theme, so any testing in that area would be appreciated. There are only 2 types of module included with it - PHP code and Text. This is rather limiting but there will, of course, be more modules in the final version.
I develop on Linux, so I've only tested it properly using Firefox. I have looked at the admin interface using IE but it seems broken. I'll hopefully fix that within the near future.
Bear in mind this is only a preview, and will almost definately change.
madmac
July 8th, 2006, 05:39
Okay Nybble i have a problem, I want all of my modules in this format:
<div class="sb-section">
<h2>My Title</h2>
<div>
My content here
</div>
</div>
how can I modify your plugin to use this format?
nybble
July 8th, 2006, 06:53
Okay Nybble i have a problem, I want all of my modules in this format:
<div class="sb-section">
<h2>My Title</h2>
<div>
My content here
</div>
</div>
how can I modify your plugin to use this format?
Find & replace the correct line in "functions.php":
if (function_exists('register_sidebar')) register_sidebar(array('before_widget' => '<div id="%1$s" class="sb-section %2$s">','after_widget' => '</div></div>', 'after_title' => '</h2><div>'));
Little bit weird I think but it'll work. If it increases readability I can add "before_content" and "after_content" options.
madmac
July 8th, 2006, 07:13
Thanks, It did disable sidebar 2, but now it works.
EDit: it turnes out that breaks compatibility with many plugins so I remodded it. The code is completely readable, but I thought that code was handled somewhere in the sbm files.
BTW: I found a bug. I was changing the code on a module that I disabled and when I clicked save it deleted all of my disabled modules.
nybble
July 9th, 2006, 11:15
http://nybblelabs.org.uk/projects/sidebar-modules/
Uploaded an updated version. Works with IE and Opera now, so I think it should hold up against most browsers. There's a few more modules included too.
BTW: I found a bug. I was changing the code on a module that I disabled and when I clicked save it deleted all of my disabled modules.
Fixed. It was a global I missed when I modularised the file.
zeinobia
July 9th, 2006, 12:59
well Nybble there is something wrong
everytime I enable the plugin from the plugins page I found this error
"Fatal error: Cannot re-assign $this in /home/shadiaah/public_html/blog73/wp-content/plugins/sbm/sbm.php on line 845"
so what is the problem ?
nybble
July 9th, 2006, 01:12
well Nybble there is something wrong
everytime I enable the plugin from the plugins page I found this error
"Fatal error: Cannot re-assign $this in /home/shadiaah/public_html/blog73/wp-content/plugins/sbm/sbm.php on line 845"
so what is the problem ?
What version of PHP does your server use?
zeinobia
July 9th, 2006, 01:52
What version of PHP does your server use?
It uses PHP 5.1.4
nybble
July 9th, 2006, 02:12
It uses PHP 5.1.4
Ahar, PHP5's yummy object model conflicting with PHP4's yet again. :rolleyes:
v0.0.2 uploaded, *should* fix the incompatibility.
zeinobia
July 9th, 2006, 02:24
Thanks Nybble , it works as a charm :)
madmac
July 9th, 2006, 07:15
Damn it I just upgraded mine and I lost all of my modules.
zeinobia
July 9th, 2006, 08:44
ok I noticed something , it can not consider a bug but I noticed that in the Flickr module there is no border or space between the image squares at all
nybble
July 11th, 2006, 11:42
v0.0.3 uploaded. There have been some significant changes in underlying data structures, and a few Javascript changes too.
Damn it I just upgraded mine and I lost all of my modules.
Either because of deactivation (it'll remove all your modules) or because when I edit PHP class code any serialised objects using that class for their object type will not be recognised anymore. (I remove modules at deactivation because of this second reason.) Unfortunately this will happen again this update, but for all releases after the final version when all the main code has been finished, it won't.
ok I noticed something , it can not consider a bug but I noticed that in the Flickr module there is no border or space between the image squares at all
It'll be something to do with the CSS and flickr module at a guess. Not working on anything except the core SBM code right now so I'll update the K2-specific widgets/modules at a later date.
Slowfinger
July 14th, 2006, 07:57
v0.0.3 uploaded. There have been some significant changes in underlying data structures, and a few Javascript changes too.
Possibly a useless question to anyone but me, but must we revert to K2's stock versions of functions.php, sidebar-modules.php and sidebar.php we originally replaced by installing the sbm hack? Thanks.
davehat
July 14th, 2006, 12:24
Originally Posted by nybble
v0.0.3 uploaded. There have been some significant changes in underlying data structures, and a few Javascript changes too.
Possibly a useless question to anyone but me, but must we revert to K2's stock versions of functions.php, sidebar-modules.php and sidebar.php we originally replaced by installing the sbm hack? Thanks.
Reply With Quote
I'm pretty new to this (I was using nucleusCMS for ages), but I think the short answer is no, not if you're using r167. You will need to modify sidebar.php and functions.php. Luckily a user called steveo has good advice about this in this post (http://getk2.com/forum/showthread.php?t=714#7), and this post (http://getk2.com/forum/showthread.php?p=6750#17). As for sidebar-modules.php, i dunno. I don't appear to have this file (or just can't find it), however SMB works OK on my blog.
A minor glitch though....
I don't know if anyone else had to do this, but I had to edit line 1085 of sbm.php to remove the $width and $height arguments, otherwise I got this error above the wp-admin pages...
Warning: Missing argument 3 for register_widget_control() in /var/www/vhosts/umoja.co.uk/httpdocs/wp-content/plugins/sbm/sbm.php on line 1085 Warning: Missing argument 4 for register_widget_control() in /var/www/vhosts/umoja.co.uk/httpdocs/wp-content/plugins/sbm/sbm.php on line 1085
This edit of mine means that the wrappers around "module's options" are a bit wonky, del.icio.us and UTW in particular, even though they still work OK.
Here's a pic of the UTW wrapper:
http://www.umoja.co.uk/junk/UTF_off_screen.gif
As you can see, the Tag Type drop down box goes to far right. Any thoughts on how I can fix it? Should I have addressed the original error differently and not deleted the arguments?
Any help appreciated, thanks.
Slowfinger
July 14th, 2006, 02:41
davehat,
the 3 mentioned files are actually part of the sbm download linked by nybble on page 1 of this thread. Thanks anyway.
nybble
July 14th, 2006, 04:30
@Slowfinger This plugin runs with SVN only, the hack on the first page is unrelated to this. The plugin runs fine with unmodified K2 SVN code.
@davehat Uploaded v0.1.2 which should take care of the parameter issue. However, I can't fix the styling problems on the UTW widget within the SBM plugin. The widget must have styling data applied in it's control callback. I only provide a set of wrappers to let SBM use Widgets as modules, it's up to the developer how that's styled.
davehat
July 14th, 2006, 06:04
Slowfinger This plugin runs with SVN only
Well, I'm running r167 with the mods I mentioned in the post above and my sidebar seems fine so far:
www.umoja.co.uk (http://www.umoja.co.uk)
Thanks for having a look at the widget wrapper glitch. I appreciate that there's not too much you can do about it! Hopefully a critical mass of developers will switch over to modules from widgets, then this won't be an issue!
nybble
July 14th, 2006, 10:43
Well, I'm running r167 with the mods I mentioned in the post above and my sidebar seems fine so far:
I meant an unmodified release of K2, should have clarified really.
Hopefully a critical mass of developers will switch over to modules from widgets, then this won't be an issue!
Would be cool, but we'll see. ;)
madmac
July 15th, 2006, 01:47
Nybble I have a problem. I put a script inside of a module and after the first save it doesn't show the script's code, so if I try to save after changing it's options, It deletes the script.
Slowfinger
July 15th, 2006, 09:16
I guess this plugin will work fine even on an unmodified r167b release °_O
Thanks.
Slowfinger
July 15th, 2006, 10:17
Nybble, I have a problem. I have installed and activated the SM plugin on r167b after deleting sidebar-modules.php, getting back to a fresh version of sidebar.php and functions.php and deactivating Automattic Widgets, but all I get under the SM tab in the admin panel is a
"Your current theme is incompatable with sidebar modules"
error.
Any idea/help would be highly appreciated.
Edit: Nevermind, widgetised r167 according to Steveo details above and it works just fine. Awesome plugin.
Slowfinger
July 15th, 2006, 02:32
I've been customising my sidebar and it looks like modules can't now be added unless a name is stated for each one, while blank fields for modules' names used to be allowed with the sbm hack. Now only a long string of blank spaces will enable the module without actually showing it in the admin interface (the plugin needs then to be re-activated to correct this). It would be nice if there could be a chance to improve this, thanks a bunch.
Slowfinger
July 15th, 2006, 05:16
Looks like HTML modules code can't manage switching among enabled stuff for further editing. Saved input code won't show up again, even though related modules are still active. Just thought it could be of some interest.
nybble
July 25th, 2006, 02:19
I've uploaded the v1.0.0 version of this plugin. A few new features such as the ability to hide module titles and associate CSS files with modules have been added. I've fixed a number of bugs and stuff too. Grab it quickly because my site will be going down within a day or so until the end of the month. (Hosting is expiring, gah)
Have fun.
waiolas
August 3rd, 2006, 04:47
Hi nybble,
I just want to thank you for making this mod. It makes it easy for someone with no coding experience to have a wide range of sidebar options.
I have one question. I am trying to use the "Recent flickr photos" sidebar, but for somereason it isn't working. I have a flickr account and it works on my photo page. I tried making a new sidebar but also ran into some problems. These issues can be seen on my site waiolas.com.
The code I used for my new sidebar can be found in the wiki section here (http://www.randombyte.net/wiki/falbum/installation_instructions#recent_photos_block)
nybble
August 4th, 2006, 08:30
The "Recent flickr photos" uses the flickr_RSS plugin to display photos, not falbum. From what I can see you've got the sidebar working fine now though.
zeinobia
August 4th, 2006, 10:29
nybble what about Del.ici.ous ? already the script is not working ,it is not saved at all !!
Slowfinger
August 10th, 2006, 02:00
Any hope of having a related-post(s) module in the future? I noticed there's no way of using that feature when using the SBM plugin. Thanks.
nybble
August 12th, 2006, 02:18
nybble what about Del.ici.ous ? already the script is not working ,it is not saved at all !!
The del.icio.us plugin was apparently not maintained anymore, that was why it was removed. Apparently there's a del.icio.us badge or some such thing that can be used, or you could use an RSS module and point it at your del.icio.us feed.
Any hope of having a related-post(s) module in the future? I noticed there's no way of using that feature when using the SBM plugin. Thanks.
No, not directly in the distribution. The K2 version has one, you can use that if you want, but I'm not going to distribute any modules with the plugin that require extra plugins.
obharath
August 13th, 2006, 05:48
Hi Nybble,
I want to know how to enable sidebar modules for 2 sidebars. I checked the code but I am not sure wat to change. I want to enable this feature for my 3 column k2. Can u pls let me know wat changes I have to make.
thx
nybble
August 14th, 2006, 01:08
Your footer says you've made a widgetised version of your theme - it's just the same process, the function names for SBM and WP Widgets are exactly the same. Just re-modify the functions calls as you did before and it should work fine.
zeinobia
August 14th, 2006, 01:35
@Nybble , the last version thank God it worked fine with the Del.ici.ous badge
thanks for the great modules
obharath
August 14th, 2006, 04:25
wow, its just a change of one letter in functions.php and its working like a charm. A big thank you Nybble.
jaana
August 21st, 2006, 10:27
Readme first:
An updated version of this hack is now included in K2 SVN, and is actively maintained as opposed to the old version. Any issues relating to the new version should be reported on the K2 bug-tracker.
==== Details for the old r167 release. USE THIS VERSION AT YOUR OWN RISK =====
I finally got around to updating it for r167. As much code as possible has been moved from functions.php to sidebar-modules.php which I'll comment more at a later date. Have fun!
Description:
A hack for K2 to allow you to edit the contents of your sidebar. Drag and drop the modules, add your own custom content, decide what to display where, and other general funky stuff.
Download:
http://files.nybblelabs.org.uk/snippets/k2-sbm-rc.zip
Installation:
Extract the archive and upload the files to your K2 themes folder.
Screenshot:
http://files.nybblelabs.org.uk/snippets/screenies/k2sbmodules-rfc1.png
The download link won't work for me! :confused:
Slowfinger
August 21st, 2006, 11:27
Jaana,
Nybble is now maintaining a Sidebar Modules plugin. You can download it here (http://nybblelabs.org.uk/projects/sidebar-modules/). No more need to mess around with the SM hack of K2.
Mads
August 21st, 2006, 01:16
after latest version 1.07 i cannot use adsense in html module. anyone having same problem ?
garnet
October 10th, 2006, 07:06
I've been trying for hours to link my asides module to my theme's css file, in which I added specific class and settings for .primary.aside, according to others recommendations.
in editing the module preferences, there is an advanced options box, in which there is a blank space titled, "related css file".
how does one use this option? there is no indication how to link, what to link to.
thanks,
David
grapevine
October 24th, 2006, 09:32
Hi, I'm a new user to K2 and I have deactivate the Automatiic Widget to use sbm.
But here is the problem, I cannot add any module to the sidebar. I type in the module name, choose the module and then click Add. Then all words go grey and then nothing happened...
Unfortunately I have no previous coding experience, so please give me some pointers to solve this problem.
Thank you!
Alkar
October 30th, 2006, 10:42
I have to update my WP to 2.0.5, and one of the steps is to deactivate all plugins before the upgrade is made.
But when I deactivate the plugin, all my modules were lost. Do I have to create again all the modules every time I deactivate SBM? I think this is not desirable.
Where is stored the SBM modules setup, so I can backup it before deactivating the plugin?
bipster
November 3rd, 2006, 10:55
I'm using the K2 theme and the Polyglot (http://www.fredfred.net/skriker/index.php/polyglot) plugin in my blog. I can't get the plugin to work in the sidebar modules. [lang_xx] tags are not processed properly in them.
Any help ?
Thanks in advance
Slowfinger
November 3rd, 2006, 05:56
I have to update my WP to 2.0.5, and one of the steps is to deactivate all plugins before the upgrade is made.
But when I deactivate the plugin, all my modules were lost. Do I have to create again all the modules every time I deactivate SBM? I think this is not desirable.
Where is stored the SBM modules setup, so I can backup it before deactivating the plugin?I can't help you, but this is indeed an issue anytime WP gets updated. I personally backed up all my modules manually in a specific folder on my HD including one file per module with the specific code, along with a list of the active modules. HTH.
vBulletin v3.6.0, Copyright ©2000-2009, Jelsoft Enterprises Ltd.