Limiting Styles.

PB MediaPB Media Registered Users Posts: 66 Big grins
Is there a hack to do that. I would like only, smugmug, all thumbs, and slideshow to be in the styles drop down menu.
my smugmug: PB media

Comments

  • PB MediaPB Media Registered Users Posts: 66 Big grins
    edited October 20, 2007
    Bump.
    my smugmug: PB media
  • rainforest1155rainforest1155 Registered Users Posts: 4,566 Major grins
    edited October 21, 2007
    This code is just a copy of the existing code and doesn't work fully as of now. Here you can remove the templates that you don't want to be available. The current template won't be shown properly as it will always display smugmug and thus making smugmug not available as a choice. Also you have to manually insert your gallery url, but this shouldn't be too complicated to figure out.

    I tried it in a gallery description. There's probably room to re-use the existing code without having to copy the whole code like this.
    <html>
    <*script type="text/javascript">
        function my_checkForAjaxGallery(formName) {
            if (YD.hasClass(document.body,'smugmug_ajax')) {
                goHere = convertAjaxURL();
                if (!goHere) {
                    goHere = location.href;
                }
                if (formName == 'color_chooser')
                    document.color_chooser.origin.value = goHere;
                if (formName == 'my_template_chooser')
                    document.my_template_chooser.origin.value = goHere;
            }
            if (formName == 'color_chooser')
                document.color_chooser.submit();
            if (formName == 'my_template_chooser')
                document.my_template_chooser.submit();
        }
    <*/********
    <form name="my_template_chooser" action="/homepage/templatechange.mg" method="post">
      <select name="TemplateID" onChange="my_checkForAjaxGallery('my_template_chooser');">
         <option value="3" selected="selected">smugmug</option>
         <option value="4">traditional</option>
         <option value="7">all thumbs</option>
         <option value="8">slideshow</option>
         <option value="9">journal</option>
         <option value="11">filmstrip</option>
         <option value="12">critique</option>
      </select>
      <input type="hidden" name="origin" value="http://rainforest1155.smugmug.com/gallery/12345" />
      <noscript><input type="submit" class="buttons" value="go" /></noscript>
    </form>
    </html>
    
    Sebastian
    SmugMug Support Hero
  • PB MediaPB Media Registered Users Posts: 66 Big grins
    edited November 3, 2007
    I tried that, and even removing thestyles on there and nothing happened... I should start learning javascript someday.

    How would I reuse the existing code?
    my smugmug: PB media
Sign In or Register to comment.