WordPress.org

Forums

Custom Tables
[resolved] [Plugin: custom tables] Dates and Emails (10 posts)

  1. XZ3R0
    Member
    Posted 3 years ago #

    When i use a date field it shows up correctly when inputting data. On the page it comes up as a string of numbers.
    The same thing happens when i try to put email addresses in a text field. On the page its just a 0.

    http://wordpress.org/extend/plugins/custom-tables/

  2. miharix
    Member
    Posted 3 years ago #

    For me it's working like this:
    [wctphp]strftime("%A, %d.%m.%Y",'{datum}')[/wctphp]

    (the string 'datum' is the field name type date.)

  3. Stefan M.
    Member
    Plugin Author

    Posted 3 years ago #

    Thanks miharix :)

  4. XZ3R0
    Member
    Posted 3 years ago #

    Ok that fixes it. How come i have to do that to make it work vs just <td>{datum}</td>? Was this stated somewhere and i missed it? Cause i was completely oblivious to the wctphp modification.

    Also what about emails being stored in a text field coming up as 0's? pretty sure this is being caused by the @(?)

  5. Stefan M.
    Member
    Plugin Author

    Posted 3 years ago #

    Problem is that I save dates as TIMESTAMP.

    And you can then decide if you want to see only:

    Monday, 12.12.2011
    Or
    12.12.2011 13:15
    or
    12.12. 1:15 pm
    There are unlimited possibilities. That you have all, I let you decide with this code ;)

    I have only added the wctdate button also that you can select it if you want above the table setup page.

  6. XZ3R0
    Member
    Posted 3 years ago #

    ok i see. but what about a solution for emails?

  7. Stefan M.
    Member
    Plugin Author

    Posted 3 years ago #

    what about emails?

    you can store mails in a varchar() field and give out normal.

  8. XZ3R0
    Member
    Posted 3 years ago #

    oops. my fault. typo in the table setup.

  9. Ice Raider
    Member
    Posted 3 years ago #

    Hey I just wanted to say, custom tables is shaping up to be exactly what I needed Thanks.

    I'm new to wordpress and I managed to fix the timestamp with the help from this post but I'm not sure how to fix it when I filter by date.

    Here is what I have so far.

    [wctselect id="4" field="entrydate" limit="999" maintext="Date Filter"]

    Any thoughts?

  10. Stefan M.
    Member
    Plugin Author

    Posted 2 years ago #

    right now not possible :( I didn't think about...

    I add it on the feature list, is very easy to fix and will do it.

Topic Closed

This topic has been closed to new replies.

About this Plugin

  • Custom Tables
  • Frequently Asked Questions
  • Support Threads
  • Reviews

About this Topic