Search Results for 'code'
-
AuthorSearch Results
-
February 23, 2011 at 8:37 pm #97894
In reply to: Warning/Deprecated Error
Ben L.
Memberhttps://trac.bbpress.org/browser/trunk/bb-load.php#L25 – here’s an even better solution.
error_reporting(E_ERROR | E_WARNING | E_PARSE | E_USER_ERROR | E_USER_WARNING);allows us to avoid new error messages if PHP adds new error types in the future.February 23, 2011 at 7:13 pm #94993In reply to: bbPress 2.0 – Updates
mark_corbin
MemberThanks JJJ!
One more thing’s been bugging me: I want anyone to be able to register on the forum, but no ‘register’ link appears on the bbpress log-in widget, or for example after links that say ‘sorry, need to be signed in to post comments’ .
There seems to be a template file for a bbp registration form, and I’ve tried guessing but I can’t work out the link to it!
So
1. Is this by design, have I got an option wrongly ticked somewhere?
2. Could you let me know the link to a registration form if there is one – otherwise I could use the standard wp registration link
3. Is it worth me searching through the code trying to add in a few links in the right places, is there one quick-win place to this? I guess priority for me is to get the link in the sign-in widget.
I’m tempted to try to create or use a lightbox registration/log-in process anyway, but I need a much shorter term solution (small numbers of people might register from Friday)
Thanks for your help folks, love this software
Mark
February 23, 2011 at 3:53 pm #37570Topic: First topic_title in array doesn't show up..
in forum InstallationThomashorstink
MemberHi,
I’m using bbPress for a website I’m building and I’m experiencing a kind of weird thing. I’m using the following code to get the last topic title on the forum page:
topic_title(forum_last_topic_id());It works well except for the first Subforum..
Here’s a link:
February 23, 2011 at 1:46 pm #102993In reply to: Warning/Deprecated Error
sontru
ParticipantMost of the deprecation is to do with =& assignments.
According to this http://www.php.net/manual/en/language.references.php#93292
All that need doing is to remove the &
Is it safe to do so. Has anyone done this? Is there any recursive tree loops in the code?
February 23, 2011 at 1:46 pm #97893In reply to: Warning/Deprecated Error
sontru
ParticipantMost of the deprecation is to do with =& assignments.
According to this http://www.php.net/manual/en/language.references.php#93292
All that need doing is to remove the &
Is it safe to do so. Has anyone done this? Is there any recursive tree loops in the code?
February 23, 2011 at 10:45 am #94990In reply to: bbPress 2.0 – Updates
Pr1me
MemberCould someone tell me what the code is to display the recent forum entries in the sidebar? (without using the widget system)
February 23, 2011 at 4:12 am #104289In reply to: WPMimic V.1
llny
Member
February 23, 2011 at 4:12 am #99189In reply to: WPMimic V.1
llny
Member
February 23, 2011 at 3:10 am #37566Topic: SQL error!
in forum Installationjzp820927
MemberSQL error!
>>> database:bbpress (localhost)
>>>>>> CREATE TABLE IF NOT EXISTS
bb_posts(post_idbigint(20) NOT NULL auto_increment,forum_idint(10) NOT NULL default 1,topic_idbigint(20) NOT NULL default 1,poster_idint(10) NOT NULL default 0,post_texttext NOT NULL,post_timedatetime NOT NULL default ‘0000-00-00 00:00:00’,poster_ipvarchar(15) NOT NULL default ”,post_statustinyint(1) NOT NULL default 0,post_positionbigint(20) NOT NULL default 0,PRIMARY KEY (
post_id),KEY
topic_time(topic_id,post_time),KEY
poster_time(poster_id,post_time),KEY
post_time(post_time),FULLTEXT KEY
post_text(post_text)) TYPE = MYISAM DEFAULT CHARACTER SET ‘utf8’;
>>>>>> 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 ‘TYPE = MYISAM DEFAULT CHARACTER SET ‘utf8” at line 16
February 22, 2011 at 5:06 pm #104565In reply to: Custom forum template like forum-ID.php – possible?
Francesco Bigiarini
ParticipantWhat you’re asking for involve hooking the “bb_get_active_theme_directory” filter (or similar):
function custom_dir($directory)
{
// do something
// append the slug for example
global $forum;
$directory .= $forum->forum_slug . '/'
}
if(special case described in my last post) add_filter( 'bb_get_active_theme_directory', 'custom_dir');I’m sorry but I can’t help you further, I’m pretty busy right now.
February 22, 2011 at 5:06 pm #99465In reply to: Custom forum template like forum-ID.php – possible?
Francesco Bigiarini
ParticipantWhat you’re asking for involve hooking the “bb_get_active_theme_directory” filter (or similar):
function custom_dir($directory)
{
// do something
// append the slug for example
global $forum;
$directory .= $forum->forum_slug . '/'
}
if(special case described in my last post) add_filter( 'bb_get_active_theme_directory', 'custom_dir');I’m sorry but I can’t help you further, I’m pretty busy right now.
February 22, 2011 at 2:24 pm #104564In reply to: Custom forum template like forum-ID.php – possible?
Pomy
ParticipantHi Zaerl, Thanks for your interest in this topic

