Info
- 46 posts
- 6 voices
- Started 5 years ago by Null
- Latest reply from Null
- This topic is not a support question
Plugin: bbMenu 0.1 beta
-
- Posted 5 years ago #
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 :DPerhaps 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 5 years ago #
ps ow and ear1grey, thx for your help and patience :)
-
- Posted 5 years ago #
Cool! So now the CSS fix? :D
-
- Posted 5 years ago #
:D class class class
-
- Posted 5 years ago #
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 5 years ago #
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 5 years ago #
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 5 years ago #
Hmm it should have entries, something went wrong there.
If you can, delete the bb_menu table.
Then in phpMyAdmin:
CREATE TABLEbb_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',set
PRIMARY KEY (,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 INTObb_menuVALUES ('active', 'Forums', 'index.php', 'front-page', 0)bb_menu
INSERT INTOVALUES ('active', 'Search', 'search.php', 'search-page', 1)bb_menu
INSERT INTOVALUES ('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 5 years ago #
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 5 years ago #
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 5 years ago #
alright good times Null (y)
-
- Posted 5 years ago #
Null, did you make any progress on this lately?
-
- Posted 5 years ago #
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 5 years ago #
thanks null, i'll wait until the next release.
-
- Posted 5 years ago #
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 7Notice 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 5 years ago #
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=11Thx
-
You must log in to post.