Page 1 of 2 12 LastLast
Results 1 to 15 of 29

Thread: More plugin hooks please

  1. #1
    mpdaddy is offline Active Member
    Join Date
    Nov 2007
    Posts
    227

    Default More plugin hooks please

    Can we get more hooks added to the core code to make creating plugins much easier? For example, the add_form.html template file has 2 hooks inside it. The problem is that neither hook is placed between the <form></form> tags. Therefore, you cannot pass variables to the form itself. I think there should be 2 hooks outside the form and at least 1 inside.

    Another example is the add.php file. Why are there no hooks inside this file? Is this going to be expanded in the near future? Can we get some added before the next release (v1.2)?

    Regards
    Wayne
    For questions related to any mods I developed, please contact me by pm or email at webmaster [at] scriptdragon [dot] com

  2. #2
    Bruceper is offline Active Member
    Join Date
    Jun 2002
    Location
    Winnipeg Canada
    Posts
    4,913

    Default

    1.2 may be a while away. We should be coming out with 1.11 in the next week or so.

    But in regards to hooks, I'll definately see what can be done.

  3. #3
    mpdaddy is offline Active Member
    Join Date
    Nov 2007
    Posts
    227

    Default

    Thank you. That would be great. I am getting plugin requests and I have seen a few requests on the forum. Without having the hooks in the correct places, plugins will need to be very basic. The PR plugin requested yesterday could not be accomplished with the current code. I can think of a few others too.

    Regards
    Wayne
    For questions related to any mods I developed, please contact me by pm or email at webmaster [at] scriptdragon [dot] com

  4. #4
    nakos's Avatar
    nakos is offline Nicecoder Team
    Join Date
    Aug 2008
    Posts
    49

    Default

    hello wayne

    i have added the new hook on add_form.html,

    hook_html_add_form_inside_form_begin and hook_html_add_form_inside_form_end

    you can update on http://nicecoder.com/svn/index.php?act=changeset&id=888

    note :
    Another example is the add.php file. Why are there no hooks inside this file? Is this going to be expanded in the near future? Can we get some added before the next release (v1.2)?
    actually, we have no idea to add any new hook. we need any suggestion and any feedback for bouth of php_hook and html_hook from you.

    you can give us any cases to add new hook or plugin.

    thanks

  5. #5
    Bruceper is offline Active Member
    Join Date
    Jun 2002
    Location
    Winnipeg Canada
    Posts
    4,913

    Default

    As a note, I suggested to the programmers that hooks simply be added everywhere that they can be. If they aren't used then it doesn't matter, they would still be there for future versions and other ideas.

  6. #6
    mpdaddy is offline Active Member
    Join Date
    Nov 2007
    Posts
    227

    Default

    Quote Originally Posted by nakos View Post
    note :

    actually, we have no idea to add any new hook. we need any suggestion and any feedback for bouth of php_hook and html_hook from you.

    you can give us any cases to add new hook or plugin.

    thanks
    A examples in the add.php file, there could be a php hook just before line #35

    Code:
    $title = $_POST['title'];
    could be


    Code:
    $plug->PluginPlace("hook_php_add_show_form_begin");
    
    $title = $_POST['title'];
    and after line #193

    Code:
    $basic_listing_price = $basic_price;
    could be

    Code:
    $basic_listing_price = $basic_price;
    
    $plug->PluginPlace("hook_php_add_show_form_end");
    You could then add a begin and ending hook inside the ProcessFormAddUrl() function.

    It is my opinion that there should be a plugin hook in almost all of the main files that control IndexU. Along with the add.php and add_form.html files, there should be hooks in the modify.php, modify_form.html, login.php, login_form.php, rows.html, premium_rows.html, sponsored_rows.html, etc, etc.

    Some of the html files already have hooks in them like the rows.html file for example.

    Code:
    <%$hook_html_premium_rows_begin%>      
    
    <div class="premium_link_rows">
    	<div class="link_rows">
    		<span><a href="<%$url%>" name="link_<%$link_id%>"><%$title%></a></span>
        <%if $enable_bidding%>
          [<a href="<%$site_url%>/upgrade.php?pflag=retrieve&id=<%$link_id%>"><%t%>bid<%/t%></a> $<%$bid%>]
        <%/if%>
        <br />
        <%$description%>
        <br />
        <a href="<%$url%>" name="link_<%$link_id%>"><%$url%></a> 
        - <a href="<%$site_url%>/<%$detail_page_url%>">Detail</a>
        <br /><span class="googlepr">Google PR <img src="<%$site_url%>/googlepr.php?link_id=<%$link_id%>"></span>
    	</div>
    </div>
    
    <%$hook_html_premium_rows_end%>
    There are 2 hooks, but neither of them are inside the <div></div> tags. Therefore it is impossible to add content to these area using a plugin.

    All of the files should have hooks inside the content areas.

    Regards
    Wayne
    For questions related to any mods I developed, please contact me by pm or email at webmaster [at] scriptdragon [dot] com

  7. #7
    Bruceper is offline Active Member
    Join Date
    Jun 2002
    Location
    Winnipeg Canada
    Posts
    4,913

    Default

    It is my opinion that there should be a plugin hook in almost all of the main files that control IndexU
    I 100% agree with you and that's what I told the programmers. Add them everywhere and don't worry about what they're going to be used for.

  8. #8
    mpdaddy is offline Active Member
    Join Date
    Nov 2007
    Posts
    227

    Default

    Agreed.. You cannot simply guess where someone might need a hook for a plugin. You will not know where you need it before you start making a plugin. I am not suggesting we fill the script with a hook every 10 lines, but make them plentiful and then add more as needed in the future. A hook should be in nearly every major function in the script.

    Regards
    Wayne
    For questions related to any mods I developed, please contact me by pm or email at webmaster [at] scriptdragon [dot] com

  9. #9
    mpdaddy is offline Active Member
    Join Date
    Nov 2007
    Posts
    227

    Default

    Just another note, plugin hooks should be created in both the user area and the admin. While attempting to add functionality to my current plugin, I wanted to add a javascript include into the header.html file in the admin. There are no hooks in that file though. There are several in the user area header.html file, but none in admin.

    Regards
    Wayne
    For questions related to any mods I developed, please contact me by pm or email at webmaster [at] scriptdragon [dot] com

  10. #10
    Bruceper is offline Active Member
    Join Date
    Jun 2002
    Location
    Winnipeg Canada
    Posts
    4,913

    Default

    Hooks in the admin panel? I don't see why not. Permission granted!

    They could be used to add new sections, new menus and all sorts of stuff.

    Personal note - if i"m not around after this week it's because Dody and crew beat me up after all these requests for hooks and the changes to the admin panel. They're going to have to go through every function! But the script will be better for it so it's all good.

  11. #11
    mpdaddy is offline Active Member
    Join Date
    Nov 2007
    Posts
    227

    Default

    Quote Originally Posted by Bruceper View Post
    Personal note - if i"m not around after this week it's because Dody and crew beat me up after all these requests for hooks and the changes to the admin panel. They're going to have to go through every function! But the script will be better for it so it's all good.
    Here is a script with plenty of hooks for plugins. It is a totally unrelated type of script, but it lists all the hooks and what files they are in. Some files have 2 hooks and some have 20 hooks. It is going to be quite a task to go through all those functions, but like you said, the script will be better for it.

    http://wiki.mybboard.net/index.php/MyBB_Plugin_Hooks

    Regards
    Wayne
    For questions related to any mods I developed, please contact me by pm or email at webmaster [at] scriptdragon [dot] com

  12. #12
    FSGDAG's Avatar
    FSGDAG is offline Moderator
    Join Date
    May 2007
    Location
    NJ, United States
    Posts
    1,651

    Default

    Hey Bruce....

    I was wondering if having hooks placed "everywhere" was being worked on and if it was going to be in the next release of IndexU? Is the next release of IndexU coming this week?
    FSGDAG | IndexU Hosting | Owner
    Website | NiceCoder Script Hosting and More! | Web4URL is For Sale!
    Follow Us On Twitter | FaceBook Profile | YouTube Videos

  13. #13
    Bruceper is offline Active Member
    Join Date
    Jun 2002
    Location
    Winnipeg Canada
    Posts
    4,913

    Default

    So far I haven't heard anything about the new hooks being added, which doesn't make me too happy.

    And yes 1.2 is supposed to release this week and I might make them delay it until the hooks are added. Or maybe make them work a heck of a lot faster so it can be released this week.

    Stay tuned!

  14. #14
    FSGDAG's Avatar
    FSGDAG is offline Moderator
    Join Date
    May 2007
    Location
    NJ, United States
    Posts
    1,651

    Default

    Quote Originally Posted by Bruceper View Post
    Or maybe make them work a heck of a lot faster so it can be released this week.

    Stay tuned!
    Yeah... This option sounds better to me!
    FSGDAG | IndexU Hosting | Owner
    Website | NiceCoder Script Hosting and More! | Web4URL is For Sale!
    Follow Us On Twitter | FaceBook Profile | YouTube Videos

  15. #15
    Bruceper is offline Active Member
    Join Date
    Jun 2002
    Location
    Winnipeg Canada
    Posts
    4,913

    Default

    I have been informed that new hooks have already been added. Please be patient as I don't know if there are enough of them yet. We're working hard to impliment as many feature requests as we can.

    There are already hooks in the admin panel menu, and I'm talking to Dody about others in the admin panel as well (in summary.php mostly)

Page 1 of 2 12 LastLast

Similar Threads

  1. Indexu to Vb plugin
    By echo@ in forum INDEXU DELUXE v1.x
    Replies: 1
    Last Post: 09-26-2008, 05:08 PM
  2. Plugin suggestions
    By Bruceper in forum Customers Lounge
    Replies: 30
    Last Post: 09-09-2008, 10:44 PM
  3. Plugin Review
    By esm in forum INDEXU DELUXE v1.x
    Replies: 4
    Last Post: 09-09-2008, 07:09 PM
  4. plugin system
    By inspireme in forum INDEXU DELUXE v1.x
    Replies: 7
    Last Post: 06-06-2008, 01:21 AM
  5. Hooks and Smarty
    By Mitchell in forum INDEXU DELUXE v1.x
    Replies: 3
    Last Post: 05-07-2008, 08:08 PM

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •