Jump to content

Kinsbane

Members
  • Posts

    28
  • Joined

  • Last visited

    Never

Profile Information

  • Gender
    Not Telling

Kinsbane's Achievements

Newbie

Newbie (1/5)

0

Reputation

  1. So, I've had this problem for quite a while now and after extensively searching Google I haven't found anyone else with this problem who has posted a solution. I'm trying to make a valid RSS feed for my company's different types of press releases. When I look at the raw RSS feed with Firefox, the different press releases don't have any line breaks, like how the PR is seen on the normal webpage. I also ran the RSS feed through the validator, and have numerous errors, most of which pertain to illegal characters or entities, like this: What functions are available to me to fix this? Keep in mind, these PR's are copy/pasted directly from Word files into the webpage form and then saved to the database. I have asked and asked and asked and asked that our PR firm do NOT do this when posting PR's to the website, but my requests get ignored - I need to be able to do this automatically. What encoding should the database table fields be to help facilitate character encoding at every level? Thus far I have not been able to find anything on the web that tells how to deal with text copy/pasted from Word, or how to go about making sure my feed validates. It's as if everyone's got inside knowledge of this except for me, and I honestly don't know where to begin looking for answers. What kind of solutions has everyone else developed? How have you handled character sets and encodings? Do you use UTF-8? ISO-8859-1 ? Thanks for any advice in advance.
  2. And I really wish I could completely re-do the calendar functionality altogether. I am in love with these two calendar implementations: http://www.stefanoverna.com/log/create-astonishing-ical-like-calendars-with-jquery http://davidwalsh.name/dw-content/php-calendar.php ... but the folks here are stuck on being able to see events that span multiple days. I can appreciate it but I don't think it's drastically easier to read the event from a list rather than a colored bar and finding its subsequent match in a list of the events... Ugh, I dunno what to do. I just want this fixed and I Don't know how.
  3. You know, now that I think of it, no, I didn't, but maybe the other guy who programmed the class didn't think of that either? I was messing around with it more on Friday afternoon, and there's something wrong in general with November of this year - no events are showing up on the calendar after the first one, which starts on the 1st of November and the 1st of November is on the first day on the first week of the month. Halloween is on a Saturday, so the first would be the following Sunday. This year, however, isn't a leap year so I don't see how that would affect anything...
  4. Please, can anyone help me? I've now started getting lots of flak because people in my company trust this calendar (which is showing incorrect dates/days) rather than a different one. It's maddening. Thanks in advance!
  5. So, I didn't program this class and I've always had trouble figuring it out. We moved our site to a new server and now some months have incorrect dates on incorrect days (usually only off by one day/date). So, here's how it works. A query on the events table is run that grabs all events. It then runs a while loop and adds the dates it finds for the current month and year into the $cal object, like so: while($data = mysql_fetch_array($result, MYSQL_ASSOC)) { if($data['event_date'] > $month_start and $data['event_date'] < $month_end) { $cal->add_event($data['event_title'], $data['event_date'], $data['event_length'], "events/event/{$data['event_id']}", $data['event_status'], $data['event_id']); } } Then, the calendar is displayed: $body .= $cal->display(mktime(0,0,0,$month,1,$year)); The $cal->display() method generates an HTML string which is added to $body for output. I've tried all I can think of to fix this problem. You can see it further in the attachments I provided, which show October 2009, Nov 2009, and December 2009 - in this set of three, only November has the correct dates on the correct days. If you look at October, you'll see it shows the 31st being on a Friday, when it should be on a Saturday. I've also attached the class for people to look at. [attachment deleted by admin]
  6. You can easily work around that... use a cartesan join in definitely worse. Could you explain a bit further fenway? Thanks!
  7. Looks like UNION is the way I need to go, but MySQL 3.xx doesn't support it, as we're not using our PHP/MySQL5 server yet. I found this link as a work-around: www.codewalkers.com/c/a/Database-Articles/Writing-UNION-statements-in-MySQL-3x/ but I can't seem figure out where I put in my conditionals for which rows I want to extract from each table...
  8. Hi all! I have two different tables, with no common fields, to be queried in one query and have the query return one resultset. The reason for this is I am working on a web app that displays listings of files from both tables. I don't want to have two separate queries because then the data from one table will be given precedent over data from another table (I think).. I also don't want to have to use a CRON job to populate a separate table every hour, as these records get updated frequently. So, I am hoping there's a way to query two tables with no common fields to generate a single result set that I can then display to the end user. The version of MySQL I have for now is 3.23, although the new webserver we're installing has latest MySQL 5. Thank you very much in advance for any assistance!
  9. Sorry about the update on this. I guess it had to deal with the 6 different stylesheets I was using before I did a redesign. After consolidating and starting from scratch, the TH elments in IE7 are now centered. If you go to http://www.mrv.com/product/MRV-OS-OS9000B/ and click "View product matrix" you'll see it. BlueBoden, the centered purple text above the table you were seeing is the table's <caption> element.
  10. Does anyone know? No matter what I do, if I be absolutely specific with it, IE7 won't do shit. Not even if, inside the TH element, I use the align attribute, or even if I declare the style for it in the element itself. It just doesn't happen, and I'm at my wit's end as to why because I have a group of people who are breaking my door down, foaming at the mouth who ABSOLUTELY NEED IT CENTERED! Someone help.. [attachment deleted by admin]
  11. My errors turned out to be not related to headers, but to doubly-declared functions. All is well!
  12. Yeah, there's no whitespace outside of the PHP tags - which as I understood it would cause a header error. All the stuff in the PHP tags just format data to send to the HTML flow. The very first part of the PHP code just grabs the ID from the URL and queries the DB.
  13. So I have a script that is meant to return only one record (it's a product view page). Right now if you try and pass in a product ID that doesn't exist, the page loads the layout structure but without all the data. This isn't usable to me so I want to throw a 404 error if they try and pass an invalid ID number. Problem is, in Firebug when I deliberately load the product viewing page with a false ID, it gives back header code 200 OK. I would like search engines to see 404 error pages if they come across invalid product / document ID's so they can be removed from their indexes. I understand some of this would need to edit Apache's config file, but I'm unsure what needs to be edited. Any help is greatly appreciated. Here's the code I'm currently using: $read_product="SELECT * FROM products WHERE control = '".$id."'"; $product = mysql_query($read_product); if (mysql_num_rows($product) < 1) { header("HTTP/1.0 404 Not Found"); include("/home/beta/public_html/404.php"); exit; } else { $data = mysql_fetch_array($product); }
  14. So, after not being able to figure out what was going on, I thought maybe it was the fact I was using the email address as the encrypted string. So, I tried giving it the row's ID number. This, also, returned undesireable text. All I'm doing, when going through the table to find the contacts who wanted to receive newsletters, is this: while ($mailee = mysql_fetch_array($mailees_result)) { if (checkEmail($mailee['email']) !== FALSE) { $maileemail = $cipher->encrypt($mailee['id']); include('mailHTML.php'); if (mail($to, $subject, $body, $headers)) { $_SESSION['mailsent'] = true; } else { $_SESSION['mailfailed']['maileeid'] = $mailee['id'].","; } } else { $_SESSION['checkmailfailed']['maileeid'] = $mailee['id'].","; } $mailcount++; } Those session variables are in there for error reporting. This is in the back-end. Pretty easy right? I had thought that maybe declaring a new Cipher object on each turn of the loop would be better, but it's not - it encrypts fine, and adds the encryption string to the Unsubscribe link in the email. But on the unsubscribe page, all I'm doing to get the string back is this: $cipher = new Cipher(); $email = $cipher->decrypt($_GET['email']); I had thought this was pretty straightforward, but I again I'm proving myself wrong...
  15. I don't get it! Could it be a server setting messing it up? What I'm trying to do is, for a newsletter mailer, I'm making the unsubscribe link contain their email in the URL, using mcrypt_encrypt. When they get to the unsubscribe page, I wanna use mcrypt_decrypt to get back to the email address and remove all records from the database containing that address. Could it be with the way I'm outputting the decrypted string? I'm like, grasping at straws here cause I know I'm doing it right but it's not doing it right!
×
×
  • 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.