Search Results for 'test'
-
Search Results
-
Topic: Topic tooltips
Hi,
A themes front page usually displays the latest discussions, but with many forums there is no context to each topic listed so the topic title is often meaningless. E.g. a topic title of ‘Help’ does not invite the viewer to click the topic to see the posts.
I’d like to add a title=”first part of post…’ attribute to the <tr> tag of each topic in the list.
I tried adding a filter to topic_class(), to fudge class=”xx” to class=”xx” title=”yy” but alt_class() has no filters. My other approach was to add a new function to the theme, e.g. in kakumei
<tr<?php topic_class(); topic_tooltip(); ?>>and in functions.php
function topic_tooltip() {
$topic_id = get_topic_id();
echo ' title="'.$topic_id.'"';
}but I’m struggling to work out how to get the current post available to display an extract of the first post of the topic.
Any help really appreciated.
Ian.
Good News: WordPress operating successfully. bbPress forum operating successfully. “Integrated” (NOT “deep” integrated) bbPress and WordPress successfully.
Bad News: 12 hours effort to “Deep Integrate” so WordPress theme can be used in bbPress, etc.
The “require_once(dirname(__FILE__) . ‘/../wp-load.php’)” command line, when executed exactly as instructed inside the “bb-config.php” file (as shown by theme company, WordPress codex, bbPress Forum and Docs) brings up errors when the forum page tries to opens. Removed the Deep Integration code and the bbPress forum page pops back up.
Facts:
1. Databases are separate; but regular integration works fine.
2. All kinds of advice to no avail (i.e. putting code at top of .php file, removing forward slash before root, etc. etc.
3. Company programmers where I host did test on different server using basic WordPress and bbPress and attained exact same results. Not a directory issue, not a database issue, not a server issue. They also tried other methods/versions of the “require_once” code but kept getting same errors.
4. WordPress and bbPress are latest versions. WordPress is the brand new 3.0.1…requires different/new “deep integration” coding?
5. Basic integration works so the database/directory addresses are correct.
I have searched the forum and internet for solutions, prior to adding this post/topic, to no avail. Blindness and insanity creeping in…probably not due to this issue.
Thank you. Thank you. Thank you!
__________
The errors below are what we ALL are getting on our forum page(s) when attempting to Deep Integrate. (In the errors below “DBnumber” = “undisclosed database number” – AND – “websitename” = “undisclosed website name.”)
___________
Warning: Division by zero in /home/content/08/DBnumber/html/websitename/forum/bb-config.php on line 65
Warning: Division by zero in /home/content/08/DBnumber/html/websitename/forum/bb-config.php on line 65
Warning: require_once(0php’) [function.require-once]: failed to open stream: No such file or directory in /home/content/08/DBnumber/html/websitename/forum/bb-config.php on line 65
Fatal error: require_once() [function.require]: Failed opening required ‘0php’’ (include_path=’.:/usr/local/php5/lib/php’) in /home/content/08/DBnumber/html/websitename/forum/bb-config.php on line 65
Hey All
Looking for a way for the admin to approve any newly registered users using the latest version of bbpress.
I know there’s a plugin out for this, but it doesn’t seem to work past version .9
Has anyone figured out a way to do this (or a workaround) that works for version 1+?
This is very vital to the forums I’ve set up so I’m really hoping there’s a fix out there!
thanks in advance for any insight
I’ve noticed that depending on the site configuration, many times plugins or template designs will require information about the first poster in a topic or the last poster.
The problem is that bbPress unfortunately (even in 1.1) only caches the post authors that are on the physical page you are on. So it causes two “out of flow” queries (one for user, one for usermeta) for each of those authors (first, last).
This means up to four needless queries are added depending on the topic page number (not first or last is the worst hit).
Even worse there is no direct filter/action on that process so it cannot be affected directly.
However I’ve come up with a workaround using a trick,
by catching the actions before and after the process.
I’ve only tested this on 0.9, but in theory should work in 1.1
if (is_topic && !is_bb_feed()) {
add_action('bb_topic.php_pre_db','usercachefix_load');
add_action('bb_topic.php','usercachefix_unload');
function usercachefix_load() {add_action('get_forum_where','usercachefix');}
function usercachefix_unload() {remove_action('get_forum_where','usercachefix'); global $posts; unset($posts['first'],$posts['last']);}
function usercachefix($x) {global $topic,$posts; $posts['first']->poster_id=$topic->topic_poster; $posts['last']->poster_id=$topic->topic_last_poster; return $x;}
}Make it into a mini-plugin and give it a try.
You really only need it if you are showing info about the first and/or last poster on every page of the topic.
You should see the query count go down by two to four queries on the page.
Or use bb-benchmark to more closely examine the queries and look for multiple calls to the user-table and usermeta-table.
Filtering (searching) of users in admin is not working properly… Yeah, is not working at all.
The Latest version with BP and WP 3.0.
