Skip to:
Content
Pages
Categories
Search
Top
Bottom

Search Results for 'code'

Viewing 25 results - 29,601 through 29,625 (of 32,491 total)
  • Author
    Search Results
  • Detective
    Member

    I think it should not be hard to code such a plugin. It would have to create a new database table, like bb_read, with the following fields:

    – bb_user

    – bb_post

    – bb_last_comment_read

    This way you could modify the posts query, left joining it with this table. If the join is NULL (please correct me if i’m wrong, i haven’t done these things in a lot of time), then the user has never read the post. If bb_last_comment_read is less than the actual number of comments or replies, then he hasn’t read the last post.

    Another interesting alternative is what the folks at wordpress.org are doing … for non-visited links they have a font with a font-weight: bold style. So you can see which topics are new.

    mikelothar
    Member

    Hi fel.

    I already modified the -strong- part, to some <span style=”color: #123456;”>, but i have to admit that i have never heard of the content-before tag for CSS.

    I looked at google, i guess the tag looks like :before (or :after), but i also found this page:

    http://www.quirksmode.org/css/contents.html

    .. which states that it doesn’t work in IE browsers. FreekinĀ“ Microsoft..

    Good idea though, but unfortunately IE is too popular.

    In my theme i have a table, with two columns. First column is the one i would like to be able to modify (even if only with a CSS tag), second column holds the title of the topic.

    Do you know if it would be possible to modify the plugin to differentiate between a .no_new_topic and a .new_topic class, for use in CSS instead?

    #59333

    In reply to: super beginner :)

    fel64
    Member

    I’m sorry, that was maybe a little bit strong.

    (But I see _iframes_ and things just go red … :P)

    fel64
    Member

    Do you want it CSS-driven? It’s trivial to modify the Indicate New plugin. Just look for where it says <strong> and </strong> (near the bottom) and change that to <span class="new"> and </span>. You can then use content-before to add the NEW or do whatever else.

    What’s new and what isn’t isn’t yet implemented. :)

    fel64
    Member

    What would bb be looking up? It knows the link type and it already has $topic->topic_last_poster_name as well as $topic->topic_last_poster.

    #59125
    outchy
    Member

    awesome, just what i was looking for! thanks :)

    #59234
    Sam Bauers
    Participant

    > 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 you check the short “to do” list at the top of the plugin you’ll see that I plan to address that issue in the future. I might just copy and paste the code from that internal function and then hack in my own curl/fopen alternative function.

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

    Explain your concerns, how do you think this would be exploited? If it can be we should patch it up.

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

    36 downloads so far, let’s start worrying at 1,000

    #59396

    In reply to: Topic Pages

    Andrew
    Member

    Never mind, I found the variable in config.php. Pretty obvious.

    '// The number of topics that show on each page.
    $bb->page_topics = 15;

    #2155
    wiseremuska
    Member

    I encountered with a problem saying that headers were already sent while using slugs with mod_rewrite rules shown in bbpress FAQ.

    And just to let people who was or will be up against this problem; i solved it changing the line 168 in bb-includes/pluggable.php

    Change the line with this code line :

    `?><script>location.href=”<?=$location?>”;

    </script><?php`

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

Viewing 25 results - 29,601 through 29,625 (of 32,491 total)
Skip to toolbar