×

Notice

The forum is in read only mode.
Welcome, Guest
Username: Password: Remember me
  • Page:
  • 1

TOPIC: mod related items before jocomment!

mod related items before jocomment! 14 years 3 months ago #8300

  • pascal7
  • pascal7's Avatar Topic Author
  • Offline
  • Fresh Boarder
  • Fresh Boarder
  • Posts: 6
  • Thank you received: 0
Dear forumusers,

Is it possible to add the mod_related_items mod before the joomlacomment plugin. Is it not possible to place joomlacomment in a module to align the modules.
For example


Content
--
Related items list
--
joomlacomment

mod related items before jocomment! 14 years 3 months ago #8301

  • Daniel Dimitrov
  • Daniel Dimitrov's Avatar
  • Away
  • Administrator
  • Administrator
  • Posts: 9618
  • Karma: 155
  • Thank you received: 1081
you can use the native joomla function to load a module position in an article
{loadPosition positionName}

this will load the modules in the given position.

mod related items before jocomment! 14 years 3 months ago #8304

  • pascal7
  • pascal7's Avatar Topic Author
  • Offline
  • Fresh Boarder
  • Fresh Boarder
  • Posts: 6
  • Thank you received: 0
I have read more over this method on this article:
www.joomlaspan.com/general/include-any-m...ent-in-joomla-15.php

This means that i have to place the {loadposition relitems} code on every article. I have already test it on one article and it works but it is a hell of a job with 375 aticles.

Is it possible to place the {loadposition relitems} code on the !joomlacomment template? Than have i only place the code once. I have already test this on /components/com_comment/joscomment/templates/modern/index.html
</head>
<body>
<div id="comment">
{loadposition relitems}
<!-- <<< html code above is just to allow preview of template -->
JOOMLACOMMENT TEMPLATE : default-emotop
/*-----------------------------------------------------------*/
/*--  only {xxx}{/xxx} blocks are taken in account  ---------*/
/*-----------------------------------------------------------*/
{readon}
but this do not work.

Can someone tell me how i can fix this problem?
Happy New Year!
Pascal7

mod related items before jocomment! 14 years 3 months ago #8328

  • JonusC
  • JonusC's Avatar
  • Offline
  • Platinum Boarder
  • Platinum Boarder
  • Posts: 785
  • Thank you received: 48
Editing index.html will not work because Joomla doesn't know anything about the file, it's manually parsed via the JoomlaComment component (it actually doesn't even load the HTML as a Web Page, just as raw text).

EDIT: Wait, perhaps the article tag should work in the JC template because it's executed onPrepareContent... I'm not sure. But you will need to move the {loadposition relitems} tag to underneath the {body} tag in the JoomlaComment template - it already says in the comment template that "only data within the {body}{/body} tags are parsed by Joomla" (or something like that) and everything above it is for Template Preview only.

I have no idea how to re-code JoomlaComment into a module format (I've never written a component before) and Daniel already has a great deal of work... but I am interested in this. Thankfully, there are already some Component > Module wrapper solutions for you to try to see if it is at least possible (and if we're lucky it might work as a module straight away) but if you don't mind testing then try out one of the many extensions on the Embed & Include section of Joomla Extensions Directory - they have extensions there that can help, such as Plugin In Module which could allow the JoomlaComment plugin to execute in a module position instead of within the main content. Or perhaps the Component as Content extension might work better? Those two stood out to my eye, I might just test out the Component as Content one in a few days if I get around to it.

If you can help us with this, please do so - try a few of those extensions on a test site that might sound like a solution and tell us which one works the best for your Joomla site and if there are any bugs from using the one you decide on. If you do this I will try to bugfix it, and might even code up a new "Module Wrapper" option based on the mostly-working, generic wrapper extension you find to include in newer JoomlaComment releases :)

mod related items before jocomment! 14 years 3 months ago #8329

  • Daniel Dimitrov
  • Daniel Dimitrov's Avatar
  • Away
  • Administrator
  • Administrator
  • Posts: 9618
  • Karma: 155
  • Thank you received: 1081
what I meant was this: www.joomlaspan.com/general/include-any-m...ent-in-joomla-15.php


Or you can install any other plugin that loads modules after the article ;)
  • Page:
  • 1
Time to create page: 0.217 seconds