So - one of the projects i used to work on required me to make custom modules. one of the things i like about dolphin was the ability to easily create new modules - or even simple pages - for various reasons. as such, the first thing i did when checking out his new here cheetah - was to create a module. and i was rather impressed that i had zero hiccups. even having created them over and over again, i always had some issue when using dolphin - i didnt have that issue here. granted, a few times were programmer or user error.
with that being said - i am going to detail my walkthrough on how to create a module in cheetah - for those who didnt know already. a few key points to always remember. this is not a creation of a brand new module - but cloning the groups module for your needs. i have done a lot of different things using the groups module as a base. second - EVERYTHING IS CASE SENSITIVE. if you screw that up - just start over.
1 - create a folder in the modules folder and name it whatever you want - for our example, lets call it 'example'. so create a folder named example.
2 - copy the groups module folder and all its contents into your example folder. so at this point, you should have a folder named example, with the groups folder and all its contents in it.
3 - rename the groups folder to whatever you want to call the module - so for our example, we will call it 'newbie'. so now, you should have a folder called example, with a folder called newbies inside of it (the "s" is important here so make sure it is there). also - you gotta choose a two character identifier. for this example, we will use "NM". we will use this later.
4 - open the newbie folder, then open the templates folder, then open the base folder
5 - rename the following files according to your module name
latest_featured_group.html >>>>> latest_featured_newbie.html
my_groups_create_group.html >>>>> my_newbies_create_newbie.html
my_groups_main.html >>>>> my_newbies_main.html
my_groups_manage.html >>>>> my_newbies_manage.html
6 - here is where it gets a bit complicated. again - remember that everything is case sensitive group does not equal GROUP does not equal Group. also - in this part - do not include the 's' at the end of group, group, group, newbie, newbie, newbie. if using a program that allows for changing multiple files at once - make sure 'match case' is selected, and make sure that "ignore white space" is NOT selected. and - remember that identifier we talked about in step 3? now we begin to use it. you will also need to come up with your vendor name - it is needed in this step - which we will call VendorName
rename all of the instances of each of the following:
group >>>>> newbie
Group >>>>> Newbie
GROUP >>>>> NEWBIE
ch_newbie >>>>> nm_newbie
ChNewbie >>>>> NmNewbie
cheetah >>>>> example
Cheetah >>>>> VendorName
default_newbie >>>>> default_group
getNewbie >>>>> getGroupChooser
wall_outline_newbieed >>>>> wall_outline_grouped
mixedNewbieId >>>>> mixedGroupId
isDynamicNewbieMember >>>>> isDynamicGroupMember
newbieed >>>>> grouped
isNewbieAdmin >>>>>> isGroupAdmin
7 - remember that 2 character identifier we used in the last step? we are going to use it again here. so go into the /modules/example/newbies/classes folder. you have to rename each one of these files by changing the first part. there are 19 of them.
ChGroups..... >>>>> NmNewbies.....
8 - take a break. sit back . and get ready for the worst part.
upoload to server and install like any other module. make sure to upload using ftp - not from within the site admin section - i have not tested to see if that works yet.
now sit in agony for 3 to 5 seconds while you pray and hope that everything works. because if it didnt you dont know where to start troubleshooting.
a few things to keep in mind. if you add any new tables to the database for your new module, make sure to include the sql statements in the install.sgl file. and also make sure to include an sql statement to drop those tables in the uninstall.sql file. PLUSt, any changes you make to the database should be included in the install.sql file.
Empty
|
Level | Intermediate |
Empty
|