This is for UBB hackers only. If this has been posted already, my apolgies, but I got it to work and some of you may find this useful for future hacking. I've included editorial comment at the end as I have some thoughts on this.
First the procedure, how to create manage/hack a custom wordlet file into the CP, where xxxx is the name you made up:
1) always name it "vars_wordlet_xxxx.cgi"
2) in cp.cgi add in a new require statement so the file is included, i.e.
3) hack cp_common.pl template as follows:
After line 133 (in the wordlets section, and userStatus is administrator) add in the HTML like this:
4) hack cp_wordlets.cgi in UBB cgi-bin dir:
After line 26 (before any elsif conditions that follow) add:
Then find:
Directly BELOW that add:
Done.
I used the above procedure and got it to work great. Now for a couple of caveats or suggestions:
* I advise using the format of vars_wordlets.cgi to create your new wordlet file (use the name => q~data~, syntax for each field)
* The method I used makes sure the wordlet can only be modified by the administrator. Knowing this, be careful how you insert the HTML into cp_common.pl template.
Now for an editorial comment:
InfoPop coulda used better subroutines with less redundancy, make everthing a variable and allow definition of wordlet files in cp.cgi which defines their names and authorized users (i.e. admin only). Thus, we'd only hafta hack some HTML in the template and a few lines in cp.cgi. This was poorly designed in that sense. My concern is to hack the CP takes alot of effort on the end user and are documentation will be longer. This is not the end of the world, but it sure could be better planned out to reduce typing and redundancy of sub routines.
Okay, I got that outta my system. If any questions or comments, go for it. All in all, it wasn't hard to do and works like a charm on my UBB6 gold. I'll be porting my login.cgi hack to the CP for both wordlet and feature configuration.
-jim
[edited to add tab into CP display]
[ March 22, 2001: Message edited by: hate98 ]