Current Version

ONLY update to the current version if the last version you have installed is v1.2!!!

If you try to skip versions YOU WILL BREAK YOUR INSTALL!!! If you are updating from an older version YOU MUST go down this document to the PREVIOUS VERSIONS section and install each version update incrementaly, starting from the last version you have installed, until you reach the current version.

**

1.3a supplement

Elengine and Xngine Theme Files

If have already updated to version 1.3, but not 1.3a, using EZ-Install method :

  • On your local machine, got to the folder ../YND_update/1.3a/YND_theme-files

  • UPLOAD the file page.php to {{YOUR_DOMAIN}}/public_html/

  • Then, on your local machine, go to the folder ..YND_update/1.3a/YND_theme-files/

  • COPY the ENTIRE 'CONTENT' folder in this directory to {{YOUR_DOMAIN}}/public_html/ on your server. ALLOW FILE OVERWRITE!

  • Go into EACH INDIVIDUAL theme folder's (i.e : default, xngine, elengine) 'templates_compiled' folder and delete all files.

  • Clean your browser cache of all files and cookies.

If you have used the MANUAL INSTALL method, folow the instructions for 'Edit Theme Files' in update (v.1.2 to 1.3) below.

Update (v.1.2 to 1.3)

EZ Update

ONLY USE EZ Update if you have not installed any additional plugins since you installed this one, or had any custom work done that may be damaged by overwriting files. IT IS YOUR RESPONSIBILITY to know if this may occur. If the above conditions exist, or you aren't sure, SCROLL DOWN to the MANUAL UPDDATE portion of this page.

Upload Files

First :

  • UNZIP the downloaded install package on your local machine.

  • UNZIP YND_Panel-upload from within that package to your local machine.

  • Go to the folder YND_update/1.3

  • With your FTP client, upload the ENTIRE YND_panel folder to your Sngine root folder (usually Public_html) ALLOW FILE OVERWRITE!.

Next :

  • On your local machine, got to the folder ../YND_update/1.3/YND_theme-files

  • UPLOAD the file page.php to {{YOUR_DOMAIN}}/public_html/

  • Then, on your local machine, go to the folder ..YND\update/1.3/YND_theme-files/content/themes/default/templates

  • COPY ALL THE FILES in this folder to {{YOUR_DOMAIN}}/public_html/content/themes/default/templates_ on your server. ALLOW FILE OVERWRITE!

CONGATULATIONS! If you have followed all directions to this point, and have not seen any error messages, the core of PageFeeds Pro w/ SocialSync has been succesfully updated to version 1.3!

Manual Update

Upload Files

  • UNZIP the downloaded install package on your local machine.

  • UNZIP YND\Panel-upload from within that package to your local machine.

  • Go to the folder YND_update/1.3

  • With your FTP client, upload the ENTIRE YND_panel folder to your Sngine root folder (usually Public_html) ALLOW FILE OVERWRITE!.

Edit Theme Files

Updated for 1.3a only change is the additional theme support

  • On your local machine, got to the folder ../YND_update/1.3a/YND_theme-files

Copy the following files FROM this folder:

  • YND_feeds_panel.tpl
  • YND_css.tpl
  • YND_js.tpl

TO:

Destination : ** ((YOUR_ROOT_FOLDER))\content\themes(((THEME_NAME)))\templates** on your server.

The 3 files mentioned above must be copied to ALL of the themes you may be using... default, elengine, and xngine for the plugin to work.

Now it's time to fire up your prefered code editor and log into your server.

MAKE SURE YOU HAVE BACKUPS OF THE FOLLOWING FILES :

  • {{YOUR_ROOT_FOLDER}}/page.php
  • {{YOUR_ROOT_FOLDER}}/content/themes/(((theme_name)))/templates/page.tpl
  • {{YOUR_ROOT_FOLDER}}/content/themes/(((theme_name)))/templates/_user_menu.tpl

YOU WILL NEED TO REPEAT THIS PROCESS FOR EACH THEME YOU OR USING FOR THE PLUGIN TO WORK!!!*

