Thanks a lot for choosing InBefore. If you have any questions that are beyond the scope of this documentation, please feel free to email via the item support or via our Codecanyon profile contact form.
Folder Structure
Before you start, you should take a look at the folder structure of InBefore package for the clear concept of what is located where.
Folder Structure
Docs Contains documentation for the script
Main Files Contains main script files
Database Contains the SQL Dump
Upgrades Contains upgrade packages
Requirements
Before you try to install InBefore, make sure your environment meets the following requirements.
Make sure you disable ModSecurity if it's enabled on your server.
PHP
7.0 to 8.3
Linux/unix web-server.
Apache
2.4+
If you want to install on other servers like NGINX, an nginx.conf file is available.
MySQL
5.6+
MySQL server with root access
curl
PHP Extension
pdo_mysql
PHP Extension
mbstring
PHP Extension
dom
PHP Extension
fileinfo
PHP Extension
Installation
Creating a database
First thing you need to do before installing InBefore is to create a new database on your MySQL server. The database must be created under a MySQL user that has full permissions. If you already know how to do this or have already created one you can skip to the next step. But make sure you have noted the following details:
Details needed
1. Database Name - The one you just created
2. MySQL Host - Usually it defaults to 127.0.0.1 or localhost, but if that doesn't work you need to contact your hosting provider.
3. MySQL Username - The username of which you've created the database.
4. MySQL Password - The password for the MySQL user
Creating MySQL database from standard cPanel. Your scenario may vary.
Importing the SQL dump
After you've created the database import the SQL file provided with the script, to the database by going to phpMyadmin or any other tools. The SQL file is located at: Database/inbefore.sql.
Importing the database via phpMyadmin. Your scenario may vary.
Uploading Files
After importing the SQL file to the database, unzip the .zip file you downloaded from Codecanyon and upload the contents of Main Files folder to your server's root folder (usually called www/public_html or something similar) or a sub-directory.
Uploading files via the cPanel file manager.
Important: Upload what's inside the folder Main Files, not the folder itself.
Shared hosting providers usually have a web based file manager, but you should use something like FileZilla to do the upload as the web based managers can cause various problems fairly often.
Editing the database config file
After you uploaded InBefore files to your server, locate the database config file at: src/settings/db.php and open the file for editing and provide your database details that you have created earlier and save the file.
<?php
/**
* Put your database details here after you've imported the SQL file
*
* @return array
*/
return [
// Database host. Usually localhost or 127.0.0.1
'dbhost' => 'localhost',
// Database name
'dbname' => '',
// Database Username
'username' => 'root',
// Database password
'password' => '',
// 3306 in most cases
'dbport' => '3306',
//DON'T CHANGE THIS
'prefix' => 'in_',
];
And... you're done. That's it. Now you can access your site's admin dashboard by visiting: https://yoursite.com/dashboard.
After you've logged in to the dashboard, make sure you change the default e-mail and password from Dashboard > Account Settings.
Upgrading
To upgrade to the latest version you would need to replace the files that has changed. So best pratice is make a backup first of your customization before you replace any files.
How to Upgrade
The upgrade files are located in Upgrades folder in the package you've downloaded from Codecanyon. The files are located in version specific order, to check what version you currently have installed. Open the file src/constants.php and look up the constant APP_VERSION.
Now, to upgrade just replace the files to your current installation. If there's any SQL file present within the folder, you'd need to run it in your current database via phpmyadmin usually.
Make sure you keep backup of the files you have modified before you replace any files. Beacause you may end up losing your customizations.
Major Upgrades
Unlike quick bug fixes, when upgrading to a whole new version, you will need to replace all the files with the new files from Main Files folder. Except src/settings/db.php file.
Management
Once you have finished installing the application. You can manage and customize it by logging in to the admin dashboard. You can access the dashboard by visiting: https://yoursite.com/dashboard
You can change the site name, description, logo and other basic information by navigating to: Settings > General from the dashboard.
To customize even more specific features like how many items will be shown and other frontend aspects that directly affect the site you will need to go to: Settings > Site from the dashboard.
Adding new Engines
Engines are mainly different Google Custom Search Engines created by you. InBefore already comes with 5 preloaded engines. However, you may add as many engines you want. To add new engine first you will need a Google Custom Search Engine ID.
To add new engines go to Dashboard > Engines and click the Create button.
Setting up cron-job
Important: You must setup the cron-job, otherwise InBefore won't work properly. The automatic time based tasks won't work either.
To setup the cron job first you will need to get the cron command from the dashboard by going to Settings > Debugging. Once you have the cron command copy it and setup the cron job from your cPanel.
Getting the cron command from the dashboard
Note: If you re-generate the cron-token from the debugging page, you will need to update your cron command again from the cPanel. Since, regenerating the cron token will make the previous command invalid.
Translating
Language files should be and are located at site/themes/default/languages folder.
To create a new translation, copy existing translation file, and use these locale name create your own locale file.
For example for English(UK), create a new directory named "en_UK", copy the en_US.php file and paste on the "en_UK" folder and rename as "en_UK.php",
then start editing. Please note if you don't use the locale name given here for the locale directory/file name, it won't work.
So basically translation files should look like this: (Case sensitive)
<LOCALE>/<LOCALE>.php
en_US/en_US.php
bn_BD/bn_BD.php
Supported Locales
af_NA - Afrikaans (Namibia)af_ZA - Afrikaans (South Africa)af - Afrikaansak_GH - Akan (Ghana)ak - Akansq_AL - Albanian (Albania)sq - Albanianam_ET - Amharic (Ethiopia)am - Amharicar_DZ - Arabic (Algeria)ar_BH - Arabic (Bahrain)ar_EG - Arabic (Egypt)ar_IQ - Arabic (Iraq)ar_JO - Arabic (Jordan)ar_KW - Arabic (Kuwait)ar_LB - Arabic (Lebanon)ar_LY - Arabic (Libya)ar_MA - Arabic (Morocco)ar_OM - Arabic (Oman)ar_QA - Arabic (Qatar)ar_SA - Arabic (Saudi Arabia)ar_SD - Arabic (Sudan)ar_SY - Arabic (Syria)ar_TN - Arabic (Tunisia)ar_AE - Arabic (United Arab Emirates)ar_YE - Arabic (Yemen)ar - Arabichy_AM - Armenian (Armenia)hy - Armenianas_IN - Assamese (India)as - Assameseasa_TZ - Asu (Tanzania)asa - Asuaz_Cyrl - Azerbaijani (Cyrillic)az_Cyrl_AZ - Azerbaijani (Cyrillic, Azerbaijan)az_Latn - Azerbaijani (Latin)az_Latn_AZ - Azerbaijani (Latin, Azerbaijan)az - Azerbaijanibm_ML - Bambara (Mali)bm - Bambaraeu_ES - Basque (Spain)eu - Basquebe_BY - Belarusian (Belarus)be - Belarusianbem_ZM - Bemba (Zambia)bem - Bembabez_TZ - Bena (Tanzania)bez - Benabn_BD - Bengali (Bangladesh)bn_IN - Bengali (India)bn - Bengalibs_BA - Bosnian (Bosnia and Herzegovina)bs - Bosnianbg_BG - Bulgarian (Bulgaria)bg - Bulgarianmy_MM - Burmese (Myanmar [Burma])my - Burmeseyue_Hant_HK - Cantonese (Traditional, Hong Kong SAR China)ca_ES - Catalan (Spain)ca - Catalantzm_Latn - Central Morocco Tamazight (Latin)tzm_Latn_MA - Central Morocco Tamazight (Latin, Morocco)tzm - Central Morocco Tamazightchr_US - Cherokee (United States)chr - Cherokeecgg_UG - Chiga (Uganda)cgg - Chigazh_Hans - Chinese (Simplified Han)zh_Hans_CN - Chinese (Simplified Han, China)zh_Hans_HK - Chinese (Simplified Han, Hong Kong SAR China)zh_Hans_MO - Chinese (Simplified Han, Macau SAR China)zh_Hans_SG - Chinese (Simplified Han, Singapore)zh_Hant - Chinese (Traditional Han)zh_Hant_HK - Chinese (Traditional Han, Hong Kong SAR China)zh_Hant_MO - Chinese (Traditional Han, Macau SAR China)zh_Hant_TW - Chinese (Traditional Han, Taiwan)zh - Chinesekw_GB - Cornish (United Kingdom)kw - Cornishhr_HR - Croatian (Croatia)hr - Croatiancs_CZ - Czech (Czech Republic)cs - Czechda_DK - Danish (Denmark)da - Danishnl_BE - Dutch (Belgium)nl_NL - Dutch (Netherlands)nl - Dutchebu_KE - Embu (Kenya)ebu - Embuen_AS - English (American Samoa)en_AU - English (Australia)en_BE - English (Belgium)en_BZ - English (Belize)en_BW - English (Botswana)en_CA - English (Canada)en_GU - English (Guam)en_HK - English (Hong Kong SAR China)en_IN - English (India)en_IE - English (Ireland)en_IL - English (Israel)en_JM - English (Jamaica)en_MT - English (Malta)en_MH - English (Marshall Islands)en_MU - English (Mauritius)en_NA - English (Namibia)en_NZ - English (New Zealand)en_MP - English (Northern Mariana Islands)en_PK - English (Pakistan)en_PH - English (Philippines)en_SG - English (Singapore)en_ZA - English (South Africa)en_TT - English (Trinidad and Tobago)en_UM - English (U.S. Minor Outlying Islands)en_VI - English (U.S. Virgin Islands)en_GB - English (United Kingdom)en_US - English (United States)en_ZW - English (Zimbabwe)en - Englisheo - Esperantoet_EE - Estonian (Estonia)et - Estonianee_GH - Ewe (Ghana)ee_TG - Ewe (Togo)ee - Ewefo_FO - Faroese (Faroe Islands)fo - Faroesefil_PH - Filipino (Philippines)fil - Filipinofi_FI - Finnish (Finland)fi - Finnishfr_BE - French (Belgium)fr_BJ - French (Benin)fr_BF - French (Burkina Faso)fr_BI - French (Burundi)fr_CM - French (Cameroon)fr_CA - French (Canada)fr_CF - French (Central African Republic)fr_TD - French (Chad)fr_KM - French (Comoros)fr_CG - French (Congo - Brazzaville)fr_CD - French (Congo - Kinshasa)fr_CI - French (Côte d’Ivoire)fr_DJ - French (Djibouti)fr_GQ - French (Equatorial Guinea)fr_FR - French (France)fr_GA - French (Gabon)fr_GP - French (Guadeloupe)fr_GN - French (Guinea)fr_LU - French (Luxembourg)fr_MG - French (Madagascar)fr_ML - French (Mali)fr_MQ - French (Martinique)fr_MC - French (Monaco)fr_NE - French (Niger)fr_RW - French (Rwanda)fr_RE - French (Réunion)fr_BL - French (Saint Barthélemy)fr_MF - French (Saint Martin)fr_SN - French (Senegal)fr_CH - French (Switzerland)fr_TG - French (Togo)fr - Frenchff_SN - Fulah (Senegal)ff - Fulahgl_ES - Galician (Spain)gl - Galicianlg_UG - Ganda (Uganda)lg - Gandaka_GE - Georgian (Georgia)ka - Georgiande_AT - German (Austria)de_BE - German (Belgium)de_DE - German (Germany)de_LI - German (Liechtenstein)de_LU - German (Luxembourg)de_CH - German (Switzerland)de - Germanel_CY - Greek (Cyprus)el_GR - Greek (Greece)el - Greekgu_IN - Gujarati (India)gu - Gujaratiguz_KE - Gusii (Kenya)guz - Gusiiha_Latn - Hausa (Latin)ha_Latn_GH - Hausa (Latin, Ghana)ha_Latn_NE - Hausa (Latin, Niger)ha_Latn_NG - Hausa (Latin, Nigeria)ha - Hausahaw_US - Hawaiian (United States)haw - Hawaiianhe_IL - Hebrew (Israel)he - Hebrewhi_IN - Hindi (India)hi - Hindihu_HU - Hungarian (Hungary)hu - Hungarianis_IS - Icelandic (Iceland)is - Icelandicig_NG - Igbo (Nigeria)ig - Igboid_ID - Indonesian (Indonesia)id - Indonesianga_IE - Irish (Ireland)ga - Irishit_IT - Italian (Italy)it_CH - Italian (Switzerland)it - Italianja_JP - Japanese (Japan)ja - Japanesekea_CV - Kabuverdianu (Cape Verde)kea - Kabuverdianukab_DZ - Kabyle (Algeria)kab - Kabylekl_GL - Kalaallisut (Greenland)kl - Kalaallisutkln_KE - Kalenjin (Kenya)kln - Kalenjinkam_KE - Kamba (Kenya)kam - Kambakn_IN - Kannada (India)kn - Kannadakk_Cyrl - Kazakh (Cyrillic)kk_Cyrl_KZ - Kazakh (Cyrillic, Kazakhstan)kk - Kazakhkm_KH - Khmer (Cambodia)km - Khmerki_KE - Kikuyu (Kenya)ki - Kikuyurw_RW - Kinyarwanda (Rwanda)rw - Kinyarwandakok_IN - Konkani (India)kok - Konkaniko_KR - Korean (South Korea)ko - Koreankhq_ML - Koyra Chiini (Mali)khq - Koyra Chiinises_ML - Koyraboro Senni (Mali)ses - Koyraboro Sennilag_TZ - Langi (Tanzania)lag - Langilv_LV - Latvian (Latvia)lv - Latvianlt_LT - Lithuanian (Lithuania)lt - Lithuanianluo_KE - Luo (Kenya)luo - Luoluy_KE - Luyia (Kenya)luy - Luyiamk_MK - Macedonian (Macedonia)mk - Macedonianjmc_TZ - Machame (Tanzania)jmc - Machamekde_TZ - Makonde (Tanzania)kde - Makondemg_MG - Malagasy (Madagascar)mg - Malagasyms_BN - Malay (Brunei)ms_MY - Malay (Malaysia)ms - Malayml_IN - Malayalam (India)ml - Malayalammt_MT - Maltese (Malta)mt - Maltesegv_GB - Manx (United Kingdom)gv - Manxmr_IN - Marathi (India)mr - Marathimas_KE - Masai (Kenya)mas_TZ - Masai (Tanzania)mas - Masaimer_KE - Meru (Kenya)mer - Merumfe_MU - Morisyen (Mauritius)mfe - Morisyennaq_NA - Nama (Namibia)naq - Namane_IN - Nepali (India)ne_NP - Nepali (Nepal)ne - Nepalind_ZW - North Ndebele (Zimbabwe)nd - North Ndebelenb_NO - Norwegian Bokmål (Norway)nb - Norwegian Bokmålnn_NO - Norwegian Nynorsk (Norway)nn - Norwegian Nynorsknyn_UG - Nyankole (Uganda)nyn - Nyankoleor_IN - Oriya (India)or - Oriyaom_ET - Oromo (Ethiopia)om_KE - Oromo (Kenya)om - Oromops_AF - Pashto (Afghanistan)ps - Pashtofa_AF - Persian (Afghanistan)fa_IR - Persian (Iran)fa - Persianpl_PL - Polish (Poland)pl - Polishpt_BR - Portuguese (Brazil)pt_GW - Portuguese (Guinea-Bissau)pt_MZ - Portuguese (Mozambique)pt_PT - Portuguese (Portugal)pt - Portuguesepa_Arab - Punjabi (Arabic)pa_Arab_PK - Punjabi (Arabic, Pakistan)pa_Guru - Punjabi (Gurmukhi)pa_Guru_IN - Punjabi (Gurmukhi, India)pa - Punjabiro_MD - Romanian (Moldova)ro_RO - Romanian (Romania)ro - Romanianrm_CH - Romansh (Switzerland)rm - Romanshrof_TZ - Rombo (Tanzania)rof - Romboru_MD - Russian (Moldova)ru_RU - Russian (Russia)ru_UA - Russian (Ukraine)ru - Russianrwk_TZ - Rwa (Tanzania)rwk - Rwasaq_KE - Samburu (Kenya)saq - Samburusg_CF - Sango (Central African Republic)sg - Sangoseh_MZ - Sena (Mozambique)seh - Senasr_Cyrl - Serbian (Cyrillic)sr_Cyrl_BA - Serbian (Cyrillic, Bosnia and Herzegovina)sr_Cyrl_ME - Serbian (Cyrillic, Montenegro)sr_Cyrl_RS - Serbian (Cyrillic, Serbia)sr_Latn - Serbian (Latin)sr_Latn_BA - Serbian (Latin, Bosnia and Herzegovina)sr_Latn_ME - Serbian (Latin, Montenegro)sr_Latn_RS - Serbian (Latin, Serbia)sr - Serbiansn_ZW - Shona (Zimbabwe)sn - Shonaii_CN - Sichuan Yi (China)ii - Sichuan Yisi_LK - Sinhala (Sri Lanka)si - Sinhalask_SK - Slovak (Slovakia)sk - Slovaksl_SI - Slovenian (Slovenia)sl - Slovenianxog_UG - Soga (Uganda)xog - Sogaso_DJ - Somali (Djibouti)so_ET - Somali (Ethiopia)so_KE - Somali (Kenya)so_SO - Somali (Somalia)so - Somalies_AR - Spanish (Argentina)es_BO - Spanish (Bolivia)es_CL - Spanish (Chile)es_CO - Spanish (Colombia)es_CR - Spanish (Costa Rica)es_DO - Spanish (Dominican Republic)es_EC - Spanish (Ecuador)es_SV - Spanish (El Salvador)es_GQ - Spanish (Equatorial Guinea)es_GT - Spanish (Guatemala)es_HN - Spanish (Honduras)es_419 - Spanish (Latin America)es_MX - Spanish (Mexico)es_NI - Spanish (Nicaragua)es_PA - Spanish (Panama)es_PY - Spanish (Paraguay)es_PE - Spanish (Peru)es_PR - Spanish (Puerto Rico)es_ES - Spanish (Spain)es_US - Spanish (United States)es_UY - Spanish (Uruguay)es_VE - Spanish (Venezuela)es - Spanishsw_KE - Swahili (Kenya)sw_TZ - Swahili (Tanzania)sw - Swahilisv_FI - Swedish (Finland)sv_SE - Swedish (Sweden)sv - Swedishgsw_CH - Swiss German (Switzerland)gsw - Swiss Germanshi_Latn - Tachelhit (Latin)shi_Latn_MA - Tachelhit (Latin, Morocco)shi_Tfng - Tachelhit (Tifinagh)shi_Tfng_MA - Tachelhit (Tifinagh, Morocco)shi - Tachelhitdav_KE - Taita (Kenya)dav - Taitata_IN - Tamil (India)ta_LK - Tamil (Sri Lanka)ta - Tamilte_IN - Telugu (India)te - Teluguteo_KE - Teso (Kenya)teo_UG - Teso (Uganda)teo - Tesoth_TH - Thai (Thailand)th - Thaibo_CN - Tibetan (China)bo_IN - Tibetan (India)bo - Tibetanti_ER - Tigrinya (Eritrea)ti_ET - Tigrinya (Ethiopia)ti - Tigrinyato_TO - Tonga (Tonga)to - Tongatr_TR - Turkish (Turkey)tr - Turkishuk_UA - Ukrainian (Ukraine)uk - Ukrainianur_IN - Urdu (India)ur_PK - Urdu (Pakistan)ur - Urduuz_Arab - Uzbek (Arabic)uz_Arab_AF - Uzbek (Arabic, Afghanistan)uz_Cyrl - Uzbek (Cyrillic)uz_Cyrl_UZ - Uzbek (Cyrillic, Uzbekistan)uz_Latn - Uzbek (Latin)uz_Latn_UZ - Uzbek (Latin, Uzbekistan)uz - Uzbekvi_VN - Vietnamese (Vietnam)vi - Vietnamesevun_TZ - Vunjo (Tanzania)vun - Vunjocy_GB - Welsh (United Kingdom)cy - Welshyo_NG - Yoruba (Nigeria)yo - Yorubazu_ZA - Zulu (South Africa)zu - Zulu
Plugins: Sitemap and RSS Feed
To enable sitemaps and RSS feed, go to Dashboard > Plugins and enable the "Sitemap and RSS" plugin. Then click on the plugin options to manage and see the sitemap and rss URLs.
Support
Common Issues
It shows 403 Forbidden error when accessing the site
That's because your file manager ignored the .htaccess file, it can happen because cPanel filemanager by default has the option "Show hidden (dotfiles)" disabled. So, always make sure the .htaccess file is present at the very first.
It shows "This page isn't working", "Error 500"
This could happen because of numerous reasons, for example if the PHP version doesn't match, one or more of the required extensions are not enabled. To check what's causing the error, open the file: src/constants.php file and set the constant DEV_MODE to true, like this: define('DEV_MODE', true);.
Alternatively you can check the log files from here: src/var/logs/. And solve the issue according to the error message. If you still can't figure out the issue or resolve it, please do let me know.
When I save ad-codes or header/footer scripts, it won't save anything.
Your server has ModSecurity enabled. And it prevents users from submitting codes via POST/GET requests. So, to solve the issue, you will need to disable ModSecurity from your domain. If you can't do it, you'd need to contact your server/hosting provider to do it for you.
Provide the site domains and URL patterns you want to perform search. You can always change them later. Then click CREATE.
Creating a new Google Custom Search Engine
2. After the CSE has been created, visit its control panel by clicking the button Control Panel on the next page.
3. On the control panel you'll find the Google CSE ID. You can copy it and use in the app now.
Creating a new Google Custom Search Engine
How do I edit site's styles and templates?
Site templates, styles are located in the site/themes/default folder. You can modify everything from there. Just make sure to keep a copy of the original files.
Why do some feeds don't work?
Not all feeds can be parsed via SimplePie. There are very few exceptional feeds that can cause problems.
Why some images are not showing from imported content
Some sites don't allow hotlinking the images, in those cases the images can be broken.
Support Criteria
Please remember you have purchased a very affordable script and you have not paid for a full-time web development agency. Occasionally we will help with small tweaks, but these requests will be put on a lower priority due to their nature.
Support for our items includes:
1. Responding to questions or problems regarding the item and its features
2. Fixing bugs and reported issues
3. Providing updates to ensure compatibility with new software versions
Item support does not include:
1. Customization and installation services
2. Support for third party software and plug-ins
Before seeking support please..
1. Make sure you've purchased the item. Pirated items won't get any support, duh!
2. Make sure your question is a valid item Issue and NOT a customization request.
3. Make sure you have read through the documentation before asking support on how to accomplish a task.
4. Make sure to double check the item FAQs.
5. If you have customized your item and now have an issue, back-track to make sure you didn't make a mistake. If you have made changes and can't find the issue, please provide us with your changelog.
6. Almost 80% of the time we find that the solution to people's issues can be solved with a simple "Google Search". You might want to try that before seeking support. You might be able to fix the issue yourself much quicker than we can respond to your request.
7. Make sure to state the name of the item you are having issues with when requesting support via Codecanyon.