Jump to content

SharkBait

Members
  • Posts

    845
  • Joined

  • Last visited

    Never

Everything posted by SharkBait

  1. That's what I am thinking. I could use the money too and I could easily move music around if I need to. Thouhg I do like the colours the 4gb use I was even thinking of getting the Red on that Apple has on their online stores ($10 goes to the AIDs foundation). I'll probably end up picking up the iPod locally though
  2. I am looking to buy a iPod Nano but I am unsure which one I should get. 2 Gb Nano - Less songs but saves me money. 4 Gb Nano - More songs, more expensive Now I used to own a 4GB 2nd Generation Nano (the Green one) and only have 122 songs on it. But I am thinking, would I ever use the full 4 GB? That is like almost 1000 songs! I had roughly 3.5GB left on it. I don't listen to that much music and I can always transfer music back and forth if I need to remove/add songs to it. I like the green one, with the one I had I used a clear silicon Zcover which let me show off the cool color! The only problem with the 2GB one is it comes only in silver. Yea I could look for a green cover for it but... So what do you think? I am stuck on iPods so no trying to convince me to get anything else!
  3. Can you echo print_r($_FILES); ? That will at least print the contents of $_FILES out for you.
  4. Hrmm probably not unless somehow you can get behind their router and onto their machine to find out what IP their at. NAT kind of stops you from knowing their LAN address. Why would you want to know their LAN address anyway? Can't do much unless you're on the same subnet right?
  5. Hrmm formatting of the post got a bit buggered since I use [ code ] inside of it No takers on where I would go about or how I would go about using highlight_string() ?
  6. It might be your SQL statement. Can you run your SELECT statement in phpMyAdmin and see what it returns? I think because you're using 3 tables, it will display the data based on all 3 tables so it looks like it is looping. You only have 1 WHERE clause so it's not be specific enough from what table you want to display. JOINing them might help too but I'm not great at joins to show you an example without too much tinkering. Might at least point you in the right direction!
  7. Those two things are the same..well they work out to be the same anyway, they can be used differently though!
  8. PHP scripts are run under the group that Apache is part of. (can be anything from www-html, html-users, www etc) If you're running a script and it's permissions are not set up correctly it will not be able to write to the file. If you don't personally know where the file is being stored, you'd have to look at the documentation or the script to find it's path. Technically if the user knew the naming scheme for the sessions files and that folder containing the files were accessable by the public then yes, they would be able to do whatever they wanted. Hope this helps a bit.
  9. How does it not seem to be working? Does it give you an error message at all?
  10. I figured out what the solution is for my problem. I had to tell the XML parser to ignore the data within my <description> tags! I was looking over the Wordpress scripts and that is what tipped me off! <?php <description><!CDATA[{$description}]]></description> ?> Explaination: http://www.w3schools.com/xml/xml_cdata.asp Yay I'm soo happy I figured it out now I can use Full RSS Feeds with html formatting!
  11. Heh yea sorry about that. I forgot I uploaded the real images. I'll have to blur the image again. I'll post back when I get a chance to do that. Thanks!
  12. Ok I have two small functions that will take [code] and put it into a nice little div element for me. Now I am curious would would I go about putting highlight_string() so that the code that goes in (it's usually PHP) becomes highlighted and colour properly? <?php function ConvertToCode($str) { $str = stripslashes($str); $code = array("#\[code\](.*?)\[/code\]#is"); $html = array("<div class=\"code\"><span style=\"font-size:8pt; font-weight:bold;\">Code:</span>\n\\1</div>"); $str = preg_replace($code, $html, $str); // Call dedicated fucntion for replacing quotes $str = doPHPCode($str); return $str; } function doPHPCode($str) { $code = "#\[code\](.*?)\ #is"; $html = "<div class=\"code\"><span style=\"font-size:8pt; font-weight:bold;\">Code:</span>\n\\1</div>"; //when a match is found, replace the match while(preg_match($code, $str)) { $str = preg_replace($code, $html, $str); $str = highlight_string($str); } return $str; } echo ConvertToCode("This is my code <?php echo $myVar; ?> and I would like it highlighted."); ?> [/code]
  13. I'll be updating the images to its real one sometime this weekend. There are some other images they want me to put up as well so I'll need to do that too.
  14. yea when I ever run into an infinate loop it's like PHP is frozen but it just takes a really long time to time out Sometimes (depending n the browser) it will eventually ask you to save a file
  15. Ok so I read up on the internal and external entities. Now the code above will not convert the or « entities properly so when they get loaded into the XML file they crap out and the XML document won't display. How do I handle things like & etc when they are within the body of the RSS feed? Or am I not understanding what it is I need to do with my database information prior to loading it into an XML file?
  16. Might of been somewhere in here: http://blogs.law.harvard.edu/tech/rss But if you goto www.tingram.ca/rss.xml it fails because of the unknown entity which is the & (ampersand)
  17. Not sure but you might be able to use sockets with PHP to establish a connection with the mail server. I haven't use sockets before but if people can make IRC clients with PHP why can't you have it talk to a mail server?
  18. I am having some issues with a RSS Feed creation script I have. The entries that are to go into the RSS feed have ampersands in them like or « or » and being RSS I believe they are not allowed to have ampersands in them (or so the RSS 2.0 Specification told me). Now I use html_entity_decode() and I thought that is supposed to convert things back to their proper character. Am I incorrect? Am I getting that function and htmlentities() confused? This is the bit of code I am using: <?php while($blog = mysql_fetch_array($query, MYSQL_ASSOC)) { // Strip HTML tags and convert any special characters $description = $blog['body']; $description = html_entity_decode($description); // Modify date to RFC 822 Specification $pubDate = date("D, d M Y H:i:s T", strtotime($blog['date_entered'])); // encode URL with - so that it is URL friendly (for Mod_rewrite) $url = str_replace(" ", "-", $blog['title']); // Actual body of the feed. Gets looped though and created for each Blog Entry $feed = "<item>\n <title>{$blog['title']}</title>\n <description>{$description}</description>\n <link>http://www.tingram.ca/blog/{$url}</link>\n <pubDate>{$pubDate}</pubDate>\n <guid>http://www.tingram.ca/blog/{$url}</guid>\n </item>\n\n"; // Write the current Blog Entry to the file fwrite($file, $feed); } ?> Any help is great!
  19. Hi, Ok I was asked to do a simple layout/mock website for a local establishment and I need some help with making it look a little better. Fonts? Colours? Graphics? (I'm not good at graphics) Anyway: {link temporarily removed} Again it is just a mock up so none of the top links work. I am trying to get a feel for the layout of the site! Thanks
  20. Not sure where this should go, but.... Anyone know of a script that I can use that will parse PHP code and colourize it nicely like it does for forum etc? I want to be able to add pretty looking code snippets on my blog and currently I just use a class via CSS to do some basic formating (font, line spacing, element width) in a simple <div> tag. I'd like to be able to use something like but without have to create a complex class/script to do it for me actually. Sure I coded my own blog, but I didn't code the WYSIWYG editor in it nor will I want to code this. I do have my limits! LoL Thanks!
  21. Well I went through all my javascript and found some things that were missing.. like semi-colons etc All fixed now. Guess if a function fails due to syntax errors, the ones behind it never get to load.
  22. Weird... all my functions are loaded in the <head> </head> section of the website.
  23. Isn't this the section that deals with making a page .html or .php? <?php foreach ($pages as $local_page) { $local_page_name = $local_page['page_name']; $local_page_label = $local_page['page_label']; $local_page_type = $local_page['page_type']; $local_page_level = $local_page['page_level']; if ($local_page_level==1) { switch ($local_page_type) { case $PT_STATIC: $url = "{$local_page_name}.html"; break; case $PT_DYNAMIC: $url = "{$local_page_name}.php"; break; default: $url = "{$local_page_name}.html"; break; } ?>
  24. In IE 6.0 I get the following error: Line 180: Object Expected. This is the code for the function: function setImg(rbtn) { // Used to create code on the fly for BackLinks var targBox = document.getElementById('myTextArea'); if(rbtn.value == 1) { targBox.value = "<a href=\"http://mysite.com\" target=\"_blank\"><img src=\"http://mysite.com/allowed/authorizedDistributor.jpg\" /></a>"; } else if (rbtn.value == 2) { targBox.value = "<a href=\"http://mysite.com\" target=\"_blank\"><img src=\"http://mysite.com/allowed/authorizedDistributor2.jpg\" /></a>"; } else if (rbtn.value == 3) { targBox.value = "<a href=\"http://mysite.com\" target=\"_blank\"><img src=\"http://mysite.com/allowed/authorizedDistributor3.jpg\" /></a>"; } } This is how it's done in html: <input type="radio" value="3" onClick="setImg(this);"> <textarea id="myTextArea"></textarea> Am I missing something? Firefox has no issues and it works fine, IE though doesn't like it.
  25. hehe that's nice. Damn cold but looks like it _could_ be fun!
×
×
  • 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.