Search Results for 'code'
-
AuthorSearch Results
-
September 6, 2007 at 10:52 pm #60497
In reply to: Unread Topics
henrybb
MemberDamn!
There’s no filter for get_thread()!

Is there any design decision behind not allowing people to hook into that?
As I said, for a full page of posts (30), I’m updating my readlog 30 times, when all I really need to do is get things upstream at the get_topic() and just take the last dimension of the array and make that the last read post in that given topic for the user.
It’d save 29 SQL updates per pageload in busy topics.
So until there’s a hook there, or an epiphany for another spot I could hook into, Unread Topics 0.4 stands as the best I can do solution for indicating what the user has read so far.
September 6, 2007 at 8:58 pm #60533ganzua
MemberThanks for the explanation, do you have to put && insted of ||
“By the way, the backtick ` that indicates code is on the top left button on most English and European characters.
“-> sorry for that because I have it quite difficult, I’m using a german keyboard and OS is in Spanish
September 6, 2007 at 8:11 pm #60532fel64
MemberNo problem.

Option #3 was a throwaway possibility, not really meant for actual use as it’s rather silly.
whatever && !is_bbpress()means, literally, thatwhateverhas to be true AND is_bbpress() is not true. The!operator inverts the boolean meaning, so true becomes false and vice versa. If is_bbpress() is true,!makes it read as false. If false, it makes it read as true.By the way, the backtick ` that indicates code is on the top left button on most English and European characters.
September 6, 2007 at 6:12 pm #60528ganzua
MemberThanks again fel64,
I tried the second one because it seemed the easiest to me
and I think it is working ok. This -> ‘ && !is_bbpress() ‘ means “exclude bbpress”, doesn’t it?
The first one, ” elseif “, is quite interesting -> in my wp custom theme, I turned index.php into a cms which displays what’s new in the whole web, and I created a static page called “blog” to display the “blog” itself.
Well, with this configuration, whenever you make a is_home statement , the function points to the static page I created and called “blog” and I can’t find the way to make the function to point to my custom index.php main page. Perhaps because the static page I called “blog” has the loop?
September 6, 2007 at 4:58 pm #60561chrishajer
ParticipantQuick Google turned up this:
“Fatal error: Trying to clone an uncloneable object of class mysqli – If this error occurs you must turn off the zend.ze1_compatibility_mode setting in your PHP configuration.”
ini_set('zend.ze1_compatibility_mode', 0);September 6, 2007 at 4:51 pm #60527fel64
MemberActually the function works just fine, you’re just expecting it to work differently. Try using different flow control or rewriting your logic.
if( blah_is_true() ) {
} elseif( foo_is_true() ) {
} elseif( third_thing_is_true() ) {
} else {
// default
}The elseifs mean that if a previous if statement was true, none of the successive ones will be tried. That way, if it is bb, it won’t even check if it’s single or a page.
Alternatively,
if( ( is_single() || is_page() ) && !is_bbpress() ) {
}will work just fine.
If you’ve integrated bb into wp that way, of course some of the WP template tags will work that way. If you wanted everything else to return false when you loaded bb, you’d have to do this:
function adjust_flags_to_bb() {
global $wp_query;
$wp_query->init_query_flags();
}
add_action('bb_init', 'adjust_flags_to_bb', 999);
//not sure if that's the right action, but mehbut that’s really quite unnecessary.
September 6, 2007 at 4:12 pm #60526ganzua
Member“What’s the actual problem? How are you using it, what do you expect it to do, what exactly is it doing?”
->
In my wp-bb integration, bbpress is integrated in wordpress and the forum uses the wordpress sidebar. I want to insert advertising blocks in the free space that I have in the bottom of the sidebar.
I’m trying to use wp conditional tags to display different ad blocks because in some pages I have space enough for one block, and in other pages I have space for two or three blocks.
In wp single pages I can display at least two 120×600 blocks so I’m using is_single() but I realized that these blocks are appearing in the bbpress forum too! and I just have no space enough for them so I want to change them for a 125×125 block when the forum is displayed or perhaps I could remove all ads when bbpress displayed.
So “How are you using it” -> after copy/pasting your function in my theme functions file, I inserted this code in my sidebar;
‘
<?php if (is_bbpress()
|| is_archive()
) { ?>
<!– 125×125 block –>
…
…
<?php } ?>
<?php if (is_single()
|| is_page()
) { ?>
<!– 160×600 block –>
…
…
<?php } ?>
‘
“what do you expect it to do” -> showing different ads blocks in the sidebar when bbpress displayed
“what exactly is it doing” -> is showing the blocks I set for is_single ()
September 6, 2007 at 4:07 pm #60552kjted
MemberYeah that’s right. It was long process. I worked on the backend while my colleague did all the Flash wizardry. I’ll do a full writeup as soon as I have permission
September 6, 2007 at 3:43 pm #2369airdrawndagger
MemberWhat’s going on?

