Some basics about how it worksCuteMarks is quite simple: Two tables are storing categories and link nodes in a tree like structure. Categories can contain link nodes and additional categories, link nodes just sit at the end of the tree. There is virtually no limit in depth of the tree nor in size. I've made some tests with 1,000+ nodes beeing handled in a friction of a second on a dedicated 1,4 GHz Athlon machine from calling the script on the webservers until giving back the output.
The main object - see below on a description how to use it in your own code - works quite simple: When initialising it reads all nodes from the database into memory. This might look like as an expensive operation but in fact it isn't: The amount of a "normal" bookmark collection data is normally quite small and the database handles "SELECT *" queries really, really fast. Of course, handling a 40K+ bookmark collection can be though of very memory consuming, but you may want to use something other than CuteMarks for such a large collection anyhow. And because the whole collection is now in memory the remaining stuff can be done really fast as no further database reads are necessary. Some arrays are created in memory from this data which help to display the final tree and finally the tree itself gets drawn node by node. Please have a look in the - I think ,-)) - well documented code for further details.
Using the object interface to the tree view
This section is intended to be used if you plan to have the tree displayed somewhere from your code. You may create a wrapper or whatever with just a few line of code. If someone writes a wrapper for a portal like phpNuke, please drop me a mail as I'd like to include this in the core distribution of CuteMarks.
[# Interface to be described here #]
Use CuteMarks from a public users view
The user interface is quite simple
Use CuteMarks from an admins view
This is also very straight forward. Additionally to the above user provided functions each link and category features a set of additional functionalities, each of them accessed by clicking on the appropriate text behind the URL or category name:
When you move something anything you're presented with a new screen, asking you for the appropriate details.
If you want to setup the script in a way that by clicking on a link a specific part of the tree gets already opened, just add a "?node_exp=<cat_id>" to the "index.php" HREF-link as parameter where <cat_id> is the id of the category you want to have shown. If you want to show more than one category in exploded view just put them one after another separated by a comma.
Sorry guys, no magic, just some simple stuff *gg*
Customising CuteMarks is easy and makes fun ,-)) Read the following section and setup you personalised version within a hour (or so... g)
Every PHP script has a name matching template in the ./templates directory.
E.g. the index.php uses ./templates/index.tpl. So if you want to add graphics,
modify colours etc. you just need to change the template(s) and replace
the ones that came with the original distribution of CuteMarks.
You could easily also translate CuteMarks as a whole just by translating the text in the templates. If you have done this, please drop me a mail and probably a translated version of the templates. I'd like to include the templates either in the distribution directly or mark you as contributor for a translated version (if you like) where other people can request a version directly.
Using another css-style sheet
Because CuteMarks comes - currently - without any graphics there is no need to change the templates if you don't plan to translate them. I strongly recommend to use the css mechanism to change this which is also natural to the WWW itself, of course.
There're a number of fixed names for various styles you may use. If you alter the names, ok, you're on your own. Because you have to change this on the next release again as I surely will not change my css to reflect you personal changes (and that of several other users too,-))
Anyhow, if you think you'd like to see a css-enhancement (another style for an additional element) or something is really weird in the current original stylesheet please drop me a mail or use the SourceForge bug reporting system.
Currently the following custom style names are used (and can be used in customised templates without harm as they will be supported in the future):