-
AuthorPosts
-
November 7, 2014 at 5:54 pm #202533
Trying to load a gallery style1 in an article. I used the sintax {loadmodule mod_ja_acm,module name}
I actually view all the thumbnails in the article and the hover animation effect does work too. The problem is if I clicked on a thumbnail, gallery doesn’t work. A new page just loads the single image I clicked on (http://www.mysite.com/images/album/image.jpg). What do I do wrong?pavit Moderatorpavit
- Join date:
- September 2007
- Posts:
- 15749
- Downloads:
- 199
- Uploads:
- 2274
- Thanks:
- 417
- Thanked:
- 4028 times in 3778 posts
November 7, 2014 at 6:04 pm #554566Hi
Could you post a link to the page where this happens ?
pavit Moderatorpavit
- Join date:
- September 2007
- Posts:
- 15749
- Downloads:
- 199
- Uploads:
- 2274
- Thanks:
- 417
- Thanked:
- 4028 times in 3778 posts
November 7, 2014 at 6:25 pm #554568Hi
You should verify how the module is configured, that has nothing to do with the template itself or to the loadmodule plugin
If you publish same module in a normal page what happens ?
November 7, 2014 at 6:30 pm #554569If I publish the module in a normal page, it works properly.
pavit Moderatorpavit
- Join date:
- September 2007
- Posts:
- 15749
- Downloads:
- 199
- Uploads:
- 2274
- Thanks:
- 417
- Thanked:
- 4028 times in 3778 posts
November 7, 2014 at 6:35 pm #554570Ok
Could you send me via Private Message a super user account to your backend ? i will try to take a look
jooservices Friendjooservices
- Join date:
- October 2014
- Posts:
- 8556
- Downloads:
- 0
- Uploads:
- 130
- Thanked:
- 1245 times in 1121 posts
November 8, 2014 at 3:57 am #554596Hi there,
Please have right know about Joomla! load module in article
http://docs.joomla.org/How_do_you_put_a_module_inside_an_article%3F
# It’s triggered via Joomla! content plugin.
/**
* Plugin that loads module positions within content
*
* @param string $context The context of the content being passed to the plugin.
* @param object &$article The article object. Note $article->text is also available
* @param mixed &$params The article params
* @param integer $page The 'page' number
*
* @return mixed true if there is an error. Void otherwise.
*
* @since 1.6
*/
public function onContentPrepare($context, &$article, &$params, $page = 0)
{
// Don't run this plugin when the content is being indexed
if ($context == 'com_finder.indexer')
{
return true;
}// Simple performance check to determine whether bot should process further
if (strpos($article->text, 'loadposition') === false && strpos($article->text, 'loadmodule') === false)
{
return true;
}// Expression to search for (positions)
$regex = '/{loadpositions(.*?)}/i';
$style = $this->params->def('style', 'none');// Expression to search for(modules)
$regexmod = '/{loadmodules(.*?)}/i';
$stylemod = $this->params->def('style', 'none');// Find all instances of plugin and put in $matches for loadposition
// $matches[0] is full pattern match, $matches[1] is the position
preg_match_all($regex, $article->text, $matches, PREG_SET_ORDER);// No matches, skip this
if ($matches)
{
foreach ($matches as $match)
{
$matcheslist = explode(',', $match[1]);// We may not have a module style so fall back to the plugin default.
if (!array_key_exists(1, $matcheslist))
{
$matcheslist[1] = $style;
}$position = trim($matcheslist[0]);
$style = trim($matcheslist[1]);$output = $this->_load($position, $style);
// We should replace only first occurrence in order to allow positions with the same name to regenerate their content:
$article->text = preg_replace("|$match[0]|", addcslashes($output, '\$'), $article->text, 1);
$style = $this->params->def('style', 'none');
}
}// Find all instances of plugin and put in $matchesmod for loadmodule
preg_match_all($regexmod, $article->text, $matchesmod, PREG_SET_ORDER);// If no matches, skip this
if ($matchesmod)
{
foreach ($matchesmod as $matchmod)
{
$matchesmodlist = explode(',', $matchmod[1]);// We may not have a specific module so set to null
if (!array_key_exists(1, $matchesmodlist))
{
$matchesmodlist[1] = null;
}// We may not have a module style so fall back to the plugin default.
if (!array_key_exists(2, $matchesmodlist))
{
$matchesmodlist[2] = $stylemod;
}$module = trim($matchesmodlist[0]);
$name = htmlspecialchars_decode(trim($matchesmodlist[1]));
$stylemod = trim($matchesmodlist[2]);// $match[0] is full pattern match, $match[1] is the module,$match[2] is the title
$output = $this->_loadmod($module, $name, $stylemod);// We should replace only first occurrence in order to allow positions with the same name to regenerate their content:
$article->text = preg_replace("|$matchmod[0]|", addcslashes($output, '\$'), $article->text, 1);
$stylemod = $this->params->def('style', 'none');
}
}
}
It’s mean this plugin only trigger when onContentPrepare is triggered. Mostly in com_content
# For same case 3rd extension make integration with com_content to load content, but it does not mean they do trigger onContentPrepare even, than of course {loadmodule …} will not replaced by right module
# And even module is replaced but some special can’t work inside article because some css / js conflicted.Please consider about these 🙂
Thank you,
Viet Vumax_santiago Friendmax_santiago
- Join date:
- January 2013
- Posts:
- 216
- Downloads:
- 49
- Uploads:
- 58
- Thanks:
- 120
- Thanked:
- 8 times in 3 posts
June 4, 2015 at 4:05 pm #572902Uhm …and then is it pointless to put {loadposition module_gallery_name} in an article!
If we lose gallery scrolling it’s pointless link module into an article.
Is there a workaround to solve this ‘necessity’?!Thanks.
M.
max_santiago Friendmax_santiago
- Join date:
- January 2013
- Posts:
- 216
- Downloads:
- 49
- Uploads:
- 58
- Thanks:
- 120
- Thanked:
- 8 times in 3 posts
June 4, 2015 at 4:05 pm #737936Uhm …and then is it pointless to put {loadposition module_gallery_name} in an article!
If we lose gallery scrolling it’s pointless link module into an article.
Is there a workaround to solve this ‘necessity’?!Thanks.
M.
jooservices Friendjooservices
- Join date:
- October 2014
- Posts:
- 8556
- Downloads:
- 0
- Uploads:
- 130
- Thanked:
- 1245 times in 1121 posts
June 4, 2015 at 4:19 pm #572904Hi there
Yes. You can render module anywhere in Joomla! with basic PHP
http://joomla.stackexchange.com/questions/1054/displaying-a-joomla-module-using-php
Thank you,
Viet Vujooservices Friendjooservices
- Join date:
- October 2014
- Posts:
- 8556
- Downloads:
- 0
- Uploads:
- 130
- Thanked:
- 1245 times in 1121 posts
June 4, 2015 at 4:19 pm #737938Hi there
Yes. You can render module anywhere in Joomla! with basic PHP
http://joomla.stackexchange.com/questions/1054/displaying-a-joomla-module-using-php
Thank you,
Viet Vu -
AuthorPosts
This topic contains 10 replies, has 4 voices, and was last updated by jooservices 9 years, 5 months ago.
We moved to new unified forum. Please post all new support queries in our New Forum