Jump to content

VinceGledhill

Members
  • Posts

    133
  • Joined

  • Last visited

Profile Information

  • Gender
    Not Telling

VinceGledhill's Achievements

Member

Member (2/5)

0

Reputation

  1. Hello People. I have a site that I am trying to paste multiple pins on a single map in a wordpress site, using cbxgooglemap plugin and advanced custom fields for my lat and long information. The following code works fine for one pin, on one map. echo do_shortcode('[cbxgooglemap lat="'.get_field('latitude').'" lng="'.get_field('longitude').'" ]'); However, when I try to post it within the loop, I simply get multiple maps, instead of one map, with multiple pins. Here is the code that doesn't work correctly, it gives me 3 maps. <?php $justMap = new WP_Query(array( 'posts_per_page'=> 3, 'post_type' => 'airfield_card' )); while($justMap->have_posts()){ $justMap->the_post(); echo do_shortcode('[cbxgooglemap lat="'.get_field('latitude').'" lng="'.get_field('longitude').'" ]'); } ?> Please can someone tell me how to alter the code so that a single map is outside the loop, but still embedding each pin from the loop. Kind Regards VinceGledhill
  2. No, I'm looking to have a PHP site instead of using joomla. I have been building it in a temp directory http://www.airfieldcards.com/vg_temp/by_name.php I get the menus to show on the left, but don't get it to load the correct card. It simply shows a blank card on the right.
  3. HI People. I have a website which uses Joomla. However, it's a pain in the backside to administer. Everything has to be done three fold in the back end to get anything done. Could someone point me towards somewhere where I can learn how to make the menu dynamically with information from the DB? Regards Vince Gledhill
  4. Thanks for the input. Where do I put that into my code exactly, sorry, I am ancient.
  5. Hi People. This php loads all the airfield names into the correct place. <?php include("db_connect.php"); $users_sql = "SELECT * FROM users ORDER by username"; $users_query = mysql_query($users_sql) or die (mysql_error()); $rsUsers = mysql_fetch_assoc ($users_query); $id = ( !isset ( $id ) ) ? ( int ) $_GET [ "id" ] : $id ; ?> <h2>Airfields By Name</h2> <?php do { ?> <li><a href="<? echo $rs["user_id"]; ?>"><?php echo $rsUsers ['username']; ?> </a></li> <?php } while ($rsUsers = mysql_fetch_assoc ($users_query)); ?> See http://www.airfieldcards.com/vg_temp/by_name.php What do I need to add to the above php to load the actual airfield into results.php in order to show "results.php" in the section of the page where the map is currently shown. (known as "col1" in my css)
  6. The reason was down to php calling other php pages. Those pages having header information in there.... I have now removed it all and it validates, cheers.
  7. Hi People. I have been putting a site together. Here is my CSS code @charset "UTF-8"; /* CSS Document */ <style media="screen" type="text/css"> /* <!-- */ /* General styles */ body { margin:0; padding:0; border:0; /* This removes the border around the viewport in old versions of IE */ width:100%; background:#000000; /* The min-width property does not work in old versions of Internet Explorer */ font-size:90%; text-align:center; } a { color:#369; } a:hover { color:#fff; background:#369; text-decoration:none; } h1, h2, h3 { margin:.8em 0 .2em 0; padding:0; } p { margin:.4em 0 .8em 0; padding:0; } img { /* margin:10px 0 5px; */ } /* Header styles */ #header { clear:both; float:center; width:100%; } #header { border-top:1px #06F; border-bottom:5px double #0000FF /*url(img/border_01.png)*/; background-color:#158ed8; /*test header border-bottom position */ } #header p, #header h1, #header h2 { padding:.4em 15px 0 15px; margin:0; border-bottom:url(img/border_01.png); } #header ul { clear:left; float:left; width:100%; list-style:none; margin:10px 0 5px 0; padding:0; border-top:5px; border-color:FF0000; } #header ul li { display:inline; list-style:none; margin:0; padding:0; } #header ul li a { display:block; float:left; margin:0 0 0 5px; padding:0px 10px; text-align:center; background:#22a0c4; color:#ffffff; text-decoration:none; position:relative; left:15px; line-height:1.3em; } #header ul li a:hover { background:#0000ff; /* bluey green color background of the menu butons */ color:#ffffff; } #header ul li a.active, #header ul li a.active:hover { color:#FFFFFF; background:#0000FF; font-weight:bold; } #header ul li a span { display:block; } /* 'widths' sub menu */ #layoutdims { /*this is the advert section */ clear:both; background:#d5dffb; /*vince light blue background */ border-top:1px solid #0000FF; margin:0; padding:6px 15px !important; text-align:center; } #fixed { margin:0 auto; width:1200px; /* you can use px, em or % */ text-align:left; } /* column container */ .colmask { position:relative; /* This fixes the IE7 overflow hidden bug and stops the layout jumping out of place */ clear:both; float:left; width:1200px; /* width of whole page */ overflow:hidden; /* This chops off any overhanging divs */ } /* holy grail 3 column settings */ .holygrail { background:#d5dffb; /* Right column background colour */ } .holygrail .colmid { float:left; width:200%; margin-left:-12em; /* Width of right column */ position:relative; right:100%; background:#FFFFFF; /* Centre column background colour */ } .holygrail .colleft { float:left; width:100%; margin-left:-50%; position:relative; left:24em; /* Left column width + right column width */ background:#d5dffb; /* Left column background colour */ } .holygrail .col1wrap { float:left; width:50%; position:relative; right:175px; /* Width of left column */ padding-bottom:1em; /* Centre column bottom padding. Leave it out if it's zero */ } .holygrail .col1 { margin:0 208px; /* was 208px Centre column side padding: Left padding = left column width + centre column left padding width Right padding = right column width + centre column right padding width */ position:relative; left:199%; overflow:hidden; } .holygrail .col2 { float:left; float:right; /* This overrides the float:left above */ width:150px; /* Width of left column content (left column width minus left and right padding) */ position:relative; right:5px; /* Width of the left-had side padding on the left column */ } .holygrail .col3 { float:left; float:right; /* This overrides the float:left above */ width:150px; /* Width of right column content (right column width minus left and right padding) */ margin-right:5px; /* Width of right column right-hand padding + left column left and right padding */ position:relative; left:48%; } /* Footer styles */ #footer { clear:both; text-align:center; background-color:#36C; color:#FFFFFF; width:100%; border-top:3px solid #0000FF; border-bottom:3px solid #0000FF; } #footer p { padding:10px; margin:0; } /* --> */ </style> <!--[if lt IE 7]> <style media="screen" type="text/css"> .col1 { width:100%; } </style> <![endif]--> Here is the site which is overflowing, please can you tell me how to fix it? http://www.airfieldcards.com/vg_temp/index.php
  8. PFMaBiSmAd and everyone else, thanks a million for that. I now know that I am far too stupid to learn all this. Your coding I could never have done, it's amazing to me. I was just sick of using the joomla to add a menu item every time, but I'm now getting in so deep, I want to make it happen without taking up too much of you good peoples time. I have the pages set up as follows. CSS running the style (not very good at the moment I know) navmenu.php is the navigation menu that is under the header image sidelinks.php is where I have put your code footer.php is obviously where the footer is. So, the main page (left part) is called "content" in the CSS and the navigation part of the page is called "right-col" in the CSS, and has a php include statement to grab that. How do I get the individual airfield menu to come up under the "alpha" and then when you click on the "airfield name" show results.php with the correct "card" in the "content" section?
  9. Thanks PFMaBiSmAd. Would it be too much trouble to ask you to show me how? I am getting on a bit and I'm struggling.
  10. Thanks for that. What I would really like to do is to replicate how it works via the joomla front end which is here http://www.airfieldcards.com Any ideas how I can click Alpha, then show the records that start with an "A" then Bravo... etc. Just like it is in the joomla front end.
  11. Thanks carugala, that's a good start, now working in alphabetical order at least. ;-)
  12. Thanks for that. I have tried it here... <?php include("db_connect.php"); $users_sql = "SELECT * FROM users"; $users_query = mysql_query($users_sql) or die (mysql_error()); $rsUsers = mysql_fetch_assoc ($users_query); ?> <h2>News</h2> <div class="scroll"> <h3>31st July 2012</h3> <p class="news">New HTML site created which has made the whole job of adding new airfields that much easier. As soon as you submit an airfield it becomes visible. </div> <li><a href="add.php">Add New Airfield</a></li> <h2>Airfields</h2> <li><a href="alpha.php">Alpha</a></li> <?php do { ?> <li><a href=""><?php echo $rsUsers ['username'] LIKE 'A%'; ?> </a></li> <?php } while ($rsUsers = mysql_fetch_assoc ($users_query)); ?> <li><a href="bravo.php">Bravo</a></li> But get nothing. I have also tried it here <?php include("db_connect.php"); $users_sql = "SELECT * FROM users"; $users_query = mysql_query($users_sql) or die (mysql_error()); $rsUsers = mysql_fetch_assoc ($users_query); ?> <h2>News</h2> <div class="scroll"> <h3>31st July 2012</h3> <p class="news">New HTML site created which has made the whole job of adding new airfields that much easier. As soon as you submit an airfield it becomes visible. </div> <li><a href="add.php">Add New Airfield</a></li> <h2>Airfields</h2> <li><a href="alpha.php">Alpha</a></li> <?php do { ?> <li><a href=""><?php echo $rsUsers ['username']; ?> </a></li> <?php } while ($rsUsers = mysql_fetch_assoc ($users_query)LIKE 'A%'); ?> <li><a href="bravo.php">Bravo</a></li> And still get nothing. I cannot put it in the "SELECT * FROM users" at the top because I want the other menu items to show "B" "C" etc.
  13. Hi People. I am building a database driven menu for my site and with help from some kinds souls on here now have it working of a sorts. http://www.airfieldcards.com/vg_temp/index.php However, my list is shown in no particular order, and would like to order it like so. Alpha (all DB items starting with "a" listed alphabetically Bravo (all DB items starting with "b" listed alphabetically Here is my code so far.... <?php include("db_connect.php"); $users_sql = "SELECT * FROM users"; $users_query = mysql_query($users_sql) or die (mysql_error()); $rsUsers = mysql_fetch_assoc ($users_query); ?> <h2>News</h2> <div class="scroll"> <h3>31st July 2012</h3> <p class="news">New HTML site created which has made the whole job of adding new airfields that much easier. As soon as you submit an airfield it becomes visible. </div> <li><a href="add.php">Add New Airfield</a></li> <h2>Airfields</h2> <ul> <li><a href="alpha.php">Alpha</a></li> <ul> <?php do { ?> <li><a href=""><?php echo $rsUsers ['username']; ?> </a></li> <?php } while ($rsUsers = mysql_fetch_assoc ($users_query)); ?> </ul> <li><a href="bravo.php">Bravo</a></li> <li><a href="charle.php">Charlie</a></li> <li><a href="delta.php">Delta</a></li> <li><a href="echo.php">Echo</a></li> <li><a href="foxtrot.php">Foxtrot</a></li> <li><a href="golf.php">Golf</a></li> <li><a href="hotel.php">Hotel</a></li> <li><a href="india.php">India</a></li> <li><a href="juliet.php">Juliet</a></li> <li><a href="kilo.php">Kilo</a></li> <li><a href="lima.php">Lima</a></li> <li><a href="mike.php">Mike</a></li> <li><a href="november.php">November</a></li> <li><a href="oscar.php">Oscar</a></li> <li><a href="papa.php">Papa</a></li> <li><a href="romeo.php">Romeo</a></li> <li><a href="sierra.php">Sierra</a></li> <li><a href="tango.php">Tango</a></li> <li><a href="uniform.php">Uniform</a></li> <li><a href="victor_zulu.php">Victor - Zulu</a></li> </ul> In the code the } while ($rsUsers = mysql_fetch_assoc ($users_query)); lists all the airfields but I would like to list only those starting with "A" in this section. Please can someone educate me?
×
×
  • 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.