Important: This page is using cookies (cookies). Using this website without turning off cookies in browser, means that you agree for using it.
Buy Now! Features Downloads

Earn with us!

If you would like to start earning money with vBET join to Affiliate Program.
Results 1 to 7 of 7

Thread: Only links in navbar (homepahe and forum) links are only English related

  1. #1
    Senior Member
    Join Date
    Jun 2010
    Posts
    276

    Default Only links in navbar (homepahe and forum) links are only English related

    I have an issue with the home (allfreechips) and fourm buttons on my navbar, these are not getting the site.com/lang/ added. All other links appear to work as expected with the /lang/ sections.

    Thanks
    Chris

  2. #2
    Banned
    Join Date
    Aug 2012
    Posts
    481

    Default

    Quick fix for this issue:
    • Open file includes/vbenterprisetranslator_functions.php
    • Find code:
      PHP Code:
      $output preg_replace_callback('#action="([^"]*)#s''vbet_createURLForAddressNoReplaceAction'$output);
      $output preg_replace_callback('#href="([^"]*)#s''vbet_createURLForAddressNoReplaceHref'$output); 
    • Replace it to code:
      PHP Code:
      $output preg_replace_callback('#action=["\']([^"\']*)["\']#s''vbet_createURLForAddressNoReplaceAction'$output);
      $output preg_replace_callback('#href=["\']([^"\']*)["\']#s''vbet_createURLForAddressNoReplaceHref'$output); 
    • Find code:
      PHP Code:
      function vbet_createURLForAddressNoReplaceAction($what) {
      return 
      'action="'.vbet_createURLForAddressNoReplace($_REQUEST['language'], $what[1]);
      }
      function 
      vbet_createURLForAddressNoReplaceHref($what) {
      return 
      'href="'.vbet_createURLForAddressNoReplace($_REQUEST['language'], $what[1]);

    • Replace it to code:
      PHP Code:
      function vbet_createURLForAddressNoReplaceAction($what) {
      return 
      'action="'.vbet_createURLForAddressNoReplace($_REQUEST['language'], $what[1]).'"';
      }
      function 
      vbet_createURLForAddressNoReplaceHref($what) {
      return 
      'href="'.vbet_createURLForAddressNoReplace($_REQUEST['language'], $what[1]).'"';


    This issue will be fixed in the next release.

  3. #3
    Senior Member
    Join Date
    Jun 2010
    Posts
    276

    Default

    Text on the first section was a bit off, but replacing this is correcting the issue.

    Code:
    $output = preg_replace_callback('#action="([^"]*)#', 'vbet_createURLForAddressNoReplaceAction', $output);
    $output = preg_replace_callback('#href="([^"]*)#', 'vbet_createURLForAddressNoReplaceHref', $output);

  4. #4
    Senior Member
    Join Date
    Jun 2010
    Posts
    276

    Default

    Not sure if this is caused by the change or somthing I have not noticed

    if I am on a review page such as

    Code:
    http://www.allfreechips.com/no/casino_review/646/loco-panda-casino.html
    the links to other languages are incorrect.

    Code:
    http://www.allfreechips.com/phpBB2/no/nl/casino_review/646/loco-panda-casino.html
    See for dutch it is adding phpBB2/ and /nl and keeping the no
    This is way off of course adding the forum path and another lang

  5. #5
    Banned
    Join Date
    Aug 2012
    Posts
    481

    Default

    This is another issue that occurred after correcting a previous issue.
    Quick fix for this issue:
    • Open file includes/vbenterprisetranslator_functions_url_tracking.php
    • Find code:
      PHP Code:
      if ($vbulletin->options['vbenterprisetranslator_translationlinkstype']) {
      return 
      vbet_createURLForAddressNoReplaceSEO($language$address) ;
      }
      $bookmark strpos($address'#'); 
    • Replace it to code:
      PHP Code:
      if ($vbulletin->options['vbenterprisetranslator_translationlinkstype']) {
      if (
      preg_match('/\/('.VBET_LANGUAGESMATCH.')\//'$address)) {
      return 
      $address;
      }
      return 
      vbet_createURLForAddressNoReplaceSEO($language$address) ;
      }
      $bookmark strpos($address'#'); 

    This issue will be fixed in the next release. Sorry for the confusion.
    Last edited by Marcin Kalak; 24-07-15 at 16:06.

  6. #6
    Senior Member
    Join Date
    Jun 2010
    Posts
    276

    Default

    Corrected, thanks

  7. #7
    Banned
    Join Date
    Aug 2012
    Posts
    481

    Default

    I'm glad I could help you.

Tags for this Thread

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •