1. This site uses cookies. By continuing to use this site, you are agreeing to our use of cookies. Learn More.

I'm sad

Discussion in 'Styling and Customization Questions' started by Mutt, Aug 15, 2012.

  1. Mutt

    Mutt Well-Known Member

    I love Xenforo & am thrilled about my decision to switch from vb3.8 BUT I have a really hard time coding addons. I know xen was made for addons but I'm no programmer & evidently making addons is beyond me. I'm a dirty hacker & had no problem hacking the VB code or making plugins / products for it. It was all very straight forward and with Xen it's all this extends that and a half a dozen files to do even the simplest of mods. just finding the right spot to work takes me forever & even if I go in to hack the code, there's a bunch of steps just to get the vars to my location or to get them thru to the next spot. I hoped I would have picked it up by now but my learning curve has hit a brick wall. With all the trouble & wasted time I have I was thinking maybe it's not Xen, maybe I just don't remember how to code.

    then today i had to work on some VB stuff. I still take care of a vb3.8 board but haven't done any modding to it in YEARS. (since before vb4 came out) they wanted some custom work I thought, how am I going to remember anything about VB code. I installed some addons & it was cake. no waiting for every for templates to rebuild, just boom done. when it wasn't exactly what I wanted it took me a couple minutes to go in & edit the plugins, make my own, etc and before I knew it I had done some slick custom stuff without any headaches or mistakes. I think called a table calendar instead of events but the fix was obvious.

    why the hell can't I code Xen that easily!!!!! it's so frustrating. I watch the videos of Kier "hello, this is kier from xenforo" explaining how to make a simple mod w/ listeners & then an extends & a call to the listener / writer, etc etc. it took me forever just to figure out how to sort the smilies. a change in sort order!! should have been a second. if it was VB I'd find the template where I want my finished product to show up, search the files for that template name, & find where it was called. then i could work backwards from there and within a min or 2 it would be done. I swear it took me half the night on Xen. I must have edited 6 diff places till I found the right spot.

    anyway, like I said i'm said. was always proud at how quickly I'd whip on some cool VB stuff and today's VB flashback pointed out how far behind I am here. :(
    Dan and gordy like this.
  2. gordy

    gordy Well-Known Member

    Yup, same here, dirty hacker that could get the job done. I guess some get it and some don't. I wish I had the time to get it! ;)
  3. Jake Bunce

    Jake Bunce XenForo Moderator Staff Member

    Finding the relevant template is mostly this:


    The extra processing when saving a template is a trade off in order to get optimal performance at run time. So it's a good thing.

    Finding the relevant PHP code can usually be reduced identifying the controller and action, and then following the code from there. The controller is indicated as the "title text" for the debug area at the bottom of each page (when debug mode is enabled):

    Screen shot 2012-08-15 at 10.20.14 AM.png

    I am experienced with both vB and XF code. In general XF has more layers of abstraction in its code and various systems. It is very object oriented which is a higher organization than the procedural code of vB3.

    Let me know if you have any other questions.
    Mutt and EQnoble like this.
  4. Chris D

    Chris D XenForo Developer Staff Member

    This surprises me.

    XenForo has been my first experience at PHP and I'm finding it quite the opposite.

    Admittedly there is many different files that could control the same thing, but that's due to the MVC model which - when I look at something that doesn't adhere to this model - just makes my eyes bleed.

    I've not really done much with the smilies system nor am I aware of specifically what you're referring to but if it's like other parts without looking I'd hazard a guess that changing the Smilies sort order would be something controlled in XenForo_Model_Smilies or in BbCode_Formatter_Base.

    The thing I've learned, however, is not to suffer in silence.

    There is a hell of a lot of expertise here. Usually a post in the developer forum will get you the answer and the great thing is, whatever you learn from one answer could be used as a clue to answer another question by yourself.
    EQnoble and TheBigK like this.
  5. Naatan

    Naatan Well-Known Member

    vB is easier for rookies because there are hardly any conventions to abide by, whereas XenForo is the opposite, it imposes many conventions in the interest of performance and clean code. For a skilled programmer it's highly preferrable this way.

    I'd rather use software that makes it easy on professional programmers and hard on rookies than the other way around.
    HWS, yavuz and Bob like this.
  6. gordy

    gordy Well-Known Member

    Don't be surprised... It's harder to unlearn a different way ;)
    EQnoble likes this.
  7. Dan

    Dan Well-Known Member

    Mutt, I feel you pain. I "grew up" on vB and am now completely lost. However, all of the people I "look up to" and respect on this forum say that the MVC architecture is the way to go, so I believe them. I just keep downloading other's addons and picking them apart to see what/how they did it. Look for my first addon in 2016 :p
  8. Luke F

    Luke F Well-Known Member

    Sort of agreed, the amount of time I spend with 'Search in Files' in my IDE is shocking

    It's a very nice code structure, but horrible to work backwards with. Though to be fair, nothing compared to the likes of bbPress
    ragtek likes this.
  9. dutchbb

    dutchbb Well-Known Member

    I think someone should write some thorough documentation on how to code for XF, to stimulate people trying to write add-ons. The add-on part of forum software is at least as important as the software itself. I still feel vB has an advantage in this department and not just because of the learning curve, but also because vb.org has some basic principles that I think work better. Like any released mod has to be at least partly free, while here it can be 100% paid, which is pretty bad if XF is to continue growth and become the largest and most popular forum software.
  10. DRE

    DRE Well-Known Member

    Two years ago I was a rookie and yet I still customized my vB4 site beyond belief. I did a lot to it, even though I had no previous experience with code or design. Two years later I still don't know php or coding in general and yet I'm still able to make some addons. The way I learn is by studying other people's codes and working backwards from there. In anything you do... you just gotta put your mind to it and persevere. Like Chris Deeming said, ask questions. I ask a lot of questions myself. I agree with most of your post though, about it taking a long time to get certain things done on xenforo than it does with vBulletin. But in some ways the opposite is true, especially with design. In design, xenforo is far more easier to work with than vbulletin.
    Chris D likes this.
  11. Mutt

    Mutt Well-Known Member

    oh, I get the processing of templates somehow was good for me int eh long end & yeah, I get all the layers are in the long run good & probably reduce redundant code.

    thanks for the help
  12. Mutt

    Mutt Well-Known Member

    I agree, it's way better for the finished product & I love all the professionally made addons. I'll get it eventually. one day it will just click.

Share This Page