Jump to content

jrp91384

Members
  • Posts

    29
  • Joined

  • Last visited

    Never

Everything posted by jrp91384

  1. Hello, I’m hoping someone can help me with this. I’m using a plugin named MM Forms on a Wordpress install and have an issue when the form is being submitted. If the user fills out the form but fails to complete a required filed the form does not submit and shows the field that needs to be complete, as it should. The problem I’m having is it clears all the fields on the form making the user re-enter everything. The plugin has various files so not sure what I should supply in this post for assistance in debugging the problem. Any help is greatly appreciated! Thank you
  2. Well not sure why but it works outside the folder. Thank you sooo much for all the help MadTechie!! I really appreciate it
  3. I will give that a try. Thank you so much for the help!
  4. That is exactly how it is. I have the following. /home/xxx/public_html/wp-content/plugins/mm-forms/captcha/gentium/GenAI102.TTF /home/xxx/public_html/wp-content/plugins/mm-forms/captcha/cpatcha.php
  5. Hi MadTechie I'm not mr. php but the files and paths look correct. Below is the code i have and the ttf files are in a file called gentium. Something strange is one of the fonts in that file is showing. Not sure what font it is but when you refresh the page it changes the captcha image and shows 1 letter sometimes and 2-3 letters another time. Any Ideas?? Thanks for the help!!!! this is line 60 imagettftext($im, $this->font_size, mt_rand(-2, 2), $x, $this->base[1] + mt_rand(-2, 2), $fg, $font, $captcha[$i]); class mm_captcha { function mm_captcha() { $this->chars = 'ABCDEFGHJKLMNPQRSTUVWXYZ23456789'; $this->char_length = 4; $this->fonts = array( dirname(__FILE__) . '/gentium/GenAI102.TTF', dirname(__FILE__) . '/gentium/GenAR102.TTF', dirname(__FILE__) . '/gentium/GenI102.TTF', dirname(__FILE__) . '/gentium/GenR102.TTF'); $this->tmp_dir = dirname(__FILE__) . '/tmp/'; $this->img_size = array(72, 24); $this->bg = array(255, 255, 255); $this->fg = array(0, 0, 0); $this->base = array(6, 18); $this->font_size = 14; $this->font_char_width = 15; $this->img_type = 'png'; } function generate_random_word() { $word = ''; for ($i = 0; $i < $this->char_length; $i++) { $pos = mt_rand(0, strlen($this->chars) - 1); $char = $this->chars[$pos]; $word .= $char; } return $word; } function generate_image($prefix, $captcha) { $filename = null; if ($im = imagecreatetruecolor($this->img_size[0], $this->img_size[1])) { $bg = imagecolorallocate($im, $this->bg[0], $this->bg[1], $this->bg[2]); $fg = imagecolorallocate($im, $this->fg[0], $this->fg[1], $this->fg[2]); imagefill($im, 0, 0, $bg); $x = $this->base[0] + mt_rand(-2, 2); for ($i = 0; $i < strlen($captcha); $i++) { $font = $this->fonts[array_rand($this->fonts)]; imagettftext($im, $this->font_size, mt_rand(-2, 2), $x, $this->base[1] + mt_rand(-2, 2), $fg, $font, $captcha[$i]); $x += $this->font_char_width; } switch ($this->img_type) { case 'jpeg': $filename = $prefix . '.jpeg'; imagejpeg($im, $this->tmp_dir . $filename); break; case 'gif': $filename = $prefix . '.gif'; imagegif($im, $this->tmp_dir . $filename); break; case 'png': default: $filename = $prefix . '.png'; imagepng($im, $this->tmp_dir . $filename); } imagedestroy($im); } if ($fh = fopen($this->tmp_dir . $prefix . '.php', 'w')) { fwrite($fh, '<?php $captcha = "' . $captcha . '"; ?>'); fclose($fh); } return $filename; } function check($prefix, $response) { if (is_readable($this->tmp_dir . $prefix . '.php')) { include($this->tmp_dir . $prefix . '.php'); if (0 == strcasecmp($response, $captcha)) return true; } return false; } function remove($prefix) { $suffixes = array('.jpeg', '.gif', '.png', '.php'); foreach ($suffixes as $suffix) { $file = $this->tmp_dir . $prefix . $suffix; if (is_file($file)) unlink($file); } } } ?>
  6. Help Please! I’m receiving the following error. Warning: imagettftext() [function.imagettftext]: Invalid font filename in /home/xxx/public_html/wp-content/plugins/mm-forms/captcha/captcha.php on line 60 I have checked and the folder and files needed are writable. I also contacted my host to see if Truetype was on the server and it is. What else could be causing this? Any help would be greatly appreciated!! Thank you
  7. jrp91384

    Add Image

    I thank you MadTechie and haku for the help! This is over my head but thank you for your time.
  8. jrp91384

    Add Image

    The problem with using conventional html is the quotes within the function. How do I add it within a function output?
  9. jrp91384

    Add Image

    Hello, Could someone please tell me how to add an image within my list items? I don't know how to code the file path within a function. Any help is greatly appreciated!!! Thank you function vis_page_overview() { echo ' <div class="wrap"> <p id="icon-edit" class="icon32"><h2>xxx Center Overview</h2></p> <p>Below you will find instructions on how to perform common tasks that are specific to your site.</p> <div id="vis-box-1" class="vis-boxes"> <div class="box-heading">Quick Links - General</div> <ul> <li><a href="?page=definitions">Definitions</a></li> <li><a href="?page=pages#edit-page">Edit - Page</a></li> <li><a href="?page=pages#add-page">Add - Page</a></li>
  10. Thank you so much lemmin!!! That did the trick.
  11. Hello, Situation: I’m trying to link to another page from within a page. I have my pages within one file. How do you link to another page or function? Each page’s content is within its own function. I want to link the first list item (Definitions) to the page definitions page. Sorry if I have not explained my question very well. I’m a complete beginner of php and it’s a bit over my head. Just trying to create a small plugin for WP. Any help is greatly appreciated! Thanks add_submenu_page( __FILE__, 'xxx Center Overview', 'Overview', 5, __FILE__, 'vis_page_overview'); add_submenu_page( __FILE__, 'Admin Menu Definitions', 'Definitions', 5, 'definitions', 'vis_definitions'); //================================ // Overview Page Content //================================ function vis_page_overview() { echo ' <div class="wrap"> <p id="icon-edit" class="icon32"><h2>xxx Center Overview</h2></p> <p>Below you will find instructions on how to perform common tasks that are specific to your site.</p> <div class="vis-box1"> <div class="box-heading">Quick Links</div> <ul> <li><a href="#">Definitions</a></li> <li><a href="#">Pages</a></li> <li><a href="#">Sidebar</a></li> <li><a href="#">Footer</a></li> <li><a href="#">Copyright</a></li> <li><a href="#">xhtml Tags</a></li> </ul> </div> <div class="vis-box2"> <div class="box-heading">Accounts</div> </div> <div class="vis-box3"> <div class="box-heading">Tutorials</div> </div> <div class="vis-box4"> <div class="box-heading">Help</div> </div> </div> '; } //================================ // Definitions Page Content //================================ function vis_definitions() { echo ' <div class="wrap speclists"> <a name="top" id="top"></a> <p id="icon-edit-comments" class="icon32"><h2>Admin Menu Definitions:</h2><p> <p> etc....etc....
  12. bump Any input from you php experts would be greatly appreciated.
  13. Hi, I'm trying to figure out how to have my sql dump file gz-zipped prior to being sent via email. I don't know much about php and have not been able to figure it out after viewing many snippets online. If someone can steer me in the right direction I would really appreciate it. The following is the script I am using. Thank you! <? //data.php is all of the connection info require("data.php"); $today = date("m-d-Y"); exec('mysqldump -u'.$User.' -p'.$Password.' '.$DBName.' > /tmp/dbDump-'.$today.'.sql'); //send MIME message with dump $EmailBody = implode("\n",file('/tmp/dbDump-'.$today.'.sql')); //email body text $htmltext = "Your database backup file is attached. Please save it in a secure location.<br /><br />Thank you\n"; $text = "Mien Dumpenflugen\n"; //edit for each backup $FromName = "XXXXX"; $from = "XXXXX"; $fromname = "XXXXX"; $subject = "db-dump $today"; $ToName = "XXXXX"; $ToEmail = "XXXXX"; //add From: header $headers = "From: ".$from."\n"; //specify MIME version 1.0 $headers .= "MIME-Version: 1.0\n"; //unique boundary $boundary = uniqid(MD5(time())); //tell e-mail client this e-mail contains //alternate versions // use alt for test and multi for attachements $headers .= "Content-Type: multipart/alternative" ."; boundary = $boundary\n\n"; //message to people with clients who don't //understand MIME $headers .= "This is a MIME encoded message. If you are seeing this, your mail program is not MIME compliant. Sorry\n\n"; //HTML version of message $headers .= "--$boundary\n" ."Content-Type: text/html; charset=ISO-8859-1\n"."Content-Transfer-Encoding: base64\n"."Content-Disposition: inline\n\n"; $headers .= chunk_split(base64_encode($htmltext)); $headers .="--$boundary\n"; //plain text version of message $headers .="--$boundary\n"; $headers .= "Content-Type: text/plain; charset=ISO-8859-1\n"."Content-Transfer-Encoding: 7bit\n"."Content-Disposition: inline\n"; $headers .= $text; $headers .= "--$boundary\n"; $boundary2 = uniqid(MD5(time())); $headers .= "Content-Type: multipart/mixed" ."; boundary = $boundary2\n\n"; //echo "<br><br>Boundry:<br> $boundary<br>$boundary2<br>end of boundry"; $attach_path = "/tmp/dbDump-".$today.".sql"; $attach = "dbDump-".$today.".sql"; //attachment filename Data $headers .= "--$boundary2\n"; $headers .= "Content-Type: text/richtext; "."name=\"".$attach."\"\n"; $headers .= "Content-Transfer-Encoding: "."base64\n"; $headers .= "Content-Disposition: attachment\n\n"; $filedata = implode(file('/tmp/dbDump-'.$today.'.sql')); $headers .= chunk_split(base64_encode($filedata)); $headers .= "--$boundary2--\n"; $headers .= "--$boundary--\n"; //echo $headers; //send message mail($ToName." <".$ToEmail.">", $subject, "", $headers); $ToEmail = "XXXXX"; mail($ToName." <".$ToEmail.">", $subject, "", $headers); //cron output confirm email echo "Cron Dump processed $today\n"; ?>
  14. Problem Solved: I deleted the subdomain and re-saved permalinks. Go figure? Thank you again for all the help!!!
  15. Sorry to sound like an idiot but how would one go about checking if the header is forwarding? I have setup a redirect of blog.oldskillbuilders.com to oldskillbuilders.com. yet still have the index.htm file rendering that is located on the subdomain. By the way, thank you for your help! It’s much appreciated.
  16. Well I deleted the wp cache directory and regenerated the .htaccess file but had no luck. I have cleared everything out of the subdomain and put an index.htm file with a paragraph saying "this file is located in the subdomain". When browsing to ht tp://oldskillbuilders.com/blog it renders this subdomain index.htm file but shows ht tp://oldskillbuilders.com/blog in the address bar. Does this make any sense?
  17. Yes, I did change those settings to the new URL
  18. I hope someone can help me with this. I have searched and tried everything I can think of but have had no success. This is the situation: I move my install of Wordpress from a subdomain to the main root site directory “mydomain.com”. I am using wordpress as a CMS for this site that also includes a blog page. Everything is working fine except my navigational link to the blog page. When I click on the link about it goes to "w w w.mydomain.com/about" This works the same for the other pages like home, contact, and FAQ’s except for the page labeled blog. When I hover over the link to the blog page it shows the correct path at the bottom of the browser. Once I click it the path at the bottom switches to the subdomains address “blog.mydomain.com/blog” (it’s being re-directed to the subdomain). The blog.mydomain.com/blog page is then rendered. The weird thing is the path in the address bar is mydomain.com/blog and not the path to the page that is actually being seen. I don’t want any part of the site to use the subdomain anymore. I need to delete the subdomain and only use the root directory for the entire site. I’m also using permalinks. If I use the default selection, the blog link seems to go to the blog file on mydomain.com/blog rather than the subdomain as intended. But I need to use pretty permalinks showing the pages name and when set to do that the blog link malfunctions. Things I have tried: I deleted the .htaccess file info and had WP re-generate it by re-saving the permalink info. Prior to doing this I set permissions to 666 and also tried 777 on the .htaccess file. I have run a “find and replace search” on all directory files looking for traces of the subdomain name and found nothing. I did a search in the database and also found no traces of the subdomain. Every thing was switched to the root directories domain name “mydomain.com” Please, does anyone know how the link to my blog page is directing me to and loading the subdomain file and still showing the correct file path to the root directory in the browsers address bar? Thank you!!!!!!!!
  19. If I understand correctly, I would have to change file paths when testing on my widows machine and then prior to uploading the files to the external server I would have to re-adjust the file paths for it to properly work. And a way around this hassle would be to not share the pc as a testing server but rather have another machine/server for building and testing purposes allowing me to build and upload the final product without changing paths in the scripts. Is this correct?
  20. The nix file path refers to my external server. The Windows file path is referring to my testing server that is just a shared location on my window machine using xampp.
  21. configuration.php is located in a subdomain named secure. announcement.php is in the main domain.
  22. Hello, I'm receiving the following errors and was hoping someone could help. I have been working on this all day and can not find a solution. When I first entered the code I had no problems. But now for some reason it will not work when trying to view the page. The warning says no such file or directory but it is there. I think the problem pertains to (include_path='.;C:\xampp\php\pear\') but not sure. Warning: require(/home/visolio/public_html/secure/billing/configuration.php) [function.require]: failed to open stream: No such file or directory in C:\xampp\htdocs\Visolio_Clients\visolio_root\Scripts\phpscripts\announcment.php on line 22 Fatal error: require() [function.require]: Failed opening required '/home/visolio/public_html/secure/billing/configuration.php' (include_path='.;C:\xampp\php\pear\') in C:\xampp\htdocs\Visolio_Clients\visolio_root\Scripts\phpscripts\announcment.php on line 22
  23. Any further suggestions would be helpful. Thank You!
×
×
  • Create New...

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.