MosQ is a very comprehensive component that you can develop entire application using sql in the logic center. You can chain the logic together and assign to a buttom to perform different function like: add, edit, save, remove
In this article I will attempt to explain some potentially confused "terms". This is just a starting point so if you want to see other to be added to help you utilize this component more fully please let me know and I will be happy to add them.
Quick Start 123 with MosQ:
All 3 steps should be done in the backend!
1. Create a Menu BAR. When install it comes with "Sample" already if you want to use that to get start
2. Create a logic and assign to a Menu BAR
3. Create a menu item that assign to MosQ component, then edit it again to give it a parameter of menuGroup=Yourmenu
For example: menuGroup=Sample (note: menuGroup must be exactly like this, notice the case)
That's it! Once it is done you should see a menu item on the frontend to click on MosQ and you should see a little "MosQ" logo and a menu bar above it.
Q: What is "menuGroup" in MosQ?
A: "menuGroup" is a logical grouping of your codes in your logic center where you want to show on the frontpage via the JSCook menuing system.
Q: How do you use "menuGroup"?
Q: How to show your menu on the frontend?
A: When you create a menu entry to point to MosQ and after you save the menu item, you will need to edit the menu item to enter "menuGroup=yourgroup" in the parameter box so that when you click on the menu item to your MosQ you will see a menu bar that show you a menu items of all of your logics that you create in the logic center for that "menuGroup"
Q: How to create the "menuGroup"?
A: When you create a logic in your logic center you need to do the minimum of two things to show on the frontend
- Create a menu logic or "MENU BAR" where you define the menuGroup name, menu name, permission level, view class, etc and this "MENU BAR" will show on your frontend.
- Create a menu logic where you define the actual logic that will be run when it was click on the frontend. You assign this logic into a "menuGroup" so that it will show on the frontend of the JSCook menuing system.
Q: How to create a logic?
A: In logic center, click new and fill in the info like the follow:
- Click the drop down to find the Menu Group that you want your logic to show in
- Click the drop down to find the Master Menu that this logic will show in
- Give it a Name, Title
- Click the drop down to find the Database that this logic will connect to
- Type in the SQL command in the logic text box. For example: sql@ select name from mos_categories
Then on the frontend you should see this logic listed under the menu that you created previously.
Note: When you install MosQ there should be a "Sample" menu bar created for you so to get started you can just take the sample code that I provide above and assigns it to "Sample" Menu Group then you should see something quickly!
Q: How to execute the logic?
A: You assign the logic to a menu item in the logic enter and it will show on the frontend and will be executed when the menu item was select on the frontend. The logic can also be executed by using MosQBot via { mosq #} where # is the logic number (note: extra space to avoid parsing of the bot}
I hope this article help to get started with this MosQ component.
Show (11) - Add comments:
|
Comments
What is your version of Mambo or Joomla, PHP, web server, etc? What version of MosQ are you using? If you want to can give this beta version a try: http://coaddonscms.googlecode.com/files/com_mosq106.zip Please provide as much detail as possible. Posted by Chanh Ong, on 04/25/2008 at 07:25 I'm having some trouble..i created the menu item, so i can see the Sample in the frontend but i cannot edit the Sample's logic and neither any other logic that i create..i'm able to create it but when i try to edit it it just returns 'Catchable fatal error: Object of class mosReporterQuery could not be converted to string in /public_html/mobilanoastra/administrator/components/com_reporter/admin.reporter.html.php on line 266' Posted by ren, on 04/25/2008 at 03:38 You are so right! I fixed it! Thanks Posted by Chanh Ong, on 12/18/2007 at 23:45 In the first instructions you state to use MenuGroup , however I could only get this to work if I used menuGroup (note the lower case 'm'). :For example: MenuGroup=Sample (note: MenuGroup must be exactly like this, notice the case) [b][/b] Do you see the 'Sample' menu when you install MosQ in the backend? You might need to click on the drop down to select the 'Menu Group'. You should also see the 'Sample' Menu Group on the frontend when you create the menu item that assign to MosQ with the MenuGroup=Sample Do you see the 'Sample' menu on the frontend after you create the menu item for MosQ? In respond to your comment, I update the above article with steps on how to create a logic and some sample code to get you start quickly. Please give that a try and let me know! Thanks Posted by Chanh Ong, on 12/01/2007 at 08:47 You are not authorized to leave comments. Please login first. |
|