Jump to content

brad_langdon

Members
  • Posts

    47
  • Joined

  • Last visited

    Never

Everything posted by brad_langdon

  1. I want a simple image gallery setup where you click the image and the next one is shown... easy right. No modal boxes or anything, simply an imag on the page and when clicked, it switches to the next image in the div, maybe with a simple fade in / out. There are many plugins that do this and it is not hard to code. The only problem is that my PHP page populates itself with a div for each lot of images and then of course the images inside using a foreach loop. So what is the best way to have multiple js image galleries that behave independently from each other? The divs and images are created using a loop so not sure of the best way other than setting up a function for each one separately but it seems like a bloated solution... any ideas?
  2. This is working in all browsers except FF. See http://www.smartfitness.ae.php5-18.dfw1-2.websitetestlink.com/ It is the green call to action sitting on top of the main image. Strange thing is it used to work in FF and I have tried deleting all but one part of the effect but it does not work in FF... <!-- HOME PAGE WIDGET ANIMATION --> <script type="text/javascript"> jQuery(document).ready(function() { jQuery('div.widgetfeature').toggle( function() { jQuery('div.featurewidget').animate({ /* width: '100%', */ height: '442px', top: '0' }); jQuery('div.widgetfeature').animate({ width: '26px', height: '26px', bottom: '13px', right: '13px' }); jQuery("div.widgetform").show(); jQuery('div.widgetfeature').css( "background-image", "url(<?php bloginfo('stylesheet_directory'); ?>/images/Close.png)"); }, function() { jQuery('div.featurewidget').animate({ /* width: '423px', */ height: '154px', top: '288px', right: '0' }); jQuery('div.widgetfeature').animate({ width: '423px', height: '154px', right: '0', bottom: '0' }); jQuery("div.widgetform").hide(); jQuery('div.widgetfeature').css( "background-image", "url(<?php bloginfo('stylesheet_directory'); ?>/images/Widget.png)"); }); }); </script>
  3. Proceeding to bash my head against keyboard...
  4. I have built many css nav menus before but this one I can't seem to nail. It has dropdowns, I have disabled the JQuery animation for debugging so it is purely css now. If you view in FF Chrome etc you will see how it should work but in all versions of IE the rollovers don't work and the drop down menus are stuffed also. I have :hover on "li" elements for good reason and I know IE does not work this way but I have used the plugin "http://www.xs4all.nl/~peterned/csshover.html" which usually works for me but something is not right obviously. Just hoping I can get some fresh eyes on this and "fingers crossed" tell me the simple solution that I just cant see! Like I said I have done this many times before so something must be different, I just don't know what. The URL is http://www.leftsideart.co.nz/test/
  5. Anyone have any ideas... I am stuck I just cant figure this part out
  6. I have managed to move forward slightly using part of the code you listed. Now I get all results listed for each instance of the second loop where I should be getting different results for each instance of the second loop. I hope that makes sense. So the second loop is say a div with content and each div should display the results of the array depending on which database table it is pulling he results from. Instead I am getting all results from all tables in every div... any ideas? <?php echo "<div class='panes'>"; $loop = mysql_query("SHOW tables FROM $data_base") or die ('cannot select tables'); // SELECT ALL TABLES FROM CLIENT DATABASE while($row = mysql_fetch_array($loop)){ // SELECT ALL TABLES FROM CLIENT DATABASE $loop2 = mysql_query("SELECT * FROM $row[0] ORDER BY date02") or die ('cannot select table fields'); // SELECT ALL CONTENT FROM EACH TABLE while ($row2 = mysql_fetch_array($loop2)){ // SELECT ALL CONTENT FROM EACH TABLE echo "<div class='tabs'>"; echo "<h2>" . $row2[title] . "</h2>"; $abc=$row2[title]; $loop2 = mysql_query("SELECT * FROM $row[0] WHERE title = '$abc'") or die ('cannot select table fields'); // SELECT ALL CONTENT FROM EACH TABLE while ($row3 = mysql_fetch_array($loop2)){ $date = $row3[date02]; // LIST EACH OCCUPIED DATE IN FORMAT THAT MATCHES CALENDAR JQUERY FORMAT $date_a = substr ($date, 0, 4); // PULL YEAR AS SEPERATE VARIABLES SO THEY CAN BE REARRANGED TO FIT CALENDAR FORMAT $date_b = substr ($date, 4, 2); // PULL MONTH AS SEPERATE VARIABLES SO THEY CAN BE REARRANGED TO FIT CALENDAR FORMAT $date_c = substr ($date, 6, 2); // PULL DAY AS SEPERATE VARIABLES SO THEY CAN BE REARRANGED TO FIT CALENDAR FORMAT $dates[] = "\"" . $date_b . "/" . $date_c . "/" . $date_a . "\","; // RE FORMAT DATE TO FIT CALENDAR JQUERY FORMAT } ?> <script type='text/javascript'> function nationalDays(date) { var natDays = [ <?php foreach ($dates as $dates1) { print_r($dates1); } ?> ]; var sDate = (date.getMonth()+1).toString() + '/' + date.getDate().toString() + '/' + date.getFullYear().toString(); if ($.inArray(sDate, natDays) != -1) return [false,'Occupied','Not this day!']; else return [true, '']; } </script> <?php echo "<span class='StartDate'></span>"; echo "<p><h3>Booked Dates</h3>"; $loop2 = mysql_query("SELECT * FROM $row[0] ORDER BY date02") or die ('cannot select table fields'); // SELECT ALL CONTENT FROM EACH TABLE mysql_data_seek($loop2,0); // RESET DATA COUNTER SINCE WHILE LOOP HAS ALREADY BEEN USED while ($row2 = mysql_fetch_array($loop2)){ echo "<a class='cross' href='delete.php?cmd=delete&id=$row2[id]&table=$row[0]'></a><li class='dates'>" . $row2[date] . "</li>"; // LIST EACH OCCUPIED DATE AND LINK TO DELETE.PHP TO DELETE RECORD } echo "</p>"; echo "<p><a href='sessiondestroy.php?signout=true'>Logout</a></p>"; // SIGN OUT USER echo "</div>"; } } } ?>
  7. In the following code I am trying to insert the result of the mysql query called " $loop3 " into the javascript code that follows the loop. As the code is outside of the loop it only echo's the last result from the loop. I don't know much about arrays but I am pretty sure I have to store all of the results from " $loop3 " in an array so it can be used out of the loop. Can someone please explain how to do this. Please explain carefully as I don't know too much about arrays. The loop and javascript snippet is about halfway down through the code. <?php $loop = mysql_query("SHOW tables FROM $data_base") or die ('cannot select tables'); // SELECT ALL TABLES FROM CLIENT DATABASE while($row = mysql_fetch_array($loop)){ // SELECT ALL TABLES FROM CLIENT DATABASE $loop2 = mysql_query("SELECT * FROM $row[0] ORDER BY date02") or die ('cannot select table fields'); // SELECT ALL CONTENT FROM EACH TABLE while ($row2 = mysql_fetch_array($loop2)){ // SELECT ALL CONTENT FROM EACH TABLE echo "<div class='tabs'>"; echo "<h2>" . $row2[title] . "</h2>"; $loop3 = mysql_query("SELECT * FROM $row[0] ORDER BY date02") or die ('Cannot select table fields'); // SELECT ALL CONTENT FROM EACH TABLE mysql_data_seek($loop3,0); // RESET DATA COUNTER SINCE WHILE LOOP HAS ALREADY BEEN USED while ($row3 = mysql_fetch_array($loop3)){ $date = $row3[date02]; // LIST EACH OCCUPIED DATE IN FORMAT THAT MATCHES CALENDAR JQUERY FORMAT $date_a = substr ($date, 0, 4); // PULL YEAR AS SEPERATE VARIABLES SO THEY CAN BE REARRANGED TO FIT CALENDAR FORMAT $date_b = substr ($date, 4, 2); // PULL MONTH AS SEPERATE VARIABLES SO THEY CAN BE REARRANGED TO FIT CALENDAR FORMAT $date_c = substr ($date, 6, 2); // PULL DAY AS SEPERATE VARIABLES SO THEY CAN BE REARRANGED TO FIT CALENDAR FORMAT $date = "\"" . $date_b . "/" . $date_c . "/" . $date_a . "\","; // RE FORMAT DATE TO FIT CALENDAR JQUERY FORMAT } ?> <script type='text/javascript'> function nationalDays(date) { var natDays = [ <?php echo $date; ?> <!-- -- -- THIS IS THE PART WHERE I NEED THE ARRAY TO LIST THE RESULTS OF THE LOOP ABOVE -- -- --> ]; var sDate = (date.getMonth()+1).toString() + '/' + date.getDate().toString() + '/' + date.getFullYear().toString(); if ($.inArray(sDate, natDays) != -1) return [false,'Occupied','Not this day!']; else return [true, '']; } </script> <?php echo "<span class='StartDate'></span>"; echo "<p><h3>Booked Dates</h3>"; $loop2 = mysql_query("SELECT * FROM $row[0] ORDER BY date02") or die ('cannot select table fields'); // SELECT ALL CONTENT FROM EACH TABLE mysql_data_seek($loop2,0); // RESET DATA COUNTER SINCE WHILE LOOP HAS ALREADY BEEN USED while ($row2 = mysql_fetch_array($loop2)){ echo "<a class='cross' href='delete.php?cmd=delete&id=$row2[id]&table=$row[0]'></a><li class='dates'>" . $row2[date] . "</li>"; // LIST EACH OCCUPIED DATE AND LINK TO DELETE.PHP TO DELETE RECORD } echo "</p>"; echo "<p><a href='sessiondestroy.php?signout=true'>Logout</a></p>"; // SIGN OUT USER echo "</div>"; } } } ?>
  8. Can anyone tell me how to use a jquery date picker in a way that it checks whether or not the selected date is available? So basically if a date is not available it would gray out the unavailable dates or something similar. I want to use it for a booking system but I am not sure how to do this part. I guess it would have to fetch the info from a database or could it all be done somehow in the javascript file? Thanks
  9. I have a client who wants an ecommerce site. No problem there, there are many free or cheap cart applications that are easy to customise. Is it possible though to upload a file each month to update the prices of existing items or add new products rather than entering them one by one? He will have quite a large database of products so doing it one by one would be a nightmare. Can anyone recommend the best software to use to allow him to update his products in this way?
  10. Thanks a lot for your help guys. It sounds like I should give it a go. Keldorn, I didn't quite get that last part of your post... were you meaning that to do the equilivant by hand coding it would take 8-10 hours for a week or were you saying it would take that long with Zend. Also on that note what would you all recommend to use as an MVC? I have heard that Symfony is good and also CakePHP. Or is Zend the king of the roost when it comes to this?
  11. Thanks for all the advice but everything you just said is over my head. It sounds pretty full on. So should I be using an MVC even for a basic site with text, images, a gallery and contact forms? It sounds like it would take me longer to do it through an MVC or is it actually quite fast once setup? That' s another thing, is creating a layout the same, do I still have basic css files etc. Do I end up having sepereate php files for each page or is there just one page with the content changing dynamically. I guess I just want a very basic overview of how it works, in idiots terms, so I can decide if it is the track I want to take... if that's possible
  12. Thanks, is it a steep learning curve. Also are there any limitations to what you can do with a database model instead of normal hand coding?
  13. Ok, When I create a site I open a basic template that I have created that consists of a css file an index page and a few php inserts for the header, nav and footer. It works fine and I am happy with it but I keep seeing posts / comments on the net saying that all websites should be dynamically loaded etc and all content on pages should be database driven, so on and so on. How does everyone else setup a basic site. I dont want to use a CMS like wordpress or joomla. I looked into CakePHP but apparently you should not use it unless you are creating a blog, forum etc. Here I was thinking CakePHP was a basic sort of framework that you can add features to. I need help deciding the best way to do things, I have created sites that pull info from databases before but it was still all hand coded. Help from anyone expereinced in this topic is very much needed
  14. Ok, When I create a site I open a basic template that I have created that consists of a css file an index page and a few php inserts for the header, nav and footer. It works fine and I am happy with it but I keep seeing posts / comments on the net saying that all websites should be dynamically loaded etc and all content on pages should be database driven, so on and so on. How does everyone else setup a basic site. I dont want to use a CMS like wordpress or joomla. I looked into CakePHP but apparently you should not use it unless you are creating a blog, forum etc. Here I was thinking CakePHP was a basic sort of framework that you can add features to. I need help deciding the best way to do things, I have created sites that pull info from databases before but it was still all hand coded. Help from anyone expereinced in this topic is very much needed :-\
  15. SOLVED... $interests = implode(', ', $_POST['Interests']);
  16. Hi, I have this code... foreach ($_POST['Interests'] as $interest => $value) { echo "Interests: $interest; Value: $value<br>";} How do I store the multiple results in a single variable?
  17. Does anyone know how to display the live price for gold and silver in New Zealand dollars on a website... I have seena few downloads for gold prices in US dollars but there must be a script to convert to any currency and be able to customize the look etc? An ideas?
  18. Thanks I am new to cron though... does it accept normal php code or is it it's own language? Also those links look very messy... do you of any tutorials you could point me to? I have an FTP client on my computer of course but I am guessing that is obviously not the same thing as an FTP Server. Sorry this side of things is new to me.
  19. Does anyone know how to scheduale an automatic backup of a server? Dreamhost lets you backup once a month... I want to automatically back up every day and save the backup on my hard drive. I have heard of "cron jobs" would this be the way? I searched this forum but couldn't find a suitable answer.
  20. Thanks, Sorry but how would that go... I don't really know how to do that. Also would it matter that I already have a directory open to get the folder names?
  21. Hi, The following script lists the folders in my "Photos" folder as links to another page. That part works fine. What I want now is to get a count of the images inside each folder that the script has listed. So basically the script finds the folders inside "Photos" folder and now I want it to display the amount of images in each folder next to the folder name / the link. <?php $dir = opendir('Photos/'); // Open Folder "Photos" and find files inside (in this case folders not files) echo "<ul id='frontpage'>"; while ($read = readdir($dir)) { if ($read!='.' && $read!='..') { // List all folders in "Photos" as "<li>'s" in the list echo "<li id='infocon'><a href='photos.php?cat=$read' class='frontpage'><img src='Photos/$read/01.jpg' class='frontpage' /> <h1 style=\"background: url('images/".$read.".png') no-repeat top left;\" \>$read</h1>"; echo "<h2> I WANT THE FILECOUNT TO GO HERE </h2></a></li>"; } } echo "</ul>"; closedir($dir); // Close directory ?> Any help will be of course much appreciated. I have tried a few methods I saw online with no luck. I think it may have to do with the fact that I was trying to read a directory while a directory was already open or something... just guessing, I am no expert.
  22. I just looked but once again there is an example for each method but none explaining how to combine the two... at least not that I can see.
  23. I know how to send plain text emails with php. I have Google'd how to send html emails as well and that looks pretty straight forward. Can anyone tell me an effective way to send both at the same time. I could not find any decent examples on Google... half of them said they don't even work properly. Any help would be vastly appreciated.
×
×
  • 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.