The following warnings occurred:
Warning [2] Undefined array key "threadviews_countguests" - Line: 745 - File: showthread.php PHP 8.1.31 (Linux)
File Line Function
/inc/class_error.php 153 errorHandler->error
/showthread.php 745 errorHandler->error_callback
Warning [2] Undefined array key "allowautourl" - Line: 584 - File: inc/class_parser.php PHP 8.1.31 (Linux)
File Line Function
/inc/class_error.php 153 errorHandler->error
/inc/class_parser.php 584 errorHandler->error_callback
/inc/class_parser.php 228 postParser->parse_mycode
/inc/functions_post.php 830 postParser->parse_message
/showthread.php 1121 build_postbit
Warning [2] Undefined array key "allowautourl" - Line: 584 - File: inc/class_parser.php PHP 8.1.31 (Linux)
File Line Function
/inc/class_error.php 153 errorHandler->error
/inc/class_parser.php 584 errorHandler->error_callback
/inc/class_parser.php 228 postParser->parse_mycode
/inc/functions_post.php 830 postParser->parse_message
/showthread.php 1121 build_postbit
Warning [2] Undefined array key "allowautourl" - Line: 584 - File: inc/class_parser.php PHP 8.1.31 (Linux)
File Line Function
/inc/class_error.php 153 errorHandler->error
/inc/class_parser.php 584 errorHandler->error_callback
/inc/class_parser.php 228 postParser->parse_mycode
/inc/functions_post.php 830 postParser->parse_message
/showthread.php 1121 build_postbit
Warning [2] Undefined array key "allowautourl" - Line: 584 - File: inc/class_parser.php PHP 8.1.31 (Linux)
File Line Function
/inc/class_error.php 153 errorHandler->error
/inc/class_parser.php 584 errorHandler->error_callback
/inc/class_parser.php 228 postParser->parse_mycode
/inc/functions_post.php 830 postParser->parse_message
/showthread.php 1121 build_postbit
Warning [2] Undefined array key "allowautourl" - Line: 584 - File: inc/class_parser.php PHP 8.1.31 (Linux)
File Line Function
/inc/class_error.php 153 errorHandler->error
/inc/class_parser.php 584 errorHandler->error_callback
/inc/class_parser.php 228 postParser->parse_mycode
/inc/functions_post.php 861 postParser->parse_message
/showthread.php 1121 build_postbit
Warning [2] Undefined property: MyLanguage::$thread_modes - Line: 46 - File: showthread.php(1650) : eval()'d code PHP 8.1.31 (Linux)
File Line Function
/inc/class_error.php 153 errorHandler->error
/showthread.php(1650) : eval()'d code 46 errorHandler->error_callback
/showthread.php 1650 eval




Thread Rating:
  • 0 Vote(s) - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
QUESTION Need to remove ?lang= from i18 search url
#1
I'm using the i18n search and have looked for a setting to hide the '?lang=en' within the url.

I can't seem to find anything.
I'm using fancy urls setting from the backend too and just wanted the page name not the '?lang=en'

any ideas please
Reply
#2
(2019-12-11, 20:06:24)craiga Wrote: I'm using the i18n search and have looked for a setting to hide the '?lang=en' within the url.

I can't seem to find anything.
I'm using fancy urls setting from the backend too and just wanted the page name not the '?lang=en'

any ideas please

Try this:

Admin -> settings -> Custom Permalink Structure:


Code:
%nondefaultlanguage%/%parent%/%slug%/


If you have one language - update .htaccess:

RewriteCond %{REQUEST_FILENAME} !-f
RewriteCond %{REQUEST_FILENAME} !-d
RewriteRule ^(.*?/)?([A-Za-z0-9-]+)/?$ index.php?id=$2&lang=en [QSA,L]

Red font - your language code.
Reply
#3
(2019-12-11, 21:00:51)smdp-1971 Wrote:
(2019-12-11, 20:06:24)craiga Wrote: I'm using the i18n search and have looked for a setting to hide the '?lang=en' within the url.

I can't seem to find anything.
I'm using fancy urls setting from the backend too and just wanted the page name not the '?lang=en'

any ideas please

Try this:

Admin -> settings -> Custom Permalink Structure:


Code:
%nondefaultlanguage%/%parent%/%slug%/


If you have one language - update .htaccess:

RewriteCond %{REQUEST_FILENAME} !-f
RewriteCond %{REQUEST_FILENAME} !-d
RewriteRule ^(.*?/)?([A-Za-z0-9-]+)/?$ index.php?id=$2&lang=en [QSA,L]

Red font - your language code.

Thanks smdp-1971

Will take a look. 
I also managed to do a javascript solution too
Reply
#4
Add the following line to the gscotfig.php file
Code:
define('I18N_SINGLE_LANGUAGE', true);
Reply




Users browsing this thread: 2 Guest(s)