Jump to content

cip6791

Members
  • Posts

    44
  • Joined

  • Last visited

    Never

Everything posted by cip6791

  1. Ok ... so let s say I have post on a blog, and I want to select the word "does" from that post. I want to know how many times the word "does" shows up in the post.
  2. Hi, I want to recognize let s say "..." in a text. How can that be accomplished in php? And maybe put all "..." into an array. Anybody have any idea how this can be done? Thank you
  3. Beautiful ... thank you very much!
  4. SimpleXMLElement Object ( [id] => 235570173 [name] => SEO BPO [screen_name] => seobpo [location] => New York [description] => 10 SEOs come together to launch an amazing SEO outsourcing company. [profile_image_url] => http://a2.twimg.com/profile_images/1210167979/seo-bpo_normal.jpg => http://seobpo.com [protected] => false [followers_count] => 2 [profile_background_color] => C0DEED [profile_text_color] => 333333 [profile_link_color] => 0084B4 [profile_sidebar_fill_color] => DDEEF6 [profile_sidebar_border_color] => C0DEED [friends_count] => 0 [created_at] => Sat Jan 08 14:50:50 +0000 2011 [favourites_count] => 0 [utc_offset] => SimpleXMLElement Object ( ) [time_zone] => SimpleXMLElement Object ( ) [profile_background_image_url] => http://a3.twimg.com/a/1294279085/images/themes/theme1/bg.png [profile_background_tile] => false [profile_use_background_image] => true [notifications] => SimpleXMLElement Object ( ) [geo_enabled] => false [verified] => false [following] => SimpleXMLElement Object ( ) [statuses_count] => 3 [lang] => en [contributors_enabled] => false [follow_request_sent] => SimpleXMLElement Object ( ) [listed_count] => 0 [show_all_inline_media] => false [is_translator] => false [status] => SimpleXMLElement Object ( [created_at] => Sun Jan 09 15:10:22 +0000 2011 [id] => 24120802144157696 [text] => This is our profession ! We are the best at it ! http://fb.me/EkLpCMwg [source] => Facebook [truncated] => false [favorited] => false [in_reply_to_status_id] => SimpleXMLElement Object ( ) [in_reply_to_user_id] => SimpleXMLElement Object ( ) [in_reply_to_screen_name] => SimpleXMLElement Object ( ) [retweet_count] => 0 [retweeted] => false [geo] => SimpleXMLElement Object ( ) [coordinates] => SimpleXMLElement Object ( ) [place] => SimpleXMLElement Object ( ) [contributors] => SimpleXMLElement Object ( ) ) ) That worked. thank you very much. But I still have no clue on how to get the tweet count. This is an array now ... right? And data can be extracted using php just like any other array? I read that xml files have categories. Can you give me an example on how you get this: [statuses_count] => 3? I m a little confused here.
  5. I can t seem to get this. I need to extract some data from the following xml file. http://api.twitter.com/1/users/show/seobpo.xml I just want to get seobpo's tweet count. The data will be used in a wordpress blog. Thank you
  6. Any luck? I m still having the same problem.
  7. Hello, I'm trying to use a dropdown to display different divs. <html> <head> <title>DDlist Div Display</title> <script type="text/javascript"> function ShowDivArea(info) { var sel = document.getElementById('divArea').getElementsByTagName('div'); for (var i=0; i<sel.length; i++) { sel.style.display = 'none'; } if (info == '0') { return; } document.getElementById('divArea'+info).style.display = 'block'; } </script> <style type="text/css"> .divArea { display:none; height:100px; width:200px; border:1px solid red; } </style> </head> <body> <select id="DDDivList" onchange="ShowDivArea(this.selectedIndex)"> <option value="0" selected> -- Select A Design Service --</option> <option value="1"> QR Bookmark </option> <option value="2"> Twitter </option> <option value="3"> Ning or Tumblr </option> <option value="4"> Flyers </option> <option value="5"> Business Card or Brochure</option> <option value="6"> Album or Mixtape cover</option> <option value="7"> Other</option> </select> <div id="divArea"> <div id="divArea1" class="divArea"> <h1>QR Bookmarks</h1> <form action='qrgen.php' method='POST'> <input type='text' name='bmarksite'> URL<br> <input type='text' name='sitedesc'> Description<br> <input type='submit' value='Convert'><br> <?php include("QrCodes.php") ?> <?php $bmarksite = $_POST['bmarksite']; $sitedesc = $_POST['sitedesc']; if ($sitedesc&&$bmarksite) { $qrcode = new QrCodes; $qrcode -> IsImage =1; echo $qrcode -> GetBookmark("$bmarksite","$sitedesc"); echo "</br>"; echo $bmarksite; echo "</br>"; print $sitedesc; } else { echo "Please fill in all the required fields."; } ?> </div> <div id="divArea2" class="divArea">Twitter</div> <div id="divArea3" class="divArea">Ning or Tumblr</div> <div id="divArea4" class="divArea">Flyers</div> <div id="divArea5" class="divArea">Business Card or Brochure</div> <div id="divArea6" class="divArea">Album or Mixtape Cover</div> <div id="divArea7" class="divArea">Other</div> </div> </body> </html> The problem is with this line: <form action='qrgen.php' method='POST'>. I am using a wordpress page template. What should I change the qrgen.php to? Or how do I get it to work? Thank you for your help.
  8. Hi, The below code displays a qr code depending on what page of a wordpress blog you are on. I need a little help with a little feature that I want. I want each qr code to be saved in a folder when it is generated, then it should be displayed in the widget from the folder, and it shouldn't be generated every time. And one last thing, I want to put them in an array and display the codes. Thank you for your help. function qrcode_show() { echo "<!-- START Create QR code -->\n"; echo "<div class=\"qrcode\">\n"; echo '<img class="qr" src="'.get_bloginfo('siteurl').'/wp-content/plugins/'.dirname(plugin_basename(__FILE__)).'/scripts/php/qr_img.php?d='.""; echo ''.the_permalink().'&e='.get_option('correction').'&s='.get_option('size').'&t=J"/>'."\n"; echo "</div>\n"; echo "<!-- END Create QR code -->\n"; }
  9. Well the way it works is ... It opens up a new tab in a browser with http://www.example.com/nokia.html let s say. I would just like to be able to fill in nokia with anything i want. I didn't write the script ... so maybe that s why it s a little confusing. I'm new at this. It' like this: <?php $sites = array(); $sites['example'] = "http://www.example.com/%u"; if(isset($_POST['submit']) && !empty($_POST['page']) && !empty($sites[$_POST['site']])){ $url = str_replace('%u',$_POST['page'],$sites[$_POST['site']]); header("Location: {$url}"); } ?> <html> <body> <form target="_blank" action="<?=$_SERVER['REQUEST_URI']?>" method="POST"> <select name="site" id="site"> <? foreach($sites as $key=>$site){?> <option value="<?=$key?>"><?=$key?></option> <?}?> </select> <input type="text" name="page" /> <input type="submit" name="submit" value="Go" /> </form> </body> </html>
  10. This is the rest of the code that I am using. Will this still work if I change the action to the processing script? <?php $sites = array(); $sites['Example.com'] = "http://www.example.com/pages/%u"; if(isset($_POST['submit']) && !empty($_POST['page']) && !empty($sites[$_POST['site']])){ $url = str_replace('%u',$_POST['page'],$sites[$_POST['site']]); header("Location: {$url}"); } ?>
  11. Hello, I would like to write whatever is being typed into this form: <form class="form" target="_blank" action="<?=$_SERVER['REQUEST_URI']?>" method="post"> <img src="images/digg-big.jpg" alt="digg" border="0" style="padding-bottom:10px;" align="absmiddle"></img> <select name="site" id="site" class="site"> <? foreach($sites as $key=>$site){?> <option value="<?=$key?>"><?=$key?></option> <?}?> </select> <input type="text" name="page" class="input" /> <input type="submit" name="submit" class="go" value="Go" /> </form> into a database. I know that i'm suppose to create a new page ... update.php ... and action ="update.php" but what do I do with the action="<?=$_SERVER['REQUEST_URI']?>" ? Thank you.
  12. thank you ... i ll give it a try and let u know how it works.
  13. an example would be great. i don't know php.
  14. hi ... I have a general header.php which I include in all my pages. I am building a static website. How would like to make the button in the navigation be on hover like if user is on home page the home button stays a different color. and so on. so i have this : <li><a href="index.php" class="active">Home</a></li> but since all the pages get the same page, how can i change the active class for each of my pages? there are 5 in total. thank you
  15. Just moving the post up in the list.
  16. Yeah ... oops ... forgot that. When the page opens, it opens with the alphabet on top, and the few categories I have underneath. If you press the letter "a" for ex, you ll get all the categories with the letter "a". I would like to have it start with all the "a" categories. http://www.iheartbrooklyn.com
  17. Hi all I hope you can help me with this one. I managed to get categories in alphabetical order from a database. But I don't know how to integrate everything in the page. I wanted to get the categories by the first letter. Now all the categories are all thrown on a page. I am a beginner and promise to start learning php the proper way. But help me with this one first This is my code foreach(range('a', 'z') as $letter) { echo '<div class="alpha"><a href="?cat=' . strtolower($letter) . '">' . $letter . '</a></div>'; } $cat = isset($_GET['cat']) ? $_GET['cat'] : null; if(in_array($cat, range('a', 'z'))) { $result = mysql_query("SELECT * FROM xzclf_cats WHERE catname LIKE '$cat%' ORDER BY catname ASC"); while($row = mysql_fetch_assoc($result)) { echo "<br />"; echo '<a style="text-decoration:none;" href="<?php echo $catlink; ?>"><img src="' . $row['thumb'] . '" /></a>'; echo $row['catname']; echo "<br />"; } } And this is where I want to integrate it // Categories $sql = "SELECT catid, catname AS catname FROM $t_cats WHERE enabled = '1' $sortcatsql"; $rescats = mysql_query($sql) or die(mysql_error()); $catcount = @mysql_num_rows($rescats); $percol_short = floor($catcount/$dir_cols); $percol_long = $percol_short+1; $longcols = $catcount%$dir_cols; $i = 0; $j = 0; $col = 0; $thiscolcats = 0; while($rowcat=mysql_fetch_array($rescats)) { if ($j >= $thiscolcats) { $col++; $thiscolcats = ($col > $longcols) ? $percol_short : $percol_long; $j = 0; echo "<td valign=\"top\" width=\"$cell_width%\">"; } $i++; $j++; $catname_inurl = RemoveBadURLChars($rowcat['catname']); if($sef_urls) $catlink = "{$vbasedir}$xcityid/posts/$rowcat[catid]_{$catname_inurl}/0/"; else $catlink = "?view=ads&catid=$rowcat[catid]&cityid=$xcityid&lang=$xlang"; $adcount = 0+$catadcounts[$rowcat['catid']]; ?> <table border="0" cellspacing="0" cellpadding="0" width="100%" class="dir_cat"> <tr> <?php $category_icon = file_exists("images/category/{$rowcat[catid]}.png") ? "images/category/{$rowcat[catid]}.png" : "images/category.png"; ?> <th width="25" valign="top"></th> <th id="main_image"><a style="text-decoration:none;" href="<?php echo $catlink; ?>"><img class="main_image" src="<?php echo $category_icon; ?>" border="0" align="absmiddle"> <?php echo $rowcat['catname']; ?></a> </th> </tr> <?php There is more code ... something to do with sub categories. If needed I will post it all. Thanks
  18. Hi all, I have a question. I currently use a classifieds script that deletes the ad after a certain amount of time. So I lose the e-mail which was used to post the ad. I would like to copy the existing email from the ads table to another table and keep them there for future use. Does anybody have any idea how this can be done? I would like it to be automatically copied into the new table. Thanks
  19. overflow:scroll; ? maybe it will help
  20. lol. i get it. so you re telling me that there is no cure for my little problem?
  21. Hello all I hope somebody can help me out with this one. I m beginging to hate IE more and more. I have a simple overflow:scroll; on a div and in FF it works fine, in IE7 it works fine but in IE8 it jumps back to the top as soon as I scroll down. I don t know what to do. This is the link: http://pixeltennis.com/produse_cosmetice_roc.html Please help
  22. Hi Why won't this work ? <a href="javascript:warp()" target="_parent"><img src="img/sub_index_hydra_bio.jpg" name="targetimage" width="546" height="352" border="0"></a></div> This is in an iframe. I have 3 links on the left side and the image changes when mouse is hovered on any link. The links point to different pages. I would like the images to do the same. If I take out the target=_parent, the images have links, but in the iframe. Can anybody help ? Thanks p.s. this is the page: http://pixeltennis.com/noutati_cosmetice_roc.html
  23. I just took out the overflow:scroll; and they all just started working right. The divs that should scroll are scrolling and the divs that don t need to scroll don t have the inactive scroll bar. Thanks
×
×
  • 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.