Search Results for 'test'
-
AuthorSearch Results
-
August 2, 2007 at 3:33 am #59643
In reply to: Good model plugin for newbie plugin author to study?
riddle
MemberThanks, Sam.
I’m not sure whether to even touch your last suggestion, about using the latest trunk rather than the latest release. I see the trunk code browser at https://trac.bbpress.org/browser/trunk but I don’t know where to find it as one downloadable archive. And surely the trunk has new bugs and unfinished features, which is why it hasn’t been turned into a new release, right?
Can you give us any hints about what has changed that plugin writers need to know about?
P.S. Where do I find BB_Query?
August 2, 2007 at 3:26 am #59620In reply to: AdityaNaik.com
MaryJane
MemberI applied that fix to my Wp and bbpress from your intergration method so1o and it works great! I put a member cp in my sidebar section for bbpress with the latest comments from wp expecting to cringe from the errors and i never got one. Plus i also have some tags in my footer calling from my wp and that works as well. Im loving this!
The only part i didnt apply on your tutorial was the template intergration where you said to pull the header and footer in. Since the themes i use are the same as my wp themes i didnt see the point in doing that. Glad to say it worked even without using that method though. Keep up the excellent work!
August 2, 2007 at 2:44 am #59642In reply to: Good model plugin for newbie plugin author to study?
Sam Bauers
ParticipantThere are lots of built-in functions for querying the topic meta, they are all in the same place in the code, so searching in the code for the functions I mentioned above will reveal them all.
Joining tables to create one query is better than using two queries to retrieve the same data. The new BB_Query class could easily handle the query you wrote up there.
By the way, I suggest you build your plugin against the latest trunk rather than the latest release.
August 2, 2007 at 1:07 am #59667In reply to: Should I get an email when new users are created?
howtogeek
MemberThere’s the Add User plugin that will let you add users directly… I’ve used it a number of times for test accounts.
August 1, 2007 at 9:37 pm #59360In reply to: mysql_query() OR $bbdb->get_results() ?
Null
MemberTesting this tomorrow after work…. nah after diner after work
Thx for the help mate!
_Null
ps. how to open a .diff?? (windows machine)
August 1, 2007 at 9:31 pm #56379In reply to: Plugin: bbMenu 1.1
Null
MemberTesting this tomorrow after work…. nah after diner after work
Thx for the help mate!
_Null
August 1, 2007 at 3:34 pm #51584In reply to: Full Content of Most Recent Post on Front-Page?
fel64
MemberTurn the time-string into a timestamp to be turned into a time-string.
<?php echo date( 'g:i A', strtotime( $latestpost->post_time ) ); ?>
There’s a template function that gives you the link to the latest post in the topic. I believe it’s called
get_topic_last_post_link()
but I’m not sure.August 1, 2007 at 2:54 am #51583In reply to: Full Content of Most Recent Post on Front-Page?
outchy
Memberhow does one filter the output for time in this example?
<?php echo $latestpost->post_time; ?>
i’d like it to be in the format of
( 'g:i A' )
ps, my good, good people
how would i turn this link into a link to the latest reply itself instead of just the topic:
<a href="<?php echo get_topic_link($latestpost->topic_id); ?>"><?php echo get_topic_title($latestpost->topic_id); ?></a>
July 31, 2007 at 9:16 pm #52672In reply to: Plugin: [REL] Signature
_ck_
ParticipantHere we go!
http://ckon.wordpress.com/2007/07/31/new-plugin-bbpress-signatures/
updated to v0.11 – now with admin menu!
http://ckon.wordpress.com/files/2007/07/bb-signatures.txt
(rename .txt to .php)
If you have plugins for smilies and/or allow images in post text, it will obey them, this is probably a good thing and desired.
You can set the minimum user level needed to show signatures and also the ability not to repeat a user’s signature more than once per page.
Instructions: install, activate, tinker with settings in admin menu
If you would like the optional toggle on new/edit posts to disable signatures you must edit the edit-form.php & post-form.php templates and place at or near the bottom:
<? bb_signatures_checkbox(); ?>
(you can wrap it in a DIV and float it to the left, right style anyway you’d like
sorry but there’s no way to do this directly through a plugin)
Here’s a fancier version that I use:
<div style=”float:left” ><? if (function_exists(‘bb_signatures_checkbox’)) {bb_signatures_checkbox();} ?></div>
Version History:
0.05 :slashes & autop fixed, replaced input with textarea, max_lines now supported in post-processing, max_length checked in realtime (as well as post processing)
0.06 :internal testing/bugfix
0.07 :per-post signature toggle
0.08 :toggle for allow html and allow images should now work
0.10 :basic functioning admin menu
0.11 :more intelligent admin menu
July 31, 2007 at 3:46 am #2190Topic: AdityaNaik.com
in forum Showcaseso1o
ParticipantHere is my latest redesign of my site.. the site has wordpress and bbpress completely integrated..
there is no bbpress frontpage it shares the wordpress frontpage. the plugins are shared by both bbpress and wordpress.
I have integrated the search also.. try the ajax live search. type and wait.
Here is the link – http://www.adityanaik.com
I will be releasing the last theme ‘sunnyside’ in a few days
let me hear your thoughts.
July 31, 2007 at 3:34 am #52666In reply to: Plugin: [REL] Signature
_ck_
ParticipantWhoops, I bet there were some situations I didn’t test for.
Will investigate… (and she‘ll fix ’em asap)
July 31, 2007 at 12:24 am #56418In reply to: Freshness Linked
citizenkeith
ParticipantOk, I finally got around to some testing. I have disabled almost all plugins and recounted… still the same behavior. However, I was unable to disable “Online List” and “BBPress Private Messaging” because it broke the admin console. So there’s a chance that one of those plugins might be causing this strange behavior.
July 30, 2007 at 5:20 pm #51582In reply to: Full Content of Most Recent Post on Front-Page?
outchy
Memberyes, good call:
<?php
$latestpost = $bbdb->get_row("
SELECT *
FROM $bbdb->posts
WHERE post_status = 0
ORDER BY post_time DESC
LIMIT 1
");
?>
Re:
<a href="<?php echo get_topic_link($latestpost->topic_id); ?>"><?php echo get_topic_title($latestpost->topic_id); ?></a>:<br /><br />
<a href="<?php user_profile_link($latestpost->poster_id); ?>"><?php echo get_user_name($latestpost->poster_id); ?></a> said:
<?php echo $latestpost->post_text; ?>July 30, 2007 at 8:03 am #59544In reply to: “My Threads” – User Specific Views
_ck_
ParticipantEr, wait a minute. This new view registation method takes away massive potential from views.
For example you can’t manipulate the data before and/or after the BB_QUERY.
Here’s how I find “most viewed” and “least viewed” topics and create new views for them. How the heck is this even remotely possible with the new method? The new method also takes away all natural mysql query methods, making things much more complicated and easier to make mistakes on query configuration.
function most_views( $view ) {
global $bbdb, $topics, $view_count;
if ($view=='most-views') {$sort="DESC";}
if ($view=='least-views') {$sort="ASC";}
if ($view=='least-views' || $view=='most-views') {
$limit = bb_get_option('page_topics');
$where = apply_filters('get_latest_topics_where','');
$most_views = $bbdb->get_results("SELECT topic_id FROM $bbdb->topicmeta WHERE meta_key='views' ORDER BY cast(meta_value as UNSIGNED) $sort LIMIT $limit");
foreach (array_keys($most_views) as $i) {$trans[$most_views[$i]->topic_id] =& $most_views[$i];} $ids = join(',', array_keys($trans));
$topics ="SELECT * FROM $bbdb->topics WHERE topic_status=0 AND topic_id IN ($ids) $where ORDER BY FIELD(topic_id, $ids)";
$topics = $bbdb->get_results($topics);
$view_count = count($topics);
$topics = bb_append_meta( $topics, 'topic' );
}}.
Absolutely no way to do that purely though BB_QUERY, at least to my limited knowledge. You’d have to hook BB_QUERY and check for what it’s doing on every call and that’s nasty.
July 30, 2007 at 7:42 am #59543In reply to: “My Threads” – User Specific Views
_ck_
ParticipantSigh, I guess I’ll tempt fate and install the latest trunk. Though I know it’s going to instantly break half a dozen plugins or more, so I need to do that when I have a full night to dedicate to it.
I really like “views” and keep thinking of more helpful ones I can create that drill down through the data.
You should enquire about the development priorities and directions on the bbPress dev list though, you may get more joy there.
I find it somewhat hilarious that a *forum* development team uses a mailing list for group communications. The year 2000 called – it wants it’s static email posts back!
July 30, 2007 at 6:34 am #59566In reply to: How to evaluate server speed?
_ck_
ParticipantSince there’s no real way to cache bbpress as static pages like wordpress (and not that there ever really can be, defeats the purpose) if you plan to have anything bigger than a “micro-forum” it’s important your host has mysql caching and optionally but recommend, some kind of php opcode cache (ie. eaccelerator)
Otherwise you’ll be getting emails from your host about your account creating all of the mysql load, etc.
The problem is I think most hosts do not have the two features I mentioned enabled. At least most shared hosting that’s done on cpanel “out of the box” on defaults. They have to be a bit more tech-savvy. And then if they are that clever, sometimes they will “oversell” the box thinking it can do more work than average.
Last but not least, on all shared hosting and VPS, you can have great performance for the moments you test it, but then a “bad neighbour” comes along and your performance will become quite bad for no reasons of your own, until the host does something about it, which can be days. Sometimes even the host can make poor decisions that will cripple your site, like backing it up during times of higher activity or allowing the statistics programs to run on dozens of clients at the exactly same time.
I wish I could afford dedicated hosting myself! Solves most of these problems. But spending $100 per year instead of $100 a month is no contest.
ps. 2.490 – 8 queries is not good at all if you are expecting high traffic – I have mysql cache and opcode cache and get always get under 0.300 for 10-30 queries no matter how many visitors. But I suspect I pay much more for my hosting. My guess is there’s definitely no mysql cache on there or you are paying very very little for that hosting.
July 30, 2007 at 1:41 am #51580In reply to: Full Content of Most Recent Post on Front-Page?
outchy
Memberexcellent! i got it to work with this just before i checked back for your reply:
<a href="<?php echo get_topic_link($latestpost->topic_id); ?>"><?php echo get_topic_title($latestpost->topic_id); ?></a>
i think i understand it better now, thanks again!
July 30, 2007 at 1:37 am #51579In reply to: Full Content of Most Recent Post on Front-Page?
fel64
MemberThat’s great! Passing parameters is just giving the function some data to work with.
$latestpost->topic_id
is the topic ID. There are probably some functions liketopic_title()
andlink_to_topic()
or similar that you can use to get the title and link. They too will need the topic ID passed as a parameter, so if those are the actual functions it could betopic_title( $latestpost->topic_id );
July 30, 2007 at 1:10 am #51578In reply to: Full Content of Most Recent Post on Front-Page?
outchy
Memberwait, i got this to work to display the name:
<?php echo get_user_name($latestpost->poster_id); ?>
and this to make it into a link to the person’s profile:
<a href="<?php user_profile_link($latestpost->poster_id); ?>"><?php echo get_user_name($latestpost->poster_id); ?></a>
now all i need is to display the topic title and make it a link … i need help with this one please
July 29, 2007 at 10:06 pm #2187Topic: How to evaluate server speed?
in forum Troubleshootingriddle
MemberI’m in the process of setting up a bbPress installation (my first) at a new hosting provider (also my first time with them).
Subjectively, things seem a bit slow. Is there a tool for testing response time on a generic PHP hosting provider? Maybe a PHP app for very gentle stress testing?
Failing that, what sort of response time should be considered normal in bbPress’s self report in the comments at the bottom of the page? My top page currently says, “2.490 – 8 queries.” (That’s with a nearly-empty database.)
If there are serious problems with this host, I’d like to figure it out now, before I get settled in and launch.
Thanks.
July 29, 2007 at 5:18 pm #59450In reply to: How to link to favorites of logged user
_ck_
ParticipantOh if you are trying to do it from an integrated WordPress you’ll need to do this:
<?
if function_exists("get_currentuserinfo") {global $user_ID;}
else { $user_ID=bb_get_current_user_info( 'id' )}
if ($user_ID) { echo '<a href="/forums/profile.php?id='.$user_ID.'&tab=favorites">favorites</a>';} ?>untested – change /forums/ to whatever your bbpress path is.
July 29, 2007 at 4:43 pm #51574In reply to: Full Content of Most Recent Post on Front-Page?
outchy
Memberyes, that worked, thank you.
i’m going through the template-functions.php trying to find how to display the last poster’s username and his/her profile link, as well as the link to the topic itself but the only ones i can get to work are these:
<?php echo $latestpost->post_text; ?>
<?php echo $latestpost->poster_id; ?>
<?php echo $latestpost->post_time; ?>
any suggestions?
July 29, 2007 at 1:46 pm #59539In reply to: “My Threads” – User Specific Views
Sam Bauers
Participant> Any idea what I could be doing wrong here?
Are you using the latest trunk or the standard 0.8.2.1 release?
Latest trunk won’t work with the above code.
July 29, 2007 at 11:57 am #59244In reply to: Plugin: Plugin browser for bbPress
_ck_
ParticipantWeb compression is on an “offered/accepted” handshake of sorts.
It would not affect clients that do not support gzip.
Everytime IE or Firefox (etc.) requests a webpage, it tells the server “I support gzip” in the headers and then if the server supports it, it sends it that way.
Technically compression can be forced through the server – if trac is under the same litespeed server as wordpress/bbpress then it’s just a matter of making sure it’s enabled.
A quick test shows both the svn+trac are using apache, so depending on which version it’s either a matter of building with mod_gzip (for apache 1.3.x) or if apache 2.0 they need to just add a couple of easy httpd.conf directives.
Really though, Matt knows how good litespeed is over apache, both the trac+svn should on litespeed. I bet it could even work with the free 150 connection version instead of buying a license.
July 29, 2007 at 11:35 am #59532In reply to: “My Threads” – User Specific Views
_ck_
ParticipantUgh. So that breaks a view things I’ve done.
I’m waiting for an addition to the plugin svn and I’ll just update there at this point. I also missed checking if the user is logged in, now fixed.
I don’t run the newest trunk so I don’t have a way to test. Looks like I’ll have to setup a test account and install it again.
and I just put the finishes on a nice dropdown view box too…
function views_dropdown() {
$views_dropdown='<form name="views_dropdown" id="views_dropdown">
<select size=1 name="views_dropdown_select" onchange="if (this.selectedIndex != 0) {location=this.options[this.selectedIndex].value;}}">
<option value="#">SHOW ME
> </option>';
$views=get_views(); foreach ($views as $view => $title ) {
$views_dropdown.='<option value="'.get_view_link($view).'">'.$views[$view].'</option>';
}
$views_dropdown.='</select></form>'; echo $views_dropdown;
} -
AuthorSearch Results