page.php

With your code editor, open the file :

{{YOUR_ROOT_FOLDER}}/page.php

Search/find the code listed below :

                  case 'delete':
                  /* check if the viewer not the super admin */
                  if ($user->_data['user_id'] != $spage['page_admin']) {
                    _error(404);
                  }
                  break;

After this code block, add the following lines:

                  //YND FEEDS PLUGUN
                   case 'feed':
                    if(intval(get_ynd_settings('admins_only')) == 1 && $user->_data['user_group'] != 1){
                     _error(404);
                    }
                    break;
                    //YND FEEDS PLUGUN

it should now look something like this :

casefeed

Within the same file, serch/find the following line :

// assign variables

and Insert the following functions before it:

//YND FEEDS FUNCTIONS
            $smarty->registerPlugin('function', 'y_feeds_langs' , 'y_feeds_langs');
            function get_ynd_settings($key) {
              global $db;
              $query = $db->query("SELECT setting_value FROM feed_settings WHERE setting_key = '$key'");
              $result = $query->fetch_assoc();
              if ($result) {
                  return $result['setting_value'];
              } else {
                  return null;
              }
            }
            function y_feeds_langs($params){
                $lang_key = $params['lang_key'];
                $lang = $params['lang'];
                $langs = file_get_contents(__DIR__.'/YND_panel/functions/lang.json');
                $data = json_decode($langs, true);
                if ($data === null) {return "Error decoding JSON: " . json_last_error_msg();}
                foreach ($data as $key) {
                    if (isset($key['lang_key']) && $key['lang_key'] == $lang_key) {
                        return isset($key[$lang]) ? $key[$lang] : "Translation not found for language: $lang";
                    }
                }
                return "Translation not found for key: $lang_key";
            }
            $facebook_enabled = intval(get_ynd_settings('facebook_enaled'));
            $youtube_enabled = intval(get_ynd_settings('youtube_enabled'));
            $admins_only = intval(get_ynd_settings('admins_only'));
            $user_lang = $user->_data['user_language'];
            $smarty->assign('user_lang', $user_lang);
            $smarty->assign('facebook_enabled', $facebook_enabled);
            $smarty->assign('youtube_enabled', $youtube_enabled);
            $smarty->assign('admins_only', $admins_only);
            //END OF YND FEEDS FUNCTIONS

It should now look like this :

feedfunc2

SAVE THE FILE TO YOUR SERVER

page.tpl

YOU MUST REPEAT THIS FOR ALL OF THE THEMES YOU ARE USING

Now, with your code editor, navigate to and open the file at :

{{YOUR_ROOT_FOLDER}}/content/themes/(((theme_name)))/templates/page.tpl

Search/find the code listed below : `

{include file='_header.tpl'}`

and add this line after it :

            <!-- YND FEEDS -->
            {include file='YND_css.tpl'}
            <!-- YND FEEDS -->

It should now look like this :

css2

Within the same file, serch/find the following line.

{if $sub_view == "delete"}

admin1

Add the code listed below, after the boxed {/if} tag indicated in the above image :

  <!-- YND FEEDS -->
            {if $user->_data['user_id'] == $spage['page_admin']}
                  {if $admins_only != 1 || $user->_data['user_group'] == 1 }
                  <li {if $sub_view == "feed"}class="active" {/if}>
                    <a href="{$system['system_url']}/pages/{$spage['page_name']}/settings/feed">
                      {include file='__svg_icons.tpl' icon="newsfeed" class="main-icon mr10" width="24px" height="24px"}
                      {__("News Feed")}
                    </a>
                  </li>
                  {/if}
            {/if}
   <!-- YND FEEDS -->

It should now look like this :

admin2

In the same file, serch/find :

 {elseif $sub_view == "delete"}

elseiffeed1

