Jump to content

joemamahunt

Members
  • Posts

    33
  • Joined

  • Last visited

    Never

Everything posted by joemamahunt

  1. Well yeah, validating forms and sending emails is the easiest part here. :-\ How about a download manager to manage emailed unique links + use of MySQL database for submitted info storage? That's what's weird, I figured this wouldn't be too hard to put together, and would probably be pretty popular. Nope. Nothing.
  2. Anyone know of any similar script to provide the visitor with an email submit form, then generate a unique download link to a file on the server, then email out the link? (hopefully the link expires?) PHP and MySQL would be best, to my understanding. example: http://dl.nin.com/theslip/signup I searched with every keyword I could think of, yet nothing comes up. What would a script like this be called, anyway? Would be nice to have this script for an independent artist like myself. Any ideas? All I could find is the following: Expiring links: http://onlamp.com/pub/a/php/2002/12/05/one_time_URLs.html
  3. Figured out a way to center it through CSS. table { margin-left: auto; margin-right: auto; } Ridiculous, firefox is so picky. Now to resolve all the other tiny issues.
  4. Uhh.. No. I don't want TEXT aligned center. I want the TD/table aligned center. Which it is in the source. It shows up right in IE, but not in firefox. (Chrome and Maxthon3, etc. use the same program source code; Mozilla.) http://img200.imageshack.us/img200/8935/84902112.jpg I have selected all text to show you the tables. The 3 TD's (with text content) have cellspacing around them (the blank borders aorund them). As you can see, the actualy table is aligned left. I have setup a div wrap for the page, to center everything within the page. I then set the alignment in the actual three content td's, to "left". This does not align the td left, it just aligns everything that is within the td. IE shows this correctly. Firefox assumes that since I wrote <td align="left" in the actual td, it assumes that I want the whole block to be aligned left.
  5. Argh.. I hate Firefox. This shows up fine in IE, everything always does. I code by hand, I know what I'm doing, yet firefox manages to make my life harder once again. http://g2inc.net/designs/v2/index.php (Validated XHTML Strict) In firefox/chrome/maxthon3, the three content td boxes are not aligned center. (although are forced if you view source.) They are further forced in the stylesheet. Also, on the copyright footer, you will notice that the text is somehow showing up at the top, when it is clearly aligned "middle" in the code. Is this a firefox bug? Does firefox have it's own rules when it comes to alignment? I've ran into this problem a few times, previously I worked around them, wasting way too many hours so that firefox could show it up right. Any ideas?
  6. Got the checkboxes to work. Human error on my side. (forgot to switch the variable name) Got the radio buttons to work by deleting and re entering the quotation keys. I didn't change anything, just deleted and re typed in the following key for the name & values: " Weird. Thanks for all the help guys.
  7. This gets printed: I've checked the code too many times and it should be working fine to my understanding. Basically all I'm using is what I have quoted in my first post. I have a bunch of simple variables that just get posted, but they are not listed as they are unimportant and work as they should. (I've checked them all) All in all, I'm just trying to email myself the form inputs and selections on submit, and the inputs get sent fine, but the radio and checkboxes do not. Radio selection is not showing up anything, while currently the checkbox selections are just showing the word "Array".
  8. ^ thanks - fixed it. Whatever this is supposed to do, I'm not using a MySQL database, I'm just emailing the form. I got this working: But in my email it just shows "Array". And the radio choice is still not showing.
  9. Then I get: And about the radio buttons, how do I have the selected option's text show up? I figured it would automatically if it is in it's label.. no?
  10. A little bit stuck and confused.. Form: Simplified process form: ???
  11. Sorry for the very poor subject, no clue how I would be able to say this in few words. I would like to take this code: $row['body'] .= '... '; And put in the following after the three dots: <a href="', $news['href'], '">[more]</a> So, something like this: $row['body'] .= '... <a href="', $news['href'], '">[more]</a>'; I'd need to insert \'s for the single quotes, but that's not the problem. Problem is, the link will be something like this: http://', $news[href], ' What's the best way to make it work? Thanks.
  12. Nevermind, I guess I gotta follow the advice of this error: <p> works fine. (inside <form>)
  13. What is the proper use of the input tag in a td? I get about 40 errors just for this. <tr> <td style="font-size: small;"> <br /> <form style="position: relative; display: inline;" action="..." method="post"> <input type="hidden" ... /> <input type="hidden" ... /> <input type="hidden" ... /> <input type="hidden" ... /> <input type="hidden" ... /> <input type="hidden" ... /> <input type="hidden" ... /> <input type="hidden" ... /> <input type="hidden" ... /> <input type="submit" ... /> </form> </td> </tr>
  14. Yeah, I can't believe I didn't close it. I needed to escape the single quotes because I'm using it in a PHP code.
  15. Oh.. Thanks, that works. My bad about it being Javascript, didn't think about it.
  16. Searched but can't find the answer. I need to to also be XHTML valid. This is closest I've gotten. <input type="button" value="Click Here" onclick="window.location.href=\'http://www.x.net/x.php\' /> But doesn't work. Thank you.
  17. Oh! That's an odd thing to call the hand cursor.. Thank you for the very quick reply.
  18. What is the valid alternative to the cursor: hand in CSS? W3C CSS Validator tells me:
  19. Wow I thought I tried that, guess I should have gotten more sleep or something.. Thanks! Yeah, but I have some 'if' and 'else' code in there too, so I'm kinda forced to still use echo.
  20. Is it somehow possible to include() a .php file in a php document when the php file is something like this: <td></td>'; echo ' <td>... In other words, to include a php file that has a closing and starting echo. How could I do that?
  21. Fixed warning by adding "<!--" after script tag and "//-->" before closing script tag. Now to fix the biggest problem of the 3... error #2. Help please.
  22. Oh yeah, I forgot to mention it's XHTML Strict. Actually I've done quite a number of XHTML Strict sites, this is the first that spit out such errors that I don't know how to fix. It was hard with Strict at first, but gets pretty easy once you ran into all the problems it gives. And the funny thing is, all the other sites were not for me, but this one is. Hah. You're right about the warning, "<" being as "data". I don't know either, but XHTML 1.0 Transitional also gives the warning. *edit I fixed error #1 by putting the input in a paragraph as the XHTML validator site has. Thanks. Error #2 is still an error in Transitional. So it's not just the Strict.
  23. 2 weird errors, 1 weird warning. 1. In the part of a code below, XHTML validator gives me error: But not just for the select tab, for the input tags, span, and br tags also. Here: <td valign="top" align="left" class="smalltext" style="font-family: verdana, arial, sans-serif;">'; echo ' <script type="text/javascript" src="', $settings['default_theme_url'], '/sha1.js"></script> <form action="', $scripturl, '?action=login2" method="post" accept-charset="', $context['character_set'], '" class="middletext" style="margin: 3px 1ex 1px 0;"', empty($context['disable_login_hashing']) ? ' onsubmit="hashLoginPassword(this, \'' . $context['session_id'] . '\');"' : '', '> <input type="text" name="user" size="10" /> <input type="password" name="passwrd" size="10" /> <select name="cookielength"> <option value="60">', $txt['smf53'], '</option> <option value="1440">', $txt['smf47'], '</option> <option value="10080">', $txt['smf48'], '</option> <option value="43200">', $txt['smf49'], '</option> <option value="-1" selected="selected">', $txt['smf50'], '</option> </select> <input type="submit" value="', $txt[34], '" /><br /> <span class="middletext">', $txt['smf52'], '</span> <input type="hidden" name="hash_passwrd" value="" /> </form><br />'; } echo '</td> 2. For each outcome ('a' tag), it gives me: The code is this: <td class="lat" style="font-size: x-small; padding: 4px;" valign="top" align="left">'; $what=ssi_recentTopicsT('5', NULL, 'array'); foreach ($what as $topic) { echo'<span style="font-size: 80%;">-</span> <a href="', $topic['href'], '">', $topic['link'], '</a><br />'; } echo ' </td> Which refers to another file, this is the code from it: // Recent topic list: [board] Subject by Poster Date function ssi_recentTopicsT($num_recent = 8, $exclude_boards = null, $output_method = 'echo') { global $context, $settings, $scripturl, $txt, $db_prefix, $ID_MEMBER; global $user_info, $modSettings, $func; if ($exclude_boards === null && !empty($modSettings['recycle_enable']) && $modSettings['recycle_board'] > 0) $exclude_boards = array($modSettings['recycle_board']); else $exclude_boards = empty($exclude_boards) ? array() : $exclude_boards; $stable_icons = array('xx', 'thumbup', 'thumbdown', 'exclamation', 'question', 'lamp', 'smiley', 'angry', 'cheesy', 'grin', 'sad', 'wink', 'moved', 'recycled', 'wireless'); $icon_sources = array(); foreach ($stable_icons as $icon) $icon_sources[$icon] = 'images_url'; // Find all the posts in distinct topics. Newer ones will have higher IDs. $request = db_query(" SELECT m.posterTime, ms.subject, m.ID_TOPIC, m.ID_MEMBER, m.ID_MSG, b.ID_BOARD, b.name AS bName, IFNULL(mem.realName, m.posterName) AS posterName, " . ($user_info['is_guest'] ? '1 AS isRead, 0 AS new_from' : ' IFNULL(lt.ID_MSG, IFNULL(lmr.ID_MSG, 0)) >= m.ID_MSG_MODIFIED AS isRead, IFNULL(lt.ID_MSG, IFNULL(lmr.ID_MSG, -1)) + 1 AS new_from') . ", LEFT(m.body, 384) AS body, m.smileysEnabled, m.icon FROM ({$db_prefix}messages AS m, {$db_prefix}topics AS t, {$db_prefix}boards AS b, {$db_prefix}messages AS ms) LEFT JOIN {$db_prefix}members AS mem ON (mem.ID_MEMBER = m.ID_MEMBER)" . (!$user_info['is_guest'] ? " LEFT JOIN {$db_prefix}log_topics AS lt ON (lt.ID_TOPIC = t.ID_TOPIC AND lt.ID_MEMBER = $ID_MEMBER) LEFT JOIN {$db_prefix}log_mark_read AS lmr ON (lmr.ID_BOARD = b.ID_BOARD AND lmr.ID_MEMBER = $ID_MEMBER)" : '') . " WHERE t.ID_LAST_MSG >= " . ($modSettings['maxMsgID'] - 35 * min($num_recent, 5)) . " AND t.ID_LAST_MSG = m.ID_MSG AND b.ID_BOARD = t.ID_BOARD" . (empty($exclude_boards) ? '' : " AND b.ID_BOARD NOT IN (" . implode(', ', $exclude_boards) . ")") . " AND $user_info[query_see_board] AND ms.ID_MSG = t.ID_FIRST_MSG ORDER BY t.ID_FIRST_MSG DESC LIMIT $num_recent", __FILE__, __LINE__); $posts = array(); while ($row = mysql_fetch_assoc($request)) { $row['body'] = strip_tags(strtr(parse_bbc($row['body'], $row['smileysEnabled'], $row['ID_MSG']), array('<br />' => '&#10;'))); if ($func['strlen']($row['body']) > 128) $row['body'] = $func['substr']($row['body'], 0, 128) . '...'; // Censor the subject. censorText($row['subject']); censorText($row['body']); if (empty($modSettings['messageIconChecks_disable']) && !isset($icon_sources[$row['icon']])) $icon_sources[$row['icon']] = file_exists($settings['theme_dir'] . '/images/post/' . $row['icon'] . '.gif') ? 'images_url' : 'default_images_url'; // Build the array. $posts[] = array( 'board' => array( 'id' => $row['ID_BOARD'], 'name' => $row['bName'], 'href' => $scripturl . '?board=' . $row['ID_BOARD'] . '.0', 'link' => '<a href="' . $scripturl . '?board=' . $row['ID_BOARD'] . '.0">' . $row['bName'] . '</a>' ), 'topic' => $row['ID_TOPIC'], 'poster' => array( 'id' => $row['ID_MEMBER'], 'name' => $row['posterName'], 'href' => empty($row['ID_MEMBER']) ? '' : $scripturl . '?action=profile;u=' . $row['ID_MEMBER'], 'link' => empty($row['ID_MEMBER']) ? $row['posterName'] : '<a href="' . $scripturl . '?action=profile;u=' . $row['ID_MEMBER'] . '">' . $row['posterName'] . '</a>' ), 'subject' => $row['subject'], 'short_subject' => shorten_subject($row['subject'], 25), 'preview' => $row['body'], 'time' => timeformat($row['posterTime']), 'timestamp' => forum_time(true, $row['posterTime']), 'href' => $scripturl . '?topic=' . $row['ID_TOPIC'] . '.msg' . $row['ID_MSG'] . ';topicseen#new', 'link' => '<a href="' . $scripturl . '?topic=' . $row['ID_TOPIC'] . '.msg' . $row['ID_MSG'] . '#new">' . (strlen($row['subject']) > 36 ? substr($row['subject'],0,36) . "..." : $row['subject']) . '</a>', 'new' => !empty($row['isRead']), 'new_from' => $row['new_from'], 'icon' => '<img src="' . $settings[$icon_sources[$row['icon']]] . '/post/' . $row['icon'] . '.gif" align="middle" alt="' . $row['icon'] . '" border="0" />', ); } mysql_free_result($request); // Just return it. if ($output_method != 'echo' || empty($posts)) return $posts; echo ' <table border="0" class="ssi_table">'; foreach ($posts as $post) echo ' <tr> <td align="right" valign="top" nowrap="nowrap"> [', $post['board']['link'], '] </td> <td valign="top"> <a href="', $post['href'], '">', $post['subject'], '</a> ', $txt[525], ' ', $post['poster']['link'], ' ', $post['new'] ? '' : '<a href="' . $scripturl . '?topic=' . $post['topic'] . '.msg' . $post['new_from'] . ';topicseen#new"><img src="' . $settings['images_url'] . '/' . $context['user']['language'] . '/new.gif" alt="' . $txt[302] . '" border="0" /></a>', ' </td> <td align="right" nowrap="nowrap"> ', $post['time'], ' </td> </tr>'; echo ' </table>'; } 3. Then it gives me this warning: For each of the "<"s in this code: <td valign="top" align="right" class="mnu"> <div id="clock"></div> <script type="text/javascript"> var months=new Array(13); months[1]="January"; months[2]="February"; months[3]="March"; months[4]="April"; months[5]="May"; months[6]="June"; months[7]="July"; months[8]="August"; months[9]="September"; months[10]="October"; months[11]="November"; months[12]="December"; var time=new Date(); var lmonth=months[time.getMonth() + 1]; var date=time.getDate(); var year=time.getYear(); if (year < 2000) // Y2K Fix, Isaac Powell year = year + 1900; // http://onyx.idbsu.edu/~ipowell var timerID = null; var timerRunning = false; function showtime () { var now = new Date(); var hours = now.getHours(); var minutes = now.getMinutes(); var seconds = now.getSeconds() var timeValue = "" + ((hours >12) ? hours -12 :hours) if (timeValue == "0") timeValue = 12; timeValue += ((minutes < 10) ? ":0" : ":") + minutes timeValue += ((seconds < 10) ? ":0" : ":") + seconds timeValue += (hours >= 12) ? " P.M." : " A.M." document.getElementById("clock").innerHTML = lmonth + " " + date + ", " + year + " | " + timeValue; timerID = setTimeout("showtime()",1000); timerRunning = true; } showtime(); </script> </td> Any help is greatly appreciated. I've been into PHP and XHTML for some time now, have never came across errors this weird.
×
×
  • 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.