Jump to content

rootKID

Members
  • Posts

    467
  • Joined

  • Last visited

Everything posted by rootKID

  1. i made this code for my overforums: $of_res = sql_query("SELECT * FROM overforums ORDER BY of_id");while($of_array = mysql_fetch_assoc($of_res)){ $HTMLOUT .= $CURUSER['u_FK_uc_id']; $HTMLOUT .= " / "; $HTMLOUT .= $of_array['of_u_class_read_min']; $HTMLOUT .= "<br />";} and got this out: 12/0 -> MY CLASS / FORUM READ CLASS 12/15 -> MY CLASS / FORUM READ CLASS and i made this code for all the forums to show up: $of_res = sql_query("SELECT * FROM overforums ORDER BY of_id");while($of_array = mysql_fetch_assoc($of_res)){ /* $HTMLOUT .= $CURUSER['u_FK_uc_id']; $HTMLOUT .= " / "; $HTMLOUT .= $of_array['of_u_class_read_min']; $HTMLOUT .= "<br />"; */ $f_res = sql_query("SELECT * FROM forums WHERE f_FK_of_id = ".$of_array['of_id']." ORDER BY f_id"); while($f_array = mysql_fetch_assoc($f_res)) { $HTMLOUT .= $CURUSER['u_FK_uc_id']; $HTMLOUT .= " / "; $HTMLOUT .= $f_array['f_u_class_read_min']; $HTMLOUT .= "<br />"; }} and i got this out: 12/0 12/0 12/0 12/20... this only shows i am right... i just dont understand still why the heck they wont do as i say.. only show when they are EQUAL or BIGGER than that number... annoying -.-'.
  2. Ingolme, you told me in the last post/thread that it did not work due to the SQL line being used already, so that is why i made one more... and that is because i include this code from another file into THE forums.php file... or trying to anyways, this is the code for my forums.php file: <?php$page_title = "Forums";// ------------------// OVERFORUM// ------------------// OF_ARRAY = Over Forums Assoc (ROW / OUTPUT) - (NORMAL / NOT WHILE LOOP!)// $HTMLOUT .= $of_array[''];// OF_ARR = Over Forums Assoc (ROW / OUTPUT) - (WHILE LOOP!)// $HTMLOUT .= $of_arr[''];// ------------------// FORUMS// ------------------// F_ARRAY = Forums Assoc (ROW / OUTPUT) - (NORMAL / NOT WHILE LOOP!)// $HTMLOUT .= $f_array[''];// F_ARR = Forums Assoc (ROW / OUTPUT) - (WHILE LOOP!)// $HTMLOUT .= $f_arr[''];// $HTMLOUT .= "";//============================================// One Column System (Main Forums)$HTMLOUT .= "ttt"."<div id='forums_one_column_container'>"."n"; $HTMLOUT .= box_start("Forums"); $of_res = sql_query("SELECT * FROM overforums ORDER BY of_id"); $of_array = mysql_fetch_assoc($of_res); // if "overforums" BIGGER than 0 if (mysql_num_rows($of_res) > 0) { if(isset($CURUSER)) { // USER FORUMS! // --------------------------- // $HTMLOUT .= "USER VIEW!"; include_once("user.forums.php"); } else { // GUEST FORUMS! // --------------------------- //$HTMLOUT .= "GUEST VIEW!"; include_once("guest.forums.php"); } } else { $HTMLOUT .= "<center>Ingen forums er tilføjet i nu!</center>"; } $HTMLOUT .= box_end();$HTMLOUT .= "ttt"."</div>"."n";?> Hope this helps... i die for an answer actually! I really dont know what the heck is wrong Oo... even tho my higest class is like 13 and i set the minimum user-class read right to 20, he/she can still see the damn forum/overforum... it's crazy tho, the $CURUSER SHOULD be working properly as i already did as you said, posted out the $CURUSER class line.. i got 12 as in "System Operator" class... i just dont get it Oo..
  3. hmm.. i do understand what you are saying JSG... but i dont use mysql_query all the time... i can use it easily! The sql_query is a function i have made like this: function sql_query($query){ //$result = mysql_query($query); $result = mysql_query($query) or sqlerr(__FILE__, __LINE__); return $result;} so if i wish to switch to, lets say mysqli it's affecting ALL my rows/sql lines ... so when i put online, i will switch to mysqli as you said, was also my plan to begin with.. i always for some reason just code in mysql.. just a force of habbit i assume x)
  4. Hello W3S. I know i have posted something similar a few days ago, but since i didn't get the error fixed im posting it again, since im not currently aware of how to make fix it. Im currently trying to make a forum, and right now im trying to make the users only be able to see the forums IF they have a minimum user-class... and guess what, that part is somehow not working, and i just cannot figure out why -.-'. This is the forum code: <?php$overforum_res = sql_query("SELECT * FROM overforums ORDER BY of_id");while($of_arr = mysql_fetch_assoc($overforum_res)){ // User has reading rights. (if BIGGER or EQUAL to!) if($CURUSER['u_FK_uc_id'] >= $of_array['of_u_class_read_min']) { $HTMLOUT .= "<table class='overforum_table_holder' border='0' cellpadding='0' cellspacing='0'>"; //====================================== // OVERFORUMS //====================================== $HTMLOUT .= "<tr class='overforum_tr_holder'>"; // Forum Name $HTMLOUT .= "<td class='overforum_name'>"; $HTMLOUT .= "<a href='forums.php?f_action=overforumview&overforum_id=".$of_arr['of_id']."'>"; $HTMLOUT .= $of_arr['of_name']; $HTMLOUT .= "</a>"; $HTMLOUT .= "</td>"; // Last Post & Last Reply $HTMLOUT .= "<td class='overforum_last_post_and_reply'>"; $HTMLOUT .= "Sidste Indlæg"; $HTMLOUT .= "</td>"; // Topic(s) Count By Forums $HTMLOUT .= "<td class='overforum_topics'>"; $HTMLOUT .= "Emner"; $HTMLOUT .= "</td>"; // Answer(s) Count By Topic $HTMLOUT .= "<td class='overforum_posts'>"; $HTMLOUT .= "Indlæg"; $HTMLOUT .= "</td>"; $HTMLOUT .= "</tr>"; //====================================== // FORUMS //====================================== // TO DEFINE USER RIGHTS $farray_res = sql_query("SELECT * FROM forums WHERE f_FK_of_id = ".$of_arr['of_id']." ORDER BY f_id"); $f_array = mysql_fetch_assoc($farray_res); $f_res = sql_query("SELECT * FROM forums WHERE f_FK_of_id = ".$of_arr['of_id']." ORDER BY f_id"); while($f_arr = mysql_fetch_assoc($f_res)) { // User has reading rights. (if BIGGER or EQUAL to!) if($CURUSER['u_FK_uc_id'] >= $f_array['f_u_class_read_min']) { $HTMLOUT .= "<tr class='forum_tr_holder'>"; // Forum Name $HTMLOUT .= "<td class='forum_name'>"; $HTMLOUT .= "<a href='forums.php?f_action=viewforum&forum_id=".$f_arr['f_id']."'>"; $HTMLOUT .= $f_arr['f_name']; $HTMLOUT .= "</a>"; $HTMLOUT .= "</td>"; // Forum Last Post & Last Reply $HTMLOUT .= "<td class='forum_last_post_and_reply'>"; //If bigger than 20 letters OR equal... if(strlen("Pasta gratin for fattigrøve eller travle forældre/unge (nok til 4 personer)") >= 40) { $HTMLOUT .= "<span class='forum_float_left'>"; $HTMLOUT .= "".substr("Pasta gratin for fattigrøve eller travle forældre/unge (nok til 4 personer)", 0, 35)."..."; $HTMLOUT .= "</span>"; $HTMLOUT .= "<span class='forum_float_right'>"; //$HTMLOUT .= "Af Hyperion, 15 timer siden"; $HTMLOUT .= "Af Hyperion"; $HTMLOUT .= ""; } else { $HTMLOUT .= "<span class='forum_float_left'>"; $HTMLOUT .= "Pasta gratin for fattigrøve eller travle forældre/unge (nok til 4 personer)"; $HTMLOUT .= "</span>"; $HTMLOUT .= "<span class='forum_float_right'>"; //$HTMLOUT .= "Af Hyperion, 15 timer siden"; $HTMLOUT .= "Af Hyperion"; $HTMLOUT .= ""; } $HTMLOUT .= "</td>"; // Forum Topics $HTMLOUT .= "<td class='forum_topics'>"; //$HTMLOUT .= number_format("10000000000"); $HTMLOUT .= number_format(get_forum_topics_row_count("topics", "WHERE ft_FK_f_id = " . $f_arr['f_id'])); $HTMLOUT .= "</td>"; // Forum Posts $HTMLOUT .= "<td class='forum_posts'>"; //$HTMLOUT .= number_format("10000000000"); $HTMLOUT .= number_format(get_forum_posts_row_count("posts", "WHERE fp_FK_ft_id = " . $f_arr['f_id'])); $HTMLOUT .= "</td>"; $HTMLOUT .= "</tr>"; } // USER RIGHTS END! } // WHILE LOOP FORUMS END! $HTMLOUT .= "</table>"; } // USER READING RIGHTS END! ( IF / ELSE )} // OVERFORUMS WHILE-LOOP END!?> In the top where the first WHILE-LOOP is for the overforums, you can see i use clearly the $CURUSER variable (direct connection to the user-table) to take the user-class it has. What i want now is to take FOREACH overforums minimum user-class number to see if the user is EQUAL or ABOVE that number, and i also do that by doing so (>= / if i am not mistaken). And one of my forum-table's (overforums) are the class of 20 or above, just to see if it's coming out, and it's still getting out. This means it does not work properly. Now my question if simply, how can i fix this? And did i do it in the proper way? Oo.. Hope you have some solutions where i cannot see one. - thanks as always!
  5. Ohh.. well, i should have seemed that one coming x). I just thought i could use same SQL at 2 places Oo... seems not Oo.. This answer actually answers alot of my other problems i have faced in the past! Thanks for the information dude! -rootKID
  6. Hello W3S! Im currently trying to make a forum of a sort... but not going so good. The 2 pictures i have uploaded shows the forums and the forum-database. Im also trying to "add" in a min-user-class for users to actually SEE/READ/WRITE the forum each by each.. i think that is where i have my problem, b-coz as you see in the forum picture i dont get any forums coming out.. even tho i actually have at least one in the database added up to it. Here is my code: <?php$overforum_res = sql_query("SELECT * FROM overforums ORDER BY of_id");while($of_arr = mysql_fetch_assoc($overforum_res)){ // User has reading rights. (if BIGGER or EQUAL to!) if($CURUSER['u_FK_uc_id'] >= $of_array['of_u_class_read_min']) { $HTMLOUT .= "<table class='overforum_table_holder' border='0' cellpadding='0' cellspacing='0'>"; //====================================== // OVERFORUMS //====================================== $HTMLOUT .= "<tr class='overforum_tr_holder'>"; // Forum Name $HTMLOUT .= "<td class='overforum_name'>"; $HTMLOUT .= "<a href='forums.php?f_action=overforumview&overforum_id=".$of_arr['of_id']."'>"; $HTMLOUT .= $of_arr['of_name']; $HTMLOUT .= "</a>"; $HTMLOUT .= "</td>"; // Last Post & Last Reply $HTMLOUT .= "<td class='overforum_last_post_and_reply'>"; $HTMLOUT .= "Sidste Indlæg"; $HTMLOUT .= "</td>"; // Topic(s) Count By Forums $HTMLOUT .= "<td class='overforum_topics'>"; $HTMLOUT .= "Emner"; $HTMLOUT .= "</td>"; // Answer(s) Count By Topic $HTMLOUT .= "<td class='overforum_posts'>"; $HTMLOUT .= "Indlæg"; $HTMLOUT .= "</td>"; $HTMLOUT .= "</tr>"; //====================================== // FORUMS //====================================== $f_res = sql_query("SELECT * FROM forums WHERE f_FK_of_id = ".$of_arr['of_id']." ORDER BY f_id"); $f_array = mysql_fetch_assoc($f_res); while($f_arr = mysql_fetch_assoc($f_res)) { // User has reading rights. (if BIGGER or EQUAL to!) if($CURUSER['u_FK_uc_id'] >= $f_array['f_u_class_read_min']) { $HTMLOUT .= "<tr class='forum_tr_holder'>"; // Forum Name $HTMLOUT .= "<td class='forum_name'>"; $HTMLOUT .= "<a href='forums.php?f_action=viewforum&forum_id=".$f_arr['f_id']."'>"; $HTMLOUT .= $f_arr['f_name']; $HTMLOUT .= "</a>"; $HTMLOUT .= "</td>"; // Forum Last Post & Last Reply $HTMLOUT .= "<td class='forum_last_post_and_reply'>"; //If bigger than 20 letters OR equal... if(strlen("Pasta gratin for fattigrøve eller travle forældre/unge (nok til 4 personer)") >= 40) { $HTMLOUT .= "<span class='forum_float_left'>"; $HTMLOUT .= "".substr("Pasta gratin for fattigrøve eller travle forældre/unge (nok til 4 personer)", 0, 35)."..."; $HTMLOUT .= "</span>"; $HTMLOUT .= "<span class='forum_float_right'>"; //$HTMLOUT .= "Af Hyperion, 15 timer siden"; $HTMLOUT .= "Af Hyperion"; $HTMLOUT .= ""; } else { $HTMLOUT .= "<span class='forum_float_left'>"; $HTMLOUT .= "Pasta gratin for fattigrøve eller travle forældre/unge (nok til 4 personer)"; $HTMLOUT .= "</span>"; $HTMLOUT .= "<span class='forum_float_right'>"; //$HTMLOUT .= "Af Hyperion, 15 timer siden"; $HTMLOUT .= "Af Hyperion"; $HTMLOUT .= ""; } $HTMLOUT .= "</td>"; // Forum Topics $HTMLOUT .= "<td class='forum_topics'>"; //$HTMLOUT .= number_format("10000000000"); $HTMLOUT .= number_format(get_forum_topics_row_count("topics", "WHERE ft_FK_f_id = " . $f_arr['f_id'])); $HTMLOUT .= "</td>"; // Forum Posts $HTMLOUT .= "<td class='forum_posts'>"; //$HTMLOUT .= number_format("10000000000"); $HTMLOUT .= number_format(get_forum_posts_row_count("posts", "WHERE fp_FK_ft_id = " . $f_arr['f_id'])); $HTMLOUT .= "</td>"; $HTMLOUT .= "</tr>"; } // USER RIGHTS END! } // WHILE LOOP FORUMS END! $HTMLOUT .= "</table>"; } // USER READING RIGHTS END! ( IF / ELSE )} // OVERFORUMS WHILE-LOOP END!?> please take note the setup is in Danish, but never the less the same thing. I hope you/someone can help as always -rootKID
  7. Thanks.. and yes, i do ... i'm trying to make a function fully dynamicly working to subtrack etc so it will post it out on my portfolio like a smooth charm... Example: This message was posted (1 week) ago.... so far, working like a charm.. thanks for the help
  8. Hello W3S! I have a question, might seem stupid but here it goes.. I have tried search for it, but im trying to use the time() php function to a project of mine and i dont know how much time there is of 1 day... can someone tell me etc? x)... thanks hehe
  9. is there no way to fix? Or am i misunderstanding? Oo... EDIT: What i ment was that it looks the same code from my side and one gives 0 while the top code gives a higher number... so all i mean is that i understand it like i cannot fix it... or am i mistaken?
  10. Hey W3S! I'm trying to "COUNT" my "users" table in the DataBase. And it DOES work... i think.. the fun part is that i don't have any users added in my DataBase yet, and still i get the number 1... This is how i have done the SQL/Call so far: $user_count_res = sql_query("SELECT COUNT(*) FROM users") or sqlerr(__FILE__, __LINE__);$user_count_row = mysql_num_rows($user_count_res);$registered = ($user_count_row == 0) ? 0 : $user_count_row; and with this code i should get "0"... but i get above that "1"... even when there is no users existing yet. I call it with the variable "$registered"... Any ideas? Coz i'm a little lost myself x)... -rootKID --Thanks for reading and help if possible!
  11. EDIT: i fixed it like @jsg told me to, thanks bro! x)
  12. Hello W3S again. I have lately been trying to make it "easier" for myself to code websites for customer. So im trying to make a new form of "template" system for my portfolio. Right now i am trying to insert these 3 lines of <meta> tags into my <head> area, simple coding "or so it used to be Oo". <meta> code lines: // META tags are working with include now! Only problem is that it's being echoed out irl (in real life) website now Oo... fix this...$HTMLOUT .= "ntt<meta name='Author' content='".include_once("templates/".$SETTINGS['template']."/meta/author.php");$HTMLOUT .= "' />";$HTMLOUT .= "ntt<meta name='Keywords' content='".include_once("templates/".$SETTINGS['template']."/meta/keywords.php");$HTMLOUT .= "' />";$HTMLOUT .= "ntt<meta name='Description' content='".include_once("templates/".$SETTINGS['template']."/meta/description.php");$HTMLOUT .= "' />"; As you see i am trying to "include_once" with each <meta> in the content area, just to make it easier to edit later on when i am trying to edit a global template design (that is a longer story for another time). The "fun" part is, i have used this method before in time on one of my "older" templates, one that is "NOT" being made with global design's... and yet working... One thing i dont understand is that i can see it IS being included, but only thing is when i look at my website, i get the damn lines echoed to the real look... meaning i can actually see what is being included... so i know it's working, what i am trying to fix is the damn echo thing... these are the files: author.php: Daniel Pedersen description.php: Hjemmeside Designer: Daniel Pedersen keywords.php: Design, HTML, CSS, PHP, SQL, MySQL, Template, Daniel, Pedersen this is the background HTML view in the browser: <meta name='Author' content='1' /><meta name='Keywords' content='1' /><meta name='Description' content='1' /> and because i use include_once i can only assume that is why i get the "1" in all 3 content areas. Is there anyone in here that has a clue about how to fix this oO? I have almost tried everything and i am out of solutions... so if anyone could give me some sort of help, that would be awsome as always! -rootKID Hope someone can help me out here :'( NOTE: All <meta> files has been uploaded as well... so you can see what i was meaning etc... $HTMLOUT .= ""; is the same as echo, just so you know. Hope someone can see a solution where i cannot... -rootKID author.php description.php keywords.php
  13. Hello W3S, it's been a while since i've posted something in here , mostly coz of my studies -.-'. Anyways, i've had some time off.. a week to be more exacly, so i was looking back at one of my projects, and i need some help yet again with some of my coding. I have tried building a category list with a sub-category in it. And it works great! Only problem is that i only want each sub-category item to show under each category item when clicked on the individually item.. if you get what i mean Oo... I could make a drop-down menu from one of my latest project, but i dont wont that and either does the customer... here is my code for the category AND sub-category list: echo left_box_start("Server Category List"); // SCL = SERVER CATEGORY LIST $scl_query = "SELECT ".sqlesc('id').", ".sqlesc('name')." FROM scl"; $scl_result = mysql_query($scl_query)or sqlerr(__FILE__, __LINE__); echo "<table border='0' cellpadding='0' cellspacing='0' width='100%'>n"; //Checking to see if there is any rows to take... if(mysql_num_rows($scl_result) < (int)0) { echo "ttttttt<tr>"; //echo "<td colspan='2'>"; echo "<td>"; echo "No Server Category Added Yet"; echo "</td>"; echo "</tr>"; } else { while ($scl_row = mysql_fetch_array($scl_result, MYSQL_ASSOC)) { echo "ttttttt<tr>"; echo "<td align='left' width='15px'>"; echo "->"; echo "</td>"; echo "<td align='left'>"; echo "<a href='webshop.php?scl_ID=" . (int)$scl_row['id']."'>"; echo $scl_row['name']; echo "</a>"; echo "</td>"; echo "</tr>n"; // SSCL = SUB SERVER CATEGORY LIST $sscl_query = "SELECT ".sqlesc('id').", ".sqlesc('name')." FROM sscl WHERE FK_scl_ID = " . (int)$scl_row['id']; //$sscl_query = "SELECT * FROM sscl WHERE FK_scl_ID = " . (int)$scl_ID; $sscl_result = mysql_query($sscl_query)or sqlerr(__FILE__, __LINE__); //Checking to see if there is any rows to take... if(mysql_num_rows($sscl_result) > (int)0) { //$sscl_row = mysql_fetch_array($sscl_result, MYSQL_ASSOC); while ($sscl_row = mysql_fetch_array($sscl_result, MYSQL_ASSOC)) { echo "<tr bgcolor='#999999'>"; echo "<td align='left' width='25px'>"; echo "-> ->"; echo "</td>"; echo "<td align='left'>"; echo "<a href='webshop.php?scl_ID=".(int)$sscl_row['id']."&sscl_ID=".(int)$sscl_row['id']."'>"; echo $sscl_row['name']; echo "</a>"; echo "</td>"; echo "</tr>"; } } // SSCL = SUB SERVER CATEGORY LIST //$sscl_query = "SELECT ".sqlesc('id').", ".sqlesc('name')." FROM sscl WHERE FK_scl_ID = " . (int)$scl_row['id']; $sscl_query = "SELECT ".sqlesc('id').", ".sqlesc('name')." FROM sscl WHERE FK_scl_ID = " . (int)$scl_ID; $sscl_result = mysql_query($sscl_query)or sqlerr(__FILE__, __LINE__); //Checking to see if there is any rows to take... if(mysql_num_rows($sscl_result) > (int)0) { $sscl_row = mysql_fetch_array($sscl_result, MYSQL_ASSOC); echo "<tr bgcolor='#999999'>"; echo "<td align='left' width='25px'>"; echo "-> ->"; echo "</td>"; echo "<td align='left'>"; echo "<a href='webshop.php?scl_ID=".(int)$scl_row['id']."&sscl_ID=".(int)$sscl_row['id']."'>"; echo $sscl_row['name']; echo "</a>"; echo "</td>"; echo "</tr>"; } } } echo "tttttt</table>"; echo left_box_end(); Any ideas/fixes would be awsome, or suggestions, also good... thanks if/why you would take a look at this and tell me where i am wrong x). What i've been trying is with the ID from category list & with the $_GET ID from category list, same result each damn time -.-'. Hope you dudes have a solution where i dont -.-'... -rootKID
  14. Fixed the problem, no longer needed help
  15. actually, i must admit. I dont know how to make it able on SP (Smart-Phones) eitherl. But i did hear that i you had to write a <meta> tag of some sort to make it able to make it working on phones, am i wrong or half-past the way to the truth? lol x)?
  16. First of all, the <link> attribute in the top of HTML. Please move that to right under <title> attribute code. (ALL CSS LINKING SHOULD BE DONE WITHINT THE <HEAD> TAGS). Second. if you wish to divide the website into 2 colomn system (that is what i call it anyways ) i would suggest replace your entire HTML code like so as an example: <!-- CSS & JAVASCRIPT LINKS + SITE TITLE WITHIN <head> tags! --><html><head><title>Creative Felli: Design and Artwork by Tiffany Harris</title><link rel="stylesheet" type="text/css" href="/files/css/basiclayout.css"/></head><body><!-- MAIN TABLE (100% height+width to define what ground the table can cover, in this case basicly the whole area/ground of browser window!) --><table id="maintable" border="0" width="100%" height="100%"><tr><td>FIRST IMAGE/LOGO</td><td>SECOND HTML/IMAGE</td></tr></table></body></html> just an example of what you could be doing! Keep in mind width are not usually placed on the actual <td> tags (i dont do that so much). I would suggest to place it like i did, on the table, and give it 100% of both ways. In that way you can use tr/td to cover the rest of the ground (for which now also are defined with the table with a 100% both ways, up and side-ways). Hope you see what i mean, but as a start, i would suggest something simple, like first of all place <body> attribute and <html> in the end of HTML code. And setup like i did just above here, then you will get ALOT further than you are now Hope this helped a little bit . If interested, i can help you out a bit if needed. Just comment here and we can then speak
  17. Hey again, i have some trouble with my design (snipped attached). As you see, i have some trouble with the overflow stuff Oo... What i am trying to do here, is when the green link (Friend List) has been clicked, it will drop-down a div under that link with jQuery style to show the friends... only problem is, its taking the hole Menu/statusbar down... I have clicked a little bit around here and there, but without luck. So i have posted original code here so you guys could take a look at it perhaps. Statusbar CSS: #statusbar { color:#FFFFFF; background:url(images/statusbar.png) repeat-x; width:1020px; height:50px; margin:0 auto; margin-top:5px; margin-bottom:5px;} #statusbar div.left { float:left; width:auto; color:#FFFFFF; margin-left:5px; } #statusbar div.right { float:right; width:auto; color:#FFFFFF; margin-right:5px; } Statusbar function/HTML-Design: function StatusBar(){ $HTMLOUT = ""; /*LEFT*/ /*===================*/ $HTMLOUT .= "<div class='left'>"; $HTMLOUT .= "User: "; $HTMLOUT .= "<a href='profile.php'>"; $HTMLOUT .= "Hyperion"; $HTMLOUT .= "</a>"; $HTMLOUT .= "<br />"; $HTMLOUT .= "Online: "; $HTMLOUT .= "<span style='color:#D32D2D;'>"; $HTMLOUT .= "yes"; $HTMLOUT .= "</span>"; $HTMLOUT .= "<br />"; $HTMLOUT .= chat_statusbar(); $HTMLOUT .= cl_statusbar_friend_list(); $HTMLOUT .= "</div>"; /*RIGHT*/ /*===================*/ $HTMLOUT .= "<div class='right'>"; $HTMLOUT .= "<a class='underline' href='my.php'>"; $HTMLOUT .= "EDIT PROFILE"; $HTMLOUT .= "</a>"; $HTMLOUT .= " "; $HTMLOUT .= "<a class='underline' href='logout.php'>"; $HTMLOUT .= "LOGOUT"; $HTMLOUT .= "</a>"; $HTMLOUT .= "</div>"; return $HTMLOUT;} Chatline functions: function chat_statusbar (){ $HTMLOUT = ""; $HTMLOUT .= "<span class='chatline_statusbar'>"; $HTMLOUT .= "<a class='cl_show_friends' href='#'>"; $HTMLOUT .= "Friends (0)"; $HTMLOUT .= "</a>"; $HTMLOUT .= "</span>"; return $HTMLOUT;}function cl_statusbar_friend_list (){ $HTMLOUT = ""; $HTMLOUT .= "<div class='cl_friend_list'>"; $HTMLOUT .= "Friend List..."; $HTMLOUT .= "</div>"; return $HTMLOUT;} Chatline CSS: span.chatline_statusbar {} span.chatline_statusbar a.cl_show_friends {color:#00CC33;} div.cl_friend_list { border:none; background-color:#000000; color:#FFFFFF; width:100px; height:200px;} Chatline Javascript code: $(".cl_show_friends").click( function() { $(this).next('.cl_friend_list').slideToggle("fast"); }); Menu HTML/Design: $HTMLOUT .= "<table border='0' cellpadding='0' cellspacing='0'>"; $HTMLOUT .= "<tr>"; $HTMLOUT .= "<td>"; $HTMLOUT .= "<a href='index.php'>"; $HTMLOUT .= "HOME"; $HTMLOUT .= "</a>"; $HTMLOUT .= "</td>"; $HTMLOUT .= "<td>"; $HTMLOUT .= "<a href='forums.php'>"; $HTMLOUT .= "FORUMS"; $HTMLOUT .= "</a>"; $HTMLOUT .= "</td>"; $HTMLOUT .= "<td>"; $HTMLOUT .= "<a href='faq.php'>"; $HTMLOUT .= "FAQ"; $HTMLOUT .= "</a>"; $HTMLOUT .= "</td>"; $HTMLOUT .= "<td>"; $HTMLOUT .= "<a href='rules.php'>"; $HTMLOUT .= "RULES"; $HTMLOUT .= "</a>"; $HTMLOUT .= "</td>"; $HTMLOUT .= "<td>"; $HTMLOUT .= "<a href='staff.php'>"; $HTMLOUT .= "STAFF"; $HTMLOUT .= "</a>"; $HTMLOUT .= "</td>"; $HTMLOUT .= "</tr>"; $HTMLOUT .= "</table>"; Menu CSS (Note sure if needed, but here you have it): #menu { background:top url(images/menu.png) repeat-x; color:#FFFFFF; width:99%; margin:0 auto;} #menu table { border:0px solid black; border-collapse:collapse; width:100%; } #menu table tr {} #menu table tr td { border:none; text-align:center; } #menu table tr td a { color:#FFFFFF; text-decoration:none; } #menu table tr td a:hover { color:#000000; text-decoration:none; } I do know what i am doing wrong, i think. It's because im setting the HTML inside the statusbar, and it needed to be able to flow OVER that statusbar height, but at the same time dragging the hole menu down... And it's the how to fix part i am lost in. So if you guys have any idea with what im doing wrong here, that would be awsome... or just a hint x). -THANKS AS ALWAYS! NOTE: Note that this is still in development (the javascript code). So it's the design i need help with, not the actual JS code. Just posted it so you guys could take a look at it in case that was the code that was the trouble anyways. Even tho i must admit, i dont think so x). But hoping you guys can find something i could not. -THANKS!
  18. Hey again, i was browsing a website last night. And got tooo tired to ask, so waited till now. I saw this in one of their CSS files: width: 100%0/; What does that means? I do know what 100% does, but what does 0/ means? I'm clueless...
  19. Hmm, i was about to write a longer CSS method that might have helped, thanks for letting me "not" writing that ...
  20. First of all i have to get something straight, is it the menu you mean? I'm refering to the menu that has the items: HOME, SHOP, MULTIPACK, LOOKBOOK, SHIPPING & RETURNS If that is the case, please comment
  21. The header is within the menu because it's the reason to be there. I would like the webshop logo/banner to appear right above the menu, looks cooler i think ... And the .menu div is supposed to have a height of auto, this means i cannot give a fixed height to it. And a question, what do you mean by adding the #content higher/greater than menu and sub-menus? Should i use z-index? Or am i getting this wrong again?
  22. First off, i knew of the content float. But that was my intention, the way i have learned to float back in the school days, my teacher told me to float both items to left (for instance) and then use margin/padding method to design space between the 2 elements. Am i wrong in this Oo? Next solution/question: Im not totally sure what you are telling me here,but lets say i did. Would your suggestion be to remove the position: absolute; setting for menu items? Like i said earlier, im still figuring it out, i found this example online and re-coded it to my own needs. It still has some flaws in it, but those flaws are what i am trying to fix right now to fit to my needs. So.. Am i getting the solution correct Oo?
  23. Okay, i have been working on a solution for alot of time now, and i can still simply not figure out what the ###### is wrong here. So im asking here for a new set of eyes, again -.-'. If you would just see the uploaded picture, you can see the menu does NOT go outside the content area. This has happened on MANY of my projects when i was trying to integrate a jQuery based menu with help from a few .JS formatted files. This is my style.css code: * { margin:0px; padding:0px; font-size: 9pt; font-family:"Trebuchet MS";}body { color:#000000; background-color:#AAD491;}#wrapper { color:#000000; background-color:#7fc655; width:900px; height:auto; margin:0 auto; overflow:hidden;} #header { width:100%; height:50px; background-color:#7FC655; } #content { width:auto; height:auto; float:left; } This is my menu.css code: .menu { width:225px; height:100%; font-size:12px; text-transform:uppercase; margin:0px; margin-right:5px; padding:0px; background-color:#58a02c; float:left;}.menu ul.menusm { background-image:url(pictures/menu/menu_sep.png); background-position:0 100%;/*X% & Y%*/ background-repeat:repeat no-repeat; margin:0 auto; padding:0px;}.menu ul li.ms_top { display:block; float:none; padding:0px;}.menu ul li.last {}.menu ul li a.ms_top { color:#A9A9A9; display:block; font-weight:normal; margin:0px; padding:0px 1px;/*TOP & BOTTOM - RIGHT & LEFT*/ text-align:left; text-decoration:none;}.menu ul li.ms_top { background-image:url(pictures/menu/menu_sep.png); background-position:100% 0;/*X% & Y%*/ background-repeat:repeat no-repeat;}.menu ul li.ms_top.ms_last {}.menu ul li a.ms_top span { color:#000000; display:block; margin:0px; padding:13px 14px 13px 50px;/*Top, Right, Bottom, Left*/ width:158px;}.menu ul li a.ms_top.ms_first span {}.menu ul li#active_menu-nav a.ms_top,.menu ul li a.ms_top.ms_hover,.menu ul li.active a.ms_top,.menu ul li a.ms_top.ms_hover span,.menu ul li.active a.ms_top span { background-color:#74AD34; background-position:initial initial; background-repeat:initial initial; color:#FFFFFF; text-decoration:none;}.menu ul li a.ms_top.ms_havesubmenu span { background-image:url(pictures/menu/menu_r_d_a.png); background-position:100% 0;/*X% & Y%*/ background-repeat:no-repeat no-repeat;}.menu ul li.active a.ms_top.ms_havesubmenu span { background-image:url(pictures/menu/menu_r_d_a.png); background-position:100% 0;/*X% & Y%*/ background-repeat:no-repeat no-repeat;}.menu ul li a.ms_top.ms_havesubmenu.ms_hover span { background-image:url(pictures/menu/menu_r_d_a.png); background-position:100% 0;/*X% & Y%*/ background-repeat:no-repeat no-repeat;}.menu ul li a.active,.menu ul li a.ms_hover,.menu ul li a.ms_havesubmenu.active,.menu ul li a.ms_havesubmenu.ms_hover {}.menu ul li ul { font-size:11px; font-style:normal; left:225px;/*Normal: 223*/ line-height:20%; margin:0px; padding:0px; text-transform:uppercase; top:0;}.menu ul li ul li { border-bottom-color:#74AD34; border-bottom-style:solid; border-bottom-width:1px; margin:0px; padding:0px; z-index: 10000;}.menu ul li ul li.ms_last { border-bottom-style:none;}.menu ul li ul li a { background-color:#49901e; background-position:initial initial; background-repeat:initial initial; color:#FFFFFF;/*Normal: 848484*/ /*text-decoration:none;*/ display:block; margin:0px; padding:12px 10px;/*TOP & BOTTOM - RIGHT & LEFT*/ width:160px;/*Normal: 160px*/}.menu ul li ul li a span { color:#FFFFFF; padding:0px;}.menu ul li ul li.ms_last a {}.menu ul li ul li a.ms_hover { text-decoration:none;}.menu ul li ul li ul { left:180px; top:0;}.menu ul li ul li a.ms_first.ms_havesubmenu.ms_hover,.menu ul li ul li a.ms_first.ms_havesubmenu.active,.menu ul li ul li a.ms_first.ms_havesubmenu.ms_hover span,.menu ul li ul li a.ms_first.ms_havesubmenu.active span,.menu ul li ul li a.active span,.menu ul li ul li a.active,.menu ul li ul li a.ms_hover,.menu ul li ul li a.ms_hover span { background-color:#74AD34; background-position:initial initial; background-repeat:initial initial; color:#FFFFFF;}.menu ul li ul li a.active span,.menu ul li ul li a.ms_hover span {}.menu * { z-index:9003;}ul.menusm { list-style:none;}ul.menusm li { cursor:pointer; position:relative;}ul.menusm li a { position:relative;}ul.menusm li ul { display:none; height:auto; list-style:none; position:absolute;}ul.menusm li ul li ul { list-style:none; position:absolute;}/*======================*//*QUICK JUMPY MENU*//*======================*//*.menu select { margin-bottom: 10px; display: none; font-size: 14px; height:auto; width:100%; }.menu select { width: 100%; height: 30px; padding: 2px 5px 2px 10px ; color: #000; font-size:20px; }*/ This is my index.php file: <?phprequire_once("include/config.php");require_once("include/core.php");?><!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd"><html xmlns="http://www.w3.org/1999/xhtml"><head> <meta http-equiv="Content-Type" content="text/html; charset=UTF-8" /> <link rel="shortcut icon" href="favicon.ico" /> <script type='text/javascript' src='js/jquery-1.10.2.min.js'></script> <script type='text/javascript' src='js/menu.js'></script> <link rel="stylesheet" href="style/style.css" type="text/css" /> <link rel="stylesheet" href="style/links.css" type="text/css" /> <link rel="stylesheet" href="style/menu.css" type="text/css" /> <title>Hjem</title></head><body><div id='wrapper'> <div id='menu' class='menu' style="font-family: 'Open Sans';"> <div id='header'> <img src="style/pictures/logo.png" /> </div> <script type='text/javascript' src='js/menu_html_block.js'></script> </div> <div id="content"> Content </div></div></body></html> This is my menu Javascript File: document.writeln('<ul class="menusm" id="menu-top-menu">');document.writeln(' <li><a href="index.php"><span>Hjem</span></a></li>');document.writeln(' <li><a href="#" class="menu_navigation"><span>Webshop</span></a>');document.writeln(' <ul>');document.writeln(' <li><a href="#" class="menu_navigation"><span>Menu</span></a>');document.writeln(' <ul>');document.writeln(' <li><a href="#" class="menu_navigation"><span>Menu</span></a></li>');document.writeln(' <li><a href="#" class="menu_navigation"><span>Menu</span></a></li>');document.writeln(' </ul>');document.writeln(' </li>');document.writeln(' </ul>');document.writeln(' </li>');document.writeln(' <li><a href="#"><span>Menu</span></a></li>');document.writeln(' <li><a href="#" class="menu_navigation"><span>Menu</span></a>');document.writeln(' <ul>');document.writeln(' <li><a href="#" class="menu_navigation"><span>Menu</span></a>');document.writeln(' <ul>');document.writeln(' <li><a href="#" class="menu_navigation"><span>Menu</span></a></li>');document.writeln(' <li><a href="#" class="menu_navigation"><span>Menu</span></a></li>');document.writeln(' <li><a href="#" class="menu_navigation"><span>Menu</span></a></li>');document.writeln(' </ul>');document.writeln(' </li>');document.writeln(' <li><a href="#" class="menu_navigation"><span>Menu</span></a>');document.writeln(' <ul>');document.writeln(' <li><a href="rules.php" class="menu_navigation"><span>Rules</span></a></li>');document.writeln(' <li><a href="faq.php" class="menu_navigation"><span>FAQ</span></a></li>');document.writeln(' </ul>');document.writeln(' </li>');document.writeln(' <li><a href="#" class="menu_navigation"><span>Menu</span></a>');document.writeln(' </ul>');document.writeln(' </li>');document.writeln('</ul>'); I know the code is a bit long, but if you could. Please, any ideas? I am basicly desperate to get this to work! And i can simply NOT figure out what the heck is wrong, and i am almost crying here -.-'... Some ideas? Tips? Would be simply AWSOME! If possible. Thanks ALOT! rootKID
×
×
  • Create New...