Jump to content

(Design) Disable "choose language" if there is only one language installed


Bryan Sammers

Recommended Posts

You can easily hide the drop down from the template by hiding the following towards the foot of the globaltemplate

<form action="{parse url="{$this->settings['query_string_formatted']}" base="public"}" method="post" class='left'>

					<fieldset>

						<input type='hidden' name='k' value='{$this->member->form_hash}' />

						<input type='hidden' name='setlanguage' value='1' />

						<input type="hidden" name="langurlbits" value="{$this->settings['query_string_safe']}&amp;cal_id={$this->request['cal_id']}" />

						<label for='newLang' class='hide'>{$this->lang->words['language_prefix']}</label>

						<select name="langid" id='newLang'>

								{$footer_items['lang_chooser']}

						</select>

						<input type='submit' class='input_submit alt' value='{$this->lang->words['jmp_go']}' id='newLangSubmit' />

					</fieldset>

				</form>


Link to comment
Share on other sites

I did this in one of my skins--it will be hidden unless there's actually more than one option available. I'll go grab the code.

I agree that it should be in IPB by default, though.



				<if test="count(explode('value',$footer_items['lang_chooser'])) > 2">

					<form action="{parse url="{$this->settings['query_string_formatted']}" base="public"}" method="post" class='left'>

						<fieldset>

							<input type='hidden' name='k' value='{$this->member->form_hash}' />

							<input type='hidden' name='setlanguage' value='1' />

							<input type="hidden" name="langurlbits" value="{$this->settings['query_string_safe']}&amp;cal_id={$this->request['cal_id']}" />

							<label for='newLang' class='hide'>{$this->lang->words['language_prefix']}</label>

							<select name="langid" id='newLang'>

									{$footer_items['lang_chooser']}

							</select>

							<input type='submit' class='input_submit alt' value='{$this->lang->words['jmp_go']}' id='newLangSubmit' />

						</fieldset>

					</form>

				</if>

Link to comment
Share on other sites

  • 10 months later...

We copied a language by mistake. We can't even delete them, let alone hide them. I'd like to also suggest that there be an option added to ipb which allows us to hide all or some of the languages. Also, the only language that should be protected from deletion is the default language that comes with IPB.

Link to comment
Share on other sites

Archived

This topic is now archived and is closed to further replies.

  • Recently Browsing   0 members

    • No registered users viewing this page.
×
×
  • Create New...