-
AuthorPosts
-
tgtff Friend
tgtff
- Join date:
- April 2009
- Posts:
- 42
- Downloads:
- 4
- Uploads:
- 1
- Thanks:
- 10
- Thanked:
- 2 times in 1 posts
September 9, 2010 at 2:59 pm #154173I have inserted 3 columns and 1 image per column in the frontpage blog layout. For each image, I attached a URL. However none of the images can be clicked.
I checked these posts but they are related to Joomlart modules (http://www.joomlart.com/forums/topic/navigation-links-not-clickable/, http://www.joomlart.com/forums/topic/can-images-be-clickable/, http://www.joomlart.com/forums/topic/linked-imagelike-article-title-in-ja_news-and-ja_news_fp/).
Any ideas why this wouldn’t work with a plain article image on the home page for this template?
Thanks,
Saguaros ModeratorSaguaros
- Join date:
- September 2014
- Posts:
- 31405
- Downloads:
- 237
- Uploads:
- 471
- Thanks:
- 845
- Thanked:
- 5346 times in 4964 posts
September 13, 2010 at 2:02 am #355296Hello
In the overriding layout of the front page, the layout automatic find a image and display it on the left of each row, and has a fixed width. if you can disable this feature, but something will work wrong. so that i recommend you should not modify,
find code in here : templatesja_socialhtmlcom_contentfrontpagedefault_item.php
[PHP]
<?php
//get images
$regex = ‘#<img[^>]*>#’;
$image = ”;
if (preg_match ($regex, $this->item->text, $matches)) {
$image = $matches[0];
$this->item->text = str_replace ($image, ”, $this->item->text);
}
?>
[/PHP]tgtff Friendtgtff
- Join date:
- April 2009
- Posts:
- 42
- Downloads:
- 4
- Uploads:
- 1
- Thanks:
- 10
- Thanked:
- 2 times in 1 posts
September 14, 2010 at 2:12 am #355428Hi, sorry I probably should have been clearer: when I said I added columns, I meant I configured the home page “menu” settings to be 3 columns. I didn’t insert a table in the frontpage articles.
Can you confirm the code above is the right solution for this?
Saguaros ModeratorSaguaros
- Join date:
- September 2014
- Posts:
- 31405
- Downloads:
- 237
- Uploads:
- 471
- Thanks:
- 845
- Thanked:
- 5346 times in 4964 posts
September 17, 2010 at 2:08 am #355750As you said: <em>@tgtff 193889 wrote:</em><blockquote> links attached to images in frontpage body layout aren’t clickable </blockquote>, you would like to make a link for image of k2 item, ( this does not relate with setting of column ). so you will remove the above code to resolve this issue
tgtff Friendtgtff
- Join date:
- April 2009
- Posts:
- 42
- Downloads:
- 4
- Uploads:
- 1
- Thanks:
- 10
- Thanked:
- 2 times in 1 posts
September 20, 2010 at 3:41 am #356020Thanks. So is there no way to keep the alignment left and allow images to have links on the frontpage?
If not, then I’ll just have to remove the frontpage body layout and show the images a different way like modules. How do I remove the frontpage body layout (white background, curved border, shadow) without removing the body layout for all the other pages?
Saguaros ModeratorSaguaros
- Join date:
- September 2014
- Posts:
- 31405
- Downloads:
- 237
- Uploads:
- 471
- Thanks:
- 845
- Thanked:
- 5346 times in 4964 posts
September 21, 2010 at 1:37 am #356181<em>@tgtff 194654 wrote:</em><blockquote>Thanks. So is there no way to keep the alignment left and allow images to have links on the frontpage?
If not, then I’ll just have to remove the frontpage body layout and show the images a different way like modules. How do I remove the frontpage body layout (white background, curved border, shadow) without removing the body layout for all the other pages?</blockquote>
oh, i had an other solution better than :). you open the file: templatesja_socialhtmlcom_contentfrontpagedefault_item.php and find the following code:
[PHP]
<?php
//get images
$regex = ‘#<img[^>]*>#’;
$image = ”;
if (preg_match ($regex, $this->item->text, $matches)) {
$image = $matches[0];
$this->item->text = str_replace ($image, ”, $this->item->text);
}
?>
[/PHP]
and replace:
[PHP]
<?php
//get images
$regex = ‘#<img[^>]*>#’;
$image = ”;
if (preg_match ($regex, $this->item->text, $matches)) {
$tmp = $matches[0];
$this->item->text = str_replace ($tmp, ‘<div class=”article-image”>’.$tmp.$this->item->event->beforeDisplayContent.”</div>”, $this->item->text);
}
?>
[/PHP]2) find:
<div class=”article-content fp-article-content”>
replace:
<div class=”article-content fp-article-content my-layout”>
and add the following code into the template.css file:
.my-layout {
padding:0!important;
}
.my-layout .article-image {
padding-right:12px;
}
.my-layout .article-image img {
margin:5px 0px;
} -
AuthorPosts
This topic contains 6 replies, has 2 voices, and was last updated by Saguaros 14 years, 2 months ago.
We moved to new unified forum. Please post all new support queries in our New Forum