1
geoffgibbs
Modules Suite
  • 2005/5/11 10:59

  • geoffgibbs

  • Just popping in

  • Posts: 9

  • Since: 2002/9/23


Not sure if this is the right forum for this, so please move it if it seems more suitable elsewhere.

I am about to start work on a number of modules for a community XOOPS site.
These modules will be designed to work together or by themselves.
For example:
One module can store contact details for people, while another stores information on organisations. When both are installed, and some preference enabled, it wil be possible to list the contacts for an organisation and vice versa.

Has anyone done anything like this before and is there any standard way of doing this?

Ideally I'd be looking at some form of plugin system, so that if there is a preffered contact module a plugin could be written to link the organisation to contacts from that module instead, for instance.



2
geoffgibbs
Re: Customizable login process, LDAP, Muiltiple DB support, Spellcheck
  • 2004/8/4 18:19

  • geoffgibbs

  • Just popping in

  • Posts: 9

  • Since: 2002/9/23


I've written an aspell-based spellchecker hack for XOOPS 2.0.7 (info: What about a spellcheck?) I plan to make the same changes to 2.2 for my own site, but it may be some time in the making.



3
geoffgibbs
Re: What about a spellcheck?
  • 2004/8/4 18:13

  • geoffgibbs

  • Just popping in

  • Posts: 9

  • Since: 2002/9/23


I have now produced Zip and Tar/GZip archives of the altered files (available here). You should be able to just extract these files into your XOOPS 2.0.7 root directory.



4
geoffgibbs
Re: What about a spellcheck?
  • 2004/8/3 13:54

  • geoffgibbs

  • Just popping in

  • Posts: 9

  • Since: 2002/9/23


I must admit, that I used Eclipse to produce the patch, but if you change to the root directory of XOOPS 2.0.7 and run "patch < spellchecker.diff" it should make the required changes.
I will try to produce a .zip and/or .tar.gz of the modified files soon.



5
geoffgibbs
Re: What about a spellcheck?
  • 2004/7/24 14:10

  • geoffgibbs

  • Just popping in

  • Posts: 9

  • Since: 2002/9/23


I've finished the first version of my (admittedly basic) spellchecker and have submitted it as a core hack here.
You will need to use a version of PHP with pspell support included, and have apsell installed on the server with the required dictionary.
If you plan to use a dictionary other than "en-british" you will need to edit the html/class/spellchecker.php file.
There is also a PHP file that should update the configuration database table to include the "use spellchecker" option in the main preferences, though this is untested .



6
geoffgibbs
Re: What about a spellcheck?
  • 2004/7/7 12:50

  • geoffgibbs

  • Just popping in

  • Posts: 9

  • Since: 2002/9/23


I have implemented a spell checker for one of my XOOPS sites (GCNM.org.uk) using the aspell/pspell functions.
It adds a "Check Spelling" button to forum and comment posts that shows as a preview with combo boxes for miss-spelt (miss-spelled?) words with alternative to choose from.

In theory it should be able to support multiple languages, but I was concentrating on English first.

I have yet to update to XOOPS 2.0.7 and plan to add the spell checker to news posts too.

If you want patch files when I'm done, let me know.



7
geoffgibbs
Re: Removing users from groups
  • 2004/4/8 23:09

  • geoffgibbs

  • Just popping in

  • Posts: 9

  • Since: 2002/9/23


In the file /modules/system/admin/groups/main.php on or about line 223 you should find the following lines of code (the formatting may be different):
if ($groupid == XOOPS_GROUP_ADMIN) {
  if (
$member_handler->getUserCountByGroup($groupid) <= count($uids)){
    
redirect_header('admin.php?fct=groups&op=modify&g_id='.$groupid.'&memstart='.$memstart,0,_AM_ADMINNO);
  }
} else {


Try changing this to:
if (($groupid == XOOPS_GROUP_ADMIN) && ($member_handler->getUserCountByGroup($groupid) <= count($uids))){
  
redirect_header('admin.php?fct=groups&op=modify&g_id='.$groupid.'&memstart='.$memstart,0,_AM_ADMINNO);
} else {


This should fix the problem.

What happened was, that if you were deleting a user from the admin group, it checked to ensure it was not the last admin user. If it was the last admin user it would displaying an error and redirect the page (as it should). If it wasn't the last user, however, it simply did nothing as the rest of the code was only run if it was not in the admin group.

Anyway. I hope this helps.



8
geoffgibbs
Re: Embedded PHP
  • 2003/12/1 15:54

  • geoffgibbs

  • Just popping in

  • Posts: 9

  • Since: 2002/9/23


Great! That's just what I was after. Thanks.



9
geoffgibbs
Embedded PHP
  • 2003/12/1 14:13

  • geoffgibbs

  • Just popping in

  • Posts: 9

  • Since: 2002/9/23


Hi,
I'm working on a theme for my site and would like to embed some PHP code into the theme.html file. I believe that this is possible, but don't know how to do it. Can anyone help?

Thanks.
Geoff




TopTop



Login

Who's Online

244 user(s) are online (160 user(s) are browsing Support Forums)


Members: 0


Guests: 244


more...

Donat-O-Meter

Stats
Goal: $100.00
Due Date: Apr 30
Gross Amount: $0.00
Net Balance: $0.00
Left to go: $100.00
Make donations with PayPal!

Latest GitHub Commits