Skip to:
Content
Pages
Categories
Search
Top
Bottom

Search Results for 'code'

Viewing 25 results - 31,301 through 31,325 (of 32,431 total)
  • Author
    Search Results
  • #52608
    chrishajer
    Participant

    Could it be related to the extra closing </li> around line 181 in the rendered source of the front page? (I doubt it, but just taking another look.)

    #52606
    Anonymous User 96400
    Inactive

    i tried that already, but the problem is that this </div> is needed. if i remove it, then it breaks the frontpage. look here.

    #53682

    In reply to: query/php problem

    chrishajer
    Participant

    I don’t know anything about your plugin, but why not put the OR in the PHP, similar to how WordPress checks for pages or posts:

    <?php if(is_home() || is_single() || is_page()) {

    whatever;

    } ?>

    Maybe you could put the logic in the PHP? I don’t understand what the plugin does, but the value in the database seems odd to me.

    so, for your application:

    <?php if ((bb_get_location == front-page) || (bb_get_location == topic-page)) {

    give the ID;

    } ?>

    #52605
    chrishajer
    Participant

    You have an extra </div> before <div id="sidebar">. Remove that and I think it will be fine.

    #1292
    Null
    Member

    Hi,

    I have made a new plugin, works great, but I have one little problem with it.

    Here is the php code/query/function and how the table looks:

    http://www.sourceskins.com/problem.jpg

    What does it do?

    Well it checks if the page id == location. If so, give a id named current. This works. The problem is the first line (see the db table in the jpg). Look at location. I have entered 2 values in location: front-page || topic-page

    I have used || in it the split them.

    The idea was: if bb_get_location == front-page OR topic-page give the id. So it had to look if it matches a record from that row.

    Problem is, it aint working cause it will spit out: front-page || topic-page and the code isn’t able to look for a match.

    How can I solve this? Any ideas?

    #53676
    ardentfrost
    Member

    I don’t think you want a hook, you want get_user_type($id)

    #1290
    Geezerjim
    Participant

    I am fleshing out my plugin Graphic-display-ranks and I’m looking for the right hook to use to do the following:

    I want to find out if a topic author is the Key Master or a moderator. Here is what I have so far —

    function get_special_rank () {

    global $special_rank, $use_special_rank, $bbdb;

    if ($use_special_rank==1)

    {$title_for_rank=<strong>I NEED THIS HOOK</strong>( get_post_author_id() );

    switch ($title_for_rank) {

    case "keymaster" :

    $special_rank=1;

    break;

    case "moderator" :

    $special_rank=2;

    break;

    default :

    $special_rank=0;

    }

    }

    else

    {

    $special_rank = 0;

    }

    return $special_rank;

    }

    Can anyone point me in the right directon?

    #1288

    Topic: Newsletter by email

    in forum Plugins
    flaerpen
    Member

    Hello, I would like the function to send newsletter by email to members in my bbpress forum! I know the emails is saved in the database (or?) so this would not be any problems to integrate or make an plugin, i think. The only problem is that I’m not the man for this job ;)

    #1286
    gogarth
    Member

    BBPress seems to use the kind of cookie that resides on the user’s machine unless they actively log out.

    Can anyone help me modify/ add custom code (or point me to a useful plug-in :) ) so that its lifetime is limited to the session only?

    Also, should I be using something like session_cache_limiter(‘nocache’) for further privacy, or is this already taken care of?

    I have recently installed the excellent Private Forums plug-in as an alternative to using the more cumbersome HTTP authentication method, which has prompted me to think about this potential security issue. Private Forums is only truly secure if the user remembers to log out.

    #53640

    You mean ascending? ^^

    It think currently this can only be done by hardcoding. Look at functions.php around line 44-66 and you can change

    $bb_last_countable_query = "SELECT * FROM $bbdb->topics $where ORDER BY topic_time DESC LIMIT $limit";

    to

    $bb_last_countable_query = "SELECT * FROM $bbdb->topics $where ORDER BY topic_time ASC LIMIT $limit";

    But then every post-listing will be ordered as ascending.

    This is the only way I can figure out at the moment…

    #53623
    spencerp
    Member

    I just wish they’d include the Forum Categories enhancement into .80 though lol. It sure Would Be NICE!!! LoL =P

    /It IS working just great by the way, I didn’t see any flaws with it.. ;) :)

    spencerp

    #53037
    Geezerjim
    Participant

    I was having the same issue at Forums4Bauer I am using a modified version of the bbPress forum template. One thing I did was widen the whole thing, but to get rid of the hidden long names I made the following changes to the style.css file in my-templates:

    #thread {

    background: #eee;

    list-style: none;

    margin: 0 0 0 110px;

    padding: 0;

    }

    #thread li {

    padding: 1.5em 1.0em;

    line-height: 1.5em;

    height:100%;

    }

    #thread li ol, #thread li ul {

    margin-left: 60px;

    height:100%;

    }

    .threadauthor {

    margin-left: -140px;

    overflow: hidden;

    position: absolute;

    width: 100%;

    }

    I also added:

    .threadpost {min-height:120px;}

    Unfortunately that doesn’t work in IE. I’m looking for a way around a problem I’m having where short replies overlap. That’s not typically a problem, but I’m using my Graphic Display Ranks plugin, and images that are taller than some of the replies.

    Hope this helps.

    #53036
    chrishajer
    Participant

    In style.css, can you do something like this:

    .threadauthor {

    margin-top: -20px;

    margin-left: -110px;

    /* overflow: hidden;*/

    position: absolute;

    width: 95px;

    }

    So, no more hidden overflow and move the threadauthor up 20px, which lets it bleed over to the right into the post area, but it doesn’t overwrite any text.

    For the few instances where the author is too long, this might be a good solution. In my forum, less than 5% of the users have used a long name.

    Another solution would be to make the font smaller or tighten up the font spacing, or even jigger the widths of the columns, but those are more major surgery for a simple display problem.

    #53035
    Trent Adams
    Member

    If you edit your style.css sheet in /bb-templates/ and go down to the portion that says:

    /* Topic Page

    =================================== */

    That is where you will need to edit your file. I am not sure, but changing this one might be what you are looking for:

    .threadauthor small { font: 11px Verdana, Arial, Helvetica, sans-serif; }

    Trent

    #50585
    Trent Adams
    Member

    No problem zapata. To get rid of the register link, you need to download login-form.php from /bb-templates/ and then edit it as follows:

    Change this part from:

    <p><?php printf(__('<a href="%1$s">Register</a> or log in'), bb_get_option('uri').'register.php') ?>:</p>

    to get rid of the register, you could just comment out this line or change the wording:

    <! -- <p><?php printf(__('<a href="%1$s">Register</a> or log in'), bb_get_option('uri').'register.php') ?>:</p> -->

    Once you have edited that file, upload it to a new folder (if it doesn’t exist already in root) /my-templates/ as bbPress will use that file first and if it doesn’t exist, go back to the one in /bb-templates/

    As for the registering with WordPress, I was only referring to the abilitity to turn on or off registration in WP admin. If you turn it off, then you can add the members you want through the admin.

    That should get you going!

    Trent

    #50581
    zapata
    Member

    Trent,

    WOEEEZZZZZZZZZAAAAAAAAAAA…. sorry for the excitement… the code works!!!!!

    Gurus… one request… how can I completely “Eliminate” anonymous user registration… the goal of my forum is for a private discussion of authors who write on the main blog to communicate with each other. Hence all users of the forum will be actually authors of the blog.

    #50579
    Trent Adams
    Member

    From Ardentfrost.

    <?php

    /*

    Plugin Name: Force Login

    Description: No one can see your forums unless they are logged in.

    Plugin URI: https://bbpress.org/forums/topic/117

    Author: Michael D Adams

    Author URI: http://blogwaffe.com/

    Version: 0.7

    */

    function force_login_init() {

    if ( !bb_is_user_logged_in() && false === strpos($_SERVER['REQUEST_URI'], 'bb-login.php') ) {

    if ( file_exists( BBPATH . 'my-templates/login.php' ) ) {

    require( BBPATH . 'my-templates/front-page.php' );

    } else {

    require( BBPATH . 'bb-templates/front-page.php' );

    }

    exit;

    }

    }

    add_action( 'bb_init', 'force_login_init' );

    ?>

    That will work.

    Trent

    #53627
    chrishajer
    Participant

    Usually those “cannot modify header” errors are due to whitespace before the <?php or at the end after the ?>

    Is that possible?

    #50578
    zapata
    Member

    Trent, Thanks for the quick reply. There are no errors. The objective was to hide the forums from everyone who is not logged in. For this the mdawaffe’s plugin (code posted in his post above) was working on my initial install (0.74)… but I’ve installed the 0.75 yesterday and reinstalled the plugin, but upon logging out, I’m still able to browse the forums…

    the url: passionforcinema.com/club

    #53621
    spencerp
    Member

    Awesome! Thanks Sam! I’ll jump on all of this real soon. Thanks again! :D ;)

    spencerp

    #53633
    spencerp
    Member

    Yep, and, even though Michael Adams made the newer version of the bbPress Integration plugin. Ryan Boren added two stubs in the 2.1 wp-includes/ folder, holding the same name as the original two.

    So, these two calls:

    require_once( ABSPATH . WPINC . ‘/registration-functions.php’ );

    include_once (ABSPATH . WPINC . ‘/rss-functions.php’);

    In any WordPress or bbPress plugins, you’ll still be safe! Inside those two stubs are:

    registration-functions.php file:

    <?php

    // Deprecated. Use registration.php.

    require_once(ABSPATH . WPINC . '/registration.php');

    ?>

    rss-functions.php file:

    <?php

    // Deprecated. Use rss.php instead.

    require_once (ABSPATH . WPINC . '/rss.php');

    ?>

    Happy 2.1 Upgrading and bbPress Integrating peoples.. :D ;)

    spencerp

    #53625
    Null
    Member

    Found the bug.

    When loading the admin it also includes the new file: menuhead.php. In that file there is a line: <?php ajax_show_javascript(); ?> and that gives this error: <b>Fatal error</b>: Call to undefined function ajax_show_javascript() in <b>bb-admin/menuhead.php</b> on line <b>6</b>

    Why is that? Well the new admin page DOES use this ajax_show_javascript but all others don’t. That also explains that only the menu admin page is working and all others aint.

    But how the hell can I fix this? Will an if work? If page = admin-base.php?plugin=menu_admin_page include menuhead.php or something? Any other suggestions?

    At the moment, menuhead.php is called using a include or is this fixed if I use the new admin_head hook in 0.8?

    #53618
    Null
    Member

    Quote:

    ...the new and improved 0.8 version that should be released pretty soon...

    Stop teasing us!!!

    :)

    #53617
    spencerp
    Member

    The only thing I’m worried about now is, the fact that I’m running the Forum Category enhancement. I’ve currently modified the 0.8alpha files, however, I haven’t gotten the “latest” svn commits yet, including what you’ve mentioned above..

    I *could* just manually keep editing my files, as they come through the email list, but IMHO, it’d be more of a pain in the arse that way sigh. I guess what I’m saying is, I’d love it if they’d implement that Forum Category option into 0.8, rather then 1.0.

    It’s running just fine for me, except for customizing the look of it and such. The other thing is, it’s really a pain in the arse as it is now, because I’ve implemented my blog’s theme around the forums themselves.

    So either way, I’m screwed with tons of file edits. :( I don’t know though, I’m too tired at this point to even do any file editing/uploading.. Maybe when I get up later, I’ll handle some of this stuff..

    As for the plugins, I’m hoping Josh takes care of his lol. His plugins are about the only plugins I have going, besides the normal original bbPress plugins lol. Anyway, enough of my rambling, I’m tired as heck, and everyone’s tired of it anyway… so.. later people..

    spencerp

    #53411

    In reply to: for each question

    Null
    Member

    Got it fixed, this topic can be deleted :D

Viewing 25 results - 31,301 through 31,325 (of 32,431 total)
Skip to toolbar