Install With BlogFeeds
Since you've chosen the Sync-Blogfeeds method, we assume you already have BlogFeeds Pro! installed and running on your platform. this installation is ONLY intended for installation beside BlogFeeds Pro! If you DO NOT have BlogFeeds pro! installed you MUST use one of the other install methods or the plugin WILL NOT WORK!
Before You Begin
Make sure of the following before you proceed:
- Your BlogFeeds Pro is updated to the latest version.
- Your Sngine installation is updated to the latest version.
- You have server access (FTP, SSH, or File Manager).
- You have your purchase code ready.
Upload & Install
Step 1: Upload Folder
Upload the folder named:
YND_panel_pfp
to your server. You can place it temporarily anywhere convenient.
Step 2: Replace Files
Copy and replace all the files in :
YND_panel_pfp
to:
public_html/YND_panel
Allow Overwrite
Make sure to copy each file into the exact same folder path as it appears in the YND_panel_pfp folder. This means if a file is inside a subfolder in
YND_panel_pfp
,you should place it in the same subfolder inside
YND_panel
.
Step 3: Run Installer
Run the Installer
IMPORTANT!!! YOU SHOULD BE LOGGED INTO YOUR SNGINE SOCIAL SITE WITH AN ADMIN LEVEL ACCOUNT BEFORE RUNNING THE INSTALLER!!!
In your browser, visit the installer:
https://yourdomain.com/YND_panel/install.php
-
Enter your purchase code when prompted.
-
Click Install to complete the setup.
-
If you have not seen any error messages delete
/YND_panel/install.php
Theme Files
Choose Method
Choose EZ-INSTALL method - ONLY - if this is a fresh install and you have NOT made changes to your files or installed a plugin that may have changed them. IT IS UP TO YOU to know this. If you are in doubt, DO NOT use this method.
Choose Manual Install if you have made modifications, or have had any customiztion done, that may have involved changes to any of the files mentioned in this documentation.
EZ-Install
PageFeeds Pro comes with its required theme files for the default Sngine theme, Elengine, and Xngine. They are located in the 'YND_theme_files' folder that was created when you initially uploaded and unzipped the package. In order for PageFeeds Pro to function, these files will need to be copied from the folders in YND_theme-files to the theme folders of any, or all, of the 3 themes you have installed on Sngine - . the best way to do this is to use the file manager provided on your hosting.
NOTE : In many cases you can 'select all' from the YND_theme-files folder on your computer, and the 'copy' and 'paste' the entire content to your 'public_html' folder, but some hosting web panel file managers can give problemns with this, ~so~, below is the OFFICIAL method to install these files. if you copy the entire contents, but you are not using any of the 3 themes, when you install that theme you will need to re-copy the theme files for that particular package.
Upload Files
OVERWRITE EXISTING FILES!
The files to be copied will be :
FROM :
SOURCE : ../public_html/YND_theme_files
- page.php
TO :
DESTINATION : ../public_html/
- AND -_
FROM :
Below MUST be repeated for EACH theme you are using on Sngine
SOURCE : ../public_html/YND_theme_files/content/themes/((theme_name))/templates/ or the plugin will not work!
- _user_menu.tpl
- page.tpl
- YND_js.tpl
- YND_css.tpl
TO :
DESTINATION : ../public_html/content/themes/((theme_name))/templates/
Make SURE you have repeated the last part above for EACH theme you are using on Sngine or the plugin will not work!
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! has been succesfully installed
You can now proceed to the CRON job and Configure sections of this documantation.
Manual Install
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 :
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 :
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 :
Within the same file, serch/find the following line.
{if $sub_view == "delete"}
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 :
In the same file, serch/find :
{elseif $sub_view == "delete"}
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 :
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 :
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 :
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 CRON job and Configure section of this documantation.