Jump to content

rootKID

Members
  • Posts

    467
  • Joined

  • Last visited

Everything posted by rootKID

  1. ohh, my bad. I misunderstood what he was asking about, anyways. Will test it when i get home, i'm at work right now. -thanks
  2. what do you mean? I need to fade it in, should it not be automated? and if not, then i must say, i'm a little lost here with the setup... Just a little, still learning the jQuery API..
  3. hmm, inserted your suggested code, one stupid question where does the log comes? The default php log? i use xampp
  4. does not working still.. ideas? I am clueless right now for some reason Oo...
  5. okay, not sure if i have done this right once again, still trying to figure out stuff at the jQuery API... Anyhow, this is my JS code: $(document).ready(function(){ $(this).getElementById('#cart_view').fadeIn("slow");}); What i wish is this code: $HTMLOUT .= box_start("Din kurv"); $HTMLOUT .= "<div id='cart_view'>"; $HTMLOUT .= "123"; $HTMLOUT .= "</div>";$HTMLOUT .= box_end(); to fadeIn when the page is done loading, anyone can tell me if i have done this right? It does not work's on my pc, so i can only assume it's wrong, any ideas how to fix this would be great!
  6. Okay, this is a little hard to explain, but i try. As you see on the attached/uploaded picture, i wish to make a div like the page i found some days ago, it's easy i know.. BUT, here comes my problem. I am using a template/global design via a file called template.php inside (root/templates/template.php), and in there i have my menu to be shown... now, i wish this sub-menu to be shown, and i have done that, only problem is, that file is to be used on global design, meaning this div will be shown on ALL files (pages). Now my question, is it possible with if and else statements (possible functions also), to make it show only on 1 file, the file called: webshop.php this is how my code inside template.php looks like right now: //=======MENU$HTMLOUT .= "<div id='menu'>"; $HTMLOUT .= "<a href='#'>123</a>"; $HTMLOUT .= "";$HTMLOUT .= "</div>";//=====SUB$HTMLOUT .= "<div id='under_menu'>"; $HTMLOUT .= "123";$HTMLOUT .= "</div>";//=====SUB//=======MENU my first thought was to use a if isset statement saying if a file was open, i did try search on google and other few forums/places, but without luck.. any ideas would be awsome!
  7. sorry for late reply, i will try later when i'm home again. -thanks EDIT: One more question, might not be related, but still... i have uploaded an attachment for my new-user signup page. As you see, i have made an example box at the left, and there i have written if anything was (example) chosen for country, or if username has written and so on. If i would like to use jQuery to that part, how would i check an username text box? and same on the country part... coz country part would be a select/option list. Originally i would like to use fadein/out with jQuery for the text so the user could check see live if everything was done correctly... but if i need to check avaiable username in the database, and with jQuery... any idea of what i could do there? -thanks!
  8. so just to be sure i understand. 1. i move the whole login part to the top of code (LOGIN-PROCESS). And if login is true, will instead of output HTMLOUT code (same as echo out), and use for instance (error / succes) variables, and then simply use an HTMLOUT on those variables on the lower code correct?
  9. hmm, you got a point... but how? I mean, as you see in the code, i have 2 different divs, and i am loading the php-login process on the right one, and i wish the message to appear on the left one... ideas? Oo...
  10. Ok, so i still work with the whole thing, but this is what i try to figure out. 1. LOOK AT UPLOADED PICTURE FOR SEEING MY DESIGN! 2. as you see, i have only made the css/html part (a danish website (own project)) and the box to left (with the loading-bar), a simple image. I was wondering if anyone in here knew how to change the html text under it like (Data OK) or something like that if the username we got back was true and OK before moving on to the index.php page?.. 3. just to clarifie, it's an user-login page i am trying to figure out here ... 4. This is my whole takelogin.php file: <?phprequire_once ("include/core.php");require_once ("include/password_functions.php");require_once ("include/boxes.php");get_template();dbconn();$HTMLOUT = "";//starting var...$stdhead = array(// include css 'css' => array( 'side_boxes', 'boxes_signup' ));$stdfoot = array(// include js 'js' => array());$HTMLOUT .= "<div class='wrapper_signup_div'>";//MAIN INDEX WRAPPER START...//============================//START LEFT DIV CONTAINER...$HTMLOUT .= "<div class='left_signup_div'>";$HTMLOUT .= box_start("Sender data..."); $HTMLOUT .= "<center><img src='templates/".$PF['style']."/images/login_loader.gif'></center>";$HTMLOUT .= box_end();$HTMLOUT .= "</div>";//ENDING LEFT DIV CONTAINER...//============================//============================//START RIGHT DIV CONTAINER...$HTMLOUT .= "<div class='right_signup_div'>";$HTMLOUT .= box_start(); $HTMLOUT .= "Tjekker info i databasen og sender dig videre hvis det er korrekt...<br /><br />"; $HTMLOUT .= "Hvis intet sker inden 5 sekunder, klik <a href='#'>her</a>";$HTMLOUT .= box_end();//==========RUN LOGIN PROCEDURE=============== $uname = $_POST['username']; //Form Names... $pass = $_POST['password']; //Form Names... if(isset($pass) !== "") { $passhash = md_5($pass); //*Securing The Data... } $query = "SELECT * FROM users WHERE username = " . sqlesc($uname) . " AND passhash = " . sqlesc($passhash) . " AND enabled = 'yes' AND status = 'confirmed'"; //exit($query); // <-- debug if the query is as it should be $query_result = mysql_query($query)or die(mysql_error());//Running query to the DB...//$HTMLOUT .= "Username = " . $uname . "<br />";//$HTMLOUT .= "pass = " . $pass . "<br />";//$HTMLOUT .= "MD5 pass = " . $passhash . "<br />";//$HTMLOUT .= "Query = " . $query . "<br />";//$HTMLOUT .= "Query Result = " . $query_result . "<br />"; if(mysql_num_rows($query_result) > 0)//if the DB returns somfthing, then run... { $row = mysql_fetch_array($query_result, MYSQL_ASSOC); if(isset($_POST['cookie_login'])) { //$HTMLOUT .= "Cookie Login..."; logincookie($row['u_id'], $row['passhash'], true); }else{ //$HTMLOUT .= "Session Login..."; login_session($row['u_id'], $row['passhash'], true); }//ending else statement... header('Refresh: 3; url=index.php');//with time delay... } else//Error messeage... { $HTMLOUT .= "<hr /><center>Enten er kodeord forkert, ellers er brugernavnet forkert...</center>"; header('Refresh: 3; url=login.php');//with time delay... } //header("Location: index.php"); //header('Refresh: 3; url=index.php');//with time delay...//==========RUN LOGIN PROCEDURE===============$HTMLOUT .= "</div>";//ENDING RIGHT DIV CONTAINER...//============================$HTMLOUT .= "</div>";//MAIN INDEX WRAPPER END...print stdhead('Logger ind...' , $stdhead) . $HTMLOUT . stdfoot($stdfoot);?> Note that the PHP-LOGIN part is still being developed.. i just need to know if anyone could be helpfull and give me a smaller clue about what or where to look for a peace of jQuery code that looks like the thing i am trying to do... if you dont understand me as always (lol x)), then comment, and i will try to re-explain in details and best i can. -Thanks in advance as always!
  11. Hey, writing from Turkey, so the net might be a little slow.Anyhow, so what you are saying is there might happend a conflict if clicked to much? Why? I mean, i dont quite understand.Should i add them individually? How can i recognize them from each and one so the script runs without error? Could i add a if/else statement in the script saying that if it's drop-down (the first click) has been made, then run drop down, else up?...And if so, any ideas how to write it? Oo...
  12. Hello, and sorry for late reply as always, lol x). I have some few other projects running at same time, and tried to run jQuery on those also, for fun to see if it made a different. And it did not, not even your code worked... So i stepped back a second and was thinking, i took at look at my codes for a while, and i (think) i found the solution. My old code: // JavaScript Document$(document).ready( function() { $('#right_column').toggle( function() { $('#right_content_wrapper').slideDown(); }, function() { $('#right_content_wrapper').slideUp(); }); }); The problem lies at line: 4 $('#right_column').toggle( i changed like so: $('#right_column').click( Only problem now, is when i click on the right column, it DOES take it up, but for GOOD. Wont get down again when i click the damn column, any ideas? Still working on it, but will go on vacation for 2 weeks tonight (turkey). So will take my laptop with me and check if i can get a internet working at my hotel, if so, i get online again if i find a solution .
  13. So to get this straight, i dont need special id's to identifie them inbetween each and one that is selected? Oo... what if i needed an image to change when dropping down? You know, plus to minus etc?... Ideas on how to combine that part? Oo... EDIT: i have tried this js: $(".news_headline").click(function (){ $('.news_body').next().slideToggle("slow");}); is it correct? And it does not work's still... i need the class .news_body to fade-out once clicked on .news_headline (or the div)... is it because the div is not clickable? Or just me? Oo...
  14. i found the jQuery method/code (most of it) here: http://usingjquery.com/2010/10/using-jquerys-click-event/ so i think i got it right, it worket on the demo i downloaded from their website, and they only used div's there also. So i dont see the problem here. Basicly, i wonna make 2 things. First i wonna make a simple link in the top of the news div named toggle (or something like that), that link should then have a id so it could be used by JS. This link should now be able to un-slide ALL news div's at once in one click. Next, i wonna make a link out from each and one news div named slide (or something like that), and then make it slide the current element it is on. Hope you understood that one ...
  15. Okay, title says it all... im needing a little help understanding a few things, but i think i have a hold of something. My php code: $HTMLOUT .= box_start_full_size("Latest News");//$HTMLOUT .= "LATEST NEWS..."; $res = mysql_query("SELECT * FROM news WHERE added + ( 3600 *24 *45 ) >".time()." ORDER BY added DESC LIMIT 2");if (mysql_num_rows($res) > 0){$button = "";$id = ""; while($array = mysql_fetch_assoc($res)) { $id .= $array['nid']; $HTMLOUT .= "<div id='index_newsbox".$id."'>";//ID for jQuery to work... $HTMLOUT .= "<a href='#' id='toggle_all'>"; $HTMLOUT .= "Toggle All"; $HTMLOUT .= "</a>"; if (get_user_class() >= UC_ADMIN) { $button = " <div style='float:right;'> <a href='#'>Edit</a> <a href='#'>Delete</a> </div>"; } $HTMLOUT .= " <div class='news_headline'> <span class='span_news_headline'> {$array['headline']}n </span> {$button} </div>n"; $HTMLOUT .= "<div style='display:none;' class='news_body'>"; $HTMLOUT .= "<span style='float:right;'>".get_date( $array['added'], 'TINY' ) . "</span>n"; $HTMLOUT .= nl2br( $array['body'] ); $HTMLOUT .= "</div>n"; $HTMLOUT .= "</div>";//end of news ID/jQuery... }}$HTMLOUT .= box_end_full_size(); This is my jQuery/JS code: $(document).ready( function() { $('#index_newsbox').toggle( function() { $('.news_body').slideDown();//specific news-body... }, function() { $('.news_body').slideUp();//specific news-body... }); });$(document).ready( function() { $('#toggle_all').toggle( function() { $('.news_body').slideDown();//all news-body... }, function() { $('.news_body').slideUp();//all news-body... }); }); I want 2 things here. First is to make a simple <a href> link that can toggle ALL news-body div classes to slidedown and up, (does not work yet). next is simple, i wonna do this for each and one of the divs also. Meaning making some sort of ID to the jQuery/JS so it will chose the specific div-box to deal with... now, as you see, i have maked an $id inside the PHP for the div (id from table inside DB). From here im stuck a little bit, coz this is my first kind of project with jQuery, i always used normal JS. This seemed a little bit more simpler, and yet, i stuck, how dramatic -.-'... Anyhow, would be great if anyone could drop in with an idea on how to fix this one! Thanks as always!
  16. hmm, thanks, will test later! . And sorry for late reply, was to my danish oral exam today... god heaven it went ok, not the best, but okay . English Oral tomorrow, and DONE for august... yay x)...
  17. hmm, ok... so how would you fix again? hehe x)... and yes, was kind of easy not to oversee the word ''bad'' for position x)...
  18. Hey w3s again, im currently trying to make a foot div for a green webshop (for fun). Anyhow, im using this code: #foot { width:950px; height:20px; color:#FFF; background-color:#90CA77; bottom: 0px;} what i am trying to, is go take the whole foot div down to the bottom, but it will not do it. Any ideas? Oo...it is working so far, but wont go down, and that is all i need it to. here is the rest of my CSS: img {border: none;}a img { border: none;}html, body {height: 100%; /*to fill it out with no white borders or weird remain space...*/margin: 0em;padding: 0em;background-color: #D0D6B8;}#wrapper {width: 950px;margin: 0 auto;background-color: #ECEEE1; top: 0px;bottom: 0px;height: 100%;}#logo_holder { width: 950px; /*or 100%*/ height: 85px; background-color:#595959;} #menu_holder { width: 940px; /*Original: 950px, minus 10 for 5px at left and right (padding)...*/ height: 20px; background-color:#90CA77; padding-left: 5px; padding-right: 5px; border: none;} /* unvisited link */ #menu_holder a:link { color:#FFF; text-decoration:none; } /* visited link */ #menu_holder a:visited { color:#FFF; text-decoration:none; } /* mouse over link */ #menu_holder a:hover { color:#FFF; text-decoration:none; } /* selected link (clicking on it with mouse)... */ #menu_holder a:active { color:#FFF; text-decoration:none; }#foot { width:950px; height:20px; color:#FFF; background-color:#90CA77; bottom: 0px;}
  19. Hey again, i have a small but quick question. How to define days in numbers oO?... i saw this online: $six_day_loader['max_dead_torrent_time'] = 6 * 3600; //6-days... and was hoping to kind of using this the same way for one of my projects... now, if i wish to delete a forum post after (lets say 12 days)... how to define this in numbers like above here?... how many numbers are there at a day?, and how to find out?..can someone clarify this for me, i just dont get it yet... i think oO?... Hoping you can help somehow again x)...
  20. EDIT: i found out myself, sorry for a empty post! ..
  21. ohh... oops.. so am i to understand it this way, a while more, inside the while itself? Oo... EDIT: Done, and working.. thanks! ...
  22. ok, as you see, i have done as you said, so far so good... but as you also see in my DB, there should at least get 2 at each and one of forums.. why only 1 at each?, ideas?... SQL: while($fc_array = mysql_fetch_assoc($fc_res))//fc = forum_category{ $HTMLOUT .= "<div id='forum_cats_title_wrapper'>"; $HTMLOUT .= "<a href='forums_v1.php".$get_fm_id."fc_id=".$fc_array['fc_id']."'>".$fc_array['fc_name']."</a><-FORUM CATEGORY LIKE LH!..."; $HTMLOUT .= "</div>"; //Actual Forums Query... $f_res = mysql_query("SELECT * FROM mod_forums WHERE f_FK_forumcat_id = ".$fc_array['fc_id']); $f_array = mysql_fetch_assoc($f_res); $HTMLOUT .= "<div id='under_forum_cats_title_wrapper'>"; $HTMLOUT .= "--<a href='#'>".$f_array['f_name']."</a>"; $HTMLOUT .= "</div>";}
×
×
  • Create New...