Scholar

  • 333
Scholar
 added a discussion 

Comments on timeline entries are accessible to anyone with access to the site by using the keyword search bar. Although the main timeline entry (post) is visible to 'friends only', the comments on the entry is visible to anyone. I believe comments on timeline entries should inherit the privacy from the main timeline entry (post).

  • 60
Scholar
 added a discussion 

Uploading a photo uses BxPhotosFormUpload class which is fine and we can adjust privacy of the photo through it. However, editing the photo uses BxPhotosFormEntry class which inherits from BxBaseModFilesFormUpload. Therefore, when editing the photo, the Visibility (allow_view_to) field shows privacy options for 'files' with 'Public' and 'Participants'. No options for 'Friends', 'Relations'.

  • 55
Scholar
 added a discussion 

How can I exclude 'Timeline' from keyword search results? Also, where can I change the layout of the keyword search results page?

  • 62
Scholar
 added a discussion 

I want to create language keys for labels, so that they can be displayed into different languages. I've added 2 columns to sys_labels table to include 'title' and 'system_title' .. and have created the language keys and added it to en.xml file. what else should I do?

  • 81
Scholar
 added a discussion 

I want users to be redirected to their 'Profile' page instead of going to 'Home Page' after Log in/ Sign in. Where should I set this up?

  • 108
Scholar
 added a discussion 

After adding  a new form field with 'title' and 'system title'. I created a new language key in the corresponding language file. For this new key to appear correctly I 'recompiled' the language files to reproduce the lang-en.xml file in the cache folder.

My notice from many posts here on the discussion, is that compileLanguage() function is faulty and the reproduced lang-en.xml file in the cache folder would be missing many keys, including the original UNA system keys for profile, privacy, membership levels and other.

LeonidS could you please explain the logic of the compileLanguage() function so that I can try to play with it to see wheather there might be a bug that makes lang-en.xml file not generated correctly!


here is the code from BxDolStudioLanguagesUtils.php:

    function compileLanguage($mixedLang = 0, $bForce = false)

    {

        $sType = 'all';

        if(!empty($mixedLang)) {

            if(is_string($mixedLang) && !is_numeric($mixedLang))

                $sType = 'all_by_name';

            else if(is_numeric($mixedLang) || is_int($mixedLang)) {

                $sType = 'all_by_id';

                $mixedLang = (int)$mixedLang;

            }

        }

 

        $aLanguages = array();

        $iLanguages = $this->oDb->getLanguagesBy(array('type' => $sType, 'value' => $mixedLang), $aLanguages);

 

        if($iLanguages == 0)

            return false;

 

        $oFile = BxDolFile::getInstance();

 

        $sNewLine = "\r\n";

        foreach($aLanguages as $aLanguage) {

            if(!$bForce && (int)$aLanguage['enabled'] != 1)

                continue;

 

            $aKeys = array();

            $this->oDb->getKeysBy(array('type' => 'by_language_id_key_key', 'value' => $aLanguage['id']), $aKeys);

 

            if($aLanguage['name'] != BX_DOL_LANGUAGE_DEFAULT && getParam('lang_subst_from_en') == 'on') {

                $aKeysAll = array();

                $this->oDb->getKeysBy(array('type' => 'by_language_name_key_key', 'value' => BX_DOL_LANGUAGE_DEFAULT), $aKeysAll);

 

                $aKeys = array_merge($aKeysAll, $aKeys);

            }

 

            $sLanguageFile = "lang-" . $aLanguage['name'] . ".php";

            $oFile->delete('cache/' . $sLanguageFile);

 

            $rHandle = fopen( BX_DIRECTORY_PATH_CACHE . $sLanguageFile, 'w');

            if($rHandle === false)

                return false;

 

            $sContent = "

            foreach($aKeys as $aKey) {

                list($sKey, $sString) = str_replace(array("\", "'"), array("\", "\'"), array($aKey['key'], $aKey['string']));

                $sContent .= "{$sNewLine}\t'$sKey' => '$sString',";

            }

 

            $sContent = trim($sContent, ',');

 

            if(fwrite($rHandle, $sContent."{$sNewLine});?>") === false)

                return false;

 

            if(fclose($rHandle) === false)

                return false;

 

            @chmod( BX_DIRECTORY_PATH_CACHE . "lang-{$aLanguage['name']}.php", 0666);

 

            if (function_exists('opcache_invalidate')) opcache_invalidate(BX_DIRECTORY_PATH_CACHE . "lang-{$aLanguage['name']}.php");

        }

 

        $this->init();

        BxDolCacheUtilities::getInstance()->clear('template');

 

        return true;

    }

 

  • 139
Scholar
 added a discussion 

My Nginx error log is showing the following error:

PHP Notice:  Array to string conversion in UNA/template/scripts/BxBaseFormView.php on line 1552PHP

  • 136
Scholar
 added a discussion 

I'm trying to add a second profile photo field but when I add a 'file/files'  field to the form, it does not store the file/image and does not appear in the database. Any idea how to do this?

  • 129
Scholar
 added a discussion 

I'm having the following database error report. it seems to be missing another INNER JOIN statment but haven't managed to sort it out.

Query:
SELECT `sys_profiles`.* FROM `sys_profiles` INNER JOIN `sys_acl_levels_members` AS `tlm` ON `sys_profiles`.`id`=`tlm`.`IDMember` WHERE 1 AND `tlm`.`IDLevel` IN (7,8) AND (`tlm`.`DateStarts` IS NULL OR `tlm`.`DateStarts` <= NOW()) AND (`tlm`.`DateExpires` IS NULL OR `tlm`.`DateExpires` > NOW()) AND `sys_accounts`.`email_confirmed` != 0

Mysql error:
Unknown column 'sys_accounts.email_confirmed' in 'where clause'

Location:
The error was found in getAll function in the file /var/www/html/main/inc/classes/BxDolAclQuery.php at line 444.

collation_connection:
utf8mb4_unicode_ci

  • 187
Achievements

Ninja

Total points: 322

128.1 point(s) to reach
Info
Friends count:
Full Name:
Scholar
Followers count:
Membership
Premium
My Discussions
  •  ·  60
Comments on timeline entries are accessible to anyone with access to the site by using the keyword s…
  •  ·  55
  •  · 
Uploading a photo uses BxPhotosFormUpload class which is fine and we can adjust privacy of the photo…
  •  · 
  •  · 
  •  · Hello Scholar !Sorry, but the Visibility option doesn't depend on the parent and child classes of up…
  •  ·  62
  •  · 
How can I exclude 'Timeline' from keyword search results? Also, where can I change the layout of the…
  •  · 
  •  · 
  •  · No, then you'd better redeclare the method getKeyTitlesPairs in the BxTemplSearch class of your temp…
  •  ·  81
  •  · 
I want to create language keys for labels, so that they can be displayed into different languages. I…
  •  · 
  •  · 
  •  · The labels list is taken by this method of BxDolLabel classpublic function getLabels($aParams = arra…
  •  ·  108
  •  · 
I want users to be redirected to their 'Profile' page instead of going to 'Home Page' after Log in/ …
  •  · 
  •  · 
  •  · Then try this variant:header('Location: ' . BX_DOL_URL_ROOT . BxDolPermalinks::getInstance()->per…
  •  ·  139
  •  · 
After adding  a new form field with 'title' and 'system title'. I created a new language key in the …
  •  · 
  •  · 
  •  · The following code:if(!BxDolStudioLanguagesUtils::getInstance()->updateLanguageStringById($iId, $…

UNA - Social Media Software Framework

Close