GenericControls

Started by maestrosite.ru, October 21, 2012, 06:50:17 AM

Previous topic - Next topic

maestrosite.ru

Link to Mod

Default decoration elements

Display html-elemants with decoration as default theme

Example. Dispaly catalog title and "once-submit" form :
checkSubmitOnce('check');

in your template:
loadTemplate('maestrosite-GenericControls');
GenericControls::cat_bar( $txt['subcribe'] );
GenericControls::form_header( $post_url );
echo $txt['your_email'], ': <input type="text" name="email" value="" />';
GenericControls::form_footer();



Mod page and examples http://smf2.MaestroSite.ru/index.php/topic,49.0.html
Support http://MaestroSite.ru/
E-mail [email protected]

This work is licensed under a Creative Commons Attribution-ShareAlike 3.0 Unported License.




Отображение html-элементов

Мод упрощает отображение информации и управляющих элементов в стандартном оформлении для любой темы оформления.

Пример. Вывод заголовка и "одноразовой" формы:
checkSubmitOnce('check');

В шаблоне:
loadTemplate('maestrosite-GenericControls');
GenericControls::cat_bar( $txt['subcribe'] );
GenericControls::form_header( $post_url );
echo $txt['your_email'], ': <input type="text" name="email" value="" />';
GenericControls::form_footer();



Страница мода и примеры http://smf2.MaestroSite.ru/index.php/topic,49.0.html
Сопровождение http://MaestroSite.ru/
E-mail [email protected]

Этот мод доступен по лицензии Creative Commons Attribution-ShareAlike (Атрибуция — С сохранением условий) 3.0 Непортированная.
First of all, sorry for my english. По-русски у меня получается значительно лучше.

Проблема на форуме? Сначала посмотрите лог ошибок вашего форума и лог ошибок сайта (error_log)

You can try other modifications - see demo

Shambles

Read the description several times, tried to make sense of the 'example', even downloaded and installed it, but still haven't a clue what it is or does. Shame on me.

Arantor

Don't worry, I'm still not sure I understand what it's supposed to do.
Holder of controversial views, all of which my own.

FrizzleFried

I am right there with you two... testing this does... nothing that I am aware of.


Arantor

Well, you're not supposed to just use it, you're supposed to use it and then write some code to make use of it, but anyone that can make use of the code of this mod can do it using SMF's own code to do much the same thing which would be only slightly longer anyway.
Holder of controversial views, all of which my own.

digger

#5
maestrosite.ru,
Внятное описание мода очень помогает ему в дальнейшем распространении.
Умудриться написать так, что даже на родном языке не понятно для чего мод, пока код не посмотришь... :)
А уж бедным англосаксам, тем более не понять, да еще и с орфографическими и пунктуационными ошибками в трех строках описания... Стыдно, батенька.

Arantor

It's kind of rude to speak in Russian when everyone else is speaking English. I also hope the reference to spelling and punctuation errors isn't relating to me at all, since I didn't make any mistakes with spelling or punctuation.
Holder of controversial views, all of which my own.

digger

Quote from: Arantor on October 21, 2012, 11:01:24 PM
It's kind of rude to speak in Russian when everyone else is speaking English. I also hope the reference to spelling and punctuation errors isn't relating to me at all, since I didn't make any mistakes with spelling or punctuation.
All my worlds just about mod's description. I wrote that description is not very clear, even for a Russian. And have errors and not very clear for English.

Arantor

That's one of the downsides to using Google Translate - context is kind of lost :/ (I didn't mean to get accusatory, I'm sorry. It's just it looked, to me, like you were perhaps being not so nice about us that didn't get what the mod was for.)
Holder of controversial views, all of which my own.

digger

Quote from: Arantor on October 21, 2012, 11:09:26 PM
That's one of the downsides to using Google Translate - context is kind of lost :/ (I didn't mean to get accusatory, I'm sorry. It's just it looked, to me, like you were perhaps being not so nice about us that didn't get what the mod was for.)
Do not worry about it. It should be useful for me to write nickname when I reply to anybody without quote. It's my mistake.

hcfwesker

My Russian must be pretty good cause I got about  the same info out of both language descriptions.

maestrosite.ru

Quote from: digger on October 21, 2012, 10:58:05 PM
maestrosite.ru,
Внятное описание мода очень помогает ему в дальнейшем распространении.
Умудриться написать так, что даже на родном языке не понятно для чего мод, пока код не посмотришь... :)
А уж бедным англосаксам, тем более не понять, да еще и с орфографическими и пунктуационными ошибками в трех строках описания... Стыдно, батенька.
Замечания и предложения, как всегда, принимаются и рассматриваются. Указания на конкретные ошибки - приветствуются.


to all:
One more, sorry for my english.

This mod not for direct uses. But it helper for other mods. In other words, this mod for developers.

If you developer, do you want every time  type submit buttons or "sess-vars"? Maybe it is holy war, but i think, in example (start post) no places for mistakes. Such as loss css classes of theme, loss "accesskey", loss sess param and other.
First of all, sorry for my english. По-русски у меня получается значительно лучше.

Проблема на форуме? Сначала посмотрите лог ошибок вашего форума и лог ошибок сайта (error_log)

You can try other modifications - see demo

live627

Interesting. So, it is for developers only, average user won't care.

Seems like some kind of generic form template, with buttons and no other controls. Looks like this can be used to code in a form control, but without writing the form tags. So it relies heavily on template layers, and your template needs only the inputs, selects, etc.

maestrosite.ru

 also blocks decoration: windowbg+content, roundframe; catalog and title bars

PS In meaning, it must be in GenericControls, but I did not edit core files.
First of all, sorry for my english. По-русски у меня получается значительно лучше.

Проблема на форуме? Сначала посмотрите лог ошибок вашего форума и лог ошибок сайта (error_log)

You can try other modifications - see demo

Shambles

Maybe the name of this "modification" could be changed to reflect what it's meant to be used for, rather than the vague and non-descriptive "GenericControls" it currently has...?

Arantor

I still maintain that any developer who is capable of using this mod will also be capable of doing it themselves anyway ;)
Holder of controversial views, all of which my own.

maestrosite.ru

One more mod for dev/custom in early beta - http://smf2.maestrosite.ru/index.php/topic,48.0.html. Description on russian only, but mod don`t use localization - only english: file names, fucntion names. In "full" mode require GenericControls mod.  Is it interesting?
First of all, sorry for my english. По-русски у меня получается значительно лучше.

Проблема на форуме? Сначала посмотрите лог ошибок вашего форума и лог ошибок сайта (error_log)

You can try other modifications - see demo

Arantor

That description seems interesting, however forcing a dependence on this mod doesn't inspire me to use it... most people like to have *fewer* mods.
Holder of controversial views, all of which my own.

maestrosite.ru

Yes, dilemma. Copypaste mod by mod, or dependences. I understand your mind.
First of all, sorry for my english. По-русски у меня получается значительно лучше.

Проблема на форуме? Сначала посмотрите лог ошибок вашего форума и лог ошибок сайта (error_log)

You can try other modifications - see demo

Arantor

I'd rather copy paste mod by mod than dependencies - partly because it reduces your support, partly because it would be faster for the user (not by much, but it would be faster) and partly because the amount of code you're actually saving is a few dozen lines per template - at most.

I'm aware of the issues of dealing with form headers and getting things like the session identifier... what about things like submit-once nonces? Are they handled?

I've done huge mods and I could see the benefit, but quite honestly this is stuff that should be implemented in the core, not the periphery of the system through a mod.
Holder of controversial views, all of which my own.

Advertisement: