[Register]
Powered by Elgg

Plugins :: Blog :: Keywords/tag suggest & complete plugin

May 21, 2007

Hi, i recently upload the tagsuggest plugin that i madea couple months ago with minor update.

It's based on jquery, and shows a dropdown menu fetching keywords from server based on user input. To install just copy it to your mod/ directory.

Now, i made another approach on tags complete. The tagcomplete plugin shows the tag cloud and the user just click on the tags for select/unselect. It's not based on any js library, just a fews lines of inlined javascript.

Here's a shot of tagcomplete plugin

 

Both plugins works ok together, it could be possible to make tagcomplete jquery-fied but that will increase the js libs already in elgg and is an option when don't want a js lib for a simply function.

It tested/use tagsuggest on post add/edit and tagcomplete in post add/edit, in category  plugin manager, also in many as possible input fields of profile (instructions in install file).

BTW, yui will be the standard js lib?

Greets.

Keywords: plugin, tagcomplete, tagsuggest, user friendly

Posted by Rolando Espinoza La Fuente @ Plugins


Comments

  1. These are great things. Helps to keep things consistent. Is there anyway to section stuff off. for example, I have a field in the profiles for games, can I get a list of the entrys that other have put in there games field in there so we don't have all the different spellings?

    user iconChris on Monday, 21 May 2007, 11:38 UTC # |

  2. This looks very nice, Rolando! I will try it out as soon as I have some time.

    user iconEwout ter Haar on Monday, 21 May 2007, 11:49 UTC # |

  3. > BTW, yui will be the standard js lib? 

    The current proposal is that YUI will become the standard Ajax/Javascript library for Elgg, because of its wide usage - including with other web apps (eg. Moodle), its completeness and its relative ease of use.

    I don't think that is the final, final decision yet, because Ben and Dave are still open to different views I believe, but most Elgg developers appear to be happy with YUI right now.

    Ben has mentioned to me that he would prefer that Elgg standardise on one Ajax/Javascript library to reduce the complexity of installing Javascript plugins.

    He also mentioned to me that he does not want core Elgg to ever depend on Ajax or Javascript at all.

    user iconKevin Jardine on Monday, 21 May 2007, 15:19 UTC # |

  4. Chris, if your games field_type is keywords you can display tagcloud of that type. In install file is a example how to set up for all input fields:

             $column1 = display_input_field(array("profiledetails[" . $fname . "]",$value->value,$ftype,$fname,@$value->ident,$page_owner));

            $column2 = run('mod:tagcomplete:display',array('profiledetails__'.$fname.'__', $fname, 20));

            $column2 .= "<label>". __gettext("Access Restriction:") ."<br />";

    Works ok with custom keywords profile field. If you want only for a field, you should use something like:

        if ($fname == 'games') {

             $column2 = run('mod:tagcomplete:display',array('profiledetails__'.$fname.'__', $fname, 20));

        }
     

    user iconRolando Espinoza La Fuente on Monday, 21 May 2007, 17:23 UTC # |

  5. Rolando, seems that the zipfile of tagsuggest is corrupted. Can you upload again ?

    user iconBrice Le Blevennec on Tuesday, 05 June 2007, 17:48 UTC # |

  6. Hi Brice, i uploaded again with minor updates. You can download in plugin catalog or http://devel.memi.umss.edu.bo/rolando/hg/mod_tagcomplete/archive/tip.

    user iconRolando Espinoza La Fuente on Tuesday, 05 June 2007, 22:03 UTC # |

  7. Rolando

    I experienced an error with tagcomplete ver 1 and 1a the same.

    The error appears when adding a new project or posting a new blog as is as follows: 

    Parse error: syntax error, unexpected '=' in /home/mydomain/public_html/mod/blog/lib/weblogs_posts_add.php on line 85


    On line 85 is the line added as instructed in install:

                $body. = run('mod:tagcomplete:display', 'new_weblog_keywords');
     

    The problem seems to be a misplaced space after the . instead of before as when changed as follows it works just fine:

                $body .= run('mod:tagcomplete:display', 'new_weblog_keywords');

    Of course anyone else is also welcome to suggest a solution. 

    user iconEdward Leonforte on Sunday, 26 August 2007, 20:07 UTC # |

  8. Yes, it's a misplaced space. Thanks for the report.

    user iconRolando Espinoza La Fuente on Monday, 27 August 2007, 12:51 UTC # |

  9. Rolando,

    Does this automatically accomdate any new keywords type fields I add in profile.config or do I have to do something for it to recognize the new fields? 

    user iconEdward Leonforte on Thursday, 30 August 2007, 13:17 UTC # |

  10. I do a little update: http://elgg.org/rho/files/224/226/tagcomplete-v0.1.1.zi 

    The instructions for add tagcloud on every profile field is at bottom of INSTALL file:

     For example, adding keywords cloud when editing profile:
    (but i don't know if it's useful in all cases)

        * Edit file profile/profile.class.php around line 270:

            $column1 = display_input_field(array("profiledetails[" . $fname . "]",$value->value,$ftype,$fname,@$value->ident,$page_owner));
            $column2 .= "<label>". __gettext("Access Restriction:") ."<br />";

        * Add one line:

            $column1 = display_input_field(array("profiledetails[" . $fname . "]",$value->value,$ftype,$fname,@$value->ident,$page_owner));

            $column2 = run('mod:tagcomplete:display',array('profiledetails__'.$fname.'__', $fname, 20));

            $column2 .= "<label>". __gettext("Access Restriction:") ."<br />";
        
    Now go edit your profile or some community profile you own. Also you can hide
    by default the tagcloud adding extra parameter:

            $column2 = run('mod:tagcomplete:display',array('profiledetails__'.$fname.'__', $fname, 20, true));

      

    user iconRolando Espinoza La Fuente on Thursday, 30 August 2007, 15:11 UTC # |

You must be logged in to post a comment.

Site supported by Curverider Ltd - powered by the awesome Elgg