PHP - [jquery] Onmouseover Opacity Layer Except Selected Block (overlay)
I want when onmouseover on particular section to put an OPACITY #fff 0.2 layer on everything except the selected class i.e. table
Similarly as you have:
.tableHighlight:hover{background-color:#eee}
<table id='table-main' class='tableHighlight'> ... but inversed (puts layer on everything else, but not the table itself) --- http://jsfiddle.net/LYcm9/1/ Similar TutorialsVisit: http://testowa.testy...e/testy-na-mocz (the behavior is going crazy). Has anybody got maybe any clue on how to fix it to work correctly?
Code itself. http://jsfiddle.net/LYcm9/5/
Here is the code I have right now:
<?php header('Content-type: image/png'); $grey = new ImagickPixel('#ebebeb'); $orange = new ImagickPixel('#0f92d6'); $image = new Imagick('assets/lop.png'); $layer = new Imagick('assets/lop-base.png'); $layer->thumbnailImage(200, 0); $image->thumbnailImage(200, 0); $layer->paintOpaqueImage($grey, $orange, 100); // Place layer on image $image->compositeImage($layer, Imagick::COMPOSITE_SOFTLIGHT, 0, 0); // Let's merge all layers (it is not mandatory). $image->flattenImages(); echo $image; ?>It's putting the layers on top of eachother very nice. The thing is is that this involves some heavy shading at times depending on the bunny breeds. Here is what the base image ($image) looks like: And here is what the overlay ($layer) looks like: This is what the outcome looks like versus the intended result: I've tried almost all of their composite constants.. I can't figure out how to do this or the best way of going about it. Because the colors are going to be dynamic throughout the site so I can't just save a .png of every color combination.. and there will be more colors layered on top of eachother like markings/patterns/etc. Thanks for any help! I have this loop on a shorturl website i own that selects domains from my website and lists them in a dropdown list where users can select one domain to use as url shortener. The problem is that when a users selects and entry from the dropdown list this created only the [[[main_url]]] entry from the database table bellow can be used. When someone selectes "coolartistname.site.com the submit button cannot be pressed. in other words it's not adding the SELECTED attribute other than the [[[main_url]]] domain. Can anyone see on the code bellow why this would happen?
**Index.php** // get base urls $shortUrlDomains = getShortUrlDomains(); <?php foreach ($shortUrlDomains AS $k => $shortUrlDomain) { // active domains only if (($shortUrlDomain['premium_only'] !== '1') && ($shortUrlDomain['premium_only'] !== $Auth->id)) { continue; } echo '<option value="' . (int)$k . '"'; if (isset($_REQUEST['shortUrlDomain'])) { if ($k == (int)$_REQUEST['shortUrlDomain']) { echo 'SELECTED'; } } echo '>'; echo $shortUrlDomain['domain']; if ($disabled == true) { echo ' (' . safeOutputToScreen(t('unavailable', 'unavailable')) . ')'; } '</option>'; } echo '</optgroup>'; ?> FUNCTIONS.PHP function getShortUrlDomains() { // if we already have it cached if(defined('_SETTINGS_SHORT_URL_DOMAINS')) { return unserialize(_SETTINGS_SHORT_URL_DOMAINS); } // get connection $db = Database::getDatabase(true); // load from database $domains = $db->getRows("SELECT id, domain, premium_only, status FROM url_domain ORDER BY premium_only ASC, id ASC"); // organise and replace site url $rs = array(); foreach($domains AS $domain) { if($domain['domain'] == '[[[main_url]]]') { $domain['domain'] = _CONFIG_SITE_FULL_URL; } $rs[$domain{'id'}] = $domain; } **MYSQL DATABASE** url_domain (id, domain, premium_only, status, date_created, owner) VALUES (1, '[[[main_url]]]', 0, 'enabled', '2019-03-02 08:13:00', 1) (14, 'coolartistname.site.com', 6, 'enabled', '2020-04-18 19:21:59', 6);
Hello. I'm currently trying to write a code to merge two separate images together, but for the life of me I can't find anything that works. Basically what I'm trying to do is add a "marking" (cat_stripes.png) to a pet image (cat.png). In the future I also want to use this for adding items to pets and things like that. Both of the images have transparent backgrounds, so that needs to be taken into account. If you haven't got a clue what I'm talking about, look up Wajas or similar virtual pet sites to get an idea of how the markings work. I just need something simple, since I don't have a site set up yet and I'm just testing some things out for a future project. I don't have any codes at the moment, since nothing has worked so far. I'm pretty new to GD too (I'm familiar with all the basic php stuff, so don't panic), so you might need to explain some of the more advanced stuff to me. Any help with this would be really appreciated, thanks. (: hey guys im trying to impliment a overlay to images uploaded by the user to allow to delete and crop...now im not sure if im going aroung this the right way (but it works sort of)...the problem im having is that the overlay.gif which is a transparent image which has 2 small images at the top of each corner...but when the original image is hovered over the overlay is out of position showing the 2 small images at the bottom of the div and not at the top where it should be.
im guessing it is a css issue...any advise would be greatly appreciated...thank you
#overlay { width: 110px; height: 110px; } .selected-image{ width: 110px; height: 110px; } #overlay:hover .selected-image { opacity: 0.4; filter: alpha(opacity=40); } #overlay:hover { background-image: url('overlay.gif'); width: 110px; height: 110px; } <div id="overlay"><img class="selected-image" src="logo.png" /></div> Im starting to learn CSS and I have the following code that make a in img background, alternated colors in a table and then has a mouseover change of colors.<style type="text/css">
th { background-color: #00F; color:#FFF; font-size: large; font-weight: bolder; font-family: Georgia, "Times New Roman", Times, serif; } tr:nth-child(even) {background-color: #6FF; opacity: .8;} tr:nth-child(odd) {background-color: #FFF; opacity: .8;} tr {text-align: center;} body {background-image: url(DiveFlagBackground.jpg);} tr:hover{background-color:#000; color:#00FF00}; </style>I have started to realize that depending where each line of code is will determine how everything run...for instance if I move my background-image line to the the top of the script...it disappears from the screen...im still working on understanding this, but that is nor here nor there right now. My issue is this...when I test this page in Chrome, everything looks how I want it. The table header section doesnt change any color, on mouseover only the table row with the table data changes color, and you can slightly see the image in the background through the table. When I test this in IE11 the opacity setting looks like it is being ignored and complete covers the whole background image. Also when I do the mouse over everything looks good except when I mouseover the table header section it changes to a slightly darker blue. It there an exclude or an "if row = th" or "if row = 0 color change = NULL" type of statement I need to put in? Not sure what to do about the opacity setting as I thought this code would work for anything past IE8. If you would like to see the issue my page is http://mouse.myds.me/Test1.php Thanks for any advise\help. Hi all, I have a html drop down menu and want to show the initially selected value as the one stored in the mysql database that a member selected. I have 180+ rows in mysql that a member could have selected and would like to basically do this: IF (value of option == $row['value'] ) { echo "selected=\"selected\"; } I could put this in every one of the rows it would be much better to have an if statement. As there are so many values I do not know where to begin. Can someone point me in the right direction? Thanks Hello guys, I want to build my own Database Class with PDO. This Class should extend the PDO Methods. I heard that i should create an abstraction layer and two different Classes, is that right? First Class should do the connection and the second class has the new methods. My Database Class should have the following methods - select - insert - update Access like: $db->select ($table, $data) { } $db->insert($table, $data) { } $db->update($table, $data) { } I dont know, how i should begin... i know how i can create a PDO Connection, but i haven't a idea how i can do a abstraction layer with PDO... please help me:( I heard that i should use a abstraction layer. One Class for the connection and one class for the methods. Hello, I have a layered tiff file. I want to create a GD image from one of its layers. Looking for something like: imagecreatefromtiff($img, 2); Any idea of a library that would support this? Getting a bit desperate as I've tried a lot of things, so any help very appreicated! The concept im struggling with works like this: 1.) There are graphics of people on a page. There is a textbox to the right of the screen which outputs data that corresponds to the tutor. 2.) What i want is that when a user rolls his mouse over the picture, the data in the textbox immediately updates, which is done via php 3.) The issue is thus calling a php function within onmouseover="" from a javascript command. 4.) The function only changes the values that should be displayed (but doesnt work anyway) - is there a way to test whether a php function is being called correctly? And do i need to include some kind of page refresher? Thanks a lot for your help ****************************************** The code as I have it currently is this. ... Code: [Select] // Default setting to display a random persons data at page startup <? $username="removedforprivacy"; $password="removedforprivacy"; $database="tutors"; mysql_connect(localhost,$username,$password); @mysql_select_db($database) or die( "Unable to select database"); $query="SELECT * FROM tutors"; $result=mysql_query($query); $num=mysql_numrows($result); mysql_close(); $i=rand(0,5); $id=mysql_result($result,$i,"id"); $name=mysql_result($result,$i,"name"); $degree=mysql_result($result,$i,"degree"); $ib=mysql_result($result,$i,"ib"); $subjects=mysql_result($result,$i,"subjects"); $experience=mysql_result($result,$i,"experience"); $style=mysql_result($result,$i,"style"); $pic=mysql_result($result,$i,"pic"); ?> //This bit outputs all the graphics. Only the first immage calls the php updater function. $whichpic defines the flag for the person, which is passed to the updater function. </p> <p class="bodytext"><a href="" onclick="" onmouseout="MM_swapImgRestore()" onmouseover="<? php updater($whichpic=1); ?>"><img src="../Tutors/Photos/tim2.gif" name="Image15" width="100" height="100" border="0" id="Image15" /></a><a href="max.html" onmouseout="MM_swapImgRestore()" onmouseover="MM_swapImage('Image16','','../Tutors/Photos/max1.gif',1)"><img src="../Tutors/Photos/max2.gif" alt="max" name="Image16" width="100" height="100" border="0" id="Image16" /></a><a href="nico.html" onmouseout="MM_swapImgRestore()" onmouseover="MM_swapImage('Image17','','../Tutors/Photos/nico1.gif',1)"><img src="../Tutors/Photos/nico2.gif" alt="nico" name="Image17" width="100" height="100" border="0" id="Image17" /></a><a href="sasha.html" onmouseout="MM_swapImgRestore()" onmouseover="MM_swapImage('Image18','','../Tutors/Photos/sasha1.gif',1)"><img src="../Tutors/Photos/sasha2.gif" alt="sasha" name="Image18" width="100" height="100" border="0" id="Image18" /></a> </p> //Where the php data is output <p class="sideheader">FEATURED TUTOR</p> <p><img src="<? echo " $pic"; ?>" width="200" height="200"></p> <p><strong>Name: </strong> <? echo "$name"; ?></p> <p><strong>Degree: </strong> <? echo "$degree"; ?></p> <p><strong>IB: </strong> <? echo "$ib"; ?></p> <p><strong>Subjects Taught: </strong> <? echo "$subjects"; ?></p> <p><strong>Teaching Experience: </strong> <br /> <? echo "$experience"; ?> </p> <p><strong>Teaching Style:<br /> </strong><? echo "$style"; ?> .</strong> </p> <p><!-- end .sidebar2 --></p> </div> // The updater function to call, which changes the information displayed <? php function updater($whichpic) { $i = $whichpic; $id=mysql_result($result,$i,"id"); $name=mysql_result($result,$i,"name"); $degree=mysql_result($result,$i,"degree"); $ib=mysql_result($result,$i,"ib"); $subjects=mysql_result($result,$i,"subjects"); $experience=mysql_result($result,$i,"experience"); $style=mysql_result($result,$i,"style"); $pic=mysql_result($result,$i,"pic"); } ?> Hi all, Thanks for reading. I have this code: Code: [Select] $message = strip_tags($_POST['message'], '<p><strong><em>'); My question is however, is there a way that I could disable the onmouseover features in those tags? Thank you. I have been reading most spambots use UTC-12 timezone and PHbb has a hack to block UTC-12, but I dont have the file I am looking to get the UTC ( or GMT ) time from the referring page any ideas? Hi there, I know that php does not recognize onMouseOver events. however, Im wondering if their is a tricky way to get a javascript response from dynamic text. I am working on a nav menu in a wordpress site. wordpress has a function that displays a list of pages created in the admin. I want to be able to display a secondary list of pages when a top-level nav item is moused over. heres the code: <div id="top"> <script type="text/javascript"> function Show(who) { Clear(); divel=document.getElementById("drop"+who); divel.style.display="inline"; divel=document.getElementById("hn"+who); divel.className="selected"; } function Hide(who) { divel=document.getElementById("drop"+who); divel.style.display="none"; divel=document.getElementById("hn"+who); divel.className=""; } function Clear() { for (i=1;i<=3;i++) { divel=document.getElementById("drop"+i); divel.style.display="none"; divel=document.getElementById("hn"+i); divel.className=""; } } </script> <div id="home-nav" onMouseOut="Clear();"> <ul> <li id="hn1"><a href="wp_demo/profile" onMouseOver="Show('1')"><?php wp_list_pages(include=4&title_li=' ); ?></a></li> <li id="hn2"><a href="wp_demo/services" onMouseOver="Show('2')"><?php wp_list_pages( 'include=6&title_li=' ); ?></a></li> <li id="hn3"><a href="wp_demo/portfolio" onMouseOver="Show('3')"><?php wp_list_pages( 'include=8&title_li=' ); ?></a></li> <li id="hn4"><a href="wp_demo/contact" onMouseOver="Clear();"><?php wp_list_pages( 'include=12&title_li=' ); ?></a></li> <li id="hn5"><a href="wp_demo/hospitality" onMouseOver="Clear();"><?php wp_list_pages( 'include=10&title_li=' ); ?></a></li> </ul> </div> <!-- #homenav --> <div id="wrapper"> <div id="drop1" onMouseOver="Show('1')" onMouseOut="Hide('1')"> <img src="<?php bloginfo('stylesheet_directory'); ?>/images/blank.gif" alt="" width="960" height="8" border="0" /><br /> <div id="menu1"><ul> <?php wp_list_pages( 'child_of=4&sort_column=menu_order&title_li=' ); ?> </ul></div></div> <div id="drop2" onMouseOver="Show('2')" onMouseOut="Hide('2')"> <img src="<?php bloginfo('stylesheet_directory'); ?>/images/blank.gif" alt="" width="960" height="8" border="0" /><br /> <div id="menu2"><ul> <?php wp_list_pages( 'child_of=6&sort_column=menu_order&title_li=' ); ?> </ul></div></div> <div id="drop3" onMouseOver="Show('3')" onMouseOut="Hide('3')"> <img src="<?php bloginfo('stylesheet_directory'); ?>/images/blank.gif" alt="" width="960" height="8" border="0" /><br /> <div id="menu3"><ul> <?php wp_list_pages( 'child_of=8&sort_column=menu_order&title_li=' ); ?> </ul></div></div> Does anybody know a trick to get the dynamic text to be seen by the javascript? for example, if i put a inside the anchor tags before the php script starts, the onmouseover will register it, and display the secondary nav. I would place invisible divs with links on top of the dynamic text with z-index, but I want the text to be completely dynamic and the client to be able to add as many links as he/she wants. thanks! This topic has been moved to JavaScript Help. http://www.phpfreaks.com/forums/index.php?topic=342929.0 How is it that a site can forward to my site without a trace? www.2mysite.com is forwarding traffic to www.mysite.com but $page_name = $_SERVER['HTTP_REFERER']; echo $page_name; does not show www.2mysite.com as the referring site...how does one hide this? Help? how to block someone from visiting my page using ip adress ? this is the case if someone come to my site then we record the ip address and put it into database. when the visitor come again with the same IP they cannot see my page (block them) and redirect it to somewhere page. I draw contents from a database. Some of the texts contain a footnote, which is formatted using a div class. Following the HTML of this:
<div class=""footnotes""> <br> <hr align=""left"" noshade=""noshade"" size=""1"" width=""150"" /> <blockquote> <a href=""#f1"" name=""fn1""> <span class=""superscript""> * </span> </a>Some footnotetext</blockquote></div>Since my bibliography uses data from the database as well, the footnote now appears before the references, but I would like it at the very bottom of the page. I was thinking of using preg_replace in order to separate the textfield into two variables, one for the text itself, the other one for the footnote (it is always just one) and integrate after the bibliography is compiled. Unfortunately, it seems that the preg_replace does not work. It always displays the whole content of the textfield. Here's the PHP: $text = preg_replace('/(.*)(\div class=\"footnotes\"\>.*?\<\/div\>)/s', '$1', $result['text']);$footnote = preg_replace('/(.*)(\div class=\"footnotes\"\>.+?\<\/div\>)/s', '$2', $result['text']); echo '<div align="justify"><span style="font-family:Georgia;font-size:16px;">' . $text; ***BIBLIOGRAPHY*** ... echo $footnote;Maybe someone has an idea how to deal with that. I tried it on phpliveregex. There search string works fine. Many thanks for any help. It's one of those days after a long weekend and a rainy morning. Simply trying to get the correct message depending on the variable's value if($a = 'one'){ echo "POOR";} if($a = 'two'){ echo "GOOD";} if($a = 'three'){ echo "VERY GOOD";} if($a = 'four'){ echo "EXCELLENT";} Not sure if I need to use ==, extra quotes, or ELSEIF for the best result.
Hello, I'm currently using this to block certain emails: $blacklisted = Array("email@email.com", "email2@email.com", "email3@email.com"); in with: if( !in_array( strtolower($email), $blacklisted ) ) { Ok, What I want to do, is be able to specify a domain extension such as '*@email.com' So anything with 'something'@email.com is blocked. I still wish to keep manual email address's in place aswell. Many thanks James |