Thread Rating:
  • 0 Vote(s) - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
Plugin Developers: Hook Requests
#26
I feel like we will need a way to have language files per plugin. We can come up with good ways to extend $il8n but people that want it in their own language will still need to dive into the core plugin code to change the strings…
“Don’t forget the important ˚ (not °) on the a,” says the Unicode lover.
Help us test a key change for the core! ¶ Problems with GetSimple? Be sure to enable debug mode!
Reply
#27
Zegnåt Wrote:I feel like we will need a way to have language files per plugin. We can come up with good ways to extend $il8n but people that want it in their own language will still need to dive into the core plugin code to change the strings…
not if the plugin developers include a language file with their plugin.
- Chris
Thanks for using GetSimple! - Download

Please do not email me directly for help regarding GetSimple. Please post all your questions/problems in the forum!
Reply
#28
ccagle8 Wrote:the plugin developers include a language file with their plugin

exactly what i was thinking to be added/used in plugins when created ! (is the system already working or we have to wait ?)

how to name them ? name_plugin_lang_LANG.php ??
Sharing is human real nature...
Reply
#29
Hook suggestion: admin-pretemplate

There is already a hook to run code before the page starts to render with index-pretemplate, but that only applies to public pages, not the admin ones. I think one for the admin side would also be useful.
-- Sam
Reply
#30
I'd like to see a CSS hook to allow plugins to inject their own css code. That would allow configuration to be done via a configuration page rather than having to require a user to edit the CSS.

-Rob A>
Reply
#31
RobA Wrote:I’d like to see a CSS hook to allow plugins to inject their own css code.
Most plugins inject CSS through a header hook call. Do we need another way? How would you want this to be done?
“Don’t forget the important ˚ (not °) on the a,” says the Unicode lover.
Help us test a key change for the core! ¶ Problems with GetSimple? Be sure to enable debug mode!
Reply
#32
The software I am most familiar with (having used it for years) is serendipity (s9y). It has many event hooks including CSS.

It may be necessary in s9y because it uses a template engine and so provides hooks to inject into the css files.

(Take a look at the hook list I linked to, it may provide some inspiration).

Thanks,

-Rob A>
Reply
#33
ccagle8 Wrote:
Zegnåt Wrote:I feel like we will need a way to have language files per plugin. We can come up with good ways to extend $il8n but people that want it in their own language will still need to dive into the core plugin code to change the strings…
not if the plugin developers include a language file with their plugin.

The I18N plugin already includes its own language files exactly like GetSimple itself, however, the strings are added with the plugin name as prefix:

Code:
i18n_add_texts($i18n);

function i18n_add_texts(&$globali18n) {
  global $LANG;
  $i18n = array();
  @include(GSPLUGINPATH.'i18n/lang/'.$LANG.'.php');
  if (count($i18n) == 0) @include(GSPLUGINPATH.'i18n/lang/en_US.php');
  foreach ($i18n as $code => $text) $globali18n['i18n/'.$code] = $text;
}

I suppose a similar functionality could be implemented in a core function:

Code:
function add_texts($directory, $prefix) {
  global $i18n, $LANG;
  call _add_texts($i18n, $LANG, $directory, $prefix);
}

// needed to avoid name clash between global and local $i18n - or save global one before
function _add_texts(&$globali18n, $LANG, $directory, $prefix) {
  $i18n = array();
  @include(GSPLUGINPATH.$directory.'/'.$LANG.'.php');
  if (count($i18n) == 0) @include(GSPLUGINPATH.$directory.'/en_US.php');
  foreach ($i18n as $code => $text) $globali18n[$prefix.'/'.$code] = $text;
}
I18N, I18N Search, I18N Gallery, I18N Special Pages - essential plugins for multi-language sites.
Reply
#34
As already stated in another thread, a hook to be notified when a page is deleted, is definitely necessary.
I18N, I18N Search, I18N Gallery, I18N Special Pages - essential plugins for multi-language sites.
Reply
#35
Currently I don't see a possibility to perform an AJAX request to a plugin.
I'd like to have this possibility to be able to do auto completion or lazy loading (mainly on admin pages to for example administrate large numbers of blog or news entries).
I18N, I18N Search, I18N Gallery, I18N Special Pages - essential plugins for multi-language sites.
Reply
#36
Place: Frone-end component

Reason: need something like content, what should return component conter. It's needed for lugin manipulation on content (example i create component with some key (example squareit codes). And create some plugin, what should get component content and return its modifed)
Reply
#37
I'd like to see something hooked in so the built in authentication can replaced by a plugin.

As a short term option to this, I'd like to see the header hook fire on the login page.

Also - it look like index-login doesn't fire on the login page, at least not in 3.0 - haven't checked SVN.

-Rob A>
Reply
#38
Actimele Wrote:Place: Frone-end component

Reason: need something like content, what should return component conter. It's needed for lugin manipulation on content (example i create component with some key (example squareit codes). And create some plugin, what should get component content and return its modifed)

Actimele, please check your text. It is so full of typos that your whish is not clear.

