Skip to:
Content
Pages
Categories
Search
Top
Bottom

Search Results for 'code'

Viewing 25 results - 29,276 through 29,300 (of 32,446 total)
  • Author
    Search Results
  • #57317

    In reply to: Plugin: bb-Topic-Views

    _ck_
    Participant

    Ah I know what it is after studying the code a bit.

    They never planned on $topic_id being null or not set, so it’s being inserted into the query as blank.

    mysql is getting something like

    SELECT meta_value FROM $bbdb->topicmeta WHERE topic_id = AND meta_key='views'

    see the blank before AND? It’s unacceptable to mysql, needs to be a value.

    hack

    function get_view_count ( $topic_id )

    and

    function initialize_view_count( $topic_id )

    and make a new first line for each that says

    if (!$topic_id) return;

    Should be a dirty workaround until the author can take a look.

    #59889

    In reply to: bbPress database error

    _ck_
    Participant

    Ah I know what it is after studying the code a bit.

    They never planned on $topic_id being null or not set, so it’s being inserted into the query as blank.

    mysql is getting something like

    SELECT meta_value FROM $bbdb->topicmeta WHERE topic_id = AND meta_key='views'

    see the blank before AND? It’s unacceptable to mysql, needs to be a value.

    hack

    function get_view_count ( $topic_id )

    and

    function initialize_view_count( $topic_id )

    and make a new first line for each that says

    if (!$topic_id) return;

    Should be a dirty workaround until the author can take a look.

    #59891

    In reply to: Always login

    Null
    Member

    Can this be used as a plugin? The real questions should be: Can you overide normal bbpress functions with a plugin? And if so, how would this plugin look like?

    And can a function like this be added:

    If user logged-in = false -> redirect to login.php (or register.php)

    #59815
    Detective
    Member

    Hi!

    I don’t use BBPress in that site, i’m installing it on another site, and there the code i posted works :)

    #59814
    avatarx
    Member

    Hey Detective, thanks for the code snipet. I checked out your site and I see it on your sidebar in the forums but not on your main WP sidebar? BTW, nice looking site. :)

    #2219
    _ck_
    Participant

    Could they please consider using the favorites notification plugin?

    People are posting bug reports on my plugins and I am completely missing them because I don’t know to check.

    Maybe they can simply code the “extend” area to email the plugin author if there is a post on any of their plugin pages?

    #2218

    Topic: Askimet as a plugin?

    in forum Plugins
    Null
    Member

    Would’t it be much easier to make Askimet a plugin? With an admin page where you can enter you askimet nr and perhaps see how many posts where blocked by it.

    This would make using Askimet much easier…

    Is this possible and who can make this? :)

    _Null

    #59861

    In reply to: bbMenu 1.2 released!

    Null
    Member

    No problem mate, it only seems fair to me to credit the right persons.

    Also, don’t put too much energy into the double-click bug. I am currently working on version 2 and it’s using jQuery instead of all the scripts it’s using now (like prototype). So the current double-click feature will be replaced by jQuery :)

    #2217
    _ck_
    Participant

    Is there a way via config.php or similar to override the local path? I thought it was BBPATH but I tried forcing that to something different and it’s not working, it’s still looking at the old path for the templates?

    UPDATE: ah, I see the problem now. Even if you are using the default template, if you have changed your template and then changed it back to default, bbpress rememebers it as a custom template selection, not the default

    so in template-functions.php ~line 17

    if ( file_exists( bb_get_active_theme_folder() . $file) ) {

    it thinks there is a custom theme and tries to load it’s known path stored in the db, rather than looking at BBPATH

    For now I just deleted “bb_active_theme” from the topic meta table and it reverted to the default path off BBPATH, yay!

    A minor bug I can put into trac.

    #59813
    Detective
    Member

    This is what i do in my sidebar (in WP and BB):

    <form action="<?php bloginfo('url') ?>/wp-login.php" method="post">
    <label for="log">Usuario<br /><input type="text" name="log" id="log" value="" size="22" /></label>
    <label for="pwd">Password<br /><input type="password" name="pwd" id="pwd" size="22" /></label>
    <input type="submit" name="submit" value="Ingresar" class="button" />
    <label for="rememberme"><small><input name="rememberme" id="rememberme" type="checkbox" checked="checked" value="forever" /> Recordarme</small></label><br />
    <input type="hidden" name="redirect_to" value="<?php echo $_SERVER['REQUEST_URI']; ?>"/>
    </form>

    #59812
    avatarx
    Member

    I just downloaded Firefox w/Firebug and looking at the message it appears to be related to another plug-in I am using. Otherwise I think it works fine, but it’s looking like more customization than I want to do right now for those behaviors I was talking about. I think I’ll just stick with what I have, but thanks to both for your help! I’ll provide a link to my site once it’s live, right now it’s kind of a mess. ;)

    #59859

    In reply to: bbMenu 1.2 released!

    M
    Member

    Lookin’ good :)

    One thing. In Omniweb double-clicking doesn’t work. In Safari/Camino it does, and in Firefox triple-clicking works, but you covered that one in the readme. I’ll look into it though… it might be an error on my part.

    #59826
    Inquirer
    Member

    Hi ck:

    [Remember that the date will be relative to worldwide visitors unless you list the timezone (which will be meaningless to people far outside the timezone).]

    The time isn’t of concern. I would like it to initialize to my time zone of U.S Central.

    Actually, I prefer to display the date format you have implemented in the the mouseover without implementing a mouseover rather than the current number of days format.

    What would be the code and which file is it located?

    Thank you for your response to my inquiry.

    #2215

    Topic: bbMenu 1.2 released!

    in forum Plugins
    Null
    Member

    Hi,

    Just released the last version of bbMenu. bbMenu 1.2 has some several bug fixes and minor code improvements:

    – bbMenu now uses the bb_admin_add_submenu hook

    – Fixed a bug that caused bbMenu to crash on some servers (thanks box87)

    – Some code cleanup and optimalisations (thanks box87)

    – Some template changes. If bbMenu is deactivated, the header now adapts and wont crash

    Note that bbMenu 1.2 is not compatible with bbPortal 1.2 and bbPress pre 0.8

    This is also the last version I release using the prototype libary. The next version will be jQuery based and smaller in size.

    You can download bbMenu 1.2 here:

    http://www.bbportal.org/bb-downloads/bbmenu1.2.zip

    #59855
    so1o
    Participant

    vlp..

    you said you want to show the favorites in the wordpress profile.

    http://www.tasty.sk/forum/profile/username/favorites

    this is the link to the bbpress profile page.

    i am confused now :) can you try to explain again what are you trying to do?

    #59854
    vlp
    Member

    I change it, know there is no error, but no favorite forum shows up.

    The deal is that my favorites dissaper, if I point my browser to http://www.tasty.sk/forum/profile/username/favorites, it redirects me to http://www.tasty.sk/user/username//favorites

    It worked before, but probably I changed something so I thought maybe I create another favorites page :)

    #59853
    so1o
    Participant

    yup use it in wordpress.. if i understand you right.. you want to show it on the wordpress profile page right? the one which is

    <you website.com>/wp-admin/profile.php

    try changing the code to

    <?php if ($topics): foreach ( $topics as $topic ) : ?>

    ..

    ..

    ..

    ..

    ..

    <?php endforeach; endif; ?>

    #2214

    Topic: Add New Post Link

    in forum Plugins
    howtogeek
    Member

    Figured I’d throw this out there… I made a tiny function to generate a “reply” link anywhere in the topic. I’m using it in the post meta area to let the user quickly go to the post reply box.

    function geek_post_reply_link(){
    global $topic;
    echo '<a href="'.get_topic_link($topic->topic_id,get_page_number( $topic->topic_posts )) . "#postform".'">Reply</a>';
    }

    I couldn’t find anything else similar, so I thought I’d share.

    #59852
    vlp
    Member

    So if I understand right, I should use this code as a WP plugin?

    I tried that and I get an error:

    Warning: Invalid argument supplied for foreach() in /home/tasty.sk/tasty.sk/www/wp-content/plugins/bbpress-favorites.php on line 30

    It is shown in profile main page…it is possible to create another separate page for that?

    #59248
    Null
    Member

    hmmm nice, i miss a download button :) (in the plugin list to download the latest files)

    #59851
    so1o
    Participant

    here is the hacked code.. this will show the favorites on profile page in the admin section of wordpress. I haven’t tested it but this is the basic idea.

    please note that the wordpress must be integrated both ways before you can do this. visit this for more

    add_action('show_user_profile',
    'my_plugin_show_favorites');

    function my_plugin_show_favorites() {
    $topics = get_user_favorites( $user->ID, true );
    ?>
    <br clear="all" />

    <table width="99%" border="0"
    cellspacing="2" cellpadding="3">
    <tr>
    <th><?php _e('Topic'); ?></th>
    <th><?php _e('Posts'); ?></th>
    <th><?php _e('Freshness'); ?></th>
    <th><?php _e('Remove'); ?></th>
    </tr>

    <?php foreach ( $topics as $topic ) : ?>
    <tr<?php topic_class(); ?>>
    <td><a href="<?php topic_link(); ?>">
    <?php topic_title(); ?></a></td>
    <td class="num"><?php
    topic_posts();
    ?></td>
    <td class="num"><small><?php
    topic_time();
    ?></small></td>
    <td class="num">[<?php
    user_favorites_link(
    '',
    array('mid'=>'x'),
    $user_id
    );
    ?>]</td>
    </tr>
    <?php endforeach; ?>
    </table>

    <div class="nav">
    <?php favorites_pages(); ?>
    </div>
    <?php

    }

    #59850
    _ck_
    Participant

    Actually, it would be fairly easy to do.

    All we need to do is hook into the header or footer.

    My initial idea was javascript popups but those are bad because they stop all webpage loading at that point. If we hook the header we can insert a z-indexed hover div with the information.

    The service would be passed a user_id, the message, and an action url. Optionally instead of a user_id, it could be the term “administrator” or “moderator” where it would alert all at that level.

    The box would have a close button to ignore it and all the messages would then be accessible as a list under your profile under a new tab.

    You’d have an option to be emailed anytime an alert was generated but typically you can keep that off unless you don’t visit the site often.

    I was going to do this for my “report this post” plugin but I really needed the report feature right away so I got lazy and just used email.

    Sounds like I have a new plugin to code next weekend.

    :D

    #59811
    fel64
    Member

    Can you link us to it?

    The login functions that logs you into bb redirect you to the forums. It may be possible to change that behaviour but I’m not immediately sure how – probably using an action or filter, possibly the action bb_user_login.

    #59825
    _ck_
    Participant

    Remember that the date will be relative to worldwide visitors unless you list the timezone (which will be meaningless to people far outside the timezone).

    What I do on some code is list the freshness in plain english but make the title of the element the original time.

    ie.

    <span class=timetitle title="<?php echo date("r",strtotime($topic->topic_time)); ?>"><?php topic_time(); ?></span>

    Then when you mouse over the “3 days ago” it will show you the original time (in mysql format which can be changed). Then use CSS to make a light underline so the user knows it has some kind of function.

    #59824
    Ziyphr
    Member

    http://uk3.php.net/manual/en/function.date.php

    Don’t have access to the code right now so not sure where in bbPress you need to edit.

Viewing 25 results - 29,276 through 29,300 (of 32,446 total)
Skip to toolbar