Featured Sites: A-Z Index

H


Newest 10 Entries

Question How do I set the correct file permissions for Composr?
Answer If you're using the quick installer, it will handle file permissions automatically. On a suEXEC-style server, default permissions (744 for directories and 644 for files) are usually sufficient. However, _config.php should have 600 permissions for security.

Without suEXEC, specific directories (e.g., caches, uploads) and files (e.g., _config.php) require 777 (full access) or 666 (read/write) permissions. The fixperms.php script can automate this process on Linux and Windows.
Question How do I install Composr on Linux?
Answer After ensuring your web host meets the requirements and you have a database ready, you can install Composr on Linux using the following steps:
  • Upload the Composr files to your web directory.
  • Navigate to the install.php file in your web browser.
  • Follow the on-screen instructions, providing the required information, such as database details and administrator credentials.
  • After the installation is complete, delete the install.php file for security reasons.
Question What are the prerequisites for installing Composr?
Answer Before installing Composr, ensure your web host meets the minimum requirements. Familiarize yourself with your web host's control panel (e.g., Plesk, cPanel), which you'll use to manage databases, subdomains, and other settings. Gather your SFTP/FTP credentials (hostname, username, password), usually emailed upon signup. Set up a MySQL database and note its details: hostname (often 'localhost'), username, password, and database name. Ensure the database user has full read/write/administer access to the database.
Question What tools are available for debugging Composr code?
Answer Composr offers a code quality checker addon that helps identify various types of errors, including parser errors, run-time errors, and logical errors. This tool can significantly reduce debugging time and enhance code reliability. It is available through the testing_platform addon.
Question What are some key coding standards in Composr?
Answer Composr emphasizes clean, well-structured code with a focus on readability and maintainability. Key standards include proper indentation, consistent use of comments, and clear function headers with type definitions. Remember: beautiful code leads to better functionality and collaboration!
Question Where can I find resources for learning PHP programming?
Answer While Composr documentation doesn't cover basic PHP, resources like the official PHP documentation (

PHP: Hypertext Preprocessor

PHP is a popular general-purpose scripting language that powers everything from your blog to the most popular websites in the world.

View

), online tutorials, and the Composr API guide can help you learn.
Question What is the purpose of the Code Editor?
Answer The Code Editor is a web-based tool for editing Composr code files directly on the server. It requires password authentication and automatically manages overrides within _custom directories.

To access it, go to yourbaseurl/code_editor.php.
Question How can I export and import custom addons?
Answer Composr allows exporting addons as TAR files, containing all necessary files and an addon.inf file for metadata. You can import these addons to share and reuse them across different Composr installations.

To do this, make your necessary files for the addon in the Composr installation, and then go under Admin Zone > Structure > Addons > Export addon. You can select the relevant files for the addon, provide information about the addon, and then download the TAR file (which can then be imported on other Composr sites).
Question Can you give an example of creating a new module?
Answer Imagine creating a "Testing" module to manage collaborative testing:
  • Define purpose: Allow testers to add, assign, and track tests, with security and forum integration.
  • Design database: Plan the necessary database tables and fields to store the module's data.
  • Create module shell: Write the basic module structure based on standard Composr modules.
  • Define screens: Identify the module's screens and code their corresponding functions.
  • Utilize API functions: Use Composr's built-in API functions like create_table, add_privilege, and do_template to implement functionality.
Question What are the different ways to extend Composr functionality?
Answer You can extend Composr through:
  • File overrides: Replacing existing source files with modified versions in _custom directories.
  • New Modules/Mini-modules: Creating new modules for complex functionalities or mini-modules for simpler ones.
  • New Blocks/Miniblocks: Adding reusable content blocks.
  • New API code: Adding new PHP files to the sources_custom directory.
  • Hooks: Writing hooks to add features to specific areas of functionality.

Top 10 Entries

