Search Results for 'code'
-
AuthorSearch Results
-
January 29, 2010 at 8:08 pm #83838
In reply to: Create bbPress Thread from WordPress Post using RSS
paulhawke
MemberThere are plenty of 3rd party libraries that deal with the feed reading. Thus far I have a working admin screen that relies on AJAX services to validate a given feed URL. Combination of a GOOD rss library on the backend, and the
encode_json()method from PHP means I’m golden for right now.Milestone 1 of the plugin is complete – administration page to handle a single feed. Milestone 2 is starting – using that data to actually monitor the single feed. When Milestone 2 is completed I’ll grab a couple of people to beta test.
paamayim
MemberOk I found the problem.
“bbCode lite” is NOT working while “bbpress SEO tools” is activated. Those plugins are not compatible each other.
January 29, 2010 at 6:55 am #84430In reply to: Misty Morning Theme
Michael
Participanthttp://www.refueled.net/misty-morning/
Google is your friend.
January 29, 2010 at 12:42 am #76946In reply to: Display a list of recent topics
kevinjohngallagher
MemberExactly, so just take 1 away from the total posts and that leaves you with how many replies there are

$number_of_posts = int $result->topic_post;
$number_of_replies = $number_of_posts – 1;
January 28, 2010 at 5:32 pm #84411In reply to: Can't connect to Database
Gautam
MemberMake sure all files (especially
bb-includes&bb-includes/backpressfiles) are uploaded.January 28, 2010 at 5:29 pm #84382In reply to: @ links (mentions)
Gautam
MemberThe code you wrote would make the script echo all the usernames in the source code. Think if there are hundreds of usernames or a user database like that of wordpress, which has thousands of usernames, will you echo all of them? And try to match each of that with javascript!?
January 28, 2010 at 1:56 pm #84379In reply to: @ links (mentions)
Gautam
MemberI am using javascript to only generate the
@<user-link><user-name>in the post textbox when the user clicks the reply link below each post.January 28, 2010 at 1:32 pm #76944In reply to: Display a list of recent topics
kevinjohngallagher
MemberHey Kevin,
I tried your code, it’s not working.
which bit mate?
Also you’ve nit asked fir how many replies, you’ve asked for how many posts (which will included the original), so just take 1 away from the number Nd you get how many replies there are
January 28, 2010 at 7:52 am #84396In reply to: New: Smilie Pack for 'bbPress Smilies'
Michael
ParticipantI found the smilies here: http://pinvoke.com/
They seem to be a remake of the default WordPress ones – the others were just from all over the web. I plan to make my own set one day, once I have more experience in Icon Design.
Glad you like the compilation.
January 28, 2010 at 6:54 am #76943In reply to: Display a list of recent topics
Navin
MemberHey Kevin,
I tried your code, it’s not working.
@ everyone:
I added this piece of code
(".$result->topic_posts.")to show the number of replies on each topic, so now the code is like this:<div id="recentetopics">
<h2>Recente topics</h2>
<ul>
<?php
global $bbdb;
$query="SELECT * FROM bb_topics WHERE topic_status=0 ORDER BY topic_start_time DESC LIMIT 10";
$results=$bbdb->get_results($query);
foreach ($results as $result) {
echo "<li>".date( strtotime( $result->topic_start_time ) < floor( current_time( 'timestamp' ) / 86400 ) * 86400 ? 'd M' : 'H.i', bb_offset_time( strtotime( $result->topic_start_time ) ) )." → <a href='/topic.php?id=".$result->topic_id."'>".$result->topic_title."</a> (".$result->topic_posts.")</li>";
}
?>
</ul>
</div>The output is like this:
19.11 → Dark Mirror Ov Tragedy - The Pregnant Of Despair (2009) (4)
19.00 → Rammstein - Live In Muenchen (2009) (2)
18.54 → Mnemic - Sons Of The System (2010) (1)
26 Jan → Aanraders? (2)
25 Jan → Duitse band Scorpions stopt (2)I notice that topics that don’t have any replies yet, it shows the number 1 as the number of replies. It should show zero actually.
Whadya you guys think?
January 28, 2010 at 5:31 am #84394In reply to: New: Smilie Pack for 'bbPress Smilies'
Michael
ParticipantYou’re welcome.
January 27, 2010 at 11:44 pm #84119In reply to: Convert Woltlab Burning Board to bbPress
Thomaschaaf
MemberThanks a lot! I will look into it and if I do write a converter I will post it here

