Myparse General FAQ

Created by ronaldo_b
Keywords:
myparse ikipress DBOM

Q. How does this all work?
A. Myparse uses returned SQL results to control how a web object is displayed on a page, dependent on the passed URL.

Q. How?
A. Myparse turns the passed url into SQL criteria for matching valid data.

Q. How do I edit blocks/templates?
A. For now, myparse does not include an editor, we recommend the popular phpmyadmin, or the very fast and lightweight (but not as feature laden) dbkiss. You copy and paste html inside block_content and provide values in fields (such as the order of the block, page title, etc.), note that you can also use markup variables in most fields.

Q. Why is markup important?
A. All markup constructs can be used in most of the block/template fields. What this means is you can have a SQL statement populate other fields in your block object to create dynamic block functionality.

Q. How do templates work?
A. Create a template in mp_templates, then when ready to use, create a block in mp_blocks, and define field 'block_template' as the name of the mp_template you created in 'mp_templates'. When the block is accessed, myparse will use the template fields instead of the block fields (through a join statement.) This allows users to keep data inside of the block, but not show it.

Please note that defined template_options will not override existing block_options.

Q. What kind of markup constructs exist?
A. The most used are the url constructors, that look like : (!(0)!), (!(1)!) and so on, and refer to the components of the passed url. You can use these variables in your SQL select statements to influence returned records. You could use them in your block_content to pass to another plugin, etc.

Next up is the [root] construct which refers to the actual website root, and are often used for links (instead of 'hard coding' links.) This is useful when you are moving your myparse installation to another server or directory.

Parsed database field markups : ((database_field)). These work when a query is provided and returns results and refer to returned values. If you have a result with multiple rows, you may want to use the (start( )start) and (stop( )stop markup variables. Anything between these constructs will not be looped. This is useful if you want to format your output data in a table or unordered list.

User defined variables : these are variables defined in user_vars.php by either the user or a plugin developer. They appear as : [user_var] . When this string is encountered in a block it is replaced with its value in user_vars.php ( ex $user_vars['user_var'] = 'my variable';

Q. Why?
A. By using the database to perform most complex operations you reduce the memory use of the application, and make page rendering faster. By creating a class of simple variables and objects you can create a powerful, simple, and fast program architecture that can be easily moved, modified and expanded.

Q. How much memory does myparse use?
A. Around 350k and up, depending on plugins used, and the size of the returned page.

Q. How long does a page take to render?
A. Usually around less than .0100 seconds for most pages. More advanced pages may take longer, usually around .05 seconds. Cached pages render in typically .0002 seconds.

Q. How does caching work?
A. When enabled (through config.php) will begin to store urls if they are not already existant. When a url is requested myparse checks to see if the file exists, and if it is up to date. If it is not, blocks.php is loaded, a database connection is made and the url rendered normally. If this result is different from the existing cache file, it is overwritten, if it is identical the file is 'touch'ed.

Q. Why?
A. This is the simplest/fastest caching method that I have found. Its configuration is flawless, its execution fast, memory use almost non existant, but most importantly does not make a database connection or load a lengthy php script to figure out what to show.

Q. How is this different from Aikiframework?
A. On the surface, aikiframework has an admin interface and user administration/form generation. At the core level, aikiframework is much larger, has a different database/table structure, and does not have most of the features myparse does (like treemaps, templating system, google anayltics integration, optioning system etc.) Also aikiframework uses 4x as much memory.

Q. Will myparse eventually have membership and forms?
A. Eventually.