Forum Replies Created

Viewing 15 replies - 1 through 15 (of 51 total)
  • Thread Starter Who_Dat

    (@who_dat)

    Thanks, that seems to have worked. There is quite a noticeable lag between the tiles loading and rearranging…but I imagine that’s the Masonry script and not the scrolling plugin.

    Thread Starter Who_Dat

    (@who_dat)

    Aaargh! I accidentally marked the notification email as spam, so I’m just seeing this reply. I can’t let you see the site, because it’s behind a “Coming Soon” plugin that requires you log in. But the full code for all three scripts is this:

    <div class="sidebarItem">
             <h4>Model Type</h4>
             <?php wp_dropdown_categories('show_option_none=Select model type&include=18,19,20,21');??>
    
             <script type="text/javascript"><!--
                var dropdownModel = document.getElementById("cat");
                function onCatChangeModel() {
                   if ( dropdownModel.options[dropdownModel.selectedIndex].value > 0 ) {
                      location.href = "<?php echo get_option('home');
             ?>/?cat="+dropdownModel.options[dropdownModel.selectedIndex].value;
                   }
                }
                dropdownModel.onchange = onCatChangeModel;
             --></script>
          </div>
       
          <div class="sidebarItem">
             <h4>Year Produced</h4>
             <?php wp_dropdown_categories('show_option_none=Select year produced&include=7,8,9,10,11,12,13,14,15,16,17');??>
    
             <script type="text/javascript"><!--
                var dropdownYear = document.getElementById("cat");
                function onCatChangeYear() {
                   if ( dropdownYear.options[dropdownYear.selectedIndex].value > 0 ) {
                      location.href = "<?php echo get_option('home');
             ?>/?cat="+dropdownYear.options[dropdownYear.selectedIndex].value;
                   }
                }
                dropdownYear.onchange = onCatChangeYear;
             --></script>
          </div>
       
          <div class="sidebarItem">
             <h4>Identified/Unidentified</h4>
             <?php wp_dropdown_categories('show_option_none=Select status&include=22,23');??>
    
             <script type="text/javascript"><!--
                var dropdownStatus = document.getElementById("cat");
                function onCatChangeStatus() {
                   if ( dropdownStatus.options[dropdownStatus.selectedIndex].value > 0 ) {
                      location.href = "<?php echo get_option('home');
             ?>/?cat="+dropdownStatus.options[dropdownStatus.selectedIndex].value;
                   }
                }
                dropdownStatus.onchange = onCatChangeStatus;
             --></script>
          </div>
    Thread Starter Who_Dat

    (@who_dat)

    Daniel, I’ve already made a support request on your website.

    Thread Starter Who_Dat

    (@who_dat)

    Okay, that worked. I now have an XML file of the exported modals. Next question, then, is how do I get the file to you?

    Thread Starter Who_Dat

    (@who_dat)

    I don’t see any way of doing that. There is no export feature in Easy Modal (that I can see); and there hasn’t been anything imported yet into Popup Maker, so I can’t export from there.

    Thread Starter Who_Dat

    (@who_dat)

    Yes, here:

    Error console

    Thread Starter Who_Dat

    (@who_dat)

    Okay, I upgraded everything and the categories now work. The plugin is producing two maps.

    However, sometimes (seemingly randomly) the map itself will not load in Firefox. The pins display, but with no map behind them. Clicking on either zoom button makes the map load.

    Is there a reason why it’s not loading at first?

    Thread Starter Who_Dat

    (@who_dat)

    It doesn’t work fine in private mode; it still shows up on the wrong map. It just only shows up for logged-in users, which is how I would expect it to. In public mode, it shows up on the wrong map for everyone.

    One thing that I’ve learned is that end users will manage their content, but they will not upgrade anything. The version on this install is way out of date, and all the plugins are as well. I shudder to think what other problems might crop up if I upgrade everything, but it needs to be done so I’d better just bite the bullet. If that doesn’t fix the problem, I’ll get back to you.

    Thread Starter Who_Dat

    (@who_dat)

    I flushed the cache. Not using any caching plugin. The test store that I set up in category B still shows up on the map for category A. It doesn’t show up in private mode unless you’re logged in, but if it’s public it shows up.

    I neglected to point out that the version of the plugin is 2.0.4. Is it simply this that’s causing the problem?

    Thread Starter Who_Dat

    (@who_dat)

    Well damn. There’s an issue with the plugin, anyway. When I click “Create New Map” I get an alert that says “could not retrieve map settings.” The content under the “Settings” tab is the same as it was before the upgrade, and the blank map doesn’t show up.

    Thread Starter Who_Dat

    (@who_dat)

    I figured it out. The php code was copied from another usage where the anchor tag was irrelevant — it works fine, but not for this purpose. The anchor tag is outside the php, so the anchor tag was trying to call a variable that wasn’t defined yet (I guess…not being a programmer, I’m not sure if the terms are correct). Simply move it inside the php, and it works.

    From this:

    <a href="<?php echo $image['url']; ?>" class="dummy" rel="lightbox">
    <?php $image = get_field('sidebar_image'); if( !empty($image) ): ?>
    <img src="<?php echo $image['url']; ?>" alt="<?php echo $image['alt']; ?>" />
    <?php endif; ?></a>

    ..to this:

    <?php $image = get_field('sidebar_image'); if( !empty($image) ): ?>
    <a href="<?php echo $image['url']; ?>" class="dummy" rel="lightbox">
    <img src="<?php echo $image['url']; ?>" alt="<?php echo $image['alt']; ?>" />
    </a><?php endif; ?>
    Thread Starter Who_Dat

    (@who_dat)

    Okay, some progress.

    If I leave the anchor tag in its present generic state

    <a href="#" ...

    it won’t return anything at all, since it can’t tell the javascript what image to look for.

    If I use the same snippet of code that sends the proper source location to the image tag, and configure the template file’s anchor tag like so:

    <a href="<?php echo $image['url']; ?>" ...

    it doesn’t work; doing so returns this in the page source:

    <a href="" class="dummy" rel="lightbox"> <img src="https://the/proper/path.jpg" alt="" />

    I don’t know why it sends the right path to the image tag and sends nothing to the anchor tag.

    If I simply paste the actual image path into the template file, it works fine. So the problem is configuring the anchor tag to have the proper path to the image.

    You wrote above that using custom fields will work only if you add the rel attribute. I’ve done that; the problem is the path. How do other users get around this problem when they’re using images loaded via a custom field?

    Thread Starter Who_Dat

    (@who_dat)

    For the images in the page text, I simply used the standard “Add Media” link in the editor, but the “Link to” field was defaulting to “Custom URL” and I never noticed…that’s on me. It works if it’s got the proper image link.

    For the custom field (which shows up in a sidebar), I have this in the template file:

    <a href="#" class="dummy" rel="lightbox"><?php $image = get_field('sidebar_image'); ...

    This is because “lightbox” is the default selector. The code works fine to display the image on the page; but clicking on it doesn’t display the image in a lightbox. I get the overlay and the close icon, so SOMETHING is working, but the image never shows. In Safari I get a spinner that never stops; in Chrome and Firefox, no image and no spinner.

    This, by the way, is on a page, not a post. Does that make a difference?

    Thread Starter Who_Dat

    (@who_dat)

    I did. I added two photos, one embedded in the body of the page text and one added through a custom field. Clicking on either of them does nothing.

    Thread Starter Who_Dat

    (@who_dat)

    Thanks. I had a low-tech way of doing this:

    <?php
    $user_id = get_current_user_id();
    if ($user_id == 0) {
    	echo '<body>';
    } else {
    	echo '<body class="logged-in user_'.$user_id.'">';
    }
    ?>

    …and it works fine. It just doesn’t allow for other classes to be added that might be useful in their own right.

    [BTW…for some reason I didn’t get an email notification on this. Sorry to be so late acknowledging.]

Viewing 15 replies - 1 through 15 (of 51 total)