Jump to content

rootKID

Members
  • Posts

    467
  • Joined

  • Last visited

Everything posted by rootKID

  1. Thanks a lot! I have added the code... this is how it looks now, still won't work, not sure what i'm doing wrong here :/ <div class="container-fluid"> <div class="row"> <div class="col-md-12"> <h2 class="font-weight-bold text-center">WORK</h2> <div class="border"></div> <br /> </div> </div> </div> <div class="container main_wrapper"> <section> <div class="container"> <div class="row" id="work-grid"> <div class="card-columns"> <?php $query_1 = "SELECT * FROM admvideo ORDER BY video_id DESC"; $result_1 = mysqli_query($dblink, $query_1) or die(mysqli_error($dblink)); if( mysqli_num_rows($result_1) > 0 ) { while( $row_1 = mysqli_fetch_array($result_1) ) { $video_id = $row_1['video_id']; $video_title = $row_1['video_title']; $video_link = $row_1['video_link']; $video_director = $row_1['video_director']; $video_text = $row_1['video_text']; ?> <div class="card Panel_ModalVideoID-<?php echo $video_id; ?>"> <a href="#" title="Video" class="thumb"> <img class="card-img-top img-responsive img-rounded" src="https://img.youtube.com/vi/<?php echo $video_link; ?>/0.jpg" alt="Image" data-toggle="modal" data-target=".modalVideo" data-videoID="<?php echo $video_link; ?>"> </a> <div class="card-body"> <h5 class="card-title"><?php echo $video_title; ?></h5> <p class="card-text"><?php echo $video_text; ?></p> </div><!-- //.card-body --> <div class="card-footer"> <small class="text-muted"><?php echo $video_director; ?></small> </div><!-- //.card-footer --> </div><!-- //.card --> <?php } } else { echo 'Ingen videoer at vise i nu.'; } ?> </div> </div> </div> </section> </div> <div class="modal fade customModal_1 modalVideo" tabindex="-1" role="dialog" aria-labelledby="modalVideo_LabelledBy" aria-hidden="true"> <div class="modal-dialog modal-lg"> <div class="modal-content"> <div class="modal-header"> <h3 class="modal-title customModal_2">Video Main Title 1</h3> <button class="close" type="button" data-dismiss="modal">×</button> </div> <div class="modal-body"></div> <div class="modal-footer"> <h4 class="customModal_3">Video Main Title 2</h4> <p class="customModal_4"> Video in here. </p> <div class="embed-responsive embed-responsive-16by9"> <iframe class="embed-responsive-item" src=""></iframe> </div> <!--<iframe width="100%" height="350" src="" frameborder="0" allowfullscreen></iframe>--> </div> </div> </div> </div><!-- //.modal-Youtube_1 --> <script> $("[class*='Panel_ModalVideoID-']").click(function() { // Step 1 - The Variables //----------------------------------------------- // The Modal var modal = $('.customModal_1'); var modalTitle = $('.customModal_2'); var videoTitle = $('.customModal_3'); var videoEmbed = $('.customModal_4'); var modal_body = $('.modal-body'); // The Cards var INSERTDATA_modalTitle = $(this).find('a.thumb').attr( 'title' ); // Step 2 - Clear different areas //----------------------------------------------- //modal_body.empty(); // empty area (needed?) // Step 3 - insert data into different areas //----------------------------------------------- $(modalTitle).html(INSERTDATA_modalTitle); // output of main title //$(modalTitle).text(INSERTDATA_modalTitle); $('.embed-responsive-item').attr('src', 'https://www.youtube.com/embed/' + $(this).find('a.thumb > img').attr('data-videoID')); // Step 4 - show the modal //----------------------------------------------- $(modal).modal({ show: true; }); }); </script> as you see, i have added the code, still nothing happens on the modal :/ This is the code on a file that i include (PAGE_work1.php)... the page on ROOT is called (work.php) and is the main file, this is the code, if it helps: <?php ob_start(); session_start(); define("DEFINED_FILE:DEFINES_1", TRUE); require_once("include/files/www-files/random_uncategorized_useful_files/defines.php"); // Defines require_once("include/files/www-files/random_uncategorized_useful_files/report_methods.php"); // Reportings require_once("database/connection.php"); DB_open_main_connection(); // $dblink DB_open_another_connection("dblink_1", "localhost", "rooted", "xXx_oh", "xXx_Youty", "UTF8"); // $dblink_1 # List of Queries // $query_1 = ROOT/include/files/www-files/carousel_1.php (images & pictures) ?> <!DOCTYPE html> <html lang="da"> <head> <meta charset="UTF-8"> <meta name="viewport" content="width=device-width, initial-scale=1, shrink-to-fit=no"> <title>Vores Arbejde</title> <!-- Bootstrap V.4.0.0 CSS files --> <link rel="stylesheet" href="include/css/bootstrap.min.css" /> <!-- My Custom CSS Files --> <link rel="stylesheet" href="include/css/2.css" /> <link rel="stylesheet" href="include/css/navigation_menu_2.css" /> <!-- other css files --> <link rel="stylesheet" href="include/css/fontawesome-all.min.css"> <!-- Jquery (necessary for Bootstrap's JavaScript plugins) and Bootstrap V.4.0.0 JS Script files --> <script src="include/js/jquery-3.2.1.js"></script> <script src="include/js/bootstrap.min.js"></script> <script src="include/js/bootstrap.bundle.js"></script> <script src="include/js/2.js"></script> </head> <body> <?php # Require Navigation Menu require_once("include/files/www-files/nav-menu.php"); # Including PAGE_work1.php include_once("include/files/www-files/PAGE_work1.php"); ?> <div class="mt-3"></div> <?php # Require Footer require_once("include/files/www-files/footer.php"); // close connection $dblink->close(); // MAIN Connection // close connection $dblink_1->close(); // Another Connection ?> </body> </html> as you see, nothing should be wrong :/ ideas?
  2. just tested what you wrote... still won't replace the damn main title :/ other ideas.... because i did locate the a.thumb :/
  3. ok, that is how i select the different elements, that part i get now... so to output it into the modal, i would assume i could do this now: <div class="container-fluid"> <div class="row"> <div class="col-md-12"> <h2 class="font-weight-bold text-center">WORK</h2> <div class="border"></div> <br /> </div> </div> </div> <div class="container main_wrapper"> <section> <div class="container"> <div class="row" id="work-grid"> <div class="card-columns"> <?php $query_1 = "SELECT * FROM admvideo ORDER BY video_id DESC"; $result_1 = mysqli_query($dblink, $query_1) or die(mysqli_error($dblink)); if( mysqli_num_rows($result_1) > 0 ) { while( $row_1 = mysqli_fetch_array($result_1) ) { $video_id = $row_1['video_id']; $video_title = $row_1['video_title']; $video_link = $row_1['video_link']; $video_director = $row_1['video_director']; $video_text = $row_1['video_text']; ?> <div class="card Panel_ModalVideoID-<?php echo $video_id; ?>"> <a href="#" title="Video" class="thumb"> <img class="card-img-top img-responsive img-rounded" src="https://img.youtube.com/vi/<?php echo $video_link; ?>/0.jpg" alt="Image" data-toggle="modal" data-target=".modalVideo"> </a> <div class="card-body"> <h5 class="card-title"><?php echo $video_title; ?></h5> <p class="card-text"><?php echo $video_text; ?></p> </div><!-- //.card-body --> <div class="card-footer"> <small class="text-muted"><?php echo $video_director; ?></small> </div><!-- //.card-footer --> </div><!-- //.card --> <?php } } else { echo 'Ingen videoer at vise i nu.'; } ?> </div> </div> </div> </section> </div> <div class="modal fade customModal_1 modalVideo" tabindex="-1" role="dialog" aria-labelledby="modalVideo_LabelledBy" aria-hidden="true"> <div class="modal-dialog modal-lg"> <div class="modal-content"> <div class="modal-header"> <h3 class="modal-title customModal_2">Video Main Title 1</h3> <button class="close" type="button" data-dismiss="modal">×</button> </div> <div class="modal-body"></div> <div class="modal-footer"> <h4 class="customModal_3">Video Main Title 2</h4> <p class="customModal_4"> Video in here. </p> <!--<iframe width="100%" height="350" src="" frameborder="0" allowfullscreen></iframe>--> </div> </div> </div> </div><!-- //.modal-Youtube_1 --> <script> $("[class*='Panel_ModalVideoID-']").click(function(event) { // Step 1 - The Variables //----------------------------------------------- // The Modal var modal = $('.customModal_1'); var modalTitle = $('.customModal_2'); var videoTitle = $('.customModal_3'); var videoEmbed = $('.customModal_4'); var modal_body = $('.modal-body'); // The Cards var INSERTDATA_modalTitle = $(this).find('a.thumb').attr( 'title' ); // Step 2 - Clear different areas //----------------------------------------------- //modal_body.empty(); // empty area (needed?) // Step 3 - insert data into different areas //----------------------------------------------- $(modalTitle).html(INSERTDATA_modalTitle); // output of main title //$(modalTitle).text(INSERTDATA_modalTitle); // Step 4 - show the modal //----------------------------------------------- $(modal).modal({ show: true; }); }); </script> ? And then i just... assume... to repeat it? The output of the main title and in this case i would do exactly same thing and just repeat for whereever i need to output the elements inside of the modal? Also what i am trying to achieve is to put an embedded youtube video inside of the modal, hence the iframe.. not sure if it's needed, but do you have any idea how to put it inside of say "customModal_4", since that is where it should go... i did see a tutorial somewhere online (forgot link), that i should save the URL and pass it to the modal, just like i do with the elements now, and then i should simply somehow insert a new attribute to the iframe with a src/source, containing the link of the youtube video.. but like i said, that is only what i remember
  4. but i need the div/wrapper tho right? to get all the data to the js? That is why i picked the one div-block that surrounded the whole area with information :/ I mean how else would you do it? Not sure how...
  5. ohh.... lol haha, forgot to add it, right here it is: <div class="container-fluid"> <div class="row"> <div class="col-md-12"> <h2 class="font-weight-bold text-center">WORK</h2> <div class="border"></div> <br /> </div> </div> </div> <div class="container main_wrapper"> <section> <div class="container"> <div class="row" id="work-grid"> <div class="card-columns"> <?php $query_1 = "SELECT * FROM admvideo ORDER BY video_id DESC"; $result_1 = mysqli_query($dblink, $query_1) or die(mysqli_error($dblink)); if( mysqli_num_rows($result_1) > 0 ) { while( $row_1 = mysqli_fetch_array($result_1) ) { $video_id = $row_1['video_id']; $video_title = $row_1['video_title']; $video_link = $row_1['video_link']; $video_director = $row_1['video_director']; $video_text = $row_1['video_text']; ?> <div class="card Panel_ModalVideoID-<?php echo $video_id; ?>"> <a href="#" title="Video" class="thumb"> <img class="card-img-top img-responsive img-rounded" src="https://img.youtube.com/vi/<?php echo $video_link; ?>/0.jpg" alt="Image" data-toggle="modal" data-target=".modalVideo"> </a> <div class="card-body"> <h5 class="card-title"><?php echo $video_title; ?></h5> <p class="card-text"><?php echo $video_text; ?></p> </div><!-- //.card-body --> <div class="card-footer"> <small class="text-muted"><?php echo $video_director; ?></small> </div><!-- //.card-footer --> </div><!-- //.card --> <?php } } else { echo 'Ingen videoer at vise i nu.'; } ?> </div> </div> </div> </section> </div> <div class="modal fade customModal_1 modalVideo" tabindex="-1" role="dialog" aria-labelledby="modalVideo_LabelledBy" aria-hidden="true"> <div class="modal-dialog modal-lg"> <div class="modal-content"> <div class="modal-header"> <h3 class="modal-title customModal_2">Video Main Title 1</h3> <button class="close" type="button" data-dismiss="modal">×</button> </div> <div class="modal-body"></div> <div class="modal-footer"> <h4 class="customModal_3">Video Main Title 2</h4> <p class="customModal_4"> Video in here. </p> <!--<iframe width="100%" height="350" src="" frameborder="0" allowfullscreen></iframe>--> </div> </div> </div> </div><!-- //.modal-Youtube_1 --> <script> $("[class*='Panel_ModalVideoID-']").click(function(event) { // Step 1 - The Variables //----------------------------------------------- // The Modal var modal = $('.customModal_1'); var modalTitle = $('.customModal_2'); var videoTitle = $('.customModal_3'); var videoEmbed = $('.customModal_4'); var modal_body = $('.modal-body'); // The Cards var INSERTDATA_modalTitle = $("a.thumb").attr( 'title' ); // Step 2 - Clear different areas //----------------------------------------------- //modal_body.empty(); // empty area (needed?) // Step 3 - insert data into different areas //----------------------------------------------- $(modalTitle).html(INSERTDATA_modalTitle); //$(modalTitle).text(INSERTDATA_modalTitle); // Step 4 - show the modal //----------------------------------------------- $(modal).modal({ show: true; }); }); </script> as you see i have added it to a <div>... still not working tho.. because it's a div and not an <a> element Oo?
  6. Hello, thanks, cleared it a little more, thanks! This is my new code, still won't work tho... <div class="container-fluid"> <div class="row"> <div class="col-md-12"> <h2 class="font-weight-bold text-center">WORK</h2> <div class="border"></div> <br /> </div> </div> </div> <div class="container main_wrapper"> <section> <div class="container"> <div class="row" id="work-grid"> <div class="card-columns"> <?php $query_1 = "SELECT * FROM admvideo ORDER BY video_id DESC"; $result_1 = mysqli_query($dblink, $query_1) or die(mysqli_error($dblink)); if( mysqli_num_rows($result_1) > 0 ) { while( $row_1 = mysqli_fetch_array($result_1) ) { $video_id = $row_1['video_id']; $video_title = $row_1['video_title']; $video_link = $row_1['video_link']; $video_director = $row_1['video_director']; $video_text = $row_1['video_text']; ?> <div class="card"> <a href="#" title="Video" class="thumb"> <img class="card-img-top img-responsive img-rounded" src="https://img.youtube.com/vi/<?php echo $video_link; ?>/0.jpg" alt="Image" data-toggle="modal" data-target=".modalVideo"> </a> <div class="card-body"> <h5 class="card-title"><?php echo $video_title; ?></h5> <p class="card-text"><?php echo $video_text; ?></p> </div><!-- //.card-body --> <div class="card-footer"> <small class="text-muted"><?php echo $video_director; ?></small> </div><!-- //.card-footer --> </div><!-- //.card --> <?php } } else { echo 'Ingen videoer at vise i nu.'; } ?> </div> </div> </div> </section> </div> <div class="modal fade customModal_1 modalVideo" tabindex="-1" role="dialog" aria-labelledby="modalVideo_LabelledBy" aria-hidden="true"> <div class="modal-dialog modal-lg"> <div class="modal-content"> <div class="modal-header"> <h3 class="modal-title customModal_2">Video Main Title 1</h3> <button class="close" type="button" data-dismiss="modal">×</button> </div> <div class="modal-body"></div> <div class="modal-footer"> <h4 class="customModal_3">Video Main Title 2</h4> <p class="customModal_4"> Video in here. </p> <!--<iframe width="100%" height="350" src="" frameborder="0" allowfullscreen></iframe>--> </div> </div> </div> </div><!-- //.modal-Youtube_1 --> <script> $('[class*=Panel_ModalVideoID-]').click(function(event) { // Step 1 - The Variables //----------------------------------------------- // The Modal var modal = $('.customModal_1'); var modalTitle = $('.customModal_2'); var videoTitle = $('.customModal_3'); var videoEmbed = $('.customModal_4'); var modal_body = $('.modal-body'); // The Cards var INSERTDATA_modalTitle = $("a.thumb").attr( 'title' ); // Step 2 - Clear different areas //----------------------------------------------- //modal_body.empty(); // empty area (needed?) // Step 3 - insert data into different areas //----------------------------------------------- $(modalTitle).html(INSERTDATA_modalTitle); //$(modalTitle).text(INSERTDATA_modalTitle); // Step 4 - show the modal //----------------------------------------------- $(modal).modal({ show: true; }); }); </script> Did i misunderstand anything? I have removed the preventDefault, tried to catch the title attribute which apparently still aint working, put my <script> in the bottom of my code, include jquery 3.2.1 in the top of my header, so no sure as to why :/ Ideas?
  7. hey w3s... so i have this code: <div class="container-fluid"> <div class="row"> <div class="col-md-12"> <h2 class="font-weight-bold text-center">WORK</h2> <div class="border"></div> <br /> </div> </div> </div> <div class="container main_wrapper"> <section> <div class="container"> <div class="row" id="work-grid"> <?php $query_1 = "SELECT * FROM admvideo ORDER BY video_id DESC"; $result_1 = mysqli_query($dblink, $query_1) or die(mysqli_error($dblink)); if( mysqli_num_rows($result_1) > 0 ) { while( $row_1 = mysqli_fetch_array($result_1) ) { $video_id = $row_1['video_id']; $video_title = $row_1['video_title']; $video_link = $row_1['video_link']; $video_director = $row_1['video_director']; $video_text = $row_1['video_text']; ?> <div class="col-sm-4 col-xs-12 work_panels"> <div class="panel panel-default Panel_ModalVideoID-<?php echo $video_id; ?>"> <div class="panel-thumbnail"> <a href="#" title="Video" class="thumb"> <img src="https://img.youtube.com/vi/<?php echo $video_link; ?>/0.jpg" class="img-responsive img-rounded" data-toggle="modal" data-target=".modalVideo"> </a> </div> <div class="panel-body"> <p class="work-name"><?php echo $video_director; ?></p> <p class="work-video-text"><?php echo $video_text; ?></p> </div> </div> </div> <?php } } else { // hvis der ikke er EN række i udtrækket, vises en fejlbesked echo 'Ingen videoer at vise i nu.'; } ?> </div> </div> </section> <div class="modal fade customModal_1 modalVideo" tabindex="-1" role="dialog" aria-labelledby="modalVideo_LabelledBy" aria-hidden="true"> <div class="modal-dialog modal-lg"> <div class="modal-content"> <div class="modal-header"> <h3 class="modal-title customModal_2">Video Title 1</h3> <button class="close" type="button" data-dismiss="modal">×</button> </div> <div class="modal-body"></div> <div class="modal-footer"> <h4 class="customModal_3">Video Title 2</h4> <p class="customModal_4"> Video in here. </p> <!--<iframe width="100%" height="350" src="" frameborder="0" allowfullscreen></iframe>--> </div> </div> </div> </div><!-- //.modal-Youtube_1 --> </div> <script> $('[class^=Panel_ModalVideoID-]').click(function(event) { event.preventDefault(); // Step 1 - The Variables //----------------------------------------------- var e = $(this); // e = event of the function happening via class/id "class^=Panel_ModalVideoID-*" (working?) var modal = $('.customModal_1'); var modalTitle = $('.customModal_2'); var videoTitle = $('.customModal_3'); var videoEmbed = $('.customModal_4'); var modal_body = $('.modal-body'); var INSERTDATA_modalTitle; $('a.thumb').click(function() { INSERTDATA_modalTitle = $(this).Attr( 'title' ); }); //var INSERTDATA_modalTitle = e.$('a.thumb').Attr("title"); // working? // Step 2 - Clear different areas //----------------------------------------------- modal_body.empty(); // empty area // Step 3 - insert data into different areas //----------------------------------------------- $(modalTitle).html(INSERTDATA_modalTitle); // Step 4 - show the modal //----------------------------------------------- $(".customModal_1").modal({ show: true; }); }); </script> Currently i'm using bootstrap 4 and trying to make a modal appear. So far it is working BUT i am trying to edit the following inside of the modal: Modal title, and the 2 <p> items inside modal-footer for youtube embed and youtube title etc. All of the replacements at different areas should come from the "while loop" at the upper of the page coding with php. Can you help me somehow? Not sure what to do with js/jquery really, a little bit of a newbie... even after years, i still dont get much of it :/ Hoping you guys can help me out a bit. If more information is needed, please ask. Using jQuery 3.2.1, included ALL of the bootstrap 4 bundle etc, so i know that is not the problem here. Maybe it is the way i am using my JS/jQuery code. Thanks a lot. And ohh... the title should be from the "a.thumb -> title attribute", saying video... will edit it later with php so that it will be dynamic. Hope you can help. Thanks!
  8. FIXED IT! I placed my script a little lower on the document! Worked... no clue why tho :/
  9. rootKID

    why the damn (')?

    hmm... i tried to remove to ORDER from the SQL also but didn't work for some reason, which is why i'm kinda confused.. should be working. Or at least that is what i remember that it should :/...
  10. rootKID

    why the damn (')?

    hey W3S! Been a while! Anyhow, i have a question regarding my SQL... not sure, since it's been a while. So i am running latest version of WinginX with PHP 7.1 and PhpMyAdmin latest version all... i tried to run this SQL, which usually works: SELECT p1_c_c_id AS id, p1_c_c_name AS name, p1_c_c_level AS level, p1_c_c_order AS order FROM plugin1_class_categories ORDER BY order ASC and i got the error below: Fatal error: Uncaught Error: Call to a member function fetch_assoc() on boolean in <path> Stack trace: #0 {main} thrown in <path> on line 131 so then i went nuts and went to the PhpMyAdmin sql builder and it builded this for me: SELECT `p1_c_c_id` AS `id`, `p1_c_c_name` AS `name`, `p1_c_c_level` AS `level`, `p1_c_c_order` AS `order` FROM `plugin1_class_categories` ORDER BY `p1_c_c_order` ASC and that works? Only difference is the plinges... the (')... why? The other one usually works also right? Or am i remembering wrong? Tried to read a little bit about it but gave no sence since it's been a while with everything hehe Well thanks if you can help me anyways! Thanks in advance!
  11. Thanks for the answer, but really cannot figure out what is wrong with my code? I have started both session_start() and ob_start() with gzip... i am checking if the user is already logged in and yet no action (this is a function a little bit earlier in the code, nothing wrong, used it many other places before).. Any ideas? And ohh, thanks for the correction btw.. still a little new to the mysqli part haha And for future notice, the password checking was really only an example.. gonna remove it when done with all code hehe, but thanks for the info
  12. Hi W3S I am trying to make a login PHP code with MySQLI and it won't work for some reason, not sure what i have done wrong, can someone see what i did wrong? This is the code: //////////////////////////////////////////////////////////////////////////////////////////////////////// // Login //////////////////////////////////////////////////////////////////////////////////////////////////////// $SUBMIT_FORM_ACTION___TakeLoginForm = (isset($_GET["SUBMIT_FORM_ACTION"]) ? $_GET["SUBMIT_FORM_ACTION"] : ""); if( $SUBMIT_FORM_ACTION___TakeLoginForm == "TakeLogin" ) { $query_1 = "SELECT u_id, u_username, u_password, u_email FROM users WHERE u_email=? AND u_password=?"; if ( $stmt = $mysqli->prepare($query_1) ) { $FORM_email = $_POST['email']; $FORM_password = $_POST['password']; $stmt->bind_param('ss', $FORM_email, $FORM_password); $stmt->execute(); $stmt->bind_result($id, $username, $password, $email); $stmt->fetch(); // SECURITY! CHECK & COMPARE! if($FORM_password !== $password) { die(" <center><b>(Form) Login ErrMSG #1</b></center> <br /> <center>Password incorrect/wrong! Try again!</center> "); } // Make Sessions Needed! $_SESSION['user'] = array(); $_SESSION['user']['id'] = $id; $_SESSION['user']['username'] = $username; $_SESSION['user']['password'] = $password; $_SESSION['user']['email'] = $email; $stmt->close(); //header("location: index.php"); } } okay so lets see if i get this straight. In the bind_result part, this does not matter what kind of variable it is right? In the naming part... or does the names actual HAS to be like the ones in the Database Columns? I somehow think its the part there but correct me if i am wrong... Hoping someone can help me a little bit. Thanks in advance
  13. okay i know it's been a while, but thanks lol hehe, just seen this today "2 years from now", lol haha
  14. okay thanks, i think i got it now ^^
  15. Hello W3S! Been a while, as always I am sure i have asked of this before, but since my USB-Flash has been stolen in the school by someone, i am about to re-do a lot of projects and i cannot find the other posts on this website for some reason (my past post), so here i "probably" ask again in the hopes of you guys helping me a little bit. I know how to make a simple <select> filled with values, but i want some content (div-box with class content) to be shown AFTER a specific thing has been selected from the select-form. What do i need to use here? I could imagine some sort of JS/jQuery code combined with PHP? And if so, can someone guide me to the right path of where to look? Been trying to google but without luck :/ Anyhow, hoping you all good, and good to be back again
  16. Hmm, ok thanks i will try to do this If it dosen't help, ill try to come back yet again ... Thanks again!
  17. i knew that, somehow... lol.. not sure why i posted this on PHP now haha Anyhow, question is how? Do i measure the width or?... And then what? Like after 800px width add a drop-down "+ sign" to the end and add the rest of menu in there?... just throwing in ideas, feel free to jump in.. lol x)).. thanks in advance
  18. Hello fellow W3S Users. I have need of your hints and guides yet again. I have no code as such yet, but i was wondering if anyone could tell me how to make a PHP Query code that will count the menu items in my database and if the menu items are over lets say "8" or "9", then at the end of the menu there will be a "+" sign, which will become a drop-down menu for all the rest of my menu items? I have about 15 menu items so to make it look a little more pretty i thought that would be a great idea? Now i have a specific width "800px" for the menu, however my idea is that i either give the menu items "using ul/li for menu items" a specific width, orr give them an automatic width and then somehow say that if the menu items goes "outside the div-box", THEN make the plus sign with the drop-down menus? Is this possible? The last idea i mean? Because some of the menu items i have will have some long names (well sorts of, but still... considering for the feature...) Hoping you guys understands what i mean and will/can help me? Yet again thanks a lot and hoping you have some solution to my problem Thanks in advance, and best regards, rootKID.
  19. i know this, but the problem is that we have "bought" a new design, and the design was not designed to handle stuff like this (that i am aware off). What other menus are you talking about? If you have some ideas that could help or a guideline that would be great Thanks for the answer tho
  20. Hello W3Schools! Its been a while I am trying to help a friend setting up he's webshop. It is already online but trying to make it look more nice according to webdesign template - this is hes website shop (www.thai-online.dk) i have already changed A LOT on this design, now i mostly need the menu... as you see the menu navigation has a lot of categories, and he told me that he wanted to add a lot more in the future if this shop could run online, so i am trying to figure out a solution for this. I already like the design myself, except the menu, so i have come to a solution that i am working on and hopefully you can help me out, work with me. As you see i currently have added 13 Categories, now my idea is to code some PHP into the menu on OpenCart so that if the menu design is ABOVE "1100px" in width AND has more than 7-8 categories on the menu, it will only show the 7-8 categories and at the end of it all show a little plus sign "+", when clicked on the plus sign a little side-menu will appear out from that little plus sign. The reason for using the 1100px width thing is to know if its on a pc orr on a mobile (if you know a better way please tell me, this is just to show you what i want) i know for sure the "plus sign" already has been made somewhere, but how to actually do it? We are using opencart version 2.0.1.2 or something like that... this is the code i found on the .tbl file: <?php foreach ($categories as $category) { ?> <?php if ($category['children']) { ?><li class="dropdown"><a href="<?php echo $category['href']; ?>" class="dropdown-toggle" data-toggle="dropdown"><span><?php echo $category['name']; ?></span> <img width="8" height="8" class="menu-close" src="catalog/view/theme/atr374opc2101/image/menu_close.gif" /><img width="8" height="8" class="menu-open" src="catalog/view/theme/atr374opc2101/image/menu_open.gif" /></a> <div class="dropdown-menu"> <div class="dropdown-inner"> <?php foreach (array_chunk($category['children'], ceil(count($category['children']) / $category['column'])) as $children) { ?> <ul class="list-unstyled"> <?php foreach ($children as $child) { ?><!-- --><li><a href="<?php echo $child['href']; ?>"><?php echo $child['name']; ?></a></li><!-- --><?php } ?> </ul> <?php } ?> </div> <a href="<?php echo $category['href']; ?>" class="see-all"><span><?php echo $text_all; ?> <?php echo $category['name']; ?></span></a></div> </li><?php } else { ?><!-- --><li><a href="<?php echo $category['href']; ?>"><span><?php echo $category['name']; ?></span></a></li><?php } ?> <?php } ?> On another note, we are also using BootStrap (latest version) to make the design responsive. And the reason why i use the 1100px width, like i said before is because of knowing if the screen is that wide AND to tell if i should be adding the category addon... if the screen however is less than 1100px (or so...), the menu should be normal. Reason why i do this is because i already like the responsive design, i only need to edit the PC-Screen design a little bit so the menu can fit without problems. Hope you all can help out one way or another, still struggling with this little thing Thanks in advance and again, its been a while, so..... HELLO // rootKID
  21. Hmm... thanks for the answers guys, will check it out ^^...
  22. Hmm... i will take a look at this when i get home, but like dsonesuk says... you only define 1 class to all of them, that is how i understand this anyhow ... i will take a look at the code when i get home. Possible for you to share the code? The whole website code from the "information.html" file? Just hit "ctrl + c" and "ctrl + v" on a Windows machine to copy and paste the whole code into code-tags so we actually can see what is going on ^^ Seeing the code on website and on here is 2 different things, depending on how you have coded the website Will take a look if you share the code LaTeRz
  23. Hello W3S! Yet again here with a question. I was wondering if it would be possible to run a script/javascript/jQuery that will update a page/element of a page (( IF )) there is any new item in the database? I have seen this in chats online over the internet. The chat wont change what is already there, and if there is being written anything to the database, the new item/chat message in the database will automaticly (( Fade )) into the chat via jQuery. Is this possible? If so, where to look? Possible to guide me to a place where i can find some details? Would be much appreciated! Thanks in advance W3S!
  24. rootKID

    Google Maps?

    Thanks for the support! I think i got the idea now, i will test the code and return again if i fail.. which i most likely will hehehe ... Thanks anyways!
×
×
  • Create New...