• Resolved mdurao

    (@mdurao)


    Hello,

    I’m trying to use the new wpda_extend_list_table and wpda_column_default hooks in a wordpress site and it’s not working.
    Apparently, the hooks are not being called when the page is rendered.

    I’m using version 3.0.2 and I’ve debuged the funcionts.php to make sure I was editing the proper file, adding a custom hook that appended some html to the head of the site and it worked.

    Also, I’ve used debug objects and when I am in the page that uses [wpdataaccess pub_id=”XX”], going to the hooks that were fired for the page, the hooks from wpda don’t show up.

    Am I missing something?

    Thank you

    • This topic was modified 6 years, 2 months ago by mdurao.
Viewing 15 replies - 1 through 15 (of 25 total)
  • Plugin Author Passionate Programmer Peter

    (@peterschulznl)

    Hi,

    Welcome! 🙂 Looks like a misunderstanding…

    The plugin supports two types of tables:
    (1) WordPress list tables
    (2) jQuery DataTables

    The hooks wpda_extend_list_table and wpda_column_default are used for WordPress list tables. Shortcode wpdataaccess uses jQuery DataTables.

    Does that make sense? What exactly do you need? Maybe I can add some filters or hooks for jQuery DataTables as well?

    Best regards,
    Peter

    Thread Starter mdurao

    (@mdurao)

    Hi Peter,

    first, thank you for your fast support answering.

    This is where i’m using the plugin: https://www.evolverh.pt/ofertas/

    If i’m not mistaken, it’s using jquery DataTables. Should I use WordPress list tables?
    Where can I change that?

    What I need is somehow, in the last column, add two buttons (or links) that open a new page with the reference (Referência).
    Was thinking overriding the value returned “PA BLA BLA” with a html link or button, using that value.

    Having a hook to add custom html to the modal would be nice too, where we could reference any column value, adding the buttons in the modal instead of the datatables.

    Makes sense?

    Thank you again.

    Plugin Author Passionate Programmer Peter

    (@peterschulznl)

    Hi,

    The plugin use jQuery DataTables for publications. These are read-only. The plugin uses WordPress list tables for data administration, although you can use them read-only as well. You can use Data Projects to create WordPress list tables. If you don’t need to change any data online, I would stay with the Data Publisher.

    You might be able to add a column, button or link with javascript. You can also wait for the next release… 😉

    Feature requests somehow always come at the same time from multiple users. I just got a request for exactly the same feature you are asking for, and I am actually working on it. I hope to add this feature to the next release which I hope to release by the end of next week. Can you wait untill next week…?

    Best regards,
    Peter

    Thread Starter mdurao

    (@mdurao)

    Hi Peter,

    Ok, thank you for your help.

    As you probably should know, this kind of stuff is always for the next day.
    I’ll be looking for alternatives in the meantime.

    Regardless, will be an awesome feature to add to the plugin.

    Thank you for you work.

    Plugin Author Passionate Programmer Peter

    (@peterschulznl)

    Hi,

    Just wanted to let you know that version 3.0.3 supports dynamic hyperlinks. You’ll just need to update the plugin to make it available.

    You can find more info about the new feature here:
    https://wpdataaccess.com/2020/03/22/dynamic-hyperlinks/

    Best regards,
    Peter

    Thread Starter mdurao

    (@mdurao)

    Thank you, will check it out!

    Thread Starter mdurao

    (@mdurao)

    Tried to add a dynamic hyperlink to a table, following your article and didn’t work!
    After saving it says: INFO: Saved settings for table offers;
    But if I try to manage again the hyperlinks, it doesn’t show up.
    Also, the line “>> Add Hyperlink” doesn’t show up.

    Am I missing something? (I’ve updated the plugin!)

    Plugin Author Passionate Programmer Peter

    (@peterschulznl)

    So sorry! My mistake! Forgot to test after a minor change… 🙈

    I patched version 3.0.3 right away. Please delete the plugin and then reinstall it. When you delete the plugin don’t forget to save your work!

    This is how:
    – Open menu Settings > WP Data Access
    – Click tab Uninstall
    – Uncheck both checkboxes
    – Save

    This will prevent the plugin deleting your repository data.

    Thank you your quick reply!

    Best regards,
    Peter

    Thread Starter mdurao

    (@mdurao)

    Ok, that worked.

    But now, why can’t I see the links in the Data Publisher?
    Do I need to activate anything?

    Plugin Author Passionate Programmer Peter

    (@peterschulznl)

    Yes, you need to add a hyperlink to a publication:
    – Edit the publication
    – Click on button “Click to define column labels”
    – Add your columns and hyperlinks to the list on the right side
    – Save your publication

    Sorry, I forgot to mention this step in my post. Now updated! 🙂 THX

    Hope this helps!

    Best regards,
    Peter

    Thread Starter mdurao

    (@mdurao)

    When I click to define column labels, it shows up a modal with the title Define column labels.
    The content of the modal is two columns: Column Name (with all the table columns) and Column Label (where I can define a custom name for each column in the table).
    There is no list on the right side.

    Unfortunely, can’t upload any screenshot here.

    Plugin Author Passionate Programmer Peter

    (@peterschulznl)

    Sorry, you need to click on the “Select” button!

    This is centainly not my best day… 🙈

    Best regards,
    Peter

    Thread Starter mdurao

    (@mdurao)

    But the hyperlinks don’t show there, only my columns (sql table ones).

    Plugin Author Passionate Programmer Peter

    (@peterschulznl)

    What did you enter in the hyperlink fields?

    Thread Starter mdurao

    (@mdurao)

    A label and a link.

Viewing 15 replies - 1 through 15 (of 25 total)

The topic ‘wpda_column_default and wpda_extend_list_table’ is closed to new replies.