Add the code below before the {/if} tag in the above image :

 <!-- YND FEEDS -->
            {elseif $sub_view == "feed" }
               {if $admins_only != 1 || $user->_data['user_group'] == 1 }
                    {include file='YND_feeds_panel.tpl'}
               {/if}
            <!-- YND FEEDS -->

It should now look like this :

elseiffeed2

Now, croll down to the very end of the SAME file and add this line of code:

{include file='YND_js.tpl'}

it should now look like this :

eof

SAVE THE FILE TO YOUR SERVER

user_menu.tpl

YOU MUST REPEAT THIS FOR ALL OF THE THEMES YOU ARE USING

With your code editor, open the file :

{{YOUR_ROOT_FOLDER}}/content/themes/(((theme_name)))/templates/_user_menu.tpl

Search/find the code listed below :

{if $user->_is_admin}

Paste the code listed below under the </a> closing tag:

<a class="dropdown-item" href="{$system['system_url']}/YND_panel"> {include file='__svg_icons.tpl' icon="admin_panel" class="main-icon mr10" width="20px" height="20px"} YND plugin panel </a>

Like the image bellow :

eof

Delete compiled templates

YOU MUST REPEAT THIS FOR ALL OF THE THEMES YOU ARE USING

Delete or rename this folder : *((YOUR_ROOT_FOLDER))\content\themes(((theme_name)))\templates_compiled

CONGATULATIONS! If you have followed all directions to this point, and have not seen any error messages, the core of PageFeeds Pro w/ SocialSync has been succesfully updated to version 1.3!

be sure to clear your bwoser cache of all files and cookies!

Previous Versions

Update to (v.1.0 to 1.1)

This guide is only for customers who have already previously purchased and installed this plugin.

IF YOU ARE INSTALLING FOR THE FIRST TIME DO NOT PROCEED WITH THESE INSTRUCTIONS!!!

EZ Update

ONLY USE EZ Update if you have not installed any additional plugins since you installed this one, or had any custom work done that may be damaged by overwriting files. IT IS YOUR RESPONSIBILITY to know if this may occur. If the above conditions exist, or you aren't sure, SCROLL DOWN to the MANUAL UPDDATE portion of this page.

Upload Files

First :

  • UNZIP the downloaded install package on your local machine.

  • UNZIP YND_Panel-upload from within that package to your local machine.

  • Go to the folder YND_update/1.1

  • With your FTP client, upload the ENTIRE YND_panel folder to your Sngine root folder (usually Public_html) ALLOW FILE OVERWRITE!.

Next :

  • On your local machine, got to the folder _../YND_update/1.1/YND_theme-files

  • UPLOAD the file page.php to _{{YOUR_DOMAIN}}/public_html

  • Then, on your local machine, go to the folder ../YND_update/1.1/YND_theme-files/content/themes/default/templates

  • COPY ALL THE FILES in this folder to {{YOUR_DOMAIN}}/public_html/content/themes/default/templates on your server. ALLOW FILE OVERWRITE!

Update Database

MAKE SURE YOU ARE LOGGED IN TO YOUR Sngine SYSTEM WITH AN ADMIN LEVEL ACCOUNT!!!

  • Open your browser and navigate to _https://{{YOUR_DOMAIN}}/YND_panel/update.php

  • The updater will run and your databsase will be updated!

CONGATULATIONS! If you have followed all directions to this point, and have not seen any error messages, the core of PageFeeds Pro w/ SocialSync has been succesfully updated to version 1.1!

Manual Update

Upload Files

  • UNZIP the downloaded install package on your local machine.

  • UNZIP _YND_Panel-upload from within that package to your local machine.

  • Go to the folder YND_update/1.1

  • With your FTP client, upload the ENTIRE YND_panel folder to your Sngine root folder (usually Public_html) ALLOW FILE OVERWRITE!.

Next :

  • On your local machine, got to the folder _../YND_update/1.1/YND_theme-files

Copy the following files FROM this folder:

  • YND_feed_panel.tpl
  • YND_css.tpl
  • YND_js.tpl

TO:

