Skip to:
Content
Pages
Categories
Search
Top
Bottom

Search Results for 'test'

Viewing 25 results - 10,776 through 10,800 (of 11,584 total)
  • Author
    Search Results
  • _ck_
    Participant

    Actually, I just realized there is a cheat way to do zero extra mysql queries and link to the profile.

    <td class="num"><a href="/forums/profile.php?id=<? echo $topic->topic_last_poster; ?>"><?php topic_last_poster(); ?></a></td>

    untested but should work in theory

    This will just use the stored last posted id # instead of forcing bbpress to lookup all their meta data and profile link in the database.

    If your forum uses permalinks, it will just rewrite the url on display.

    #59374
    fel64
    Member

    That’s because you have these seriously weird rules:

    * > .box p {style.css (line 683)
    margin-top:-100px;
    }

    You have them twice, too. Looks like you copied the same code from somewhere twice. Right at the end of the file.

    I recommend that you make a _single_ change, test, repeat. Then you know what’s responsible when stuff breaks.

    [Edit] Yeah. Get rid of the hack. That will fix it.

    Ardentfrost recommended this alternative hack a while back. http://ardentfrost.rayd.org/?p=136

    _ck_
    Participant

    outchy, this plugin is for a completely different purpose.

    You already have the latest posters on the front page, if you want to turn their names into profile links you need to do something like this in your front-page.php

    <td class="num"><a href="<? user_profile_link( get_post_author_id( ) ); ?>"><?php topic_last_poster(); ?></a></td>

    (untested)

    Note because of the way user data is not cached on the front page, this will cause several extra queries per topic listed and probably not a good idea for very busy forums.

    #2153

    Topic: css help

    in forum Installation
    outchy
    Member

    i hate asking this because i thought i was pretty good with css but i must swallow my pride :/ could you guys help me figure out why IE is dropping the “Latest Discussions” part below the “Top Posters” sidebar? it works in Firefox!!

    http://www.manonfire.cc/sk6ers/

    here’s the css:

    http://www.manonfire.cc/sk6ers/bb-templates/superbold/style.css

    #56729

    In reply to: Plugin: Avatar Upload

    fel64
    Member

    Here’s a hacked workaround, though I am not sure it’s a good idea to tap into the user_cache directly. I’d otherwise suggest nicely using bb_get_user() as it checks the cache first but the problem with that is it fetches ALL the data if not in the cache which is overkill. Too bad there isn’t a bb_get_user_meta($id,’metaname’) but oh well – for now replace this top section of code:

    The user _must_ be in the cache at this point if his details are being displayed next to the post, right? Implying that bb_get_user would never need to use a single query.

    There _is_ a bb_get_usermeta() already: https://trac.bbpress.org/ticket/691. It’s in the latest.

    #59330

    In reply to: super beginner :)

    fel64
    Member

    Yeah. So, pick a theme close to what you like and edit it. What else did you want to know?

    Open the theme file for the page you want to edit. Look for the bits you want to change. Change them. For example, to get rid of the tags you go to front-page.php and take out the entire div for hot tags. To put the forums above the latest, look for the block of HTML that’s there for the forums and move it above the block there for the latest. For the header you play around with the CSS.

    I can’t see that you need a little help. I don’t know what help you need at all. Do you have any specific problems? It’s rather annoying that you’re asking for other people to spend their time explaining how to do these things when you don’t seem to have even tried.

    outchy
    Member

    is there a way to tweak this so you can simply list the latest posters on the front page (as username/profile link)?

    #56727

    In reply to: Plugin: Avatar Upload

    LMD
    Participant

    Ok, version 0.7 is released: including the changes by SamBauers as well as an image sharpening (unsharp mask) function.

    @Sam – Using the latest version of your plugin, I tried installing the new version of Avatar Uplaod, but it still wouldn’t read the additional-files directory. This is what it looks like over FTP: screenshot (NOTE: if there is a problem viewing it — error 403 — try cutting and pasting the URL instead – it’s probably my over-zealous image-hotlinking prevention).

    #2145

    Topic: super beginner :)

    in forum Themes
    warmechoco
    Member

    Hello everyone,

    I know a bit about html (but that is not necessary here I guess :p) but nothing about css & php..

    I managed to install bbpress on my website.. I am integrating the forum with Iframes on my website.

    now I would like to have a very cleen and simple forum

    – no hot tags

    – not a big header

    – the forums on top & the latest discussions on the bottom

    the theme I think leans the most to my needs is Superbold for bbPress1 by Refueled (looking at styles). So I’m thinking I could start by editing this theme?

    as you can see I need a little help,

    I have dreamweaver to edit things.

    can someone help me and say me how to start or what is the best thing to do?

    #52444

    In reply to: blockquote?

    I just installed bbpress yetserday on a new domain and have integrated it with wordpress using the plugin, etc. I also have found that the default template has no blockquote support. Even by including the blockquote definition given above by Trent verbatim in my bb-admin/style.css file does no good, here is a view source excerpt of the source file:

    <blockquote><p>[Shakir 5:57] O you who believe! do not take for guardians those who take your religion for a mockery and a joke...</p></blockquote>

    as a test…

    testing blockquote here in bbpress support

    nope. above line doesnt render in blockquoted indent either.

    i think the problem is the insertion of <p></p> tags around every paragraph. Since blockquote is an inline style, the p tags override it. we could get around this by using a div class=blockquote kind of construction instead but wouldt it be nicer if blockquote just worked out of the box?

    #2149
    bobbyh
    Member

    A lot of bbPress forums have taken advantage of easy user integration with WordPress. The next step to integrating a WordPress blog and bbPress Forum is to create a bbPress Theme to match your WordPress Theme. bbPress doesn’t ship with built-in support for a sidebar, although I found it trivial to add this with a small plugin. What I really missed was a lightweight way to access WordPress’ wp_list_bookmarks Template Tag function, which lets you display your WordPress Blogroll links.

    To add this functionality, I wrote this bbPress List Bookmarks plugin. To install this plugin, download the zip and unzip it to your bbPress server under your /my-plugins folder. The zip should extract to a folder named “list_bookmarks”, so the location of these files should be /my-plugins/list_bookmarks. Then, in your bbPress theme, add a wp_list_bookmarks Template Tag with whatever parameters you want (just like you would when editing a WordPress Theme). You shouldn’t need to hack any of the plugin files to get this to work, although of course you’ll have to edit your bbPress Theme to take advantage of this plugin.

    This plugin should work whether or not these WordPress tables are located in the same database as your bbPress tables, as long as your WordPress tables are located in the same database as your integrated user tables.

    I’ve tested this plugin on my site, which currently uses bbPress v0.8.2.1 and WordPress v2.2.1. If you use WordPress 2.0 or earlier and you want to use this plugin, you should probably upgrade your WordPress first as wp_list_bookmarks is a new function introduced in WordPress v2.1. I don’t think it should matter what version of bbPress you use.

    This plugin ships with a database class called bbwpdb.php that lets us access the WordPress database tables. The bbwpdb.php file is basically a clone of the bbPress /bb-includes/db.php file, edited to let us retrieve WordPress tables. The remaining files are simply three WordPress PHP pages needed (wp-admin/admin-db.php, wp-includes/bookmark-templates.php, and wp-includes/bookmark.php), with slight edits to make it use the bbwpdb database class, instead of the WordPress or bbPress database class. The last file (list_bookmarks.php) just glues everything together.

    #59269
    M
    Member

    People that are attracted to bbPress will be attracted because of its out-of-the-box simplicity and its extensibility.

    It’s great… if you want a plugin and you’ve messed around with WordPress for any length of time, you’ll feel right at home. I personally dislike polls… _ck_ obviously doesn’t, and he’s not alone. That’s the beauty of bbPress. These features aren’t crammed down your throat; rather they are completely optional.

    Also, I don’t think that bbPress was built to win a popularity contest. It was built with certain things in mind and is continuing in that trend. I think that’s great.

    One more thing… those people who were attracted to other forum software solutions (ie, SMF, IPB, vB), wanted something feature-bloated. All kinds of things pouring out of every corner. They wouldn’t be attracted to bbPress unless it became a miniature of what they were already using. And what’s the point in that, eh?

    #59350
    M
    Member

    Stick with the ezSQL format… it’ll be much easier.

    Something like this (using foreach instead of while):

    $query = "SELECT * FROM $bbdb->menu
    WHERE set = 'inactive' ORDER BY order ASC";
    $r = $bbdb->get_results( $query );

    foreach( $r as $rw ) {
    // now mess with $rw
    echo $rw->database_row . "<br>n";
    }

    Something that might be helpful would be to browse the source of the ezSQL class in /wp-includes/wp-db.php

    The latest from Justin Vincent, the author

    http://www.woyano.com/jv/ezsql

    The version used in bbPress and WordPress

    https://trac.wordpress.org/browser/trunk/wp-includes/wp-db.php

    It might help you… you’d be able to see where mysql_query is begin used, and how to use the ezSQL format best.

    I think the reason you’re running into problems with mysql_fetch_array is because it’s already used.

    Not sure on that one though… I would have to check.

    Also, what might cause an error: $bbdb->query will not return anything at all. $bbdb->get_results needs to be used for multi-dimensional array data, $bbdb->get_row or $bbdb->get_col need to be used for single array data, and $bbdb->get_var needs to be used for non-array/string data. $bbdb->query is used for inserting data, the others are used for retrieving it.

    Someone correct me if I’m wrong, but I’m pretty positive that’s how it goes.

    ezSQL is lovely. It certainly takes the pain out of MySQL data manipulation.

    So I guess that makes the answer to your question “Neither.” $bbdb->get_results should do the trick.

    And sorry for the screed. :D

    #57313

    In reply to: Plugin: bb-Topic-Views

    _ck_
    Participant

    Here’s a plugin to extend the topic-views plugin and add a “most-views” view page (ie. view.php?view=most-views)

    It does it with a minimum number of mysql calls, just 10 to display an entire page on my setup. You have to hack your views.php template to add the views column, use $topic->views for the view count to use the cached data in memory instead of an extra mysql query for each topic.

    function most_views_views( $views ) {
    global $views;
    $views['most-views'] = 'Topics with the most views';
    return $views;
    }
    add_filter('bb_views', 'most_views_views');

    function most_views( $view ) {
    global $bbdb, $topics, $view_count;
    switch ( $view ) :
    case '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) DESC 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_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' );
    break;
    default :
    do_action( 'bb_custom_view', $view );
    endswitch;
    }
    add_action( 'bb_custom_view', 'most_views' );

    #59314

    In reply to: Number of users error

    jamiedavies
    Member

    I’ve checked the database table. There’s 53 records with the latest being id=56

    #59313

    In reply to: Number of users error

    fel64
    Member

    I think – if I remember this right – that it’s a known issue caused by the pagination using the total number of accounts ever created instead of the number existing now and that it’s fixed in the latest.

    If you have phpMyAdmin, can you check the ID of the latest member? If that ID is 309, bingo.

    #59293
    _ck_
    Participant

    Hmm. Well I don’t think it’s an old theme but it might be another plugin hooking topic_last_poster(). I will have to dig.

    Also, how many forums + topics are you showing on your front page?

    I’ve got 8 forums and 35 topics with roughly 20 unique last poster usernames on the front page.

    Not that it really matters, if you are only hitting 11 queries than it’s still quite efficient. What’s funny is it could be single digit queries except that bbpress tests that it exists by hitting the database with a useless query every time it starts.

    #59292
    fel64
    Member

    I’ve applied this plugin and I’ve only got 11 queries on the front page in kakumei, 13 in my theme (with an onlinelist and latest blog post). Are you running the latest? If not, that’s the likely cause.

    #59284
    fel64
    Member

    Thanks for posting it here anyway :) bugs go on trac for fixing, and this particular one’s already been addressed. I can’t tell if it went into the latest version (.8.2.1) or not but it should be fixed in trunk.

    #56713

    In reply to: Plugin: Avatar Upload

    LMD
    Participant

    Hi, the error you are reporting appears to be a problem with the bbPress core code, specifically the user ‘capabilities’ class.

    Have I understood this correct:

    – You are using the latest bbPress version (0.8.2.1) ?

    – The error only appeared AFTER you upgraded to the latest Avatar Upload plugin to version (0.6.2)?

    – Does the error appear on EVERY page, or just the Avatar Upload template in the profile area?

    #2136
    _ck_
    Participant

    Can anyone tell me what the standard number of queries for the front page are on a default install of bbpress?

    I think mine are high because of my template hack for the latest reply link. (added: nope, tried removing it and no query reduction)

    There has to be a way to cache that and reduce the number of calls by pre-fetching all the links for all the topics to be listed, instead of doing one call at a time…

    #59227
    Sam Bauers
    Participant

    Private messaging doesn’t show up because there is nothing in the trunk. There are only tags. If the author just copies the latest tagged version to the trunk then it will show up too.

    #59204
    fel64
    Member

    The newest version is ALWAYS an improvement. A BIG improvement. There is NEVER a situation where you shouldn’t upgrade.

    You have a problem and you’re not running the latest version. What do you do? Go upgrade.

    You don’t have a problem. You’re not running the latest version. What do you do? GO UPGRADE.

    Upgrading might not even fix this problem, it’s not sure. But it does fix several security exploits and adds a bunch of featurs. Go upgrade!

    What’s worst is that you’re on a support forum asking for help and you’re not even on the latest version.

    If I wasn’t clear … GO UPGRADE

    fel64
    Member

    The difference between actions and filters is unclear. In principle, filters are supposed to let you modify data and actions give you a chance to respond to events. This is reflected most in the fact that with a filter, you have to return some data which will be used instead of the data given to you in the first place. For actions, you don’t.

    The syntax is this:

    do_action('action_name', [$argument1, [$argument 2 [...]]]);
    apply_filters('filter_name', [$argument1, [$argument 2 [...]]]);

    I don’t recommend making changes to the core, of course. But if you have to, you would change the last line of topic_time() from this:

    echo _bb_time_function_return( $time, $args );

    to this:

    echo apply_filters('template_time', _bb_time_function_return( $time, $args ));

    and then change the line in the plugin further up to this:

    add_filter('template_time', 'freshness_latestlink', 101);

    taking out the // that comment it out. Also, I’m not sure what topic_class*() is?

    But yeah, don’t modify the core. Much better to stick to the template change from above. :)

    fel64
    Member

    Ooh. Probably. Nice idea.

    <?php
    /*
    Plugin Name: Freshlink
    Description: Turns freshness into a link to the latest post
    Author: tisme, fel64
    */
    function freshness_latestlink( $fresh ) {
    global $topic;
    $felgtlpl = get_topic_last_post_link($topic->topic_id);
    return "<a href='$felgtlpl'>$fresh</a>";
    }

    //add_filter('', 'freshness_latestlink', 101);
    ?>

    Unfortunately there doesn’t seem to be a filter for it – only for modifying the actual time, not the text output. Since topic_time() also directly writes to the HTML, you can’t modify it first. You have to change the template, from

    <?php topic_time(); ?>

    to

    <?php echo freshness_latestlink( get_topic_time() ); ?>

Viewing 25 results - 10,776 through 10,800 (of 11,584 total)
Skip to toolbar