Keyword

[SOLVED] user items in columns

  • Yiota
  • Yiota's Avatar
  • Visitor
11 years 2 weeks ago #118296 by Yiota
Replied by Yiota on topic Re: user items in columns
Your code should be
<div class="userItemView" style="float:left;width:33.3333%;"<?php if(!$item->published || ($item->publish_up != $this->nullDate && $item->publish_up > $this->now) || ($item->publish_down != $this->nullDate && $item->publish_down < $this->now)) echo ' userItemViewUnpublished'; ?><?php echo ($item->featured) ? ' userItemIsFeatured' : ''; ?>">

The style should be added after the class="userItemView" closes.

Please Log in or Create an account to join the conversation.

More
11 years 2 weeks ago - 11 years 2 weeks ago #118297 by wone
Replied by wone on topic Re: user items in columns
Thank you!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!
all i have to do now is to resize images to make them fit like this
Part of the message is hidden for the guests. Please log in or register to see it.
any idea? can the text be under the image? the other items are not organized too

Please Log in or Create an account to join the conversation.

  • Yiota
  • Yiota's Avatar
  • Visitor
11 years 2 weeks ago #118298 by Yiota
Replied by Yiota on topic Re: user items in columns
The user page fetches the Generic image size. If that size is different than that of your category list you can either change it in the parameters or you could change it in the user.php file.
To change it through the user.php file you need to replace the image block with the following:
<?php if($this->params->get('userItemImage') && !empty($item->imageSmall)): ?>
			  <!-- Item Image -->
			  <div class="userItemImageBlock">
				  <span class="userItemImage">
				    <a href="<?php echo $item->link; ?>" title="<?php if(!empty($item->image_caption)) echo K2HelperUtilities::cleanHtml($item->image_caption); else echo K2HelperUtilities::cleanHtml($item->title); ?>">
				    	<img src="<?php echo $item->imageSmall; ?>" alt="<?php if(!empty($item->image_caption)) echo K2HelperUtilities::cleanHtml($item->image_caption); else echo K2HelperUtilities::cleanHtml($item->title); ?>" style="width:<?php echo $this->params->get('itemImageSmall'); ?>px; height:auto;" />
				    </a>
				  </span>
				  <div class="clr"></div>
			  </div>
			  <?php endif; ?>

Please Log in or Create an account to join the conversation.

More
11 years 2 weeks ago #118299 by wone
Replied by wone on topic Re: user items in columns
Ok it's done!
Thaaaaank you very much!!!
But i have an unanswered question asked in this forum 6 months ago : getk2.org/community/New-to-K2-Ask-here-first/170050-sitecomuser1
can u help me for this? I have tried mijosef but i faced lot of 404 errors and i was obliged to remove it.
Thanks in advanced!!!

Please Log in or Create an account to join the conversation.

More
11 years 4 days ago #118300 by George Nasis
Replied by George Nasis on topic Re: user items in columns
i did exactly the same steps but it doesn`t work for me.. :/ any idea?

Please Log in or Create an account to join the conversation.

  • Yiota
  • Yiota's Avatar
  • Visitor
11 years 3 days ago #118301 by Yiota
Replied by Yiota on topic Re: user items in columns
Maybe your css is preventing the columns from actually float next to each other. Could you provide a link to your page to check it out?

Thank you.

Please Log in or Create an account to join the conversation.

More
11 years 3 days ago #118302 by George Nasis
Replied by George Nasis on topic Re: [SOLVED] user items in columns
Ok thank you very much!


Part of the message is hidden for the guests. Please log in or register to see it.

Please Log in or Create an account to join the conversation.

  • Yiota
  • Yiota's Avatar
  • Visitor
11 years 3 days ago #118303 by Yiota
Replied by Yiota on topic Re: [SOLVED] user items in columns
You are missing the float:left in this class div.userItemView and a <div class="clr"></div> right before the userItemList closes in the user.php file of your overrides.

Please Log in or Create an account to join the conversation.


Powered by Kunena Forum