简体   繁体   English

获取简单的CMS插件

[英]Get simple CMS plugin

I am currently trying to modify a plugin that was made for get simple cms. 我目前正在尝试修改为获取简单cms而制作的插件。 The plugin is called "pages with comments". 该插件称为“带评论的页面”。 The reason I am posting here is because the topic for the plugin in the forums looks to be dead. 我在这里发布的原因是因为论坛中插件的主题看起来已经死了。 Here is the link to the plugin I am currently using. 这是我当前使用的插件的链接。 https://mega.co.nz/#!pVcRnTiI!N0SyhLXrPbE1vFH3dNBaqO0zznETDD--QQpWp0c1EJoI have modified it but so you can see what code I am working with I am uploading it as a zip. https://mega.co.nz/#!pVcRnTiI!N0SyhLXrPbE1vFH3dNBaqO0zznETDD--QQpWp0c1EJoI已对其进行了修改,因此您可以看到正在使用的代码以zip格式上传。 My question is how do I make aa field required so when users submit the comment there has to be something in it. 我的问题是如何使字段为必填字段,因此,当用户提交评论时,其中必须包含某些内容。 Either that or make that field a drop down. 要么使该字段下降。 Thanks 谢谢

        if ($capt =='Y'){
        echo '<div id="captch"> ';
            echo '<img alt="" class="capt" id="captcha'.$imfin.'" src="'.$siteurl.'plugins/pages_comments/img_cpt.php?url='.GSPLUGINPATH.'pages_comments/" />';
            echo '<input type="button" value="'.$i18n['reload'].'" onClick="javascript:rec_cpt(&quot;captcha'.$imfin.'&quot;,&quot;'.$siteurl.'plugins/pages_comments/img_cpt.php?url='.GSPLUGINPATH.'pages_comments/&quot;)" />&nbsp;<span class="msgavs">'.$i18n['rl'].'</span>';
        echo '</div>';
        echo '<div class="cap_input">';
            echo '<input type="text"  value="" name="guest[pot]" /><span>'.$i18n['Cpt'].'('.$i18n['Rf'].']'.'</span>';
        echo '</div>';
    }   
    echo '<div class="submit">';  
        echo '<input type="submit" value="'.$i18n['Ev'].'" name="guest-submit" />';
    echo '</div>';
if (empty($_POST["field_name"])) {
    $FieldErr = "FIELD is required"; //or any other error message
  } else {
    // code for submitting;
  }

// you can dispaly the error message using echo $FeildErr beside your field area //您可以使用字段区域旁边的echo $ FeildErr显示错误消息

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM