wdlyons
Forum Replies Created
-
Forum: Plugins
In reply to: [PDF Invoices & Packing Slips for WooCommerce] State abbreviation codeThanks again Yordan. Just wanted to let you know that worked perfectly. Much Appreciated!
Forum: Plugins
In reply to: [PDF Invoices & Packing Slips for WooCommerce] State abbreviation codeThank You Yordan for your prompt reply. Much Apppreciated!
I will give it a go.Cheers
WarwickOk,
If it is what I think it is, this is a bug i will be sorting out in the next version or so.
To temporarily fix it:
1. make a copy of the install.php file
2. open the original install.php and look for all lines starting with:header(“Location: “.bloginfo(‘url’).”/wp-admin/admin.php
and add the sub directory name to it.
For example, if you have installed wordpress into a directory call mywordpress, add this directory name to the above
header(“Location: “.bloginfo(‘url’).”/mywordpress/wp-admin/admin.php
That should get you out of trouble until I can fix it in a upcoming version
If you are unsure or not confident enough to do this yourself please forward the zip file you have of the plugin to me, plus the url of the installation directory and I will do it for you.
My email is [email protected]
Thanks
Warwick
My apologies for the delay in replying.
Just a quick question:
Have you installed WordPress into a sub directory?
Warwick
Hi Nikola,
Thanks for taking a interest in the plugin.
The difference between the two plugins is that the trial version has the delete and edit options removed as well as some of the look and feel options.
The full version obviously does not.
I hope this answers your question.
Regards
Warwick
Hi,
I am sorry you are receiving this error.
I have been unable to reproduce it, but if you could let me know what theme and, if possible, what plugins you are using I will definately get onto it straight away and see if I can produce a fix for you.
Kindest Regards
Warwick Lyons
Forum: Hacks
In reply to: Correct metgod to include wp-load.phpSorry to take so long to get back.
I finally got around the problem by posting the affected form info to itself and running the corresponding code on the same page.
Thanks for all your help
Warwick
Forum: Hacks
In reply to: Correct metgod to include wp-load.phpThanks Chris, bcworkz
I will try some of what you suggest and see how it goes.
I’ll post how it goes over the next day or two.
Appreciate the assistance
cheers
Warwick
Forum: Hacks
In reply to: Correct metgod to include wp-load.phpHi Chris,
Thats what I thought too but without the wp-load.php sanitize_text_field()comes up with a Fatal error: Call to a member function error.
I have the check_input function declared in my main plugin file
Forum: Hacks
In reply to: Correct metgod to include wp-load.phpThanks for your reply Chris,
After I load the wp-load.php file I grab form data using POST and run them through the following functions:
sanitize_text_field
check_inputThe code:
<?php $parse_uri = explode( 'wp-content', $_SERVER['SCRIPT_FILENAME'] ); require_once( $parse_uri[0] . 'wp-load.php' ); // Get values from form $person = sanitize_text_field( $_POST['person'] ); $person = check_input( $_POST['person']); $person_id = sanitize_text_field( $_POST['person_id'] ); $person_id= check_input($_POST['person_id'], "You need to Choose The 1st Person"); $spouse_id = sanitize_text_field( $_POST['spouse_id'] ); $spouse_id= check_input($_POST['spouse_id'], "You need to Choose The 2nd Person"); $mday = sanitize_text_field( $_POST['mday'] ); $mday = check_input( $mday); $mmonth = sanitize_text_field( $_POST['mmonth'] ); $mmonth = check_input( $mmonth); $myear = sanitize_text_field( $_POST['myear'] ); $myear = check_input( $myear); $date_of_marriage = ($mday." ".$mmonth." ".$myear); $date_of_marriage = sanitize_text_field( $date_of_marriage ); $date_of_marriage = check_input( $date_of_marriage); // Insert the values above into the person table include ('tablename.php'); // $family_id = $wpdb->get_var( "SELECT family_id FROM $table_name WHERE id = $id" ); $wpdb->insert($table_name2,array('person_id'=>$person_id, 'spouse_id'=>$spouse_id, 'date_of_marriage'=>$date_of_marriage)); $strSql = 'select last_insert_id() as lastId'; $result = mysql_query($strSql); while($row = @mysql_fetch_assoc($result)){ $marriage_id = $row['lastId']; } ?> <?php $wpdb->update($table_name2, array('marriage_id'=>check_input($marriage_id)), array('id'=>check_input($marriage_id))); //Once the page creation has been completed forward to the view person list header("Location: ".bloginfo('url')."/wp-admin/admin.php?page=add-submenu-view-spouse"); ?>
Forum: Hacks
In reply to: Displaying output from one table based on the info of anotherThank You.
You guys are Jets. Worked like a charm.
Just wonder if I could push the friendship that one more step. It was mentioned about “cleaning the values” prior to output. What method would you recommend?
I run the input through sanitize_text_field and a check input function:
function check_input($data, $problem=”)
{
$data = strip_tags($data);
$data = trim($data);
$data = stripslashes($data);
$data = htmlspecialchars($data);if ($problem && strlen($data) == 0)
{
die($problem);
}but unsure what is the best method for output.
Thanks Heaps
Warwick
Forum: Hacks
In reply to: Displaying output from one table based on the info of anotherHi,
I am having difficulties getting it to work. My interpretation is as follows
Am I correct in assuming that the code I use is
Where $tablename is the person table (a)and $tablename2 is the marriage info table (b and j)
`SELECT DISTINCT
$table_name.first_name AS spouse1_first_name,
$table_name.family_name AS spouse1_family_name, $table_name2.date_of_marriage,
$table_name.id,
$table_name.first_name AS spouse2_first_name,
$table_name.family_name AS spouse2_family_name
FROM $table_name
INNER JOIN $table_name ON $table_name.id=$table_name2.person_id OR $table_name.id=$table_name2.spouse_id
INNER JOIN $table_name2 ON $table_name.id=$table_name2.person_id OR $table_name.id=$table_name2.spouse_id `Thanks in advance
WarwickForum: Hacks
In reply to: Displaying output from one table based on the info of anotherThanks
Will give it ago.
I thought about adding the marriage_id to the person table but thought multiple marriages may cause a problem.
Will let you know how it turns out
Thanks Again
Warwick
Forum: Hacks
In reply to: How do I ignore a particular row in a table when I display it.Finally found the solution:
changed the
$sibling = $wpdb->get_results( “SELECT * FROM $table_name WHERE father_id = ‘$father_id’ OR mother_id = ‘$mother_id'” );to
$sibling = $wpdb->get_results( “SELECT * FROM $table_name WHERE (mother_id = ‘$mother_id’ OR father_id = ‘$father_id’) AND id <> ‘$id'” );
Forum: Hacks
In reply to: Remove border from images used within pluginsFound the answer
Added
img.m{class name}{
box-shadow: 0 0px 0px;
}to the plugin css file