Search Results for 'code'
-
AuthorSearch Results
-
July 14, 2009 at 1:37 pm #76119
In reply to: How to insert ads other than google ads
Ipstenu (Mika Epstein)
ModeratorBirdy, can you link to the plugin page instead? If you want to show code, you have to put it between backticks (and when I figure out how to post them without zooming into code formatting…)
July 14, 2009 at 1:36 pm #76150In reply to: Want to add a navigation header
_ck_
ParticipantOpen your
header.phptemplate and find the<div id="main">near the end.Put any kind of html you want after there for navigation.
Put it before the php profile part.
July 14, 2009 at 1:36 pm #76138In reply to: Step two questions
Ipstenu (Mika Epstein)
Moderatorkipperman, if the database has the tables in it, it’ll show up as needing to upgrade. You have to delete the tables, not just wipe them.
In regards to the KEYs and SALTs, you should be able to pull them right from the wp-config.php file for WPMU. It’s not quite right in the setup, I noticed last week.
Can I give the forum the same database as my WP and enter the same settings in the set up?
Yes you can

Stoke me a flipper, I’ll be back by lunch.
July 14, 2009 at 1:32 pm #76146In reply to: Cookie sharing – bbPress 1.0.1 & WPMU 2.7.1
Ipstenu (Mika Epstein)
ModeratorWhat part isn’t working? Just not at all, you can’t log in with the same ID on both, or is it the logging in on one logs you out on the other? There are a few similarish errors, but they’re debugged differently.
As always, re-copy/paste the KEYs and SALTs from WPMU to BB, flush your cache and cookies, and try again. Even if you’re sure they’re right, it doesn’t hurt

Also:
define( 'WP_AUTH_COOKIE_VERSION', 1 );should be in your bb-config, not wp-config.July 14, 2009 at 1:00 pm #15326Topic: Want to add a navigation header
in forum Themesandywilliams244
MemberWondering how I would go about doing this?
I want it to consist for 3-4 buttons.
I seen a thread about this a little lower down but it had been locked without a answer.
So was wondering how i’d go about this?
July 14, 2009 at 12:28 pm #76118In reply to: How to insert ads other than google ads
birdy404
Memberi downloaded the plugins ADSENSE FOR BBPRESS and GOOGLE ADSENSE CONFIGURATION. The former gives an option to insert codes but when i put in my OpenX code nothing shows up. The latter, however, displays my OpenX ads, only problem is it shows up in the footer when i want it in the header and between posts. i tried inserting the html codes directly in my themes but it shows as html codes and not as an ad. am i doing something wrong? please let me know.
Also, can any of you please help me configure it to not only show up in the footer? here’s the coding for that plugin:
<?php
/*
Plugin Name: Simple Google Adsense
Plugin URI: http://www.strapontins.org/people/rentendre/simple-google-adsense-bbpress/
Description: Add Google Adsense code in your bbPress forum, in the footer
All users are welcome to improve on it :pAuthor: Frédéric Petit
Author URI: http://www.strapontins.org/
Version: 0.2
License: CC-GNU-GPL http://creativecommons.org/licenses/GPL/2.0/
*/
add_action(‘bb_admin_menu_generator’, ‘bb_gad_configuration_page_add’);
add_action(‘bb_admin-header.php’, ‘bb_gad_configuration_page_process’);
function bb_gad_configuration_page_add() {
bb_admin_add_submenu(__(‘Google Adsense Configuration’), ‘use_keys’, ‘bb_gad_configurtion_page’);
}
function bb_gad_configurtion_page(){?>
<h2><?php _e(‘Google Adsense Configuration’); ?></h2>
<form class=”options” method=”post” action=””>
<fieldset>
<label for=”ga_key”>
<?php _e(‘Google Adsense User Id:’) ?>
</label>
<div>
<textarea class=”text” name=”ga_key” id=”ga_key” value=”<?php bb_form_option(‘ga_key’); ?>” ></textarea>
<?php _e(‘Put your adsense code, without the code of the script pagead2.googlesyndication.com/pagead/show_ads.js’); ?>
</div>
</fieldset>
<fieldset>
<?php bb_nonce_field( ‘ga-configuration’ ); ?>
<input type=”hidden” name=”action” id=”action” value=”update-ga-configuration” />
<div class=”spacer”>
<input type=”submit” name=”submit” id=”submit” value=”<?php _e(‘Update Configuration »’) ?>” />
</div>
</fieldset>
</form>
<?php
}
function bb_gad_configuration_page_process() {
if ($_POST == ‘update-ga-configuration’) {
bb_check_admin_referer(‘ga-configuration’);
if ($_POST) {
$value = stripslashes_deep( trim( $_POST ) );
if ($value) {
bb_update_option(‘ga_key’, $value);
} else {
bb_delete_option(‘ga_key’ );
}
} else {
bb_delete_option(‘ga_key’);
}
$goback = add_query_arg(‘ga-updated’, ‘true’, wp_get_referer());
bb_safe_redirect($goback);
}
if ($_GET) {
bb_admin_notice( __(‘Configuration saved.’) );
}
}
// Bail here if no key is set
if (!bb_get_option( ‘ga_key’ ))
return;
function createGAdCode($accountId) {
$code .= ‘<div class=’bbpress_adsense’>’ . “n”;
$code .= ‘ ‘ . $accountId . ‘ ‘ . “n”;
$code .= ‘<script type=’text/javascript’ src=’http://pagead2.googlesyndication.com/pagead/show_ads.js’></script>’ . “n”;
$code .= ‘</div>’ . “n”;
return $code;
}
function insertGAdCode() {
$accountId = bb_get_option(‘ga_key’);
if ($accountId != ”) {
echo createGAdCode($accountId);
}
}
add_action(‘bb_foot’, ‘insertGAdCode’);
?>
July 14, 2009 at 11:07 am #69738In reply to: phpbb3 -> bbpress converter
MrPresident
MemberJust done this myself on a live phpBB3 forum, worked like a dream, no issues. Thanks very much!
July 14, 2009 at 9:07 am #15325Topic: Cookie sharing – bbPress 1.0.1 & WPMU 2.7.1
in forum Installationdeanes02
MemberIts just not working! Please help.
define( 'BB_AUTH_SALT', '' );
define( 'BB_LOGGED_IN_SALT', '' );
define( 'BB_SECURE_AUTH_SALT', '' );
define('BB_NONCE_KEY', '');matches it wp-config equivalent (with values obviously).
Used the bbPress Integration plugin to get new values for the wp-config file and entered them
/*** bbPress integration ***/
define( 'COOKIEHASH', '998c6cb0a1fda1b22e40b1a75220d390' );
define( 'COOKIE_DOMAIN', '.www.MYSITE.com' );
define( 'SITECOOKIEPATH', '/' );
define( 'COOKIEPATH', '/' );
define( 'WP_AUTH_COOKIE_VERSION', 1 );I have checked through all the settings in bbPress WordPress Integration settings (in bbPress) and they all look correct.
XML-RPC is enabled.
I have seen that oterh people seem to be able to get this working. I have followed a few of these guides, but still can’t get it to work.
Would be great if you have any ideas! Thanks!
July 14, 2009 at 8:48 am #75469In reply to: Support for 0.9 – how long?
_ck_
ParticipantCan someone test this new version of Freshly Baked Cookies with bbPress 0.9 + WP 2.8.1 and let me know if it works and cookie sync is maintained?
http://bbshowcase.org/plugins/freshly-baked-cookies.zip
Don’t forget to copy over your settings at the top of the plugin and remember to set the AUTH_COOKIE_VERSION to
2for WP 2.8I have a hard time believing it’s that simple to fix for WP 2.8 vs 2.7 but here’s hoping.
July 14, 2009 at 7:55 am #75915_ck_
ParticipantAs with all programming, the best way to learn is to do. Make some plugins.
July 14, 2009 at 7:53 am #75914Ashish Kumar (Ashfame)
ParticipantJuly 14, 2009 at 7:27 am #76113In reply to: Integration
eneko.astorkiza
MemberI have the same problem. I have integrated them and i can use wordpress users to login, but if i logon to wordpress i’m not loged into bbpress