http://www.doublepeace.se/forum/
Fatal error: Trying to clone an uncloneable object of class mysqli in /home/virtual/doublepeace.se/public_html/forum/bb-includes/db-mysqli.php on line 71
Any help? I have no clue what’s going on!
September 6, 2007 at 3:29 pm #60551fel64
MemberYou’re the one that asked about BB_Query a while back to achieve this, right?
Looks good, nice concept. My only problem is that it feels unresponsive when you select a star.What all did you have to do to achieve this? If you could write up and post here or somewhere your general method, problems maybe and so on, that’d be great for other people that might want to do this.
September 6, 2007 at 2:48 pm #60543In reply to: Error while posting
chrishajer
ParticipantI wonder why the ‘ character is fine here, but not on your forum? Definitely a good one
September 6, 2007 at 1:50 pm #60542In reply to: Error while posting
jazia
Memberthat’s the problem, the error appears while posting something with an ‘ character!

the error is:
bbPress database error: [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 ‘fgdfh
‘,’2007-09-06 13:50:29’, ‘217.220.0.158’, ‘0’, 3)’ at line 4]
INSERT INTO bb_posts (forum_id, topic_id, poster_id, post_text, post_time, poster_ip, post_status, post_position) VALUES (‘1′, ’21’, ‘1’, ‘
hgjh ‘fgdfh
‘,’2007-09-06 13:50:29’, ‘217.220.0.158’, ‘0’, 3)
Warning: Cannot modify header information – headers already sent by (output started at /misc/15/359/013/341/user/web/disinformati.org/wp-forum/bb-includes/db-mysqli.php:158) in /misc/15/359/013/341/user/web/disinformati.org/wp-forum/bb-includes/pluggable.php on line 168
September 6, 2007 at 5:52 am #55930In reply to: Show off your Forum !!
benbeltran
Memberhttp://temporadadepatos.net/foros/
I use a lot of Plugins, some I’ve edited myself. I haven’t checked for new versions in some time, so I may be out of date :p.
* Upload Avatar Plugin
* Allow Images
* Signature Plugin (edited to allow images)
* Quote (edited to display who you’re quoting)
* BB Emoticons (with tango emoticons)
* Fix Auto-Close
* No ?replies
* Front Page Topics
* BBCode for BBPress (We encourage use of regular markup, but we have this option available to our users).
* Comment Quicktags
* Show Post Count
* Fix BBpress
* Online List
* Page Links
* Indicate New Posts
* BBPress Private Messaging
* TDP Badges (A custom plugin I made to give out badges to our users depending on their taste in games and their accomplishments).
I hacked some code to allow a color changing tag-cloud. I guess that’s it.
September 6, 2007 at 3:35 am #56918In reply to: Fix or remove bozo function before it kills bbPress
M
MemberI lost my marbles somewhere along the way.
I did make one change to the forums – added smilies. Every bozo I’ve got now was using smilies.
September 6, 2007 at 12:37 am #60496In reply to: Unread Topics
henrybb
MemberSamBauers: Hmm ?
The current implementation has one row per user per topic as it is. Instead of using something like time, I use the topic_last_post_id from the topics table. Then I have a table which essentially is user_id | topic_id | post_read. Which contains the very last post in a topic the user has read.
The implementation is far from perfect, the code that updates the table is getting run each time a post is rendered. Which means 29 useless sql updates per page.
I just need to get some time to look at the code to find another way. But as it is, it works.
I suppose I’ll be more involved, as there are some features I need to make for myself. I see no reason not to share the work.
September 5, 2007 at 11:18 pm #60512In reply to: after integration -> some problems!
fel64
MemberKein Problem, kann ich lesen.

