Howdy, Stranger!

It looks like you're new here. If you want to get involved, click one of these buttons!

Try Vanilla Forums Cloud product

Ready to contribute?

Amazing! Sign our contributors' agreement and then join us on GitHub.

Update for critical security issue in PHPMailer included in release Vanilla 2.3.1
Vanilla 1 is no longer supported or maintained. If you need a copy, you can get it here.


This discussion is related to the Nuggets addon.


  • Uploaded version 1.1.3 of Nuggets.
  • All customs tabs like tabs created by other extensions can now be used.
  • Could you please explain what you mean by this, MySchizoBuddy?

    Posted: Sunday, 22 April 2007 at 7:42PM

  • If u install Dojo Files or Discussion Overview or Blog extension, They all Add a tab in the menu bar, and the url is extensions.php?PostBackAction=Blog. Now you can use those pages for ur nuggets as well. Previously I had it so all extension pages will be included, now u can pick which of the extension pages you want.
  • OK I understand that but what controls have changed to allow this? I can't see anything different.

    Posted: Monday, 23 April 2007 at 7:27AM

  • no new controls. just detecting those pages. thats all.
    i'll add a new control for the blog extension later on
  • Hi Schizo, I think I've found a bug. When I give a nugget a name with a special character (non-latin characters, with accents and stuff) it cannot be edited anymore. It still shows up where it's supposed to, but when I clik on "edit", I get a blank form as if I was cooking a brand new nugget.
  • Picture 1
    thats editting page. I cannot reproduce ur problem

    for now to fix it go into nuggets.php and manually change the name. Actually don't change the name, change the ID, see if it works if u just fixed the ID. i have a hunch thats where the problem might be coming from.
  • I encoded nugget.php in UTF-8 and changed the nuggets' id to fix the ones with this problem as you suggested, and it works. However when I create a new nugget with special characters, these characters are replaced by a square in the nugget's id. I also noticed these "bad" nuggets cannot be trashed since the drop down menu refuses to select them.
  • Schizo, thanks for the amazing add-on. Up and running. Great work!

    BTW, it didn't quite look as I expected. When in the Nugget Management, the "Panel" hash box shows up UNDER all my sidebar stuff "Who's Online," "Social Bookmarks," etc., and above the Vanilla credits. The "Under Panel" hash box shows up right under the Vanilla credits.

    When I installed a Panel nugget, however, it showed up right under the "Start a new discussion" link, above all the other sidebar stuff.

    Again, thanks for the very useful add-on.
  • thats correct. thats what its suppose to do. the Panel Hashbox shows that the Nuggets will be INSIDE the panel. Where in the panel depends on weight.
    Below Panel is OUTSIDE the panel.

    I guess i should call it Inside Panel, Outside Panel. that will be more clear. Hashboxes are just guidelines of where approx will the nugget appear.
  • I see. I'm not quite understanding the weighting, so it's hard to apply "common sense," as you suggested. I do understand that lower numbers are lighter and, so go higher. But you said:
    Of course a negative weight or zero weight for "In Comment" pan makes no sense.
    I'm not sure why it doesn't make sense. Couldn't the nugget be in varying spots within a comment?
  • yes it can be/ give it varying positive weight.
    i can see where ur going with this
  • Does -1 not mean before the first comment?
    And +1 means after the first comment?

    I have mine set at +2 and they appear as the third comment, that is, after comment number two.

    Brilliant once the concept, simple as it is, is understood.

    Posted: Thursday, 10 May 2007 at 10:33AM

  • What she is prolly saying is that, how come u cannot have only + weights for the other nuggets, for eg the Panel nugget. +1 means after the First panel item. +2 means after the second panel item.
  • Schizo, I don't have anywhere I'm "going with this." I just don't understand the statement. Since your text implies that it should be obvious, I'm missing something. Since it isn't obvious to me--just trying to get up to speed here--I'm asking for some input.

    I understand that lower numbers are lighter and rise higher, but I don't understand the significance of the negative numbers versus the positive ones. For example, if the weighting went from 1-10, it would seem that 1 would be the highest position and 10 the lowest. With the negative numbers, I'm thinking that there is some significance to the zero point (particularly since ONLY positive numbers "make sense" within some of the nuggets) that I just didn't catch. So I'm wondering if you can help me understand better.
  • This is the same 'weight' system used in drupal. I have seen it in other places as well and it seems to be the standard 'weight approach'
  • jeffk, I'm also unfamiliar with Drupal (heard of it, but never used it) and since I haven't seen it elsewhere, I don't understand it. As I said, I'm just trying to get up to speed on this stuff, and can't figure the significance of the zero point that moves a nugget outside usability.

    So, if someone doesn't mind lowering themselves to the point to explain it, I'd appreciate it. Otherwise, don't worry about it.
  • ok now that I think about it. there is no significance of using negative weights other than cause its a standard way of doing it. XOOPS does it too i think. Wordpress sidebar widget also uses negative weights.

    In Vanilla u have default weights $Configuration['CONTROL_POSITION_BODY_ITEM'] = '400';
    So If i want to display something before the Body item. I have to subtract 1 from it. Thats what the documentations say it. I add 1 if i want something after it. Thats why u need negative weights.

    Now for Comment Nuggets. I tried to remove the negative/zero weight from the weight field. but it was too much extra code to get ride of them, and add them back in if its not Comments. So I resorted to "Its common sense to not use negative/zero weights. Since I was trying to get ride of them in the first place"
    I think its because I developed it, and I know that there is no Control that will let u put something in the comment list. So u have to use delegation and track the row number that is being rendered. Since the row numbers are all >= 1. hence a negative weight won't do anything. I shouldn't have assumed, that users know how the Comments Nugget is very different than other nuggets.

    Secondly I wanted the negative weights to be random. So -5 means the nugget will display randomly anywhere within the first 5 comments or not display at all. This would help counter Banner Blindness. I implemented it only to find out based on my algo, the probability of the nugget being displayed shrunk quite dramatically. I didn't want to write two separate algo for serial positive weights and random negative weights with high probability.

    So long story short. I'll remove the remark from Nugget documentation. ur right its not obvious why negative weights won't work for comment nuggets when they work for everything else. Going to change it to
    "Negative weight or zero weight for "In Comment" Nugget will not work. You need positive weights"
  • Schizo, thank you. I get it now, I think. So the default weight of an item is the zero point and the above and below are negative and positive, respectively???

    FWIW, I wasn't trying to point out that your documentation was wrong at all. I just figured I knew less about it than everybody else and needed more info. I tried to look it up on Drupal, too, but most of the info on weighting was from others who didn't understand it.

    Again, thanks for taking the time to explain it.
  • Hey Schizo,

    I just wanted to say Nuggets is a real kickass addon.
    It's pretty well thought and offers many possibilities you can't figure out at first unless you try to alter a bit Vanilla's way of working. I solved tons of problems using it. It's really useful when it comes not only to layout matters but also for inserting pieces of code. It pushes Vanilla to the next level, and allows much more flexibility and potential fonctionalities than any other addon. Thanks for this, I love it :D
  • I've created a new role "Moderator" with an access to the "Settings" page but w/out access to extensions to approve the new members and I get this:

    Notice: Undefined variable: NuggetForm in /home/ventswap/public_html/extensions/Nugget/default.php on line 85

    Any thoughts?
  • MySchizoBuddy, you're the man :)
  • this looks great, i'm going to try it now. maybe i will be able to get rid of my pagemanager tabs and use a role-based panel navigation menu instead.

    one other thing; has anyone used this to include wordpress pages? i'm thinking perhaps i could somehow include my wordpress sidebar in the vanilla sidebar.
  • edit:
    tried to include wordpress functions in vanilla, as directed on this page, but i just got a string of errors. i feel like i'm really close to achieving what i need, though...
  • another quick question:
    i've used nuggets to replace my navigation tabs, so the menu (discussions, search, etc) appears in a list on the left instead of the tabs across the top.
    the only problem is that on certain plugin pages, such as private messages, my panel nuggets don't show, so i can't give users any way to get back to the menu.
    i can create a big 'refresh discussions' link, but is there any way around this, before i do?
  • do u have a link i can check
    whats the url for the Private messages page
  • Uploaded version 1.1.4 of Nuggets.
  • @MySchizoBuddy
    Do I have to download and install the new version? I've about 5 nuggets running, so is there any other fixes other than the line I've already changed?
Sign In or Register to comment.