What About Adding A Code Capsule?

Jump to Last Post 1-9 of 9 discussions (22 posts)
  1. brad4l profile image79
    brad4lposted 9 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 image83
      larryfreemanposted 9 years agoin 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.



  2. brad4l profile image79
    brad4lposted 9 years ago

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

  3. Marisa Wright profile image96
    Marisa Wrightposted 9 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 image79
      brad4lposted 9 years agoin 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.


      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 image96
        Marisa Wrightposted 9 years agoin 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 image79
          brad4lposted 9 years agoin 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 image81
    JamaGeneeposted 9 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 image96
      Marisa Wrightposted 9 years agoin 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 image81
        JamaGeneeposted 9 years agoin 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 image79
      brad4lposted 9 years agoin 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 image59
      GeneriqueMediaposted 9 years agoin reply to this

      Oh so true!

  5. William F. Torpey profile image75
    William F. Torpeyposted 9 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 image84
    relacheposted 9 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 image67
    sunforgedposted 9 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 image59
      GeneriqueMediaposted 9 years agoin 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?


      1. sunforged profile image67
        sunforgedposted 9 years agoin 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 image59
          GeneriqueMediaposted 9 years agoin reply to this

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


          1. sunforged profile image67
            sunforgedposted 9 years agoin reply to this

            Yes, sandboxed is a great comparison

    2. brad4l profile image79
      brad4lposted 9 years agoin reply to this

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

  8. GeneriqueMedia profile image59
    GeneriqueMediaposted 9 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.


  9. larryfreeman profile image83
    larryfreemanposted 9 years ago

    Today, the code capsule was added to HubPages.

    Thanks very much for the suggestion.




This website uses cookies

As a user in the EEA, your approval is needed on a few things. To provide a better website experience, hubpages.com uses cookies (and other similar technologies) and may collect, process, and share personal data. Please choose which areas of our service you consent to our doing so.

For more information on managing or withdrawing consents and how we handle data, visit our Privacy Policy at: https://hubpages.com/privacy-policy#gdpr

Show Details
HubPages Device IDThis is used to identify particular browsers or devices when the access the service, and is used for security reasons.
LoginThis is necessary to sign in to the HubPages Service.
Google RecaptchaThis is used to prevent bots and spam. (Privacy Policy)
AkismetThis is used to detect comment spam. (Privacy Policy)
HubPages Google AnalyticsThis is used to provide data on traffic to our website, all personally identifyable data is anonymized. (Privacy Policy)
HubPages Traffic PixelThis is used to collect data on traffic to articles and other pages on our site. Unless you are signed in to a HubPages account, all personally identifiable information is anonymized.
Amazon Web ServicesThis is a cloud services platform that we used to host our service. (Privacy Policy)
CloudflareThis is a cloud CDN service that we use to efficiently deliver files required for our service to operate such as javascript, cascading style sheets, images, and videos. (Privacy Policy)
Google Hosted LibrariesJavascript software libraries such as jQuery are loaded at endpoints on the googleapis.com or gstatic.com domains, for performance and efficiency reasons. (Privacy Policy)
Google Custom SearchThis is feature allows you to search the site. (Privacy Policy)
Google MapsSome articles have Google Maps embedded in them. (Privacy Policy)
Google ChartsThis is used to display charts and graphs on articles and the author center. (Privacy Policy)
Google AdSense Host APIThis service allows you to sign up for or associate a Google AdSense account with HubPages, so that you can earn money from ads on your articles. No data is shared unless you engage with this feature. (Privacy Policy)
Google YouTubeSome articles have YouTube videos embedded in them. (Privacy Policy)
VimeoSome articles have Vimeo videos embedded in them. (Privacy Policy)
PaypalThis is used for a registered author who enrolls in the HubPages Earnings program and requests to be paid via PayPal. No data is shared with Paypal unless you engage with this feature. (Privacy Policy)
Facebook LoginYou can use this to streamline signing up for, or signing in to your Hubpages account. No data is shared with Facebook unless you engage with this feature. (Privacy Policy)
MavenThis supports the Maven widget and search functionality. (Privacy Policy)
Google AdSenseThis is an ad network. (Privacy Policy)
Google DoubleClickGoogle provides ad serving technology and runs an ad network. (Privacy Policy)
Index ExchangeThis is an ad network. (Privacy Policy)
SovrnThis is an ad network. (Privacy Policy)
Facebook AdsThis is an ad network. (Privacy Policy)
Amazon Unified Ad MarketplaceThis is an ad network. (Privacy Policy)
AppNexusThis is an ad network. (Privacy Policy)
OpenxThis is an ad network. (Privacy Policy)
Rubicon ProjectThis is an ad network. (Privacy Policy)
TripleLiftThis is an ad network. (Privacy Policy)
Say MediaWe partner with Say Media to deliver ad campaigns on our sites. (Privacy Policy)
Remarketing PixelsWe may use remarketing pixels from advertising networks such as Google AdWords, Bing Ads, and Facebook in order to advertise the HubPages Service to people that have visited our sites.
Conversion Tracking PixelsWe may use conversion tracking pixels from advertising networks such as Google AdWords, Bing Ads, and Facebook in order to identify when an advertisement has successfully resulted in the desired action, such as signing up for the HubPages Service or publishing an article on the HubPages Service.
Author Google AnalyticsThis is used to provide traffic data and reports to the authors of articles on the HubPages Service. (Privacy Policy)
ComscoreComScore is a media measurement and analytics company providing marketing data and analytics to enterprises, media and advertising agencies, and publishers. Non-consent will result in ComScore only processing obfuscated personal data. (Privacy Policy)
Amazon Tracking PixelSome articles display amazon products as part of the Amazon Affiliate program, this pixel provides traffic statistics for those products (Privacy Policy)