PHP Code, Web

Simple Joomla module to add any HTML to any position

Create beautiful Joomla websites with a flexible layout from iJoomla.com

With all my Joomla installations, I've usually been able to find a module to provide some sort of content for a sidebar. But sometimes, you just need a bit of static HTML that isn't automatically created anywhere on your site. So I whipped together this very simple Joomla extension that just provides a textarea for you to put in any HTML you want to. That HTML is then displayed wherever you place the module.

You can see this module in operation here, the 'featured opportunity' piece on the left. And here's the link to download the module, I call it mod_anything.

Create beautiful Joomla websites with a flexible layout from iJoomla.com

Share

43 Comments

  1. a lot thanks

  2. Simple is beautiful! 🙂

  3. Great module 🙂

  4. just going to d/load it but have to say that previous comment (by efewfwe) is very rude (serbian/croatian languague, mentioning your mother and f-word, so it should be removed) … just don't like that kind of rudeness in joomla-mambo community – a world od sharing (give and take) shoud at least be based on some respect to others (persons, work, whatever9
    … OK, to make it shorter, i'm sure i'll like it, it is simple, and just what i need. thanx in advance!

  5. Thanks a lot, this module simply works great.

    Is it possible to add some editor to the text area (jce, tiny_mce) ?

  6. That's an excellent idea, I'll add it to the next version!

  7. Great mod man!
    Where are these "pages" or "snippets" stored in Joomla?
    I need to know because I use a few of them and some code needs to know the directory they are in.
    Thanks!

  8. I'm experiencing a problem (or not) hoping you might be able to explain.

    If I insert a HTML table into the module, for e.g.

    this is a test

    the webpage returns the following source lines with line breaks:

    this is a test

    Any idea why? Other than that, great mod. Previous to this I was using mod_d4j_content_listing to create sidebar. This is so much easier.

  9. ooops, comments field doesn't like html code. Try again using [blockquote]

    e.g. of table inserted into module:

    this is a test

    Viewing the page source displays the following:

    this is a test

    I hope using [blockquote] works.

  10. crap… sorry… let's try [code]

    e.g. of table inserted into module:

    this is a test

    Viewing the page source displays the following:

    this is a test

  11. doesn't seem to be working!

    You can email me at "justincook [at] gmail . com" with the problem, I should be able to look at it tomorrow

  12. Apologies for the previos 3 comments.
    ok, last try, I'm replacing < > with []

    e.g. of table inserted into module:
    [TABLE cellSpacing=0 cellPadding=2 width="98%" align=middle border=1]
    [TBODY][TR]
    [TD][P align=center]this is a test[/TD]
    [/TR][/TBODY]
    [/TABLE]

    Viewing the page source displays the following:
    [TABLE cellSpacing=0 cellPadding=2 width="98%" align=middle border=1]
    [br /][TBODY]
    [br /][TR]
    [br /][TD]
    [br /][P align=center]this is a test[/TD]
    [br /][/TR]
    [br /][/TBODY]
    [br /][/TABLE]

  13. that would be because Joomla automatically converts \n (newline) charaters to &ltlbr /> characters

    remove all the line breaks, you should be fine

  14. Thanks for the prompt reply! It worked.

  15. First off great mod. Really useful.

    Qustions//

    Any idea why Joomla puts tags in for spaces and returns? Any way to change this?

    I'd like to have end user be able to read source code than have it striped down. THanks.

  16. I'm not sure why Joomla does that, but it does. So just take out the line breaks in your code

  17. html module needed

  18. Great site and add in!

  19. módulo do HTML necessitado

  20. New here.. but love the code & comradery. Thanks much, J.C.
    Consider this site bookmarked 🙂

  21. I see a mention in the code about the CSS class. How do I go about styling this thing. I've put code in the box for links to my RSS feeds but I want them to align right which I've had no luck doing. I noticed that in the module interface if I put in a class like rssmenu then the class will be "moduletablerssmenu" and the table class is "anything_rssmenu". How do I take this info and create entries in the CSS file to get it to align right. I've put an entry like this in my template CSS file and had no luck whatsoever.

    anything_rssmenu
    {
    text-align: right;
    background: 000;
    }

    And I tried an entry for table.moduletablerssmenu too.

    table.moduletablerssmenu td{
    text-align : right;
    }

    I'm sure it's just a stupid CSS problem and something is being cascaded but maybe I'm missing something else too.

    Any ideas?

  22. In my re-reading my last message I got an epiphany and figured it out. This fixed it.

    div.moduletablerssmenu td{
    text-align : right;
    }

    Now I just wish Joomla didn't add div tags to each entry because it stacks them if I have more than one thing.

    For example:
    I have an RSS feed icon for all blogs that shows up on all pages and I have an RSS feed icon just for the current blog that only shows up on the current page. When you're on that page you will get two links – one for all blogs and one for the current blog. Problem is I can't have them horizontal because it inserts div tags before and after each entry. I don't see a way around this because it's probably buried in the core.. I went the lo-tek way and just have both RSS feed icons in each anything module that way Joomla thinks it's one entry.

  23. Thanks for this. The module has been a life saver me!

  24. Hi

    Where on this site do I download the module?

    Thanks!

    Rowby

  25. Great mod which I love.

    There may however be a small bug when using Joomla v1.13. When using a Joomlart template and defining the Module Class Suffix as -orange a white block appears over 80% of the module towards the bottom right hand corner obscuring the text below.

    Any ideas how to 1) get round this other than use versions of Joomla earlier the 1.13 2) how to fix it.

    Thanks for your help.

    Mark

  26. Makes customizing that much quicker.

    I did have one question though… Is it possible to link this module to a specific URL?

    Case in point. I have a java script generated from an outside source which I to import text to the site. This script gathers the content and places it to a postview. However this post view is outside the site.

    Figured it would be easier if I just had the script link to the Html Module.

    Anythoughts?

    Thanks

  27. Is there a way to use this module in the Content area?
    I need to put an IFrame to an application I designed into my joomla site but I can't seem to put it anywhere. It would work with your module but I don't want it in a module position.

  28. Thanks for providing this module. I was looking for such modules for months. This provides a great tool in Joomla site customization.

  29. Marcel de Korte

    Hello Justin,

    This is realy a great module. After installing it works in only one secound.

    With kind regards,
    Marcel de Korte
    (Holland)

  30. hey justin I use your mod anything on several parts of my site, one part I use it in is for some java games, I have just started a new site and the template css wont allow me to set the alignment of its modules content on an individual basis (my previous template did) so what happens is my java games appear aligned to the left of every module, is there any to implement alignment into the mod_anything?

  31. sorry just had a look at the php of you mod its was easily fixed!

  32. I used your module to put the google ads in my web site (instead of the popular google module which I don't trust). Thank you, it was easy and perfect.

  33. Hi Justin, awesome tool! Thanks! Have you got one that is designed for Joomla 1.5.**? 'Cos I turned on the Legacy plugin to run this, otherwise it won't run.

  34. Hugo Carvalho (VisiGod)

    I've ported this module to the new Joomla series (1.5.x). Please get it at my site, located in visigod.com

  35. i dont understandhow use this extension can you make any video demonstration please?

  36. Unfortunately, it requires Legacy Mode.

  37. Thanks for the module. This is handy to add the custom HTML. There are lots of services that require copying and pasting HTML code and your mod perfectly serves the purpose.

  38. Livezilla在线客服软件与zencart整合教程 « 腾爱网

    […] 深圳zencart如果您安装有问题,可以看看http://www.livezilla.net/support/,有常见问题FAQ也有视屏教程http://www.livezilla.net/tutorials/,也可以去他们官方论坛求助http://www.livezilla.net/forum/ 安装joomlaçš„html代码模块模块下载地址http://www.dart-creations.com/component/option,com_docman/Itemid,75/http://www.justin-cook.com/wp/2006/12/18/simple-joomla-module-to-add-any-html-to-any-position/在joomla后台安装该模块 在livezillaçš„LiveZilla Server Admin中生成livezillaçš„js代码,然后将js代码复制粘贴到joomlaçš„html模块当中,就可以在joomla网站上使用了 […]

  39. Livezilla在线客服软件与zencart整合教程 « 大明宫

    […] 深圳zencart如果您安装有问题,可以看看http://www.livezilla.net/support/,有常见问题FAQ也有视屏教程http://www.livezilla.net/tutorials/,也可以去他们官方论坛求助http://www.livezilla.net/forum/ 安装joomlaçš„html代码模块模块下载地址http://www.dart-creations.com/component/option,com_docman/Itemid,75/http://www.justin-cook.com/wp/2006/12/18/simple-joomla-module-to-add-any-html-to-any-position/在joomla后台安装该模块 在livezillaçš„LiveZilla Server Admin中生成livezillaçš„js代码,然后将js代码复制粘贴到joomlaçš„html模块当中,就可以在joomla网站上使用了 […]

  40. This module is great and it does just what it says: anything. Thank you for sharing it.

  41. รับทำเว็บ joomla

    Thanks for providing this module. I was looking for such modules for months. This provides a great tool in Joomla site customization.

Leave a Reply

Your email address will not be published. Required fields are marked *

*
To prove you're a person (not a spam script), type the security word shown in the picture. Click on the picture to hear an audio file of the word.
Anti-spam image