[ Web Proxy ]
URL:
Viewing: https://bbpress.org/forums/topic/first-plugin-attempt/ [Back]  [Original]

Topic: First Plugin Attempt · bbPress.org
Skip to:
Content
Pages
Categories
Search
Top
Bottom

First Plugin Attempt

  • I am attempting to write my first plugin. The idea is to display a graphic image for the posters rank. I keep getting this error.

    Parse error: parse error, unexpected ‘=’, expecting ‘}’ in /home/brightan/public_html/bbPress/my-plugins/graphic-display-ranks.php on line 82

    Here is the function that includes line 82.

    function user_rank($id) {

    $special_rank = get_special_rank (get_post_author_id());

    if ($special_rank>0)

    {

    switch ($special_rank) {

    case 1 :

    $display_rank=$path_to_rank_images . $image_for_special_rank_1;

    break;

    case 2 :

    $display_rank=$path_to_rank_images . $image_for_special_rank_2;

    break;

    }

    }

    else

    {

    $rank_count=get_post_count(get_post_author_id());

    for ($i=1;$i<$num_ranks;$i++)

    {

    if ($rank_count<$rank_max[$i])

    {$display_rank=$path_to_rank_images . $rank_img[$i];

    }

    else

    {$display_rank="";}

    }

    }

    return $display_rank;

    }

    What am I not seeing?

Viewing 3 replies - 1 through 3 (of 3 total)
Viewing 3 replies - 1 through 3 (of 3 total)
  • You must be logged in to reply to this topic.
Skip to toolbar

Web Proxy Viewer  |  New URL  |  Original Page