Skip to content Skip to sidebar Skip to footer

Bizarre Simplemodal Osx Actions In Foreach Loop

I am developing on a Wordpress MU website with a PHPBB3 forum that is merged into the site. On the website there is a page that utilizes SimpleModal OSX Style Modal Dialog that que

Solution 1:

The variable $ret does not seem to contain anything?

1- please use ULs around your LIs 2- please use classes instead of IDs

So, I am not very sure what you're trying to achieve with the random number, and I don't know what the overlayId and containerId should refer to, but this looks like a much better way of doing things:

<?php$ret = roster(); 

    if ( ! empty($ret))
    {
        foreach($retas$v)
        { ?><divclass="roster_container"><divclass="left_col"><divclass="first_left_col"><h4>Avatar</h4><?phpecho'<li><img src="' . $v['picture'] . '" alt="" /></li>';?></div><divclass="second_left_col"><h4>Username</h4><?phpecho'<li>' . $v['login'] . '</li>';?></div><divclass="third_left_col"><h4>Rank</h4><?phpecho'<li>' . $v['rank'] . '</li>';?></div></div><divclass="right_col"><divclass="first_right_col"><h4>Toons</h4><ul><li><divclass='osx-modal'><?php$n = rand(10e16, 10e20);
                                      $x = base_convert($n, 10, 36);
                                  ?><inputtype="button"name="osx"value="View"class="osx"class="osx"/></div><divclass="osx-modal-content"style="display:none;"><divclass="close"><ahref="#"class="simplemodal-close">x</a></div><divclass="osx-modal-data"><divclass="toon_title">Game Characters</div><divclass="toon_game"><?phpecho'<h3>' . $v['game'] . '</h3>';?></div><divclass="toon_box"><divclass="toon_name"><?phpecho$v['toon_name'];?></div><divclass="toon_avatar"><?phpecho'<img src="' . $v['avatar'] . '" alt="" />';?></div><divclass="toon_faction"><?phpecho$v['faction'];?></div><divclass="toon_class"><?phpecho$v['class'];?></div><divclass="toon_role"><?phpecho$v['role'];?></div></div><p><buttonclass="simplemodal-close">Close</button></p></div></div></li></ul></div><divclass="second_right_col"><h4>Challenge</h4><ul><?phpecho'<li><a href="#" class="CHALLENGE">Challenge</a></li>';?></ul></div><divclass="third_right_col"><h4>Email</h4><ul><?phpecho'<li><a href="mailto:' . $v['email'] . '"><img src="http://conspirators.websitedesignbyneo.com/wp-content/themes/conspirators/css/dark-red/img/email-icon.gif" style="height:15px;width:20px;margin-top:5px;margin-left:7px;"></a></li>';?></ul></div></div></div><?php
        }
    }
    ?><script>jQuery(function ($) {
  varOSX = {
      container: null,
      init: function () {
              $("[name=osx]").click(function (e) {
                e.preventDefault(); 
                $(this).parent().next().modal({
                    overlayId: 'osx-overlay',
                    containerId: 'osx-container',
                    closeHTML: null,
                    minHeight: 80,
                    opacity: 65, 
                    position: ['0',],
                    overlayClose: true,
                    onOpen: OSX.open,
                    onClose: OSX.close
                });
            });
      },
      open: function (d) {
          var self = this;
</script>

Post a Comment for "Bizarre Simplemodal Osx Actions In Foreach Loop"