tag filter

Development-related discussion, including bundled plugins
eternal
Bear Rating Trainee
Bear Rating Trainee
Posts: 3
Joined: 31 Jul 2008, 00:07

tag filter

Postby eternal » 01 Aug 2008, 18:02

I thought I had it working but, its looking through content.

from function.php changes

function get_article_filters($filters, $title, $tag_name, $content, $link) {
$matches = array();
........



if ($filters["tag_name"]) {
foreach ($filters["tag_name"] as $filter) {
$reg_exp = $filter["reg_exp"];
$inverse = $filter["inverse"];

if ((!$inverse && preg_match("/$reg_exp/i", $tag_name)) ||
($inverse && !preg_match("/$reg_exp/i", $tag_name))) {

array_push($matches, array($filter["action"], $filter["action_param"]));
}
}
}

.....

} else if ($match_on == "tag_name") {

foreach ($keywords as $k) {
array_push($query_keywords, "(UPPER(ttrss_tags) LIKE UPPER('%$k%'))");
}

$search_query_part = implode("AND", $query_keywords) . " AND ";
_________________________
modules/popup-dialog.php


$search_fields = array(
"title" => __("Title"),
"content" => __("Content"),
"both" => __("Title or content"),
"tag_name" => __("Tags"));

__________________
localized_schema.php

# filters

__("Title");
__("Title or Content");
__("Link");
__("Content");
__("Tags");
____________
mysql


insert into ttrss_filter_types (id,name,description) values (5, 'tag_name',

_____________


$search_fields = array(
"title" => __("Title"),
"content" => __("Content"),
"both" => __("Title or content"),
"tag_name" => __("Tags"));

print_select_hash("match_on", 4, $search_fields);
_________________


I think there may be another file.
Im not that good in php so, see anything right off?

Return to “Development”

Who is online

Users browsing this forum: No registered users and 2 guests