Forum Replies Created
-
Oh yeah… the core be hacked good LOL
I agree that it’s not a good idea, but I wouldn’t have a clue even where to start on writing a plugin… and I wouldn’t know a pseudo-cron if I tripped and fell on one ;o)
I’m in the same boat with WP on another site… stuffed if I know what I’ve touched and what I haven’t…
When I spotted the plugin on your site to change nofollow etc – I almost died… hacked the core to do that 2 days before I spotted it lol
Thanks again for all your help
Also in bb-includes/functions.php
function get_latest_topics – added $now and tweaked $where
$now = bb_current_time('mysql');
$where = "WHERE topic_status = 0 AND topic_start_time <= '$now'";The names of the inputs on post-form.php are year, month etc
bb-includes/functions.php
new_topic becomes
function bb_new_topic( $title, $forum, $tags = '', $year, $month, $day, $hour, $minute, $second ) {
and $now
if ($year == NULL )
{
$now = bb_current_time('mysql');
}
else
{
$now = $year . '-' . $month . '-' . $day . ' ' . $hour . ':' . $minute . ':' . $second;
}bb_new_post becomes the same
function bb_new_post( $topic_id, $bb_post, $year, $month, $day, $hour, $minute, $second ) {
and $now is calculated in the same way
template/post-form.php gets a section for normal users
<?php if ( !is_topic() && !bb_current_user_can('moderate') ) { ?>
and for mods
<?php } elseif ( !is_topic() && bb_current_user_can('moderate') ) { ?>
It’s in this section that I’ve added the year, month, day etc form fields
Sorry for the time it took to get back to you… Only just fired up my RSS reader…
I’d decided to kill off my main RSS feed (to get around the RSS visibility issue) and not to sweat over the post/topic count being out by one.
Very true – thanks for mentioning the plugin angle – hadn’t thought of it…
This is beyond my capabilities – should you decide to work on a plugin for this, I will certainly be in your debt.
You’re spot on – the flag approach it must be…
Topic Count (and probably Post Count) is driven by a hard coded sql value that is incremented each time a topic is added a decremented when one is deleted…
It’s also affecting the Post Count on the front page – ie for that forum the post count is 8 instead of 7.
You are quite correct – the RSS feed is showing the “hidden” post…
The handicap stays at 27 lol
Apart from search and RSS – anywhere else you can think of that it may appear?
Thanks _ck_
After a day of hacking around (my php handicap is 27 afterall), it has been done :o)
To cut a long story short…
I added time and date fields to the post form (visible to moderators only)
Told functions php to carry on as usual unless it sees a year value – otherwise it uses the value it’s given.
The sql query that spits out the posts now only returns a row if the topic_start_time is lower than the time the request was made.
I can supply (very fugly) code if anyone wants to do the same thing.
The reason I wanted this is so I could start a topic or topics – and walk away. As you can with future posts in WP.