Quote:
Originally Posted by Shinichi_bien
in vbbridge.php
just before
PHP Code:
add_action('publish_post', 'Vbridge_Post');
but you can add anywhere that you want, I put it there to keep it close to the add_action (easy to remember)
please change the posted code to the following, add this filter only in admin end
PHP Code:
if (is_admin()) {
add_filter('wp_dropdown_users', 'vb_post_author');
function vb_post_author($output) {
global $post;
$vb_post_author = get_userdata($post->post_author);
$output = str_replace('</select>','<option value="'.$post->post_author.'" selected>'.$vb_post_author->username.'</option></select>',$output);
echo $output;
}
}
|
Thank you for this, worked here.
About the author link going to vbulletin profile, does anyone here tried this code?
PHP Code:
You can also now link authors usernames to their VB profile page. Wherever you see the code:
<?php the_author() ?>
You can replace that with something like:
<?php
if (function_exists('Comment_Handler') and $vbridge == '') {
$vbridge = Comment_Handler($post->ID);
global $vbulletin;
}
if ($vbridge[id] > 0) {
?>
<a href=<?php echo get_option('vbb_VBURL') ?>/member.php?u=<?php echo $vbridge[thread_starter] ?>><?php echo $vbridge['postusername'] ?></a>
<?php
}
else {
the_author();
}
?>
It was writen in the readme, doesnt work here since i dont have the_author on the files, its ... :{
Here is a bit of my theme's code:
PHP Code:
<div class="postmetadata">Posted by <?php the_author_posts_link(); ?> at <?php the_time('F j, Y') ?> <a href="<?php the_permalink(); ?>#discussion"></a></span>
<span id="digg"><?php digg_this(); ?><span>