Author Topic: Quick 'n' Dirty Search Plugin  (Read 24261 times)

dadaemon

  • Anglefish
  • *
  • Posts: 21
Quick 'n' Dirty Search Plugin
« on: March 26, 2007, 04:15:17 pm »
Quick 'n' Dirty Search Plugin Version 0.0.1 for Multi User 0.5.7 available. (Works with 0.6.1!)

More information here:
http://forum.taskfreak.com/index.php?topic=516.0
Download
See attachment


Version 0.0.1 -- March 26, 2007
---------------------------------
+ Made a plugin from the code xdu has written so it would be easier to implement the search into TaskFreak!
+ Three supported languages. (English, French and Dutch.)

Notes
---------------------------------
As mentioned by the original author
Quote
This has NOT been heavily tested, and comes with no warranty of any kind. It is notably a HUGE security breach, as a SQL statement may be freely executed, with no syntax check at all. Don't use outside your LAN!

PS: I don't hope Searcher would mind me taking his plugin posts as base of this topic.
« Last Edit: March 27, 2007, 08:21:32 am by dadaemon »

Searcher

  • Global Moderator
  • Hammerhead shark
  • *****
  • Posts: 1776
    • Dracon
Re: Quick 'n' Dirty Search Plugin
« Reply #1 on: March 27, 2007, 02:53:03 am »
Splendid! ;D

Searcher doesn't mind at all, just few mininotes..
- why 0.5.7 if it works with 0.6.1
- u didn't change the copied changelog.txt
- it's not really such a security breach because it's using the default taskfreak query syntax so it is being sanitized after all (right, Stan?)

I love your plugin, you should run through the forum and make few more like this ::)

dadaemon

  • Anglefish
  • *
  • Posts: 21
Re: Quick 'n' Dirty Search Plugin
« Reply #2 on: March 27, 2007, 08:26:15 am »
Searcher,

- Since plugins aren't officially supported in 0.6.1 (see the download page) and your plugin manager hasn't been written for 0.6.1. (Give us an updated version! :))
- ok changed the changelog
- Well. I'll wait for his anwser then remove the warning if needed

I've just changed the search hack into a plugin version. All credits goes to xdu!
But I will look for more handy additions to Taskfreak. Realy love it!



Searcher

  • Global Moderator
  • Hammerhead shark
  • *****
  • Posts: 1776
    • Dracon
Re: Quick 'n' Dirty Search Plugin
« Reply #3 on: March 27, 2007, 01:03:20 pm »
DaDaemon,

- Blah blah blah, blah blah.. I'm waiting for 0.6.2 ;D
- :)
- Very responsible!

stan

  • Administrator
  • Hammerhead shark
  • *****
  • Posts: 1110
Re: Quick 'n' Dirty Search Plugin
« Reply #4 on: March 27, 2007, 03:25:02 pm »
Oh Searcher, 0.6.0 wasn't stable, but I think 0.6.1 is OK. ...

Searcher

  • Global Moderator
  • Hammerhead shark
  • *****
  • Posts: 1776
    • Dracon
Re: Quick 'n' Dirty Search Plugin
« Reply #5 on: March 27, 2007, 03:57:34 pm »
Oh Stan, when I read between your lines I can read '0.6.2 is not coming soon' :-(
Does it mean that you are not done with subtasks yet? ::)

stan

  • Administrator
  • Hammerhead shark
  • *****
  • Posts: 1110
Re: Quick 'n' Dirty Search Plugin
« Reply #6 on: March 27, 2007, 04:06:03 pm »
Subtasks will be in 1.0
I don't plan to work on 0.x anymore

Searcher

  • Global Moderator
  • Hammerhead shark
  • *****
  • Posts: 1776
    • Dracon
Re: Quick 'n' Dirty Search Plugin
« Reply #7 on: March 27, 2007, 04:38:04 pm »
Excellent, Searcher's calmed down ;)

Ralf

  • Posts: 2
Re: Quick 'n' Dirty Search Plugin
« Reply #8 on: April 12, 2007, 12:16:50 am »
@ dadaemon

nice ... when you want, here is the code for German (./de/freak.php):

Code: [Select]
---[find]---
'warning_install' => 'Der Installationsordner existiert noch. Sie sollten ihn aus Sicherheitsgründen löschen'
---[replace]---
'warning_install' => 'Der Installationsordner existiert noch. Sie sollten ihn aus Sicherheitsgründen löschen',
'search' => 'Suche'

Thanks Ralf

v-kooistra

  • Anglefish
  • *
  • Posts: 18
Re: Quick 'n' Dirty Search Plugin
« Reply #9 on: May 15, 2007, 01:07:39 pm »

dutch translation:
Code: [Select]
---[find]---
'warning_install' => 'De installatiemap bestaat nog. Verwijder deze uit veiligheids overwegingen'
---[replace]---
'warning_install' => 'De installatiemap bestaat nog. Verwijder deze uit veiligheids overwegingen',
'search' => 'Zoeken'

why not making this with then Global language array?
allot easier with multilanguage

gr vk

Searcher

  • Global Moderator
  • Hammerhead shark
  • *****
  • Posts: 1776
    • Dracon
Re: Quick 'n' Dirty Search Plugin
« Reply #10 on: May 15, 2007, 03:47:54 pm »
and what is the include/language/nl/freak.php in your opinion? :D

sonvan

  • Scorpionfish
  • ***
  • Posts: 71
Re: Quick 'n' Dirty Search Plugin
« Reply #11 on: May 15, 2007, 09:59:01 pm »
How can you make the search box to search everything instead of only the listed task?

sonvan

  • Scorpionfish
  • ***
  • Posts: 71
Re: Quick 'n' Dirty Search Plugin
« Reply #12 on: May 22, 2007, 09:51:33 am »
anyone figure out how to search for the whole database instead of just the listed yet?

Searcher

  • Global Moderator
  • Hammerhead shark
  • *****
  • Posts: 1776
    • Dracon
Re: Quick 'n' Dirty Search Plugin
« Reply #13 on: May 22, 2007, 12:55:11 pm »
the filters begin on line 39 of index.php
Code: [Select]
$arrFilters = array();
and end with
Code: [Select]
// --- Task order ---------------------------------------------------------what you need to do is to move the entire search script above and the rest of the filters enclose into an else { } statement
Code: [Select]
// search filter
$pSearch = ($_REQUEST['search']);
if ($pSearch) {
  $sqlFilter = '(ii.title LIKE \'%'.$pSearch.'%\' OR ii.description LIKE \'%'.$pSearch.'%\')';
  $objItemList->addWhere($sqlFilter);
}
else {
  $arrFilters = array();
.
.
.
}
// --- Task order ---------------------------------------------------------

sonvan

  • Scorpionfish
  • ***
  • Posts: 71
Re: Quick 'n' Dirty Search Plugin
« Reply #14 on: May 22, 2007, 05:51:35 pm »
I tried this but it still didn't work. It would just search for what's being displayed =(