News:

Want to get involved in developing SMF, then why not lend a hand on our github!

Main Menu

typo in wrapping custom_actions tutorial

Started by permutations, July 30, 2005, 10:48:43 PM

Previous topic - Next topic

permutations

In the file custom_actions.txt, in the "Catching Actions" section, there are typos in the code. It says "template" where it should say "sub_template". The text in red below is what's missing:

Catching Actions
-------------------------------------------------------------------------
Catching actions isn't very hard, and can be used to do many actions more efficiently.  It differs from "wrapping" actions only subtly (just as the names are only subtly different...) in that the action is validated a bit more.

First, in your index template, look at the init sub template.  You can find it by searching for "template_init".  This is a special sub template run during SMF's initialization before some of the context variables have been filled.

It starts out without much in it.  Look for the closing curly brace (}) on its own line - that's the end of it.  Just above that, you might add:

   if (@$_REQUEST['action'] == 'copyright')
      $settings['catch_action'] = array('sub_template' => 'Copyright');

This means that if someone goes to the ?action=copyright action, the Copyright template will be loaded along with the main sub template.  Pretty cool, huh?

You can do this more and more, like so:

   if (@$_REQUEST['action'] == 'copyright')
      $settings['catch_action'] = array('sub_template' => 'Copyright');
   if (@$_REQUEST['action'] == 'magicllama')
      $settings['catch_action'] = array('sub_template' => 'MagicLlama');

Wrapping and Catching
-------------------------------------------------------------------------
You can do both of the above by following a simple example:

   $settings['catch_action'] = array('sub_template' => 'Four-Oh-Four');
   if (@$_REQUEST['action'] == 'copyright')
      $settings['catch_action'] = array('sub_template' => 'Copyright');
   if (@$_REQUEST['action'] == 'magicllama')
      $settings['catch_action'] = array('sub_template' => 'MagicLlama');

And it will go to the Four-Oh-Four template if the action is not copyright AND not magicllama.


It's correct in the "Wrapping Actions" section, which is how I figured out what was wrong with the code.

[Unknown]

Your "corrections" are all wrong, I'm afraid.  It was right as is.  There's options to catch and send to both templates, and to sub templates.

-[Unknown]

permutations

The code in your tutorial does not work. There may be options to catch and send to both templates and sub-templates, but this is not described in your tutorial, and in any case is irrelevant to the main point. The main point is this:

The code in your tutorial, as written, does not work. When changed it as I described, it worked. Perhaps there are other ways to change it that also would work or that would work in the way you intended, but this much is certain: your code in the tutorial has an error in it.

[Unknown]

It is for 1.0, and I think an earlier version.  It worked then, and that's when it was written for.  Since there hasn't been much interest, I haven't updated it.

It works for me anyway, and your corrections are obviously wrong.

-[Unknown]

permutations

Quote from: [Unknown] on August 06, 2005, 05:40:57 PM
It is for 1.0, and I think an earlier version.  It worked then, and that's when it was written for.  Since there hasn't been much interest, I haven't updated it.

It works for me anyway, and your corrections are obviously wrong.

-[Unknown]

Is there some reason why your usual response to my posts is either to ignore me completely, or to say something denigrating and nasty? I took the time to post feedback on your tutorial that I thought was helpful and useful, and this is the kind of response I get back from you. What is your problem? Even if I'm dead wrong (which I'm not), there are ways to say it that aren't so insulting and obnoxious. At the very least the intention of my post was positive, which is more than I can say for yours. The only purpose of your post is to tell me I'm an idiot (and without having checked out what I said, either).

You know, I like SMF, and if this is your program and your design, then you are a very good developer. As I work on my mod, I am continually impressed with the features built into SMF for extensibility. I don't have any particular use for the wrap and catch actions, but I like that it's in there. I like the template system - very useful. I like the SSI system. I like the integration design. I like the SMF feature set. But you are very hard to take.

I don't mind a certain amount of arrogance in someone whose abilities I respect, but I draw the line at outright abuse. I really have done nothing to deserve this kind of rudeness. I'm a developer who admires your work, and is in a position to contribute useful code to your project, but you are alienating me to the point where I don't want to do it. I know programmers have a reputation for poor social skills, but this is ridiculous.


[Unknown]

#5
Frankly, you seem to think you're always right, and you'll argue anything if I try to tell you otherwise without considering what I said.  You can call me arrogant, but I just named my definition of arrogance.

And, I don't like arguing here, not unless I consider it very helpful.  So I'm just tired of interacting with you, because you try to argue with me, insult me, tell me I'm doing this or that to you, or else tell me what I should be doing for you, every chance you get.

The tutorial is still somewhat helpful, but no one - except I guess you - is really using it.  No theme authors have started using it, and that's really all it was for.  Most people are content with using index.php and other actions (because it is easier unless you want to wrap actions specifically with a THEME.)

