Die Beste Aller Zeiten

Going direct to heaven, going direct the other way

New Parameters for mod_placehere

I finally had a chance to use the place here module in one of my projects – I think this is actually the first time I used this (or it’s predecessor mod_contentitem) on one if my sites (I wrote this originally as a reply to a request in the Joomla Forum). My customer required a bit of extra functionality for the module which might be of use to somebody else, so it becomes part of the ‘official’ distribution. I will briefly introduce the new parameters, but since the module is by now quite complicated I will start asap with a bit of documentation.

Trim text

Like the name says this will trim down the text to the specified number of characters (so this expects a number as input, alphanumeric input will cause errors). This is a simple substring operation, so it might cut the last word in ha

Not found title, Not found text

If the id you entered in the id field at the top of the parameters does not return an article this title and text will be displayed instead.

Use Meta Description

If this is set to “yes” the module will use the text from the articles’ meta description instead of the intro text (if there is no meta description the intro text will be used as a fallback). The meta description is the short text you enter in the article manager (last entry in the parameter tab) that is supposed to be used by search engines.

Link to Category

If this is set to “yes” the readmore-Links in the module will not point to the single article, but to the blog layout page for the category to which the article belongs. This will only work properly if there is a link to the blog layout page somewhere in a menu (set up a hidden menu if necessary).

Run plugins

This is not new, but has caused a bit of confusion so I mention it here: Usually all plugins that run on the main content would run on the module content as well. This regularly wreaked havoc on page layouts when comment areas where appended to module contents etc, so I disabled plugins by default for the module. If you need to run plugins you need to set “run plugins” to “run plugins” (could I possibly be any clearer? I think not).

Like it? Get it from the download page for the place here module for Joomla 1.5.x

    Previous

    Ice on Mars

    Next

    Leo got the axe

    16 Comments

    1. Hi Eike,

      I’m experiencing a very strange behavior: the URLs rendered by the “$readmorelink” are dropping the hashes ( – ). So URLs are getting broken because they look “likethis” instead of “like-this”. Has anyone experienced this before? Cheers, Wallace.

    2. Yes. See latest blogpost.

    3. Hi Eike,

      We are using this great module on many sites.
      Are you going to port placehere module to Joomla!1.6?

    4. Neeraj kumar

      I am using mod_placeholder module but i want to display with functionality “Add comments” below the Article.Is it possible, if possible then how to do this application

    5. sorry, forgot to include the website! =)

    6. David

      Hi Eike,
      Thanks for a great module! I was wondering if you had any advice for linking the mod_placehere to the actual category blog layout. I have two mod_placehere modules on my front page, and have created a hidden menu linking to the category blog layout and I have also selected the “Link to category” option in the module manager. However, I keep getting a bad link when I select the title or “read more” of the module. Any suggestions?
      Thank you again!!

    7. Hi Gastão,

      the function to calculate links in Joomla only work properly when the linked item/category/whatever is linked in a menu. So you would need to create a menu with a link to your category and leave it unpublished (this feels a bit hack-ish, but if I want to use as much original Joomla code as possible – and I do – then this is outside my control).

    8. Hello Eike, great module.
      I am having trouble with link to category when I insert type = contentitem and a comma delimited list of articles. It inserts a bad link.
      When I use type = category it works fine.

    9. > I hope you don’t mind me making a suggestion.

      No, not at all – I don’t always have time to follow through with everything, but suggestions are always welcome.

      > It would be nice if you could specify that the leading article is not
      > to be trimmed.

      Will do (next weekend, probably).

      > a feature to exclude images

      This is a bit more complicated than in the mod_contentitem (where it more or less was enough not to parse mosimage-tags), I need some clever regexp to filter out the images tags, plus this will come with a slight performance hit. I see what I can do, but the lazy solution would be to add something like

      .mod_placehere img {
      display:none;
      }

      to your style sheet.

    10. Babs

      Hi, nice module! I hope you don’t mind me making a suggestion. It would be nice if you could specify that the leading article is not to be trimmed. Also, It might be useful to incorporate a feature to exclude images (like in the mod_contentitem). Thanks for writing and sharing your mods!

    11. lorenzo

      thanks heike… looking forward (PS sorry for double post)

    12. Hi Lorenzo,

      yes, I was lazy there.. I think I can fix this for you, but not before the next weekend.

    13. lorenzo

      very good module!
      but i’ve a problem with trim text option. since this feature doesn’t take in count html it won’t show pictures inside the content. and that’s a thing i need (i could use read-more device, i know, but i cannot for other reasons).
      thanks very much

    14. Minh

      Hi,
      sorry let me be more clear..

      Based on what category (catid) you are viewing, the module load in a particular article (id-article id), Not load in content from a category or section.

      I think I have the hack working working…

    15. Hi Minh,

      if I understand you correctly then the module already does that – there is a parameter called “type” and you can set it to item, category or section. Enter a category id and ordering options and the module content changes as new entries are added to a category.

    16. Minh

      Hi, great module.
      It would be great to include content id based on category id… So that content can be dynamic and change based on category…. I don’t know if you have time but I going over your code and hopefully I can hack it.

      wish me luck.

    Comments are closed.

    Powered by WordPress & Theme by Anders Norén