⚠️ IMPORTANT — READ BEFORE INSTALLING

If you already have our other plugin, BlogFeeds Pro! for Sngine, installed on your platform, * DO NOT * follow the installation steps on this page. Instead, please refer to the Sync-Blogfeeds Guide 9see top menu bar) specifically provided for this instance.

The reason for this is we are adapting our plugin panel to manage our exising, and future, plugins from one location and until we have both existing plugins in sync a standard install will break one or the other. the panel will feature auto-updates, direct links to support and resources, and other features that will make your life easier in managing our plugins on your Sngine system.

THIS STEP WILL NOT BE REQUIRED IN FUTURE UPDATES


IMPORTANT!

This method if only for new installs of this plugin. If you have previously installed this product on this system you will need to follow the directions in the UPDATE portion of this documentation.

Upload Files

  • Make sure you have downloaded the newest version PageFeeds Pro from our online store (https://shop.yubnub.digital), as well as your license key. The downlaodable plugin is located in My Account/Downloads on the store. your license key is located in My Account/License Keys

  • UNZIP the downloaded package on your local machine.

  • UNZIP the file YND_Panel-upload.zip on you local machine.

  • Open your favorite FTP CLIENT and log into your hosting.

  • UPLOAD the ENTIRE folder ../YND_Panel/ to your /((YOUR DOMAIN))/public_html/ directory.

  • You DO NOT nned upload the YND_theme-files to your server as these files are going to be edited manually.

The file structure should now look something like the image below, with or without 'YND_theme-files' :

Files Extracted

Run EZ-Installer


IMPORTANT!!! BEFORE YOU BEGIN!!!

MAKE SURE that the directory on your serer

((YOUR_DOMAIN))/public_html/YND_Panel /uploads/

has permissions set to (777)


IMPORTANT!!! YOU SHOULD BE LOGGED INTO YOUR SNGINE SOCIAL SITE WITH AN ADMIN LEVEL ACCOUNT BEFORE RUNNING THE INSTALLER!!!

  • Make sure you have your PageFeeds Pro Purchase Code available!!!

  • Make sure you have your Sngine database information handy!!!

  • In your browser go to https://((YOUR_DOMAIN.COM))/YND_panel/?page=install - BE SURE to replace ((YOUR_DOMAIN.COM)) with your actual domain name.

You should now see the screen displayed below in your browser :

Form

You will now fill in all the fields with your own information as follows :

  1. The Purchase Code for PageFeeds Pro you recieved from CodeCanyon.

  2. Sngine Site URL - https://((YOUR_DOMAIN.COM)) - Replace with your actual Domain.

  3. Sngine Database Name - The name of the database you created when you first set up Sngine.

  4. Sngine Database Host - Usually localhost, if not, consult your hosting provider.

  5. Sngine Database Username - This is your DATABASE username, NOT your Sngine username.

  6. Sngine Database Password - This is your DATABASE password, NOT your Sngine password.

Once you have entered all the correct information, click SUBMIT

Additional Files

You will now need to upload a few additional files to your server. To insure there are no mistakes, these files should be uploaded INDIVIDUALLY into the templates folder of each theme you are using on Sngine or the plugin won't work on all themes.

The files to be copied from your local machine will be :

FROM

SOURCE : ../YND-theme-files/content/themes/((theme_name))/templates/

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

TO :

Destination : {{YOUR_ROOT_FOLDER}}/content/themes/((theme_name))/templates/

AGAIN! This above step MUST be repeated for ALL THEMES you are using on Sngine, or THE PLUGIN WON'T WORK!

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 installed on your server, but we're going to still need to manually edit some files on your server before we can configure it properly to work on the public side of your Sngine system.

Edit Theme Files

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

THIS STEP must also be repeated for ALL themes you intend to use on Sngine!

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/default/((theme_name))_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

REPEAT THE STEPS BELOW FOR ALL THEMES YOU ARE USING!

page.tpl

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

AGAIN! repeat the below step for ALL THEMES you are using on Sngine!

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

AGAIN! Repeat this step for ALL THEMES!

Delete the files in, or rename this folder : ((YOUR_ROOT_FOLDER))\content\themes((theme_name))\templates_compiled

Clear youe browser cache of all files and cookies.

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 installed

You can now proceed to the CONFIGURE section of this documantation.