I could bother myself to update the tutorial for 1.1, which would involve more than just that one thing (if it is indeed a problem at all), but I really don't think it's worth my time.  However, this isn't something I want to argue with you: you have in the past, several times, made it painfully obvious that you think it your job to plan the activities of myself and other developers, to make our time most useful to yourself.

I'm sorry if I'm so very arrogant as to want to plan my own time.  But, I'm from America - here, we have this silly notion of being in control of our own activities.

So, I hope you'll forgive me if I'm just tired of bothering with you, especially when there are other people who can answer many of your questions (but, as far as I can see, are avoiding it because they have similar very strange notions of "freedom".)  I don't write this software and provide it for free just so I can be annoyed by people, and doing so only makes it more difficult to continue - which is clearly bad for me, and bad for SMF.  Thus, ignoring you is clearly the best course of action for myself and for SMF.

And, again sorry for my arrogance, but I care more about SMF and myself than you.  Call me self centered.

I still have no plans on updating this tutorial, again because I have many other much more important things to do.  More important than arguing with you, too.  I would have suspected you had better things to do as well, but I won't tell you how to plan your time.

-[Unknown]

permutations

Sorry you see it that way. You misunderstand me.

In any case, it's clear that no contributions of mine will be valued here, so I won't make any more.

And it's also clear that I won't get any help from you, so I won't ask for any more.

permutations

I have no way of knowing what you consider important or unimportant, nor am I trying to tell you what's important or unimportant. I have been scouring all the materials that have been made available for SMF because I'm integrating SMF into my site in a very substantial way, plus modifying the code in a very substantial way and trying to make that as easy for myself as possible.

I gave you feedback on the tutorial just because I had the feedback to give, after I tried what the tutorial advised. I wasn't telling you to update it - I was just giving you information in case you wanted to update it. I don't need the functionality myself, and I'm not using it. A more secure person than you might have simply responded, "Oh? Well, I wrote that for 1.0 and no one is much using it, so I don't plan to update it." See how that gives the same information without attacking me in the process?

Apparently you view bug reports as "arrogant" and "argumentative". That's your problem, not mine. I have not been arrogant and argumentative. I have given a lot of detailed feedback simply because I have it to give - as a side effect of working with the code as closely as I am. It doesn't mean I think your code is bad or that you are a bad developer.

In every software company I've ever been involved with, bug reports have been appreciated. I have never before met a developer who takes them as a personal insult. I didn't know I had to preface them so as not to hurt your feelings - for example, "Mr. Unknown, please don't take this to imply you are anything less than the god-like, perfect developer that you are, but I found a small bug that probably was caused by someone at your computer while you were taking a leak - and I'm probably wrong, too, since I'm just a lowly idiot while you are UNKNOWN. But here is what I observed, in case it is useful for you. If it's not, please forgive me for intruding."

The SMF software makes it delightfully easy to review an individual's past posts, so the truth of what I'm saying will be plainly evident to anyone curious enough to check it out. I haven't argued with you or told you what to do. I've given you factual feedback that apparently you found so personally threatening that you chose to attack me and alienate me in response. I'll go let the people know who wanted my paid subscription mod why I won't be releasing it.

[Unknown]

Quote from: permutations on August 07, 2005, 10:23:49 AM
Apparently you view bug reports as "arrogant" and "argumentative". That's your problem, not mine. I have not been arrogant and argumentative. I have given a lot of detailed feedback simply because I have it to give - as a side effect of working with the code as closely as I am. It doesn't mean I think your code is bad or that you are a bad developer.

No, and neither did I say this.  I'm talking about past interactions with you, which have been less than pleasurable - like this one, I suppose.  I have no intention of wasting my time with people like you.

-[Unknown]

tentronik

#9
permutations the point is you arguing in a public board still you personalize your critic because your ego gots hurt somehow.
Wouldt this be important FOR YOURSELF you wouldnt had written about it.

Do you ever heard of public relations or team play?
Part of a team, is understanding, tolerating and is not to critize the CEO if so you indirectly attack him and hurt his status.

So obvisously this is not what anybody wanted - you only hurt SMF and the public relations - and you caused it! And you not even aware of it!
... talk about egoism and narzismen ...

No1 here dislikes you personal but you do everthing to make this happen?
Also you have my respect for your affords but this is nothing to brag about cause its normal.

If you want criticize anything go ahead BUT dont personalize it or as seen you find yourself diskreditiert(german word).




Amacythe

To be honest, I'm getting tired of reading this type of topic.  The board is called "SMF Coding Discussion", not "Let's Try to Push the Lead Dev Too Far".

QuoteI'll go let the people know who wanted my paid subscription mod why I won't be releasing it.
A closing final comment like that only makes you sound petty and immature, not to mention spiteful.  PAID mod?  Just how much have you paid for the software you are using?  Is that what makes you feel so justified to attack the dev?  All of the team members volunteer their time and more often than not feel very unappreciated.

I would lock this topic, but I feel that would be unfair and would prevent the post of apology I would hope is forthcoming.

tentronik

