Skip to:
Content
Pages
Categories
Search
Top
Bottom

Search Results for 'code'

Viewing 25 results - 22,201 through 22,225 (of 32,481 total)
  • Author
    Search Results
  • #76939
    Michael
    Participant

    @chandersbs: I see – well that’s also cool – it looks nice on your site. :)

    #76938

    I’m writing this from an mobile phone so apologies if you have to double check the code:

    $post_timestamp = strtotime( $result->topic_start_time );

    $current_timestamp = time();

    $time_difference_in_seconds = $current_timestamp – $post_timestamp;

    $number_of_seconds_in_24_hours = 86400;

    if($time_difference_in_seconds < $number_of_seconds_in_24_hours)

    {

    echo date(“H:i a”t, $post_timestamp) ;

    } else {

    echo date(“jS F”, $post_timestamp) ;

    }

    Its the long winded way of writing things, but I find its slightly easier to follow what’s going on. Oh and you probably don’t need to assinn all the variables, i just did it so i didn’t have to comment the code :)

    #76937
    chandersbs
    Member

    It’s slightly different now, but still some work needed i think, see output:

    Recente topics

    21.42 → Australische firma bouwt snaarloze gitaar met touchscreen
    19.35 → Apoplectic sluit contract met Mexicaans promo bedrijf af
    19.22 → Nieuwe video HIM online
    24 Jan → Dimmu Borgir frontman lanceert "The Wrath of Shag"
    21 Jan → The Headbangers Ball - 21 januari 2010 (GEEN AFLEVERING)

    it gives the impression as if the first 3 topics where created TODAY, which is not true. it should show the day of yesterday :S

    only topics created today should have the hour:minute format :(

    #76936
    Ben L.
    Member

    chandersbs: In that case, try date( strtotime( $result->topic_start_time ) < floor( current_time( 'timestamp' ) / 86400 ) * 86400 ? 'F j' : 'H.i', bb_offset_time( strtotime( $result->topic_start_time ) ) )

    #76935
    chandersbs
    Member

    Hey Ben L.,

    Thanks, that’s what I wanted. Or actually i did describe what i wanted wrong :(

    21.42 → Australische firma bouwt snaarloze gitaar met touchscreen
    19.35 → Apoplectic sluit contract met Mexicaans promo bedrijf af
    19.22 → Nieuwe video HIM online
    16.54 → Dimmu Borgir frontman lanceert "The Wrath of Shag"
    21 Jan → The Headbangers Ball - 21 januari 2010 (GEEN AFLEVERING)
    21 Jan → DJ Dino in Fat S 29Jan2010

    The items published less than 24 hours ago, IS showing as i wrote before, but i what i didn’t think, was that it would even show items published yesterday as that time format. i was hoping that only items published TODAY would list in that time format and items older than today, would have that other time format.

    A bit my fault, i didn’t describe it properly, cos i didn’t know that this was a possibility.

    #76934
    Ben L.
    Member

    Instead of $result->topic_start_time, you want date( strtotime( $result->topic_start_time ) < time() - 86400 ? 'F j' : 'H.i', bb_offset_time( strtotime( $result->topic_start_time ) ) )

    That should fix the date offset problem and give you the date formats you want.

    #76932
    chandersbs
    Member

    thanks for the help chrishajer, but that code is not working, instead it returns an error :S

    @michael if i hate the option, i’d have all items published less than 24 hours ago, show like this:

    22:35 → Apoplectic sluit contract met Mexicaans promo bedrijf af
    22:22 → Nieuwe video HIM online

    As you can see, only Hour and minutes.

    Articles older than 1 day, would be displayed as this:

    23.01 → Apoplectic sluit contract met Mexicaans promo bedrijf af
    22.01 → Nieuwe video HIM online

    As you can see only day and month.

    Sadly i can’t seem to fix how the timestamp should look. another issue i’m facing is that its showing a different time in that list than the website has, its not picking up the default local time as it should.

    #84261
    Gautam
    Member

    :-)

    Olaf Lederer
    Participant

    The main difference is that new post are done on the website and not from the backend. Everything else looks a lot like wordpress. I’m sure if you create a wordpress theme which looks like a forum theme you can use wordpress as forum (except the new topic/post function)

    :)

    #76931
    Michael
    Participant

    @chandersbs – Thanks for sharing this, I’ll be sure to try it out. :)

    Would you possibly want it to have the date displayed in this format: x seconds/minutes/hours/days ago ?

    chrishajer
    Participant

    Can you rename it temporarily to get through the installation? Or, if you configure bb-config.php before starting the installation, does that get around this check? If not, then you might need to comment out the check in the installer code to get around this silly restriction.

    #76930
    chrishajer
    Participant

    I think instead of this:

    $result->topic_start_time

    you can do this:

    echo date ('F j', strtotime($result->topic_start_time))

    Worth a shot anyway…

    chrishajer
    Participant

    Is there a file called config.php in this directory or one level up? I think bbPress chokes on that too.

    Renaming should not break the installation. You can rename the folder bbpress to whatever you want. Many people use forum or forums (as it is here.)

    #25983
    chandersbs
    Member

    Hey guys,

    Today I managed to display a list of topics on my website. A list of the 10 LAST created topics.

    Here’s the code:

    <!-- dit genereert een lijst met topics -->
    <div id="recentetopics">
    <h2>Recente topics</h2>
    <ul>
    <?php
    global $bbdb;
    $query="SELECT * FROM bb_topics WHERE topic_status=0 ORDER BY topic_start_time DESC LIMIT 10";
    $results=$bbdb->get_results($query);
    foreach ($results as $result) {
    echo "<li>".$result->topic_start_time." &rarr; <a href='/topic.php?id=".$result->topic_id."'>".$result->topic_title."</a></li>";
    }
    ?>
    </ul>
    </div>
    <!-- einde lijst topics -->

    The problem I’m having with this code is the layout of the timestamp.

    It’s like this:

    2010-01-25 00:42:07 → Australische firma bouwt snaarloze gitaar met touchscreen
    2010-01-24 22:35:44 → Apoplectic sluit contract met Mexicaans promo bedrijf af
    2010-01-24 22:22:45 → Nieuwe video HIM online

    How can I change that timestamp into something more nice, like “january 25” or something.

    Thanks a lot.

    #66578

    hi,i think that i have solved it!

    i have a hostmonster.com account,so i change one domains folder to another domains folder.like xxx.com/bbs====>yyy.com and then i take some hours to test some solutions and at last i make my webistes work well. hehe.

    my solution is that: change 2 data of database.

    look below:

    [bb_forums]====> [1 xxx.com/bbs]


    >[1 yyy.com]

    [bb_meta]====> [3 bb_option 0 uri http://xxx.com/bbs%5D


    > [3 bb_option 0 uri http://yyy.com]

    if oke,please feedback a comment!

    #82533
    pator
    Member

    I’ve been two days trying to integrate WP 2.9.1 and BBPress 1.0.2.

    I’ve tried everything in this forum and the wp.org forum. Read and applied every tip.

    So now I’m posting here for help.

    I am simply trying to integrate the logins.

    the blog is site.com and the forum is site.com/foro

    I followed gerikg’s steps with no luck.

    my wp-config looks like this:

    <?php
    define('WP_CACHE', true);
    // ** MySQL settings ** //
    define('DB_NAME', '*****'); // The name of the database
    define('DB_USER', '*****'); // Your MySQL username
    define('DB_PASSWORD', '*****'); // ...and password
    define('DB_HOST', '*****'); // 99% chance you won't need to change this value
    define('DB_CHARSET', 'utf8');
    define('DB_COLLATE', '');
    /* AUTH KEYS */
    define('COOKIEPATH', '/' );
    define('AUTH_KEY', 'GENERATED1');
    define('SECURE_AUTH_KEY', 'GENERATED2');
    define('LOGGED_IN_KEY', 'GENERATED3');
    define('NONCE_KEY', 'GENERATED4');
    define('AUTH_SALT', 'GENERATED5');
    define('SECURE_AUTH_SALT', 'GENERATED6');
    define('LOGGED_IN_SALT', 'GENERATED6');
    define('NONCE_SALT', 'GENERATED6');
    $table_prefix = 'wp_';
    /* That's all, stop editing! Happy blogging. */
    if ( !defined('ABSPATH') )
    define('ABSPATH', dirname(__FILE__) . '/');
    require_once(ABSPATH . 'wp-settings.php');
    ?>

    my bb-config looks like this:

    <?php
    // ** MySQL settings ** //
    define('BBDB_NAME', '*****'); // The name of the database
    define('BBDB_USER', '*****'); // Your MySQL username
    define('BBDB_PASSWORD', '*****'); // ...and password
    define('BBDB_HOST', '*****'); // 99% chance you won't need to change this value
    define('BBDB_CHARSET', 'utf8');
    define('BBDB_COLLATE', '');
    <p>/* AUTH KEYS */
    define('COOKIEPATH', '/' );
    define('BB_AUTH_KEY', 'GENERATED1');
    define('BB_SECURE_AUTH_KEY', 'GENERATED2');
    define('BB_LOGGED_IN_KEY', 'GENERATED3');
    define('BB_NONCE_KEY', 'GENERATED4');
    define('BB_AUTH_SALT', 'GENERATED5');
    define('BB_SECURE_AUTH_SALT', 'GENERATED6');
    define('BB_LOGGED_IN_SALT', 'GENERATED6');
    define('BB_NONCE_SALT', 'GENERATED6');
    $bb_table_prefix = 'bb_';
    $bb->bb_xmlrpc_allow_user_switching = true;
    ?>

    I have enabled xmlrpc in WP and BB.

    The cookies that are being stored have the following values:

    wordpress_logged_in_SAMEHASHEVERYTIME
    username%7CNUMBER1%7CHASH1
    site.com
    /

    wordpress_SAMEHASHEVERYTIME
    username%7CNUMBER2%7CHASH2
    site.com
    /wp-admin
    /wp-content/plugins
    /foro/my-plugins
    /foro/bb-plugins
    /foro/bb-admin

    As you see the values of the cookies are not the same. Is this Ok?

    So, I get this cookies if I login to WP on site.com, then when I go to BB on site.com/foro, I am not logged in. If I login to BB on site.com/foro, I get logged out of WP on site.com.

    Every time I login, the cookies change, but “SAMEHASHEVERYTIME” is the same every time for WP and BB.

    I don’t know what I’m missing or where is the problem.

    Why aren’t they picking up the cookies?!

    Thank you.

    #84294
    Olaf Lederer
    Participant

    do you ever tried google? just enter the hook and click search :)

    johnhiler
    Member

    If you’re looking for a sneak peek into bbPress’ plugin future, you might want to install BuddyPress and see how they’ve solved these problems.

    It’s my understanding that bbPress plugins will become like BuddyPress plugins: a series of plugins on WordPress MU. BuddyPress plugins need to be “BuddyPress aware”, so that the BuddyPress plugin loads first:

    https://codex.buddypress.org/how-to-guides/make-your-plugin-buddypress-aware-v1-2/

    _ck_ stated her reasons here… the primary reason given was “[t]he removal of Sam Bauers and the halting of bbpress.org 2.0 “.

    #81087

    In reply to: Help out with bbPress

    Windhamdavid
    Member

    I’m be happy to help out on my ‘off hours’. I believe that, the ole’ Bulletin Board is the backbone of the Internet and that BBpress is the best example of an extremely light, elegant system. BBpress is my fave and i’ve followed the trac from day one. In fact, I’d even go on a personal crusade to get the new JQuery forums off of zoho and onto BBpress. I’d like to re-emphasize this https://bbpress.org/forums/topic/future-of-bbpress#post-60022 and the importance of forums throughout the wp family. +1 to Ron_R “What I would like to do with bbPress is make it a canonical plugin to ensure its longevity and continued development.” And like the previous commenters, I think the codex is the best place to start.

    frooyo
    Member

    So it sounds like the next major release of bbPress will make bbPress a plugin of WordPress … merging bbPress into WordPress and no longer keeping bbPress as an independent/stand-alone product.

    I have a few technical questions as such:

    1. Since the future is that bbPress will be a plug-in of WordPress, does that still allow bbPress itself to have plugin capability? Because essentially then, any plugin of bbPress would be a plugin of plugin to WordPress.

    2. How would other WordPress plugins effect bbPress? Meaning, if I were to use the SuperCache WordPress plugin – would that then cache my content for bbPress even though bbPress is a plugin itself of WordPress … or, if does it mean that if you use the bbPress WordPress plugin, you cannot use any other WordPress plugin?

    3. How would the Admin interface look for bbPress within WordPress. Seems like the Admin interface could easily get messing in a hurry when you have essentially 2 admin consoles (WordPress’ itself and then bbPress’ admin interface within WordPress admin).

    For what it’s worth, this is what scares me the most about merging bbPress into WordPress.

    The original goal of bbPress was to:

    – Open Source, always and forever

    – Less (code) is more

    – Simplicity is a feature

    – Speed and security are the foundation of any good user experience

    – Put the user first

    Currently, bbPress is close (but not quite there) to meeting the original goals above.

    My concern is that by making bbPress a plugin of WordPress, it’s DRASTICALLY moves bbPress away from the original goals because we already know that 1) bbPress would be *more* code, 2) much more complicated, 3) definitely slower given you have to load now WordPress and 4) fundamentally, this is not putting the user first.

    Just my 2 cents … also, thanks in advance for answering my questions above

    #84260
    Dailytalker
    Member

    I found a solution for the admin-backend link!

    Just ad the following code

    RewriteRule ^bb-admin/$ – [L]

    before this code

    RewriteRule ^([^.]+)/([^.]+)/page/([0-9]+)/?$ topic.php?id=$2&page=$3 [L,QSA]

    and it works!!! Cool.


    I found another mistake. The “topics-RSS” where missing because you deleted one rewrite mod too much. To repair this you need to put the following code just after the mod rewrites for “view”

    RewriteRule ^rss/topics/?$ rss.php?topics=1 [L,QSA]

    original code:

    RewriteRule ^rss/topics/?$ /forum/rss.php?topics=1 [L,QSA]

    Than also the rss-feed for the topics should work.

    #84259
    Dailytalker
    Member

    Dear Gautam

    I tried out the htaccess-code which is posted on technospot.net. It works for the forum and the member profiles but I cannot enter the admin backend anymore. Do you have an idea how to solve that problem?

    The following link is not working anymore:

    http://www.domain.com/forum/bb-admin/index.php

    When I add the following peace of code (just something I creaded by myself) :

    RewriteRule ^([^/.]+)/?$ index.php?id=$1 [L,QSA]

    It gives me the following link:

    http://www.domain.com/forum/bb-admin/

    So, it doesn’t work because “index.php” is missing.

    Do you have an idea how I can get this link with “index.php”?

    PS: You already mentioned that problem on your blog….bud maybe you found a solution meanwhile.

    #81830
    Dailytalker
    Member

    There are already some discussions in this forum about fb-connect. Some people say that there are already some wordpress-plugins which could easily be adapted for bbpress. Some other say that if bbpress is integrated in wordpress the wp-plugin could also work for bbpress…I tried some wp-fp-connect plugins out…but had some problem. But I am not a coder so I have often problems with such things.

    On the other hand a coder could just have a look at the wp-plugin look how it works and than customize it for bbpress.

    Dailytalker
    Member

    I’d like to remove “forums” and “topics” from bbPress permalinks.

    This looks ugly:

    http://domain.com/forums/forum/name-of-forum/

    http://domain.com/forums/topic/title-of-topic/

    Therefore I want this:

    http://domain.com/forum/name-of-forum/title-of-topic

    Therefore I downloaded a plugin and followed the steps described on this website:

    http://blog.markroberthenderson.com/getting-rid-of-forums-and-topic-from-bbpress-permalinks-updated-plugin/comment-page-1/#comment-37

    Unfortunately I don’t get it work. I think there are some mod rewrites missing. Unfortunately I am not a mod rewrite expert. Is there anybody who could help me?

    Thats the htaccess code which works with the ugly url:

    # BEGIN bbPress

    Options -MultiViews

    <IfModule mod_rewrite.c>

    RewriteEngine On

    RewriteBase /forum/

    RewriteRule ^page/([0-9]+)/?$ /forum/index.php?page=$1 [L,QSA]

    RewriteRule ^forum/([^/]+)/page/([0-9]+)/?$ /forum/forum.php?id=$1&page=$2 [L,QSA]

    RewriteRule ^forum/([^/]+)/?$ /forum/forum.php?id=$1 [L,QSA]

    RewriteRule ^forum/?$ /forum/ [R=302,L,QSA]

    RewriteRule ^topic/([^/]+)/page/([0-9]+)/?$ /forum/topic.php?id=$1&page=$2 [L,QSA]

    RewriteRule ^topic/([^/]+)/?$ /forum/topic.php?id=$1 [L,QSA]

    RewriteRule ^topic/?$ /forum/ [R=302,L,QSA]

    RewriteRule ^tags/([^/]+)/page/([0-9]+)/?$ /forum/tags.php?tag=$1&page=$2 [L,QSA]

    RewriteRule ^tags/([^/]+)/?$ /forum/tags.php?tag=$1 [L,QSA]

    RewriteRule ^tags/?$ /forum/tags.php [L,QSA]

    RewriteRule ^profile/([^/]+)/page/([0-9]+)/?$ /forum/profile.php?id=$1&page=$2 [L,QSA]

    RewriteRule ^profile/([^/]+)/([^/]+)/?$ /forum/profile.php?id=$1&tab=$2 [L,QSA]

    RewriteRule ^profile/([^/]+)/([^/]+)/page/([0-9]+)/?$ /forum/profile.php?id=$1&tab=$2&page=$3 [L,QSA]

    RewriteRule ^profile/([^/]+)/?$ /forum/profile.php?id=$1 [L,QSA]

    RewriteRule ^profile/?$ /forum/profile.php [L,QSA]

    RewriteRule ^view/([^/]+)/page/([0-9]+)/?$ /forum/view.php?view=$1&page=$2 [L,QSA]

    RewriteRule ^view/([^/]+)/?$ /forum/view.php?view=$1 [L,QSA]

    RewriteRule ^rss/?$ /forum/rss.php [L,QSA]

    RewriteRule ^rss/topics/?$ /forum/rss.php?topics=1 [L,QSA]

    RewriteRule ^rss/forum/([^/]+)/?$ /forum/rss.php?forum=$1 [L,QSA]

    RewriteRule ^rss/forum/([^/]+)/topics/?$ /forum/rss.php?forum=$1&topics=1 [L,QSA]

    RewriteRule ^rss/topic/([^/]+)/?$ /forum/rss.php?topic=$1 [L,QSA]

    RewriteRule ^rss/tags/([^/]+)/?$ /forum/rss.php?tag=$1 [L,QSA]

    RewriteRule ^rss/tags/([^/]+)/topics/?$ /forum/rss.php?tag=$1&topics=1 [L,QSA]

    RewriteRule ^rss/profile/([^/]+)/?$ /forum/rss.php?profile=$1 [L,QSA]

    RewriteRule ^rss/view/([^/]+)/?$ /forum/rss.php?view=$1 [L,QSA]

    RewriteCond %{REQUEST_FILENAME} !-f

    RewriteCond %{REQUEST_FILENAME} !-d

    RewriteRule ^.*$ /forum/index.php [L]

    </IfModule>

    # END bbPress

    Thats the htaccess code which should make pretty urls:

    # BEGIN bbPress

    <IfModule mod_rewrite.c>

    RewriteEngine On

    RewriteBase /forum/

    Options +FollowSymlinks

    RewriteRule ^tags/([^/]+)/page/([0-9]+)/?$ tags.php?tag=$1&page=$2 [L,QSA]

    RewriteRule ^tags/([^/]+)/?$ tags.php?tag=$1 [L,QSA]

    RewriteRule ^tags/?$ tags.php [L,QSA]

    RewriteRule ^profile/([^/]+)/page/([0-9]+)/?$ profile.php?id=$1&page=$2 [L,QSA]

    RewriteRule ^profile/([^/]+)/([^/]+)/?$ profile.php?id=$1&tab=$2 [L,QSA]

    RewriteRule ^profile/([^/]+)/([^/]+)/page/([0-9]+)/?$ profile.php?id=$1&tab=$2&page=$3 [L,QSA]

    RewriteRule ^profile/([^/]+)/?$ profile.php?id=$1 [L,QSA]

    RewriteRule ^view/([^/]+)/page/([0-9]+)/?$ view.php?view=$1&page=$2 [L,QSA]

    RewriteRule ^view/([^/]+)/?$ view.php?view=$1 [L,QSA]

    RewriteRule ^rss/?$ rss.php [L,QSA]

    RewriteRule ^rss/forum/([^/]+)/?$ rss.php?forum=$1 [L,QSA]

    RewriteRule ^rss/topic/([^/]+)/?$ rss.php?topic=$1 [L,QSA]

    RewriteRule ^rss/tags/([^/]+)/?$ rss.php?tag=$1 [L,QSA]

    RewriteRule ^rss/profile/([^/]+)/?$ rss.php?profile=$1 [L,QSA]

    RewriteRule ^page/([0-9]+)/?$ ?page=$1 [L,QSA]

    RewriteRule ^([^/]+)/([^/]+)/page/([0-9]+)/?$ topic.php?id=$2&page=$3 [L,QSA]

    RewriteRule ^([^/]+)/([^/]+)/?$ topic.php?id=$2 [L,QSA]

    RewriteRule ^([^/]+)/page/([0-9]+)/?$ forum.php?id=$1&page=$2 [L,QSA]

    RewriteRule ^([^/]+)/?$ forum.php?id=$1 [L,QSA]

    </IfModule>

    # END bbPress

    Whats missing in the second htaccess code? It must be something with “page”, “forum” or “topic”.

    wp.rook
    Member

    – I put BBPress into a folder called /forum off of the root.

    – WordPress is on the root.

    I am trying to use the same database to install BBpress into as WordPress.

    I’ve checked with host and my DB name, username, password are all correct. I’ve also copy pasted the DB Host into the advanced settings field.

    I still get a msg back that there was a problem connecting to the database. Any suggestions? The only thing I can think of is I’ve installed in a folder that I shouldn’t have? Or I need to specify a path or something?

    any help is much appreciated! :)

Viewing 25 results - 22,201 through 22,225 (of 32,481 total)
Skip to toolbar