Jump to content

woolyg

Members
  • Posts

    254
  • Joined

  • Last visited

    Never

Everything posted by woolyg

  1. Hi inversesoft123, That looks good, but it's not what I'm looking to do. My website has an admin section where I fill out a small form, and when the form is submitted, the data is posted to my site. One of the short text fields gets automatically posted to twitter upon form submission (at least, it used to). I'm trying to recover that functionality. Can anyone out there shed any light on how to get this functionality back? WoolyG
  2. Hi all, Since twitter changed the way they allow people to post, my simple php script to grab the $_POST data from an input and post it to my twitter profile has broken. I've been reading up on Oauth, but none of the documentation is clear at all. It's quite complex, in fact - they assume you are creating a full app, which I am not - I just want to flick some text to twitter. I just want to pass a simple string variable to my account - can anyone help me with how to do this? All help appreciated. WoolyG
  3. Good input, Hybrid. Thanks for that. I'm tiptoeing around the possibility of getting into it. I like the MVC model, and I have a feeling it will take the bulk out of my usual way of coding. I'm definitely going to read a bit more into it. WoolyG
  4. That's an excellent synopsis, sunwukung - thanks. I'll be looking to incorporate scriptaculous JS framework too, can anyone tell me if codeigniter has an issue with it?
  5. I'm looking at getting my head into it, but sort of evaluating whether I'm better off just doing the lug work and writing the code myself. Does anyone here reckon it's super-duper? Does it have any major drawbacks? Opinions please! WoolyG
  6. Never mind - I managed to hack into it through the admin section. Looks like a them had broken in moving the site to my server - a reinstall of the theme got it working.
  7. Hi everyone, I've committed to giving a friend a dig out with his blog to add some functionality - turns out it's a WP install. I've received the MySQL dump, and have restored it to a WP install on my private testing server. The problem is, as soon as I try to bring up the main page, I get a 404 error. Before the obvious 'have you uploaded the index.php page' questions come up, let me say I'm confident that all WP files are uploaded OK. Say the live site is http://www.matesblog.com - I'm trying to restore it to http://www.myprivateserver.net/matesblog Has anybody got any experience in getting a WP install up & running on a different server than it was installed on? if so, could you lend some advice? All info appreciated. WoolyG
  8. Here's some lorna dune - to get you started Teamatomic.. Cheers! Wool
  9. Hi all, Here's one that might curl your noodle. I'm writing a web app that takes submissions from users, but doesn't require a login or a password from the person submitting the content. However, I'd like the app to be able to record info, behind the scenes, unique to the person's location / computer. $_SERVER['REMOTE_ADDR'] is good, but it only records their IP address, and if they are on a shared private network, then the app will get confused, as more than one person could be submitting content from that IP. gethostbyaddr() is also good, but it's effectively an extension of $_SERVER['REMOTE_ADDR'], and doesn't give unique location / computer info. session_id() only records the session ID for the user's currently-logged-on session, and it changes each time they close their browser. Basically, I'd like person A to open the app from any PC in the world (possibly on a private network), and submit their content without needing to log in. Then, person B opens the app, and say they're on the same private network as person A - I'd like the app to know that they are actually not person A, as they are on a different PC. Get me? Am I talking about cookies here? I'm new enough to PHP not to have learned about cookies yet All thought appreciated. Thanks, WoolyG
  10. Hi Ken, Thanks for that - I'll look into it. I found a pretty simplistic bit of code that I'm going to try too: /* settings */ $username = 'myUser'; $password = '**********'; $format = 'xml'; //alternative: json $message = 'Tweet goes here!'; /* work */ $result = shell_exec('curl http://twitter.com/statuses/update.'.$format.' -u '.$username.':'.$password.' -d status="'.str_replace('"','\"',$message).'"'); echo $result; Cheers WoolyG
  11. Hi all, Does anyone know of a script or class that allows a twitter account to be updated from the text inputted into an input form? I want to be able to input text into one of my content management forms, and upon processing the script, have it automatically show on my twitter account. I've done a few searches, but none are jumping out at me..! Thanks WoolyG
  12. Hi all, I'm making an AJAX call into a DIV, which is returning text, just fine. What I'd like to do is, when the text is, say, equal to '123', I'd like to do another ajax call, into a different DIV, that writes a different bit of text. The first Ajax Call is returning the following PHP: $text = $_GET['text']; if($text == "123"){ echo "<script>ajax_call_root('c/ajax.comment.logged_in.inc.php', 'vote_ajax_bottom');</script>"; } where 'c/ajax.comment.logged_in.inc.php' is the new php file to call, and 'vote_ajax_bottom'' is the target DIV. Can this be done? Cheers WOolyG
  13. Hi xcandiottix, Thanks! I did notice that some browsers (IE7 mainly) placed the black line going across the top of the screen slightly higher than others, causing the wording up there to get crunched a bit. I'll look into that. Might move the 'Great Idea' part down a bit, too. Thanks very much for your feedback! Cheers WoolyG
  14. Hello all, This is the first site I've put forward for critique, so some brutal honesty would be greatly appreciated! http://www.premium-sites.net I've built it using elements of the Scriptaculous framework, good old PHP and a smattering of AJAX for good measure. I'm interested in getting some initial gut feelings on the layout, content, clarity, etc. Whatever you feel worth putting forward would be great. I'm branching out to try to get some serious contracts, so I obviously want my flagship site to be a good one:) Thanks, WoolyG
  15. I think I've solved it - for myself, anyway! I Hope the below code makes sense and helps someone else out.. Here's what I *was* using: function ajax_refresh_root(dataSource, divID) { var XMLHttpRequestObject = false; if (window.XMLHttpRequest) { XMLHttpRequestObject = new XMLHttpRequest(); } else if (window.ActiveXObject) { XMLHttpRequestObject = new ActiveXObject("Microsoft.XMLHttp"); } if(XMLHttpRequestObject) { var obj = document.getElementById(divID); document.getElementById(divID).innerHTML =""; XMLHttpRequestObject.open("GET", dataSource, true); XMLHttpRequestObject.onreadystatechange = function() { if (XMLHttpRequestObject.readyState == 4 && XMLHttpRequestObject.status == 200) { obj.innerHTML = XMLHttpRequestObject.responseText; delete XMLHttpRequestObject; XMLHttpRequestObject = null; } } XMLHttpRequestObject.send(null); } } The code that's the issue (for me anyway) is this: document.getElementById(divID).innerHTML =""; If I add a new line at the top of the function: original_content = document.getElementById(divID).innerHTML; ..and change the problem line to: document.getElementById(divID).innerHTML = original_content; The refresh does not flicker! Full working code below: function ajax_refresh_root(dataSource, divID) { original_content = document.getElementById(divID).innerHTML; // NewLine! var XMLHttpRequestObject = false; if (window.XMLHttpRequest) { XMLHttpRequestObject = new XMLHttpRequest(); } else if (window.ActiveXObject) { XMLHttpRequestObject = new ActiveXObject("Microsoft.XMLHttp"); } if(XMLHttpRequestObject) { var obj = document.getElementById(divID); document.getElementById(divID).innerHTML = original_content; // Altered line to not show 'nothing' XMLHttpRequestObject.open("GET", dataSource, true); XMLHttpRequestObject.onreadystatechange = function() { if (XMLHttpRequestObject.readyState == 4 && XMLHttpRequestObject.status == 200) { obj.innerHTML = XMLHttpRequestObject.responseText; delete XMLHttpRequestObject; XMLHttpRequestObject = null; } } XMLHttpRequestObject.send(null); } } My app is now flicker-free! WoolyG
  16. It's only occurring when I am viewing from my workplace, so it might be something to do with that. Ah well. Nevermind!
  17. This might be one for PHPFreaks.com Questions, Comments, & Suggestions..
  18. Hi all, Long time listener, first time caller within this part of the forum. Has anybody else noticed how that when you're posting a new topic (or replying) on the PHP Freaks forums, that when you hit the bottom of the text box, like if it was a long reply etc, the focus of the textbox jumps around, and it becomes painful to enter text? It seems to have only happened since the site was upgraded a few months back. Is this something the admins can look at? It's becoming awfully annoying to use the site.. WoolyG
  19. Hi all, I'm using the following code as my AJAX call framework: function ajax_call_root(dataSource, divID) { var XMLHttpRequestObject = false; if (window.XMLHttpRequest) { XMLHttpRequestObject = new XMLHttpRequest(); } else if (window.ActiveXObject) { XMLHttpRequestObject = new ActiveXObject("Microsoft.XMLHttp"); } if(XMLHttpRequestObject) { var obj = document.getElementById(divID); document.getElementById(divID).innerHTML =""; XMLHttpRequestObject.open("GET", dataSource, true); XMLHttpRequestObject.onreadystatechange = function() { if (XMLHttpRequestObject.readyState == 4 && XMLHttpRequestObject.status == 200) { obj.innerHTML = XMLHttpRequestObject.responseText; delete XMLHttpRequestObject; XMLHttpRequestObject = null; } } XMLHttpRequestObject.send(null); } } and the following JS to call a PHP file through AJAX: function update_online_users(){ // FUNCTION 9 ajax_call_root('c/ajax.online_users.list.inc.php', 'body_online_users'); } then, I'm calling the setInterval script and updating a DIV: <font onmouseover="javascript:this.style.cursor='pointer';" onclick="javascript:setInterval('update_online_users()', '5000');" title="Click Here" >Click Here</font> .. which works fine, however, every time the script is called to update the DIV, the text flickers. Does anybody know of a way to update the text within a div without the horrible flickering? All input appreciated. WoolyG
  20. Hmm, no joy. I placed the setInterval() into the OnClick of the link, and it sets the JS off, so I'm happy with that. Now, off to open a new post about trying to get rid of the dreaded AJAX flicker! Thanks!
  21. Is it possible to call setInterval halfway down a page, or from an AJAX call? I have a page, and what I'd like to happen is that when someone clicks a link, a div opens up for them, showing current info (all good, works fine). What I'd like to do then is to use setInterval() to update the Div I've just opened, and refresh the data. Is this possible? When I use <body onLoad="setInterval('update_online_users()', '5000');" > ..that updates the div fine, but I don't want it to be updating the div when the page loads, only when the AJAX call is made to populate the div in the first instance. At the end of my AJAX call I use <script type="text/javascript"> setInterval('update_online_users()', '5000'); </script> ..but it doesn't work. Can anyone shed any light on whether I'm barking up the right tree? WoolyG
  22. Found out what I needed to do - $get_events = " SELECT CONVERT(VARCHAR(19), e.OccurrenceTime, 120) as event_timestamp FROM dbo.ExTable e "; This outputs the timestamp in a php-DATETIME-friendly format! Hope this helps someone else too - solved:) WoolyG
  23. Hi all, I am using PHP to get a datetime value out of an SQL DB. The field type is datetime, and the fomat it is stored in is 2007-05-21 02:56:59.000, or YYYY-MM-DD HH:MM:SS.xxx When I use the following query in PHP to grab the date info $get_events = " SELECT e.OccurrenceTime FROM dbo.ExTable e "; $run_events = mssql_query($get_events); while($display_events = mssql_fetch_assoc($run_events)){ // WHILE 52 $OccurrenceTime = $display_events['OccurrenceTime']; echo $OccurrenceTime."<br />"; } // WHILE 52 .. it returns timestamps with the layout May 21 2007 2:56AM. I'd like it to be of the format 2007-05-21:02:56:59 Can anyone point out how I can get this done? It outputs the datetime format just fine with mysql All help appreciated, WoolyG
  24. Hi all, Just a quick one - is it possible to connect to an MSSQL DB Server from a web server hosted upon a linux OS? I've been reading about the requirements to have SQL Client Tools running on the web server serving the PHP pages. Has anyone tried connecting to a Windows SQL DB from a PHP page that is hosted on a Linux OS? Cheers WoolyG
  25. Hi all, I'm doing a bit of reading on this but I can't find a clear answer - hopefully someone can help me. I'm looking at setting up a home web server - a box running Ubuntu Server 9.10 essentially - to host a development site that I'm working on. The domain name is bought, and the server is set up and working on the internal network, but I'm having a bit of trouble grasping DNS for the domain name registration. Is it absolutely necessary to have 2 public fixed IP addresses for proper DNS listing? BIND DNS is set up on the Ubuntu box, so is it possible to set up ns1.mysite.com and ns2.mysite.com with the registrar, and have both DNS settings point to my home server? The reasoning for running the home server is because my scripts are quite CPU-intensive, and shared hosts have expressed dimay at me hogging the CPU, so I'm looking into this. I'm basically looking to see if the DNS that is installed into the server is sufficient, or do I need to specify another NS.mysite.com listing, that is set up on a different IP? All input appreciated. WoolyG
×
×
  • 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.