Fixed Search Form

  • Thread starter Thread starter ragtek
  • Start date Start date
R

ragtek

Guest
The searchform for posts & threads contains the complete node list (and not only categories & forums where the system could find threads)
As you see in the screenshot, there are many nodes, which can't contain threads (also not there childs)

Even pages are shown in the form (and ATM it's not possible to search for text in them..)

XF_Model_Node::getNodeDataForListDisplay needs IMHO a big refactoring.
It's too unflexible (see also http://xenforo.com/community/threads/select-nodetree-with-nodetype-limit.14555 )

I'm not sure if i understood the node system complete, but haven't you introduced this, to make it easier to seperate,handle & show the different content types?

If yes, => one of the biggest problems is the way, how you select & output the nodes see also (this problem that we have: http://xenforo.com/community/threads/select-nodetree-with-nodetype-limit.14555/ )

I know there's a problem with the child nodes( http://xenforo.com/community/threads/node-permissions-page.12615/ ), but IMHO we/you:D need to find a solution for this (or they are useless for add-on coders).
For example, will really anybody have an so complexe nodetree with so many childnodes and different nodetypes as childes?

name1 category
name2 forum​
name3 gallery​
name4 forum​
name5 article​
name6 links​
name7 page​
name8 category
name9 category​
name10 gallery​
name11 forum​
name12 forum​
name13 links​
name14 forum​
name15 page​

That's one of the scenarios, why it would be necessary to show all parents of name14 in the search form, BUT this would make a big, confusing, not userfriendly select list,.:(

All this things will be a horror with > 50 nodes, and as i said already, if the nodesystem is that, what i think, and more add-on coder understand & use it, people will get really soon > 100 noders..
With all categories, forums, article sections, gallery categories,linklist categories, i'll reach soon > 300 nodes ( which shouldn't be a problem said mike http://xenforo.com/community/threads/performance-with-custom-content-nodetypes.12904/ )

(hope you understand what i mean, i've tried to describe it so good as possible^^)
 

Attachments

  • nodeprob1.webp
    nodeprob1.webp
    21 KB · Views: 44
In my opinion there should be two different kind of nodes: Primary nodes and secondary nodes. So you sholud be able to include a kind of primary nodes and all of his childnodes to something or exclude a kind of primary nodes and all of his childnodes from somesthing.

The way it is now it will grow up every time and tehe is no way to different something for a special part of node - Is this right?
 
You're not using a node for every article are you? If so, I'd suggest you seriously consider changing your system, as the node system was never intended to be used in that way. You could be creating containers for articles in the node system (like threads in a forum), but actually using a node for each article is definitely not the way to go.
 
No, a node is an article category

nodetype1:
forums: they are containing threads

nodetype2:
rubrics(my article category): containing articles

it's just an other type of xenforos forums

PHP:
class Ragtek_AS_DataWriter_Category extends XenForo_DataWriter_Node{

    protected function _getFields(){
        return parent::_getFields() + array(
            'ragtek_article_category'  =>  array(
                'node_id'  =>  array('type'    => self::TYPE_UINT, 'default' => array('xf_node', 'node_id'), 'required' => true),
                'article_counter'  =>  array('type'    =>  self::TYPE_UINT, 'default' =>  0)
            )
        );
    }

articles are saved in an own table with an own datawriter...

the problem is, that the node model while getting nodes (model getNodeDataForListDisplay) don't care what node type it is.
It returns ALWAYS all visible nodes.
 
Even pages are shown in the form (and ATM it's not possible to search for text in them..)
Forums can be children of pages, so pages must be shown. Consider this arrangement:
  • Page
    • Forum 1
    • Forum 2
    • Forum 3
How do you tell the system you want to search in threads from Forum 1, 2 and 3? You select the page in the search form.
 
No, a node is a article category

nodetype1:
forums: they are containing threads

nodetype2:
rubrics(my article category): containing articles
I was basing my question on this diagram you posted:
name1 category
name2 forum​
name3 gallery​
name4 forum​
name5 article​
name6 links​
... where name5 article appears to be a single article occupying an entire node.
 
sorry, i mean name5 should be article category not article:(

Forums can be children of pages, so pages must be shown. Consider this arrangement:
  • Page
    • Forum 1
    • Forum 2
    • Forum 3
How do you tell the system you want to search in threads from Forum 1, 2 and 3? You select the page in the search form.

yea and that's the problem.

The node system is great and powerfull, but if we really start using it for all the things (article category, gallery category, linklist category, + standard xf nodes => forum, category, page,forumlink...) it will reach soon >too many nodes and than it's impossible to find what you're searching for in the search form and other fields where nodes are displayed (not in the index page, because there you can select if it should be shown or not)
 
The first step could be, to check if a node (where nodetype != forum or category) have children nodes.
If not => don't display it.

That's what we want to try tomorrow to be able to release the article system soon...

[ot]
also i don't understand, why a page is a node..
that's content, and not a "container", it's just like a thread/post/etc
but ok, you made it so maybe because of the permissions..
[/ot]
 
I have a few ideas for this, but it would represent significant new functionality and as such would not appear before 1.1. Until then, I'm afraid you're going to have to work around the issue.
thx:)

i hope you'll also have http://xenforo.com/community/threads/select-nodetree-with-nodetype-limit.14555 in your mind when working on this
I'll try to post my other problems/requests too, because there are also some strange things in the nodehandler, which makes them "unusable/unflexible" for add-ons, because it seems that you had only forums & threads in mind as you planed the nodes/nodehandler/...:P
 
There's also an other problem related to the node system!

XenForo_Option_ForumChooser::renderOption displays ALL NODES

I'm not sure if this is the behaviour we need!

For example my "welcome new user thread" uses this in the acp options to choose the forum where the thread should be created.

The problem is, that because i use this class on my page i don't see only forums(what would be IMHO the normal behaviour), i see ALL NODES (article & linklist categories) in the acp options, where IMHO no thread could/should be saved.
 
I have a few ideas for this, but it would represent significant new functionality and as such would not appear before 1.1. Until then, I'm afraid you're going to have to work around the issue.
In my opinion it would be a very good idea to think about the node system completely ;)
 
This is resolved in 2.0. When displaying the node tree (while searching threads), we will only display nodes that are forums or which have a forum as a descendent.
 
Top Bottom