Jump to content

WTFranklin

Members
  • Posts

    27
  • Joined

  • Last visited

Profile Information

  • Gender
    Not Telling

WTFranklin's Achievements

Newbie

Newbie (1/5)

0

Reputation

  1. So I figured out how to get the widget to show up on the site (called the wrong sidebar), but now when I log in to the member part of the site none of the posts are found. When I switch the theme back to the previous theme everything shows up no problem. Do I have to put in the product key somewhere in the template for it to work correctly? Thanks! -Frank
  2. Hi everyone, I'm not sure if anyone else has used the WishList Manager plugin, but I have a client who has it installed with his current theme made in wordpress. I didn't build his first theme, but I built him a custom one to use now and ran into some issues with this plugin not working with what I made. Looking at their support on their site they say that the most common issues are with javascript or the theme coding itself, but they didn't elaborate what could be done to combat any issues. The major issue is that logging in won't make the member pages/posts appear to anyone logged in, basically rendering the plugin useless. Without knowing exactly what my code would be breaking I don't know where to start researching and if at all possible I'd rather not just recode an existing theme that is for sure compatible after the work I've already done to get the custom theme to where it's at now. Any advice is appreciated! Thanks, -Frank
  3. Litebearer is right, you would want to use some sort of client side coding (javascript, jquery, etc.) but if you wanted to use a combination of both php has the ffmpeg library that can pull frames at random and then you can use JS to change the image to the frame it finds. It could be the easiest way of doing this would be with some AJAX techniques too. Hope that helps!
  4. Hello, I found a link that might help you http://stackoverflow.com/questions/274892/how-do-you-connect-to-multiple-mysql-databases-on-a-single-webpage This is an assumption from me (which I know isn't good ) but it looks like you didn't store the connections into multiple variables, which you'll see more about in this page. Hope that helps! -Frank
  5. Hey, Xyph has a point that you could do this all in javascript either with a mixture of the indexOf or subString functions to find the comma and store the value into an array if you weren't planning on doing anything to the values server side. If you were moving towards anything with the database though the ajax function works kind of like this: $.ajax({ url: '<link to php file with code you want executed>', type: 'POST' or 'GET', data: {<var_name>: <data>}, dataType: <json, xml, other formats listed in the documentation>, error: function(XMLHttpRequest, textStatus, errorThrown) { alert("Error: " + errorThrown + ", " + textStatus); }, success: function(data) { //code to execute if successful //for your code something like $('#place').val = data['city']; etc. } }); Here's a full list of what objects you can pass to $.ajax() http://api.jquery.com/jQuery.ajax/ I hope that helps! -Frank
  6. Hey, I was just taking a look at this and it seems like that should be working. If you're having any trouble it's could be because of the white space you're passing as a part of the deliminator $p = explode(" , ", $_GET['searchField'], 3); Try it like this and see if it helps: $p = explode(",", $_GET['searchField'], 3); and if you want to ensure that you aren't getting any additional white space in your strings you could put that in your variables like echo $cityname=trim($p['0']); echo $regionname=trim($p['1']); echo $countryname=trim($p['2']); Maybe not the most elegant way, but it could be a start. I'm not really sure where you want to go from there, but I'm assuming you might want to perform a search query or store the data in some way if you're using ajax with that as well. I'm not well-versed enough in ajax, but I know jquery has a nice ajax funtion that maybe could make life a little easier. It did for me anyway. -Frank
  7. Glad that worked for you. I'll definitely keep what you said in mind for the item_name. I didn't get much of a chance to look at this again earlier, but if I find anything while going over it that might be useful for you I'll let you know
  8. Hello, I was having some issues with this too. Someone had written a tutorial on it and posted it to my question so I figured I'd give the link to you too. http://www.micahcarrick.com/paypal-ipn-with-php.html Personally, I haven't had a chance to come back and finish this completely, but I was able to get a majority of this working. Hopefully it can help you with your issue too. -Frank
  9. Hey Micah, Sorry for the delay in response. Thank you so much for writing that tutorial, that cleared up so much! The one issue I ran into so far is during the testing it asks me to log in with the generated user account I set up in my sandbox account and my password doesn't want to work for that. I created this account maybe six months ago, would it be better to just start new accounts to see that helps? Also, this is thinking ahead (and probably a dumb question) when I'm ready to go live with this, would I just point to this script from my main paypal account and change the field in the form for the business email? Thanks! -Frank
  10. Hello, I've been going through PayPal's documentation for setting up the IPN. I set up the listener like they have in the documentation (pasted below). I know there's still more to add on my end for if the response is valid or not (I have basic 'Valid' or 'not valid' responses for now), but I was trying to do the IPN test in the sandbox and it says it tests okay. I don't get any emails and it doesn't show up in my IPN history. I'm not sure if there is something I'm missing or if there's a better example out there somewhere that is a little more practical or illustrative than the documentation, but any help is appreciated. Thanks in advance! -Frank <?php error_reporting(E_ALL ^ E_NOTICE); $email = $_GET['ipn_email']; $header = ""; $emailtext = ""; //Read the post from PayPal and add 'cmd' $req = 'cmd=_notify-validate'; if(function_exists('get_magic_quotes_gpc')) { $get_magic_quotes_exists = true; } //Handle escape chars, which depends on setting of magic quotes foreach ($_POST as $key => $value) { if($get_magic_quotes_exists == true && get_magic_quotes_gpc() == 1) { $value = urlencode(stripslashes($value); } else { $value = urlencode($value); } $req .= "&$key=$value"; }//foreach //Post back to paypal to validate $header .= "POST /cgi-bin/webscr HTTP/1.0\r\n"; $header .= "Content-Type: application/x-www-form-urlencoded\r\n"; $header .= "Content-Length: " . strlen($req) . "\r\n\r\n"; $fp = fsockopen('ssl:www.sandbox.paypal.com', 443, $errno, $errstr, 30); //Process validation from Paypal //TODO: This sample does not test the HTTP response code. All //HTTP response codes must be handles or you should use an HTTP //library, such as cURL if(!$fp) { //HTTP ERROR echo 'not opening socket'; } else { //NO HTTP ERROR fputs ($fp, $header . $req); while(!feof($fp)) { $res = fgets($fp, 1024); if(strcmp ($res, "VERIFIED") == 0) { //TODO: //Check the payment_status is completed //Check that receiver_email is your primary paypal email //check that the payment amount/payment currency are correct //Process payment //If 'VERIFIED', send an email of IPN variables and values to the //specificed email address foreach($_POST as $key => $value) { $emailtext .= $key . " = " . $value . "\n\n"; } if!(mail($email, "Live-VERIFIED IPN", $emailtext . "\n\n" . $req)) { echo 'not emailing if verified'; } echo 'verified!'; } else if (strcmp ($res, "INVALID") == 0) { //If 'INVALID', send an email. TODO: Log for manual investigation. foreach($_POST as $key => $value) { $emailtext .= $key . " = " . $value . "\n\n"; } if(!mail($email, "Live-INVALID IPN", $emailtext . "\n\n" . $req)) { echo 'not emailing if invalid'; } } } } fclose($fp); ?>
  11. Hi Fugix, thanks for the response. I actually was trying to use chmod() but it was giving me an error saying it wasn't enabled. Is that something I could change just for that script with ini_set()? Or would I have to contact the hosting company for that? Thanks!
  12. Hello, I was just seeing if someone could push me in the right direction. I have a form that uploads items to a database and it also includes uploading images to a directory as a part of that. That all works, but I was thinking for security it'd be best not to leave that directory as 0777 for permissions. In researching this I found the exec() function. I'm still figuring out the relation of who the permissions are associated with and why. All I know is if the directory has 0777 for permissions my script works just fine. I was just seeing if using exec to change the permissions during the process of uploading the images and then change back would be cumbersome and leave open other problems (there won't be any user-based input being passed to that) or if that actually would be the way to go for this. Thanks! -Frank
  13. Hello, Thanks for the response. I was trying to look for the php.ini file, but unfortunately can't seem to find that file specifically. I also can't find the exact path /usr/lib/php on my computer either. Is that something I should set up in my folder that I have a project using zend on? Sorry for the dumb questions, I'm really new to zend and doctrine. Thanks! -Frank
  14. Hello, I'm having trouble trying to get doctrine to work right. I'm running xampp on mac os x and it's saying that it can't find the file for the include path. This is the error it's giving me: Warning: require(Doctrine/ORM/Tools/Console/ConsoleRunner.php): failed to open stream: No such file or directory in /Applications/XAMPP/xamppfiles/lib/php/Doctrine/Common/ClassLoader.php on line 148 Fatal error: require(): Failed opening required 'Doctrine/ORM/Tools/Console/ConsoleRunner.php' (include_path='.:/usr/lib/php') in /Applications/XAMPP/xamppfiles/lib/php/Doctrine/Common/ClassLoader.php on line 148 I'm sure this is a n00b mistake, but I was just seeing if anyone could push me in the right direction with a tutorial or any advice. Thanks in advance! -Frank
  15. You should be able to add in target="_blank" as an attribute in your form tag that should open a new window instead. From there you could use javascript (or js library of some sort) in your file upload_file.php to resize the window to the dimensions you want. I've done that in the past, but the only downside is if a user has javascript turned off you won't get the same effect for those people. I hope that helps! -Frank
×
×
  • 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.