I also tried your method, but I’m sorry its little bit different.
its shows content from “whatever-you-want.php” when slug is “this” but the forum structure remain same.
something like
**************Forum Template**************
— Default Header
— Default latest discussion
— Default forums
— Default Footer
— Custom content from whatever-you-want.php
********************************************
But I’m searching, that when forum slug is “this” then i can handle every thing from scratch from “whatever-you-want.php”
like
*************Forum Template***************
— My Custom Header for forum slug “this”
— My Custom latest discussion
— My Custom forums categories
— My Custom style for footer
*******************************************
Keep in mind that this is a rude approach and that everything can be packed in a plugin.
I’m afraid what you are talking about. Is this not a secure method?
Can you please pack this code into a plugin, I’ll really appreciate your kindness. Thanks
February 22, 2011 at 2:24 pm #99464In reply to: Custom forum template like forum-ID.php – possible?
Pomy
ParticipantHi Zaerl, Thanks for your interest in this topic

I also tried your method, but I’m sorry its little bit different.
its shows content from “whatever-you-want.php” when slug is “this” but the forum structure remain same.
something like
**************Forum Template**************
— Default Header
— Default latest discussion
— Default forums
— Default Footer
— Custom content from whatever-you-want.php
********************************************
But I’m searching, that when forum slug is “this” then i can handle every thing from scratch from “whatever-you-want.php”
like
*************Forum Template***************
— My Custom Header for forum slug “this”
— My Custom latest discussion
— My Custom forums categories
— My Custom style for footer
*******************************************
Keep in mind that this is a rude approach and that everything can be packed in a plugin.
I’m afraid what you are talking about. Is this not a secure method?
Can you please pack this code into a plugin, I’ll really appreciate your kindness. Thanks
February 22, 2011 at 1:44 pm #94988In reply to: bbPress 2.0 – Updates
John James Jacoby
KeymasterTry
bbp_is_forum()
Otherwise, because of other plugins like BuddyPress it’s hard to know exactly if we’re in *any* bbPress page without running through all the _is_ functions first. I have it set ‘bbPress’ as the body class if a bbPress page is detected, but that happens pretty late in the game. Would be better off checking for a specific _is_ and going from there.
February 22, 2011 at 9:55 am #104563In reply to: Custom forum template like forum-ID.php – possible?
Francesco Bigiarini
ParticipantNo no no.
/forum.php, near the end:
$template = 'forum.php';
if($forum->forum_slug == 'this') $template = 'whatever-you-want.php';
else if($forum->forum_slug == 'that') $template = 'something-else.php';
bb_load_template( $template, array('bb_db_override', 'stickies'), $forum_id );/topic.php, near the end:
$template = 'topic.php';
$forum = bb_get_forum($topic->forum_id);
if($forum->forum_slug == 'this') $template = 'whatever-you-want.php';
else if($forum->forum_slug == 'that') $template = 'something-else.php';
bb_load_template( $template, array('bb_db_override', 'stickies'), $forum_id );Keep in mind that this is a rude approach and that everything can be packed in a plugin.
February 22, 2011 at 9:55 am #99463In reply to: Custom forum template like forum-ID.php – possible?
Francesco Bigiarini
ParticipantNo no no.
/forum.php, near the end:
$template = 'forum.php';
if($forum->forum_slug == 'this') $template = 'whatever-you-want.php';
else if($forum->forum_slug == 'that') $template = 'something-else.php';
bb_load_template( $template, array('bb_db_override', 'stickies'), $forum_id );/topic.php, near the end:
$template = 'topic.php';
$forum = bb_get_forum($topic->forum_id);
if($forum->forum_slug == 'this') $template = 'whatever-you-want.php';
else if($forum->forum_slug == 'that') $template = 'something-else.php';
bb_load_template( $template, array('bb_db_override', 'stickies'), $forum_id );Keep in mind that this is a rude approach and that everything can be packed in a plugin.
February 21, 2011 at 3:14 pm #104581In reply to: Weird header code
zyadsherif
MemberOh I see … that’s good to know, thanks a lot
!!
February 21, 2011 at 3:14 pm #99481In reply to: Weird header code
zyadsherif
MemberOh I see … that’s good to know, thanks a lot
!!
February 21, 2011 at 8:51 am #104580In reply to: Weird header code
Francesco Bigiarini
ParticipantNo. You have a very modern installation of PHP and there is some code in bbPress that now it deprecated. Nothing to worry about.
February 21, 2011 at 8:51 am #99480In reply to: Weird header code
Francesco Bigiarini
ParticipantNo. You have a very modern installation of PHP and there is some code in bbPress that now it deprecated. Nothing to worry about.
February 21, 2011 at 8:49 am #104540Francesco Bigiarini
ParticipantMy plugin doesn’t touch the mail code.
February 21, 2011 at 8:49 am #99440Francesco Bigiarini
ParticipantMy plugin doesn’t touch the mail code.
February 21, 2011 at 8:44 am #104614In reply to: Pagination Breaks after 44 Pages
Francesco Bigiarini
ParticipantProbably you have deleted some posts here and there. Try to recount everything from the admin page (bb-admin/tools-recount.php). I have tested get_topic_page_links (the function that generate links) and I don’t see problems.
Your count says 1533 posts but 35*44 + 7 = 1547.
Also add:
.post img, #post_content img {
max-width: 450px;
}to your CSS.
February 21, 2011 at 8:44 am #99514In reply to: Pagination Breaks after 44 Pages
Francesco Bigiarini
ParticipantProbably you have deleted some posts here and there. Try to recount everything from the admin page (bb-admin/tools-recount.php). I have tested get_topic_page_links (the function that generate links) and I don’t see problems.
Your count says 1533 posts but 35*44 + 7 = 1547.
Also add:
.post img, #post_content img {
max-width: 450px;
}to your CSS.
February 21, 2011 at 8:24 am #104561In reply to: Custom forum template like forum-ID.php – possible?
Pomy
ParticipantHi Ben L.
I’m sorry, second code is not working from my side.
Are you sure about this code?
Please tell me where I’m wrong.
Error:
Warning: Missing argument 1 for bb_get_forum(), called in /home/domain/public_html/my-domain.com/forum/bb-templates/bbp-template/forum.php on line 18 and defined in /home/domain/public_html/my-admin.com/forum/bb-includes/functions.bb-forums.php on line 125
`
Thanks
-
AuthorSearch Results