Posts: 6,267
Threads: 182
Joined: Sep 2011
Ever have to write a whole plugin for some little task you need to accomplish or some functionality you need to hack in?
I made a plugin that will execute components on plugin hooks.
Just name your component the hook name prefixed with 'hook_'
eg. hook_hook-name.
Download from extend
Posts: 1,247
Threads: 82
Joined: Feb 2011
Can you give an example? I think your description is minor, but maybe it's because I'm not a developer and this plugin is only relevant for developers...
Posts: 6,267
Threads: 182
Joined: Sep 2011
Its not only releveant for developers, although typically developers understand hooks.
Youll have to read up on wiki on pugin hooks.
This plugin is for using hooks without having to be a developer or writing a plugin.
Many times you have to write a plugin and register it to use hooks.
This lets you use components for quick system hacks.
heres an example of the back end header hook
component name is
Code:
<?php
echo '<pre style="background-color:#FF00FF">Header Hook</pre>';
?>
Posts: 35
Threads: 2
Joined: Jan 2013
I tried this but cannot get it to work. The plug-in appears on the admin plug-in page. In the "Theme" tab via "Edit Components", I named a component "hook_footer" with the following code:
PHP Code:
<?php echo "<pre>HOOKED FOOTER NOTE</pre>"; ?>
After saving components and refreshing the site page, the text above does
not appear anywhere on the rendered page. Am I missing something?
...lee
Posts: 6,267
Threads: 182
Joined: Sep 2011
what GS version?
That hook is for back end not front end
where are you looking
http://get-simple.info/wiki/plugins:hooks_filters
Posts: 35
Threads: 2
Joined: Jan 2013
(2013-01-19, 07:13:02)shawn_a Wrote: what GS version?
That hook is for back end not front end
where are you looking
http://get-simple.info/wiki/plugins:hooks_filters
Version is GS 3.1.2. I don't understand the "looking" question. Your docs say both front- and back-end, anyway.
...lee
Posts: 6,267
Threads: 182
Joined: Sep 2011
FONT END
theme-footer Fired in the footer of the theme. Requires get_footer() in template
BACK END
footer Called in the footer section of the rendered page
So your example is at the bottom of the backend admin pages.
Works for me
Are you looking at the front end pages for this ? That would be theme-footer
Posts: 35
Threads: 2
Joined: Jan 2013
(2013-01-19, 07:22:20)shawn_a Wrote: FONT END
theme-footer Fired in the footer of the theme. Requires get_footer() in template
BACK END
footer Called in the footer section of the rendered page
So your example is at the bottom of the backend admin pages.
Works for me
Are you looking at the front end pages for this ? That would be theme-footer
Well, it doesn't work for me. Given your comments, I looked to find the text in the footer of the admin pages, which is where I found it and, of course, that is not very useful to me. When I look at plug-ins on the GS website for their utility to me, I expect them to be useful in rendering the pages on my site, not the admin pages. I would expect that admin functionality to be explicitly stated in the plug-in's description. Though I am certainly familiar with a lot of developer jargon, having been one for 50 years, "front-end" and "back-end" in this context are not terribly useful descriptors when you offer a solution to non-developers.
Posts: 6,267
Threads: 182
Joined: Sep 2011
wtf ever dude.
If you "expect them to be useful in rendering the pages on my site, not the admin pages"
Then use the fucking front end hooks not the back end ones.
It's obviously an advanced plugin considering that it uses developer hooks. sigh
Posts: 35
Threads: 2
Joined: Jan 2013
Thanks for your responsive comments. Perhaps I was a bit harsh. Your package instructions were actually (unfortunately!) better than many I see for potentially useful plug-ins on the GS site. It's really frustrating to find something that looks useful, only to find the "instructions" are clueless! At least, with your information I had a clue. Thanks again for your timely rejoinders. Perhaps we can spar again sometime.
...lee
Posts: 6,267
Threads: 182
Joined: Sep 2011
Yeah extend sucks, you really have to read the forums for each plugin and ask about what you are trying to accomplish to get some suggestions. Extend is on the list to get an overhaul.