How does authentication work with the server-side API?
Answer
Authentication is handled automatically using cookies, similar to regular website requests. If cookies are not feasible, the response parameters device_auth_member_id_cn/device_auth_pass_hashed_cn/device_auth_member_id_vl/device_auth_pass_hashed_vl from the login endpoint can be resent as POST parameters in subsequent requests.
How do I access the server-side API for my mobile app?
Answer
The server-side API can be accessed via HTTP calls to http://yourbaseurl/data/endpoint.php. Results are returned in JSON format. The API utilizes endpoints with a 'hook' name and a 'hook type' categorization. Both REST-style and GET-parameter style requests are supported, with the latter recommended for simplicity.
What is the purpose of the Composr Mobile SDK Toolkit?
Answer
The Toolkit, part of the composr_mobile_sdk addon, aids in mirroring Composr website resources into a mobile app. It includes tools for generating iOS/Android string resources from language files and exporting theme images in a directory structure suitable for iOS/Android app image assets.
To connect to a Composr site, you will need to install the composr_mobile_sdk addon, which is not bundled. This addon provides scripting to generate app assets from the Composr site.
Composr Mobile SDK (CMS SDK) is a toolkit designed for experienced iOS and Android developers to build mobile apps that integrate with a Composr-powered website. It offers both Composr-specific integrations and a collection of standalone utilities for building apps, providing a common base between iOS and Android akin to the PHP and Composr APIs, enabling easier code porting while maintaining a native experience.
Composr follows a rolling release model. This means:
New major/minor versions are released as they are ready.
Patch releases, primarily containing bug fixes, are only released for the latest supported major/minor version branch.
Users are responsible for staying updated to the latest release or applying necessary hotfixes.
This policy allows developers to focus resources on the latest versions and encourages users to leverage the ongoing improvements. You can find the release status on the Composr maintenance status page.
Constructive design feedback is valuable. To provide effective feedback:
Be specific and detailed. Identify particular issues and provide clear examples.
Offer solutions. Suggest improvements or provide mockups demonstrating your ideas.
Avoid vague statements. General comments like "it looks dated" are unhelpful.
Understand design constraints. Consider factors like modularity, generality, feature density, compatibility, performance, and the subjective nature of design.
Directly reporting specific design bugs to the tracker or redesigning Composr interfaces yourself are excellent ways to contribute.
Be comprehensive and self-contained. Provide all necessary information and context for the developers to understand your suggestion.
Focus on widely beneficial features. Esoteric suggestions are less likely to be implemented.
Understand developer constraints. Feature development depends on factors like developer availability, funding, and project strategy.
Consider sponsoring features. Financial contributions can prioritize the development of desired features as it affords developers the time to implement it.
Why are my searches slow, and how can I improve search speed?
Answer
Slow searches can occur when dealing with large amounts of content. Here are some workarounds and solutions:
MySQL timeout setting: For MySQL 5.7+, set a query timeout to prevent searches from locking up your database. Composr automatically sets this, but you can configure it manually if needed.
Use InnoDB tables: Switching to InnoDB tables in MySQL can prevent slow queries from affecting other users on your website. Note that InnoDB is not officially supported by Composr yet.
Enable the fast custom index: As mentioned earlier, the fast custom index is optimized for handling large datasets and filtered searches, potentially leading to significant speed improvements.
How does the search engine handle different languages?
Answer
Composr's fast custom index supports multiple languages. Content is indexed based on its translated version, ensuring that you get relevant results even when searching in a different language.
Quoted phrases allow you to search for an exact sequence of words. For example, searching for "red apple" will only return results containing that exact phrase. Keep in mind that enabling quoted phrases can increase disk space usage.
Stop words are common words (like "the", "a", "is") that are ignored by the search engine because they add noise and don't contribute to the meaning of the search query. You can customize the list of stop words for the fast custom index. See the search tutorial for more information.