Destination : *((YOUR_ROOT_FOLDER))\content\themes\default\templates* on your server.

Edit Theme Files

Now it's time to fire up your prefered code editor and log into your server.

MAKE SURE YOU HAVE BACKUPS OF THE FOLLOWING FILES :

  • {{YOUR_ROOT_FOLDER}}/page.php
  • {{YOUR_ROOT_FOLDER}}/content/themes/default/templates/page.tpl
  • {{YOUR_ROOT_FOLDER}}/content/themes/default/templates/_header.tpl

page.php

With your code editor, open the file :

{{YOUR_ROOT_FOLDER}}/page.php

Search/find the code listed below :

                  case 'delete':
                  /* check if the viewer not the super admin */
                  if ($user->_data['user_id'] != $spage['page_admin']) {
                    _error(404);
                  }
                  break;

casedelete

After this code block, add the following lines:

                    case 'feed':
                    // Get feed settings
                    if(intval(get_ynd_settings('admins_only')) == 1 && $user->_data['user_group'] !== 1){
                     _error(404);
                    }
                    break;

it should now look something like this :

casefeed

Within the same file, search/find the following line :

page_footer('page');

feedfunc1

and Insert the following functions before it:

                    function get_ynd_settings($key) {
                        global $db;
                        $query = $db->query("SELECT setting_value FROM feed_settings WHERE setting_key = '$key'");
                        $result = $query->fetch_assoc();

                        if ($result) {
                            return $result['setting_value'];
                        } else {
                            return null;
                        }
                    }
                    function y_feeds_langs($lang_key, $lang)
                    {
                        $langs = file_get_contents(__DIR__.'/YND_panel/functions/lang.json');
                        $data = json_decode($langs, true);
                        foreach ($data as $key) {
                           if ($key['lang_key'] == $lang_key) {
                                      return $key[$lang];
                            }
                        }

                    }

It should now look like this :

feedfunc2

SAVE THE FILE TO YOUR SERVER

page.tpl

Now, with your code editor, navigate to and open the file at :

{{YOUR_ROOT_FOLDER}}/content/themes/default/templates/page.tpl

Search/find the code listed below : `

{include file='_header.tpl'}`

css1

and add this line after it :

                    {include file='YND_css.tpl'}

It should now look like this :

css2

Within the same file, serch/find the following line.

{if $sub_view == "delete"}

admin1

Add the code listed below, after the boxed {/if} tag indicated in the above image :

                    {if $user->_data['user_id'] == $spage['page_admin']}
                    {if $admins_only != 1 || $user->_data['user_group'] == 1 }
                    <li {if $sub_view == "feed"}class="active" {/if}>
                      <a href="{$system['system_url']}/pages/{$spage['page_name']}/settings/feed">
                        {include file='__svg_icons.tpl' icon="newsfeed" class="main-icon mr10" width="24px" height="24px"}
                        {__("News Feed")}
                      </a>
                    </li>
                    {/if}
                  {/if}

It should now look like this :

admin2

In the same file, serch/find :

 {elseif $sub_view == "delete"}

elseiffeed1

Add the code below before the {/if} tag in the above image :

                    {elseif $sub_view == "feed" }
                       {$facebook_enabled = intval(get_ynd_settings('facebook_enaled'))}
                       {$youtube_enabled = intval(get_ynd_settings('youtube_enabled'))}
                       {$admins_only = intval(get_ynd_settings('admins_only'))}
                       {$user_lang = {$user->_data['user_language']}}
                       {if $admins_only != 1 || $user->_data['user_group'] == 1 }
                           {include file='YND_feeds_panel.tpl'}
                       {/if}

It should now look like this :

elseiffeed2

Now, croll down to the very end of the SAME file and add this line of code:

{include file='YND_js.tpl'}

it should now look like this :

eof

SAVE THE FILE TO YOUR SERVER

_header.tpl

Now, with your code editor, navigate to and open the file at :

{{YOUR_ROOT_FOLDER}}/content/themes/default/templates/_header.tpl