Wp –> 2.8
bbpress –> 1.0.1
July 14, 2009 at 6:51 am #71466In reply to: No Emails Being Sent – Anyone solve this yet?
Murali N
MemberThis is what I made…
Does this works…
………………………………………………………………………………………………………………………………………
if ( !function_exists('bb_mail') ) {
function bb_mail($to, $subject, $content, $headers=''){
require_once('PATH_TO/Swift/lib/Swift.php');
require_once('PATH_TO/Swift/lib/Swift/Connection/SMTP.php');
$swift =& new Swift(new Swift_Connection_SMTP("smtp.gmail.com",587));
$smtp->setUsername("telecomdiary.forums");
$smtp->setpassword("xxxxxxx");
$swift =& new Swift($smtp);
$from = new Swift_Address("telecomdiary.forums@gmail.com","Telecom Forums | by Telecom Diary");
$message =& new Swift_Message($subject, $content);
if ($swift->send($message, $to, $from)) {return true;}
else{ echo "Message failed to send to ".$to." from ".$from;}
$swift->disconnect();
}
}
?>…………………………………………………………………………………………………………………………………………………….
Any replacements require??
July 14, 2009 at 5:15 am #76117In reply to: How to insert ads other than google ads
chrishajer
ParticipantIf the plugin is for google ads, just change that portion to your ad code. All the plugins do is embed code wherever you want (depending on the plugin.) If you want to use some other ad code, just change or configure the plugin to do that.
If you are using OpenX, just insert the code into your templates wherever you want to see the ads, as johnhiler suggests.
July 14, 2009 at 3:31 am #75833In reply to: Fatal Error on Plugin Activation
_ck_
ParticipantI sure hope you have really good backups because you are just begging to have your entire database corrupted by forcing my plugins to work with 1.0
see this part:
Beginning upgrade…
Tags copied to taxonomy tables: bb_upgrade_1080
Display names populated: bb_upgrade_1090
Index forum_stickies dropped: bb_upgrade_1100
>>> DoneThat’s where bbPress is trashing all your current data by copying over the old data from your 0.9 tables, like the topicmeta and old tag tables, back into bb_meta.
July 13, 2009 at 7:44 pm #76097In reply to: New to BBPRESS — need help with ad plugins please!
birdy404
MemberThanks a lot guys.
@ Chris…i know how to add new forums etc. what i’m trying to figure out is how to add a new directory to the plugins to enable ads. i’ve downloaded a plugin and the read me file says:
“Unpack the zip to your
/my-plugins/directory”. WHERE IS THAT?“Copy and paste this:
<?php bbad_ad_block(); ?>as the first line of post.php (before<div class="threadauthor">) in whichever theme you are using. I.e. yoursite.com/forums/bb-templates/kakumei/post.php.”i’m confused. please help.
thanks.
July 13, 2009 at 7:19 pm #75832In reply to: Fatal Error on Plugin Activation
citizenkeith
ParticipantAs of yesterday, I was using the following plugins:
Allow Images 0.7.1
BBCode Buttons Toolbar 0.0.9
BBcode Lite 1.0.3
bbPress Smilies 0.0.8
Human Test for bbPress 0.9.2
Members Online 0.0.1
Topics Per Page 0.0.5
Unread Posts 0.9.3
Autoloaded:
Hidden Forums 0.0.9
Quote (mod by ck) 0.2mod
Year Long Cookes – Remember Me 0.0.2
I didn’t have a problem for days. This morning, I uploaded and activated the following:
bbPress Signatures 0.20
New User Notification Email 0.0.2
Hidden Forums Tag Filter 0.0.6
Just a few minutes ago, I tried to post to the forum, but I was logged off after hitting “Send Post” and my post didn’t make it. I then went to the admin panel and had the dreaded “Database Upgrade” message again. After upgrading, I checked my plugins. They were all fine, except Members Online,
Topics Per Page and Unread Posts were deactivated.
My guess is that there’s a problem with New User Notification Email.
Thoughts?
July 13, 2009 at 7:13 pm #76100Ipstenu (Mika Epstein)
ModeratorYou’ll need to add this to your bb-config.php file, to share logins:
define('WP_AUTH_COOKIE_VERSION', 1);Should be fine, I was running that pair up until yesterday
July 13, 2009 at 5:23 pm #76087In reply to: problem after installing
Ashish Kumar (Ashfame)
ParticipantMay be you are out of track and I guess its a new forum setup. How about deleting the database and all the files and do it again. Make sure you do empty the database and recreate the sub-folder
forum.July 13, 2009 at 4:38 pm #76085In reply to: problem after installing
Ashish Kumar (Ashfame)
ParticipantDid the installation went smooth or any issues were there? I would recommend checking the database if it really contains the tables created and then the
bb-config.phpfile to check if its filled with required data.July 13, 2009 at 2:08 pm #68324smi1ey
Memberashfame’s guide is pretty clear on the steps. For me, the key was going to http://YOURSITE/wp-admin/options, grabbing the AUTH keys there, then pasting them in the correlating section of the bbPress config.php file in the install. Once they both had the exact same cookie codes in their config files, it worked like a charm.
July 13, 2009 at 10:07 am #76005In reply to: Problem adapting theme from wordpress
Ashish Kumar (Ashfame)
ParticipantNice
July 13, 2009 at 9:39 am #73758In reply to: functions.php
_ck_
ParticipantYou can emulate the
functions.phpin theme directories quite easily in 0.9Put this into a regular plugin and I suggest naming it
_functions.phpwith a leading underscore so you don’t even have to activate it. Install it and then when afunctions.phpis found inside the currently active theme, it will be loaded with the regular plugins. Since it’s so tiny, if you have a collection of mini-plugins you can just put it in there instead.<?php
/*
Plugin Name: functions.php
*/
$template_functions_include = bb_get_active_theme_directory() . 'functions.php';
if ( file_exists( $template_functions_include ) ) { require_once( $template_functions_include ); }
?>In theory you might even be able to put that code into the
header.phpinside of the templates if you are making a theme you want to distribute for 0.9July 13, 2009 at 6:39 am #76063In reply to: Need help with some colour alterations.
Ashish Kumar (Ashfame)
ParticipantIf changes made by you are not reflecting in CSS, then there is something which is over riding it. You need to catch that.
Like the priority order in Inline, Internal and then External.
Read more here – http://www.plus2net.com/html_tutorial/css-types.php
Hope that helps
July 13, 2009 at 6:34 am #76002In reply to: Problem adapting theme from wordpress
Ashish Kumar (Ashfame)
ParticipantDid you read my reply over bbshowase? Thats the way it can be solved. To help you in your aim, install Firebug on Firefox. Run it using
F12and then you can catch the DIV you want.Hope that helps
-
AuthorSearch Results