Search Results for 'code'
-
AuthorSearch Results
-
January 26, 2010 at 12:06 am #76706
Damien
MemberInstantly knocked 3 queries from my mainpage, thanks
January 25, 2010 at 9:12 pm #84322In reply to: Parse error on install
Ipstenu (Mika Epstein)
ModeratorTextWrangler for Mac.
January 25, 2010 at 8:37 pm #84269Dailytalker
MemberDid 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.
January 25, 2010 at 8:10 pm #84263Dailytalker
MemberWhat you can do is what I have….
1st step
Download the plugin, you find on the link bellow and follow the instructions on that site:
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.
January 25, 2010 at 6:42 pm #84171In reply to: Thanks plugin
pengerik
MemberPlease share if/when available! Been looking for this some time…
January 25, 2010 at 6:02 pm #84170In reply to: Thanks plugin
Gautam
MemberI 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
January 25, 2010 at 5:44 pm #84169In 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?
January 25, 2010 at 5:40 pm #76941In reply to: Display a list of recent topics
chandersbs
MemberThanks Chris and everyone, I will test Kevin’s code tonight and see how it works.
Keep you guys posted
January 25, 2010 at 5:02 pm #84283paulhawke
MemberI 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.
January 25, 2010 at 4:50 pm #84295In reply to: I have decided to write my own WordPress Plugin
paulhawke
MemberOr, 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.
January 25, 2010 at 4:50 pm #84327In reply to: Administration of bbPress in Buddypress
Ipstenu (Mika Epstein)
ModeratorOriginal topic on BuddyPress: https://buddypress.org/forums/topic/how-to-create-forums-in-bbpress-within-buddypress
Windhamdavid’s awesome solution link: https://buddypress.org/forums/topic/how-to-access-to-bbpress-admin-from-buddypress
January 25, 2010 at 4:41 pm #76940In reply to: Display a list of recent topics
chrishajer
ParticipantGlad I posted a completely incorrect suggestion to get the conversation going
January 25, 2010 at 4:11 pm #76939In reply to: Display a list of recent topics
Michael
Participant@chandersbs: I see – well that’s also cool – it looks nice on your site.
January 25, 2010 at 3:37 pm #76938In reply to: Display a list of recent topics
kevinjohngallagher
MemberI’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
January 25, 2010 at 2:50 pm #76937In reply to: Display a list of recent topics
chandersbs
MemberIt’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
January 25, 2010 at 2:35 pm #76936In reply to: Display a list of recent topics
Ben L.
Memberchandersbs: 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 ) ) )
January 25, 2010 at 2:18 pm #76935In reply to: Display a list of recent topics
chandersbs
MemberHey 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 29Jan2010The 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.
January 25, 2010 at 2:06 pm #76934In reply to: Display a list of recent topics
Ben L.
MemberInstead of
$result->topic_start_time
, you wantdate( 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.
January 25, 2010 at 1:57 pm #76932In reply to: Display a list of recent topics
chandersbs
Memberthanks 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 onlineAs 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 onlineAs 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.
January 25, 2010 at 11:05 am #84261Gautam
MemberJanuary 25, 2010 at 10:13 am #84282Olaf Lederer
ParticipantThe 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)
January 25, 2010 at 9:49 am #76931In reply to: Display a list of recent topics
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 ?
January 25, 2010 at 6:22 am #84316chrishajer
ParticipantCan 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.
January 25, 2010 at 6:19 am #76930In reply to: Display a list of recent topics
chrishajer
ParticipantI 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…
January 25, 2010 at 6:09 am #84314chrishajer
ParticipantIs 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.) -
AuthorSearch Results