Search Results for 'code'
-
AuthorSearch Results
-
March 6, 2007 at 6:07 am #55275
In reply to: Plugin help…
macwise
MemberAhem, Trent…this means you too.
March 6, 2007 at 5:00 am #55273In reply to: Plugin help…
ardentfrost
MemberHonestly all I did to learn was download existing plugins (there weren’t many when I started writing them, so you’re at an advantage there) and check out how certain things were performed… I also used windows search to look through the files of bbpress to see how things were done.
Once you see how it is done currently (or how similar functions work), then you can start writing your own subroutines to either intercept, replace, or just create new functions that can be installed into the themes.
Unfortunately, I don’t know much about dealing with WP. I never wrote anything for WP, and the plugins of mine that play nice with WP only do so because people like Trent and spencer helped me test them.
But if you ask specific questions, there are a number of us here who can help you if we know what you’re asking
March 6, 2007 at 12:34 am #53184In reply to: No Login with IE6
macwise
MemberYou can click in the form element if you click within 1 px of the top of the element. It’s being blocked/covered by something. I haven’t looked too closely, but I’m pretty sure the problem is that your
<label>tags are encapsulating your input elements. They should be before the form element, like this:<label>Username:</label>
<input "input stuff" />Yours is like this:
<label>Username:
<input "input stuff" />
</label>Try that and see if that helps.
-Ron
March 6, 2007 at 12:28 am #55272In reply to: Plugin help…
mirce
MemberI had the same problem. Its not very hard to do it. You need to use add_action or add_filter. See my problem here https://bbpress.org/forums/topic/742
This may help also:
https://codex.wordpress.org/Plugin_API#Current_Hooks_For_actions
I have no experience also but I managed to do a plugin.
Good luck!
March 6, 2007 at 12:10 am #1521Topic: Plugin help…
in forum Troubleshootingmacwise
MemberI’m interested in creating my fist plugin. I would like it to allow the user to see/edit the extra profile fields that are present in WordPress when a site has WP integration working. I’m asking for any help to get started on this that someone is willing to offer.
I’m not very experienced with PHP, though I feel I am a pretty quick learner. I have too many questions right now from the reading (http://codex.wordpress.org/Writing_a_Plugin) and from looking at other plugins. I don’t think these questions require more than a few simple pointers and explanations about the structure/basic principles of plugins.
Is anyone out there willing to throw me a bone or two?
March 5, 2007 at 11:13 pm #55243In reply to: Check if a user is logged in?
Trent Adams
MemberI am personally tired of having information up to Bozo’s, so I like to use:
<?php if (bb_current_user_can('write_posts')) : ?>
DO SOMETHING
<?php endif; ?>That way, the users who are members see the content and spammers cannot! (At least I think not….not going to mark myself as BOZO to find out)
Trent
March 5, 2007 at 11:02 pm #55261In reply to: Spaces in Login
macwise
MemberNP. Glad I could beat you for once.
March 5, 2007 at 10:58 pm #54676In reply to: Import SMF to bbPress
Stretsh
MemberThis code is written for PHP5. It works perfectly.
PHP4 users will need an extra piece of code, however, because the function file_put_contents does not come with PHP4.
So copy this piece of code and paste it on the bottom of the php file, but before the ?> tag
if (!function_exists('file_put_contents')) {
function file_put_contents($file, $contents = '', $method = 'a+') {
$file_handle = fopen($file, $method);
fwrite($file_handle, $contents);
fclose($file_handle);
return true;
}
}March 5, 2007 at 10:27 pm #55241In reply to: Check if a user is logged in?
macwise
MemberIn regards to Mirce’s solution, I would think a more global (and simpler) solution would be this if statement:
<?php if ( bb_is_user_logged_in() ) { ?>;
--PUT WHATEVER YOU WANT THEM TO SEE HERE--
<?php } ? >This way you don’t need to find out WHO the user is (user_id), but simply whether or not they’re logged in.
I’m pretty new to this, though, so maybe Mirce knows something I don’t?
March 5, 2007 at 10:07 pm #55237In reply to: Help with mod rewrite
mirce
MemberI really do not understand,
http://www.dfur.com/designer_furniture/page/2 redirects 301 to http://www.dfur.com/designer_furniture.
Why is this? I have no 301 in htaccess!!! Is this a bbPress thing?
URL=http://www.dfur.com/designer_furniture/page/2
Result code: 301 (MovedPermanently / Moved Permanently)
March 5, 2007 at 9:31 pm #55177In reply to: bbpress v. other forum software
spencerp
MemberI wouldn’t really expect this Forum Category hack/enhancement to last too much longer though… Read from here down:
https://bbpress.org/forums/topic/698/page/2?replies=39#post-5087
spencerp
/Currently running Trunk 1.0-alpha, and the Forum Cat hack just doesn’t play nice with it. Also, like it says there, sounds like something similar is being implemented into core. I don’t know for positive, but, I uninstalled the Forum Cat hack though..
March 5, 2007 at 6:19 pm #55138In reply to: User Registration time +8 hours (GMT)?
macwise
Memberchrishajer,
Your assessment is correct on all counts. I’m even using the same setup you’re using. (bb .80 and wp integration). As for the GMT, I guess I was just expecting the correct time to be calculated on the memberlist page as well, since it’s implemented everywhere else. Isn’t that what makes the most sense? Maybe I’m missing something.
My problem is minor, and only arises (so far) when I’m using shell to scan through my server logs, and the time on the logs is adjusted for my timezone but the time on the memberlist page doesn’t match up. Just gotta do math, which is less favorable in my case.
March 5, 2007 at 5:55 pm #55220In reply to: Titles for topic replies?
macwise
Memberfel64,
When you mention the “Hooks”, are you referring to the lines at the bottom that say “add_filter”? I think this is what you mean, but I thought I’d make sure. It’s time to try out my first plugin!
March 5, 2007 at 5:01 pm #55219In reply to: Titles for topic replies?
fel64
MemberYou should use hooks to make it automatically call your function when that hook is called – the syntax is something like
add_action('hook name', 'function name')if I recall correctly. Look at existing plugins for details of how to do it.There isn’t a reference for hooks that I’m aware of, sorry.
March 5, 2007 at 10:37 am #55146In reply to: style-rtl.css problem in 0.81 with IE
talgalili
MemberThanks fel64 for the reply

I also don’t know what to do

Any one else, has any suggestion ?
(did anyone else encounter the same problem ?)
Tal.
March 5, 2007 at 9:58 am #51976In reply to: Latest bbPress Posts In WordPress
Atsutane
MemberYeah. Request already
waiting for approval.
March 5, 2007 at 8:05 am #55137In reply to: User Registration time +8 hours (GMT)?
chrishajer
ParticipantI haven’t looked at the code, but my guess is that since the dates are stored in the DB as GMT, and the time functions display times as “time elapsed since” that this is expected. Where are you seeing the actual times displayed?
I just registered a new user. I get “Member since: March 5, 2007 (7 minutes)” and “user [profile] registered 7 minutes ago” in the profile page and the admin page respectively. The memberlist plugin shows the time as the time on the server: 03/05/07 at 02:52:44 AM (when it was actually 1:52 AM where I am.) In the database, it’s stored as 2007-03-05 07:52:44
Where are you seeing the GMT and what functions does it affect?
Also, I am using .80 with WP integration (for users anyway) and not using any plugins for the user timezone or anything like that. How about you?
March 4, 2007 at 9:38 pm #55189In reply to: Cookie Hell: WPMU + BBPress = bloodshot eye balls
tseven
MemberI fixed it! o/
Remember how the cookies “looked” identical?
Well they weren’t.
The cookies created by bbpress added the hash to the end of the cookie name.
Both Safari and Camino didn’t reveal this, but Flock did. I was using these other browsers as a testing platform because I needed to clear cookies in between each test.
I added:
$bb->usercookie = 'wordpressuser';
$bb->passcookie = 'wordpresspass';To my bbpress config to solve the problem. (which I found on one of the links you sent me)
I actually like the idea of the cookie name including the hash. Isn’t this more secure? Correct me if I’m wrong, but wouldn’t this make it near impossible for another site to read that cookie?
Thanks for your help Trent!
March 4, 2007 at 6:26 pm #54280In reply to: Patch: Categories for version 0.8
spencerp
MemberOh ok, sounds simple enough for me. I’ll handle that later on then… Thanks Sam.

spencerp
March 4, 2007 at 3:53 pm #55193Trent Adams
MemberYou can define the parameters like the cookie name and domain, so you should be able to do what you want here. There is already functions though that can do things if a user is logged in. For example:
<?php if (bb_current_user_can('write_posts')) : ?>
DO SOMETHING
<?php endif; ?>This has it so if the user is logged in and can write posts (default member) then do something or put in a piece of code.
Hope that helps.
Trent
March 4, 2007 at 3:32 pm #51975In reply to: Latest bbPress Posts In WordPress
Trent Adams
MemberThat would be great if you could do that Atsutane as it allows you to have the ‘working’ code up and the ‘work in progress’ code as well! Just a thought!
Trent
March 4, 2007 at 3:26 pm #55186In reply to: Cookie Hell: WPMU + BBPress = bloodshot eye balls
Trent Adams
MemberSteven,
I not sure of the ‘exact’ best procedure of combining bbPress and WPMU, but these are some users that have it going:
https://codex.wordpress.org/Ergate/wpmu_bbPress_integration
https://mu.wordpress.org/forums/topic.php?id=2166&replies=10
It is a little different with WPMU as the table structures are a little different, but those posts seem to most likely have the key. Integrating with normal WP is much easier.
Trent
March 4, 2007 at 2:15 pm #54921In reply to: SVN procedure for checking out bbPress?
chrishajer
ParticipantYou can have two developers (macwise and bbPress core team) working on the same code in different places. I think svn is smart enough to figure it out when you commit and svn up.
March 4, 2007 at 10:43 am #1512Null
MemberHi,
Watching the TRAC, I’m seeing some new drag and drop functions for ordering the forums. Is this true? Cause I was working on a plugin to do this based on my bbmenu plugin. If this is true, I can stop devloping this, so let me know
March 4, 2007 at 10:27 am #55171In reply to: bbpress v. other forum software
Null
MemberI suggest to SEARCH these forums first, cause your questions are answered many times before. I also suggest to look at the documentation and plugins available on this site
-
AuthorSearch Results