Jump to content

selenin

Members
  • Posts

    86
  • Joined

  • Last visited

Everything posted by selenin

  1. Hi First I make a file get contents and I get this I need two thins of that not at the same time, first I need subscriberCount='10', but only the number, I tried it like that: $names = preg_match_all('/subscriberCount=\'(.*)\'/', $page_contents, $matches); print_r($matches); But it's not right I'm getting too much. The second I would need <media:thumbnail url='http://i4.ytimg.com/i/7dhwlpv7R2qgw7XFivDuiw/1.jpg?v=a553d6'/> Only the url of that.
  2. Ah okaj thanks, I just wondered that I even couldn't loggin any more with session_set_cookie_params()
  3. Hi I have an addon Domain, so you can open the site like http://www.mydomain.com/folder/ or http://www.otherdomain.com Now I want that when you are logged in you will be logged in in both, they have both the same folder. The loggin process works with $_SESSION, is there a way that the session_start() and the session_destroy can handle both sites?
  4. Thanks xenophobia, just made it works very well
  5. Hi, I'm a beginner with javascript, but I want to change my script, that the site doesn't always reload after saving a form. One form with one id I'm able to do, but different forms with the same id I don't know how. These are my forms: Now my question, is there a way to submit each form without reloading the site?
  6. Thanks a lot Crayon Violent, but this is too difficult for me , I'm not yet able to work with classes and objects, can only modify them a bit, but I will learn it...
  7. Hi Do I have to make a preg_match() for this: I would need "esoterikforums"
  8. Hi I make a query to a database, normally it gives back a 0, now I want that the script keeps in touch with the database till the row gives back one. Till now I made it with a setInterval and went through the function again and again, but I think it's not really good for the database. Can't the function wait in the query till comes back a 1 and then doing something? Here is what I got so far:
  9. Thanks a lot xylex, that made it
  10. Hi I made a curl and don't know what to do with the string I got back, I would need the id and the name of each, should I explode, don't know how to do that, here is what I got as answer:
  11. Thanks a lot Pikachu2000, that was it, works great
  12. I built now an array, but doesn't work, like that: $types = array(); while($row=@mysql_fetch_object($rs)) { $types[] = $row->id; and in the query: and produgg_users.id NOT IN ('".$types."') ORDER BY RAND() LIMIT 5")
  13. Hi I make 3 querys first Order by DESC, second RAND() and third ASC. Now I want that in the second query can't be the same ids (produgg_users.id) that already taken in the first. And in the third not the ids from first and second. Like I have it now the same users can show up in the RAND() and the ASC like in DESC. Here my Script so far: $rs = mysql_query("select produgg_users.id, twitterUser, credits from produgg_users where twitterUser != '' and produgg_users.id IN (select concat_ws(',', id) from produgg_users where credits > 0 and id != ".$usersClass->userID().") and produgg_users.id NOT IN (select concat_ws(',', followedID) from produgg_activity where followerID = '".$usersClass->userID()."') and produgg_users.id NOT IN (select concat_ws(',', userid) from produgg_featured) ORDER BY credits DESC LIMIT 10") or die(mysql_error()); $nr = @mysql_num_rows($rs); if($nr != 0) { print "<p>Simply click <strong>get 1 point</strong> and you will automatically FOLLOW the USER and earn the credit!</p>"; print "<p><font color=\"#0066FF\">Top Members</font></p>"; while($row=@mysql_fetch_object($rs)) { $divLeft = '<div id="thediv_'.$row->id.'"><div style="float:left;width:400px;">'; $divRight = '<div style="float:left;width:150px;">'; $clearDiv = '<div style="clear:both;"></div>'; print "$divLeft<img src=\"http://api.twitter.com/1/users/profile_image/".strip_tags($row->twitterUser)."?size=mini\" alt=\"\" /> ".strip_tags($row->twitterUser)." <font color=\"#999999\" size=\"1\">$row->credits Points</font></div>$divRight <a href='javascript:void(0);' id='vote_$row->id' class='getPoint'>Get 1 Point</a></div>$clearDiv<hr /></div>"; $z = 1; } } //Lucky Riders $rs = mysql_query("select produgg_users.id, twitterUser, credits from produgg_users where twitterUser != '' and produgg_users.id IN (select concat_ws(',', id) from produgg_users where credits > 0 and id != ".$usersClass->userID().") and produgg_users.id NOT IN (select concat_ws(',', followedID) from produgg_activity where followerID = '".$usersClass->userID()."') and produgg_users.id NOT IN (select concat_ws(',', userid) from produgg_featured) ORDER BY RAND() LIMIT 5") or die(mysql_error()); $nr = @mysql_num_rows($rs); if($nr != 0) { print "<p><font color=\"#0066FF\">Lucky Riders</font></p>"; while($row=@mysql_fetch_object($rs)) { $divLeft = '<div id="thediv_'.$row->id.'"><div style="float:left;width:400px;">'; $divRight = '<div style="float:left;width:150px;">'; $clearDiv = '<div style="clear:both;"></div>'; print "$divLeft<img src=\"http://api.twitter.com/1/users/profile_image/".strip_tags($row->twitterUser)."?size=mini\" alt=\"\" /> ".strip_tags($row->twitterUser)." <font color=\"#999999\" size=\"1\">$row->credits Points</font></div>$divRight <a href='javascript:void(0);' id='vote_$row->id' class='getPoint'>Get 1 Point</a></div>$clearDiv<hr /></div>"; $z = 1; } } //Lucky Riders $rs = mysql_query("select produgg_users.id, twitterUser, credits from produgg_users where twitterUser != '' and produgg_users.id IN (select concat_ws(',', id) from produgg_users where credits > 0 and id != ".$usersClass->userID().") and produgg_users.id NOT IN (select concat_ws(',', followedID) from produgg_activity where followerID = '".$usersClass->userID()."') and produgg_users.id NOT IN (select concat_ws(',', userid) from produgg_featured) ORDER BY credits ASC LIMIT 5") or die(mysql_error()); $nr = @mysql_num_rows($rs); if($nr != 0) { print "<p><font color=\"#0066FF\">Last Rides</font></p>"; while($row=@mysql_fetch_object($rs)) { $divLeft = '<div id="thediv_'.$row->id.'"><div style="float:left;width:400px;">'; $divRight = '<div style="float:left;width:150px;">'; $clearDiv = '<div style="clear:both;"></div>'; print "$divLeft<img src=\"http://api.twitter.com/1/users/profile_image/".strip_tags($row->twitterUser)."?size=mini\" alt=\"\" /> ".strip_tags($row->twitterUser)." <font color=\"#999999\" size=\"1\">$row->credits Points</font></div>$divRight <a href='javascript:void(0);' id='vote_$row->id' class='getPoint'>Get 1 Point</a></div>$clearDiv<hr /></div>"; $z = 1; } } :'(
  14. I try to modify a twitter application, but I have no idea what I'm doing, this is my code so far: require 'Zend/Oauth/Consumer.php'; $token = unserialize($usersClass->twitterToken()); if(!empty($token)) { $client = $token->getHttpClient($config); $client->setUri('http://twitter.com/users/profile_image/twitter.json'); $client->setParameterGet('screen_name', $screen_name); $client->setMethod(Zend_Http_Client::GET); $response = $client->request(); } I want to get the twitter profile image, but I think it's too difficult for me...
  15. Hi Is there another function then header() in php for forwarding?
  16. Hello, I have a problem with the lightsoff function with novamov, with the other players I tested it works so far, here my javascript: And this is my template code: Some how it doesn't make the append, I think
  17. Thanks a lot jcbones, that works great
  18. Yes I know, I try when $res->year() has a value of $arr then not show, I tried it like that: foreach ($results as $res) { if($res->year() != $arr) { echo '<li>'; echo '<a href="'. imdblink($res->imdbid(), $res->year(), $res->title()).'" title="'.$res->title().' '.$res->year().'">'.fewchars("".$res->title()." (".$res->year().")", 35).'</a>'; //echo "<li> <a href='suggest.php?mid=".$res->imdbid()."'>".$res->title()." (".$res->year().")</li>"; echo '</li>'; $i++; if ($i > 11) break; //} } } But it doesn't work because $arr is an array and $res->year() has never all values of $arr
  19. when I make a foreach in the foreach and a if not, it loops me all around, I'm really far away from a solution
  20. Hello, it's still a big gap between what I want and what I'm able to, now I built an array and I try that in the foreach the lines with these values don't show up, that's my code: $arr $i = 0; foreach ($results as $res) { echo '<li>'; echo '<a href="'. imdblink($res->imdbid(), $res->year(), $res->title()).'" title="'.$res->title().' '.$res->year().'">'.fewchars("".$res->title()." (".$res->year().")", 35).'</a>'; //echo "<li> <a href='suggest.php?mid=".$res->imdbid()."'>".$res->title()." (".$res->year().")</li>"; echo '</li>'; $i++; if ($i > 11) break; } in this example $arr has these two values: now I try in my foreach where $res->year() has a value from $arr don't show up, but is a bit too difficult for me
  21. jonsjava it's not working, now it doesn't work in Firefox even, I don't know what's kind of array $results is that's what I get a part of:
  22. Hello, now I try it the other way, because my script is not working in IE with a jquery function and jquery I don't know, was already happy that I made it for Firefox, now I found out what's not working and have this little question, if I can make the echo out of the foreach function with all the values, my code: $search->setsearchname($_POST['queryString']); $results = $search->results (); $i = 0; foreach ($results as $res) { echo "<li> <a href='suggest.php?mid=".$res->imdbid()."'>".$res->title()." (".$res->year().")</li>"; $i++; if ($i > 11) break; } Now I just need the echo out of the foreach with all values but don't know how to make it, if it's even possible
  23. I wanted to test what I wrote and I saw that my jquery funtion is not working in Internet Explorer, (Firefox and Opera fine). The problem is a foreach call in the php, I can only see the last one of the call not each one, that's my javascript code: that's my template code: <td><input name="video_title" type="text" value="{$smarty.post.video_title}{$movie_title}" size="40" class="inputtext" id="grabberString" {if $smarty.const._SEARCHSUGGEST == 1}onkeyup="lookup2(this.value);" onblur="fill();" autocomplete="off"{/if} /> <div class="suggestionsBox" id="suggestion" style="display: none;"> <div class="suggestionList" id="autoSuggestions"> </div> </div> and that's my ajax_gabber.php code: if(strlen($queryString) >= 3) { $num_res = 0; if(strlen($queryString) > 3) { $sql = "SELECT uniq_id, year, video_title FROM pm_videos WHERE MATCH(video_title) AGAINST ('$queryString') AS score ORDER BY score ASC LIMIT 10"; $query = @mysql_query($sql); $num_res = @mysql_num_rows($query); } if($num_res == 0) { $query = @mysql_query("SELECT year, video_title, uniq_id FROM pm_videos WHERE video_title LIKE '%$queryString%' LIMIT 10"); } if($query) { while($result = mysql_fetch_array($query)) { $output .= '<li onClick="fill(\''.$result['video_title'].' '.$result['year'].'\');">'; if (_THUMB_FROM == 2) // Localhost { $output .= '<img src="'. show_thumb($result['uniq_id']) .'" width="32" align="absmiddle" style="margin: 1px 4px;" alt="'.$result['video_title'].' '.$result['year'].'" />'; } $output .= '<a href="'. grabberlink($result['uniq_id'], $result['year'], $result['video_title']).'" title="'.$result['video_title'].' '.$result['year'].'">'.fewchars("".$result['video_title']." (".$result['year'].")", 35).'</a>'; $output .= '</li>'; } } else { $output = $lang['search_results_msg3']; } } } echo $output; $search->setsearchname($_POST['queryString']); $results = $search->results (); //var_dump($results); $i = 0; foreach ($results as $res) { echo "<li> <a href='suggest.php?mid=".$res->imdbid()."'>".$res->title()." (".$res->year().")</li>"; $i++; if ($i > 11) break; } exit(); Now the problem is in IE that the foreach in ajax_grabber.php is not working, it shows only the last one and even that one not proper and the code above is ignored... $i = 0; foreach ($results as $res) { echo "<li> <a href='suggest.php?mid=".$res->imdbid()."'>".$res->title()." (".$res->year().")</li>"; $i++; if ($i > 11) break; }
  24. , thanks a lot, I'm still not able to do it the easy way
  25. Hello, arrays are killing me, my code: $keywords = $movie->keywords(); foreach ($keywords as $tag) { var_dump($tag); } then I get this but I would need the result out of the loop, but there I have only Parallel Universe, when I make this: $keywords = $movie->keywords(); var_dump($keywords); I get this: What I could need is the second one but only with one key, then I could make a foreach in the template, is this possible like Maybe I'm completely on the wrong way
×
×
  • 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.