Search Results for 'code'
-
Search Results
-
Topic: bb-query help!
I’m trying to display a list of posts that are tagged with one tag but NOT another. For example, I want to display all posts tagged “FRUIT” but exclude posts tagged “Apples”.
I tried creating a custom View, but this code does not work:
function my_custom_views_init() {
$args = array(
'tag_id' => '35',
'tag_id' => '!=72'
);
bb_register_view(
'fruit-without-apples',
'Fruit (excluding apples)',
$args,
false
);
}Neither does this code using bb-query directly:
$topic_query = new BB_Query( 'topic',
array(
'tag_id' => '35',
'tag_id' => '!=72'
)
);
$results = $topic_query->results;
foreach($results as $result) {
echo $result->topic_title . '';
}Any ideas?
I have made my second attempt at installing bbPRess in the web/content/forum directory – and integrating the databases.
Last time I believe I left the User Table Prefix as ‘bb_’.
The install ‘worked’ but I could not add new topic, reply, etc. with any user.
This time I entered it as ‘wp_’ and I have installation errors –
My error report:
SQL ERROR!
>>> Database: xxxxxx_norcalmilsim (xxxCORRECT-I CHECKEDxxx)
>>>>>> ALTER TABLE
wp_postsADD COLUMNpost_idbigint(20) NOT NULL auto_increment;>>>>>> Incorrect table definition; there can be only one auto column and it must be defined as a key
SQL ERROR!
>>> Database: xxxxxx_norcalmilsim (xxxCORRECT-I CHECKEDxxx)
>>>>>> ALTER TABLE
wp_postsDROP PRIMARY KEY;>>>>>> Incorrect table definition; there can be only one auto column and it must be defined as a key
SQL ERROR!
>>> Database: xxxxxx_norcalmilsim (xxxCORRECT-I CHECKEDxxx)
>>>>>> ALTER TABLE
wp_postsADD PRIMARY KEY (post_id);>>>>>> Key column ‘post_id’ doesn’t exist in table
SQL ERROR!
>>> Database: xxxxxx_norcalmilsim (xxxCORRECT-I CHECKEDxxx)
>>>>>> ALTER TABLE
wp_postsADD FULLTEXT KEYpost_text(post_text);>>>>>> The used table type doesn’t support FULLTEXT indexes
the log:
Referrer is OK, beginning installation…
>>> Setting up custom user table constants
Step 1 – Creating database tables
>>> Modifying database: xxxxxx_norcalmilsim (xxxCORRECT-I CHECKEDxxx)
>>>>>> Table: wp_forums
>>>>>>>>> Creating table
>>>>>>>>>>>> Done
>>>>>> Table: wp_meta
>>>>>>>>> Creating table
>>>>>>>>>>>> Done
>>>>>> Table: wp_posts
>>>>>>>>> Adding column: post_id
>>>>>>>>>>>> SQL ERROR! See the error log for more detail
>>>>>>>>> Adding column: forum_id
>>>>>>>>>>>> Done
>>>>>>>>> Adding column: topic_id
>>>>>>>>>>>> Done
>>>>>>>>> Adding column: poster_id
>>>>>>>>>>>> Done
>>>>>>>>> Adding column: post_text
>>>>>>>>>>>> Done
>>>>>>>>> Adding column: post_time
>>>>>>>>>>>> Done
>>>>>>>>> Adding column: poster_ip
>>>>>>>>>>>> Done
>>>>>>>>> Setting default on column: post_status
>>>>>>>>>>>> Done
>>>>>>>>> Changing column: post_status
>>>>>>>>>>>> Done
>>>>>>>>> Adding column: post_position
>>>>>>>>>>>> Done
>>>>>>>>> Dropping index: PRIMARY
>>>>>>>>>>>> SQL ERROR! See the error log for more detail
>>>>>>>>> Adding index: PRIMARY
>>>>>>>>>>>> SQL ERROR! See the error log for more detail
>>>>>>>>> Adding index: topic_time
>>>>>>>>>>>> Done
>>>>>>>>> Adding index: poster_time
>>>>>>>>>>>> Done
>>>>>>>>> Adding index: post_time
>>>>>>>>>>>> Done
>>>>>>>>> Adding index: post_text
>>>>>>>>>>>> SQL ERROR! See the error log for more detail
>>>>>> Table: wp_terms
>>>>>>>>> Changing column: term_id
>>>>>>>>>>>> Done
>>>>>>>>> Changing column: name
>>>>>>>>>>>> Done
>>>>>> Table: wp_term_relationships
>>>>>>>>> Changing column: object_id
>>>>>>>>>>>> Done
>>>>>>>>> Changing column: term_taxonomy_id
>>>>>>>>>>>> Done
>>>>>>>>> Adding column: user_id
>>>>>>>>>>>> Done
>>>>>> Table: wp_term_taxonomy
>>>>>>>>> Changing column: term_taxonomy_id
>>>>>>>>>>>> Done
>>>>>>>>> Changing column: term_id
>>>>>>>>>>>> Done
>>>>>>>>> Changing column: parent
>>>>>>>>>>>> Done
>>>>>> Table: wp_topics
>>>>>>>>> Creating table
>>>>>>>>>>>> Done
Step 2 – WordPress integration (optional)
>>> WordPress address (URL): http://www.norcalmilsim.com/
>>> Blog address (URL): http://www.norcalmilsim.com/
>>> WordPress cookie keys set.
>>> WordPress “auth” cookie salt set from input.
>>> WordPress “secure auth” cookie salt set from input.
>>> WordPress “logged in” cookie salt set from input.
>>> User database table prefix: wp_
Step 3 – Site settings
>>> Site name: NorCalMilSim Forum
>>> Site address (URL): http://www.norcalmilsim.com/forum/
>>> From email address: xxxxxx@gmail.com
>>> Key master role assigned to existing user
>>>>>> Username: admin
>>>>>> Email address: xxxxx@gmail.com
>>>>>> Password: Your existing password
>>> Description: Just another bbPress community
>>> Forum name: MilSim Rules
>>>>>> Topic: Your first topic
>>>>>>>>> Post: First Post! w00t.
>>> Making plugin directory at /mnt/stor7-wc2-dfw1/538952/xxxxxx/www.norcalmilsim.com/web/content/forum/my-plugins/.
>>> Making theme directory at /mnt/stor7-wc2-dfw1/538952/xxxxxx/www.norcalmilsim.com/web/content/forum/my-templates/.
>>> Key master email sent
There were some errors encountered during installation!
****
I can enter new topics (last time I could not – attempting so would give me a page ‘topic closed’) BUT I cannot read the topic.
Also, a ‘user’ named ‘anonymous’ made a post 40 years ago…
What’s going on??
Would you like to paste some thing of my database?