-
[Noobie Question] Finding PHP code
This seems similar to that link I posted last night. I really like this solution. I have not looked into it much btu ti seems fairly simple to implement, right? And it also doesn't alter the webpage either so it means that my grandparents will not object at all to it (They wouldn't really care even if I did change the webpage a little to be honest).
-
[Noobie Question] Finding PHP code
Alternatively. This seems promising (Basic I know, but far simpler): www.sitepoint.com/easy-spam-prevention-using-hidden-form-fields/ if I were to input this code: <input type="text" name="foo" style="display: none;"> How do I then implement the following procedure (pseudo code)? when submitButton is pressed{ if foo is empty{ // foo is the text field name as above submit form } else{ do not submit form } } Sorry that this has turned into more HTML than PHP. (I can insert HTML code into the page using that ModX page I found, right?) EDIT: (Just editting as I think of things) I am guessing that the form is handled by an external PHP file/procedure. Therefore would my possible solution be possible by the check for the value of "foo" beign done using HTML only, if the check is failed, the from is just not submitted to the PHP procedure at all? If it passes, the form can be submitted as usual?
-
[Noobie Question] Finding PHP code
So I would need to update from 0.9.6 to 2.0.0 in order to install a CAPTCHA add-on? As there is no direct update fromt hese two versions available and it must be a manual update, I really do not think that I have the knowledge to do this. I would not trust myself considering it it not my website. It this were my own site I would have a go but I am too worried considering if I mess it up, it seriously affects my grandparent's income. It there any alternative? I do not really care if the turing check is incredibly basic and would only repel 1% of bots - to be honest, as logn as my grandparents can see I've tried, they would be happy. Is there a way of adding something along the lines of a label and textbox saying "Enter the number four in numbers below" and the form would not be submitted unless "4" was entered into the textbox? I would not realy need the number to change each time, even if it were 4 for everyone. Can this be done even if a rather crude implementation?
-
[Noobie Question] Finding PHP code
I am using ModX 0.9.6, I believe that the package management was introduced with ModX 2.0. So I can;t install these plugins, right?
-
[Noobie Question] Finding PHP code
Here are some screenshots of interesting pages I found in ModX, could these help with a solution? http://imgur.com/a/6G9Zt
-
[Noobie Question] Finding PHP code
Just posting infromation as I find it. I have been looking through the ModX pages and found this HTML code fro the web form: <p class="error">[+validationmessage+]</p> <form method="post" action="[~[*id*]~]" id="EmailForm" name="EmailForm"> <h3> Contact Form</h3> <input name="formid" type="hidden" value="ContactForm" /> <label for="cfName">Your name:<br /> <input name="name" id="cfName" class="text" type="text" eform="Your Name::1:" /> </label><br /><br /> <label for="cfEmail">Your Email Address:<br /> <input name="email" id="cfEmail" class="text" type="text" eform="Email Address:email:1" /> </label><br /><br /> <label for="cfRegarding">Regarding:</label><br /> <select name="subject" id="cfRegarding" eform="Form Subject::1"> <option value="General Enquiries">General Enquiries</option> <option value="Booking Enquiries">Booking Enquiries</option> </select><br /><br /> <label for="cfMessage">Message: <br /> <textarea name="message" id="cfMessage" rows="4" cols="50" eform="Message:textarea:1"></textarea> </label><br /> <label> </label><input type="submit" name="contact" id="cfContact" class="button" value="Send This Message" /> </form> Can something be implimented here, even if extremely simple, just to combat the most basic of bots?
-
[Noobie Question] Finding PHP code
Thank you for that. I will likely install that. The instructions for installation say to do so via Package Management, I have logged into DOMAIN.co.uk/manager and looked through it but cannot see any reference to anything called "package manager" (I assume I am using an old version of ModX). From the version I am using, how can I install these plugins?
-
[Noobie Question] Finding PHP code
I see no options for adding a CAPTCHA using the admin pages of the manager. There is however an editable textbox for the page that I want. Currently it contains standard page text above and then this (Email address mutated): [[Contac tForm? &sendTo=`[(emailsender)]`]] [!eForm? &formid=`ContactForm` &subject=`[+subject+]` &to=`EMAILGOESHERE@EMAIL.COM` &ccsender=`1` &tpl=`ContactForm` &report=`ContactFormReport` &gotoid=`46` !]
-
[Noobie Question] Finding PHP code
This is index.php in the directory for the website. <?php /* ************************************************************************* MODx Content Management System and PHP Application Framework Managed and maintained by Raymond Irving, Ryan Thrash and the MODx community ************************************************************************* MODx is an opensource PHP/MySQL content management system and content management framework that is flexible, adaptable, supports XHTML/CSS layouts, and works with most web browsers, including Safari. MODx is distributed under the GNU General Public License ************************************************************************* MODx CMS and Application Framework ("MODx") Copyright 2005 and forever thereafter by Raymond Irving & Ryan Thrash. All rights reserved. This file and all related or dependant files distributed with this filie are considered as a whole to make up MODx. MODx is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation; either version 2 of the License, or (at your option) any later version. MODx is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for more details. You should have received a copy of the GNU General Public License along with MODx (located in "/assets/docs/"); if not, write to the Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA For more information on MODx please visit http://modxcms.com/ ************************************************************************** Originally based on Etomite by Alex Butter ************************************************************************** */ /** * Initialize Document Parsing * ----------------------------- */ // is this file included? if(count(get_included_files())>1) $noparser = true; // get start time $mtime = microtime(); $mtime = explode(" ",$mtime); $mtime = $mtime[1] + $mtime[0]; $tstart = $mtime; // harden it require_once(dirname(__FILE__).'/manager/includes/protect.inc.php'); // set some settings, and address some IE issues @ini_set('url_rewriter.tags', ''); @ini_set('session.use_trans_sid', 0); @ini_set('session.use_only_cookies',1); session_cache_limiter(''); header('P3P: CP="NOI NID ADMa OUR IND UNI COM NAV"'); // header for weird cookie stuff. Blame IE. header('Cache-Control: private, must-revalidate'); ob_start(); error_reporting(E_ALL & ~E_NOTICE); /** * Filename: index.php * Function: This file loads and executes the parser. * */ define("IN_ETOMITE_PARSER", "true"); // provides compatibility with etomite 0.6 and maybe later versions define("IN_PARSER_MODE", "true"); define("IN_MANAGER_MODE", "false"); // initialize the variables prior to grabbing the config file $database_type = ''; $database_server = ''; $database_user = ''; $database_password = ''; $dbase = ''; $table_prefix = ''; $base_url = ''; $base_path = ''; // get the required includes if($database_user=="") { $rt = @include_once(dirname(__FILE__).'/manager/includes/config.inc.php'); // Be sure config.inc.php is there and that it contains some important values if(!$rt || !$database_type || !$database_server || !$database_user || !$dbase) { echo " <style type=\"text/css\"> *{margin:0;padding:0} body{margin:50px;background:#eee;} .install{padding:10px;border:5px solid #f22;background:#f99;margin:0 auto;font:120%/1em serif;text-align:center;} p{ margin:20px 0; } a{font-size:200%;color:#f22;text-decoration:underline;margin-top: 30px;padding: 5px;} </style> <div class=\"install\"> <p>MODx is not currently installed or the configuration file cannot be found.</p> <p>Do you want to <a href=\"install/index.php\">install now</a>?</p> </div>"; exit; } } // start session startCMSSession(); // initiate a new document parser include_once(MODX_MANAGER_PATH.'/includes/document.parser.class.inc.php'); $modx = new DocumentParser; $etomite = &$modx; // for backward compatibility // set some parser options $modx->minParserPasses = 1; // min number of parser recursive loops or passes $modx->maxParserPasses = 10; // max number of parser recursive loops or passes $modx->dumpSQL = false; $modx->dumpSnippets = false; // feed the parser the execution start time $modx->tstart = $tstart; // Debugging mode: $modx->stopOnNotice = false; // Don't show PHP errors to the public if(!isset($_SESSION['mgrValidated']) || !$_SESSION['mgrValidated']) @ini_set("display_errors","0"); // execute the parser if index.php was not included if(!$noparser) $modx->executeParser(); exit; ?>
-
[Noobie Question] Finding PHP code
It is the source code for the form that I cannot find. Yes, I have full FTP access.
-
[Noobie Question] Finding PHP code
Ah sorry, I can't. I need 25 posts
-
[Noobie Question] Finding PHP code
Nothing still :/ I did a search in the document for "GET[" with no results. Can I PM you the index.php file (Its only 5KB) for you to do a very quick look over if you wouldn't mind?
-
[Noobie Question] Finding PHP code
I've looked in index.php but there doesn't seem to be any reference to them numbers nor references to any contact forms etc...
-
[Noobie Question] Finding PHP code
I have made very basic html-only websites in the past but now need to edit a php-based website. I am trying to a a CAPTCHA to my grandparents' website because of bot issues they have been having. I will be using a tutorial. However, I cannot find the code for their contact page anywhere on their web server. The page is DOMAIN.CO.UK/index.php?id=6 How do I get to the code of the web form at /index.php?id=6?