Serch/find the following line of code :

{if $user->_is_admin}

header1

Add the line of code below after the boxed tag in the above image :

                            <div class="dropdown-divider"></div>
                            <a class="dropdown-item" href="{$system['system_url']}/YND_panel">
                              {include file='__svg_icons.tpl' icon="admin_panel" class="main-icon mr10" width="20px" height="20px"}
                              YND Panel
                            </a>

It should now look like this :

header2

SAVE THE FILE TO YOUR SERVER

Update Database

MAKE SURE YOU ARE LOGGED IN TO YOUR Sngine SYSTEM WITH AN ADMIN LEVEL ACCOUNT!!!

  • Open your browser and navigate to https://{{YOUR_DOMAIN}}/YND_panel/update.php

  • The updater will run and your databsase will be updated!

CONGATULATIONS! If you have followed all directions to this point, and have not seen any error messages, the core of PageFeeds Pro w/ SocialSync has been succesfully updated to version 1.1!


Update (v.1.1 to 1.2)

EZ Update

ONLY USE EZ Update if you have not installed any additional plugins since you installed this one, or had any custom work done that may be damaged by overwriting files. IT IS YOUR RESPONSIBILITY to know if this may occur. If the above conditions exist, or you aren't sure, SCROLL DOWN to the MANUAL UPDDATE portion of this page.

Upload Files

First :

  • UNZIP the downloaded install package on your local machine.

  • UNZIP YND_Panel-upload from within that package to your local machine.

  • Go to the folder _YND_update/1.2

  • With your FTP client, upload the ENTIRE YND_panel folder to your Sngine root folder (usually Public_html) ALLOW FILE OVERWRITE!.

Next :

  • On your local machine, got to the folder ../YND_update/1.2/YND_theme-files

  • UPLOAD the file page.php to {{YOUR_DOMAIN}}/public_html

  • Then, on your local machine, go to the folder ../YND_update/1.2/YND_theme-files/content/themes/default/templates

  • COPY ALL THE FILES in this folder to _{{YOUR_DOMAIN}}/public_html/content/themes/default/templates on your server. ALLOW FILE OVERWRITE!

CONGATULATIONS! If you have followed all directions to this point, and have not seen any error messages, the core of PageFeeds Pro w/ SocialSync has been succesfully updated to version 1.2!

Manual Update

Upload Files

  • UNZIP the downloaded install package on your local machine.

  • UNZIP YND_Panel-upload from within that package to your local machine.

  • Go to the folder YND_update/1.2

  • With your FTP client, upload the ENTIRE YND_panel folder to your Sngine root folder (usually Public_html) ALLOW FILE OVERWRITE!.

Next :

  • On your local machine, got to the folder ..YND_update/1.2/YND_theme-files

Copy the following files FROM this folder:

  • YND_feeds_panel.tpl
  • YND_css.tpl
  • YND_js.tpl

TO:

Destination : *((YOUR_ROOT_FOLDER))\content\themes\default\templates* on your server.

Edit Theme Files

Now it's time to fire up your prefered code editor and log into your server.

MAKE SURE YOU HAVE BACKUPS OF THE FOLLOWING FILES :

  • {{YOUR_ROOT_FOLDER}}/page.php
  • {{YOUR_ROOT_FOLDER}}/content/themes/default/templates/page.tpl
  • {{YOUR_ROOT_FOLDER}}/content/themes/default/templates/user_menu.tpl

page.php

With your code editor, open the file :

{{YOUR_ROOT_FOLDER}}/page.php

Search/find the code listed below :

                  case 'delete':
                  /* check if the viewer not the super admin */
                  if ($user->_data['user_id'] != $spage['page_admin']) {
                    _error(404);
                  }
                  break;

After this code block, add the following lines:

                  //YND FEEDS PLUGUN
                   case 'feed':

                    if(intval(get_ynd_settings('admins_only')) == 1 && $user->_data['user_group'] !== 1){
                     _error(404);
                    }
                    break;
                    //YND FEEDS PLUGUN

