• Hi,

    I’m using wp-photocontest plugin version 1.5.4. and everything worked fine.

    However, I need to tweak the interface to minimize the confusion during the competition.

    1. There is a menu item ‘Post Photo’ at the top of the page when the plugin is activated. I need to remove that link from non-users as I want the posting to be done internally by the admin. having it there will just confuses the participants.

    2. After a photo is submitted, there is a section called ‘photo details’. I need to remove the item called ‘Poster’ as it it redundant (due to the fact that the admin is the person doing all the posting).

    Can onyone please advise how this can be done. Appreciate any help with this.

    Thank you in advanced.

Viewing 2 replies - 1 through 2 (of 2 total)
  • Plugin Author frekel

    (@frekel)

    For changing the menu items, you need to change lib/wp-photocontest.class.php (around line 366):

    function get_top_menu($siteurl, $post_id, $login_true=false)
    	{
    		$topmenu	= '';
    		$out 		= (array) $this->db->get_row( $this->db->prepare( "SELECT contest_id FROM ".$this->db->prefix."photocontest_admin WHERE post_id= %d", $post_id));
    		if ($out)
    		{
    			$topmenu	= "";
    			$topmenu	.= "  <a href=\"$siteurl/wp-content/plugins/wp-photocontest/play.php?post_id=".$post_id."\">";
    			$topmenu	.= __('Post photos', 'wp-photocontest');
    			$topmenu	.= "</a> ";

    to

    function get_top_menu($siteurl, $post_id, $login_true=false)
    	{
    		$topmenu	= '';
    		$out 		= (array) $this->db->get_row( $this->db->prepare( "SELECT contest_id FROM ".$this->db->prefix."photocontest_admin WHERE post_id= %d", $post_id));
    		if ($out)
    		{
    			$topmenu	= "";
    Plugin Author frekel

    (@frekel)

    For changing the postername in the image details remove the following from viewimg.php (around line 595):

    <tr>
    	<td class="firstCol"><?php _e('Poster', 'wp-photocontest');?>:</td>
    	<td class="secondCol">&nbsp;</td>
    	<td class="otherCol">
    		<?php
    		if (function_exists('get_the_author_meta'))
    		{
    			$auther_name = get_the_author_meta('display_name', $image_details['wp_uid']);
    		}
    		else
    		{
    			$auther_name = get_author_name($image_details['wp_uid']);
    		}
    		if (empty($auther_name))
    		{
    			echo $image_details['wp_email'];
    		}
    		else
    		{
    			//here you can put the author page?
    			echo $auther_name;
    		}
    		?>
    	</td>
    </tr>
Viewing 2 replies - 1 through 2 (of 2 total)
  • The topic ‘[Plugin: PhotoContest Plugin] Adjusting Contest Menu Item’ is closed to new replies.