Best what you can do - finish your work and show more respect. Of course you can still have a diffrent opinion about the code and how the mod help functions.
Maybe you can even change something with some engagement and you become a source when the topic comes up and new user needs advice about SMF mod hacking whatever.

Become wise :)

This would be the logic end of the story, happy ever ever after...

1MileCrash

Quote from: Amacythe on August 07, 2005, 03:39:39 PM
To be honest, I'm getting tired of reading this type of topic.  The board is called "SMF Coding Discussion", not "Let's Try to Push the Lead Dev Too Far".

QuoteI'll go let the people know who wanted my paid subscription mod why I won't be releasing it.
A closing final comment like that only makes you sound petty and immature, not to mention spiteful.  PAID mod?  Just how much have you paid for the software you are using?  Is that what makes you feel so justified to attack the dev?  All of the team members volunteer their time and more often than not feel very unappreciated.

I would lock this topic, but I feel that would be unfair and would prevent the post of apology I would hope is forthcoming.
no, it's not a paid mod. It's released freely. It's a paid subscriptions mod. Like in vBulletin, where you can charge people to have an account on your forum.  ;D
The only thing php can't do is tell you how much milk is left in the fridge.



permutations

Response here:

http://www.simplemachines.org/community/index.php?topic=44775.msg323431#msg323431

I think it's worth reading. Underneath all the crapola, there's an important issue here that I hope won't get lost.

tentronik

Its his dessision who he helps or not.

Your 1st topic reads "typo" when its not a typo so you attacked him indirectly and what can you say to a coder worse?

All the time you thought about how could you explain the public the situation about you and the comment from the chief developer, could had went into developing the mod or writing a usefull readme or setting up a weppage related to it.

Now you made it public and you want consequences.

1st
Noone wants this its just a pschological play now, who has what image and your subconcious mind is making up things and you getting deeper into a discussion which is absolutely pointless.

2nd
You have absolutely no right to flame the main developer for whatever even if he likes he could shut down randomly the site for safing traffic whatever.
He is the boss - every word from you makes it for you harder now why dont you just say:"Ok!"

Thats it - say it "OK!" - thats all then go back stick to your work - a work which is questinable if you ask me - a commercial mod for you to gain money and you flame the one who makes a free product sorry boy you need some talking with people in real life.


Cheers

1MileCrash

Quote from: tentronik on August 07, 2005, 08:19:01 PMwork which is questinable if you ask me - a commercial mod for you to gain money and you flame the one who makes a free product sorry boy you need some talking with people in real life.


Cheers

NO! ITS NOT A COMMERCIAL MOD. HE IS NOT "SELLING" THE MOD. IT IS A "PAID SUBCRIPTION MOD". As in, people, "pay", to "subscribe", to your forum. He isnt selling the mod.

This mod allows you to charge people to register on your forum. He isnt selling it or anything....there is alot of confusion here.
The only thing php can't do is tell you how much milk is left in the fridge.



tentronik

It is for gaining money out of a product which is free.
Again this is just my personal opinion about this specific mod.

kegobeer

Quote from: tentronik on August 07, 2005, 08:25:10 PM
It is for gaining money out of a product which is free.
Again this is just my personal opinion about this specific mod.

I don't think perm will be making money off of this mod - he's just developing it because people have asked for such a mod.  Regarding paid memberships: I've seen plenty of forums that require a paid membership in order to take advantage of that particular resourse.  Nothing wrong there, IMHO.  There's also nothing wrong with making money off open source software - plenty of people do that.

Just my opinion, of course.
"The truth of the matter is that you always know the right thing to do. The hard part is doing it." - Norman Schwarzkopf
Posting and you (Click "WATCH THIS MOVIE")

permutations

#18
Open Source doesn't mean no one makes any money. It means charging for support rather than code. The company that makes SMF makes money from it by selling support in the form of charter memberships.

I was not planning to charge for my Paid Subscriptions mod - I was going to give that away for free (although it turns out I'm not able to do that because the SMF Lead Developer is trying to get rid of me). I'm using the Paid Subscriptions mod on my site to charge for a service that has nothing to do with computers at all - it just happens to use a forum as a vehicle for providing the service.

Charging for service is exactly what Open Source is about. Here are some links with information about the theory behind it, and how businesses (like Lewis Media, publisher of SMF) can and do use the Open Source model to make a lot of money:

Main site for the Open Source initiative:
http://www.opensource.org/

"The Cathedral and the Bazaar" (landmark article about how Open Source works as a busines model, and why open source code is better than commercial code):

http://www.catb.org/~esr/writings/cathedral-bazaar/

tentronik

OK,
i tried to say you need his help for FREE to get money and while you dont get it to finish the task for getting money you start a discussion about a personal dessision.

I dont want to say this is exactly how you thing about it, therfore i dont know you and the project good enough but i just think the critic is not fair.

Maybe he wasnt fair to you too but then again its always a team thing. And sometimes you need patience.

Advertisement: