Description

• Purpose : to create a glossary ordered by categories, with users participation who - among permissions - are allowed to send definitions or request new ones.

• Blocks displayed on index page :
- Advanced search : search by category, title or content
- Browse by letter
- Browse by categories
- x Recent entries
- x Popular entries
- 1 Random entry

• Xoops blocks :
- x Newest terms (display title and date)
- x Most read terms (display title and hits)
- 1 Random term (display title and x firsts caracters)

• Advanced features :
- wysiwyg editors allowed
- captcha (Security images module, see www.dugris.info)
- Xoops comments
- activation / desactivation of category feature
- show links to other glossary terms in the definitions
- social bookmarks
- Script.aculo.us-Autocomplete
- x metakeywords
- import datas from Wordbook
- rss feed


Note : corrections in comments made by mjoel have been included. Thanks :)

Features:


System Requirements:



Other files by: Burning

X-Movie (2009/09/18)

The comments are owned by the author. We aren't responsible for their content.
user

 Re: Lexikon 1.1


Hi Burning,

Thanks a lot for releasing this module. I really want to use this module on my site. however on my test system I am getting the following error:

INSERT INTO xoops_lxcategories (categoryID, parent, name, description, weight) VALUES ('', '0', 'Disease & Bacteria', 'Disease & Bacetrias', '1')
Error number: 1366
Error message: Incorrect integer value: '' for column 'categoryID' at row 1

I can fix them by removing categoryID (or default colum), from all insert queries. I am just wondering if there is any easy way to fix. or would you like to release a next version fixing this issue.

my environment details.

XOOPS Version - XOOPS 2.3.2
PHP Version - 5.3.0
MySQL Version - 5.0.67-community-nt-log
Server API Version - apache2handler
OS Version - WINNT

Thanks in advance

 
user

 Re: Lexikon 1.1


Hi All,

After few changes to SQLs (due to above error), I have used this module on my production site. It's a great module, and I really like the way it works.


you can see it in action.

http://aquariumhomecare.com/modules/lexikon/

If anybody need a copy of the changes I have done to the code, give me a shout and I will mail you. Hope module developers will correct them and update the repository after QA.

Happy Xooping.. :)

 
user

 Re: Lexikon 1.1


hi' deepak267

There is no developer who really keeps updating this module. Simply successive corrections as you have done today.

So could you send me this module, I will update repository : I think it is important for dev to have most recent version.

Email : xoops4noobs AT gmail DOT com


Thanks in advance

 
user

 Re: Lexikon 1.1


I have mailed you the code.

Thanks for your help and I will be glad if I could contribute to Xoops.

Deepak

 
user

 Re: Lexikon 1.11


hi'

Archive updated, thanks for it and little changelog

 
user

 Re: Lexikon 1.11


I got an error when trying to access the module from admin:

NoticeUndefined variablexoopsDB in file /modules/lexikon/admin/menu.php line 86

 
user

 Re: Lexikon 1.11


hi' MrPhilong

Thanks for reporting bug.

Lexikon 1.10 is still inside archive, did you try it ?

(I'm sorry, I'm not able to correct bugs : don't know php )

 
user

 Re: Lexikon 1.11


in admin menu.php

before line 86;

if (!lx_FieldExists('parent',$xoopsDB->prefix('lxcategories')))


add this

global $xoopsDB;

 
user

 Re: Lexikon 1.11


If i apply the patch from mjoel, still get the same error whent try to manage blocks! (modules/lexikon/admin/myblocksadmin.php)

Fatal errorCall to undefined function lx_FieldExists() in /home/modules/lexikon/admin/menu.php on line 86

 
user

 Re: Lexikon 1.11


open up admin/menu.php

check line 86-92 commnet this line like this

//global $xoopsDB;
    //if (!lx_FieldExists('parent',$xoopsDB->prefix('lxcategories')))
   //    {
     //$headermenu[$i]['title'] = _AM_LX_PLEASE_UPGRADE;
    //$headermenu[$i]['link'] = XOOPS_URL . "/modules/lexikon/admin/upgrade.php";
   // $i++;
   // }

 
user

 Re: Lexikon 1.11


OK, this works.

Found another failure:

in "submit.php" you include mainfile.php (line 11), which is also included in header.php, which is loaded first (in line 10)

 
user

 Re: Lexikon 1.11


hi'

Thanks for all this corrections

Before I update zip, is there anothing else to add ?

 
user

 Re: Lexikon 1.11


WYSIWYG Editors are only supported on admin side (/admin/entry.php?op=add). Would be nice, if also usable on user side (/submit.php)

 
user

 Re: Lexikon 1.11


@burning,

could you post a message, or include a readme, showing what all these changes are? I have recently started using Lexikon and it's working well. I have made quite a few changes to the templates and even some changes to the php in some files. These are for reasons that are specific to my site, not bug fixes, so I have not suggested them here. The point is that I don't want to overwrite the module files so I would like to be able to edit them myself.

I have one other request. If you browse by category you get a list of hits in a single column. I have removed the "teasers" from those lists and I have increased the number of files shown per page. Is there any way to put the result in a table with two columns?

The code that generates the list, from lx_category.html, is:

<{foreach item=eachentry from=$entriesarray.single}>     <h4 class="term" style="clear:both;"><{$eachentry.microlinks}><a href="<{$xoops_url}>/modules/<{$eachentry.dir}>/entry.php?entryID=<{$eachentry.id}>"><{$eachentry.term}></a></h4>


Is there a way to modify this such that the results appear in two columns?

barryc

 
user

 Re: Lexikon 1.11


hi'

I have updated archive (before, tested successfully with XOOPS 2.4.5beta).


-----


@barryc : you could use a smarty "extension".

1 - Read here : http://smarty.incutio.com/?page=table_foreach

2 - Create a file called 'block.table_foreach.php' in your plugin directory --> it means in /class/smarty/plugins/

3 - Modify your template using <{table_foreach}> <{/table_foreach}> tags

Quote:


<{table_foreach item=eachentry from=$entriesarray.single cols="2" inner="right" table_attr='border="0"' tr_attr='class="what-you-want"' }>

// here your loop
<h4 class="term" style="clear:both;">
<{$eachentry.microlinks}><a href="<{$xoops_url}>/modules/<{$eachentry.dir}>/entry.php?entryID=<{$eachentry.id}>"><{$eachentry.term}>
</a></h4>

<{/table_foreach}>


-----

About changelog :
• original version : ?
• tyty improvments :
- XOOPS 2.4.x support
- php 5
- wysiwyg editors (method used : trabis)
- blocks administration in admin added
- some corrections in templates
- corrections for security image compatibility
- new blue icon
• Deepak267 bugfix :
- SQL error : as the code was passing an empty sting to an integer column. I believe this is due to database version upgraded. So I have removed the default value columns from the SQL
- When a guest user try to request a definition, the code was passing a text as “Anonymous” as uid. So I have set it to -1 (indicating that it’s an anonymous user).
- One typo in languages\english\modinfo.php
• mjoel bugfix : correction in admin/menu.php

... sorry, not very scientific

 
user

 Re: Lexikon 1.11


barryc,

You could also do it without the smarty extension using something like this:

<{foreach item=eachentry from=$entriesarray.single name=foo}>
    <{if 
$smarty.foreach.foo.first}>
        <
table>
    <{/if}>
    <{if 
$smarty.foreach.foo.index is even }>
        <
tr>
    <{/if}>
    <
td><h4 class="term" style="clear:both;"><{$eachentry.microlinks}><a href="<{$xoops_url}>/modules/<{$eachentry.dir}>/entry.php?entryID=<{$eachentry.id}>"><{$eachentry.term}></a></h4>
    <
div class="definition"><{$eachentry.definition}></div></td>
    <{if 
$smarty.foreach.foo.index is odd }>
        </
tr>
    <{/if}>
    <{if 
$smarty.foreach.foo.last}>
        <{if 
$smarty.foreach.foo.index is even }>
            <
td>&nbsp;</td></tr>
        <{/if}>
        </
table>
    <{endif}>
<{/foreach}>


This should work, I didn't put it on my test site to try it though...

 
user

 Re: Lexikon 1.11


@burning

Thanks. This works nicely. You have to be careful to replace the <{foreach}> in the original code, as it does not immediately follow the </h4>.

The code as I now have it is (in case someone is interested:

<!--Replace loop to list in table-->
    <{
table_foreach item=eachentry  from=$entriesarray.single  cols="2" inner="right" table_attr='border="0"' tr_attr='class="what-you-want"' }>
    <
h4 class="term" style="clear:both;"><{$eachentry.microlinks}><a href="<{$xoops_url}>/modules/<{$eachentry.dir}>/entry.php?entryID=<{$eachentry.id}>"><{$eachentry.term}></a></h4>
    <!--
Removed definition fragment and line feed-->
    <!--<
div class="definition"><{$eachentry.definition}></div>-->
    <!--<
br />-->
    <{/
table_foreach}>


You will see I've commented out the code that generates the definition fragments and replaced the <{foreach}> that follows it with the <{/table_foreach}>

You can see the effect at www.aka.org/aka/modules/lexikon/. Click on Browse by category/Species.

I will go through the items in your changelog to see if I can figure out the specifics of the various changes.

barryc

 
user

 Re: Lexikon 1.11


Thanks zyspec for the tip.

@Barryc : very beautiful site
Just one thing, I am afraid that the Butterfly will drown in your header. You should use a fish ?

Example (you will find original in crystal icon pack) :
Resized Image
Resized Image

 
user

 Re: Lexikon 1.11


Hah! Well, some of our fish are big enough to eat butterflies. I have thought about replacing that image but I need to find a fish image that looks something like a killifish. I'll look around now that you have prompted me.

barryc

 
user

 Re: Lexikon 1.11


I am using Lexikon to present data on the nomenclature of certain fish (see aka.org/modules/lexikon/).

I have been asked whether it would be possible to have the option to search for recent entries, such as entries made in the last 3 months. Ideally such a function would include a drop down to choose the interval (3 months, 6 months, etc.). However, I'd settle for a link that simply said "Search for recent entries", which defaulted to the last 3 months.

It seems to me that the code for the Recent Entries list as is currently shown, could form the basis for making such a link. However, I'm not enough of a programmer to do it. Do any of you have a suggestion as to how this could be done?

BTW, the recent entries list is limiting, in that it only shows 5 entries.

barryc

 
user

 Re: Lexikon 1.11


barryc,

You should be able to increase the number of recent entries shown in the block by changing the block options ("Display xx terms"). The default is 5 but you should be able to increase that if you want...

 
user

 Re: Lexikon 1.11


True. I haven't yet activated the blocks. They duplicate the information that is already on the page, although more complete, with dates. I guess I could comment out the code for those "built in" items and activate the blocks.

What I'd really like to do is be able to have a link to items added or changed within the last x months.

barryc

 
user

 Re: Lexikon 1.11


Very Nice site Barryc. I am a fish lover too.

I am not sure if you have seen my site http://aquariumhomecare.com

do join my group if you like it.

Deepak

 
user

 Re: Lexikon 1.11


@deepak

Thanks, I'll PM you. As fellow XOOPS users on aquarium site we probably should arrange mutual links. I can add your site to our Links of Interest pages.

@Everyone

If anyone is wondering about the robustness of the Lexikon module, I now have almost 6000 entries in our installation and so far it seems to be working flawlessly. I am using Lexikon to present data on the nomenclature of killifish, a large taxonomic group with almost 800 species. The bibliography (references) alone account for over 5000 entries in Lexikon.

You might wonder how I got so many entries in so quickly. I had the document in Word format, which I converted to html (NOT by saving it from Word). Fortunately I have a smart son who is a Unix geek. He wrote me a couple of scripts that turned the html into sql, which I could import into the Lexikon database. I manually edited the lx_categories table to account for the number of entries imported into lx_entries.

barryc

 
user

 Re: Lexikon 1.11


I have found a couple of problems in the search function for Lexikon. If I search in my installation of Lexikon choosing a specific category to search in (for example References) hits from all categories are found. In other words, the search is not being limited to the category chosen.

Second problem: When I do a search, each result is preceded by a row of icons for edit, delete (i am logged on as admin), mail, print, etc. When one clicks on one of these, in most cases, the wrong entry comes up. If I click on the link to the entry itself, the correct one comes up. In that subsequent window, the icons point to the right entry.

In the search results window, mousing over the entry link (derived from the "term" entered for the record) shows the correct ID at the bottom of the browser window. When I mouse over the icons, the same wrong ID shows for all icons, usually one of the early entries (ID-1 or 2, etc).

I can work around the incorrect ID problem by first clicking the link to the entry term, then editing from there. However, the failure to search only in the category chosen is a serious one. BTW, I have two installations of Lexikon, one on my test site. These problems exist on both.

Has anyone else seen this problem and/or know of a fix? If some programmer needs to see the problem first hand, I could provide temporary admin access to my test site.

barryc

 
user

 Re: Lexikon 1.11


Bumping my questions above regarding a bug in Lexikon that prevents one from searching in a single category.

@deepak267, the problem in present on your site too, so it isn't limited to mine and must be a bug in Lexikon. For example, if you search for the term "water" on your site, limiting your search to one category, 28 hits from all categories are found.

[Edit] Another aspect that I forget to mention is that if I search for a particualr term, limiting the search to one category, Lexikon reports the correct number of hits, for example 1 (one) but then lists all of the hits in all categories. This might be useful in pinning down the problem.

I'd really appreciate it if someone with programming skills could take a look at this.

barryc

 
user

 Re: Lexikon 1.11


Hi Barry,

Yes You are right. I am not a module developer but i will check the code and post my finding.


Deepak

 
user

 Re: Lexikon 1.11


That would be great. I have looked at search.php. It's fairly well commented and I can see the relevant sections of code but I'm not good enough at reading code to see where the problem might lie. I will look forward to your findings.

I'm also sending you a PM.

barryc

 
user

 Re: Lexikon 1.11


Update: I got a PM from Zyspec, who think he has found the problem. He should be sending me an updated version of search.php to try. I'll report as soon as I get it.

I was a day late noticing his PM, for which I apologize.

barryc

 
user

 Re: Lexikon 1.11


Further update: I just got the modified search.php from zyspec. I backed up the old search.php and uploaded the new one. It fixes both the problem with category selection not being respected and the other bug I had mentioned, namely that the icons for edit, etc. in the search results point to incorrect entries. I want to thank zyspec very much for looking and fixing, particularly as he doesn't even have lexikon installed.

@burning, please send me a PM with an email address and I'll forward the updated search.php to you for inclusion in the archive. Any other users who want the file, please contact me also by PM and I'll send it.

barryc

 
user

 Re: Lexikon 1.11


Another update:

It turns out there were three serious bugs in the search function for the lexikon module. As I already reported, one was that the icons in a search result pointed to the wrong entries; a second was that searches restricted to a particular category did not work, all occurrences of the search term, regardless of category, were found; the third, newly recognized one, was that for hits exceeding the page limit (e.g. 30) the nav bar to proceed to the next page did not work. Clicking on the link to the next page produced a new list of all occurrences of the term.

zyspec has kindly fixed these. I've sent the updated file to burning, who will incorporate it into the archive. If any user wants just the fixed search.php file, send me a PM with your email address.

 
user

 Re: Lexikon 1.11


hi'

Repository updated with your correction.

Thanks Barry and zyspec

 


Login

Username:
Password:

Lost Password? Register now!

Top Module Downloads

Who's Online

84 user(s) are online (1 user(s) are browsing Module Repository)


Members: 0


Guests: 84


more...

Donat-O-Meter

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