This plugin contains the most simple code to hide the search box from site visitors who are not logged-in.
No framework necessary!
I thought it would be enough guidance when I posted the complete code necessary in the discussion thread where this question was asked. But it seems copy+paste is not as easy as I thought...
Even more annoying when some people take the ready-to-use code and blow it out of proportion with some unneeded "framework" (aka "self-praise") dependencies...
First and most likely last release.
This is the code (for hiding the search box for non-logged-in users) as written by IIOnly for his 'minimal_hide_search' plugin :-
elgg_register_event_handler('init', 'system', 'minimal_hide_search_init');
GRAND TOTAL #Lines = 4
ELGG TOTAL #Lines = 2
no fat, no cholesterol, no mascara, no framework - *only *four *lines of php code . anyone is quite free and welcome to not use IIOnly's mean lean short to-the-point plugin or to use any other plugin - that might perform similar functions and fufils needs - even if people might just be happy with the other plugin's size :-
GRAND TOTAL #Lines = 269 ?
ELGG TOTAL #Lines = 16 ?
there is freedom to choose in this world of elgg plugins - choose 4 lines or choose 269 lines of code for your plugins - whatever helps you make your day and your website better for you.
whell, some people think that they will be more popular and famose if they have "created" hundreds of plugins, even if they are just copy-paste and masked with some unnesesery codes, and the biger the plugin is the better it should be... hm, maybe that works for kindergarten fans, but for me, and probably for 99,99 % of users the most popular programmers are those who write compatibile and usefull plugins and who upgrade or modifie those hundreds of plugins which are old and abandoned by their own creator... and for me, even better are those who can combine two or more plugins into one, functional... i,m just tired of those red error messages because uncompatibility... I immediately remember of BSOD on windows... old programmer will probably remember how annoying was the time of BSOD :( So, please, copy, paste, merge, combine, write, test, do anything what is needed to give us, users, plugins which will work no matter what you must do... "the purpose justifieds the means" or in my language: "cilj opravdava sredstva" ... tnx <3