Jump to content

Silvar

Members
  • Posts

    28
  • Joined

  • Last visited

Everything posted by Silvar

  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.
  15. See my reply. As See my first reply. As en example $sender_name doesn't give you the output of the form, $_POST['sender_name']; does, so you need to define it.
  16. Thanks! Simple and easy. Wasn't even my intention to use VARCHAR. I was gonna use INT (11).
  17. I got another problem now. The ordering is wrong when i do "ORDER BY amount DESC". It's like the biggest number get moved a row down, because it's 1 digit longer than the others. Illustration here: How do I get the 4 digit numbers to be at their right position?
  18. I fixed the problem by making this: $theArray = array($listAddupAmount, $gWithdrawDeposit.$gAmount); $doTheMath = array_sum($theArray); echo $doTheMath;
  19. I've got this code in my script: $mathShit = $listAddupAmount.$gWithdrawDeposit.$gAmount; The $gWithdrawDeposit variable is either + or -. As an example if $listAddupAmount was 5500 and $gAmount was 1000, $mathShit would output 5500-1000 and not 4500. How do I do this?
  20. Greetings Everyone. My name is Silvar and I'm a 23 years old male from Denmark. I don't have a job due to suffering from ADHD, OCD, PTSD and Borderline (Emotionally Unstable Personality Disorder). My life is quite hard sometimes as I change personality very often. One day when I wake up, I feel like being alone, sitting all by myself programming php, html, css, making apps for Android or just hyperfocusing on a single subject and filtering all other activities out, being totally antisocial. When I get into this mood, I'm very good at teaching myself new things. At an age of 12, I was programming CMS systems for companies and got a lot of money that I used for buying Warhammer gear and Lord of the Rings / Magic The Gathering cards (Good old times btw.). When I turn into this mood, it's because I can't handle the stuff that the world offers me. I got anxiety, I get panic anxiety when I'm at crowded areas, so I can't go to the city being drunk and having fun like my friends do, cause I can't handle it. But anyway, other days I can wake up and feel totally normal being social and doing everything I need to. I've always been a bit strange. I easiely get overexcited and turn into situations where I talk the ears of people, where I can turn into being antisocial 5 minutes afterwards. I also get angry very easiely. Went to several anger management courses without luck. My disorders also gave me quite a bad time in my mid teenage years. I've been to jail two times and also at the jail for mentally ill people where i got fixed to a bed with leather straps on my wrists, upper arms, ankles and around the stomach. Horrible experience that made me threaten the hospital staff because I was denied to use the toilet. They told me they could take off my pants and hold a flask while I was lying down and urinate in it, and if I had to poo, I could do it in my pants, and then they would change my clothes and clean me. What a fucking crazy system. Anyway, I've quit the crimes and I'm not going to the city being violent anymore, cause I stopped drinking alcohol, which apparently made me even more mad than I used to be when triggered. Now I'm usually just minding my own business. I like programming, I like editing/shooting pictures. Got my lovely Canon EOS 60D DSLR camera. I've been working with C+, PHP, A little ASP (Damn it sucks balls compared to PHP), CSS, HTML, XHTML. I hope you'll welcome me at this forum. I might need help sometimes, but I'm also able to share my knowledge with programming. Kind Regards, - Silvar
  21. Try this: <?php $message = $_POST["message"]; $sender_name = $_POST["sender_name"]; $sender_email = $_POST["sender_email"]; $like_site = $_POST["like_site"]; $msg="Sender's Full Name:\t $sender_name \n"; $msg.="Sender's Email:\\t$sender_email\n"; $msg.="Did you like the Website?\t$like_site\n"; $msg.="Additional Message:\t$message\n\n"; $mailheaders="From: Lord Sunny's Website"; $mailheaders.="Reply-To: $sender_email\n\n"; mail("sunnymay1993@hotmail.com", "Feedback Form From--$sender_name",$msg,$mailheaders); echo"<H1 align=centre> Thank you, $sender_name"; if($like_site == 'Yes') { echo "<p align='centre'> Thank you for Liking our Website.</p>"; } else { echo "<p align='centre'> We will try to improve our website as per your feedback.</p>"; } ?> Corrected this: - I've defined the values of the form with $_POST[]; - The "if($like_site == 'Yes')" was set to "if($sender_name == 'Yes')"
  22. Okay, I got this mysql table called guilt_changes where there's a column called amount. There's also a column called belongs which has an ID number. My script has to take all of the output from all rows with the same ID and add them up together to one value. Can anyone help me with that?
×
×
  • 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.