Changeset 46081

Show
Ignore:
Timestamp:
05/15/08 19:27:43 (2 months ago)
Author:
damianm666
Message:

--

Files:

Legend:

Unmodified
Added
Removed
Modified
Copied
Moved
  • wp-submission/trunk/classes/submission/base.php

    r46072 r46081  
    11<?php 
    2 class dc_submission_2_2_0 extends dc_base_2_2_0 { 
     2class dc_submission_2_2_0 extends dc_base_2_1_0 { 
    33      function init() 
    44      { 
     
    1212      function submission($content,$match) 
    1313      { 
    14             $page = $this->loadHTML('submission'); 
    15             $form = $this->loadHTML('submission_form'); 
    16             $page = str_replace('@@form@@',$form,$page); 
    17             $page = $this->debug($match,false).$page; 
    18             $content = str_replace($match['match'],$page,$content); 
     14            if ($match['attributes']['demo']=="true") 
     15            { 
     16                  $newmatch = eregi_replace(' demo\s*=\s*\"true\"','',$match['match']); 
     17                  $content=str_replace($match['match'],$newmatch,$content); 
     18            } 
     19            else  
     20            { 
     21                  $c = $this->loadClass('wp_contact'); 
     22                  $add = $this->loadHTML('submission'); 
     23                  $add=str_replace('@@message@@',$_POST['contact']['message'],$add); 
     24                  $subjects = split(',',$match['attributes']['subject']); 
     25                  $add=str_replace('@@url@@',$_POST['submission']['url'],$add); 
     26                  $add=str_replace('@@caption@@',$_POST['submission']['caption'],$add); 
     27                  $add=str_replace('@@description@@',$_POST['submission']['description'],$add); 
     28                  $show_captcha=true; 
     29                  if($match['attributes']['antispam']=='no') 
     30                        $show_captcha=false; 
     31                  $allow_copy=true; 
     32                  if($match['attributes']['allowcopy']=='no') 
     33                        $allow_copy=false; 
     34                  $form=$c->show($add,$show_captcha,$allow_copy); 
     35                  if($form['valid']) 
     36                  { 
     37                        $page = $this->loadHTML('submission_thanks'); 
     38                        //$this->send($match['attributes']); 
     39                  } 
     40                  else  
     41                  { 
     42                        $page = $form['page']; 
     43                  } 
     44                  $content=str_replace($match['match'],$page,$content); 
     45            } 
    1946            return $content; 
    2047      } 
     
    6491            return $content; 
    6592      } 
     93 
    6694      function saveSubmission() 
    6795      { 
  • wp-submission/trunk/classes/submission/template.html

    r46072 r46081  
    1 <p class='thanks'>Please visit the site to see the submission form</p> 
    2 <p class="submission form"> 
    3       <p>Your Name</p> 
    4       <p>Your Email</p> 
    5       @@form@@ 
    6       <p>Human Response Check</p> 
    7 </p> 
     1             
     2<fieldset class="link_url" style="border:none;"> 
     3      <legend><strong>Link URL</strong></legend> 
     4      <input name='submission[url]' style='width:300px;margin-top:5px' value='@@url@@' /> 
     5</fieldset> 
     6<fieldset class="link_caption" style="border:none;"> 
     7      <legend><strong>Link Caption</strong></legend> 
     8      <input name='submission[caption]' style='width:300px;margin-top:5px' value='@@caption@@' /> 
     9</fieldset> 
     10<fieldset class="description" style="border:none;"> 
     11      <legend><strong>description</strong></legend> 
     12      <textarea name='submission[description]' style='width:100%;height:100px;margin-top:5px'>@@description@@</textarea> 
     13</fieldset> 
  • wp-submission/trunk/wp_submission.php

    r46075 r46081  
    99*/ 
    1010require_once(dirname(__FILE__).'/library/classes/base.php'); 
    11 class DCodaSubmission extends dc_base_2_2_0  { 
     11class DCodaSubmission extends dc_base_2_1_0  { 
    1212      function init() 
    1313      {