Autor | Zpráva | ||
---|---|---|---|
1manik Profil |
#1 · Zasláno: 20. 7. 2013, 23:37:42
Dobry den,
mohli by ste mi prosim Vas poradit s tymto problemom. Pridal som do joomly 2.5 novy modul, ktory ma sluzit ako live vyhladavanie. Na localhoste mi vsetky kody funguju spravne a php je prepojene s js suborom. Ale ked som z tychto kodov vytvoril modul a nahral ho do joomly, zrazu to vyzera tak, ze js subor nie je prepojeny s php. Zaroven nie su prepojene ani css subory. Tu su jednotlive kody modulu: manifest.xml - na instalaciu do joomly <extension type="module" version="2.5" client="site" method="upgrade"> <name>Search Ajax</name> <files> <filename module="mod_search_ajax">mod_search_ajax.php</filename> <folder>css</folder> <folder>js</folder> <folder>font</folder> <filename>config.php</filename> <filename>quicksearch.php</filename> <filename>head.php</filename> </files> </extension> jednotlive php subory: <!DOCTYPE html> <html> <head> <title>Quick Search</title> <link href="css/bootstrap.css" rel="stylesheet" type="text/css" media="screen"> <link href="css/font-awesome.css" rel="stylesheet" type="text/css" media="screen"> </head> <?php include('config.php');?> <?php $document = &JFactory::getDocument(); $document->addScript( 'modules/mod_search_ajax/js/books.js' ); ?> <?php include('head.php')?> <body> <br> <br> <div class="container"> <div class="row"> <div class="span4"> <div class="alert alert-info"> Search this data to search textbox </div> <table class="table table-bordered"> <thead> <tr> <th>Book Title</th> </tr> </thead> <tbody> <?php $query=mysql_query("select * from trado_virtuemart_products")or die(mysql_error()); while($row=mysql_fetch_array($query)){ ?> <tr> <td><i class="icon-book"></i> <?php echo $row['product_sku']; ?></td> </tr> <?php } ?> </tbody> </table> </div> <div class="span8"> <div class="hero-unit-2"> <form> <input placeholder="Quick Search" class="input-large search-query" type="text" id="key" > <div class="result"><div class="loading"></div></div> </form> </div> </div> </div> </div> </body> </html> <ul> <table class="table table-bordered"> <tbody> <?php include('config.php'); $count= 0; $key = $_POST['key']; $key = addslashes($key); $sql = mysql_query("select * from trado_virtuemart_products WHERE product_sku LIKE '%$key%'") or die(mysql_error()); While($row = mysql_fetch_array($sql)) { $count++; $bookid= $row['virtuemart_product_id']; $title=$row['product_sku']; if($count<= 10){ ?> <div class="show<?php echo $bookid; ?>"> <tr> <td><a><i class="icon-book"></i> <?php echo $title; ?></a></td> </tr> </div> <?php }} if($count==""){ echo "no match Found"; }else{ ?> <?php } ?> </ul> </tbody> </table> Potom je tam este php kod na nadviazanie spojenia z databazou ale ten je funkcny. Vedeli by ste mi prosim Vas poradit, preco mi nenacita js subor a css subory? Dakujem velmi pekne |
||
Časová prodleva: 11 let
|
0