it should now look something like this :

casefeed

Within the same file, serch/find the following line :

// assign variables

and Insert the following functions before it:

//YND FEEDS FUNCTIONS
            $smarty->registerPlugin('function', 'y_feeds_langs' , 'y_feeds_langs');
            function get_ynd_settings($key) {
              global $db;
              $query = $db->query("SELECT setting_value FROM feed_settings WHERE setting_key = '$key'");
              $result = $query->fetch_assoc();
              if ($result) {
                  return $result['setting_value'];
              } else {
                  return null;
              }
            }
            function y_feeds_langs($params){
                $lang_key = $params['lang_key'];
                $lang = $params['lang'];
                $langs = file_get_contents(__DIR__.'/YND_panel/functions/lang.json');
                $data = json_decode($langs, true);
                if ($data === null) {return "Error decoding JSON: " . json_last_error_msg();}
                foreach ($data as $key) {
                    if (isset($key['lang_key']) && $key['lang_key'] == $lang_key) {
                        return isset($key[$lang]) ? $key[$lang] : "Translation not found for language: $lang";
                    }
                }
                return "Translation not found for key: $lang_key";
            }
            $facebook_enabled = intval(get_ynd_settings('facebook_enaled'));
            $youtube_enabled = intval(get_ynd_settings('youtube_enabled'));
            $admins_only = intval(get_ynd_settings('admins_only'));
            $user_lang = $user->_data['user_language'];
            $smarty->assign('user_lang', $user_lang);
            $smarty->assign('facebook_enabled', $facebook_enabled);
            $smarty->assign('youtube_enabled', $youtube_enabled);
            $smarty->assign('admins_only', $admins_only);
            //END OF YND FEEDS FUNCTIONS

It should now look like this :

feedfunc2

SAVE THE FILE TO YOUR SERVER

page.tpl

Now, with your code editor, navigate to and open the file at :

{{YOUR_ROOT_FOLDER}}/content/themes/default/templates/page.tpl_

Search/find the code listed below :

{include file='_header.tpl'}`

and add this line after it :

            <!-- YND FEEDS -->
            {include file='YND_css.tpl'}
            <!-- YND FEEDS -->

It should now look like this :

css2

Within the same file, search/find the following line.

{if $sub_view == "delete"}

admin1

Add the code listed below, after the boxed {/if} tag indicated in the above image :

  <!-- YND FEEDS -->
            {if $user->_data['user_id'] == $spage['page_admin']}
                  {if $admins_only != 1 || $user->_data['user_group'] == 1 }
                  <li {if $sub_view == "feed"}class="active" {/if}>
                    <a href="{$system['system_url']}/pages/{$spage['page_name']}/settings/feed">
                      {include file='__svg_icons.tpl' icon="newsfeed" class="main-icon mr10" width="24px" height="24px"}
                      {__("News Feed")}
                    </a>
                  </li>
                  {/if}
            {/if}
            <!-- YND FEEDS -->

It should now look like this :

admin2

In the same file, serch/find :

 {elseif $sub_view == "delete"}

elseiffeed1

Add the code below before the {/if} tag in the above image :

            <!-- YND FEEDS -->
            {elseif $sub_view == "feed" }
               {if $admins_only != 1 || $user->_data['user_group'] == 1 }
                    {include file='YND_feeds_panel.tpl'}
               {/if}
            <!-- YND FEEDS -->

It should now look like this :

elseiffeed2

Now, croll down to the very end of the SAME file and add this line of code:

{include file='YND_js.tpl'}

it should now look like this :

eof

SAVE THE FILE TO YOUR SERVER

Delete compiled templates

Delete or rename this folder : ** ((YOUR_ROOT_FOLDER))\content\themes\default\templates_compiled*

CONGATULATIONS! If you have followed all directions to this point, and have not seen any error messages, the core of PageFeeds Pro w/ SocialSync has been succesfully updated to version 1.2!