WordPress.org

Ready to get started?Download WordPress

Forums

Add a video posting thing to admin menu (6 posts)

  1. Wej00
    Member
    Posted 3 years ago #

    I want to add my own video posting (just a link to the video, not actually uploading it) thing into the admin area, just like posting a normal blog post. I can program both PHP and SQL, so that isn't really the problem. I just don't know where to start.

    So what page checks to make sure the user is logged in and passes through any other security needed? I might be making this too hard for myself, but want to use as much of wordpress as possible.

    Also, what file/function calls the info for the database? I want to make a custom call to the database using it.

  2. Darrell Schauss
    Member
    Posted 3 years ago #

    One way is to have a Video posts category and use custom fields to paste the video embed or video link. So you can pull videos from that category and they will be organized and tagged like posts if needed.

    Post a title, maybe a description in the editor, then the link/embed in the custom field. Creating a custom page template or other code you can pull that data separately (title, post, video, etc) to style how you like.

    Or put an if statement in the Loop that if the post contains a custom field for video display it differently.

    http://codex.wordpress.org/Custom_Fields

  3. Wej00
    Member
    Posted 3 years ago #

    I had that idea as well, but didn't know of the Custom fields thing. The problem with this is that making a custom search to search through only videos and being able to organize them depending on the video category, as well as display A LOT of custom fields (parent, forum discussion link, length, picture, content, etc) would take just as long to program. I want to be able to keep them in their own table. This wouldn't be a bad alternative though.

    Having a SQL statement doing the organization is a lot more efficient and easy to program.

  4. Darrell Schauss
    Member
    Posted 3 years ago #

    I have seen plugins apply custom fields that are always there and ready to use below the editor (dont have to keep choosing field drop down and add) and then store in its own db table. But I haven't done this myself or looked for a tutorial.

  5. Wej00
    Member
    Posted 3 years ago #

    I could make that myself, but I need to know how WordPress does database calls. I have been searching through the codes and found the wpdb variable, but not sure if I can use it the same way it does on that page. I could test it out, but if someone could help me...

  6. Wej00
    Member
    Posted 3 years ago #

    Found what I was looking for. http://codex.wordpress.org/Function_Reference/wpdb_Class . Let me do a little more research.

    Also, the question remains on how I am supposed to verify if someone is logged in and has access to the admin area.

Topic Closed

This topic has been closed to new replies.

About this Topic

Tags

No tags yet.