Search Results for 'code'
-
AuthorSearch Results
-
January 23, 2007 at 7:34 pm #53035
In reply to: Stop Cutting Off!!!!!!!!!!
Trent Adams
MemberIf you edit your style.css sheet in /bb-templates/ and go down to the portion that says:
/* Topic Page
=================================== */
That is where you will need to edit your file. I am not sure, but changing this one might be what you are looking for:
.threadauthor small { font: 11px Verdana, Arial, Helvetica, sans-serif; }
Trent
January 23, 2007 at 4:55 pm #50585In reply to: Cannot login, Hide forum
Trent Adams
MemberNo problem zapata. To get rid of the register link, you need to download login-form.php from /bb-templates/ and then edit it as follows:
Change this part from:
<p><?php printf(__('<a href="%1$s">Register</a> or log in'), bb_get_option('uri').'register.php') ?>:</p>
to get rid of the register, you could just comment out this line or change the wording:
<! -- <p><?php printf(__('<a href="%1$s">Register</a> or log in'), bb_get_option('uri').'register.php') ?>:</p> -->
Once you have edited that file, upload it to a new folder (if it doesn’t exist already in root) /my-templates/ as bbPress will use that file first and if it doesn’t exist, go back to the one in /bb-templates/
As for the registering with WordPress, I was only referring to the abilitity to turn on or off registration in WP admin. If you turn it off, then you can add the members you want through the admin.
That should get you going!
Trent
January 23, 2007 at 4:24 pm #50581In reply to: Cannot login, Hide forum
zapata
MemberTrent,
WOEEEZZZZZZZZZAAAAAAAAAAA…. sorry for the excitement… the code works!!!!!
Gurus… one request… how can I completely “Eliminate” anonymous user registration… the goal of my forum is for a private discussion of authors who write on the main blog to communicate with each other. Hence all users of the forum will be actually authors of the blog.
January 23, 2007 at 4:03 pm #50579In reply to: Cannot login, Hide forum
Trent Adams
MemberFrom Ardentfrost.
<?php
/*
Plugin Name: Force Login
Description: No one can see your forums unless they are logged in.
Plugin URI: https://bbpress.org/forums/topic/117
Author: Michael D Adams
Author URI: http://blogwaffe.com/
Version: 0.7
*/
function force_login_init() {
if ( !bb_is_user_logged_in() && false === strpos($_SERVER['REQUEST_URI'], 'bb-login.php') ) {
if ( file_exists( BBPATH . 'my-templates/login.php' ) ) {
require( BBPATH . 'my-templates/front-page.php' );
} else {
require( BBPATH . 'bb-templates/front-page.php' );
}
exit;
}
}
add_action( 'bb_init', 'force_login_init' );
?>
That will work.
Trent
January 23, 2007 at 3:35 pm #53627In reply to: Theme Integration — errors
chrishajer
ParticipantUsually those “cannot modify header” errors are due to whitespace before the
<?php
or at the end after the?>
Is that possible?
January 23, 2007 at 3:33 pm #50578In reply to: Cannot login, Hide forum
zapata
MemberTrent, Thanks for the quick reply. There are no errors. The objective was to hide the forums from everyone who is not logged in. For this the mdawaffe’s plugin (code posted in his post above) was working on my initial install (0.74)… but I’ve installed the 0.75 yesterday and reinstalled the plugin, but upon logging out, I’m still able to browse the forums…
the url: passionforcinema.com/club
January 23, 2007 at 11:42 am #53621In reply to: Plugins / Templates For bbPress 0.8
spencerp
MemberAwesome! Thanks Sam! I’ll jump on all of this real soon. Thanks again!
spencerp
January 23, 2007 at 11:39 am #53633In reply to: bbPress Integrates Fine With WP 2.1
spencerp
MemberYep, and, even though Michael Adams made the newer version of the bbPress Integration plugin. Ryan Boren added two stubs in the 2.1 wp-includes/ folder, holding the same name as the original two.
So, these two calls:
require_once( ABSPATH . WPINC . ‘/registration-functions.php’ );
include_once (ABSPATH . WPINC . ‘/rss-functions.php’);
In any WordPress or bbPress plugins, you’ll still be safe! Inside those two stubs are:
registration-functions.php file:
<?php
// Deprecated. Use registration.php.
require_once(ABSPATH . WPINC . '/registration.php');
?>
rss-functions.php file:
<?php
// Deprecated. Use rss.php instead.
require_once (ABSPATH . WPINC . '/rss.php');
?>
Happy 2.1 Upgrading and bbPress Integrating peoples..
spencerp
January 23, 2007 at 11:13 am #53625Null
MemberFound the bug.
When loading the admin it also includes the new file: menuhead.php. In that file there is a line:
<?php ajax_show_javascript(); ?>
and that gives this error: <b>Fatal error</b>: Call to undefined function ajax_show_javascript() in <b>bb-admin/menuhead.php</b> on line <b>6</b>Why is that? Well the new admin page DOES use this ajax_show_javascript but all others don’t. That also explains that only the menu admin page is working and all others aint.
But how the hell can I fix this? Will an if work? If page = admin-base.php?plugin=menu_admin_page include menuhead.php or something? Any other suggestions?
At the moment, menuhead.php is called using a include or is this fixed if I use the new admin_head hook in 0.8?
January 22, 2007 at 10:45 pm #53618In reply to: Plugins / Templates For bbPress 0.8
Null
MemberQuote:
...the new and improved 0.8 version that should be released pretty soon...
Stop teasing us!!!
January 22, 2007 at 9:05 pm #53617In reply to: Plugins / Templates For bbPress 0.8
spencerp
MemberThe only thing I’m worried about now is, the fact that I’m running the Forum Category enhancement. I’ve currently modified the 0.8alpha files, however, I haven’t gotten the “latest” svn commits yet, including what you’ve mentioned above..
I *could* just manually keep editing my files, as they come through the email list, but IMHO, it’d be more of a pain in the arse that way sigh. I guess what I’m saying is, I’d love it if they’d implement that Forum Category option into 0.8, rather then 1.0.
It’s running just fine for me, except for customizing the look of it and such. The other thing is, it’s really a pain in the arse as it is now, because I’ve implemented my blog’s theme around the forums themselves.
So either way, I’m screwed with tons of file edits.
I don’t know though, I’m too tired at this point to even do any file editing/uploading.. Maybe when I get up later, I’ll handle some of this stuff..
As for the plugins, I’m hoping Josh takes care of his lol. His plugins are about the only plugins I have going, besides the normal original bbPress plugins lol. Anyway, enough of my rambling, I’m tired as heck, and everyone’s tired of it anyway… so.. later people..
spencerp
January 22, 2007 at 8:52 pm #53411In reply to: for each question
Null
MemberGot it fixed, this topic can be deleted
January 22, 2007 at 5:43 pm #53590In reply to: Loading option into array
Michael Adams (mdawaffe)
Memberbb_update_option( 'forum_restriction_db', array( "1" => "David Bessler,testman", "3" => "David Bessler" ) );
$value = bb_get_option( 'forum_restriction_db' );
That’s how it should work.
January 22, 2007 at 5:17 pm #53594In reply to: request: choose language
Anonymous User 96400
Inactiveyeah, i’m using polyglot for my wp blog. now, having something like this for bbpress would be just awesome. users being able to post in different languages. but maybe that’s wanting a bit too much right now.
i had a look at the code aready, but it’s just too complicated for me. all this php code…
January 22, 2007 at 3:35 pm #53420In reply to: get_latest_topics_where code problem
ardentfrost
MemberI’m not absolutely sure about this, but it seems that SQL will want you to be more explicit. You need to break up the list (4 and 1) and add different strings to the where. So, for the first add
WHERE forum_id = 4
then doOR forum_id = 1
. Every subsequent forum id query should also start with an OR.That’s what I think at least. It’s worth a shot
January 22, 2007 at 3:17 pm #1243Topic: get_latest_topics_where code problem
in forum Pluginsdavidbessler
MemberWhen I use the following code in a plugin:
function forum_restriction_get_topics_where_plugin( $where ) {
if ( is_front() ) {
$list_of_allowed_forums = "4,1";
$where = "WHERE forum_id IN ('$list_of_allowed_forums') ";
$where .= " AND topic_sticky <> 2 ";
return $where;
} else {
return $where;
}
}
add_filter ( 'get_latest_topics_where', 'forum_restriction_get_topics_where_plugin' );
I expect it to list the topics belonging to forums with ID 4 and ID 1. Instead, it is only listing topics with forum 4. When I change them to (1,4) it only lists 1. It seems it is only seeing the first value in the string. Any ideas why?
January 22, 2007 at 12:37 pm #53409In reply to: for each question
ear1grey
Member...current"; }
i.e.
...current"SEMICOLON }
?
January 22, 2007 at 11:30 am #53408In reply to: for each question
Null
MemberStill no luck
I have this:
<?php
global $bbdb;
$r = mysql_query("SELECT * FROM $bbdb->menu
WHERE
set= 'active' ORDER BY
orderASC");
while($rw = mysql_fetch_array($r))
{
$class="";
if ($rw['is']) { $class .=" current" }
echo '<li><a class="$current" href="'.$rw['page'].'">'.$rw['item'].'</a></li>';
}
?>
Which is the same code as yours, but I still get the error:
Parse error: parse error, unexpected '}' on header.php on line 84
And line 84 contains the if:
if ($rw['is']) { $class .=" current" }
I am totally lost here :S
January 22, 2007 at 7:33 am #53595In reply to: integrating bbpress with wordpress
Trent Adams
MemberI would try the cookie sharing stuff in both bbPress config.php:
$bb->cookiedomain = '.lumanation.com';
$bb->cookiepath = '/';
And then maybe the cookie stuff that you can put in WordPress wp-config.php (can’t remember the format) if the first stuff just doesn’t work out straight away.
If the users are there it is because the integration is working, just the cookies are not sharing. Try that out and let me know.
Trent
January 22, 2007 at 4:35 am #1274Topic: integrating bbpress with wordpress
in forum Installationateale
Memberhey guys,
i have followed the instructions on the forums/extend for intgegrating bbpress and wordpress.
It all seems to work – bbpress knows about the wordpress users.
Only problem is that i have to login to both wordpress & bbpress seperately – I thought it was supposed to support 1 login for both – using the same cookie or something?
the test site is:
blog.lumanation.com
the forums link at the top takes you to the bbpress install
any help would be greatly appreciated!
also – any ideas on how to embed the bbpress install into wordpress – is it just a matter of hacking up the bbpress templates or is there a more elegant way similar to the wordpress rs-discuss/xdforum plugins?
Cheers!
Adam
January 22, 2007 at 3:16 am #53507In reply to: Changing a Domain name
spencerp
MemberYou’re welcome Startribe..
spencerp
January 21, 2007 at 11:12 pm #53407In reply to: for each question
ear1grey
Member<?php
global $bbdb;
$r = mysql_query("SELECT * FROM $bbdb->menu WHERE set = 'active' ORDER BY order ASC");
while($rw = mysql_fetch_array($r)) <strong>{</strong>
$class="";
if ($rw['is']) { $class .=" current" }
echo '<li><a class="$current" href="'.$rw['page'].'">'.$rw['item'].'</a></li>';
}
?>
January 21, 2007 at 11:02 pm #53406In reply to: for each question
Null
MemberCan you give me a code example, cause i keep getting the error
January 21, 2007 at 10:10 pm #53405In reply to: for each question
ear1grey
Memberthe while looks like it needs curly brackets adding to it or you’re just going to repeatedly set
$class=""
then remove the curly bracket above theecho
.January 21, 2007 at 9:49 pm #53404In reply to: for each question
Null
MemberHmm got this now:
<?php
global $bbdb;
$r = mysql_query("SELECT * FROM $bbdb->menu
WHERE
set= 'active' ORDER BY
orderASC");
while($rw = mysql_fetch_array($r))
$class="";
if ($rw['is']) { $class .=" current" }
{
echo '<li><a class="$current" href="'.$rw['page'].'">'.$rw['item'].'</a></li>';
}
?>
But this gives me an error:
Parse error: parse error, unexpected ‘}’ on line 71
Think I have misplaced something here?
Greetz
ps I didn’t include
$uri=option("uri").$rw["page"];
at all cause I wanted to test this first. So I keep it out for now… -
AuthorSearch Results