bbPress

Simple, Fast, Elegant

bbPress support forums » Plugins

Plugin: bbMenu 0.1 beta

(45 posts)
  • Started 1 year ago by Null
  • Latest reply from Null
  • This topic is not a support question

Tags:

  1. I FINALLY fixed it!! YESSSSSSSSSSSSS

    What did I do? Well simply replace bb_get_location output with: front-page.
    It even doesn't chance the page id :D

    Perhaps it's a "dirty" fix, but it works:
    function get_bb_menu() {
    global $bbdb;
    $pemal = get_bb_location();
    $pemal = str_replace('topic-page', 'front-page', $pemal);
    $pemal = str_replace('profile-page', 'front-page', $pemal);

    -normal code goes here-

    Going to do some more testing and then it's ready for release!

    Posted 1 year ago #
  2. ps ow and ear1grey, thx for your help and patience :)

    Posted 1 year ago #
  3. Cool! So now the CSS fix? :D

    Posted 1 year ago #
  4. :D class class class

    Posted 1 year ago #
  5. I get this error when I activate this plugin and go to the Menu management page on my backend:

    Warning: mysql_fetch_array(): supplied argument is not a valid MySQL result resource in /home/..../public_html/forums/my-plugins/bbmenu.php on line 88

    Posted 1 year ago #
  6. Where did you install it? Did you install more plugins? Which version of bbPress are you running? Is the bb_menu table created? Did you refresh the page and still get the error? What MySQL/ php version do you use?

    I need more info :)

    Posted 1 year ago #
  7. i was only able to fix the error by adding an @ sign before the myql_fetch_array functions, but that just outputted a blank page.

    I'm running .73.

    bb_menu table is created, but cannot browse the structure since it has no entries.

    I did refresh several times and had the same error.

    Running php version 4.4.4

    MySQL version 4.1.21

    Posted 1 year ago #
  8. Hmm it should have entries, something went wrong there.

    If you can, delete the bb_menu table.

    Then in phpMyAdmin:

    CREATE TABLE bb_menu (
    set varchar(50) NOT NULL default '',
    item 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 (
    set,item)
    ) ENGINE=MyISAM DEFAULT CHARSET=latin1;

    If your current bb_menu already has these values, you wont have to recreate it. But better save then sorry...

    Now fill the table:
    INSERT INTO bb_menu VALUES ('active', 'Forums', 'index.php', 'front-page', 0)
    INSERT INTO
    bb_menu VALUES ('active', 'Search', 'search.php', 'search-page', 1)
    INSERT INTO
    bb_menu VALUES ('available', 'Statistics', 'statistics.php', 'stats-page', 0)

    Now refresh the admin page. This should fix it. Not sure if I gave the right syntaces to use in phpMyAdmin, but you get the idea :)

    ps. If you didn't use the bb_ prefix, you should change this...
    ps2. And leave out the @
    ps3. This is the beta so it has some errors that are fixed in the final release (after bbPress 0.8 is out)

    Posted 1 year ago #
  9. I couldn't create the table using the code you posted, it throwed a MySQL error in phpMyAdmin.

    So I used the plugin to create the table, but had the same problem where it was empty.

    I tried running hte second SQL query on the table, but got the following error:

    #1064 - You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near 'INSERT INTO bb_menu VALUES ('active', 'Search', 'search.php', 'search-page', 1)
    ' at line 2

    Posted 1 year ago #
  10. Ok, I am at work now, so when I get home (tonight) I will cook up some correct SQL code for you. The problem is that the table isn't filled so thats why it said: Warning: mysql_fetch_array(): supplied argument is not a valid MySQL result resource because the table is empty.

    The thing that borthers me is why it doesn't fill the table when it is created :S (any1 has any ideas about this?)

    So your original error is easily fixed, but you will have to wait till I get home.

    Greetz

    Posted 1 year ago #
  11. alright good times Null (y)

    Posted 1 year ago #
  12. Null, did you make any progress on this lately?

    Posted 1 year ago #
  13. The code I gave you works fine here.

    Well since it does create the bb_menu table I suggest you fill it manually with phpma.

    Use these lines:

    INSERT INTO bb_menu VALUES ('active', 'Forums', 'index.php', 'front-page', 0)
    INSERT INTO bb_menu VALUES ('active', 'Search', 'search.php', 'search-page', 1)
    INSERT INTO bb_menu VALUES ('available', 'Statistics', 'statistics.php', 'stats-page', 0)

    But NOT all at once. Do them 1 by 1 so like:

    INSERT INTO bb_menu VALUES ('active', 'Forums', 'index.php', 'front-page', 0)

    presss Go

    Then enter line 2 etc etc

    I am in the final stage of releasing this for 0.8, but I still don't know why your table isn't filled like it should... :(

    Posted 1 year ago #
  14. thanks null, i'll wait until the next release.

    Posted 1 year ago #
  15. Null, I couldn't get this to work. I experienced the same issues as suleiman. I looked at your SQL, and found some errors involving your column names: you're using mySQL keywords as column names, like "set".

    I tried

    CREATE TABLE bb_menu(
    sett varchar( 50 ) NOT NULL default '',
    item varchar( 50 ) NOT NULL default '',
    page varchar( 50 ) NOT NULL default '',
    location varchar( 50 ) NOT NULL default '',
    orderr int( 9 ) NOT NULL default '0',
    PRIMARY KEY ( sett, item )

    but still got an error:

    MySQL said: Documentation
    #1064 - You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near '' at line 7

    Notice I changed "set" to "sett" and "order" to "orderr". I think you're on the right track tho. Let me know if I can help further. I'll check this thread periodically because I'd like to see this plugin work.

    Posted 1 year ago #
  16. Hi,

    Plz go to this thread and keep an eye on this one since the beta is closed:
    http://bbpress.org/forums/topic/743?replies=11

    Thx

    Posted 1 year ago #

RSS feed for this topic

Reply

You must log in to post.

Code is Poetry.