NRAM

Members
  • Content count

    45
  • Joined

  • Last visited


1 Follower



About NRAM

  • Rank
    core_member_rank_45

NRAM's Activity

  1. NRAM added a post in a topic: Recent Topics   

    ty
  2. NRAM added a post in a topic: Recent Topics   

    Is possible to insert at the bottom of the page?
  3. NRAM added a post in a topic: Recent Topics   

    Thanks.
    I can change for after Boards of forum? 
  4. NRAM added a post in a topic: First Post on Every Page   

    Thanks. :) 
  5. NRAM added a post in a topic: Recent Topics   

    how to install in 3.3.4?
  6. NRAM added a post in a topic: First Post on Every Page   

    Hello,
    how to insert first post on every page?
     
    regards
  7. NRAM added a post in a topic: Change Words   

    Someone?
  8. NRAM added a post in a topic: Change Words   

    Does anybody use data hooks?
  9. NRAM added a post in a topic: Change Words   

    can someone move this post to the correct board to support 3rd-party apps developers?
  10. NRAM added a post in a topic: Change Words   

    I have use the library hook?
  11. NRAM added a post in a topic: Change Words   

    Where I'm failing?
  12. NRAM added a post in a topic: Change Words   

    [quote name='Adriano Faria' timestamp='1348427147' post='2311995']
    post_htmlstate isn't the post content!

    That would be post ! Take a look at posts table.

    I tried with:

    and it didn't change the content post.
    $inboundData['post']="<br />###### you 'Barneys Girlfriend'"; and $inboundData['post']="<br />###### you 'Barneys Girlfriend'";
  13. NRAM added a post in a topic: Change Words   

    [quote name='Aiwa' timestamp='1348417755' post='2311942']
    http://community.inv...d/#entry2239058

    You don't need to do the DB insert. You just need to modify the data that is given to you and return it. IP.Board handles storing the post.



    Thank you. I'm trying to write the next source:


    But the post data didn't change, for "<br />Just write this in the post.". (This is a test). Why?
    class classChangeWords { public function handleData($inboundData){ $inboundData['post_htmlstate']="<br />Just write this in the post."; return $inboundData; } }
  14. NRAM added a post in a topic: Change Words   

    someone?
  15. NRAM added a post in a topic: Change Words   

    [quote name='Aiwa' timestamp='1348335242' post='2311612']
    Your file in /hooks will be given an array of post content... You need to go through that array and find any matches to your DB and then replace it with what you want to... Then just return the post array...

    Essentially, you're intercepting the post content after the user clicks submit and before it gets stored in the posts table.. So any changes you make to the post array, will be refelected in what is actually stored in the DB...

    You'll have to preg_match or str_replace if you find a match in the words in the post... Your source for making those changes should be in the handleData() function in the file in the /hooks directory.

    I need an example of one hook to get information of the post and insert it.

    for example:


    class yourClassHook extends ????? { //Extends something? public function ????? { //Name of function handleData? $post = Method->get->postData(); ??? //how to get post? //My Source to change Values Method->insert->DB.... ???? //how to insert post? } }

About Me

Status Feed