What are the system requirements?
- PHP 5.2 or greater (with mbstring extension, and at least 128M memory_limit)
- MySQL 5.0.3 or greater
- WordPress 3.4 or greater
- WordPress permalink URL structure must be something other than Default
What are the system requirements?
I can’t upload images or files.
Make sure the following folders exist and are writeable by the server (or the user running PHP).
In addition, the upload feature requires either FileInfo functions or the mime_content_type function enabled on your server.
How can I translate the plugin into my language?
Translatable files are in the Gettext format, which is the standard format used in WordPress. There are 2 Gettext POT (.pot) files:
Translate these files using a software like POEdit (recommended) and save the generated MO (.mo) files under wp-content/languages/plugins (or under WP_LANG_DIR/plugins if this is defined in your wp-config.php). Make sure that you append the lang code (check the WPLANG settings in wp-config.php) of your language to the file names. For example, if you are translating sabai.pot into French, save the generated MO file as sabai-fr_FR.mo.
Also note that some phrases like the form labels are not translated unless you had your language files ready before activating the plugin. The reason is that they can be edited from Questions (or Answers) -> Fields -> Manage Form.
IMPORTANT!
As of WordPress 4.0, WPLANG setting in wp-config.php is no longer needed. However, after placing your .mo file, you will need to select your language from Settings -> General -> Site Language.
Help, I have a blank page!
Please enable the debug mode of WordPress and see if any error message appears.
To enable the debug mode, change the following line in wp-config.php:
define('WP_DEBUG', false);
to
define('WP_DEBUG', true);
define('WP_DEBUG_DISPLAY', true);
define('WP_DISABLE_FATAL_ERROR_HANDLER', true);
Make sure to add the lines above to wp-config.php where it says:
/* That's all, stop editing! Happy blogging. */
I have a redirection loop after install.
Something did not go right during activation of the plugin. Have you gotten any error message during activation?
If you have phpMyAdmin installed on your server, please issue the following SQL in phpMyAdmin and obtain the installation log for the plugin.
SELECT option_value FROM `wp_options` WHERE option_name = 'sabai_sabai_install_log'
Make sure to change the wp_ part if your database tables have a different prefix.
Also there could be a problem if the memory_limit setting of PHP on your server is set to a low value. Make sure the value of the setting is set to at least 128M.
If you are still having issues with the install or can not obtain any installation log, please contact support using the contact form on my profile page (http://codecanyon.net/user/onokazu) so that we can send you a database dump file that you can import from phpMyAdmin to manually setup the plugin.
How do I enable iframes in questions and answers?
This method no longer works with the plugin. Instead, please use WordPress embeds.
How can I manually edit title and meta description tags?
Make sure you have either the WordPress Seo by Yoast plugin or the All in One SEO Pack plugin installed and activated.
Try editing one of your questions as administrator and you should see two new fields you just created. Enter values for these fields and they will replace the original values that were automatically generated by the plugin.
How do I create multiple questions section?
To create a new questions section, you will need to clone the Questions add-on.
How can I customize the display?
SabaiDirectory includes template files that you can modify to customize the output. The template files are located under the following directory:
wp-content/plugins/sabai-discuss/assets/templates
You can copy these files over to wp-content/sabai/assets (or wp-content/themes/[Your Theme]/sabai for versions older than 1.2.25) directory (you must create this directory) and modify however you like. Note that you do not need to copy all the template files over to the folder, but only those you want to make changes. Also if the directory you are trying to customize the display is a cloned directory, you can optionally create a folder at wp-content/sabai/assets/[Cloned Addon Name] (or wp-content/themes/[Your Theme]/sabai/[Cloned Addon Name] for version older than 1.2.25) and copy the template files to the folder so that the modifications are applied to the cloned directory only.
In addition to copying the template files, if you place a stylesheet file at wp-content/sabai/assets/style.css (or wp-content/themes/[Your Theme]/sabai/style.css for versions older than 1.2.25), this file will be read after all the plugin stylesheets are included. So use this file if you need to ensure that your custom styles are applied after the styles defined by the plugin core.
How can I add custom fields?
From the admin dashboard, go to Questions -> Questions and click on the Fields tab. There you will see a form editor with default fields on the main section and a small panel containing buttons to create new fields on the right. Simply click on the button of the field type you would like to create and fill out the form that will be displayed in a modal window. Submit the form in the window and you’ll see the field added to the bottom of the form editor section.
Currently there are 18 field types available:
CAPTCHA, Choice, Date, File, HTML, HTML Text, Image, Link, Location, Number, ON/OFF, Paragraph Text, Range, Section Break, Single Line Text, Social Accounts, Time, and User
How can I display custom fields?
Custom fields can be configured to be displayed in several locations of the plugin. By default, there are 2 locations:
- Single question page (Detailed view)
- Questions index page (Summary view)
To display the fields in the above locations, please follow these steps:
1. Go to Questions -> Questions -> Fields -> Manage Form
2. Hover over to your custom field on the form preview. When you hover over each field, one or more icons will appear at the top right corner of the field.
3. Click the icon with a gear image which will open up a form in a popup window.
4. Scroll down to the section labeled Display Settings (Detailed view).
5. Check the Display this field option. This tells the plugin to display the field on the single question page.
6. Optionally, configure settings displayed below in that section, such as Field render and etc., if any.
7. Optionally, repeat steps 4-6 for the section titled Display Settings (Summary view). This will tell the plugin to display the field on the questions index page.
9. Click Save Changes.
<div class="sabai-questions-custom-fields">
<?php $this->renderTemplate('questions_custom_fields', array('entity' => $entity));?>
</div>
If you need to display a specific field, e.g. field_xxx, then
you can use the following code in the template file:
<?php echo $this->Entity_RenderField($entity, field_xxx');?>
How can I style custom fields?
The following is the structure of the HTML markup of custom fields:
<div class="sabai-questions-custom-fields">
<div class="sabai-questions-field sabai-field-type-[Field Type] sabai-field-name-field-[Field Name] sabai-clearfix">
<div class="sabai-field-label">[Field Title]</div>
<div class="sabai-field-value">[Field Value]</div>
</div>
...
</div>
Here is an example of the HTML markup for a Single Line Text field:
<div class="sabai-questions-field sabai-field-type-string sabai-field-name-field-hours sabai-clearfix">
<div class="sabai-field-label">Opening Hours</div>
<div class="sabai-field-value">Mon-Sun 5:30 pm - 10 pm, Sat-Sun 5:30 pm - 9 pm</div>
</div>
As you can see, the field type and the field name are used as part of the CSS class names, so you can target specific fields to style them however you like.
If you want to go further to modify the HTML markup generated by SabaiDiscuss, you can edit the questions_custom_fields.html.php template file located under wp-content/plugins/sabai-discuss/assets/templates. Refer to the question “How can I customize the display?” for more details on editing template files.
How can I exclude certain custom fields from being displayed on the main content of the single listing page?
Follow the exact same steps instructed in the following FAQ but check off the Display this field option instead of checking it on.
How can I display custom fields?
You can exclude specific fields from the custom fields list (those displayed above the tabs) by modifying the questions_custom_fields.html.php template file. Refer to the question “How can I customize the display?” for more details on editing template files.
For example, if you need to exclude custom fields named field_my_field and field_my_field2, modify the following line in the template file:
<?php foreach ($this->Entity_CustomFields($entity) as $field):?>to
<?php foreach ($this->Entity_CustomFields($entity,
array('field_my_field', 'field_my_field2')) as $field):?>
I would like users with the Editor role to have access to the backend side of the plugin in the WordPress dashboard.
User roles with the manage_sabai capability can access Settings -> Sabai, and roles with the manage_sabai_content capability can access the pages under Directory. You can grant capabilities to user roles using another plugin like the Members plugin. https://wordpress.org/plugins/members/
Is there sitemap for Sabai Discuss?
Yes, Sabai Discuss will automatically create a sitemap index at the following location:
http://path-to-your-wordpress/sabai-sitemap-index.xml
Note that this is a virtual file so no actual file is created at the URL location.
Is there RSS feed for Sabai Discuss
Yes, Sabai Discuss generates an RSS feed of the most recent questions and answers. For example, on our demo site:
The most recent 20 questions and answerThere is also a feed for each user, which contains recent questions and answers submitted by the user. For example, the following is a feed of the demo user on our demo site:
Recent posts by demoTo view the RSS feeds on your site, replace the http://demo.sabaidiscuss.com part with your WP site URL and the questions part with the slug of your questions page on your site.
Any recommended plugins to use with Sabai Discuss?
The WordPress Seo by Yoast plugin is highly recommended which if installed generates title and meta description tags automatically for each listing and category. Sabai Discuss also supports breadcrumbs generated by WordPress Seo. Please visit the demo site to see it in action. Also please see the documentation by Yoast here for details on displaying breadcrumbs in your theme.
As of version 1.2.10, support for the All in One SEO Pack plugin has been added which if installed will also generate title and meta description tags automatically for each listing and category.
Are there email notifications?
Yes, there are 10 email notifications all configurable from the administration dashboard. Here is the list of all email notifications:
Can I use shortcodes in questions and answers?
Shortcodes are supported by the default Body field of questions and answers and Paragraph Text type custom fields. However they are not processed by default. In order to have shortcodes in these fields processed, go to Questions -> Questions (or Answers) ->Fields -> Manage Form, hover over to the Body field (or your Paragraph Text type custom field) and click the gear icon to edit the field. In the popup form, scroll down to Display Settings (Detailed view) and check the Process shortcode(s) option and press Save Changes
In addition, for security reasons, by default shortcodes are processed for questions and answers authored by users with the Administrator role. In order to process shortcodes in listings by other user roles, go to Settings -> Sabai -> WordPress (click gear icon) and select users roles under the User roles allowed to use shortcodes in content option and press Save Changes
How to add lightbox effect to images?
We recommend installing the “Responsive Lightbox” plugin, and then select “prettyPhoto” as the lightbox script in the settings of the plugin.
Are there any shortcodes?
Currently there are 5 shortcodes available.
Please visit the page below for details and examples.
http://demo.sabaidiscuss.com/shortcodes/How do I add my custom content at the top/bottom of the questions index page?
There are several ways to do this:
1. %sabai% placeholder
Go to the Pages section in the WordPress dashboard, and edit the page you have specified for the Questions Index Page in Questions -> Settings -> Pages. In the content section of the page, you can use the %sabai% placeholder which will be replaced with the content of the plugin. For example:
<p>My custom header</p> %sabai% <p>My custom footer</p>
This will however affect other pages in the plugin as well, so if you do not like that then you should assign different pages for Category List and Single Question pages in Questions -> Settings -> Pages.
2. sabai_questions_before_questions/sabai_questions_after_questions action hooks
You can add the following action hook functions to your theme functions.php or a new file at wp-content/sabai/functions.php:
To add your custom content above listings:
add_action('sabai_questions_before_questions', 'my_sabai_questions_before_questions', 10, 2);
function my_sabai_questions_before_questions($addonName, $settings)
{
if ($settings['category'] === 0) { // the main index page does not have a category
echo '<p>My custom header</p>';
}
}
To add your custom content below listings:
add_action('sabai_questions_after_questions', 'my_sabai_questions_after_questions', 10, 2);
function my_sabai_questions_after_questions($addonName, $settings)
{
if ($settings['category'] === 0) { // the main index page does not have a category
echo '<p>My custom footer</p>';
}
}
3. questions_questions.html.php template file
You can edit the questions_questions.html.php file which you can find under wp-content/plugins/sabai-discuss/assets/templates and add any custom content anywhere in the template file. Please see the following FAQ for more details on how to customize the display with template files.How can I style question pages with Visual Composer or Divi Builder?
By default, our plugin removes any content added by other plugins (via the the_content WordPress filter hook) to our plugin pages in order to avoid possible display conflicts.
Therefore you will first need to disable this feature by adding the following line of code to wp-config.php:
define('SABAI_WORDPRESS_DISABLE_REMOVE_FILTERS', true);
above where it says:
/* That's all, stop editing! Happy blogging. */
Then, using a text type component of your editor (e.g. Text Block in Visual Composer or Text Module in Divi Builder), insert the %sabai% placeholder to where you would like the content of our plugin to be displayed, which will be replaced with the actual content of our plugin in the frontend. For example:
<p>My custom content</p> %sabai% <p>My custom content</p>
Also make sure that you are using version 1.3.24 or later of our plugins.
How do I update the plugin from version 1.2.x?
Unfortunately updating from version 1.2 to 1.3 is not possible using the online update. You must manually delete the sabai and sabai-discuss folders from the wp-content/plugins directory using an FTP software.
Also if you have been using cloned add-ons, make sure to delete all files under wp-content/sabai/System/clones.
Then, upload the new plugin folders (sabai, sabai-discuss folders) to wp-content/plugins. You should NOT deactivate nor delete any sabai plugins from the Plugins page of WordPress dashboard.
After uploading the folders, go to the Plugins page of WordPress dashboard. You may see an error message saying that certain add-ons are not installed or a white screen.
However, do not worry and reload the page a few number of times until the page displays correctly, and then activate the Sabai Discuss plugin.
Next, go to Settings -> Sabai from the Wordpress administration dashboard and under the Sabai Add-ons section, upgrade all add-ons that are highlighted and have the Upgrade button displayed. Press the Upgrade button for each of these add-ons and follow the instructions displayed on the pop-up window. You can also do a bulk upgrade by checking the checkboxes on the left and pressing the Upgrade Checked button. Note that some add-ons may not be upgraded until certain add-ons have been upgraded first. Make sure to upgrade all add-ons until all add-ons are de-highlighted.
Also, depending on the upgrade package, there may be some add-ons that are newly available for installation. These add-ons will be listed on the Installable Add-ons table below the list of installed add-ons so you can click the Install button for each of them to make them active.
The last step is very simple. Go to Settings -> Sabai from the Wordpress administration dashboard and under the System Settings section, click the button labelled Clear Cache. If the cache is successfully cleared, you should see a green check button displayed next to the button that you just clicked.
That’s it, you should have now successfully updated Sabai Discuss to the latest version.
We'd like to ask you a few questions to help improve CodeCanyon.