Marko's µBlog Small, but powerful PHP blog script =============================================================== v2.0 RC-10 =============================================================== 1. Installation --------------- Installation is very easy! Upload the files and run index.php. You need PHP and MySQL for this script to run. Note: The script only requires one MySQL table so you can use a shared database. Note: You must chmod 777 the folder you put the script in - otherwise the installation wizard won't be able to create the config.php file. Note: If you're not living in the Central European region, you'll have to change the encoding setting in your chosen style's header template file (_template_header_.htm)! Note: You can upgrade an existing µBlog 1.x installation. Just backup your modified styles to a safe place, delete the whole blog directory, unzip µBlog to it and run the setup wizard. Enter your existing MySQL database and MySQL table details and select "Upgrade". 2. Usage -------- After the installation visit index.php again and login via the link provided. You can then post new entries by selecting "Post a new blog entry". Note: You're logged in until you close your browser's window or go to administration panel and select "Logout" at the bottom of the page. When logged in, you can edit posts / comments by clicking on their titles. Also, when you're logged in, you can check commenter's IP by moving your mouse pointer over his / hers name. "Read more >>" -------------- You can put the {more} tag anywhere in your post to cut the entry in two - the first part will be shown on the front page and the second part will only be shown on a seperate entry page. 2.1. User levels ---------------- There are 3 user levels in µBlog (new in 2.0): * Poster ******** - Can post blog entries - Can edit / delete his entries / comments - Can edit / delete comments in his entries - (he can't do anything else) * Moderator *********** - Can post blog entries - Can edit / delete any entry / comment - (he can't do anything else) * Administrator *************** - Can do everything ;) (in addition to moderator's abilities he can edit/delete links, add/edit/remove users and change just about every aspect of the blog) Note: The user created by the setup wizard has Administrator privileges. 2.2. Sections ------------- When posting / editing a blog entry you can define / select a section for it. If you delete all posts within a section, the section itself is deleted, too. 2.3. Links ---------- From your administration panel you can add / edit links that appear in the sidebar. Hint: use the "Do not publish on the front page" feature when posting a new entry to create a new sub page and then link to it from here. 2.4. Plugins ------------ You can put / create µBlog plugins in the folder called "plugins". Each plugin has its own .php file, for example my_plugin.php. These plugins are meant to add content to your blog via template files. Each plugin generates one template variable, for example my_plugin.php should generate {my_plugin} which can then be used in any of the 5 template files (header, footer, post, comment, sidebar). Note: Most plugins require you to chmod 777 their folders - click [help] in the plugin list to see that plugin's usage instructions. 2.4.1. Developing plugins ------------------------- Hint: study the bundled test.php plugin to see the structure of a simple plugin. As of version 1.4, you can now use "protection=off" in your GET request to turn of POST protocol MySQL injection protection when working with raw data. But remember to use stripslashes function anyway. 2.5. Pagination --------------- You can enable pagination in the admin panel and then use the {pagination} tag either in the header or in the footer template page. An example of pagination: << 1 2 3 4 5 6 7 >> | | |___[move one |___[move one page back] page forward] 3.1. BBcode --------- µBlog uses BBcode for styling / inserting objects into the posts. Some examples: [b]this text is going to be bold[/b] [i]this text is going to be italic[/i] [color=red]this text is going to be red[/color] [size=8]resize this text to 8px[/size] [url=http://www.google.com/]Click here to go to Google's homepage[/url] [img]http://www.example.com/image.jpg[/img] [list] [*]list item no. 1 [*]list item no. 2 [/list] ^^ You can mix / nest these if you wish. 3.2. HTML --------- When enabled, you can use HTMLarea to input HTML text. See 5.2. 4. Languages ------------ You can find the included languages in the /inc folder. If you want to make a new translation, simply copy one existing .lng file and rename it to your_language.lng. You should then edit the copyleft notice and the strings in double quotes (nothing else!) to make a new translation. If you wish, you can then send it to me (marko@stamcar.com) and I'll include it in the next release. Currently supported languages: - English - Slovenian - German by Kamber - Dutch by Walter - Estonian by Hardi - Hebrew by Gilad - Swedish by Wandel - Hungarian by Krobb - Spanish by Pedro - Brazilian - Portuguese by Mateus - Traditional Chinese by Owen & Anthony - Portuguese by José - Norwegian by Jonathan - French by Olivier - Italian by Federico - Danish by Simon - Czech by Eborebelosa - Slovak by Radoslav 5. Templates ------------ You can make your own templates by mimicking those already included. You can find the templates in the /styles subfolder. A typical template consists of: style.css - main CSS style design template files you can use these variables here: ĦĦĦĦĦĦĦĦĦĦĦĦĦĦĦĦĦĦĦĦĦ ĦĦĦĦĦĦĦĦĦĦĦĦĦĦĦĦĦĦĦĦĦĦĦĦĦĦĦĦĦĦĦĦĦ _template_header_.htm - {html_title}, {blog_name}, {blog_description}, {blog_index.php}, {blog_folder}, {pagination} _template_footer_.htm - {lang_valid_xhtml}, {lang_valid_css}, {lang_valid_rss}, {pagination} Note: you can use all the sidebar's variables here also. See below. _template_post_.htm - {title}, {text}, {link}, {section_link}, {section}, {timestamp}, {id}, {lang_comments}, {comment_num}, {author}, {day}, {month}, {year}, {hour}, {minute}, {second}, {comment_link}, {view_count} _template_comment_.htm - {title}, {name}, {text}, {lang_by}, {e-mail}, {timestamp}, {day}, {month}, {year}, {hour}, {minute}, {second} _template_sidebar_.htm - {lang_archives}, {archives}, {lang_sections}, {sections}, {lang_all} {lang_language}, {languages}, {lang_links}, {links}, {lang_search}, {blog_script}, {lang_search_button}, {lang_administration}, {lang_login} Note: All these _template_ files must exist for every style you have. Tip: If you want to disable the sidebar feature, the solution is to delete everything from the _template_sidebar_.htm file and leave it this way (empty). Tip: You can use plugins' variables anywhere in the 5 template files for each style. (see 2.4.) 5.1. Some additional links -------------------------- If you wish to have links / sections / languages / archives lists displayed on seperate pages, use these 4 links: index.php?links=1 index.php?sections=1 index.php?languages=1 index.php?archives=1 5.2. "Nicer" URLs ----------------- When viewing specific blog entry, you can choose between two URL styles: index.php?comment=118 or index.php/post/118/ The second one is caled a "nicer" URL and can help your blog to get indexed by search engines (e.g. Google). Important: To use this feature, enable it in the administration panel and add the following HTML code to your blog's header template file just after the
tag (important!):