Search Results for 'code'
-
AuthorSearch Results
-
December 21, 2006 at 3:17 pm #52760
In reply to: Determine topic’s status
ardentfrost
MemberThe function
topic_resolved()
echo’s back whether the topic is resolved, not resolved, or not a support question. You can even change what it echo’s by passing strings to the function.Otherwise you want the function
get_topic_resolved($id)
which will return yes, no, or mu (for it is resolved, it’s not resolved, or it’s not a support question).But if you don’t like that method, you can always get it straight from the database… it’s just more work for the server that way.
December 21, 2006 at 2:52 pm #52755In reply to: Use the possibilities of the WP plugins …
Trent Adams
MemberNot very had to write plugins if you are a coder and look at pluggable.php as it uses a similar structure as WordPress. Right out of the box, bbPress may never work straight away with WP plugins without a core change in code.
Trent
December 21, 2006 at 9:45 am #52623In reply to: Plugin aint working, what am I doing wrong
Null
MemberFixed it myself. It was the:
FROM $bbdb->portal"
that didn’t work. Changed it intoFROM ".$bb_table_prefix."portal"
and added $bb_table_prefix; in the global as well and all seems to work fine now.Working code:
$pforum_id = $bbdb->get_var("SELECT pforum_id FROM ".$bb_table_prefix."portal");
Thx for the suggestions given
Null
December 21, 2006 at 5:44 am #52731In reply to: Plugin – Memberlist *UPDATE*
ardentfrost
Membernaw, it’s ok. Spencer just gets the weirdest problems with stuff, but I still got it tested
December 21, 2006 at 4:14 am #49548In reply to: Plugins for WordPress integration
bakedlogdotcom
MemberI have successfully setup my site to integrate registrations/logins between wordpress on its own DB and domain (blog.bakedlog.com) and bbpress on its own DB and domain (forum.bakedlog.com).
Files:
WP: wp-content/plugins/bbpress-integration.php
BBP: my-plugins/wordpress-integration.php
- I can create a user in wordpress and log into bbpress with it.
- I can create a user in bbpress and log into wordpress with it.(although the default role set for wordpress does not let me write (how do i change this?))
However, I too cannot get cookies to authenticate between the two systems.
I have included the following in bbpress’s
config.php
:$bb->cookiedomain = 'bakedlog.com';
$bb->cookiepath = '/';
I monitored the cookies created on my computer as I logged into each system, and noticed that bbpress was creating the cookie correctly, domain: bakedlog.com, while when I logged into wordpress it would set the domain on the cookie to blog.bakedlog.com.
So the problem is with WordPress..
Looking in WordPress’
wp-settings.php
I see:if ( !defined('USER_COOKIE') )
define('USER_COOKIE', 'wordpressuser');
if ( !defined('PASS_COOKIE') )
define('PASS_COOKIE', 'wordpresspass');
if ( !defined('COOKIEPATH') )
define('COOKIEPATH', $current_site->path );
if ( !defined('SITECOOKIEPATH') )
define('SITECOOKIEPATH', $current_site->path );
if ( !defined('COOKIE_DOMAIN') )
define('COOKIE_DOMAIN', '.' . $current_site->domain);
So, in WordPress’
wp-config.php
I inserted:// BBPRESS INTEGRATION
define('COOKIE_DOMAIN', 'bakedlog.com');
Clearing my cookies and logging into WordPress, I see the cookie domain is correct and matches my BBPress’.
But, there is still another problem, the cookies set by BBPress appends an md5 hash based on the site url and table prefix to the cookie’s name (ie: wordpressuser_bf17f59023eb22f…..) while WordPress’ cookie name is only: wordpressuser
I looked around in
bb-settings.php
and found:define('BBHASH', $bb->wp_siteurl ? md5($bb->wp_siteurl) : md5($bb_table_prefix) );
if ( !isset( $bb->usercookie ) )
$bb->usercookie = ( $bb->wp_table_prefix ? 'wordpressuser_' : 'bb_user_' ) . BBHASH;
if ( !isset( $bb->passcookie ) )
$bb->passcookie = ( $bb->wp_table_prefix ? 'wordpresspass_' : 'bb_pass_' ) . BBHASH;
So, the next step is to define $bb->usercookie and $bb->passcookie in BBPress’
config.php
:// COOKIE SHARING WITH WORDPRESS
$bb->cookiedomain = 'bakedlog.com';
$bb->cookiepath = '/';
$bb->usercookie = 'wordpressuser';
$bb->passcookie = 'wordpresspass';
I cleared my cookies and tested it, VOILA! I can log into either section (bbpress or wordpress) and switch to the other without losing authentication!
==========SOLUTION===========
BBPRESS CONFIG.PHP:
// COOKIE SHARING WITH WORDPRESS
$bb->usercookie = 'wordpressuser';
$bb->passcookie = 'wordpresspass';
WORDPRESS WP-CONFIG.PHP:
// COOKIE SHARING WITH BBPRESS
define('COOKIE_DOMAIN', 'bakedlog.com');
==========********===========
Thats it I believe, let me know if it works for you or if you see anything I have done that could crash either program.
-BHensley.com
-Bakedlog.com
Trent Adams
MemberI would imagine that this will not occur in the core code. This is something that can be added through a plugin (as with image plugin) and will be worked on by members of this community as time progresses. It shouldn’t be too long for something like this to surface, but it will take a little time.
Trent
December 21, 2006 at 1:24 am #1132Topic: Use the possibilities of the WP plugins …
in forum Requests & FeedbackRod
Memberone question … I take simply …
I have several plugin about layout on my WP posts …
I can for example do this
[video]url-youtube-video[/video] … and I have a video with all the good code …
or …
[name-of-my-link->url-of-my-link] and my link has the good name … The question is … with integration, is it possible, by default, the forum has these possibilities ?
December 20, 2006 at 11:23 pm #51676In reply to: Plugin: Post Notification
chrishajer
ParticipantHi again. It appears the notification includes the name of the member who started the topic, not the last poster? All the notifications I’ve received have listed the member who started the topic.
I guess “By:” in the notification could mean the thread was started “by” or the reply was “by” – that part is ambiguous. Was this supposed to send the name of the last person who posted?
Seems like this will send the name of the member who started the topic:
$topic->topic_poster_name
Is there a way to see who the last comment was posted by to see if it’s worth logging on to see the comment?
vaelrith
MemberAre there any plans for integrating bb code instead of using the “Allowed markup” in posts? Or is there a way to make a plugin for this?
December 20, 2006 at 9:55 pm #52633In reply to: Plugin: [REL] Signature
ardentfrost
MemberThe thing is, they kinda F with each other. The way they’re implemented is they setup the profile keys seperately (via a filter). I need a way to figure out how to call the profile keys, return them and ADD one to it.
Anyone know how to do that? S010 maybe?
December 20, 2006 at 9:50 pm #52620In reply to: Plugin aint working, what am I doing wrong
Null
MemberAlready tried that (forgot to put it here too):
$pforum_id = $bbdb->get_var("SELECT pforum_id FROM $bbdb->portal");
But it doesn’t get the 1 out of the db. The query is good cause in phpMA it does return the 1. I get an error using this:
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 'ORDER BY topic_time DESC LIMIT 0,10' at line 1]
SELECT * FROM bb_topics WHERE forum_id = ORDER BY topic_time DESC LIMIT 0,10
As you can see, the 1 isn’t pulled/ used (WHERE forum_id = ?)
veb
MemberThis forum I am creating for a small indie game (www.toribash.com) and SMF just didnt cut it. Way too difficult to change core code, and to me, make new plugins!
This is a temporary link, seeing I’m not anywhere NEAR finnished. As you can see I am using the emotions plugin, avatar plugin, PM plugin and a few of my own.
http://veb.bounceme.net/bbpress/
Comments welcome
December 20, 2006 at 9:38 pm #52630In reply to: Plugin: [REL] Signature
veb
MemberI think combining them would do the job nicely, and even having it so you can have a small image as a signature too
December 20, 2006 at 6:57 pm #51675In reply to: Plugin: Post Notification
chrishajer
ParticipantI may have downloaded the wrong version. This is from the file notification_all.php
* Plugin URI: http://www.la-school.com/2006/bbpress-notification/
* Version: 1.1
Oops! “notification all” – haha
I will download the new version now, with the enhancement on the last poster’s name. Thanks a bunch. Merry Christmas.
December 20, 2006 at 6:38 pm #52273In reply to: Plugin – Private Messages
ardentfrost
MemberAnyone who is having trouble with the server please do this:
-open a command line and type
tracert www.rayd.org
-Copy the resulting text and email it to thansen@qualitytech.com
-If it starts timing out over and over, just press CTRL-C to stop the process, copy and send it on.
Due to spammers, sometimes a lot of the countries in the far east get blocked. Sending that tracert text will allow us make sure legitimate users are allowed through the firewalls.
Thanks!
December 20, 2006 at 5:54 pm #52329In reply to: A phpBB to bbPress database converter
implicated
MemberYour PHP version is rather old, use this:
if (!function_exists('file_put_contents')) {
function file_put_contents($filename, $content) {
if ($fp = fopen($filename, 'w')) {
$result = fwrite($fp, $content);
fclose($fp);
return $result;
}
else {
return false;
}
}
}
December 20, 2006 at 5:50 pm #51673In reply to: Plugin: Post Notification
chrishajer
ParticipantEnhancement request: could the notification include the name of the member who made the post?
So,
There is a new post on: POSTTITLE
By: MEMBERNAME
URL
December 20, 2006 at 4:42 pm #52572In reply to: New Template (4 download if u want)
weirdtherapy
MemberI should have made that sooner because it could have caused confusion. The Link in the first posting no longer shows the first template because I changed the template, cause of problems that coud happen with google.
That’s how the first one looks like:
http://www.weirdtherapy.com/images/borderline-green-01-shot.jpg
can some Mod change the link in the first posting pls?
I also added a note at the template that people should keep the policys in mind – I will try to make one that is more policy friendly
December 20, 2006 at 4:06 pm #52629In reply to: Plugin: [REL] Signature
ardentfrost
MemberAlright veb, it’s updated… so make your change
Although it MIGHT mess you up a little because I think your plugin will have to be added into mine when Avatar is used (open the new bb-avatar.php file and you’ll see why). Plus, with the new release of Avatar, if people do Signature the way you describe, it won’t work.
I don’t know, what do you think? Maybe we should just combine the two, or have multiple releases. I don’t know how people are going to want to implement.
December 20, 2006 at 2:31 pm #52628In reply to: Plugin: [REL] Signature
ardentfrost
MemberGlad you used my code as a base
I will be updating my Avatar code very soon so that functions.php no longer has to be changed. I’ll expect you to update this when I finish
December 20, 2006 at 1:30 pm #52702In reply to: Instead of bridging the forum …
thomasklaiber
MemberI think this would be an idea for later versions (around 1.0 or so) … very nice idea
December 20, 2006 at 12:56 pm #52270In reply to: Plugin – Private Messages
nekketsu
MemberTable creation is automatic. It should install if you navigate to your domain/pm.php or put the message code on your front page.
Not automatic for me
December 20, 2006 at 12:51 pm #52619In reply to: Plugin aint working, what am I doing wrong
thomasklaiber
MemberYou want to read out the two single vars from the db, am I right?
So I suggest using
$variable = $bbdb->get_var("SELECT...");
.December 20, 2006 at 5:41 am #52269In reply to: Plugin – Private Messages
drtech
ParticipantI also had to hard code message.php for it to work.
<– “if (wp_knu_)
$touser = $bbdb->get_row(“SELECT * FROM “.wp_knu_.”users WHERE ID = $toid”);
else
$touser = $bbdb->get_row(“SELECT * FROM “.bb_knu_.”users WHERE ID = $toid”);
pm_user_form( $touser, ” );
exit;”–>
December 20, 2006 at 5:25 am #52267In reply to: Plugin – Private Messages
Trent Adams
Membermessage.php is the main one. That is where you would hardcode it.
Trent
-
AuthorSearch Results