Search Results for 'code'
-
Search Results
-
Topic: jquery superfish problem
So i need some help. I have integrated BBPress with WordPress but the template I’m running only loads the Jquery SuperFish menu when it finds WP 2.8 – i need to alter the code so it also loads when it find BB press 1.0 / 1.0.2
here’s the code
<?php
if ( $wp_version != '2.8')
{
wp_deregister_script('jquery');
wp_enqueue_script('jquery', get_template_directory_uri() . '/js/jquery-1.3.2.min.js', null, '1.3.2', false);
wp_enqueue_script('jquery-ui', get_template_directory_uri() . '/js/jquery-ui-1.7.1.min.js', 'jquery', '1.7.1', false);
} else {
wp_enqueue_script('jquery-ui-tabs', null, array('jquery', 'jquery-ui-core'), null, false);
}
if ( $bb_version != ‘1.0’)
{
wp_deregister_script(‘jquery’);
wp_enqueue_script(‘jquery’, get_template_directory_uri() . ‘/js/jquery-1.3.2.min.js’, null, ‘1.3.2’, false);
wp_enqueue_script(‘jquery-ui’, get_template_directory_uri() . ‘/js/jquery-ui-1.7.1.min.js’, ‘jquery’, ‘1.7.1’, false);
} else {
wp_enqueue_script(‘jquery-ui-tabs’, null, array(‘jquery’, ‘jquery-ui-core’), null, false);
}
wp_enqueue_script(‘jquery-cycle’, get_template_directory_uri() . ‘/js/jquery.cycle.all.min.js’, ‘jquery’, null, false);
wp_enqueue_script(‘jquery-validate’, get_template_directory_uri() . ‘/js/jquery.validate.min.js’, ‘jquery’, null, false);
if ( !function_exists(‘pixopoint_menu’) ) {
wp_enqueue_script(‘hoverintent’, get_template_directory_uri() . ‘/js/superfish/hoverIntent.js’, ‘jquery’, null, false);
wp_enqueue_script(‘superfish’, get_template_directory_uri() . ‘/js/superfish/superfish.js’, ‘jquery’, null, false);
}
if ( is_singular() ) {
wp_enqueue_script(‘comment-reply’);
}
wp_enqueue_script(‘arras-base’, get_template_directory_uri() . ‘/js/base.js’, ‘jquery’, null, false);
wp_head();
arras_head();
if ( !function_exists(‘pixopoint_menu’) ) :
?>
<script type=”text/javascript”>
$(document).ready(function() {
$(‘.sf-menu’).superfish({
delay: 1000, // one second delay on mouseout
animation: {opacity:’show’,height:’show’}, // fade-in and slide-down animation
speed: ‘fast’, // faster animation speed
autoArrows: false, // disable generation of arrow mark-up
dropShadows: false // disable drop shadows
});
});
</script>
<?php endif ?>
Hi all!
I have a problem with BBPress:Syntax Hiliter plugin and simple quotes (‘) or normal quotes (“).
When in my code I have a quote, the plugin (or bbpress?) change it by the hexadecimal code.
For example, if in my code I have a simple quote (‘), appear in the code '.
.
I was reading an issue about it and maybe the functions.bb-formatting.php file have an answer, anyway, I don’t have what I need to edit.
Anyone have any idea?
Thank you
(As an afterthought, this ought to be in troubleshooting, but I can’t change it… sorry!)
Hello. Let me introduce myself. I am an idiot.
I installed bbPress to my server. I wanted to have user integration with my WordPress installation. Great. I ran the installation, but I knew I’d have to do a lot of things manually because of my server set up. I entered the appropriate information for the config file, and it prompted me to create the config file with certain information in it because it didn’t have permissions to do so. Exactly what I expected. I ran the rest of the setup as it should go, and when I had it commence with the installation, it said that it had installed but with some minor errors. I looked at the config file, and the keys hadn’t been saved. So I entered in the keys as they should have gone, but then I stupidly changed the blasted database prefix to the same prefix as my WordPress installation thinking for some stupid reason that I was changing the setting for WordPress integration! IDIOT! It installs again with some “minor errors,” but this time going to the address of the forum actually brought up the forum instead of the installation prompt. I mozy on over to my WordPress installation (http://ipfcubed.com– which I’ve currently set to be inaccessable to the public– you’ll see why). Now every single draft and scheduled post (as well as unapproved submissions from contributors in the community) is now visible on the main page. When I make a new post, it says the year is 1999 (EDIT: Sorry– the date is still correct, but the post’s address says that it’s 1999: http://ipfcubed.com/1999/11//. The published posts count is also off– it says I have zero published posts in the dashboard. I can see that I’ve majorly messed up the posts table. Can someone PLEASE help me fix it? Any and all suggestions are welcome! Below I’ve provided both the error message and the installation log that it gave me:
THE LOG (errors below this):
Referrer is OK, beginning installation…<br />
>>> Setting up custom user table constants</p>
<p>Step 1 - Creating database tables<br />
>>> Modifying database: jordan_wp (localhost)<br />
>>>>>> Table: ipf3_forums<br />
>>>>>>>>> Creating table<br />
>>>>>>>>>>>> Done<br />
>>>>>> Table: ipf3_meta<br />
>>>>>>>>> Creating table<br />
>>>>>>>>>>>> Done<br />
>>>>>> Table: ipf3_posts<br />
>>>>>>>>> Adding column: post_id<br />
>>>>>>>>>>>> SQL ERROR! See the error log for more detail<br />
>>>>>>>>> Adding column: forum_id<br />
>>>>>>>>>>>> Done<br />
>>>>>>>>> Adding column: topic_id<br />
>>>>>>>>>>>> Done<br />
>>>>>>>>> Adding column: poster_id<br />
>>>>>>>>>>>> Done<br />
>>>>>>>>> Adding column: post_text<br />
>>>>>>>>>>>> Done<br />
>>>>>>>>> Adding column: post_time<br />
>>>>>>>>>>>> Done<br />
>>>>>>>>> Adding column: poster_ip<br />
>>>>>>>>>>>> Done<br />
>>>>>>>>> Setting default on column: post_status<br />
>>>>>>>>>>>> Done<br />
>>>>>>>>> Changing column: post_status<br />
>>>>>>>>>>>> Done<br />
>>>>>>>>> Adding column: post_position<br />
>>>>>>>>>>>> Done<br />
>>>>>>>>> Dropping index: PRIMARY<br />
>>>>>>>>>>>> Done<br />
>>>>>>>>> Adding index: PRIMARY<br />
>>>>>>>>>>>> SQL ERROR! See the error log for more detail<br />
>>>>>>>>> Adding index: topic_time<br />
>>>>>>>>>>>> Done<br />
>>>>>>>>> Adding index: poster_time<br />
>>>>>>>>>>>> Done<br />
>>>>>>>>> Adding index: post_time<br />
>>>>>>>>>>>> Done<br />
>>>>>>>>> Adding index: post_text<br />
>>>>>>>>>>>> Done<br />
>>>>>> Table: ipf3_terms<br />
>>>>>>>>> Changing column: term_id<br />
>>>>>>>>>>>> Done<br />
>>>>>>>>> Changing column: name<br />
>>>>>>>>>>>> Done<br />
>>>>>> Table: ipf3_term_relationships<br />
>>>>>>>>> Changing column: object_id<br />
>>>>>>>>>>>> Done<br />
>>>>>>>>> Changing column: term_taxonomy_id<br />
>>>>>>>>>>>> Done<br />
>>>>>>>>> Adding column: user_id<br />
>>>>>>>>>>>> Done<br />
>>>>>> Table: ipf3_term_taxonomy<br />
>>>>>>>>> Changing column: term_taxonomy_id<br />
>>>>>>>>>>>> Done<br />
>>>>>>>>> Changing column: term_id<br />
>>>>>>>>>>>> Done<br />
>>>>>>>>> Changing column: parent<br />
>>>>>>>>>>>> Done<br />
>>>>>> Table: ipf3_topics<br />
>>>>>>>>> Creating table<br />
>>>>>>>>>>>> Done</p>
<p>Step 2 - WordPress integration (optional)<br />
>>> WordPress address (URL): http://ipfcubed.com/<br />
>>> Blog address (URL): http://ipfcubed.com/<br />
>>> WordPress cookie keys set.<br />
>>> WordPress "auth" cookie salt set from input.<br />
>>> WordPress "logged in" cookie salt set from input.<br />
>>> Fetching missing WordPress cookie salts.<br />
>>>>>> WordPress "secure auth" cookie salt not set.<br />
>>> User database table prefix: ipf3_</p>
<p>Step 3 - Site settings<br />
>>> Site name: IPF³ Forum<br />
>>> Site address (URL): http://forum.ipfcubed.com/<br />
>>> From email address: jordanspencer@ipfcubed.com<br />
>>> Key master role assigned to existing user<br />
>>>>>> Username: admin<br />
>>>>>> Email address: jordanspencer@ipfcubed.com<br />
>>>>>> Password: Your existing password<br />
>>> Description: Just another bbPress community<br />
>>> Forum name: The General of Electric<br />
>>>>>> Topic: Your first topic<br />
>>>>>>>>> Post: First Post! w00t.<br />
>>> Key master email sentThere were some errors encountered during installation!
ERRORS:
SQL ERROR!<br />
>>> Database: jordan_wp (localhost)<br />
>>>>>> ALTER TABLE <code></code>ipf3_posts<code>ADD COLUMN</code>post_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: jordan_wp (localhost)
>>>>>> ALTER TABLE
ipf3_postsADD PRIMARY KEY (post_id);>>>>>> Key column ‘post_id’ doesn’t exist in table
Thank you!
when I use $bbdb->get_results($sql, ARRAY_K); it reports warning when there is no records in database.
then I checked the code bb-includes/backpress/class.bpdb.php:
936 $key = $this->col_info[0]->name;
937 foreach ( $this->last_result as $row ) {
938 if ( !isset( $new_array[ $row->$key ] ) ) {
939 $new_array[ $row->$key ] = $row;
940 }
941 }
942 if ( $output == ARRAY_K ) {
943 return array_map( ‘get_object_vars’, $new_array );
944 }
945 return $new_array;
It seems when the query result is empty, $new_array is not initialized, so warning happens in Line 943
so I add a line $new_array=array(); before the foreach statement of Line 937, then everything goes well.
The code now looks like this:
936 $key = $this->col_info[0]->name;
937 $new_array=array();
938 foreach ( $this->last_result as $row ) {
939 if ( !isset( $new_array[ $row->$key ] ) ) {
940 $new_array[ $row->$key ] = $row;
941 }
942 }
943 if ( $output == ARRAY_K ) {
944 return array_map( ‘get_object_vars’, $new_array );
945 }
946 return $new_array;
so I think maybe this is a bug.
I have a deep integration of bbPress 1.0.2 and WordPress 2.8.4 at riogallinasschool.org, using a heavily modified Kakumei template.
Integration works well. I only register users from WP. Logins work from either BBP or WP. WP users appear correctly to BBP (every user can log in from both WP and BBP)..
Logout from WP is fine regardless of where the login occurred (so, no cookie problems).
However, when logging out from BBP (using the Kakumei “Log out” link), the logout occurs (so cookies are working), but I am redirected to a 404. The logout link is bb-login.php?logout=1. I have found that, on the other hand, the link bb-login.php?logout=0 (as typed in) works just fine — logs out, redirects back to page.
I have hacked a solution. I don’t understand it (I haven’t yet been able to follow the use of the GET variable logout to find where it’s value is used anywhere). But in case anyone else has this problem, here’s the hack.
The logout link is produced by the function call bb_logout_link(); in the template’s logged-in.php file.
bb_logout_link is defined in bb-includesfunctions.bb-template.php, and effectively calls bb_get_logout_link with the same arguments. In the latter function, around line 2737, the value logout=1 is hard-coded.
I have changed the code for bb_get_logout_link so (a) it defaults to logout=1 if logout is not specified in the call to bb_logout_link (thus the hack is non-destructive), but (b) the call bb_logout_link(‘logout=0’); overrides the default.
This produces the working link, so the “Log out” link works.
Here’s the code
Old line 2737 of bb-includesfunctions.bb-template.php was
$query = array( 'logout' => 1 );I changed that to the following (which works because the args were “extract”ed, so $logout has a value from the call to bb_logout_link):
if ( $logout==NULL ) $logout = 1; // Defaults to 'logout=1'
$query = array( 'logout' => $logout ); // Changed '1' to '$logout'Then in the template’s logged-in.php, I added the argument to the call to bb_logout_link:
bb_logout_link('logout=0');It works for me.
Has anyone else has had this problem? If not, I must have broken something somewhere else — so I’d like to know.
Can anyone explain the bug, or explain where the value of logout is used? (I’ll keep looking, and will post a followup if I find it, but I’m not expert at the subtleties of apply_filters, which appears to be the only possibility.)
Thanks.
I am new to the forum, so I hope I posted it in the right place.
I am wanting to add a simple button-link to my WordPress Blog Post template saying something like “Discuss In Forum”. I am using WordPress-bbPress-synchronization to post Blog items to my Forum. This plugin generates a link in the most recent comment that allows you to visit the correct topic for that blog post.
I would also like to add that I do not know code, so a simplified question is this: How can I add a button to my forum for the correct topic without changing the link every time I use it? Is this something relatively easy to accomplish?
Thanks in advance for help
oh well