Jump to content

balkan7

Members
  • Posts

    234
  • Joined

  • Last visited

Everything posted by balkan7

  1. Ok i am using this code for replace url link: $html = preg_replace('/gallery\.php\?show=([0-9]+)/i','gallery/$1',$html); with this code show me this result: gallery?show=5 i need this result: gallery/5
  2. Hello I'm trying to make jquery hover images but show me nothing, where is my mistake ? gallery.html <html> <head> <title>Test</title> <link rel="stylesheet" href="style.css" /> <script src="https://ajax.googleapis.com/ajax/libs/jquery/1/jquery.min.js"></script> <script src="js/default.js"></script> </head> <body> <div class="gallery"> <ul class="items"> <ul> <li><span class="img_frame"><a href="img/s6300159.jpg"><img src="img/test1.jpg" /></a></span><div class="img_desc"><span>22</span></div></li> <li><span class="img_frame"><a href="img/s6300159.jpg"><img src="img/test1.jpg" /></a></span><div class="img_desc"><span>23</span></div></li> <li><span class="img_frame"><a href="img/s6300159.jpg"><img src="img/test1.jpg" /></a></span><div class="img_desc"><span>24</span></div></li> </ul> </ul> </div> </body> </html> style.css /* GALLERY STYLES */ .gallery {overflow:hidden; width:1000px;} .gallery .items { margin-bottom:50px; height:320px; } .gallery .items li { position:relative; float:left; width:290px; height:180px; margin-right:38px; margin-bottom: 30px; } .gallery .items li img { width:277px; height:165px; } .img_desc { position: absolute; display: block; top: 10px; text-shadow: 1px 1px 0 #ffffff; color: #262626; background: url(img/benefits_on.png) repeat; width: 36px; right: 5px; text-align: center; } .img_frame { margin-top:3px; padding:1px; display:inline-block; line-height:0px; background:#fff; border:1px solid #ccc; } .img_frame img { padding:1px; border:4px solid #f2f1f0; } .img_frame a { display:block; } .hover_image { background:url("img/preview_image.png") center center no-repeat; } default.js <!-- Image hover effect --> function image_hover(frame){ var link_content = jQuery(frame).find('a[href^=http], a[href*=www], a[href=#], a[href$=html], a[href$=php], a[href$=asp], a[href$=htm], a[href$=shtml], a[href$=aspx]'); var image_content = jQuery(frame).find('a[href$=jpg], a[href$=png], a[href$=gif], a[href$=jpeg]'); var video_content = jQuery(frame).find('a[href*=vimeo], a[href*=youtube], a[href*=swf], a[href*=flv], a[href*=avi], a[href*=mov], a[href*=mpg]'); link_content.addClass("hover_link"); image_content.removeClass("hover_link").addClass("hover_image"); video_content.removeClass("hover_link").addClass("hover_video"); jQuery(frame).find("a > img").hover( function() { if(!jQuery(this).parent().hasClass("no_hover")){ jQuery(this).stop().animate({"opacity": ".6"}, "400"); } }, function() { jQuery(this).stop().animate({"opacity": "1"}, "400"); }); jQuery(frame).children("a.no_hover").removeClass("hover_image"); return false; } jQuery(function(){ image_hover('.img_frame'); });
  3. Maybe my mistake, i review my code but here no errors, why show me empty delimiter header_includes.php <?php $page_head_tags = ""; function add_to_head($tag=""){ global $page_head_tags; if(!stristr($page_head_tags, $tag)){ $page_head_tags .= $tag."\n"; } }?> header.php <?php include("header_includes.php"); ?> <html> <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd"> <head> <meta http-equiv="Content-Language" content="en-us"> <meta http-equiv="Content-Type" content="text/html; charset=utf-8"> <title><?php echo EMS_CAD; ?></title> <meta name="description" content="EMS-CAD, Arhitektura"> <meta name="keywords" content="EMS-CAD, Arhitektura"> <link rel="stylesheet" href="stil.css" type="text/css" media="screen" /> <?php if (function_exists("add_to_head")) { echo add_to_head(); } ?> </head> <body> <table class="table" cellspacing="0" cellpadding="0" align="center"> <tr> <td valign="top" nowrap> <table class="table" cellspacing="0" cellpadding="0"> <tr> <td> <img border="0" src="sliki/header1.jpg" width="400" height="200"></td> <td class="header"><div class="top"> <a href="index.php" title="<?php echo HOME;?>" class="prozirnost"><img src="sliki/naslovna.gif" border="0" alt="<?php echo HOME;?>"></a> <img src="sliki/tocki.gif"> <a href="kontakt.php" title="<?php echo MSG;?>" class="prozirnost"><img src="sliki/mail.gif" border="0" alt="<?php echo MSG;?>"></a> <img src="sliki/tocki.gif"> <a href="#" title="<?php echo MAP;?>" class="prozirnost"><img src="sliki/mapa.gif" border="0" alt="<?php echo MAP;?>"></a></div></td> </tr> </table> index.php <?php include_once("header.php"); add_to_head("<link rel='stylesheet' href='blue.css' type='text/css' media='screen' />");?>
  4. i get this error message: Warning: stristr() [function.stristr]: Empty delimiter in C:\xampp\htdocs\testsite\header_includes.php on line 8
  5. Hi, i need help for add custom code like javascript or css to head, i have function for it but i'm confused , here is code: header.php <?php <html> <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd"> <head> <meta http-equiv="Content-Language" content="en-us"> <meta http-equiv="Content-Type" content="text/html; charset=utf-8"> <title><?php echo EMS_CAD; ?></title> <link rel="stylesheet" href="style.css" type="text/css" media="screen" /> <?php if (function_exists("add_to_head")) { echo add_to_head(); } ?> </head>?> includes.php <?php $page_head_tags = ""; function add_to_head($tag=""){ global $page_head_tags; if(!stristr($page_head_tags, $tag)){ $page_head_tags .= $tag."\n"; } } ?> index.php <?php add_to_head("<link rel='stylesheet' href='blue.css" type='text/css' media='screen' />");?>
  6. Here is explame, when user send msg status in datebase is 0, when i confirm msg for show it then status is 1, and ajax check in datebase messages with status 1, if find show it but if we havent new messages ajax do not show nothing ... like: msg 10 msg 9 msg 8 i hope undestand me ...
  7. hello guys, how can i get messages one by one from datebase without duplicate it ????
  8. Hi, Does someone can help me with this code to get the results that the messages is displayed one time and do not duplicate it, if it be shown whether it is possible to change the status, for example, if status of message in datebase is 1 after it is shown to change the status of the 2? ajax.js function display_msg(){ doc_id("new_msg").innerHTML="<br />"; makeHttpRequest(siteurl+"/ajax.php?a=new_msg",function(response){doc_id("new_msg").innerHTML+=response;},false); setInterval("display_msg()", 10000); } php <?php $result = mysql_query("SELECT * FROM ".DB_CHAT." WHERE status='1' ORDER BY date LIMIT 0,1"); while($data = mysql_fetch_array($result)){ $user = $data['user']; $msg = $data['msg']; echo $user." - ".$msg; } ?>
  9. i use jquery message ticker to display the message, but whether it is possible that the new messages to display without refresh with jQuery? jquery.js (function($) { $.fn.SmS = $.fn.sms = function(delay) { delay = delay || 4000; initTicker = function(el) { stopTicker(el); el.items = $("li", el); // hide all items (except first one) el.items.not(":eq(0)").hide().end(); // current item el.currentitem = 0; startTicker(el); }; startTicker = function(el) { el.tickfn = setInterval(function() { doTick(el) }, delay) }; stopTicker = function(el) { clearInterval(el.tickfn); }; pauseTicker = function(el) { el.pause = true; }; resumeTicker = function(el) { el.pause = false; }; doTick = function(el) { // don't run if paused if(el.pause) return; // pause until animation has finished el.pause = true; // hide current item $(el.items[el.currentitem]).fadeOut("slow", function() { $(this).hide(); // move to next item and show el.currentitem = ++el.currentitem % (el.items.size()); $(el.items[el.currentitem]).fadeIn("slow", function() { el.pause = false; } ); } ); }; this.each( function() { if(this.nodeName.toLowerCase()!= "ul") return; initTicker(this); } ) .addClass("sms") .hover( function() { // pause if hovered over pauseTicker(this); }, function() { // resume when not hovered over resumeTicker(this); } ); return this; }; })(jQuery); test.html <script type='text/javascript'> $(document).ready( function() { $('#sms').SmS(); $('#sms').show('fast'); }); } ); </script> <div id='sms'></div>
  10. thank you this is working, but whether this can be sorted by ID or by <exch> <exchange> <id>978</id> <expr>MKD</expr> <exch>EUR</exch> <amount>1</amount> <value>61.4106</value> </exchange>
  11. need help with displaying only those who have the amount 1 explame: AUD - 1 - 31.0390 CAD - 1 - 37.3090 DKK - 100 - 824.0158 JPY - 100 - 49.4051 code: <?php // displays all the file nodes if(!$curencyexchange=simplexml_load_file('http://www.xxxx.com/xxxxx.asp')){ trigger_error('Error reading XML file',E_USER_ERROR); } foreach ($curencyexchange->exchange as $exchange) { echo "".$exchange->exch." - ".$exchange->amount." - ".$exchange->value."<br />"; } ?>
  12. Same result, i dont know where i wrong...
  13. This returns the results but not as a top rated.
  14. i have to try whit this one but again whiout result: SELECT tp.*, ta.*, SUM(tr.rating_vote) AS sum_rating, COUNT(tr.rating_item_id) AS count_votes FROM ".DB_PHOTOS." tp LEFT JOIN ".DB_PHOTO_ALBUMS." ta USING (album_id) LEFT JOIN ".DB_RATINGS." tr ON tr.rating_item_id = tp.photo_id AND tr.rating_type='P' GROUP BY tp.photo_id ORDER BY count_votes DESC LIMIT ".$_GET['rowstart'].",".$settings['thumbs_per_page']
  15. Thanks for your post, but forgot that I pasted my query that should be little to be changed because not show me toprated. SELECT tp.*, SUM(tr.rating_vote) AS sum_rating, COUNT(tr.rating_item_id) AS count_votes FROM ".DB_PHOTOS." tp LEFT JOIN ".DB_RATINGS." tr ON tr.rating_item_id = tp.photo_id AND tr.rating_type='P' GROUP BY photo_id ORDER BY count_votes DESC LIMIT ".$_GET['rowstart'].",".$settings['thumbs_per_page']
  16. hi guys, i need help to sort pictures with top rated. datebase: photos photo_id photo_name photo_thumb photo_file photo_date datebase: ratings rating_id rating_item_id rating_type rating_user rating_vote rating_datestamp
  17. yes this working after session_destroy(); add new session_start(); thx anyway...
  18. hi guys, I tested the code on my localhost and it works, but when I tested on my site that will not show me $_SESSION[ 'username']; login.php <?php session_start(); session_destroy(); $show = ""; if (isset($_POST['login'])) { $username = $_POST['username']; $md5_password = md5($_POST['password']); $result = mysql_query("SELECT * FROM admin WHERE username='$username' AND password='$md5_password'"); if(dbrows($rezultat) != 0){ session_register("username"); header("location:admin/index.php"); exit; } else { $show = $lang['login-005']; } } ?> admin/index.php <?php session_start(); if (!session_is_registered("username")) { header("location:../index.php"); } echo $_SESSION[ 'username']; ?>
  19. Ok this is web site: http://labunista.nxserve.net/video/index.php Try clicking more video links.
  20. I get this error Line: 414 Char: 8 Error: Invalid argument. Code: 0 URL: www.myurl.com
  21. I use different JS Popup codes, again the same result simply will not open popup in IE, FF on working perfectly.
  22. this function i use for YouTube videos only works in FF and IE shows me the errors and not to open the popup, how can I fix this error. <?php function displayVideos($Videos, $maxVideos=NULL,$columns=4,$rows=NULL){ global $locale; // Popup echo "<script type='text/javascript'> function open(url, title,w,h) { var left = (screen.width/2)-(w/2); var top = (screen.height/2)-(h/2); var targetWin = window.open (url, title, 'toolbar=no, location=no, directories=no, status=no, menubar=no, scrollbars=yes, resizable=no, copyhistory=no, width='+w+', height='+h+', top='+top+', left='+left); } </script>"; // End if($maxVideos==Null){ $maxVideos=count($Videos); } if(!is_int($maxVideos)){ trigger_error("Maximum number of videos to show must be an integer, not ".$maxVideos,E_USER_WARNING); return 1; } if($rows==NULL){ $rows=ceil($maxVideos/$columns); } echo '<table align="center" width="100%" border="0" cellspacing="5" cellpadding="5" style="font-family:Verdana, Arial, Helvetica, sans-serif; font-size:10px;">'; $i = 0; //print_r($Videos[0]); $video=$Videos[$i]; for($r=0; $r < $rows; $r++) { $video=$Videos[$i]; echo '<tr>'; for($c=0; $c < $columns; $c++) { echo '<td valign="top" width="130">'; if($i < $maxVideos && $Videos[$i]){ $video=$Videos[$i]; if (isset($_GET['s']) == "mr") { echo "<a href=\"javascript: void(0);\" onClick=\"open('pogledni.php?video=".$video->url."', '".$video->title."', '620', '480');\"><img src='http://i.ytimg.com/vi/".$video->url."/default.jpg' border='0' width='130' height='97' /><br />".$video->title."</a><br />".$locale['yt-012']." ".$video->postdate."<br />".$locale['yt-013']." ".$video->views.""; } else { echo "<a href=\"javascript: void(0);\" onClick=\"open('pogledni.php?video=".$video->url."', '".$video->title."', '620', '480');\"><img src='http://i.ytimg.com/vi/".$video->url."/default.jpg' border='0' width='130' height='97' /><br />".$video->title."</a><br />".$locale['yt-012']." ".$video->postdate."<br />".$locale['yt-013']." ".$video->views."<br />"; if ($video->star1!=""){ echo $locale['yt-014'].'<img src="'.$video->star1.'" /><img src="'.$video->star2.'" /><img src="'.$video->star3.'" /><img src="'.$video->star4.'" /><img src="'.$video->star5.'" />'; } else{ echo '<br/>'; } echo '<br /> '; } } echo '</td>'; $i++; } } echo '</table><div align="right" style="padding-right: 25px">'; } ?>
  23. i get this result on jpg, jpeg: (image/pjpeg is not a valid Content-Type) solution for this one ?
×
×
  • 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.