Jump to content


Staff Alumni
  • Posts

  • Joined

  • Last visited

Posts posted by steelmanronald06

  1. Okay, here's the deal.  I think my eyes are crossing from working on the computer for the past 6 hours (google maps api, twitter, etc).  Very frustrating.  Anyways, I'm having a problem that I think revolves with explode().


    Go to: http://www.oldhatcreative.com/newohtestground/twitter/


    Okay now hover over a link for someone.  Lets say oldhatcreative.  The link reads:

    http://www.twitter.com/oldhatcreative</uri>    </author>

    Obviously I don't want it to read like that, but I can't see to figure out how to strip out that </uri>    </author>.  By all accounts it should be there.


    Second problem.  Hover over any of the links in the actual tweets.  They display as:


    I want links to parse as normal html links...and they should.  If you go to http://search.twitter.com/search.atom?q=from%3aoldhatcreative and View Source, you'll see that twitter nicely puts that stuff into <a href="">...</a> tags for me!


    Now for my code.


    Relative Time Function
    based on code from http://stackoverflow.com/questions/11/how-do-i-calculate-relative-time/501415#501415
    For use in the "Parse Twitter Feeds" code below
    define("SECOND", 1);
    define("MINUTE", 60 * SECOND);
    define("HOUR", 60 * MINUTE);
    define("DAY", 24 * HOUR);
    define("MONTH", 30 * DAY);
    function relativeTime($time)
    $delta = strtotime('+2 hours') - $time;
    if ($delta < 2 * MINUTE) {
    	return "1 min ago";
    if ($delta < 45 * MINUTE) {
    	return floor($delta / MINUTE) . " min ago";
    if ($delta < 90 * MINUTE) {
    	return "1 hour ago";
    if ($delta < 24 * HOUR) {
    	return floor($delta / HOUR) . " hours ago";
    if ($delta < 48 * HOUR) {
    	return "yesterday";
    if ($delta < 30 * DAY) {
    	return floor($delta / DAY) . " days ago";
    if ($delta < 12 * MONTH) {
    	$months = floor($delta / DAY / 30);
    	return $months <= 1 ? "1 month ago" : $months . " months ago";
    } else {
    	$years = floor($delta / DAY / 365);
    	return $years <= 1 ? "1 year ago" : $years . " years ago";
    <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
    <html xmlns="http://www.w3.org/1999/xhtml">
    <meta http-equiv="Content-Type" content="text/html; charset=UTF-8" />
    <title>Untitled Document</title>
    // Pull multiple acccounts by listing here.  Seperate with a space
    $usernames = "dustinschmidt OldHatCreative ixdeb xxghostxx";
    // Number of tweets to pull, IN TOTAL!
    $limit = "15";
    // Show usernames?  0=No, 1=Yes
    $show = 1;
    // POI: When using HTML, escape double-quotations like this:  \"
    // This comes before the entire block of tweets
    $prefix = "<h1>Old Hat Twitter Feeds</h1><ul>";
    // This comes before each tweet on the feed.
    $prefix_sub = "<li>";
    // This comes after the username but before the tweet content.
    $wedge = " says: ";
    $suffix_sub = "</li>";
    // This comes after the entire block of tweets.
    $suffix = "</ul>";
    // POI: Beyond here, have good PHP knowledge before altering
    function parse_feed($usernames, $limit, $show, $prefix_sub, $wedge, $suffix_sub) {
    // Use some regex to get the usernames correct
    $usernames = str_replace(" ", "+OR+from%3A", $usernames);
    // Push that into the feed
    $feed = "http://search.twitter.com/search.atom?q=from%3a" . $usernames . "&rpp=" . $limit;
    $feed = file_get_contents($feed);
    $feed = str_replace("&", "&", $feed);
    $feed = str_replace("&alt;a href="", "<a href=\"", $feed);
    $feed = str_replace("">", "\">", $feed);
    $feed = str_replace("</a>", "</a>", $feed);
    $feed = str_replace("<", "<", $feed);
    $feed = str_replace(">", ">", $feed);
    $clean = explode("<entry>", $feed);
    $amount = count($clean) - 1;
    for ($i = 1; $i <= $amount; $i++) {
    	$entry_close = explode("</entry>", $clean[$i]);
    	$clean_content_1 = explode("<content type=\"html\">", $entry_close[0]);
    	$clean_content = explode("</content>", $clean_content_1[1]);
    	$clean_name_2 = explode("<name>", $entry_close[0]);
    	$clean_name_1 = explode("(", $clean_name_2[1]);
    	$clean_name = explode(")</name>", $clean_name_1[1]);
    	$clean_user = explode(" {", $clean_name_2[1]);
    	$clean_lower_user = strtolower($clean_user[0]);
    	$clean_uri_1 = explode("<uri>", $entry_close[0]);
    	$clean_uri = explode("</uri>", $clean_uri_1[1]);
    	$clean_time_1 = explode("<published>", $entry_close[0]);
    	$clean_time = explode("</published>", $clean_time_1[1]);
    	$unix_time = strtotime($clean_time[0]);
    	$pretty_time = relativeTime($unix_time);
    	$super_clean_name_2 = $clean_name[1];
    	$super_clean_name_1 = explode (".com/", $super_clean_name_2);
    	$super_clean_name = $super_clean_name_1[1];
    	echo $prefix_sub;
    	if ($show >= 1) {
    		echo "<a href=\"http://www.twitter.com/" . $super_clean_name . "\">" . $super_clean_name . "</a> " . $wedge;
    	echo $clean_content[0];
    	echo $suffix_sub;
    echo $prefix;
    parse_feed($usernames, $limit, $show, $prefix_sub, $wedge, $suffix_sub);
    echo $suffix;

  2. Are you a member of PHPFreaks and have a blackberry?  Well RIM just recently released Blackberry Messenger 5.0!  What does this mean for you, the user?  It means that you have all sorts of cool new features in your Blackberry Messenger, including groups! That's right, groups!


    To get started I've got a couple links that will help you download the new messenger and that will walk you through the basics of the new features:


    http://crackberry.com/blackberry-messenger-5-0-now-available (Install BBM 5.0)


    http://crackberry.com/blackberry-messenger-5-0 (The BBM 5.0 User Guide)


    Okay, so now you should have your Blackberry Messenger 5.0 set up.  Right?  Click your options button (referred to as the Berries button).  Go down to scan a group barcode.  Your camera will activate.  Hold it towards your monitor and center the image (see attached image and the link below) so that the camera displays all the image.  Hold it there (may take a few seconds and up to a minute).  The berry will make a beep noise and you'll be added to the PHPFreaks Blackberry User Group!


    http://tweetphoto.com/b1d280 (Link to the Blackberry Group Barcode)




    *note that tweetphoto might max out for that particular photo per month, in which case you can use the barcode that I attached.  All the same*


    [attachment deleted by admin]

  3. Okay sadly enough my javascript skills aren't as great as they need to be:




    This site works great in Safari/Firefox, but in Internet Explorer the slide show will only display the first picture but not actually slide.  Any ideas?  It is in an iFrame... You can use Firebug/Safari Developer to view the javascript files and see for yourself what the code looks like <easier than posting pages of code here>.

  4. my roommate has an HTC and he hates it.  My manager also had one and he had to replace it 4 times because of mfg problems.  :-/  I don't know if the Hero is an improvement, but you never know till you try.  Just be sure to read reviews and do some research because having to change phones and copy all your stuff over sucks.

  5. I got an idea for the revenue, why dnt al staff as a team write a very interesting phpfreaks ebook whch would cary thngs from basics to advance in a very easy way unlike the books available over the net. And also book would have phpfreaks tags n people wil for sure buy bøöks fröm hèré.




    There are your books :)

  6. Mine is a company phone... I asked them to cover the monthly costs if I bought a BB on my own and they just threw an iPhone at me.  :)


    Well remember the attendance discussion we had?  It is great for when I go out of town or experience an internet outage I can alert Dan or someone on GTalk.  Or if people really need to get in touch with me they have my IM and mobile.  Also, I don't give everyone my cell number, like people online, so they have my IM name.  Then i can just log off when I get bugged or annoyed. 

  7. Right, well I'm interested to see who has blackberry's and what apps you like.  To help people give us your blackberry model so that we will know right away if the app you have will work for us.


    Blackberry Curve 8330 - Verizon/Alltel


    Shazam - Love having the ability to figure out the name/artist of a song.  Only 4.99 usd if you want unlimited song tags, else the free trial allows 5 successful tags per month.


    Yahoo Messenger

    Google Talk



    Mobile Banking


    google maps

  8. Revenue is based on donations by our members and the ads generated by Google.  The daily hits is free to look at at the bottom of the forums. There is a link, at least for me, that shows average daily values...minus moderator and administrator activity.

  9. Your best bet is a splash page, like your index.php page, that has your ToS on it.  On that page just say something along the lines of:


    [site name] does not host or support any of the .torrents found on this site.  We use a software that scans each users local disks, searches the web for .torrents that match the results from the disk, and displays links to those external torrents.  We are in no way affiliated with any of these external sites, nor do we take any responsibility for any illegal material obtained.



    That should be enough to release you from any type of lawsuit.  Then it is up to whoever wants to sue to find which site is actually hosting those torrents and shutting them down instead of you.

  10. Under the Contact box, you have those three Reporters Assoc. boxes.  The way you've styled them make them appear as buttons, but you have to actually hover over the wording to click them.  How about making the entire box a click-able button?


    Also the bottom of the page could use a little something.  At the very top you have that dark brown (i think brown, i'm color blind) bar.  How about something like that at the very bottom.  Else it feels like the page should just continue on. 

  11. I'm curious as to how they got an admin account without SOME type of exploit in SMF code.  my password is a random mixture of letters, numbers, and symbols.  and there are no english words or dates/years in my password. I'm fairly sure the other admins passwords are of similar caliber, which makes me believe it is possibly a flaw in SMF source

  12. I made it to where you can update your primary group to author (Darkwater, I did this for you myself just to test and make sure it went through. Feel free to change it if you wish.)  As far as the image goes, you'll have to wait till Daniel0 makes one of the cool tricked out name tags for the Author Group.

  13. I think, ultimately, this Thread was opened to discuss issues you had with the Ads in regards to slow load, it is making it hard to read messages, it breaks the divs/template, it is causing me to get errors, etc.  Things such as how appealing it is to the eye, if you like ads or not, etc.  are really out of topic.  The Ads were placed here by the Administration Team of this site, they will remain (unless you are an active donor), and the decision is final.


    Now, if you have a problem relevant to errors, slow load, major lags, etc. that were stated earlier, then please let us know so we can fix them.  Ultimately, this site DOES cost money to run.  Even with the argument, "I would gladly donate, there was no need for ads." You are one of the select few that would donate, which is why we turn the Ads off for you.  Even google displays Ads on their search pages, you just don't see them as Ads.  You see them as Premium Search Results, but someone paid to have those Search Results placed on the right hand of the search screen.

  14. NOT seems so un professional.  I'd go with something like the following:


    By registering with MySoshial.com you agree the following:

    No member may break international laws, local laws, state laws and/or national laws while using this website. This means that you agree not to break any law or regulation that applies to you or your local jurisdiction. You agree that you are solely responsible for all omissions that occur under your account, including content transmitted by you or your account.


    No member may abuse, bully, threaten, defame, stalk and/or violate the rights of others.


    Members may not publish anything that is harmful, hateful, obscene, libelous, profane, unlawful and/or damaging to another person(s).


    Members may not upload images that show violence, nudity, strong language, pornography, copyright material, or any other kind of image that infringes on the rights of others - and/or brings (or may bring) the website into disrepute.


    Members may not infringe on any copyright and/or trademark without written permission from the owner.

    Members who falsely impersonate another body and/or person will not be tolerated.

    No member will modify or attempt to modify the website and/or service in anyway.


  • 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.