View Full Version : Limiting Styles.
PB Media
Sep-29-2007, 12:05 PM
Is there a hack to do that. I would like only, smugmug, all thumbs, and slideshow to be in the styles drop down menu.
PB Media
Oct-20-2007, 01:43 AM
Bump.
rainforest1155
Oct-21-2007, 02:58 AM
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>
PB Media
Nov-03-2007, 12:50 PM
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?
vBulletin® v3.8.5, Copyright ©2000-2012, Jelsoft Enterprises Ltd.