Jump to content

bigtimslim

Members
  • Posts

    37
  • Joined

  • Last visited

    Never

Profile Information

  • Gender
    Not Telling

bigtimslim's Achievements

Member

Member (2/5)

0

Reputation

  1. It had been a hover, but this effect looks way cool and is very fast.
  2. I'm new to js frameworks and was playing around with effects and found one that I really like on my menu items. Using scriptaculous, what is the best way to handle this. Below is the code I was using to test out the dif effects: echo '<li><a href="www.blah.com" onclick="new Effect.Highlight(this.parentNode, { startcolor: \'#ffff99\',endcolor: \'#e0dfdb\' }); return false;">Saved Jobs</a></li>'; This doesn't work and send me to blah.com of course.. should I do a javascript redirect or something after the effect. Also, I don't want the new page to load before the effect happens. Any suggestions?
  3. I have a site from which users create their own blog like site. I'm not sure whether I should use subdomains or not example: www.example.com/blahblah or blahblah.example.com My main concern at this point is that each site/blog do ok with search engines on their own. Each site has dif content, meta. I wouldn't think going one way or the other would matter. Does it?
  4. I've made a private message system for a site. As it is now I have a table that looks like this: message message_id to from subject message status(to check if read) datetime_sent I've now decided I want users to be able to see Sent Messages. How would you implement this? I could just work off this table, but when the user who received the message deletes it, the message would be removed from the senders sent messages as well. To solve this I could add column that shows whether the user has deleted it and another for the sender. Or.. would it be better to just create a sent message table similar to the one above?
  5. I'm making a site with a user system. It seems like I often see databases with a user table and a linked profile table. Why is this done instead of putting that info in one table?
  6. I've been learning cake over the last few days, and although I can get things to work, I have that overall foggy feeling. I'm new to MVC approach.. so that's probably a lot of it. I have been using the the cake documentation which doesn't seem built for a someone my speed. Can anyone hook my up with some other resources to learn cake? Also, there is this book: http://www.amazon.co.uk/Beginning-CakePHP-Novice-Professional/dp/1430209771 what do you guys think?
  7. That is way easier! I don't know why I was trying to make things more complicated with subdomains. Thanks.
  8. I am releasing a site that is being promoted in a few different ways, some not online. I would like to track where visitors came from to see how well each promotion does. this would be easy enough if it were all online. I was thinking of using short subdomains to track in a db where offline promotion visitors came from. I figured it would be easier for a person to remember and use, for example, miami.sitename.com than www.sitename.com/index.pph?from=blah. I guess I would just store the info in a db and redirect. Is this a stupid way of doing this? Is there a better way?
  9. I have a php registration system set up that sends an email with a link in it that activates the new account. This all works fine, but every time i've tested it the email ends up caught as spam. What can I do about this? ???
  10. Do you guys use sites other than your own to track stats like hits. If so, what sites? I've been using statcounter.com. It seems to provide a lot of info.
  11. Still not sure what was wrong, but this worked: ??? function xstateChanged() { if (xxmlHttp.readyState==4 || xxmlHttp.readyState=="complete") { if (xxmlHttp.responseText=="jobnouser") { alert("You must log in to save a job."); return; } document.getElementById(xxmlHttp.responseText).innerHTML="<span style=\"background-color:#ECE9AA;\">&nbsp Saved &nbsp</span>"; } }
  12. My page displays a list of jobs, each with a button to save that particular job to a mysql db using ajax. Before the job can be saved I check with js whether the user is logged in(based on the responseText). It seems to me like this should work, but it doesn't. My problem is in the uncommented xstateChanged function. I have a similar function (without the condition) that works fine commented out. I've hacked this together from examples I've seem, so I might be doing this in a stupid unconventional way. Thanks. savejob.js var xxmlHttp function saveJob(str) { xxmlHttp=xGetXmlHttpObject() if (xxmlHttp==null) { alert ("Browser does not support HTTP Request") return } var url="includes/savejob.php" url=url+"?q="+str url=url+"&sid="+Math.random() xxmlHttp.onreadystatechange=xstateChanged xxmlHttp.open("GET",url,true) xxmlHttp.send(null) } /* THIS FUNCTION WORKS function xstateChanged() { if (xxmlHttp.readyState==4 || xxmlHttp.readyState=="complete") { document.getElementById(xxmlHttp.responseText).innerHTML="<span style=\"background-color:#ECE9AA;\">&nbsp Saved &nbsp</span>"; } } */ function xstateChanged() { if (xxmlHttp.readyState==4 || xxmlHttp.readyState=="complete") { if (xxmlHttp.responseText=="jobnouser") { alert("You must log in to save a job."); } else { document.getElementById(xxmlHttp.responseText).innerHTML="<span style=\"background-color:#ECE9AA;\">&nbsp Saved &nbsp</span>"; } } function xGetXmlHttpObject() { var xxmlHttp=null; try { // Firefox, Opera 8.0+, Safari xxmlHttp=new XMLHttpRequest(); } catch (e) { // Internet Explorer try { xxmlHttp=new ActiveXObject("Msxml2.XMLHTTP"); } catch (e) { xxmlHttp=new ActiveXObject("Microsoft.XMLHTTP"); } } return xxmlHttp; } savejob.php <?php session_start(); $jobs = unserialize($_SESSION['array']); //require_once ('config.inc.php'); //require_once (MYSQL); //get the q parameter from URL $q = $_GET["q"]; if (isset($_SESSION['user_id'])) { /* $saveid = $q; $uid = mysqli_real_escape_string ($dbc, $_SESSION['user_id']); $jdate = mysqli_real_escape_string ($dbc, $jobs[$saveid]['date']); $jlink = mysqli_real_escape_string ($dbc, $jobs[$saveid]['link']); $jtitle = mysqli_real_escape_string ($dbc, $jobs[$saveid]['title']); $jdesc = mysqli_real_escape_string ($dbc, $jobs[$saveid]['desc']); $jsite = mysqli_real_escape_string ($dbc, $jobs[$saveid]['site']); //set up and run query $qy = "INSERT INTO job (user_id, job_date, job_link, job_title, job_desc, job_site) VALUES ('$uid', '$jdate', '$jlink', '$jtitle', '$jdesc', '$jsite' )"; $r = mysqli_query ($dbc, $qy); or trigger_error("Query: $q\n<br />MySQL Error: " . mysqli_error($dbc)); */ } else { $q = 'nouser'; } // mysqli_close($dbc); //output the response echo 'job' . $q; ?>
×
×
  • 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.