Jump to content

Silvar

Members
  • Posts

    28
  • Joined

  • Last visited

Silvar's Achievements

Member

Member (2/5)

0

Reputation

  1. This is one of the moments where I'm thinking: "Ofcourse, that's obvious". I put position: relative; to the image inside the div and made a top: -10px. Thanks for guiding me into using my own brain
  2. I've put this into the PHP section as I might think that PHP has to be used in this situation. Don't know if it's possible with CSS. I got these pictures on my site from my latest YouTube uploads. These god damn pictures included in the xml file my script is linked to, got stupid black frames in top and bottom, even though the scaling of the picture is what it has to be. It's just a stupid thing from youtube i reckon. But I want to cut these black frames away from the top and the bottom of the picture. The picture is set as a background image right now, as I tried to fix the background with minus properties in background-position, but didn't work. Do I have to use PHP for this or is there any way of doing this in CSS? I've searched around for solutions and it can't be true that I have to get the file, cut pixels and then save it on my own domain to get the black boxes cropped of. My logical sense tells me that there has to be easier solutions not to show these pixels form the thumbnail. Thank you in advance.
  3. Okay, I'm using jquery because I have a site with some items that got a + and a - When I click plus I use jquery animate(height) to open the div and when i click minus, it goes back to normal height. I'm using the function right now where it sets the height of the container to 250px, and everything works. But when the item expands, I want the height of the <div> to fit the text. The parent got "overflow: hidden" and the inside div got full height underneath, but is hidden because of overflow property. So we want this overflow:hidden; div to not hide the overflow, but fit the text. Heres my jQuery code: <script type='text/javascript'> $(document).ready(function() { var open = false; $('#plusminus<?php echo $i; ?>').click(function() { if (open) { $('#item<?php echo $i; ?>').animate({height:'80px'}); $('#plusminus<?php echo $i; ?>').attr('src', './images/plus.png'); } else { $('#item<?php echo $i; ?>').animate({height:'250px'}); $('#plusminus<?php echo $i; ?>').attr('src', './images/minus.png'); } open = !open; }); }); </script> How do I fix this?
  4. Example: If I got a variable called $description. When it finds the sentence: "I hate this part", it should stop and only print/echo the text from before that sentence. But how? I'm not familiar with this/can't figure it out. Thanks in advance.
  5. Okay there is problems. I can't seem to make a mod rewrite that doesn't kill my images and links on my site. I'm using ?id= for paging.
  6. Okay, I've made this reWrite rule now: RewriteRule ^(.+?)/?$ index.php?id=$1&%{QUERY_STRING} [L] But the problem is now, that it makes double link. If someone is linked to /gallery/ it makes the links /gallery/gallery/. What am I doing wrong now?
  7. I need to make a mod rewrite. Lets say I got following URL: http://www.something...u/do/edit/id/20 Then I want my scripts to still be able to read the url as: http://www.something...u&do=edit&id=20 I got following mod rewrite now: RewriteRule ^(.+)/$ index.php But this mod rewrite forces me to rewrite all my scripts as they use $_GET[] for getting data. How am i able to do this?
  8. Okay, I've fixed first problem. The $(function() { had to be ontop of everything. Now alert() works, that means the script is being extracted. But my variables aren't getting changed.
  9. I've made this script. When i click the "#name_$gId" <div> where $gId is a unique id, it doesn't change any variables. - I've tried debugging by putting in an "alert();" to see if anything gets activated at all, but it doesn't. - I've looked up several places and the click function should written as it is. - I've looked at the echoed sourcecode at my page with "show source" and the "#name_$gId" fits both in the script and at the <div> which should activate my script. echo <<< END <script type="text/javascript"> $("#name_$gId").click(function() { $(function() { $('[name=debtForm]').get('debtForm').setAttribute('action', 'scms_actions.php?id=$_GET[id]&what=debt&do=edit&which=$editWhich'); $('[name=debtName]').val('$gName'); $('[name=debtAmount]').val('$gAmount'); $('[name=withdrawDeposit]').attr('readonly', false); $('[name=debtName]').attr('readonly', true); }); }); </script> END;
  10. The $output['q'] is the string in the google url that contains the keywords which have been searched for.
  11. It's a script to send me an email when someone is sent from google search. The email has to contain the keywords used to find my site.
  12. Well, the reply I got containing: "you need to put the effort in to properly explain the problem and the steps you have taken so far to try and solve it." was quite annoying. And I do know how to explain myself right, like a post i saw you made where you told a guy: "I do know how cookies and sessions works, thanks. Enough with the argumentation. I would make the script more secure myself, but first of all, how come it doesn't send the email? I've looked at the URL's from google, and the search query is still at "search=".
  13. Well, there might be many idiots on the internet, but I'm not one of them. People might just use their logical sense. It "Doesn't work at all" like in "It doesn't do anything". I think I explained myself properly.
  14. This script from the code snippet forum: <?php // Script to email you when Google refers traffic to your site. $name=""; // add your name here $email_address=""; // add your email address here $keywords=""; $referrer=$_SERVER['HTTP_REFERER']; if( (stristr($referrer, "google")) && (stristr($referrer, "search")) ) { parse_str($referrer, $output); $keywords=$output['q']; $email_message="Hi $name, A visitor just arrived to your site after searching for '$keywords'. ($referrer)"; mail ("$email_address","Google referred a visitor","$email_message"); } ?> Doesn't work at all. How come? I've tried several solutions.
×
×
  • 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.