
Originally Posted by
nakos
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