jump to last post 1-9 of 9 discussions (22 posts)

What About Adding A Code Capsule?

  1. brad4l profile image84
    brad4lposted 8 years ago

    Have you considered adding a capsule for displaying html, php, and other types of programming code?

    An example of this can be found on vBulletin sites, which usually have a [code] block and a [php] block. This doesn't actually render the html or php, but does provide a little more control over formatting. It also often color codes the lines, making it easier to read and adds color to the common tags, such as head, html, or body.

    They also add a horizontal and vertical scroll bar, so even if you have a really long 500 line piece of code, it wouldn't affect the hubs dimensions.

    I see a number of programming tutorials, have a few ideas for hubs, and have a few guides of my own, which could benefit from this.

    Using the "preformatted" option in the text editor does improve the way it looks. However it does not preserve the texts formatting when it is copied and pasted, which can be important for programming or other technical tutorials.

    1. larryfreeman profile image87
      larryfreemanposted 8 years ago in reply to this

      Hi Brad41,

      Thanks for the suggestion.  I agree with you that it would be great to have better support code in hubs.  I also would like to write hubs on code. smile

      I've added it to the HubPages list of possible new features.  We should make a decision in the next week or so about which features to include in the next release.

      I'll post on this thread when we make our decision.

      Cheers,

      -Larry

  2. brad4l profile image84
    brad4lposted 8 years ago

    Thanks for the quick response Larry. I hope it makes the cut wink

  3. Marisa Wright profile image94
    Marisa Wrightposted 8 years ago

    ...on the other hand, let's not lose sight of HubPages's boast that it enables you to write without having to know "all the techie stuff".

    I've already encountered some of my referrals complaining that HubPages is too difficult to understand, so I'd hate to see more complications being added.

    I know that the less technical could ignore the code capsule, but if Hubs start to appear with fancy colours and layouts, others are going to feel the pressure to keep up.

    1. brad4l profile image84
      brad4lposted 8 years ago in reply to this

      I apologize for the confusion and am sorry to hear that some of your referrals did not find HubPages Easy To Use.

      Perhaps you could find out what they found difficult and make a how to. It would make a good hub and could benefit your referrals too wink

      However, I think there must have been a misunderstanding about my original request.

      I am in no way suggesting fancy colors or layouts.

      Below is an example of what I was referring to in my original post.
      What you see there is basically what visitors to the hub would see.

      The little box is the "code capsule" and the rest of the web page surrounds the "code capsule".

      A certain set of predefined words are color coded and every other line is a different color, making it much easier to read.

      The scroll bar for really long lines also means it won't mess with the placement of pictures or ads in the hub.

      I should have probably included a picture in my first post, but the "code capsule" is a teaching aid, not any sort of crazy theme or blinking other monstrosity.

      http://i44.tinypic.com/29qo0so.jpg




      I completely agree, but there is no reason that HubPages can't be a place that enables you to write without having to know "all the techie stuff" AND a place where you can write about "all the techie stuff."

      I do not see why the two need to be mutually exclusive.

      1. Marisa Wright profile image94
        Marisa Wrightposted 8 years ago in reply to this

        Darkside and others have already done a very good job of that - and personally, I don't remember struggling with the whole capsule idea when I started.  I've been quite surprised to find people are so impatient!



        I think I understand what you're getting at now - you're not talking about a capsule where you can write HTML to produce something else.  You're talking about a capsule where you can paste in lines of code and have them come out looking more intelligible.  Have I got it this time?

        1. brad4l profile image84
          brad4lposted 8 years ago in reply to this

          To be honest, I would have to agree with you. I think it is rather straight forward as well and in many ways, the control given to the user of their own Hubs is one of the things that sets it apart from other sites.

          However, there really can be a fine line between having too much functionality and not enough.



          Yep, exactly.

          I wish I had been clearer in my original post, because I can both understand and appreciate the confusion.

          I would hate to see every Hub having its own crazy blinking theme, as something like that would really distract what I like to think HubPages should be about.

  4. JamaGenee profile image88
    JamaGeneeposted 8 years ago

    If this is implemented, hope everybody remembers this a community for writers, not a showcase for assembling bells and whistles.  There are blogs I avoid because of the busy background, wild colors or fonts, and a lot of other junk that hide the fact there's little or no original content.

    1. Marisa Wright profile image94
      Marisa Wrightposted 8 years ago in reply to this

      I agree JamaGenee, in fact that's probably what I should have said!  The people I referred to - the ones who join under my referral then drop out - are mainly writers who write at places like AC and Helium.  They're already complaining there are too many distractions on HP - they just want to write, not muck about with capsules - and the more complicated it gets, the more likely they are to have that reaction.

      1. JamaGenee profile image88
        JamaGeneeposted 8 years ago in reply to this

        Writers are an odd lot! It's a wonder some of us got past legal pads and #2 pencils! 

        But mucking about with text capsules has never been my 'thing' either.  Never mind back in the Dark Ages, I taught myself html and built many amazing websites from scratch by manipulating code. So I do get frustrated at times with the limitations of capsules of any kind.

    2. brad4l profile image84
      brad4lposted 8 years ago in reply to this

      I too detest a "busy background," such as can be found on MySpace, but this is NOT what I was suggesting.

      Instead, I was simply suggesting a way for those of us who write about technical issues to show examples of programming code, sort of like how you can quote other peoples text in this forum.

      An example is posted below.

    3. GeneriqueMedia profile image61
      GeneriqueMediaposted 8 years ago in reply to this

      Oh so true!

  5. William F. Torpey profile image80
    William F. Torpeyposted 8 years ago

    I understand HubPages' desire to keep improving, innovating and updating. As one who is primarily interested in writing I think it would be wise for the very competent HubPages staff to make it as easy as possible for all of us computer dummies to produce good hubs. Many good writers have little to no interest in becoming computer geeks, and if good content is to remain a major goal of HubPages the site must continue to be relatively simple to use in order to attract and keep talented writers.

  6. relache profile image88
    relacheposted 8 years ago

    I'd like to be able to do a bit more with HTML, but I'd also like it if HubPages can avoid stuff I've seen happen on other sites like spammers doing coding that can redirect visitors to porn sites.

  7. sunforged profile image70
    sunforgedposted 8 years ago

    This is a great idea!

    I would also like to be able to write tutorials that include displaying code as it should appear.

    The code box function is standard in many forums and online bulletins, I cant imagine such a thing would be difficult to include.

    Just in case readers skip by the important posts in teh thread.

    Code boxes do not! change the layout or visual effects of a hubs display- it would merely be a capsule that allows proper formatting of the code as written

    its also a great tool for sharing code - it could open hubs to a whole new communtiy of writers and readers

    Also- HTML is easy! everyone who is putting considerable time into there online promotions should learn the basic anyway...I taught myself html when i was 12 years old from html for dummies book...and i hated computers! anybody can do it

    1. GeneriqueMedia profile image61
      GeneriqueMediaposted 8 years ago in reply to this

      I agree that HTML is easy. However, as some have pointed out...the ability to hack code into HTML opens up a pandora's box. Just look at MySpace profiles. But if most hubbers used this ability constructively, I doubt there would be little need to worry.

      The question is, though..can we count on that?

      G|M

      1. sunforged profile image70
        sunforgedposted 8 years ago in reply to this

        This is a non-issue - a code box does not have functionality - the code within is display only - whatever is within cannot break out and change anything- it is intended specifically to keep people from abusing html/php

        My comment about html was poorly targeted, i was meaning to respond to all the comments about this is a "writers site" - i was trying to point out that everyone should have a basic understanding of html, esp if they ever plan to expand to being the master of their own sites and content, rather than a sharecropper.

        MySpace is proof that people should not be trusted with design decisions, leave that to the experts

        1. GeneriqueMedia profile image61
          GeneriqueMediaposted 8 years ago in reply to this

          Ahh, I got you. A great idea, then, as presented. Sandboxed.

          G|M

          1. sunforged profile image70
            sunforgedposted 8 years ago in reply to this

            Yes, sandboxed is a great comparison

    2. brad4l profile image84
      brad4lposted 8 years ago in reply to this

      Thanks sunforged. Code Boxes have proved a difficult beast to explain wink

  8. GeneriqueMedia profile image61
    GeneriqueMediaposted 8 years ago

    And in case anyone doesn't understand the term...us geeks are talking about "code" or "programs" that exists in its own little "box" that can't harm any other "process."

    This prevents viruses, bad commands, etc., etc.

    G|M

  9. larryfreeman profile image87
    larryfreemanposted 8 years ago

    Today, the code capsule was added to HubPages.

    Thanks very much for the suggestion.

    Cheers,

    -Larry

 
working