Giter Club home page Giter Club logo

categorysuggest's People

Contributors

adamfranco avatar andysky21 avatar bogota avatar cg923 avatar imcbride avatar logmanoriginal avatar mahdimajidzadeh avatar stevengnelson avatar wmat avatar

Stargazers

 avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

categorysuggest's Issues

Italian and Spanish translations

From: Manuel Blasco Felip

I just deployed the new version, I guess have to wait for the server to refresh with it.
But so far so good.
Jus a couple of questions...

I seen, maybe, a mistake in the italian translation, there is a \ and a ' in the middle of the text?!?!

Also i did my best to add an spanish one too, in case you want to use it.
Here it is, but i am not sure about the meaning of the long fields, specially the last one.

 'it' => array(
   'categorysuggest-title' => 'ASSEGNAZIONE CATEGORIE',
   'categorysuggest-subtitle' => 'Digitare il nome di una categoria per questo articolo.',
   'categorysuggest-boxlabel' => 'Categorie',
   'categorysuggest-taglabel' => 'Categorie più utilizzate',
   'categorysuggest-select' => 'Clicca per aggiungere la categoria all\'elenco per questa pagina!'
)
'es' => array(
   'categorysuggest-title' => 'ASIGNACIÓN DE CATEGORIA',
   'categorysuggest-subtitle' => 'Introduzca el nombre de una categoría para este artículo por favor.',
   'categorysuggest-boxlabel' => 'Categoría',
   'categorysuggest-taglabel' => 'Categorías populares',
   'categorysuggest-select' => 'Pinche aquí para añadir una categoría de la lista a la pagina!'
)

Regards,
Manu

Can't search words that are not at the start -> suggested fix -> a visual bug results

Hello,

I like your extension! I am setting up a new wiki and an old extension no longer works (SelectCategoryTagCloud). The tag cloud really is what did it for me =)

Your extension is the best I've found! I tweaked the code a little to get the last peice of functionality I could need. I wanted to share that with you and bring up a visual bug that results from it.

In categorySuggest.php, I changed line 74 (the preg_replace() to the following:
$searchString = preg_replace('/^\s_LIKE\s'_/', ''%', $searchString);

the ' in the first parameter and '% in the 2nd is what enabled it.

now I can search in the middle of a category name if I wanted. It flows through to the front end correctly. the visual bug is that it highlights the first X characters even if the match is the 2nd word.

keep up the good work!

Thanks!

Ability to edit or delete categories within the category no longer works in recent versions of Mediawiki (1.28 & 1.29)

As per image below, the OK button no longer works when modifying the Category name - click on it but nothing happens. Likewise the Delete cross does not delete the category. All of this functionality was working fine before upgrading to MediaWiki 1.28. Any help the community can offer to fixing this bug would be gratefully appreciated as this functionality saves heaps of time - thanks :-)

screen shot 2017-11-15 at 11 01 29 am

Error displaying suggested categories

I just installed SuggestCategories on my wiki : http://grimpe.fr

Looks perfect for my needs, a big thanks for sharing this.

It loads well on edit but when one enter a letter in category input field It displays :

br />
b>Warning
/b>: mysql real escape string(): Can't connect to local MySQL server through socket '/var/run/mysqld/mysqld.sock' (2) in
b>/homez.158/grimpe/www/extensions/CategorySuggest/CategorySuggest.php
/b> on line
b>

Followed by the list of all categories.

The database is mysql with utf-8 encoding.

Any idea?

Thanks in advance.

Greedy star in fnCategorySuggestStripCats

The Patterns should not be greedy so that these markdowns do work:
"[[Kategorie:TECHNOLOGY]][[Kategorie:ACCOUNT MANAGEMENT]]"

CategorySuggestFunctions.php:192
$m_pattern = "[[({$m_catString}|category):([\d\w\s])]]";
should be changed to
$m_pattern = "[[({$m_catString}|category):([\d\w\s]
?)]]";

CategorySuggest.body.php:179
$m_pattern = "[[({$m_catString}|category):(.)]]";
should be changed to
$m_pattern = "[[({$m_catString}|category):(.
?)]]";

MySQL connection issue

The other two issues around MySQL access errors don't have resolutions, so I'm curious how to fix this:

I'm receiving the error: ...Access denied for user 'apache'@'localhost' (using password: NO) in ....CategorySuggest.php on line 54

This stops CategorySuggest from sorting the Category list based on the character input. The full list of categories does appear, but is very long and frustrating to scroll through.

Suggests all categories, regardless of match

CategorySuggest works fine after installing, but it returns all categories when typing in the input box (regardless of whether they match the input or not).

I've checked the GET request, and that seems to be working fine. What I did see was a js error, which might be the source of this behaviour (I don't know):

Use of "sajax_debug_mode" is deprecated. Sajax is deprecated, use jQuery.ajax or mediawiki.api instead.

Any idea what's causing this bug?

Categories and inclusion tags

The current version of the extension ignores <noinclude>d categories, while it strips <includeonly> tags. Which is awkward, because if <includeonly> tags are inserted in the page then the tag is useless, while authors have no help in <noinclude>.
An "advanced categories" form section with 2 additional input fields, for <includeonly> and <noinclude>, would ignore really complex cases such as chain transclusions (the case of <include<noinclude></noinclude>only>, and it'd also become a bit confusing.
This is my proposal (which I can work on): once chosen (either from the list or typing ";"), a category is listed in a block of draggable objects below the input field. Hence they can be loaded into the textarea as usual, by submitting, or can be dragdropped in specific points of the text, where they release the wikitext for the tag.

Not compatible with Semantic MediaWiki

Awesome extension... but it breaks SMW inline queries that ask for categories, because it strips the categories from the query functions.

Queries look like this example from http://semantic-mediawiki.org/wiki/Help:Inline_queries

{{#ask: [[Category:City]] [[located in::Germany]]
 | ?Population
 | format=ul
}}

I'm not sure you'd ever get a <nowiki> tag inside an {{#ask}} — I doubt it. Obviously you could have an {{#ask}} query inside a <nowiki>, and you'd leave that alone, natch.

Looks like you'd need to explode the text fragments again, looking for {{#ask and }} — I'd give it a crack myself but I don't know php at all so I can see that ending in tears.

Messing category wikitext

In my project I'm using $wgDefaultUserOptions['forceeditsummary'] = 1. Edit page reloads if no summary is provided.
When this happens, categories mess up badly.

  1. The Category link wikitext appears in the reloaded page, below the title, separated by a whitespace.
  2. They also appear in the textarea itself, though, and they are not stripped by the script.
  3. Finally they also appear in the CategorySuggest inputbox. They're present in the script source code as value for the input, so it isn't the browser trying to autofill a form.
    This means that, apart from the graphical issue caused by [1], if the page is saved without changing either the textarea or the input, categories are present twice. This can be seen when editing again, as category names are present twice in the input box.

Category on file upload not working

The category option appears on the file upload and will suggest categories fine but when you actually upload the category isn't saved. You have to edit and then you can add the category

Category suggestion no longer working after upgrade to MediaWiki 29.0

I upgraded to MediaWiki 29.0 and now the suggest category is no longer working - i.e no longer showing the list of suggestions when I start typing something into the Category Assignment box .

FYI I've compared it to a working version in MediaWiki 28.0, and I'm now getting the following console errors, if this helps you. Keep up the great work - this is a really cool extension :-)

[Warning] This page is using the deprecated ResourceLoader module "jquery.ui.widget".
[Warning] This page is using the deprecated ResourceLoader module "jquery.ui.position".
[Warning] This page is using the deprecated ResourceLoader module "jquery.ui.core".
Please use "mediawiki.ui.button" or "oojs-ui" instead.
[Error] Failed to load resource: the server responded with a status of 500 (HTTP/2.0 500) (index.php, line 0) https://URL./?action=ajax&rs=fnCategorySuggestAjax&rsargs%5B%5D=P

When I click on the error URL - I'm not a programmer but maybe the SQL in the code needs changing to reflect a potential database schema update ?

A database query error has occurred. Did you forget to run your application's database schema updater after upgrading?
Query: SELECT DISTINCT cl_to FROM categorylinks WHERE UCASE(CONVERT(cl_to USING utf8)) LIKE UCASE('%P%' ESCAPE '' ) LIMIT 50_ _Function: fnCategorySuggestAjax _Error: 1064 You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near ''' ) LIMIT 50' at line 1 (localhost)
_

Empty lines of Preformatted text being lost when being save

When creating preformatted text by adding a space to the beginning of the line the first, if you have blank line (just the leading space) and save the article the formatting is fine

When editing and resaving the article (even with out changing anything), the spaces that were placed on the blank lines of the preformatted text are appearantly stripped out and the formatting is then messed up. I would guess the text is getting stripped when it is loaded in the editor

Categories are taken out of <noinclude> tags when editing Templates

Great extension, thank you!

There is an issue with the extension when adding to Template pages, though. Some categories in templates are added into the tags, because otherwise all articles that use the template get the same category attached to them.

However, the extension pulls out all [[Category:...]] assignment on edit, and puts them back on save -- essentially taking them out of the tags ever time you edit the template.

There should be an option to either add categories into the tags in templates *or, perhaps, the extension should ignore categories that appear inside the tags when it pulls from a template page...?

Thanks!

Issue with SMW:PageForms

CategorySuggest seems to create an error when you save a form with a predetermined category use PageForms:

PHP Notice: Undefined index: txtSelectedCategories in ..extensions/CategorySuggest/CategorySuggest.body.php on line 80.

There is no error generated saving pages not linked to PageForms

Presume this is the same issue as with Extension:CreateRedirect and Extension:MassEditRegex

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.