WordPress.org

Ready to get started?Download WordPress

Forums

[resolved] How to Manage Table in WP's Database through wp-admin (12 posts)

  1. Mostafa Megahed
    Member
    Posted 1 year ago #

    i've just created my own table in wordpress database and i want through wp-admin [After Access], to manage this table [only this table].

    (manage like - view rows, collect numbers of rows, etc...).

    Note: i don't want to know how to create Sql command and php sentences [i just want to know how to build my php sentences inside wp-admin and make an link for it in my wp-admin's list] and make it secure inside wordpress security system.

    thanks
    Mostafa Megahed

  2. Jess
    Member
    Posted 1 year ago #

    There are any number of plugins that can allow you to manage your database through the dashboard.

    http://wordpress.org/extend/plugins/search.php?q=MySQL&sort=

    However, from your description of what you want to do, you may have to do some modification of the core WordPress files, which is not really recommended.

  3. Mostafa Megahed
    Member
    Posted 1 year ago #

    1st, thanks for your answer.
    2nd, my queries will be like just sorting options from my table [by date, by highest grade - quiz :D].

    do you have any suggests for me to begin to add my own php sentences in wp-admin files !

    general steps ! file names !

    thanks

  4. Jess
    Member
    Posted 1 year ago #

    My first suggestion is still to find a plugin that will allow you to do what you want to do. Why reinvent the wheel if someone already built a tool you can use?

  5. Jess
    Member
    Posted 1 year ago #

  6. catacaustic
    Member
    Posted 1 year ago #

    As an example, you will need to use something like http://codex.wordpress.org/Function_Reference/add_options_page to set up a new page in your admin area. From there you will have to write teh functionality to interact with the DB yourself. I hate to say that I don't agree with Jess on this one - mainly because it's not jsut you that will be doing any editing, it could be anyone that is an admin for the site, and there's never a guarantee that they'll know what to do or what to look for in your DB table. If you don't know how to write PHP and SQL statements, nows the time to learn.

  7. Mostafa Megahed
    Member
    Posted 1 year ago #

    thanks :D a lot of thanks for you Jess and catacaustic ....

    i did it :)
    i've just create folder for my plugin and create some functions


    `add_action('admin_menu', 'quiz_system');
    function quiz_system() {
    add_menu_page('Quiz System', 'Quiz System', 'manage_options', 'my-quiz', 'manage_quiz_system', 'images/quiz.png');
    }

    function manage_quiz (){
    // my php code
    }`

    but i have a little problem with Arabic strings
    look: Image

    Links that helped me after you sure ;):
    How to design and style your-wordpress plugin admin panel
    And
    How To Add Pagination Into List Of Records Or WordPress Plugin

  8. catacaustic
    Member
    Posted 1 year ago #

    That looks like it's a problem with your pages encoding. Looking at this page, it's got:

    <html xmlns="http://www.w3.org/1999/xhtml" dir="ltr" lang="en-US"><head profile="http://gmpg.org/xfn/11">
    <meta http-equiv="Content-Type" content="text/html; charset=utf-8" />

    I have to say that I haven't had much experience using difference character sets so far, but as far as I know it's the charset that is the cause of this. That's defined in your wp-config.php file. I can't guarantee that changing that value won't have any other effect on your site though.

  9. Mostafa Megahed
    Member
    Posted 1 year ago #

    it's define('WPLANG', 'ar');

    And there is no response .... after put it in the header
    <meta http-equiv="Content-Type" content="text/html; charset=utf-8" />

  10. catacaustic
    Member
    Posted 1 year ago #

    You missed what I said. The language used on the site is completely different to the charset. You need to see what charset supports the Arabic text that you want to display, and set that instead of 'utf-8' in your wp-config.php file where I said. I don't know what charset you'll need for the text that you want so you'll have to find out what one that is for yourself.

  11. Mostafa Megahed
    Member
    Posted 1 year ago #

    it was from inserting code ...
    when i tried to change name fields from phpMyAdmin and converted it to arabic [by writing names manual], its worked in wp-admin

    but do you have any idea about inserting string as it is!
    inserting from [Online Form] php ....

  12. Mostafa Megahed
    Member
    Posted 1 year ago #

    answer was :D ......

    mysql_query("set names 'utf8'");

    thanks.... a lot of thanks ...

Topic Closed

This topic has been closed to new replies.

About this Topic