Thomas
January 27, 2010 at 8:32 pm #32945pv4
MemberHi!
I was trying to integrate a bbpress-1.0.2 forum with my existing WP installation and I found a funny bug.
If I open a topic and use the interface right to the title to add a russian-language tag, only the first half of a tag is actually added.
If I try to add a tag “mama” (written in russian, of course. I write here in english just for the english speaking people being able to read the post) only the first half of a tag (“ma”) is actually added. It happens everytime I add a tag with an even number of letters (2, 4, 6, etc). Tags with an odd number of letters are added correctly.
BTW every russian letter in UTF-8 is encoded using exactly two bytes.
Unfortunatelly, I don’t fully understand what the code does and the below is just my guess.
I guess the problem is in file /bb-includes/functions.bb-formatting.php either in function seems_utf8() or in bb_utf8_cut().
Traditionally, strlen() returned 8 for utf-8-encoded “mama”. In such case bb_utf8_cut() would work correct (althought I haven’t actually checked). But if one use php.ini mbstring.func_overload option to overload str* functions by mb_str* ones, then strlen(“mama”) returns 4 and bb_utf8_cut() thinks this’s is non-utf-8-encoded string length and assumes that the “actual” string length would be 2. That’s wrong.
So, my general suggestions is to fix somehow one of those functions to work correctly with mbstring.func_overload both set and unset.
The quick-fix for people having the option set is to add the following line at the very start of bb_utf8_cut() function:
return $utf8_string;1. Am I correct or should I search for the problem in another piece of the system?
2. Would this “fix” break anything else?
January 27, 2010 at 5:56 pm #84402In reply to: First site using BBpress and WordPress
Michael
ParticipantYou’ve done a decent job with creating the bbPress theme to match your WordPress theme – now you should take a browse through the plugin gallery and make it look better.
I highly recommend bbCumulus, bbPress Topic Icons, Allow Images, Project Honey Pot (for Spam protection), and MyViews. Someone might highlight some other important ones – those are all I can think of at the moment.
January 27, 2010 at 4:40 pm #84373In reply to: @ links (mentions)
Michael
ParticipantThere is no absolute solution for the space problem. Already, almost all sites don’t accept it (space in username), so almost all the people on net prefer taking usernames without spaces. Even if I put the code to match the spaces, then it might overload the server with so many requests.
Update: I don’t prefer exploding the text with @ and space, that would have a huge long process…
There is no necessity for spaces.
+1. Most people don’t do it anyway. They think,”username” and then automatically assume that there should be no spaces. As small as my forum is, there are no members that have spaces in their usernames (except me, however I changed it to use my display name).
Now, is the process for finding spaces really that long, or long enough to make the server load heavy?
January 27, 2010 at 4:23 pm #84371In reply to: @ links (mentions)
Gautam
MemberReplying to kevinjohngallagher’s post (which again went in spam):
Let me put it this way, and outside of your plugin (which is excellent), why would someone need a link to a profile page from inside MY post, when there is a link to it one post up on your post. It serves, very little actual purpose. Anyway, that’s my PM/BA head coming out again, and that’s not liked here. Sorry.
When Michael R said he was looking for something “like Twitter”. In this instance, it looks like twitter but acts differently (because on twitter your profile page is also the page you posted on). That’s just going to confuse the users, as the “@bob” was invented to allow people to follow conversations back the way.
1) There is a space in the display name of Michael R, not the username – it is michael888 (though it doesnt mean that a bb username cant have spaces)
2) I have already said that a single user can post multiple posts, so there is nothing that this plugin can interfere in. (Or you give a solution, if you have one)
It has the potential to be a massive overhead. Again, highly unlikely, but what if someone added a spam post with just hundreds of “@bob a a @bob a b @bob a c”. I know its small stuff, but that’s 9sql queries right there. We’re really opening up the potential for someone to make a single post take 100s of SQL queries.
There is no absolute solution for the space problem. Already, almost all sites don’t accept it (space in username), so almost all the people on net prefer taking usernames without spaces. Even if I put the code to match the spaces, then it might overload the server with so many requests.
Update: I don’t prefer exploding the text with @ and space, that would have a huge long process…
There is no necessity for spaces.
January 27, 2010 at 4:01 pm #84369In reply to: @ links (mentions)
Michael
ParticipantGautam, this looks great. Can’t wait to try it out.

That can’t be helped. The plugin first checks if that username exists, if not, then checks if that nicename exists. This will be also mentioned on the plugin page.
Is there no way to test as far as three spaces in (until it finds a username)?
January 27, 2010 at 2:50 pm #84367In reply to: @ links (mentions)
Gautam
MemberReplying to kevinjohngallagher’s post (maybe its in spam, but I got an email notification as I am subscribed to topic):
1) Making “@” links is cool, and very “twitter generation”, even if its not something that’s totally globalised yet. But the “@” link is not pointing at what you’re replying to. We’re faking the functionality without the reasoning, which in the end will just confuse users.
On Twitter, you post on your profile page. People read it on their feed, and reply on their own Profile page. So a link to “@kev” goes to the page where “kev” has written his post. That’s the point of it, to link to someone’s post.
Here, we’re making the link “@kev” go to “/profiles/kev/” for the user to not see the post. That’s exactly the opposite of the purpose of the “‘@” linking system

