EzPortal - Portal Software for Forums

EzPortal - Made to Fit Your SMF Forum - Glad You Found Us!
+- +-

UserBox

Welcome, Guest.
Please login or register.
 
 
 
Forgot your password?

+- Recent Posts

New built in translations for six langauges! by EzPortal
March 26, 2024, 11:15:32 pm

Smiley missing in shoutbox 2.1.4 by hustreamload
July 26, 2023, 08:14:02 am

Re: Theme Select Box question? by Shades
March 15, 2023, 06:49:49 pm

Re: Theme Select Box question? by Shades
March 09, 2023, 02:09:24 pm

Re: Theme Select Box question? by Shades
March 09, 2023, 01:55:53 pm

Re: Theme Select Box question? by EzPortal
March 09, 2023, 01:47:42 pm

Re: Theme Select Box question? by Shades
March 09, 2023, 01:34:07 pm

Re: Theme Select Box question? by EzPortal
March 09, 2023, 12:20:17 pm

+- HTML Menu


Sample HTML Block Usage - You May Custom Code it, as needed!

Recent Topics ezBlock

New built in translations for six langauges! by EzPortal
March 26, 2024, 11:15:32 pm

Smiley missing in shoutbox 2.1.4 by hustreamload
July 26, 2023, 08:14:02 am

Theme Select Box question? by Shades
March 15, 2023, 06:49:49 pm

Where is the facebook button color? by EzPortal
February 28, 2023, 06:45:09 pm

Display on Mobile - SMF 2.1.3 and EZ 5.5.2 by BugginIn
December 29, 2022, 04:07:13 pm

Blocks Help by Riggs1973
November 20, 2022, 12:59:30 pm

Surface ol lite theme release Free! by Steffen K.
November 18, 2022, 03:57:24 am

Undefined index: href by EzPortal
October 04, 2022, 08:49:59 pm

SMF-ezportal_column_5.cache): failed to open stream: No such file or directory by EzPortal
June 04, 2022, 11:40:13 am

Arcade block error: failed to open stream: No such file or directory by Shades
May 20, 2022, 02:47:13 pm

Author Topic: EzBlock on language setting  (Read 12024 times)

0 Members and 1 Guest are viewing this topic.

Offline DenDen66

  • Newbie
  • *
  • Posts: 46
  • Karma: 0
EzBlock on language setting
« on: April 14, 2016, 07:44:15 am »
I have one forum that is trilangual.

I want some blocks to appear on the basis of the language that is presently used by SMF.

IF the language is French, then block A will appear., if it is English, then block B will appear and finally if is Spanish then Block C will appear.

Now I understand that it could also be the same block showing different part of its content depending on the language of SMF.

Is this possible? As anyone ever done this before?

Offline EzPortal

  • Administrator
  • *****
  • Posts: 1299
  • Karma: 67
Re: EzBlock on language setting
« Reply #1 on: April 14, 2016, 09:07:13 am »
Not currently possible
Like ezPortal? Support me at https://www.patreon.com/vbgamer45/

Offline DenDen66

  • Newbie
  • *
  • Posts: 46
  • Karma: 0
Re: EzBlock on language setting
« Reply #2 on: April 14, 2016, 08:22:31 pm »
What would it take?

Offline EzPortal

  • Administrator
  • *****
  • Posts: 1299
  • Karma: 67
Re: EzBlock on language setting
« Reply #3 on: April 15, 2016, 10:52:51 am »
A good amount of coding if I were to add this as an option to ezportal. You can probably write a custom php script that checks the user language that optouts the current block content based on the users language.
Like ezPortal? Support me at https://www.patreon.com/vbgamer45/

Offline DenDen66

  • Newbie
  • *
  • Posts: 46
  • Karma: 0
Re: EzBlock on language setting
« Reply #4 on: April 15, 2016, 08:40:51 pm »
You can probably write a custom php script that checks the user language that optouts the current block content based on the users language.

That is what I was trying to express earlier on, when I asked if it was possible. I was thinking of creating a php block.

How would I do this? Would I need three different PHP block or just one.

Offline EzPortal

  • Administrator
  • *****
  • Posts: 1299
  • Karma: 67
Re: EzBlock on language setting
« Reply #5 on: April 15, 2016, 09:53:34 pm »
Just one block use $user_info['language']
Like ezPortal? Support me at https://www.patreon.com/vbgamer45/

Offline DenDen66

  • Newbie
  • *
  • Posts: 46
  • Karma: 0
Re: EzBlock on language setting
« Reply #6 on: April 16, 2016, 05:27:42 am »
Thank you. I will try this.


Offline Antes

  • EzPortal Supporter
  • *****
  • Posts: 23
  • Karma: 0
Re: EzBlock on language setting
« Reply #7 on: April 17, 2016, 12:46:55 pm »
Not currently possible

Curious, can't you put php inside block ? say like $txt['side_block_language'] then define it inside index.<language>.php that'll change its content for every different language?

Offline DenDen66

  • Newbie
  • *
  • Posts: 46
  • Karma: 0
Re: EzBlock on language setting
« Reply #8 on: June 30, 2016, 10:16:04 am »
This is how the problem was solved:

if(isset($_POST['language']) && $_POST['language'] == 'french-utf8' || $_SESSION['language'] == 'french-utf8'){
echo '
';
}
elseif($_POST['language'] == 'spanish_es-utf8' || $_SESSION['language'] == 'spanish_es-utf8')
{
echo '
}
else
{
echo '
';
        }

Offline EzPortal

  • Administrator
  • *****
  • Posts: 1299
  • Karma: 67
Re: EzBlock on language setting
« Reply #9 on: June 30, 2016, 11:30:54 am »
Good tip!
Like ezPortal? Support me at https://www.patreon.com/vbgamer45/

 

Related Topics

  Subject / Started by Replies Last post
1 Replies
9475 Views
Last post May 23, 2010, 07:03:44 am
by EzPortal
0 Replies
4288 Views
Last post September 18, 2011, 06:29:17 am
by Branko
12 Replies
13406 Views
Last post June 02, 2012, 01:53:20 am
by Tony_R
1 Replies
5962 Views
Last post February 27, 2013, 04:53:16 pm
by EzPortal
2 Replies
8375 Views
Last post August 31, 2014, 12:53:38 pm
by Maxx

+-SMF Gallery

Quick Menu


Powered by EzPortal