Jump to content

Languages Flags on Board Top


Recommended Posts

  • 1 month later...

Recently I migrated on new hosting where the Suite with installed plugin v1.0.1 gave HTTP 500 error.

When I tried to reinstall the plugin installation failed every time with the error: 'Sorry, you do not have permission for that! 1S111/1'. A permissions for newly created files and folders were 644 & 777 respectively, they were correct. Previous version 1.0.0 installed just fine.

I made some research with Get Ready For IPS script and found the cause. It was in suhosting PHP extension values below then recommended ones. Here they are:

suhosin.post.max_vars >= 4096
suhosin.request.max_vars >= 4096
suhosin.get.max_value_length >= 2000
suhosin.post.max_value_length >= 10000
suhosin.request.max_value_length >= 10000
suhosin.request.max_varname_length >= 350

After adjusting mentioned settings plugin was successfully installed and run :thumbsup:

Edited by Safety1st
Link to comment
  • 1 month later...
  • 4 months later...
  • 1 year later...

Hi, 

this plugin has worked well for me, until I decided to move forum to https

Everything moved well, except there are four items that IPS support identified as related to this plugin that has hard link to http still.

 

Mixed Content: The page was loaded over HTTPS, but requested an insecure image 'http://sitename/uploads/set_resources_1/84c1e40ea0e759e3f1505eb1788ddf3c_flags16.png'. This content should also be served over HTTPS.

Mixed Content: The page at 'sitename' was loaded over HTTPS, but requested an insecure image 'http://sitename/uploads/set_resources_1/d0e70b4cbb9ab8afb1bc1065a3f8487a_subitem_stem.png'.

also

/uploads/set_resources_1/d0e70b4cbb9ab8afb1bc1065a3f8487a_subitem_stem@2x.png

/uploads/set_resources_1/84c1e40ea0e759e3f1505eb1788ddf3c_flags32.png'

Link to comment

It happens that the plugin hasn't any HTTP hardcoded in the template. It uses the IPS functions and CSS to display flags.

Template:

				<ul class='ipsList_inline'>
					{{foreach $languages as $id => $lang }}
						<li>
							{{$url = \IPS\Http\Url::internal( 'app=core&module=system&controller=language&id='.$id, 'front' )->csrf();}}
							<a data-ipsTooltip data-ipsTooltip-label=" {$lang->title}" href='{$url}'><i class='{$lang->get__icon()}'></i></a>
						</li>
					{{endforeach}}
				</ul>

Function:

	/**
	 * Get Icon
	 *
	 * @return	string
	 * @note	Works on Unix systems. Partial support for Windows systems.
	 */
	public function get__icon()
	{
		return "ipsFlag ipsFlag-{$this->getCountry()}";
	}

CSS (which is default from IPS):

/* Normal */

.ipsFlag {
	width: 16px;
	height: 16px;
	background: url("{resource="flags16.png" app="core" location="global"}") no-repeat;
	display: inline-block;
	vertical-align:text-top;
	line-height:16px;
}

.ipsFlag.ipsFlag-ad{background-position:0 -352px;}
.ipsFlag.ipsFlag-ae{background-position:0 -368px;}
.ipsFlag.ipsFlag-af{background-position:0 -384px;}
...
...
...

That's all. No HTTP or HTTP anywhere.

Link to comment
  • 9 months later...
  • 2 weeks later...
  • 1 year later...
  • 2 years later...
  • 2 weeks later...
  • Recently Browsing   0 members

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