i = I?
conter = counter?
lugin = plugin?

I will never understand why people, who write code and are pricky with every apostrophe or semicolon neglect correct spelling in real life or real text ;=(
|--

Das deutschsprachige GetSimple-(Unter-)Forum:   http://get-simple.info/forums/forumdisplay.php?fid=18
Reply
#39
RobA Wrote:it look like index-login doesn't fire on the login page, at least not in 3.0 - haven't checked SVN.

login-reqs, fired after the form, isn't working either in 3.0.

(Noticed yesterday while testing a small plugin of mine that worked with 2.0x)
Reply
#40
Carlos Wrote:login-reqs, fired after the form, isn't working either in 3.0.

(Noticed yesterday while testing a small plugin of mine that worked with 2.0x)

I was wondering... the wiki states:
Quote:login-reqs Fired on the login sidebar

I was trying to figure out what this actually meant...

-Rob A>
Reply
#41
RobA Wrote:I was wondering... the wiki states:
Quote:login-reqs Fired on the login sidebar

I was trying to figure out what this actually meant...

GS 2.0x had a right sidebar on the login page (/admin/index.php) with requirements (no IE6 support, javascript recommended...). In 3.0 that sidebar was removed.
Reply
#42
I might have missed this one, but I was looking for a hook that will fire when the list of pages is built (in admin/pages.php) and allows to manipulate what pages will be seen.

I needed multi-user capabilities where only the user that created (owns) a page should be allowed to edit that page. As I did not find this functionality built-in or directly using available plug-ins, I did the following:

* installed the Multi-User plug-in to have support for adding and managing users from /admin
* installed the i18n custom fields plug-in; it automatically adds a "user" field to new pages and fills it with the logged-in user
* because I did not find the appropriate plug-in hook, hacked the loop in pages.php to check for each iteration if the logged-in user is the same as the user field stored in the page data. If not, skip the page (do not list it). It was only one line and worked fine.

Of course, this isn't really safe because anyone who knows a page's ID can manually build a link to edit that page (edit.php?...). I did not add the check to edit.php. But it's working fine for now, so I'll leave it at that.
Reply
#43
I would like to second schoschie suggestion please, I am busy with multi site plugin and this is one of the requirements that can help alot.

Thank you

Johannes
Stopped developing on GS Plugins. Anybody welcome to take the projects over. Thanks for all the support all.
Reply
#44
schoschie Wrote:* installed the Multi-User plug-in to have support for adding and managing users from /admin
Correct, this is meant to be this way...at least for now
schoschie Wrote:* installed the i18n custom fields plug-in; it automatically adds a "user" field to new pages and fills it with the logged-in user
3.1 does this by default w/o a plugin
schoschie Wrote:* because I did not find the appropriate plug-in hook, hacked the loop in pages.php to check for each iteration if the logged-in user is the same as the user field stored in the page data. If not, skip the page (do not list it). It was only one line and worked fine.
That pages loop changed a bit in 3.1 - it now uses the cache functions (used to be Noodles101's page caching plugin). At this point, i am not sure where to add the hook - inside the caching function output call, or where it uses that passed data on pages.php

The only case i can see to add it to the caching function call is because that function now powers many things that you would want to 'filter':
1. pages.php
2. backups.php
3. template dropdown on edit.php
4. eventually sitemap.php (hopefully before 3.1 ships)

thoughts? have either of you tried the 3.1 beta yet?
- Chris
Thanks for using GetSimple! - Download

Please do not email me directly for help regarding GetSimple. Please post all your questions/problems in the forum!
Reply
#45
ccagle8 Wrote:thoughts? have either of you tried the 3.1 beta yet?

Nope not yet. Gona try now. tx
Will look into the cache page scenario, reading the the xml is essential, except if we can manupilate the chached pages stored data.

tx
Stopped developing on GS Plugins. Anybody welcome to take the projects over. Thanks for all the support all.
Reply
#46
hi there.

What is the chance of making
exec_action

take a parameter ? and be able to return as with filter ?

makes sense to keep filter and action apart to give the concept of what it must do (filter the data or do something). but sometimes a trigger is required that is not really a filter of data but a action and a parameter for input is required as it is not global and a return value expected.

dont really know the requirements around the design on this, but if a default value is given and returned it wont hurt the current design.

Just a thought.
thanks

Johannes Pretorius
Stopped developing on GS Plugins. Anybody welcome to take the projects over. Thanks for all the support all.
Reply
#47
Hello,

I work for an offshore software development company and we have had a few clients who wanted to have their websites integrated with Get Simple. Since most of the web development we do is custom, we want to train some developers with the CMS. We primarily want to develop custom plugins like Hotel Booking Systems and User Registration and Management plugins.

Any ideas on plugins that might help this community? My Email is rob.smith@midgr.com
Reply
#48
this thread is from 2011 and is about plugin hooks, create a new thread for plugin requests.
NEW: SA Admin Toolbar Plugin | View All My Plugins
- Shawn A aka Tablatronix
Reply




Users browsing this thread: 1 Guest(s)