Jump to content

marmite

Members
  • Posts

    204
  • Joined

  • Last visited

    Never

Everything posted by marmite

  1. PS. Sorry - this is in Actionscript 3 and I know I should use Flash forums but this is the one forum that always helped!
  2. :'( I'm going mad, if not there already! All I want to do is format my dataGrid so that headers align centrally, and data in the cells align right (for numbers) and centre (for text). I would also like to format numbers >1000 with a thousand comma separator... I'm using AS3 in CS4 with deadline approaching. Is this what I have to do: 1) Set up a .as file, and call it MyCellRenderer.as 2) Put a package{} in this .as file, and enter a Class and Function called MyCellRenderer and MyCellRenderer() respectively 3) Put a movieClip in my .fla library and name it MyCellRenderer with link to class MyCellRenderer 4) Do I also reference the .as file in the Class line under Properties at the stage level in my .fla? This seems a lot of effort to align some text! And it doesn't work! I get error #2007 "Parameter child must be non-null" from this line in my .fla code: myDataGridColumn.cellRenderer = "MyCellRenderer" Going insane Emma
  3. Hello, So, a journalist has this a Google Reader aggregator: http://www.google.com/reader/public/atom/user/18431890839212844364/state/com.google/broadcast This gathers his favourite feeds together. I need to put this on a client's Typepad-based blog site within their formatting etc - so I can't simply take the Google <script> clip they offer. So, I think I need to get the information in the above link as an RSS feed, and code it into my Typepad blog so that it feeds through. The Typepad help is unusually unhelpful on how to do this. It says it can be done but doesn't say how. Can anyone point me in the right direction to get me started? Thanks Emma
  4. Thanks for this. @Fenway - by normalise do you mean that i shouldn't have five columns, but one? @ anyone: I tried to complicate matters to JOIN another table and got an error because the column "code" is not recognised: select mixed_id,mixed_name,mixed_msg, mixed_card_1 as code from cu_card_mixed as m union select mixed_id,mixed_name,mixed_msg, mixed_card_2 as code from cu_card_mixed as m union select mixed_id,mixed_name,mixed_msg, mixed_card_3 as code from cu_card_mixed as m union select mixed_id,mixed_name,mixed_msg, mixed_card_4 as code from cu_card_mixed as m union select mixed_id,mixed_name,mixed_msg, mixed_card_5 as code from cu_card_mixed as m inner join cu_cards as c on c.card_id=m.code where mixed_status=1 Is there any way round this or do I need to do a nested query? Thanks Emma
  5. Hi, I have a table with 6 columns - an ID, and 5 columns of codes. I need to run a query that says "if this code exists in any of these five columns, do this". So, I could run a query with an OR statement somewhere... but what I'd really like to do is JOIN the columns, so that I end up with a list of IDs and the codes all in one column. So i have this: ID Code1 Code2 Code3 Code4 Code5 1 32 33 34 35 36 2 65 36 54 83 32 And i want this: ID Code 1 32 1 33 1 34 1 35 1 36 2 65 2 36 2 54 2 83 2 32 Scratching my head.. grateful for any help Emma
  6. marmite

    html emails

    Thanks for this. Is there ANY WAY at all of getting the images to show in the email without the person having to click "download images" ? I guess I'd have to embed them in the email somehow...? I just received an email with inline images which did not require downloading, so I'm sure it's possible... It's important for me because the images are the thing I'm trying to communicate - it's the whole point of the product. Thanks for any help Emma
  7. marmite

    html emails

    hi, i'm doing my first html email and wanted some tips. in particular, it seems the easiest thing is to create a webpage, and then send the webpage itself... is that right? question two - what do i do for sizing? the information i've read says to use tables and make them 98% wide... but i wanted a border of images around the edge of the email, which seems to require me to set widths for the images. See http://www.emmasaunders.com/email.html to see what i mean. That's with no width or height set. When i send that as an email you have to scroll. Is there some way of setting a percentage of available screen space, that can be read by all the various email clients? That would be neat. Thanks for your help Emma
  8. yep, done that. thanks though. any further tips on getting ranked. has anyone had direct experience of this and does it really take 6 months??????????????
  9. domain is the same, page names are different. I still have the old pages, but they don't have a one-to-one replacement page. do you have a sample of a redirect page? do i just put a header(location) in the page? @ taith: the pages are all finished, although i update bits and bobs each day. (did you see a page you didn't think was finished, or was that a general comment?). I'm so upset! If i'd known all this i would never have changed my site. Gutted. Emma
  10. Oh my god, please no. what are these phases you refer to? would it help to do a redirect now?? only, the workflow has changed and so there isn't a one-to-one relationship between old and new pages.
  11. I think you're asking two questions: (1) how to display the form data so the user workflow is correct, and (2) how to structure the DB appropriately. To answer (2), if you have a one-to-many relationship, i.e. one company may offer more than one position, then you need separate tables, COMPANY and POSITION, linked by either a foreign key (not available in phpmyadmin), or just an index. So, e.g. the POSITION table has a column called COMPANY_ID which links up with COMPANY_ID in COMPANY table. These should be unique. When you write to the POSITION table, you don't need to repeat all the company data, you just include COMPANY_ID for reference. For question (1), you can just write an IF statement in PHP that shows the first form, and when that has been submitted, displays the second form. Is that what you mean? So the "ADD COMPANY/POSITION page" on first request will go something like: FILL IN COMPANY DETAILS (form1) - OR - CHOOSE COMPANY FROM DROPDOWN (form2) FILL IN POSITION DETAILS (form3) So, if neither form1 nor form2 submitted, show form1 and form2 but not form3, else show form3. if (!POST[form1] && !POST[form2]) { echo (form3 stuff) } else { echo (form 1 and form2 stuff) hope this helps
  12. Hi, I'm a bit confused. I'm having Page Rank trouble (i.e. since I recoded my site a month ago, none of the new pages have received a page rank, even though they have been crawled etc. Don't know whether I'm being penalized, really sick of waiting now :'( ) Any tips on that score gratefully received for: www.cardsunlimited.com Anyway, in an effort to fix this problem, I've installed the lynx browser to view my site and see if there are problems. The first thing it asked for was "ok to allow php cookie bed6fa3b71236be?". But I haven't put any cookies on my site? I wonder if this is causing problems (yes, I am clutching at straws). Is anyone familiar with lynx??? Thanks Emma
  13. search engines read the resulting html, not the php that spews out the html. so anything in the html is search engine friendly. links that use text rather than images are always better! NB if your page is called www.example.com/page.php?id=123 google will only look at www.example.com/page.php (i think), and not look at the page as a whole ?id=123, or consider it a separate page. This means two things: (1) submit them a SITEMAP. this is really important in terms of SEO. google have loads of info on making a sitemap.xml (you can just copy their example and modify it), and (2) make sure that page.php has something on it, a "default" content, e.g. in your if stmt, do "if (it's a charity) { put this text } elseif (it's something else) { do this } else { (do this) } Make sure you have an "else" and not just all "elseifs", that way page.php will always have some content for search engines that can't see your page.php?id=123 good luck!
  14. do you need another ; after height? td style="background-image:url("http://www.battlestationextreme.com/images/homepage09.jpg"); height:40px;" instead of td style="background-image:url("http://www.battlestationextreme.com/images/homepage09.jpg"); height:40px" ?? I always require a css file and do it there. sample code: HTML <td id="sample"></td> CSS file #sample { background-image: url(../images/tip.gif); background-repeat: no-repeat; height: 153px; width:215px; display: block; }
  15. http://uk.php.net/manual/en/function.unset.php ?
  16. Sorry if this is in the wrong bit. I want to format my textboxes completely differently, so that when someone clicks in one it almost looks like they are just clicking into the screen itself. I don't want the whole rectangular, shadowed thing going on. Is it possible to completely reformat buttons, textboxes and textareas? or at least change their colours? Thanks
  17. this shouldn't be a problem at all, i've done a fair few of my pages like this. so, you can change the text like below; the links are e.g. www.cardsunlimited.com/greetingscards.php?purpose=officegreetingcards Just use if statements coupled with links to e.g. www.example.com/page.php?customer=charity that sets $_GET['customer'] to 'charity'. on page.php, you use an if statement to get the $_GET value and echo text appropriately. if you get stuck i can give you more php by PM <div id="middle"> <table border="0" cellpadding="0" cellspacing="0"> <tr><td> <?php if ($_GET['purpose']=='officegreetingcards') { echo '<div id="h1"> Office greeting cards </br></div> <div id="blurb">Are you the person who has to pop out and buy all the greeting cards for people at work? Are you paying £2 a pop? Crazy, isn’t it? </br></br> On this site, you can buy individual greeting cards for £1.20 each, packs of 5 mixed cards for £1 per card, or packs of 25 same-design cards for 50p per card. Click on a design you like, and the options - including mixed packs - will pop up, as if by magic!</br></br>If you know you would like only Birthday, or Get Well cards, please use the Message dropdown to your left.'; } elseif ($_GET['purpose']=='hotelgreetingcards') { echo '<div id="h1"> Hotel greeting cards </br></div> <div id="blurb">Our greeting cards are used in several prestigious hotels within the UK. </br></br> Greeting cards may be given to guests to welcome them, or to help celebrate a guest’s birthday or anniversary. Prices start from just 50p. Please click on a design you like to display the packaging options and prices. If you would like to narrow down the results, please use the dropdowns to your left.'; } else { echo '<div id="h1"> Greeting cards </br></div> <div id="blurb">We stock over 80 designs of greeting cards, all photographic, all square, and all available to you as a consumer from 50p, or as a retailer from 65p (individually wrapped in cellophane). Click on any of the images to see whether the card is available blank or messaged, and to see what the pricing options are.</div>'; } ?> </div>
  18. this shouldn't be a problem. you could either do this in your PHP or in your DB, i'd suggest in the DB. (If you want a useful php function, array_splice sounds useful for you: http://uk.php.net/array_splice) to do this in your DB you coudl do this in one table: TABLE workshop1 username1 statusyes timestamp workshop2 username2 statusyes timestamp workshop1 username3 statusyes timestamp workshop2 username4 statusyes timestamp workshop3 username5 statusyes timestamp workshop2 username6 statusyes timestamp workshop2 username7 statusyes timestamp workshop2 username8 statusyes timestamp so here there are five users for workshop2, all statusyes. when username7 cancels, that row is deleted. you check to see total number of users for that workshop, and if it's more than 5 (before you delete username 7) you run the delete script and then an update script where timestamp is minimum for all remaining "statuswait" users for workshop2. Something like: 1) delete from table where username=x and workshop=workshop2 and status=statusyes 2) update table set status=statusyes where status=statuswait and workshop=workshop2 and timestamp=min(select timestamp from table where workshop=workshop2) when username9 comes along, you use PHP IF statement to say if (count(distinct(username)) from table where workshop=workshop2)<5) { $query="insert row with statusyes" } else { $query="insert row with statuswait" } sorry this is rushed, do you see what i mean? If you get stuck, reply to this and I'll write out something properly!
  19. what does your error log say? any more info or is that it?
  20. if it's mailing to gmail, it's likely that the mail() function is working fine, and it's the filters on the inboxes, as you mentioned. Have you checked the spam boxes of those inboxes? if the spam has filtered them off, you could try removing any URLs from the email (that's what triggers the spam on my inboxes anyway!)
  21. Not quite sure what you want to do. You want to update the values of the fields 'mon', 'tues' etc with the 1s and 0s you've stored in your array? You already seem to be doing this in your SQL query? Or you want to only update those fields held in the array, so if you don't have a 'weds' value, you don't want to update it? I'm certain you can make your query more dynamic by using an array, just not sure what you want to achieve. http://uk3.php.net/manual/en/function.array-search.php might help.
  22. Hi, I'm not familiar with all the date functions but am replying to: a) bump your query, cos someone out there knows! b) the only thing that caught my eye is the number of different date formats you have - some d-m-y, some y-m-d, some m-d-y. Could that be it?
×
×
  • 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.