–> That’s basically the work of a reply plugin, not of a mentioning plugin. I also have future plans with the plugin like linking
#tag, etc. Even if I do something like that which you have mentioned, then a single user can make multiple posts, then which post will the plugin link to?2) The other issue is that Twitter names don’t have spaces, while BBpress / wordpress names can. So if i write “@Michael R Thanks for your reply”, how does the plugin know where the username ends? What if it finds a “michael” in the usertable, it will then link “@Michael” to “/profiles/michael/” and the message will read “R Thanks for your reply”. In Twitter, it parses at the first space; but we can’t do that here.
Oh that will also involve looping through queries until you find a match, so first for Michael, then for Michael R, then for Michael R Thanks etc. Ofcourse there could/should be a word/search limit – either way there is huge potential for database issues there. Imagine adding up to 5 sql searches, per “@” per post, per page load.
The initial solution, and i suppose this is for Gautam, is to make a search of the user table for all users who have posted on the topic being replied to, which should narrow it down considerably, though it should be noted that if you have “Michael” and “Michael R”, or any similar naming issues, the plugin will not know that…
–> That can’t be helped. The plugin first checks if that username exists, if not, then checks if that nicename exists. This will be also mentioned on the plugin page.
3) You are effectively allowing a user to search your database for anything you put after your “@” symbol. Now this one is a little bit of scaremongering, but we’ve all seen bad coding before. What if I write “@drop table wp_usermeta hi bob, how much fun would this be
“. There is a reason that we try to make sure we don’t take database queries from the user.–> 1) This is what is used to match the username – /[@]+([A-Za-z0-9-_]+)/, so there is no point of mysql commands going in there.
If you want to test the plugin (how it works), you are free to use this as sandbox – http://forum.gaut.am/
I have made some posts to test the plugin here.
January 27, 2010 at 2:05 pm #84364In reply to: @ links (mentions)
Michael
ParticipantNice
January 27, 2010 at 2:03 pm #78849In reply to: Loading bbpress after codeigniter
tobefound
MemberDid you get things working? Me too interested in getting a simple and clean forum working with an existing login system on codeigniter.
/T
January 27, 2010 at 1:53 pm #84362In reply to: @ links (mentions)
Michael
ParticipantGreat – thanks Gautam. Looking forward to it.
(Are you maybe calling it bbMentions?
)
January 27, 2010 at 11:58 am #84358In reply to: @ links (mentions)
kevinjohngallagher
MemberBBprogress had two versions of this one mate, they should still be kicking around somewhere. The first one used Ajax to convert the links (it pinged a search page for @username).
That said… My issue with it at the time is my issue with what you’re trying to achieve as well. 9/10 when someone is typing “@Michael R” they are replying to a post above. To that end, the “@Michael R” should link to that post, not to the person’s profile page. What you effectively need is a “reply to” button as well as a “quote” button that pre populates the “@Michael R” information.
Writing that functionality isn’t a problem (check out the quote plugin), but rather that there is no hook in BBpress that doesn’t hardcode output from the core to the bottom of each post. Not only would you need a plugin, but you’d also need a theme with additional hooks/function calls.
Its definitely doable though, once yu have defined exactly what it is you’re after/the need is for it
January 27, 2010 at 7:04 am #84357In reply to: @ links (mentions)
Michael
ParticipantRight, I have looked at the Easy Twitter Links plugin, but I’m not sure how to alter it to run through the post. I’d probably have some idea if I managed to find the code BuddyPress uses. I wish I could grep the folder, but I don’t have Linux…
January 27, 2010 at 6:31 am #84356In reply to: @ links (mentions)
Michael
Participant@OKTeaRoom – I will have a look at that – though I’d also need to find out how to check for member existance.
@etiviti – Thanks, I’ll download it and run through the code. I’m sure it’ll be easy to make the plugin.
January 27, 2010 at 5:31 am #83770In reply to: no WP backend interface
rohanduggan
MemberSounds cool, thanks for the info. Sorry for the redundant post in that case… I thought somebody had just not updated the message assuming (and we know what they say about assumptions:)) that if the plug in was searchable via WP backend with an install button that it might be installable. My enthusiasm (desperation) for a decent BB for WP got the better of me
-
AuthorSearch Results