do_action after a page is loaded or retrieve data from the database

This topic contains 4 replies, has 2 voices, and was last updated by  Paolo 8 years, 7 months ago.

We have moved to a support ticketing system and our forums are now closed.

Open Support Ticket
  • Author
    Posts
  • #159183

    ahmed elmasry
    Buyer
    Post count: 4

    hello,
    i need to know if it’s possible to Active (do_action) after a page is loaded
    for example by using an html button or Javascript
    to be clear i want to do that for “do_action(‘geodir_detail_sidebar_inside’);”

    and i really need to know if i can retrieve data from the database outside the details side-bar
    for example a shortcode or a way that i can use in the details page to show the property name or phone-number.

    thank you for the great support

    #159625

    Paolo
    Site Admin
    Post count: 31206

    Hi,

    I’m not sure I understand the question, what would you like to do to the sidebar? Show/Hide it?

    In that case i would use jQuery, not PHP.

    Please explain what you want to do and we will tell you the best way to do it.

    To call listings fields via php, you can by declaring the $post variable and call each field individually.

    example:

    
    
    
    <?php 
    global $post;
    echo $post->geodir_contact; ?>

    Will show the telephone of a listing. This must be used via hooks, action or directly in a php template. Other fields name can be seen directly in DB, you can install the db browser plugin to check them, the table is wp_geodir_gd_place_details.

    Let us know if this helps,

    Thanks

    #161367

    ahmed elmasry
    Buyer
    Post count: 4

    hello ,
    sorry i didn’t explain much about what my client wants
    what am trying to do is protect my data as much as possible ( from webscraping )
    so my goal is a javascript event that when activated shows the data (example. phone number)
    so if he click on a div or a button the event starts and load the data to a div
    so as long as the user doesn’t activate this js event, he can’t access this data not from the page and not from the page source.

    #161410

    ahmed elmasry
    Buyer
    Post count: 4

    side note: just to be more clear am planing to use XMLHttpRequest
    so all what i need is a file that i can take the data from
    for example getdata.php?postid=123
    can you please help me with that.
    thank you for the reply.

    #161525

    Paolo
    Site Admin
    Post count: 31206

    Hi,

    that would require days of work customizing the plugin.

    Sorry about that, but we can’t assist with something that complex as part of support.

    Thanks

Viewing 5 posts - 1 through 5 (of 5 total)

We have moved to a support ticketing system and our forums are now closed.

Open Support Ticket
20% Discount Offer
Hurry! Get your 20% discount before it expires. Get 20% Discount