Skip to:
Content
Pages
Categories
Search
Top
Bottom

Search Results for 'code'

Viewing 25 results - 22,176 through 22,200 (of 32,468 total)
  • Author
    Search Results
  • Damien
    Member

    Instantly knocked 3 queries from my mainpage, thanks :)

    #84322

    In reply to: Parse error on install

    TextWrangler for Mac. :)

    #84269
    Dailytalker
    Member

    Did you follow the steps decribed in this topic?

    Did you install the plugin?

    Did you change the permalinks to “name” before activating the plugin?

    Did you change the codes in your htaccess?

    Did you write as rewrite base /?

    Thats what I have in the htaccess of my wp-frontpage:

    RewriteBase /

    So it really must work. I am pretty sure.

    #84263
    Dailytalker
    Member

    What you can do is what I have….

    http://www.dailytalk.ch/forum

    1st step

    Download the plugin, you find on the link bellow and follow the instructions on that site:

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

    2nd step

    If the name of your forum is “forums” you need to name the RewriteBase /forums/

    RewriteBase /forums/

    If the name of your forum is “community” your RewriteBase is /community/

    RewriteBase /community/

    etc.

    3rd step

    After you have followed the steps of that site you will find some bugs. To solve them do the following:

    To solve the major bugs you need to do this:

    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.

    #84171

    In reply to: Thanks plugin

    pengerik
    Member

    Please share if/when available! Been looking for this some time… :)

    #84170

    In reply to: Thanks plugin

    Gautam
    Member

    I had actually created this sort of plugin once for a forum, but didn’t release it publicly. When I get time, I might extract out that part and release it.

    Edit – If Paul doesn’t do it first :P

    #84169

    In reply to: Thanks plugin

    Michael
    Participant

    @paulhawke – sounds great, can’t wait to see it. :) Now, are you going to be making it a “like” this post, or a “thank you” for this post plugin?

    #76941
    chandersbs
    Member

    Thanks Chris and everyone, I will test Kevin’s code tonight and see how it works.

    Keep you guys posted :-)

    paulhawke
    Member

    I think there are a number of big architectural hurdles to get over. In WP I bind a given slug to a page on a 1-to-1 basis, and that’s what is used to resolve a given URL. If I have a forum I would want “virtual page slugs” where anything starting with (say) “/forum” is passed to my plugin for resolution of the rest. The URL processing in WP is messy (to say the least) and is a perfect example of the opposite of the “Open/Closed” OO design principle – “Closed to modification but Open for extension” – I imagine that a rewrite of that code would go a long way to improving WP itself.

    If bbPress were hosted on a single page using a WP shortcode, then the entire GUI needs to be re-coded to run fully AJAX as the user will need to remain on that particular page.

    #84295
    paulhawke
    Member

    Or, like me, you can grep the bbPress source for “do_action” and “apply_filter” to see what the code does. In any case, the code itself is the best documentation.

    #84327
    #76940
    chrishajer
    Participant

    Glad I posted a completely incorrect suggestion to get the conversation going :-)

    #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.)

Viewing 25 results - 22,176 through 22,200 (of 32,468 total)
Skip to toolbar