Plugin Directory

Changeset 362617


Ignore:
Timestamp:
03/20/2011 07:30:28 PM (15 years ago)
Author:
frekel
Message:

Oplevering BigPicture

Location:
wp-photocontest/branches/bigpicture
Files:
2 added
7 edited

Legend:

Unmodified
Added
Removed
  • wp-photocontest/branches/bigpicture/js/vote.js

    r292837 r362617  
    1515    if (wppc_jQuery('#photocontest-vote_form'))
    1616    {
    17        
    1817        wppc_jQuery('#photocontest-vote_form').ajaxForm(
    1918        {
  • wp-photocontest/branches/bigpicture/lib/wp-photocontest.class.php

    r360971 r362617  
    185185        //$out          = $this->db->get_results( $this->db->prepare( "SELECT pr.wp_uid AS userid, pr.sum_votes AS sumvotes, wpu.user_login AS userlogin, pr.img_id AS img_id, pr.img_path AS img_path, pr.img_name AS img_name, pr.insert_time AS insert_time, pr.visibile AS visibile FROM ".$this->db->prefix."photocontest AS pr join ".$this->db->prefix."users as wpu on (pr.wp_uid = wpu.ID) AND pr.contest_id= %d ORDER BY pr.sum_votes DESC, pr.wp_uid ASC, pr.insert_time ASC LIMIT %d, %d", $contest_id, ($p * 10),(($p + 1) * 10) ) ); 
    186186       
    187         $out = $this->db->get_results( $this->db->prepare( "SELECT pr.wp_uid AS userid, pr.wp_email AS useremail, pr.sum_votes AS sumvotes, pr.img_id AS img_id, pr.img_path AS img_path, pr.img_name AS img_name, pr.insert_time AS insert_time, pr.visibile AS visibile FROM ".$this->db->prefix."photocontest AS pr WHERE pr.contest_id= %d ORDER BY pr.sum_votes DESC, pr.wp_uid ASC, pr.insert_time ASC LIMIT %d, %d", $contest_id, ($p * 10),(($p + 1) * 10) ) );
     187        $out = $this->db->get_results( $this->db->prepare( "SELECT pr.wp_uid AS userid, pr.wp_email AS useremail, pr.sum_votes AS sumvotes, pr.img_id AS img_id, pr.img_path AS img_path, pr.img_name AS img_name, pr.insert_time AS insert_time, pr.visibile AS visibile, pr.* FROM ".$this->db->prefix."photocontest AS pr WHERE pr.contest_id= %d ORDER BY pr.sum_votes DESC, pr.wp_uid ASC, pr.insert_time ASC LIMIT %d, %d", $contest_id, ($p * 10),(($p + 1) * 10) ) );
    188188
    189189        $i=0;
     
    243243        $return_array['scrolling']      = $scrolling;
    244244        $return_array['data']           = $data_array;
    245        
     245               
    246246        return $return_array;
    247247    }
  • wp-photocontest/branches/bigpicture/photocontest-manager.php

    r358725 r362617  
    706706                            <tr>
    707707                                <th><?php _e('Preview', 'wp-photocontest');?></th>
    708                                 <th><?php _e('ID', 'wp-photocontest');?></th>
    709                                 <th><?php _e('Image name', 'wp-photocontest');?></th>
    710                                 <th><?php _e('Upload by', 'wp-photocontest');?></th>
    711                                 <th><?php _e('Date', 'wp-photocontest');?> / <?php _e('Time', 'wp-photocontest');?></th>
     708                                <th><?php _e('Details', 'wp-photocontest');?></th>
    712709                                <th width="200"><?php _e('Visible', 'wp-photocontest');?></th>
    713710                                <th><?php _e('Votes', 'wp-photocontest');?></th>
     
    728725                                <tr <?php echo $style;?>>
    729726                                    <td><a href="<?php echo get_option('siteurl');?><?php echo $contest_items['img_path'];?>" target="_blank"><img src="<?php echo get_option('siteurl');?><?php echo $contest_items['med_thumb'];?>" /></a></td>                               
    730                                     <td><?php echo $contest_items['img_id'];?></td>
    731                                     <td><?php echo $contest_items['img_name'];?></td>
    732                                     <td><a href="<?php echo get_option('siteurl');?>/wp-admin/user-edit.php?user_id=<?php echo $contest_items['userid'];?>&wp_http_referer=%2Fwp251%2Fwp-admin%2Fusers.php"><?php echo $contest_items['userlogin'];?></a> (<?php echo $contest_items['userid'];?>)</td>
    733                                     <td><?php echo wppc_niceDateTime($contest_items['insert_time']);?></td>
     727                                    <td>
     728                                        <table>
     729                                            <tr>
     730                                                <td>Filename (id)</td>
     731                                                <td>:</td>
     732                                                <td><?php echo $contest_items['img_name'];?> (<?php echo $contest_items['img_id'];?>)</td>
     733                                            </tr>
     734                                            <tr>
     735                                                <td>User (id)</td>
     736                                                <td>:</td>
     737                                                <td><a href="<?php echo get_option('siteurl');?>/wp-admin/user-edit.php?user_id=<?php echo $contest_items['userid'];?>&wp_http_referer=%2Fwp251%2Fwp-admin%2Fusers.php"><?php echo $contest_items['userlogin'];?></a> (<?php echo $contest_items['userid'];?>)</td>
     738                                            </tr>
     739                                            <tr>
     740                                                <td>Age</td>
     741                                                <td>:</td>
     742                                                <td><?php echo $contest_items['wp_age'];?></td>
     743                                            </tr>                                           
     744                                            <tr>
     745                                                <td>Phone</td>
     746                                                <td>:</td>
     747                                                <td><?php echo $contest_items['wp_phone'];?></td>
     748                                            </tr>   
     749                                            <tr>
     750                                                <td>School</td>
     751                                                <td>:</td>
     752                                                <td><?php echo $contest_items['img_school'];?></td>
     753                                            </tr>
     754                                            <tr>
     755                                                <td>Where & When</td>
     756                                                <td>:</td>
     757                                                <td><?php echo $contest_items['img_where'];?> <?php echo wppc_niceDateTime($contest_items['img_when']);?></td>
     758                                            </tr>                                                                                                                                                                                                                               
     759                                            <tr>
     760                                                <td>Date</td>
     761                                                <td>:</td>
     762                                                <td><?php echo wppc_niceDateTime($contest_items['insert_time']);?></td>
     763                                            </tr>                                                                                                                       
     764                                        </table>
     765                                    </td>
     766                                   
    734767                                    <td><?php
    735768                                    if ($contest_items['visibile'] == 1)
  • wp-photocontest/branches/bigpicture/play.php

    r347416 r362617  
    287287                                        'contest_id' => $contest_id,
    288288                                        'wp_uid' => $user_id,
     289                                        'wp_name' => $post['upload_name'],
    289290                                        'wp_email' => wptexturize($upload_email),
     291                                        'wp_age' => $post['upload_age'],
     292                                        'wp_phone' => $post['upload_phone'],
    290293                                        'img_path' => '/wp-content/plugins/wp-photocontest/'.$fixed_contest_path.'/'.$destcontest_namefile,
    291294                                        'img_name' => $destcontest_namefile,
    292295                                        'img_title' => wptexturize($img_title),
    293296                                        'img_comment' => wptexturize($img_comment),
     297                                        'img_school' => wptexturize($post['image_school']),
     298                                        'img_where' => wptexturize($post['image_where']),
     299                                        'img_when' => wptexturize($post['image_when']),                         
    294300                                        'insert_time' => date('Y-m-d H:i:s'),
    295301                                        'visibile' => VISIBLE_UPLOAD
    296                                     ), 
     302                                    ),
    297303                                    array(
    298                                         '%d', '%d', '%s', '%s', '%s', '%s', '%s', '%s', '%d'
     304                                        '%d', '%d', '%s', '%s', '%s', '%s', '%s', '%s', '%s', '%s', '%s', '%s', '%s', '%s', '%d'
    299305                                    )
    300306                                );
     
    441447                                    <table class="sTable">
    442448                                        <tr>
    443                                             <td class="firstCol"><?php _e('Email', 'wp-photocontest');?>:</td>
    444                                             <td class="secondCol">&nbsp;</td>
    445                                             <td class="otherCol">
    446                                             <div class="feedback hidden" id="error_upload_email"><?php _e('Error:', 'wp-photocontest');?> <?php _e("No email provided", 'wp-photocontest');?></div>
    447                                             <input type="text" name="upload_email" id="upload_email" value="<?php echo $currentuser_email; ?>" />
     449                                            <td class="firstCol"><?php _e('Name', 'wp-photocontest');?>:</td>
     450                                            <td class="secondCol">&nbsp;</td>
     451                                            <td class="otherCol">
     452                                            <div class="feedback hidden" id="error_upload_name"><?php _e('Error:', 'wp-photocontest');?> <?php _e("No name provided", 'wp-photocontest');?></div>
     453                                            <input type="text" name="upload_name" id="upload_name" value="" />
    448454                                            </td>
    449455                                        </tr>
    450456                                        <tr>
    451                                             <td class="firstCol"><?php _e('File', 'wp-photocontest');?>:</td>
    452                                             <td class="secondCol">&nbsp;</td>
    453                                             <td class="otherCol">
    454                                             <div class="feedback hidden" id="error_imagefile"><?php _e('Error:', 'wp-photocontest');?> <?php _e("No image file provided", 'wp-photocontest');?></div>
    455                                             <input type="file" name="imagefile" id="imagefile"  value="" />&nbsp;<i><?php _e('(Only jpg, gif or png)', 'wp-photocontest');?></i></td>
     457                                            <td class="firstCol"><?php _e('Age', 'wp-photocontest');?>:</td>
     458                                            <td class="secondCol">&nbsp;</td>
     459                                            <td class="otherCol">
     460                                            <div class="feedback hidden" id="error_upload_age"><?php _e('Error:', 'wp-photocontest');?> <?php _e("No age provided", 'wp-photocontest');?></div>
     461                                            <input type="text" name="upload_age" id="upload_age" value="" />
     462                                            </td>
    456463                                        </tr>
    457464                                        <tr>
    458                                             <td class="firstCol"><?php _e('Title', 'wp-photocontest');?>:</td>
     465                                            <td class="firstCol"><?php _e('Phonenumber', 'wp-photocontest');?>:</td>
     466                                            <td class="secondCol">&nbsp;</td>
     467                                            <td class="otherCol">
     468                                            <div class="feedback hidden" id="error_upload_phone"><?php _e('Error:', 'wp-photocontest');?> <?php _e("No phone provided", 'wp-photocontest');?></div>
     469                                            <input type="text" name="upload_phone" id="upload_phone" value="" />
     470                                            </td>
     471                                        </tr>                                       
     472                                        <tr>
     473                                            <td class="firstCol"><?php _e('Photo title', 'wp-photocontest');?>:</td>
    459474                                            <td class="secondCol">&nbsp;</td>
    460475                                            <td class="otherCol">
     
    463478                                            </td>
    464479                                        </tr>
     480                                        <tr>
     481                                            <td class="firstCol"><?php _e('School or College', 'wp-photocontest');?>:</td>
     482                                            <td class="secondCol">&nbsp;</td>
     483                                            <td class="otherCol">
     484                                            <div class="feedback hidden" id="error_image_school"><?php _e('Error:', 'wp-photocontest');?> <?php _e("No school or college provided", 'wp-photocontest');?></div>
     485                                            <input type="text" name="image_school" id="image_school"  value="" />
     486                                            </td>
     487                                        </tr>                                           
     488                                        <tr>
     489                                            <td class="firstCol"><?php _e('Where was the picture taken?', 'wp-photocontest');?>:</td>
     490                                            <td class="secondCol">&nbsp;</td>
     491                                            <td class="otherCol">
     492                                            <div class="feedback hidden" id="error_image_where"><?php _e('Error:', 'wp-photocontest');?> <?php _e("Nothing provided", 'wp-photocontest');?></div>
     493                                            <input type="text" name="image_where" id="image_where"  value="" />
     494                                            </td>
     495                                        </tr>
     496                                        <tr>
     497                                            <td class="firstCol"><?php _e('And when?', 'wp-photocontest');?>:</td>
     498                                            <td class="secondCol">&nbsp;</td>
     499                                            <td class="otherCol">
     500                                            <div class="feedback hidden" id="error_image_when"><?php _e('Error:', 'wp-photocontest');?> <?php _e("No date provided", 'wp-photocontest');?></div>
     501                                            <input type="text" name="image_when" id="image_when"  value="">
     502                                            </td>
     503                                        </tr>       
    465504                                        <tr>
    466505                                            <td class="firstCol"><?php _e('About', 'wp-photocontest');?>:</td>
     
    470509                                            <textarea rows=10 cols="35" name="image_comment" id="image_comment"></textarea>
    471510                                            </td>                                   
    472                                         </tr>   
    473                                         <tr>
    474                                             <td class="firstCol">&nbsp;</td>
     511                                        </tr>                                                                                                                                                                                                   
     512                                        <tr>
     513                                            <td class="firstCol"><?php _e('Email', 'wp-photocontest');?>:</td>
     514                                            <td class="secondCol">&nbsp;</td>
     515                                            <td class="otherCol">
     516                                            <div class="feedback hidden" id="error_upload_email"><?php _e('Error:', 'wp-photocontest');?> <?php _e("No email provided", 'wp-photocontest');?></div>
     517                                            <input type="text" name="upload_email" id="upload_email" value="<?php echo $currentuser_email; ?>" />
     518                                            </td>
     519                                        </tr>
     520                                        <tr>
     521                                            <td class="firstCol"><?php _e('File', 'wp-photocontest');?>:</td>
     522                                            <td class="secondCol">&nbsp;</td>
     523                                            <td class="otherCol">
     524                                            <div class="feedback hidden" id="error_imagefile"><?php _e('Error:', 'wp-photocontest');?> <?php _e("No image file provided", 'wp-photocontest');?></div>
     525                                            <input type="file" name="imagefile" id="imagefile"  value="" />&nbsp;<i><?php _e('(Only jpg, gif or png)', 'wp-photocontest');?></i></td>
     526                                        </tr>                                       
     527                                        <tr>
     528                                            <td class="noneCol">&nbsp;</td>
    475529                                            <td class="secondCol">&nbsp;</td>
    476530                                            <td class="otherCol"><input type="submit" name="s" id="s"  value="<?php _e('Save', 'wp-photocontest');?> " /></td>
  • wp-photocontest/branches/bigpicture/skins/aqua/template.tpl

    r288925 r362617  
    11<?php get_header(); ?>
    22
    3         <div id="content" class="narrowcolumn content_wppc" role="main">
     3        <div id="content_wppc" class="content_wppc" role="main">
    44                [WP-PHOTOCONTEST CONTENT]
    55                <?php edit_post_link('Edit this entry.', '<p>', '</p>'); ?>
    66        </div>
    7 <?php get_sidebar(); ?>
     7
     8        <div id="sidebar">
     9
     10        <?php if (get_option('swt_banners') == 'Hide') { ?>
     11        <?php { echo ''; } ?>
     12        <?php } else { include(TEMPLATEPATH . '/includes/banners.php'); } ?>
     13
     14        <?php if (get_option('swt_fcats') == 'Hide') { ?>
     15        <?php { echo ''; } ?>
     16        <?php } else { include(TEMPLATEPATH . '/includes/featured-cats.php'); } ?>
     17
     18        <?php if (get_option('swt_social') == 'Hide') { ?>
     19        <?php { echo ''; } ?>
     20        <?php } else { include(TEMPLATEPATH . '/includes/social.php'); } ?>
     21
     22            <?php if (!function_exists('dynamic_sidebar')
     23                || !dynamic_sidebar()) : ?>
     24            <?php endif; ?>
     25        </div>
    826
    927<?php get_footer(); ?>
  • wp-photocontest/branches/bigpicture/skins/aqua/theme.css

    r297267 r362617  
    44    float:left;
    55    width:500px;
    6 }
    7 
    8 div.polaroid_navigation {
    9     clear:both;
    10     height:40px;
    11     margin:10px 0;
    12     width:800px;
    13     text-align:center;
    14 }
    15 
    16 div.polaroid_navigation a {
    17     background:none repeat scroll 0 0 orange;
    18     color:#FFFFFF;
    19     padding:0 5px;
    20     text-decoration:none;
    216}
    227
     
    141126}
    142127
     128table.sTable tr {
     129    border-bottom: 1px solid #DFDFDF;
     130}
    143131table.sTable td {
    144     border-bottom:1px solid #dfdfdf;
    145     padding:5px 0;
    146     margin:0;
    147     color:#000;
    148     font-size: 0.8em;
     132    color: #000000;
     133    font-size: 0.8em;
     134    margin: 0;
     135    padding: 5px 0;
    149136}
    150137
     
    161148
    162149td.firstCol {
    163     color:#9aa685;
    164     font-weight:bold;
    165     padding-left:5px;
    166     text-align:left;
    167     font-size: 0.8em;   
     150    color: #9AA685;
     151    display: block;
     152    font-size: 0.8em;
     153    font-weight: bold;
     154    padding-left: 5px;
     155    text-align: left;
     156    width: 250px !important;   
    168157}
    169158td.secondCol {
     
    177166    width:100%;
    178167    text-align:left;
    179     float:left;
     168    /*float:left;*/
    180169    font-size: 0.7em;
    181170}
     
    229218    width: 170px;
    230219}
     220
     221.content_wppc {
     222    width:575px;
     223    float:left;
     224}
     225
     226.otherCol i {
     227    font-size:9px; 
     228}
     229
     230/* CALENDAR */
     231div.calendar { position: relative; }
     232
     233.calendar, .calendar table {
     234  border: 1px solid #bdb2bf;
     235  font-size: 11px;
     236  color: #000;
     237  cursor: default;
     238  background: url("../../images/normal-bg.gif");
     239  font-family: "trebuchet ms",verdana,tahoma,sans-serif;
     240}
     241
     242.calendar {
     243  border-color: #797979;
     244}
     245
     246/* Header part -- contains navigation buttons and day contest_names. */
     247
     248.calendar .button { /* "<<", "<", ">", ">>" buttons have this class */
     249  text-align: center;    /* They are the navigation buttons */
     250  padding: 2px;          /* Make the buttons seem like they're pressing */
     251  background: url("../../images/title-bg.gif") repeat-x 0 100%; color: #000;
     252  font-weight: bold;
     253}
     254
     255.calendar .nav {
     256  font-family: verdana,tahoma,sans-serif;
     257}
     258
     259.calendar .nav div {
     260  background: transparent url("../../images/menuarrow.gif") no-repeat 100% 100%;
     261}
     262
     263.calendar thead tr { background: url("../../images/title-bg.gif") repeat-x 0 100%; color: #000; }
     264
     265.calendar thead .title { /* This holds the current "month, year" */
     266  font-weight: bold;      /* Pressing it will take you to the current date */
     267  text-align: center;
     268  padding: 2px;
     269  background: url("../../images/title-bg.gif") repeat-x 0 100%; color: #000;
     270}
     271
     272.calendar thead .headrow { /* Row <TR> containing navigation buttons */
     273}
     274
     275.calendar thead .contest_name { /* Cells <TD> containing the day contest_names */
     276  border-bottom: 1px solid #797979;
     277  padding: 2px;
     278  text-align: center;
     279  color: #000;
     280}
     281
     282.calendar thead .weekend { /* How a weekend day contest_name shows in header */
     283  color: #c44;
     284}
     285
     286.calendar thead .hilite { /* How do the buttons in header appear when hover */
     287  background: url("../../images/hover-bg.gif");
     288  border-bottom: 1px solid #797979;
     289  padding: 2px 2px 1px 2px;
     290}
     291
     292.calendar thead .active { /* Active (pressed) buttons in header */
     293  background: url("../../images/active-bg.gif"); color: #fff;
     294  padding: 3px 1px 0px 3px;
     295  border-bottom: 1px solid #797979;
     296}
     297
     298.calendar thead .daycontest_names { /* Row <TR> containing the day contest_names */
     299  background: url("../../images/dark-bg.gif");
     300}
     301
     302/* The body part -- contains all the days in month. */
     303
     304.calendar tbody .day { /* Cells <TD> containing month days dates */
     305  font-family: verdana,tahoma,sans-serif;
     306  width: 2em;
     307  color: #000;
     308  text-align: right;
     309  padding: 2px 4px 2px 2px;
     310}
     311.calendar tbody .day.othermonth {
     312  font-size: 80%;
     313  color: #999;
     314}
     315.calendar tbody .day.othermonth.oweekend {
     316  color: #f99;
     317}
     318
     319.calendar table .wn {
     320  padding: 2px 3px 2px 2px;
     321  border-right: 1px solid #797979;
     322  background: url("../../images/dark-bg.gif");
     323}
     324
     325.calendar tbody .rowhilite td,
     326.calendar tbody .rowhilite td.wn {
     327  background: url("../../images/rowhover-bg.gif");
     328}
     329
     330.calendar tbody td.today { font-weight: bold; /* background: url("../../images/today-bg.gif") no-repeat 70% 50%; */ }
     331
     332.calendar tbody td.hilite { /* Hovered cells <TD> */
     333  background: url("../../images/hover-bg.gif");
     334  padding: 1px 3px 1px 1px;
     335  border: 1px solid #bbb;
     336}
     337
     338.calendar tbody td.active { /* Active (pressed) cells <TD> */
     339  padding: 2px 2px 0px 2px;
     340}
     341
     342.calendar tbody td.weekend { /* Cells showing weekend days */
     343  color: #c44;
     344}
     345
     346.calendar tbody td.selected { /* Cell showing selected date */
     347  font-weight: bold;
     348  border: 1px solid #797979;
     349  padding: 1px 3px 1px 1px;
     350  background: url("../../images/active-bg.gif"); color: #fff;
     351}
     352
     353.calendar tbody .disabled { color: #999; }
     354
     355.calendar tbody .emptycell { /* Empty cells (the best is to hide them) */
     356  visibility: hidden;
     357}
     358
     359.calendar tbody .emptyrow { /* Empty row (some months need less than 6 rows) */
     360  display: none;
     361}
     362
     363/* The footer part -- status bar and "Close" button */
     364
     365.calendar tfoot .footrow { /* The <TR> in footer (only one right now) */
     366  text-align: center;
     367  background: #565;
     368  color: #fff;
     369}
     370
     371.calendar tfoot .ttip { /* Tooltip (status bar) cell <TD> */
     372  padding: 2px;
     373  background: url("../../images/status-bg.gif") repeat-x 0 0; color: #000;
     374}
     375
     376.calendar tfoot .hilite { /* Hover style for buttons in footer */
     377  background: #afa;
     378  border: 1px solid #084;
     379  color: #000;
     380  padding: 1px;
     381}
     382
     383.calendar tfoot .active { /* Active (pressed) style for buttons in footer */
     384  background: #7c7;
     385  padding: 2px 0px 0px 2px;
     386}
     387
     388/* Combo boxes (menus that display months/years for direct selection) */
     389
     390.calendar .combo {
     391  position: absolute;
     392  display: none;
     393  top: 0px;
     394  left: 0px;
     395  width: 4em;
     396  cursor: default;
     397  border-width: 0 1px 1px 1px;
     398  border-style: solid;
     399  border-color: #797979;
     400  background: url("../../images/normal-bg.gif"); color: #000;
     401  z-index: 100;
     402  font-size: 90%;
     403}
     404
     405.calendar .combo .label,
     406.calendar .combo .label-IEfix {
     407  text-align: center;
     408  padding: 1px;
     409}
     410
     411.calendar .combo .label-IEfix {
     412  width: 4em;
     413}
     414
     415.calendar .combo .hilite {
     416  background: url("../../images/hover-bg.gif"); color: #000;
     417}
     418
     419.calendar .combo .active {
     420  background: url("../../images/active-bg.gif"); color: #fff;
     421  font-weight: bold;
     422}
     423
     424.calendar td.time {
     425  border-top: 1px solid #797979;
     426  padding: 1px 0px;
     427  text-align: center;
     428  background: url("../../images/dark-bg.gif");
     429}
     430
     431.calendar td.time .hour,
     432.calendar td.time .minute,
     433.calendar td.time .ampm {
     434  padding: 0px 5px 0px 6px;
     435  font-weight: bold;
     436  background: url("../../images/normal-bg.gif"); color: #000;
     437}
     438
     439.calendar td.time .hour,
     440.calendar td.time .minute {
     441  font-family: monospace;
     442}
     443
     444.calendar td.time .ampm {
     445  text-align: center;
     446}
     447
     448.calendar td.time .colon {
     449  padding: 0px 2px 0px 3px;
     450  font-weight: bold;
     451}
     452
     453.calendar td.time span.hilite {
     454  background: url("../../images/hover-bg.gif"); color: #000;
     455}
     456
     457.calendar td.time span.active {
     458  background: url("../../images/active-bg.gif"); color: #fff;
     459}
  • wp-photocontest/branches/bigpicture/viewimg.php

    r360971 r362617  
    240240### Get the page content   ###
    241241##############################
    242 $image_details      = (array) $wpdb->get_row( $wpdb->prepare("SELECT contest_id, wp_uid, img_id, img_path, img_name, img_title, img_comment, sum_votes, img_view_count, insert_time, wp_email FROM ".$wpdb->prefix."photocontest WHERE img_id = %d", $img_id));
     242$image_details      = (array) $wpdb->get_row( $wpdb->prepare("SELECT * FROM ".$wpdb->prefix."photocontest WHERE img_id = %d", $img_id));   
    243243
    244244##############################
     
    618618                            <table class="sTable">
    619619                                <tr>
     620                                    <td class="firstCol"><?php _e('Name', 'wp-photocontest');?>:</td>
     621                                    <td class="secondCol">&nbsp;</td>
     622                                    <td class="otherCol"><?php echo $image_details['wp_name'];?></td>
     623                                </tr>
     624                                <tr>
     625                                    <td class="firstCol"><?php _e('Age', 'wp-photocontest');?>:</td>
     626                                    <td class="secondCol">&nbsp;</td>
     627                                    <td class="otherCol"><?php echo $image_details['wp_age'];?></td>
     628                                </tr>                               
     629                                <tr>
    620630                                    <td class="firstCol"><?php _e('Title', 'wp-photocontest');?>:</td>
    621631                                    <td class="secondCol">&nbsp;</td>
     
    623633                                </tr>
    624634                                <tr>
    625                                     <td class="firstCol"><?php _e('Poster', 'wp-photocontest');?>:</td>
     635                                    <td class="firstCol"><?php _e('School or Collage', 'wp-photocontest');?>:</td>
    626636                                    <td class="secondCol">&nbsp;</td>
    627                                     <td class="otherCol">
    628                                         <?php
    629                                         if (function_exists('get_the_author_meta'))
    630                                         {
    631                                             $auther_name = get_the_author_meta('display_name', $image_details['wp_uid']);
    632                                         }
    633                                         else
    634                                         {
    635                                             $auther_name = get_author_name($image_details['wp_uid']);
    636                                         }                                       
    637                                         if (empty($auther_name))
    638                                         {
    639                                             list($name,$domain) = explode("@",$image_details['wp_email']);
    640                                             echo ucfirst($name);
    641                                         }
    642                                         else
    643                                         {
    644                                             //here you can put the author page?
    645                                             echo $auther_name;
    646                                         }
    647                                         ?>
    648                                     </td>
    649                                 </tr>                                                   
     637                                    <td class="otherCol"><?php echo $image_details['img_school'];?></td>
     638                                </tr>   
    650639                                <tr>
    651                                     <td class="firstCol"><?php _e('Date', 'wp-photocontest');?>:</td>
     640                                    <td class="firstCol"><?php _e('Where', 'wp-photocontest');?>:</td>
    652641                                    <td class="secondCol">&nbsp;</td>
    653                                     <td class="otherCol"><?php printf(__('on %1$s at %2$s', 'wp-photocontest'),wppc_niceDateTime($image_details['insert_time'],'date'),wppc_niceDateTime($image_details['insert_time'],'time'));?></td>
     642                                    <td class="otherCol"><?php echo $image_details['img_where'];?></td>
    654643                                </tr>
     644                                <tr>
     645                                    <td class="firstCol"><?php _e('When', 'wp-photocontest');?>:</td>
     646                                    <td class="secondCol">&nbsp;</td>
     647                                    <td class="otherCol"><?php echo $image_details['img_when'];?></td>
     648                                </tr>                           
    655649                                <tr>
    656650                                    <td class="firstCol" valign="top"><?php _e('Description', 'wp-photocontest');?></td>
Note: See TracChangeset for help on using the changeset viewer.