I think that problem with the feeds is easily fixable. Look for spaces before and after <?php and ?>, and possibly check if this works for you otherwise (you may have to look for a similar mistake in bb rather than in wp).
September 5, 2007 at 11:01 pm #60495In reply to: Unread Topics
Sam Bauers
ParticipantYou should consider just tracking what the last time was each user viewed a topic. That will reduce the number of entries in your table to a maximum of one entry for each user on each topic, rather than one entry for each user on each post.
As for the delay in getting plugin “approval”, you aren’t alone. I’ve waited a while at times and had to poke for it to get done, approval is less about the question of “is your code good enough” and more about weeding out spam/bozos etc. Also, from what I understand mdawaffe is pretty much the only developer doing significant work on bbPress at Automattic and he has other responsibilities there as well (including maintaining the WordPress plugin browser).
The community here is growing, but small, and the few people who are regular contributors to this forum are really quite helpful, enthusiastic and generally pretty knowledgeable. I hope you feel more welcome as you get to know us and become more involved.
September 5, 2007 at 8:41 pm #55745In reply to: Anonymous posting
bbpressfriend
MemberJust set the Post_status to “1” if the poster is anonymous and check your ACP daily
(sorry for my bad english)
September 5, 2007 at 8:11 pm #60494In reply to: Unread Topics
henrybb
MemberHey.
I asked my friend Steinn to have a look at the code with a fresh pair of eyes, cause he’s more of a php coder than me. He simplified the thing quite a bit as per your ideas.
I then changed it to use the bb_dbDelta() function following the instructions from that link you gave me. So now I have version 0.4.
I hope someone can test it for me.
September 5, 2007 at 7:25 pm #60523fel64
MemberMight have asked what you wanted straight away.
So open your theme’s functions.php and add this:function is_bbpress() {
global $bb;
return $bb ? true : false;
}Off the top of my head, but should work anyway. Try it.
September 5, 2007 at 5:04 pm #2361ganzua
MemberIn wordpress you can use conditional tags -> http://codex.wordpress.org/Conditional_Tags to display different content according to the page that is being displayed.
Well, after having wp and bb integrated and displaying wp sidebar in bbpress, is it possible to define conditional tags for bbpress or bbpress folders?
lenen
MemberThe FAQ was really helpful for me. Just like Nitallica, I always try to figure it out by myself first
September 5, 2007 at 11:18 am #60126In reply to: Certain users posts not showing up
airdrawndagger
MemberOk, I found it!
Hah. It was in Akismet. They were marked as spam. But where do I go from here? I don’t want to disable Akisment and get overrun by real spam!
September 5, 2007 at 11:08 am #56915In reply to: Fix or remove bozo function before it kills bbPress
airdrawndagger
MemberYou can also alternatively get rid of it all together just by taking this line out of bb-settings.php:
require( BBPATH . BBINC . 'bozo.php');
&&
require( BBPATH . BBINC . 'akismet.php');
YMMV.Why would I need to take out the akismet.php as well?
September 5, 2007 at 4:21 am #60507In reply to: tr td .num font size?
chrishajer
ParticipantIn your theme’s style.css (or the default theme style.css) you want to find this at around line 255:
.num, #forumlist small {
font: 11px Verdana,Arial,Helvetica,sans-serif;
text-align: center;
}That controls the styling of <td class=”num”>.
I also recommend you use the Firefox web browser with the Web Developer add-on by Chris Pederick for finding things like this.
-
AuthorSearch Results