Exemplo n.º 1
0
function thanks_output_after()
{
    $msg = thanks_get_voting_phrase("thanks_position");
    if ($msg == "after") {
        thanks_output();
    }
}
Exemplo n.º 2
0
function thanks_output_details($post_id, $uid, $logged_in = true)
{
    $out = "";
    $meta = bb_get_post_meta("thanks", $post_id);
    $report_length = 0;
    if (isset($meta)) {
        $vote_count = count($meta);
        $msg_type = $vote_count == 0 ? "none" : ($vote_count == 1 ? "one" : "many");
        $msg = thanks_get_voting_phrase("thanks_output_" . $msg_type);
        $report_length = strlen($msg);
        $out .= str_replace("#", "" . $vote_count, $msg);
        $should_show_voters = thanks_get_voting_phrase("thanks_voters");
        if ($should_show_voters == "yes") {
            $out .= ' ' . thanks_get_voting_phrase("thanks_voters_prefix");
            for ($i = 0; $i < count($meta); $i++) {
                $link = get_user_profile_link($meta[$i]);
                $voter = bb_get_user($meta[$i]);
                if ($i > 0) {
                    $out .= ", ";
                }
                $out .= '<a href="' . $link . '">' . $voter->display_name . '</a>';
            }
            $out .= thanks_get_voting_phrase("thanks_voters_suffix");
        }
    }
    if ($logged_in) {
        if (!in_array($uid, $meta)) {
            if (isset($meta) && $report_length > 0) {
                $out .= "&nbsp;&nbsp;|&nbsp;&nbsp;";
            }
            $msg = thanks_get_voting_phrase("thanks_voting");
            $out .= "<a class=\"thanks-vote\" user=\"" . $uid . "\" id=\"" . $post_id . "\">" . $msg . "</a>";
        }
    }
    return $out;
}
Exemplo n.º 3
0
if (thanks_get_voting_phrase("thanks_voters") == "no") {
    echo " selected";
}
?>
>No</option>
</select></li>

<li><label for="thanks_voters_prefix">Before name list:</label>
<input type="text" value="<?php 
echo thanks_get_voting_phrase("thanks_voters_prefix");
?>
" name="thanks_voters_prefix" id="thanks_voters_prefix" size="50"/></li>

<li><label for="thanks_voters_suffix">After name list:</label>
<input type="text" value="<?php 
echo thanks_get_voting_phrase("thanks_voters_suffix");
?>
" name="thanks_voters_suffix" id="thanks_voters_suffix" size="50"/></li>
</ul>
</fieldset>

<fieldset id="thanks-submit">
<input type="submit" name="thanks_option_reset" id="thanks_option_reset" value="Reset to Defaults" />
<input type="submit" name="thanks_option_submit" id="thanks_option_submit" value="Save Options" />
</fieldset>
</form>
<?php 
$options = array('thanks_post', 'thanks_posts', 'thanks_voting', 'thanks_output_none', 'thanks_output_one', 'thanks_output_many', 'thanks_success', 'thanks_position');
$exist = false;
for ($i = 0; $i < count($options); $i++) {
    $value = bb_get_option($options[$i]);