Question How do I add dynamic content to my Comcode pages?
Answer Composr utilizes "blocks" to embed dynamic content and functionality within Comcode pages. These blocks can range from displaying recent forum posts to showing information about the logged-in user.

To add a block, you can use the "block construction assistant" accessible via a button above the editor. This tool provides a user-friendly way to:
  • Browse and select available blocks.
  • Configure the block parameters.
  • Preview the block output.
  • Generate the necessary Comcode to embed the block.
Question How do I create a new Comcode page?
Answer Composr provides two easy ways to create a new Comcode page:

Method 1: Direct URL Entry
Type the desired URL of your new page into your browser's address bar.
Since the page doesn't exist yet, Composr will present you with a 404 error and a link to create it. Click the link to open the Comcode page editor.

Method 2: Admin Zone
Navigate to Admin Zone > Content > Pages (Comcode pages).
Scroll down to the list of existing pages and enter the name of your new page using the ":" (page-link) format. For example, a new page in the Welcome zone named "about" would be entered as ":about", or a new page in the "site" zone named "foobar" would be entered as "site:foobar".
Question What are Comcode pages?
Answer Comcode pages are standalone content pages within the Composr system that you can create and edit using either a WYSIWYG editor, a simple markup language called Comcode, or a combination of both.

Think of them as documents within your website, offering flexibility beyond the structured content provided by modules like forums or news. You can use them to build landing pages, about us sections, contact pages, and more.
Question Can I create custom Comcode tags?
Answer Yes, you can create custom Comcode tags through the Admin Zone > Setup > Custom Comcode. This allows you to add unique functionality or wrap specific HTML code (especially if you use a certain block of HTML frequently on your site) for easier use. Custom Comcode tags can be tailored to your needs and even include your own parameters. You can also specify if the Comcode is dangerous so only those with elevated privileges can use it.
Question What are the security considerations when using Comcode?
Answer Composr has a multi-tiered security system for Comcode. HTML code is filtered based on user permissions to prevent XSS attacks. Content is parsed with different credentials depending on who is editing or adding it, ensuring users can't elevate their privileges by modifying existing content.
Question What is oEmbed and how does it work with Comcode?
Answer oEmbed is a system that allows you to embed content from other websites simply by pasting its URL. When you paste a supported link in Comcode, oEmbed will automatically embed the content for you in a nicely-formatted box. For example, pasting a YouTube video link will embed the video directly into your content so it can be played on your website.
Question How do I add attachments to my content?
Answer Composr has an integrated attachment system. You can upload files, like images or documents, via the attachments section (or the image button if using the WYSIWYG editor with simplified attachments UI), and they will be automatically added to your Comcode using the attachment tag. You can then move this tag within your content to position the attachment as needed.
Question How do I use Comcode tags?
Answer Comcode tags are similar to HTML tags, but use square brackets [] instead of angle brackets <>. Each tag has an opening and closing tag, with content in between.

Example: [b]This text would be bold.[/b]

Tags can also have parameters:
Example: [img src="image.jpg" alt="Image description"]

A shorthand exists for the param parameter (the primary parameter of Comcode tags):
Example: [page="_SEARCH:howdy_do"]Howdy do[/page]
Question What are the advantages of using Comcode?
Answer Comcode offers several advantages:

Intuitive content authoring: It's written like plain text, making it easy to learn and use.
Dynamic functionality: You can embed dynamic content like blocks, comments, and forms using Comcode.
Special effects: You can easily add prebuilt graphical features like tabs, carousels, and more.
Basic styling and layout: Comcode allows for basic website styling and page layout.
HTML integration: For advanced styling and layout, you can embed HTML code within Comcode with the semihtml tag.
Question What is Comcode?
Answer Comcode is Composr's markup language, similar to BBCode used in forums. It allows you to create formatted text, embed dynamic content like blocks and attachments, and even mix in HTML for advanced styling. It's user-friendly and designed to work alongside standard web technologies.