Skip to:
Content
Pages
Categories
Search
Top
Bottom

Search Results for 'code'

Viewing 25 results - 29,551 through 29,575 (of 32,432 total)
  • Author
    Search Results
  • #59332

    In reply to: super beginner :)

    Null
    Member

    Some1 had a bad day :D

    mikelothar
    Member

    Is there a way to either modify the “Indicate New Posts” plugin, or inspire someone to make a plugin, so that i can add something like this in my theme:

    <?php if ($newpost) : ?>

    NEW

    <?php else : ?>

    OLD

    <?php endif; ?>

    I have looked all over google – and on this site – for a plugin that allowed me to see new posts/topics when i visit my forum, but so far the only one i could find is the “Indicate…”. In all honesty, i can’t use bold marked topics for much.. i need something more CSS like, something not only affecting the topic.

    I’ve coded themes for phpBB for years, but i recently found bbPress and i just love how simple and easy it is to code themes here. With a plugin to display new posts/topics (which in my own humble opinion SHOULD be standard in bbPress), i could gladly help spreading the word of a (relatively) new BB, by making some new themes.

    If i could decide the function entirely, it should work in such way that both new topics as well as new posts would be affected, and they would continue to show as unread until i actually read them. Also, it should be database driven, so that i could log in to my account on another computer, and still see the posts/topics that would be new for me.

    Please don’t make me go back to phpBB… :)

    _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.

    #59375
    outchy
    Member

    i feel like i should send you a check, fel.

    thanks :D

    #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

    #52948
    riddle
    Member

    Mistainu, by “breadcrumb structure” do you mean that the family tree of a sub-forum should be displayed? That’s high on my wishlist.

    In other words, right now a subforum’s breadcrumbs look like:

    Food Forums – winesaps

    When I wish they looked like:

    Food Forums – fruit – apples – winesaps

    I’m reluctant to use subforums at all if I can’t give the user good feedback about where they are in the forum structure.

    So: does your breadcrumb code address this problem? And if so, is it coherent enough that I can glue it into place myself without being an expert about bbPress internals? (I do know enough PHP to be dangerous.)

    #58788
    Rhys Wynne
    Participant

    Cheers fel :)

    Regarding the plugin, there’s a slight niggle. At the moment the plugin builds the profile URL from scratch. So it’s an extra (and I believe unessecary) option that you define if you have pretty permalinks or not.

    Is there like a hook (similar to user_profile_link) that grabs the profile URL?

    #58102

    In reply to: bbSync

    fel64
    Member

    Sorry Crowspeak, I’m not immediately sure what the problem could be. I’ll mull it over and go through the code again sometime. Hopefully it’s not too much of a problem for you.

    #58787
    fel64
    Member

    Download something like TortoiseSVN. For Tortoise, right-click on a folder, select TortoiseSVN > Repo-browser, enter the URL you want to add to and use the interface provided. :)

    #58786
    Rhys Wynne
    Participant

    Also, I have no clue how to use the subversion repository. Is there a guide anywhere so I can upload my plugin there? :)

    I have been accepted, just not sure what to do!

    #59382

    In reply to: css help

    bobbyh
    Member

    Congrats! Also, since you don’t have IE7, I’ll confirm here that your theme also looks good on IE7. :-)

    _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.

    #57314

    In reply to: Plugin: bb-Topic-Views

    _ck_
    Participant

    I’ve now come up with an extremely easy/fast way to grab and display the views per forum in the forum list on the front page (or forums with sub-forums.

    Here’s the plugin:

    function forums_views_append($forums) {
    global $bbdb; $sum_meta_value="SUM(meta_value)";
    $forums_views = $bbdb->get_results(" SELECT $sum_meta_value,forum_id FROM $bbdb->topicmeta LEFT JOIN $bbdb->topics ON $bbdb->topicmeta.topic_id = $bbdb->topics.topic_id WHERE $bbdb->topicmeta.meta_key='views' GROUP BY $bbdb->topics.forum_id");
    foreach ($forums_views as $forum_views) {$forums[$forum_views->forum_id]->views=$forum_views->$sum_meta_value; }
    return $forums;
    }
    add_filter('get_forums','forums_views_append');

    To display the views, edit your front-page.php template and insert a views header and views column like so:

    <th><?php _e('Views'); ?></th>
    <th><?php _e('Topics'); ?></th>
    <th><?php _e('Posts'); ?></th>

    .

    <td><?php echo $forum->views; ?></td>
    <td><?php forum_topics(); ?></td>
    <td><?php forum_posts(); ?></td>

    Since there is no clean way to store forum meta data right now in bbpress (apparently an oversight) this will run on every time the forums list is displayed. Maybe not such a good idea for very busy forums, even though it’s a single mysql query (nifty eh?).

    Eventually I’ll figure out a nice way to store this and only update upon new posts or new topics to reduce overhead (or a cron job perhaps).

    #59233
    _ck_
    Participant

    Would it be possible for you to properly use fsockopen or curl instead of “file()” for remote files? Like many hosts, I disable file() for remote urls for security vulnerability reasons which cripples your plugin. You’re likely to get many complaints that “nothing happens”

    Warning: file() [function.file]: URL file-access is disabled in the server configuration in /home/example/public_html/forums/bb-admin/admin-functions.php on line 798

    .

    update: actually this is not directly your fault, though you are trying to use a bb-admin function that was meant for local file access to do remote file access?

    If I am not mistaken, you just found a bbpress security loophole.

    ps. any concerns about eventually 2,000-20,000 bbpress users hammering the svn with so many file downloads to examine all the plugin headers?

    #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).

    #56726

    In reply to: Plugin: Avatar Upload

    _ck_
    Participant

    @box87, be aware that single upload class is larger than most of the the entire bbpress core code itself – massive overkill unless you really, really really need it’s extra features?

    @louisedade – I found a major caching bug where you are not taking advantage of user meta data that has already been loaded previously in the same execution – this causes 10-30 extra mysql queries for every topic that is displayed depending on how many posts are displayed at once.

    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:

    function avatarupload_get_avatar($id, $fulluri=1, $force_db=0)
    {
    global $bbdb, $user, $bb_user_cache;

    if ($force_db == 0 && ($id == $user->ID || !empty($bb_user_cache[$id])) )
    {
    if (!empty($user->avatar_file)) {
    $a = explode("|", $user->avatar_file);
    } else {
    if (!empty($bb_user_cache[$id]->avatar_file)) {
    $a = explode("|", $bb_user_cache[$id]->avatar_file);
    }
    else {return false;}
    }
    }
    else

    Drops my topic queries by 20 per page while still functioning correctly in all other cases.

    Discovered this problem via bb-benchmark

    #59311

    In reply to: Noobish CSS Question

    M
    Member

    In Safari/Camino, it still has issues. #hottags{height: 100%;} helps that one.

    Quick fix, not guaranteed to work… thus, I resort to an acronym: YMMV.

    #59354
    Null
    Member

    Okay okay, 1 day :) (just kidding)

    #52445

    In reply to: blockquote?

    fel64
    Member

    verbatim in my bb-admin/style.css file does no good

    because there are no blockquotes in bb-Admin. Apply them to your theme, which should be in my-templates/themename/style.css. I agree, kakumei needs default blockquote support. I’ll add a trac ticket or sumthin’.

    #58683
    M
    Member

    Funny you mention this… I’m doing some work for a client at the moment using WordPress and I wanted to change some of the admin backend text without modifying core files. Localization using an en.mo file turned out to be the way to go.

    I believe bbPress supports localization as well. It’s probably going to be the route you’ll want to take. (edit: it does, BBLANG in config.php, drop the .mo file in /bb-includes/languages/ I would assume)

    The file you’ll need to edit is a compiled binary, so you’ll have to get the bbpress.pot file, probably from the bbPress site somewhere. (edit: http://svn.automattic.com/bbpress-i18n/pot/tags/)

    Once you’ve got the file, check out poEdit (http://sourceforge.net/projects/poedit/). It’s an open-source cross-platform mo/po/pot editor. Create a New catalog from .pot file, make sure the option to compile to .mo is checked in the preferences, and you should be good to go.

    The top-left box contains the text to be translated, the bottom-left contains the “translation.” Ctrl-F, find the string, and you’re good from there.

    Note: I haven’t tried this with bbPress but it works great with WordPress. Hope it helps.

    #56724

    In reply to: Plugin: Avatar Upload

    LMD
    Participant

    Thanks Sam! That’s awsome. I’ve downloaded and reviewed the code and I’ve made a couple of small modifications – added an option to the admin page and a tiny bit of validating (so that you can’t have a non-numerical or zero max_width etc — actually setting the sizes to zero will now reset the options to their “factory defaults”).

    @Plugin Users: I’m adding an unsharp mask routine to the reszing code before I commit the updates, so it might not be ready until tomorrow. If you’ve downloaded Sam’s update, you will have to do another update later.

    #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?

    #58682
    outchy
    Member

    where can i change this default text for these links at the bottom of topic.php:

    <?php topic_delete_link(); ?> <?php topic_close_link(); ?> <?php topic_sticky_link(); ?>

    i can’t find it except in template-functions.php, which i won’t ever touch again :)

Viewing 25 results - 29,551 through 29,575 (of 32,432 total)
Skip to toolbar