• dave_merwin

    (@dave_merwin)


    I have something like 500 pages already. I am building a plugin that checks to see if this is an edit page, and if so, it will load a search form (it will be a FULTEXT search) instead of all of the pages. Problem is, I do not see a hook for admin_content. Anyone have any ideas about how to turn off the content and replace with my search form without modifiying the core? I am trying to do it as a plugin so… gotta follow the rules.

    Thanks.

Viewing 15 replies - 1 through 15 (of 15 total)
  • ColdForged

    (@coldforged)

    Does it have to hijack the existing pages? Seems like it would be easier to have simply another menu that is a “Search Fulltext” tab instead of trying to work into the existing system. Just a thought.

    Thread Starter dave_merwin

    (@dave_merwin)

    Only reason that I want to replace it is that when I click on the manage tab, all of the pages start to load and there is no pagination. So the server usually times out.

    ColdForged

    (@coldforged)

    I’m confused now… when I click on the Manage tab, it loads the Posts management page which only shows the most recent 15 posts. How is yours displaying the Pages interface?

    Thread Starter dave_merwin

    (@dave_merwin)

    Sorry, shoudl have been clearer. If you click on pages, it loads pages. But there is no search. That is what I am trying to build.

    ColdForged

    (@coldforged)

    Funny you should ask, Dave. I’m actually doing that very thing right now — “hijacking” an existing page to modify the display — and I’ve finally gotten it going. Later today or tonight I’ll be setting up a test on my public server so I can verify functionality and then I’ll be posting it afterwards. Once I do I’ll post here and you can see how I did it.

    Thread Starter dave_merwin

    (@dave_merwin)

    Awesome, thanks for the word. I should have this search plugin complete by the end of the week. Oh wait, thats tomorrow. Ok, next week. LOL.

    Thanks.

    ColdForged

    (@coldforged)

    Here you go, Dave. The page I’m replacing is the Manage -> Comments page, but the method should be easily applied to any page.

    Thread Starter dave_merwin

    (@dave_merwin)

    Um, wow. That is beautiful. However, I have NO idea how to hijack the page. Any advice on how to implement? I looked through your code, and I see where it is supposed to happen, but the logic is not sinking in.

    Any tips?

    Lemme know.

    ColdForged

    (@coldforged)

    I’m essentially replacing the entire page with my own version of the existing page. As far as gotchas one of the biggies is that globals that the existing admin pages expect to exist are declared outside the scope of your plugin hook function, so you’ll need to “global” them to get them in-scope. Aside from that, everything else should be gleanable from the code.

    Good luck!

    Thread Starter dave_merwin

    (@dave_merwin)

    Sorry to bother you with this. The function you do this with is “PagedCommentEditing_add_submenu()” correct?

    I really appreciate your time.

    ColdForged

    (@coldforged)

    That’s the one that does the actual hijacking, yup.

    Thread Starter dave_merwin

    (@dave_merwin)

    Also, don’t know if you know this but $tablecomments etc is being depreciated for $wpdb->comments.

    Thread Starter dave_merwin

    (@dave_merwin)

    You are the man. Thanks. I will keep chewing through this until I can get it. Thanks again.

    Thread Starter dave_merwin

    (@dave_merwin)

    Ok, I am over my head. I have a couple of questions but don’t want to waiste bandwidth. If you are interested in helping, you can email me at dave at agiprofessional dot com and let me know. I would like to send you code with questions. I am not looking for you to do it. Just for you to explain why you did what you did.

    Thanks ahead of time.

    Don’t suppose you ever got this going did you Dave?

Viewing 15 replies - 1 through 15 (of 15 total)
  • The topic ‘Admin Search Plugin – replace admin_content?’ is closed to new replies.