Skip to:
Content
Pages
Categories
Search
Top
Bottom

Search Results for 'code'

Viewing 25 results - 32,151 through 32,175 (of 32,294 total)
  • Author
    Search Results
  • #50568
    zapata
    Member

    (scratching head) can’t make head or tail of this, being such a n000b… I know there is a .htaccess file. Is there some line or code I have to insert in there to prevent users from accessing my forum?

    How can I prevent readers registering? Even if I don’t give a link or hide “register” link… they may find the page to register…

    #50485
    AphelionZ
    Participant

    This is very hacking debugging but I put another print statement in, this time inside the custom function which prints “the code is being executed”

    when the wpbb_user_sanitize function and that does not display on the page at any point during any sort of login, successful or unsuccessful.

    Is there anything else you can suggest?

    Shawn Maddock
    Participant

    adergaard, first of all, thanks for the suggestions. I think we’re talking about three different things. nolageek wanted a list of most recent registrations (similar to what shows on the dashboard, I assume, with less info); I was looking for a sortable list of all registered users, and the suggestions you posted would be a recent activity or “currently online”. Now that you mention it, though, I think I may add your ideas too. :-)

    adergaard
    Member

    This is meant as help, not as condecending in any way.

    Best tip right now is to create one yourself.

    Do this (in psuedo code):

    – create a table that holds session_id, user_id, and timestamp.

    – add a hook for when any page is requested (or ugly way would be to add a call to a function in the header-template).

    – The function you call in the header should insert session_id, user_id, and timestamp if the session_id doesn’t already exist. if exist, update it instead. The function should also start by deleting rows older than X minutes (look at time stamp and compare to NOW() )

    – in footer file or where ever, make a call to another function you create that populates the values from the table holding session_id, user_id, and timestamp. The rows with a user_id != null -> logged on members. The rows with user_id == null, visitors.

    For the most recent user, add “SELECT * FROM bb_users ORDER BY user_registered DESC LIMIT 1”. Wrap it in a function and call it from the footer or where ever you want to display it.

    Done.

    #797
    adergaard
    Member

    in bb_users there’s a column called display_name. I think that most will want to use it since otherwise they’ll have a display name = user logon = one-word-name.

    so, basically is it worth the effort that I write code for that one myself or is this a soon to come thing from you guys?

    This question could also have been about the column user_nicename I think. None of them are used as far as I can see, or am I missing something?

    Anyways, thanks for this forum code, it’s really simple and really good.

    #50496

    In reply to: post count – 1

    Shawn Maddock
    Participant

    Thanks mate; that worked awesome! I added a second function so the forum count was corrected also:

    <?php

    function bb_decrement_topic( $value ) {

    return $value-1;

    }

    function bb_decrement_forum( $value ) {

    global $forum;

    return $value-get_forum_topics();

    }

    add_filter( 'get_topic_posts', 'bb_decrement_topic', 1);

    add_filter( 'get_forum_posts', 'bb_decrement_forum', 1);

    ?>

    I also had to change line 699 in template-functions.php to:

    $posts = sprintf('%1$s %2$s', $post_num, __ngettext( 'reply', 'replies', $post_num ));

    If anyone has a suggestion for doing this in the plugin instead of modifying the core, let me know.

    #49858
    wizbor
    Member

    Yes right at the top right after <?php

    The congfig.php file at the bottom where it asks about wp intigration also has a statement.

    //define(‘WP_BB’, true); When I uncokmmented that it failed so I changed WP_BB to wp_bb and it worked. I’ve set up the wp url and siteurl as well. This all works.

    So when I added your code to the top I’ve tried all combinations, that is, lowercase, commenting out the define(‘WP_BB’, true); at the bottom of the config file etc.

    Thanks for responding!

    Rob


    #799
    jasonmez
    Member

    Okay, first thing’s first… if this is the forum on the bbPress site itself, it really needs to be a bit more of a better example. As it is, when I get to the forum I’m first faced with a giant tagcloud, then I have to scroll all the way down past a huge list of posts to get to the actual individual forums such as this one. Of course, I could hit the button to start a new topic at the top of the top of the page but not only is that counterintuitive, it’s a really bad idea in general that will get people just Pcoming in and posting without looking at other posts first. I’d hoped the layout would have been changed by now at least.

    Second problem, and this is one I’ve had on the wordpress forums as well but never bothered to ask about it. At the bottom of the post box it lists allowed tags (shortly after mentioning “Enter a few words (called tags)” with a link to the tagcloud rather than a definition of tags), but what gets me is “Put code in between backticks.” I’ve been running forums since before ISPs could offer residential Internet connections and yet I have absolutely no clue what that means. Unless this software is only meant for WordPress users (which I’m one of, btw), it would be best to get a bit more accessible to ordinary people in terms of language/jargon.

    My other large beef is that the forums read like blog comments rather than forum discussions. Threading would be my number one request if I intended to use it. I guess my number two request would be integrating said threaded comments into the comments section of blog entries for those using it with a WP blog, though that’s a lot more complicated. I’d want to start off with the other way around by having the blog able to automatically display posts from certain sections such as Announcements and such. I’m not sure if that functionality exists yet, so apologies if it does. If not, I suppose a workaround could be reading the rss feed from that section into the blog section, but aggregating your own feeds is a fairly silly notion.

    That’s it for initial feedback right now. I may come take another look when the software has matured a bit… by that I mean the core, it shouldn’t have to depend on plugins and themes to have very basic funcionality on its own.

    Jason

    Ps. Oh, and I’ve had strange issues logging in here on two seperate occasions.

    #50544

    In reply to: Cookies

    salatti
    Member

    It works good!! :)

    Thank you very much!!

    #50483

    Strange – it worked for me.

    Make sure that userspace.php has no whitespace before the <?php or after the ?>

    #50646
    edwinkort
    Member

    Thanks :) I just found out

    #50563

    Try

    $bb->wp_home = 'http://passionforcinema.com';

    $bb->wp_siteurl = 'http://passionforcinema.com';

    #50629

    No easily.

    Try:

    <a href="<?php user_profile_link( $topic->topic_last_poster ); ?>" title="User Profile"><?php topic_last_poster(); ?></a>

    #50543

    In reply to: Cookies

    In addition to editing bbPress’ cookie information, you will have to edit WordPress’:

    for both bbPress and WordPress

    the domain should be .salatti.net (note the first .)

    the path should be /

    So in bbPress’ config.php:

    $bb->cookiedomain = ‘.salatti.net’;

    $bb->cookiepath = ‘/’;

    in WordPress’ wp-config.php:

    define(‘COOKIE_DOMAIN’, ‘.salatti.net’);

    define(‘COOKIEPATH’, ‘/’);

    define(‘SITECOOKIEPATH’, ‘/’);

    Let us know how it works.

    #50609
    Atsutane
    Member

    Just login to your db using phpMyAdmin and delete all bbpress related database :) I think it should start with “bb_”

    #50608
    marky
    Member

    You can search here: https://bbpress.org/forums/search.php

    (I have no idea why there isn’t a link to that page from the main page, or even in the main bbPress theme, but that’s a different topic altogether. ;-)

    As far as I understand, to uninstall and re-install you’d only have to drop the tables from the database. Unless you changed the template files or something, I don’t think you’d need to delete any of the files.

    #49682

    In reply to: Ultimate BBpress Guide

    edwinkort
    Member

    Tried this again, but still the same error :( This time I even used a text editor for coding, so I could see if there was something wrong.

    #794
    Atsutane
    Member

    PHP Warning: rawurlencode() expects parameter 1 to be string, array given in /home/spider/public_html/wp/wp-includes/classes.php on line 1658

    Well i have that problem when i integrate my bbpress with wordpress. It only happen when i view “manage->post” and “manage->pages”. I already edit the classes.php and it only fix my “manage->post”. My “manage->pages” are still broken.

    If i disable the integration, everything work perfectly without any error. Anyone know how to fix this thing?

    #50107

    In reply to: Integration with WP

    Atsutane
    Member

    @kannued

    Actually u can load bbpress into wordpress :) I have tried it and it work perfectly. https://bbpress.org/forums/topic/61?replies=3

    #50495

    In reply to: post count – 1

    ear1grey
    Member

    Try this… copy bb-template/front-page.php to my-templates/front-page.php and then in that file find:

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

    then change ‘Posts’ to ‘Replies’. Now, in your my-plugins folder create a file called decrement-posts.php and put this in it:

    <?php

    function bb_decrement( $value ) {

    return $value-1;

    }

    add_filter( 'get_topic_posts', 'bb_decrement', 1);

    ?>

    #50635
    Nola1974
    Participant

    Changes I made:

    example: http://overnights.org/profile/2

    style.css

    #userinfo { margin: 10px 0 5px; width:45%; float:left;}

    #userinfo dt { font-weight: bold; }

    #userinfo dd { margin: 0 0 5px; }

    #useractivity { margin: 10px 0 5px; width:45%; float:right;}

    #useractivity dt { font-weight: bold; }

    #useractivity dd { margin: 0 0 5px; }

    profile.php

    <?php bb_profile_data(); ?>

    <div id="useractivity">

    <h3><?php _e('User Activity') ?></h3>

    <dt><?php _e('Recent Replies'); ?></dt>

    <?php if ( $posts ) : ?>

    <?php foreach ($posts as $bb_post) : $topic = get_topic( $bb_post->topic_id ) ?>

    <dd><a href="<?php topic_link(); ?>"><?php topic_title(); ?></a> <?php if ( $user->ID == $bb_current_user->ID ) _e('You last replied'); else _e('User last replied'); ?>: <?php bb_post_time(); ?> ago.

    <?php

    if ( strtotime(bb_get_post_time()) < strtotime(get_topic_time()) ) {

    echo ' <span class="freshness">'. __('Most recent reply: ');

    topic_time();

    echo ' ago.</span>';

    } else {

    echo ' <span class="freshness">'. __('No replies since.') .'</span>';

    }

    ?>

    </dd>

    <?php endforeach; ?>

    <?php else : if ( $page ) : ?>

    <?php _e('No more replies.') ?>

    <?php else : ?>

    <?php _e('No replies yet.') ?>

    <?php endif; endif; ?>

    <dt><?php _e('Threads Started') ?></dt>

    <?php if ( $threads ) : ?>

    <?php foreach ($threads as $topic) : ?>

    <dd><a href="<?php topic_link(); ?>"><?php topic_title();

    ?></a> <?php printf(__('Started %s ago'), get_topic_start_time()) ?>

    <?php

    if ( strtotime(get_topic_start_time()) < strtotime(get_topic_time()) ) {

    echo '<span class="freshness"> '. __('Most recent reply: ');

    topic_time();

    echo ' ago.</span>';

    } else {

    echo '<span class="freshness"> '. __('No replies.') .'</span>';

    }

    ?>

    </dd>

    <?php endforeach; ?>

    </div>

    #50494

    In reply to: post count – 1

    Nola1974
    Participant

    No, I see what he means. Saying “1 post” is redundant.. if there wasn’t one post in that topic, the topic wouldn’t exist. :) It should say “REPLIES” and list the number of posts in the topic, minus 1 (the original post.)

    How we do that, I have no idea.. I’m still trying to find a list of template tags and attributes.

    #50616

    In reply to: deleting users

    Nola1974
    Participant

    btw, my installation is at http://overnights.org – come log on while I figure this out.. overnighters, unite! :)

    #50559
    AphelionZ
    Participant

    The quickest way to hide the forums is to simply delete the elements from the UI in the templates. Do you edit HTML or know somebody that does?

    Just use <!– and –> to comment out the registration link, or comment out the php that renders it

    You can also use an .htaccess file to make your forums directory password protected with a master user:pass.

    If this is over your head, like i said, ask somebody. ask me! :)

    The login problem seems to be troubling a lot of people, including myself.

    #50552
    bpartch
    Member

    Hello

    There is apparently some issue with the install or something as it is not getting your .css file. If you try to visit the .css url you get an internal server error:

    http://n22.awardspace.com/forums/bb-templates/style.css

    I am not sure what the easiest way is to fix this but I would uninstall and reinstall it again making sure all the stuff in the config.php file is accurate.

    Someone else may have a easier solution.

    Hope this helps. :)

Viewing 25 results - 32,151 through 32,175 (of 32,294 total)
Skip to toolbar