Archived

This topic is now archived and is closed to further replies.

  • 0

Hooker Hooker plugin - How to use specific features.

Question

Posted · Report post

Hi all,

 

I've just bought the hooker plugin because I am interesting into adding custom js to some of my post/pages.

 

I have seen here [http://www.pagelines.com/store/plugins/hooker/#] the next features:

 

  1. Assign hooks to specific pages/posts easily.
  2. Toggle hooks on/off.

The question is... how? Because when I am creating a new Hook (using this plugin), I can select many locations but I can not see my actual pages or post...

 

Any advice?

 

Thanks.

post-45911-0-74994900-1363783908_thumb.p

Share this post


Link to post
Share on other sites

14 answers to this question

Posted · Report post

Hi Espartaco 

 

Install the free Action-Map plugin to see where WordPress and PageLines actions are included in the templates live on the page. http://www.pagelines.com/store/plugins/pagelines-action-map/

 

Once activated, when you are logged in and view your site you will see an ‘action map on or off’ button on the admin bar. http://d.pr/i/weQ


Toggle on or off to see the available hooks.

Share this post


Link to post
Share on other sites

Posted · Report post

Hi Martin,

 

First of all thank you for your quick response.

Playing with the plugin(creating one hook and delete it) I think I broke something (quite common situation  :D ). Right now if the plugin is activated I am getting this error when I try to load my web:

 

Fatal error: Call to a member function add_menu() on a non-object in /..../..../wp-content/plugins/hooker/hooker.php on line 44

 

How can I solve this problem?? After solve it I'll try your notes.

 

Other question, I have been trying other of your plugins (Simply Custom) which is more intuitive for me, but when I try to inject a simple alert('Hello world'); it doesn't work, nothing happens. Why?? Any idea?

 

Thanks in advance,

Share this post


Link to post
Share on other sites

Posted · Report post

I just installed the Hooker plugin and am getting the same Fatal Error

Share this post


Link to post
Share on other sites

Posted · Report post

Just found this on another thread:

 

edit hooker.php line 42 to read: if ( current_user_can('edit_theme_options') && is_object( $wp_admin_bar ) ) {

Share this post


Link to post
Share on other sites

Posted · Report post

<style>
	#bbpress-forums{
  		color:yellow !important;
		display : none;
	}
</style>

<script>
	alert("test");
	$(document).ready(function() {
            alert("test2");
 	});

	//jQuery(document).ready(function($) {
	//	alert("test 3);
	//});
</script> 

 

Ok I think I have a couple of examples working. The only problem is I don't know how can I use jQuery after the document is loaded (the first alert test works).

 

This code works if I introduced it in the header oft he page (via PageLines > Site Options > Custom Code ) but inside a hook no chance.

 

Any advise?

 

Thanks.

Share this post


Link to post
Share on other sites

Posted · Report post

Never mind, solve it!

 

Thanks anyway.

Share this post


Link to post
Share on other sites

Posted · Report post

Hi,

 

Would you mind sharing so other users who may have a similar issue, can use this as a resource.

Share this post


Link to post
Share on other sites

Posted · Report post

Thanks James!

 

Simon patch solve the problem. With the 1.3 version is working. 

 

Anyway, I'll still interested in the "simply plugin" custom plugin. 

 

I have attached one screenshot which represent the edit menu of one of my web's page.

 

Both custom code (HTML and JS) are not working... he question is... why??

 

What am I missing?

 

Thanks in advance.

post-45911-0-73657800-1363854803_thumb.p

Share this post


Link to post
Share on other sites

Posted · Report post

Thanks Danny, in that case I am going to make focus on the Hooks solution (Simply plugin looks like abandoned).

 

The only thing that I need to find out is how can I create hooks for specific pages? Any link to some documentation or example?

 

I know with the "Action-map" plugin allows me all the hooks available, and with the Hookers plugin I can create hookers, but I don't know how  I can associate to one concrete page.

 

If you have any advise, are more than welcome :) .

 

Thanks!.

Share this post


Link to post
Share on other sites

Posted · Report post

Thanks again,

 

I'll take a look into everything. This concept is new for me, I've been trying to avoid do something with php, but I think is worth learn the basic.

 

I am full experience J2EE (GWT) developer and in that way I can inject my modules with a RestFul API into the PageLines' CMS in safe way.

 

Regards.

Share this post


Link to post
Share on other sites

Posted · Report post

Hi again,

 

quick question, how can I inject JS? I have attached one picture.

 

The plugin seems to work but instead of executing the JS I see the "alert('Hello world');" in the web!

 

Also if I put this code inside <script> tags it doesn't work as well (also it stop other pluins...)

 

Thanks.

post-45911-0-58053100-1363868753_thumb.p

Share this post


Link to post
Share on other sites