Skip to:
Content
Pages
Categories
Search
Top
Bottom

Plugin: bbMenu 1.1

  • Get it while it’s hot!!!

    Add your own menu to your bbPress forum, rename and re-order (drag & drop) the menu tabs to your liking.

    New in this version:

    – You can now rename the menu items by double-clicking them

    – Fixed a minor $bb_table_prefix bug

    – Added compatibility with the bbPortal plugin

    Important:

    Before installing, be sure to delete (drop) the previous

    bb_menu table from you database

    Known issues:

    With FireFox: There are some problems when trying to edit the menu links in FF. Sometimes you can’t edit the text in the textfield. Just try double clicking a text in the menu link, then double click another one and now try to edit the first one opened. If you know how to fix this issue, plz let me know

    To do:

    – Be able to add custom menu tabs to the menu using the admin panel

    – re-write the plugin to use jQuery?? (This is used in the next bbPress version)

    Download:

    http://www.sourceskins.com/bbmenu1.1.zip

    -Null

Viewing 21 replies - 1 through 21 (of 21 total)
  • I don’t understand, what does this plugin do? Screenshots would help.

    re-write the plugin to use jQuery?? (This is used in the next bbPress version)

    Does it work with 1.0-alpha, then?

    It adds a menu to your forum displaying the forum, statstics and search page which you can edit in the admin page. Also see: http://www.sourceskins.com/bbpress

    It works woth all versions 0.8+ not sure about 1.0 (should work). The re-write is just to use jQuery, so I can downsize the plugin javascripts etc it needs now.


    bbolman
    Participant

    @bbolman


    geekpulpthegreat
    Member

    @geekpulpthegreat

    I get an error:

    Warning: mysql_query() [function.mysql-query]: Can’t connect to local MySQL server through socket ‘/var/run/mysqld/mysqld.sock’ (2) in /home/.liberty/geekpulp/forums.geekpulp.co.nz/my-plugins/bbmenu.php on line 314

    Warning: mysql_query() [function.mysql-query]: A link to the server could not be established in /home/.liberty/geekpulp/forums.geekpulp.co.nz/my-plugins/bbmenu.php on line 314

    Darn that error again, there must be something wrong with that insert part when a table is created.

    Check with phpmyadmin if the table bb_menu is created. If not do so manually (this is not tested, but it contains the stuff needed in the table):

    "CREATE TABLE$bbdb->menu` (

    item_id INT(3) NOT NULL AUTO_INCREMENT,

    item varchar(50) NOT NULL default ”,

    set varchar(50) NOT NULL default ”,

    page varchar(50) NOT NULL default ”,

    location varchar(50) NOT NULL default ”,

    order int(9) NOT NULL default ‘0’,

    PRIMARY KEY (item_id)

    );`

    Then you will have to fill it (again not tested, but it contains what needed):

    "INSERT INTO$bbdb->menu` VALUES

    (DEFAULT, ‘Forums’, ‘active’, ‘index.php’, ‘front-page’, 0),

    (DEFAULT, ‘Search’, ‘active’, ‘search.php’, ‘search-page’, 1),

    (DEFAULT, ‘Statistics’, ‘inactive’, ‘statistics.php’, ‘stats-page’, 0);”`

    When sucesfully created this table, things should work…

    Btw, your error seems to be a db connection problem…

    Worked right away for me, using the “refresh” mentioned above.

    Is there an easy way to add tabs, and also to customize existing tabs? For instance, I use the PM plugin, and I would like to have a menu item that goes to the main PM page. How would I do this?

    Thanks, I appreciate it.

    Well most izi way:

    Wait for the next release, it will have custom tabs adding feature.

    Hard way:

    Using phpmyadmin you can add into the menu table:

    DEFAULT, 'Excample tab', 'inactive', 'pagename.php', 'front-page', 0

    Well ‘front-page’ is more complicated to add it should be changed to something else and added as a plugin (i know this sounds weird), so let it in and see what happens….

    About the pm issue, i am not familair with it what does it do? Can you show me? If it is a page that is added then this is possible INCLUDING that the tab stays active…

    problem that could happen is for non logged in visitors, they will see the tab too

    Null, thanks for the help. Yeah, going into the table isn’t a whole lot of fun, but this isn’t something that would need to be changed very often.

    PM is private messaging, i.e. this plugin:

    https://bbpress.org/plugins/topic/20

    The plugin adds a page (/yourforum/pm.php) that lets you read/write private messages to other users. Because it is a static page, you can define the address in the table.

    What would be really great, though, is a way to make the links dynamic. The PM plugin also comes with a notification function where users can be given an alert when they visit the forum letting them know a new message has arrived. The tab would say something like “Private Messages (1)” or something like that. Unfortunately, since the page addresses are stored in the DB, I can’t really think of a way to do this.

    As far as wanting to see it, you can check my forum here:

    http://www.lne97.com/bbpress/

    I have it locked down so you have to register, which addresses the issue you mentioned above. However, you can log in using:

    user: just a test

    password: justatest (no spaces)

    Thanks again for the plugin!

    Hi,

    I will take a look at the plugin (think after easter) and see if there is a way to implement this. The tab titles are stored in the db, can’t change that, but the title can be replaced with a stringreplace thingy. So technically it could do what you want… Well I’ll try to get that tab in first :D

    edit: seems you’ve got that pm tab working, what did you use to edit it into the table? (saves me time finding it out myself)


    geekpulpthegreat
    Member

    @geekpulpthegreat

    The table is created but your right it does seem to be a database connection issue, how do I fix it?

    Here’s a sceenshot of the error in admin http://www.forums.geekpulp.co.nz/bb-images/bbmenuError.jpg if that helps.

    The table is also filled?

    Try installing anotherplugin that uses the database, like the memberlist and pm plugin and see if you get these errors too…


    M
    Member

    @box87

    The error is caused by using mysql_query instead of the ezSQL syntax, $bbdb->get_results(). The error shows up several times… I don’t know how Null got bbMenu working, unless he has a mysql_connect somewhere. I had to change 4 or so lines to get this thing functional.

    Null, are you going to add an easy way to add pages? Using phpMyAdmin is cool and all, but it’s just not smooth at all.

    @ box87, can you give me/sent me what you have changed and where? This error also seems to effect people that use php 5+, so if your changes fixes these errors, I realy would like to have them :D (mauricederegt[at]gmail.com)

    About adding menutabs (not pages); it will be in the next release. You can create new tabs in the admin area and drag&drop them around. Only downside is that the tabs won’t be highlighted when you are on the page where the new tab points too. This has to do with the bb_location and knowing-on-what-page-you-are issue (is_pagename) .

    It already is possible to automaticly add a menu tab to your list when activating a plugin that has a page on its own (like the memberlist plugin). But I need to do some more testing for this and documentation of how to do this will proberly be released when bbPress 1.0 (with plugin activation) is released (cause the way this works can be changed)…

    Also I am thinking of rewriting this plugin after the bbPress 1.0 release to use jQuery. 1.0 uses this libary, so why not make use of this and reduce the extra files needed to drag&drop the tabs around :D

    Well for now, send me your fix so I can put it in the next release. Big things are ahead!


    M
    Member

    @box87

    The new changes have been made:

    http://www.box.net/shared/cgrj1na0t7

    Testing this tomorrow after work…. nah after diner after work :)

    Thx for the help mate!

    _Null

    Hmmm got this error:

    Warning: Invalid argument supplied for foreach() in /home/sites/site116/web/bbpress/my-plugins/bbmenu.php on line 390

    the foreach:

    foreach( $r1 as $rw ) {

    Null


    M
    Member

    @box87

    Hmmm. Let me take a look.

    Either $r1 and $rw need to be switched, or $r1 isn’t an array.

    Edit:

    Lines 358 – 360 should contain the following:

    $r = (array) $bbdb->query( "SELECT * FROM ~$bbdb->menu~ WHERE ~set~ = 'active' ORDER BY ~order~ ASC" );

    foreach( $r as $rw ) {

    Replace the ~ with backticks. I don’t know how to escape backticks in bbPress.

    I’ll try that thanks

    Okay, it loads now without any errors, though it doesn’t show any menu tabs. The db table IS filled, but it wont show anything…

    BOX help :D:D:D:D:D can’t figure it out! Changed al $r into r1 etc mixed them did all variations, nothing worked. The foreach is wrong i guess…

Viewing 21 replies - 1 through 21 (of 21 total)
  • You must be logged in to reply to this topic.
Skip to toolbar