Search Results for 'code'
-
AuthorSearch Results
-
April 1, 2010 at 5:41 pm #86374
In reply to: How to show a topic is closed on the front page
gerikg
Memberit’s conflicting with
bb_topic_labels();April 1, 2010 at 2:26 pm #80717In reply to: When bbpress 1.0.3?
Windhamdavid
Member@chishajer ~ thk u for your efforts here on bbpress. i second your opinion! open source doesn’t die, it just forks..
and with 9 active tickets 1.0.3 is just around the corner.
April 1, 2010 at 2:19 pm #86320In reply to: Hide topics
zaerl
ParticipantI’m working on a little plugin that is a rework of Hidden Forums. It will allow the user to hide topics as well of forums. I will post the code after some testing.
April 1, 2010 at 2:18 pm #86365In reply to: “deep” integration – class.wp-http.php and http.php
Gautam Gupta
ParticipantThis is a fix just to solve your problem:
- Open
/bb-includes/backpress/class.wp-http.php - At the starting, after
<?phpput (on a new line):if ( !class_exists( 'WP_Http ' ) ) { - And at the end put:
}
I would probably report this issue on the BackPress trac
April 1, 2010 at 10:20 am #33898Topic: “deep” integration – class.wp-http.php and http.php
in forum Troubleshootingcapsx
Participant/bb-includes/backpress/class.wp-http.php (bbPress 1.1-alpha revision 2412)
BBPRESS functions:
function &_wp_http_get_object() {
function wp_remote_request($url, $args = array()) {
function wp_remote_get($url, $args = array()) {
function wp_remote_post($url, $args = array()) {
function wp_remote_head($url, $args = array()) {
function wp_remote_retrieve_headers(&$response) {
function wp_remote_retrieve_header(&$response, $header) {
function wp_remote_retrieve_response_code(&$response) {
function wp_remote_retrieve_response_message(&$response) {
function wp_remote_retrieve_body(&$response) {
conflict with WORDPRESS (WordPress 3.0-alpha revision 13909) /wp-includes/http.php the same functions
March 31, 2010 at 7:44 pm #86319In reply to: Hide topics
johnhiler
MemberThe tricky thing with Hidden Forums is the lack of a frontend. The plugin doesn’t have a frontend at all… there are only manual settings which let you set individual forums as hidden or not. The frontend is handled through bbPress’ built-in “move topic” pulldown…
That said, someone might be able to hack Hidden Forums to add an extra frontend toggle that lets admins hide individual topics!
March 31, 2010 at 7:19 pm #86336In reply to: Topic tags
gerikg
Memberfrom SAM
“A first attempt at getting WordPress 2.7 and bbPress 1.0 to play nice again is now in trunk [1862].
I’m specifically talking about “deep” integration, i.e. when you include WordPress inside bbPress to gain access to WordPress’ functions.
This will need a lot of testing, so please post any issues you have on the relevant Trac ticket, #972 (which will stay open until some more testing has occurred).
I recommend using the following code at the top of your bbPress bb-config.php file to include WordPress inside bbPress:
if ( !defined( ‘ABSPATH’ ) ) {
include_once( ‘/Full/Path/To/wp-load.php’ );
}
Note that this includes “wp-load.php” not “wp-config.php” or “wp-blog-header.php”. This avoids running WordPress’ template loader which presumably isn’t needed inside bbPress. Some implementations may want it though, so if you find you need it then give it a go and let us know how that goes.
Also note that all filters and actions set in WordPress whether default or added by plugins or themes are cleared out completely. That means that plugins and themes installed in WordPress cannot add filters or actions to bbPress at all. This may have some implications I’m not aware of yet.
Go nuts! “
March 31, 2010 at 5:15 pm #33889Topic: COOKIE_DOMAIN, SITECOOKIEPATH, COOKIEHASH, COOKIEPATH
in forum Troubleshootinggerikg
MemberDoes adding:
define( 'COOKIEHASH', '9999999999999999999999' );
define( 'COOKIE_DOMAIN', '.website.com' );
define( 'SITECOOKIEPATH', '/' );
define( 'COOKIEPATH', '/' );to bb-config.php do anything or it’s just dead weight?
March 31, 2010 at 1:35 pm #86318In reply to: Hide topics
zaerl
ParticipantI think that Hidden Forums can be modified in order to hide individual posts. It’s just a matter of changing the
hidden_forums_filterfilter function but it seems that the author doesn’t update her plugin no more.March 31, 2010 at 9:36 am #84567In reply to: bbPress mobile version
chandersbs
MemberStill looking forward to the codes……
March 31, 2010 at 9:32 am #86262In reply to: Filename cannot be empty
derekboughton
MemberI have a similar problem –
I installed bbPress today and logged in as administrator then tried to move around the initial post.
Whenever I try to ‘Send Post’ (also when I try to ‘edit’ a post/topic; or click on a topic as administrator), I get the following error msg –
Warning: include() [function.include]: Filename cannot be empty in /…../public_html/members/bbpress/bb-includes/functions.bb-template.php on line 45
Warning: include() [function.include]: Filename cannot be empty in /home/…/public_html/members/bbpress/bb-includes/functions.bb-template.php on line 45
Warning: include() [function.include]: Failed opening ” for inclusion (include_path=’.:/usr/lib/php:/usr/local/lib/php’) in /home/…./public_html/members/bbpress/bb-includes/functions.bb-template.php on line 45
I have re-FTPed ‘functions.bb-template.php’ but I still get the same problem.
There seems to be a bug in the code of ‘functions.bb-template.php’ – i.e. there is nothing within the brackets after the include function ().
Any way of resolving this quickly?
Thanks
Derek
March 31, 2010 at 9:13 am #86325In reply to: Displaying sub-sub-forums
miruru
MemberAfter some more testing, i’ve managed to get it working exactly how I wanted. You’ll need to change it in front-page.php.
If you want the code, here it is: http://pastie.org/896738.txt.
Hope it works for anyone who wishes to use it.
edit: i mentioned that you need to replace forum.php with the above code, this was a mistake so you will need to revert the forum.php back to it’s original state and only change the front-page.php.
March 31, 2010 at 9:12 am #84753In reply to: Plugins You Want !!!
chengdu-living
ParticipantDoes anyone know how much time there is between official releases, approximately? I’m just wondering if I’ll be waiting weeks, months, or years.
March 31, 2010 at 6:29 am #86306In reply to: insert flash (swf) file in template
Farhad
Memberdon’t work this code and nothing appear
March 31, 2010 at 2:53 am #82552In reply to: wp integration cookie does not work
rockyteng
Memberhi guys,
thanks gerikg’s instrucition,very helpful!
i followed gerikg’s instruction,but meet a problem.
on task 7 after i clicked on save changes,
i should get the code below:
define( ‘COOKIEHASH’, ‘9ff1a614da865684d07223b202d18708’ );
define( ‘COOKIE_DOMAIN’, ‘.10.10.1.20’ );
define( ‘SITECOOKIEPATH’, ‘/wordpressmu/’ );
define( ‘ADMIN_COOKIE_PATH’, ‘/wordpressmu’ );
define( ‘COOKIEPATH’, ‘/wordpressmu/’ );
but actually i lost
define( ‘ADMIN_COOKIE_PATH’, ‘/wordpressmu’ );
so when i log into bbpress then
i can log into wordpressmu automatically
but i cant log into wordpressmu admin automatically
does anybody have an idea what i have missed?
your help will be much appreciated.
thanks guys
March 31, 2010 at 1:34 am #86332In reply to: Topic tags
chrishajer
ParticipantOne thing, not sure if it matters. The forum pages all return a 404 code, even though the page is displayed. This was an old problem with WordPress integration.
Here is something:
http://www.adrogen.com/blog/wordpress-wp-blog-headerphp-causes-404-in-ie/
Also, are you including
wp-load.phporwp-blog-header.php? Should bewp-load.php.There is another post on these forums on how to fix it but I cannot find it right now.
March 31, 2010 at 1:27 am #86331In reply to: Topic tags
chrishajer
ParticipantI wasn’t able to add a tag either
March 30, 2010 at 8:27 pm #86305In reply to: insert flash (swf) file in template
zaerl
ParticipantSomething like:
<object width="300" height="200">
<param name="movie" value="your_file.swf">
<embed src="your_file.swf" width="300" height="200">
</embed>
</object>March 30, 2010 at 8:24 pm #86300In reply to: All forums RSS feed?
zaerl
ParticipantFile
rss.phpat line 182. It seems that bbPress retrieves the last 35 posts if called like/rssif ( !$posts = bb_get_latest_posts( 35 ) )
die();you can add a new case on top of that file but I don’t think that it’s a wise choice expecially if you have a huge forum.
March 30, 2010 at 8:04 pm #86324In reply to: Displaying sub-sub-forums
pagal
Participant@ miruru.. I’m happy that you are also interested in this issue… I was also searching the same thing.. but I’m depressed and left if..
yes you are right this issue is two year old… “but we are new on bbpress”
I know its not good to highlight someone but It was hurting …
I was interested in this post https://bbpress.org/forums/topic/forum-list-alterations .. because the Micheal has been successful to solve this issue.. I also tried it… but i had failed.. so then I decided to contact Micheal to solve this issue… I had registered on his site ( http://www.inniosoft.co.cc/devstation ) and ask him to solve this problem… but it was amazing that he is not interested to solve bbpress issues.. and said his forums not just for bbpress.. ( that’s why he is not accessible to his server and he was unable to show the code )…
he said he will show the code will soon when he will get his server .. so after some weeks I contacted him again becoz its had been toooo late.. huh then he said even he was not able to access his server.. and you know what happed “he deleted me from his forums
” and kick me off by saying that I was against his forum’s term and condition .. and its a “continues ignorance” to ask questions…please don’t go there.. its my humble request to all
otherwise you’ll be depressed like me

we will be happy if someone solve this issue except “Micheal “.
your well wisher
Pagal
March 30, 2010 at 6:56 pm #86312In reply to: Hide topics
johnhiler
MemberHere are some more detailed instructions for you:
1) First, create a new forum and call it “Hidden” or something similar.
2) Upload and activate the Hidden Forums plugin.
3) Get the forum id number here: http://yoursiteurl.com/forums?forumlist
For the sake of this example, let’s say the forumid of your new forum you want to hide is #3.
4) Now edit the settings manually at the top of the plugin:
http://svn.automattic.com/bb-plugins/hidden-forums/trunk/hidden-forums.php
Use the settings below, at the end of this post.
5) Reupload your plugin with the new settings, and see if it works!
Hope that helps!

$hidden_forums=array(3); // hide these forums, list by comma seperated number
$hidden_forums=array(‘keymaster’,’administrator’); // these roles can always see ALL forums regardless
$hidden_forums[3]=array(‘administrator’,’moderator’); // exact formal role name, *not* ability
$hidden_forums=array(1); // these users can always see ALL forums regardless
$hidden_forums=”[H] “; // text, html, css or image to indicate hidden forums/topics, make it =””; if you don’t want any label at all
March 30, 2010 at 6:49 pm #86299In reply to: All forums RSS feed?
ishutan
MemberClose, that does give a feed for all the forums, but it looks like it’s only pulling in the most recent posts.
I’m looking for something that will feed all posts on all forums?
Thanks.
March 30, 2010 at 11:24 am #86303In reply to: insert flash (swf) file in template
Gautam Gupta
ParticipantJust put the embed video code in the front-page.php template.
March 30, 2010 at 10:34 am #86162In reply to: Can I add custom permalink option
pagal
Participant@ jomontvm thank you so much…
I’ll try it soon and tell you what happened…
Thanks again..
March 30, 2010 at 9:10 am #86161In reply to: Can I add custom permalink option
jomontvm
ParticipantHi Pagal,
I have customized the permalink for bbpress, and it works fine. It’s still on the testing stage, though you can try this. The following is the modifications I have done.
Step 1:
Open ‘bb-admin/options-permalinks.php’
You will find a permalink options declaration. Add one more option as shown below, it will add one more option in the permalink options in the backend. You can make the custom option with a text field, in order to customize in your own way (I have done in a predefined format in order to make it simple).
$permalink_options = array(
'mod_rewrite' => array(
'title' => __( 'Permalink type' ),
'type' => 'radio',
'options' => array(
'0' => sprintf( __( '<span>None</span>%s' ), bb_get_uri( 'forum.php', array( 'id' => 1 ), BB_URI_CONTEXT_TEXT ) ),
'1' => sprintf( __( '<span>Numeric</span>%s' ), bb_get_uri( 'forum/1', null, BB_URI_CONTEXT_TEXT ) ),
'slugs' => sprintf( __( '<span>Name based</span>%s' ), bb_get_uri( '/forum/first-forum', null, BB_URI_CONTEXT_TEXT ) ),
'custom' => sprintf( __( '<span>Custom</span>%s' ), bb_get_uri( '/forum/%parent_slug%/%forum_slug%', null, BB_URI_CONTEXT_TEXT ))
)
)
);
Step 2:
Now we have to create the custom format of permalinks for forums and topics.
Open ‘bb-includes/functions.bb-template.php’
We have to modify two functions ‘get_forum_link’ and ‘get_topic_link’. See the changes I have done for the custom permalink option.
function get_forum_link( $forum_id = 0, $page = 1, $context = BB_URI_CONTEXT_A_HREF ) {
$forum = bb_get_forum( get_forum_id( $forum_id ) );
if (!$context || !is_integer($context)) {
$context = BB_URI_CONTEXT_A_HREF;
}
$rewrite = bb_get_option( 'mod_rewrite' );
if ( $rewrite ) {
$page = (1 < $page) ? '/page/' . $page : '';
if ($rewrite === 'custom') {
if ($forum->forum_parent > 0) {
$parent = bb_get_forum($forum->forum_parent);
$parent_slug = $parent->forum_slug;
$custom_link = $parent_slug . '/' . $forum->forum_slug;
} else {
$custom_link = $forum->forum_slug;
}
$link = bb_get_uri('forum/' . $custom_link . $page, null, $context);
} else {
if ( $rewrite === 'slugs' ) {
$column = 'forum_slug';
} else {
$column = 'forum_id';
}
$link = bb_get_uri('forum/' . $forum->$column . $page, null, $context);
}
} else {
$query = array(
'id' => $forum->forum_id,
'page' => (1 < $page) ? $page : false
);
$link = bb_get_uri('forum.php', $query, $context);
}
return apply_filters( 'get_forum_link', $link, $forum->forum_id, $context );
}
function get_topic_link( $id = 0, $page = 1, $context = BB_URI_CONTEXT_A_HREF ) {
$topic = get_topic( get_topic_id( $id ) );
if (!$context || !is_integer($context)) {
$context = BB_URI_CONTEXT_A_HREF;
}
$args = array();
$rewrite = bb_get_option( 'mod_rewrite' );
if ( $rewrite ) {
$page = (1 < $page) ? '/page/' . $page : '';
if ($rewrite === 'custom') {
$custom_link = '';
if ($topic->forum_id > 0) {
$forum = bb_get_forum($topic->forum_id);
if ($forum->forum_parent > 0) {
$parent = bb_get_forum($forum->forum_parent);
$custom_link = $parent->forum_slug;
}
$custom_link .= '/' . $forum->forum_slug;
}
if (!empty($custom_link)) {
$custom_link .= '/topic/' . $topic->topic_slug;
} else {
$custom_link .= 'topic/' . $topic->topic_slug;
}
$link = bb_get_uri($custom_link . $page, null, $context);
} else {
if ( $rewrite === 'slugs' ) {
$column = 'topic_slug';
} else {
$column = 'topic_id';
}
$link = bb_get_uri('topic/' . $topic->$column . $page, null, $context);
}
} else {
$page = (1 < $page) ? $page : false;
$link = bb_get_uri('topic.php', array('id' => $topic->topic_id, 'page' => $page), $context);
}
return apply_filters( 'get_topic_link', $link, $topic->topic_id, $context );
}
Step 3:
Now we have to define the htaccess rules.
Open ‘.htaccess’ file in bbpress root folder, and add following two lines just above the code line – RewriteRule ^topic/?$ /forums/ [R=302,L,QSA].
RewriteRule ^(.+)/topic/(.+) /forums/topic.php?id=$2 [L,QSA]
RewriteRule ^forum/(.+)/(.+) /forums/forum/$2/ [L,QSA]
Here is how my URLs looks after making these modifications:
Forum URL: mysite.com/forums/forum/en/first-forum-in-english
Topic URL: mysite.com/forums/en/first-forum-in-english/topic/the-ipad-developers-challenge
- Open
-
AuthorSearch Results