Keyword

k2 tools modeuls

  • Alan
  • Alan's Avatar Topic Author
  • Offline
  • Senior Member
More
11 years 1 month ago #127276 by Alan
k2 tools modeuls was created by Alan
Hi all
How can edit calender blog style?
for example remove image or intro text?

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

  • Alan
  • Alan's Avatar Topic Author
  • Offline
  • Senior Member
More
11 years 1 month ago #127277 by Alan
Replied by Alan on topic Re: k2 tools modeuls
help please

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

More
11 years 1 month ago #127278 by Lefteris
Replied by Lefteris on topic Re: k2 tools modeuls
Hi. Please clarify. I don't get what you want to do. Make sure to check all K2 parameters for content display.

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

  • Alan
  • Alan's Avatar Topic Author
  • Offline
  • Senior Member
More
11 years 1 month ago - 11 years 1 month ago #127279 by Alan
Replied by Alan on topic Re: k2 tools modeuls
Hi. thank you for replaying.
I'm using module k2 tools (Select module functionality) for calendar.
every things is ok with the calendar. but the problem is article date blog-style.
I wanna make change or edit design like remove image and intro text.

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

More
11 years 1 month ago #127280 by Lefteris
Replied by Lefteris on topic Re: k2 tools modeuls
Go to K2 parameters and look at the section named "Layout & view options for Search & Date listings". There you will find all available settings for that view.

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

  • Alan
  • Alan's Avatar Topic Author
  • Offline
  • Senior Member
More
11 years 1 month ago #127281 by Alan
Replied by Alan on topic Re: k2 tools modeuls
thank you very much. that is what I need.
But I have one more questions. how can I give the result numbering?
like :
1.
2.
3.
4.
5.

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

  • Alan
  • Alan's Avatar Topic Author
  • Offline
  • Senior Member
More
11 years 1 month ago - 11 years 1 month ago #127282 by Alan
Replied by Alan on topic Re: k2 tools modeuls
please answer

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

More
11 years 1 month ago #127283 by Lefteris
Replied by Lefteris on topic Re: k2 tools modeuls
This is something you need to build on your own. There is no option to display numbers. If you are familiar with HTML read this getk2.org/documentation/tutorials/174-templating-with-k2-and-the-concepts-of-sub-templates. Then you will be able to apply the customization you want. If you are not, hire a developer to do this for you.

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

  • Alan
  • Alan's Avatar Topic Author
  • Offline
  • Senior Member
More
11 years 1 month ago #127284 by Alan
Replied by Alan on topic Re: k2 tools modeuls
I can do it. but which k2 php file can I make this change.?

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

More
11 years 1 month ago #127285 by Lefteris
Replied by Lefteris on topic Re: k2 tools modeuls
The file that is used in date listings is "generic.php".

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

  • Alan
  • Alan's Avatar Topic Author
  • Offline
  • Senior Member
More
10 years 11 months ago #127286 by Alan
Replied by Alan on topic Re: k2 tools modeuls
I have this code I dont know where can I insert it in "generic.php" for create numbering for result :
<?php for ($i = 1; $i < 101; $i++) {
echo $i;
}
?>

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

  • Alan
  • Alan's Avatar Topic Author
  • Offline
  • Senior Member
More
10 years 11 months ago #127287 by Alan
Replied by Alan on topic Re: k2 tools modeuls
please help

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

More
10 years 11 months ago #127288 by Lefteris
Replied by Lefteris on topic Re: k2 tools modeuls
This code is wrong. It just displays a list of numbers and is not connected in any way with the items in that page. Try to use <ol> in the results page. Once again, if you are not familiar with this, hire a developer to do it for you.

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

  • Alan
  • Alan's Avatar Topic Author
  • Offline
  • Senior Member
More
10 years 11 months ago #127289 by Alan
Replied by Alan on topic Re: k2 tools modeuls
yes also I have this css code but where I insert it?



<?php

defined('_JEXEC') or die;

?>
<html><head>
<style>
ol {
counter-reset:li;
}
</style>
</head>
<!-- Start K2 Generic (search/date) Layout -->
<div id="k2Container" class="genericView<?php if($this->params->get('pageclass_sfx')) echo ' '.$this->params->get('pageclass_sfx'); ?>">

<?php if($this->params->get('show_page_title') || JRequest::getCmd('task')=='search' || JRequest::getCmd('task')=='date'): ?>
<!-- Page title -->
<div class="componentheading<?php echo $this->params->get('pageclass_sfx')?>">
<?php echo $this->escape($this->params->get('page_title')); ?>
</div>
<?php endif; ?>


<?php if(JRequest::getCmd('task')=='search' && $this->params->get('googleSearch')): ?>
<!-- Google Search container -->
<div id="<?php echo $this->params->get('googleSearchContainer'); ?>"></div>
<?php endif; ?>

<?php if(count($this->items) && $this->params->get('genericFeedIcon',1)): ?>
<!-- RSS feed icon -->
<div class="k2FeedIcon">
<a href="<?php echo $this->feed; ?>" title="<?php echo JText::_('K2_SUBSCRIBE_TO_THIS_RSS_FEED'); ?>">
<span><?php echo JText::_('K2_SUBSCRIBE_TO_THIS_RSS_FEED'); ?></span>
</a>
<div class="clr"></div>
</div>
<?php endif; ?>

<?php if(count($this->items)): ?>

<div class="genericItemList">
<?php foreach($this->items as $item): ?>

<!-- Start K2 Item Layout -->
<!-- saratay title -->
<ol><li><div class="genericItemView">


<div class="genericItemHeader">
<?php if($this->params->get('genericItemDateCreated')): ?>
<!-- Date created -->
<span class="genericItemDateCreated">
<?php echo JHTML::_('date', $item->created , JText::_('K2_DATE_FORMAT_LC2')); ?>
</span>
<?php endif; ?>

<?php if($this->params->get('genericItemTitle')): ?>
<!-- Item title -->
<h2 class="genericItemTitle">
<?php if ($this->params->get('genericItemTitleLinked')): ?>


<a href="<?php echo $item->link; ?>">
<?php echo $item->title; ?>
</a>

<?php else: ?>
<?php echo $item->title; ?>
<?php endif; ?>
</h2>

<?php endif; ?>
</div>

<div class="genericItemBody">
<?php if($this->params->get('genericItemImage') && !empty($item->imageGeneric)): ?>
<!-- Item Image -->
<div class="genericItemImageBlock">
<span class="genericItemImage">
<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->imageGeneric; ?>" 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('itemImageGeneric'); ?>px; height:auto;" />
</a>
</span>
<div class="clr"></div>
</div>
<?php endif; ?>

<?php if($this->params->get('genericItemIntroText')): ?>
<!-- Item introtext -->
<div class="genericItemIntroText">
<?php echo $item->introtext; ?>
</div>
<?php endif; ?>

<div class="clr"></div>
</div>

<div class="clr"></div>

<?php if($this->params->get('genericItemExtraFields') && count($item->extra_fields)): ?>
<!-- Item extra fields -->
<div class="genericItemExtraFields">
<h4><?php echo JText::_('K2_ADDITIONAL_INFO'); ?></h4>
<ul>
<?php foreach ($item->extra_fields as $key=>$extraField): ?>
<?php if($extraField->value != ''): ?>
<li class="<?php echo ($key%2) ? "odd" : "even"; ?> type<?php echo ucfirst($extraField->type); ?> group<?php echo $extraField->group; ?>">
<?php if($extraField->type == 'header'): ?>
<h4 class="genericItemExtraFieldsHeader"><?php echo $extraField->name; ?></h4>
<?php else: ?>
<span class="genericItemExtraFieldsLabel"><?php echo $extraField->name; ?></span>
<span class="genericItemExtraFieldsValue"><?php echo $extraField->value; ?></span>
<?php endif; ?>
</li>
<?php endif; ?>
<?php endforeach; ?>
</ul>
<div class="clr"></div>
</div>
<?php endif; ?>

<?php if($this->params->get('genericItemCategory')): ?>
<!-- Item category name -->
<div class="genericItemCategory">
<span><?php echo JText::_('K2_PUBLISHED_IN'); ?></span>
<a href="<?php echo $item->category->link; ?>"><?php echo $item->category->name; ?></a>
</div>
<?php endif; ?>

<?php if ($this->params->get('genericItemReadMore')): ?>
<!-- Item "read more..." link -->
<div class="genericItemReadMore">
<a class="k2ReadMore" href="<?php echo $item->link; ?>">
<?php echo JText::_('K2_READ_MORE'); ?>
</a>
</div>
<?php endif; ?>

<div class="clr"></div>

</div>

<!-- kotayy title--></li></ol>
<!-- End K2 Item Layout -->

<?php endforeach; ?>
</div>

<!-- Pagination -->
<?php if($this->pagination->getPagesLinks()): ?>
<div class="k2Pagination">
<?php echo $this->pagination->getPagesLinks(); ?>
<div class="clr"></div>
<?php echo $this->pagination->getPagesCounter(); ?>
</div>
<?php endif; ?>

<?php else: ?>

<?php if(!$this->params->get('googleSearch')): ?>
<!-- No results found -->
<div id="genericItemListNothingFound">
<p><?php echo JText::_('K2_NO_RESULTS_FOUND'); ?></p>
</div>
<?php endif; ?>

<?php endif; ?>

</div>

<!-- End K2 Generic (search/date) Layout -->
</html>

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

More
10 years 11 months ago #127290 by Lefteris
Replied by Lefteris on topic Re: k2 tools modeuls
The code is completely wrong. First of all you are adding HTML head tag into the item.php. This will break your site. If you want to add custom CSS rules you need to do it in your template's CSS files. Secondly you are creating a new list for every item which is also wrong. Try to use the following code:
<?php

defined('_JEXEC') or die;
$document = JFactory::getDocument();
$document->addStyleDeclaration('ol {counter-reset:li;}');
?>

<!-- Start K2 Generic (search/date) Layout -->
<div id="k2Container" class="genericView<?php if($this->params->get('pageclass_sfx')) echo ' '.$this->params->get('pageclass_sfx'); ?>">

<?php if($this->params->get('show_page_title') || JRequest::getCmd('task')=='search' || JRequest::getCmd('task')=='date'): ?>
<!-- Page title -->
<div class="componentheading<?php echo $this->params->get('pageclass_sfx')?>">
<?php echo $this->escape($this->params->get('page_title')); ?>
</div>
<?php endif; ?>


<?php if(JRequest::getCmd('task')=='search' && $this->params->get('googleSearch')): ?>
<!-- Google Search container -->
<div id="<?php echo $this->params->get('googleSearchContainer'); ?>"></div>
<?php endif; ?>

<?php if(count($this->items) && $this->params->get('genericFeedIcon',1)): ?>
<!-- RSS feed icon -->
<div class="k2FeedIcon">
<a href="<?php echo $this->feed; ?>" title="<?php echo JText::_('K2_SUBSCRIBE_TO_THIS_RSS_FEED'); ?>">
<span><?php echo JText::_('K2_SUBSCRIBE_TO_THIS_RSS_FEED'); ?></span>
</a>
<div class="clr"></div>
</div>
<?php endif; ?>

<?php if(count($this->items)): ?>

<div class="genericItemList">
	<ol>
<?php foreach($this->items as $item): ?>

<!-- Start K2 Item Layout -->
<!-- saratay title -->
<li><div class="genericItemView">


<div class="genericItemHeader">
<?php if($this->params->get('genericItemDateCreated')): ?>
<!-- Date created -->
<span class="genericItemDateCreated">
<?php echo JHTML::_('date', $item->created , JText::_('K2_DATE_FORMAT_LC2')); ?>
</span>
<?php endif; ?>

<?php if($this->params->get('genericItemTitle')): ?>
<!-- Item title -->
<h2 class="genericItemTitle">
<?php if ($this->params->get('genericItemTitleLinked')): ?>


<a href="<?php echo $item->link; ?>">
<?php echo $item->title; ?>
</a>

<?php else: ?>
<?php echo $item->title; ?>
<?php endif; ?>
</h2>

<?php endif; ?>
</div>

<div class="genericItemBody">
<?php if($this->params->get('genericItemImage') && !empty($item->imageGeneric)): ?>
<!-- Item Image -->
<div class="genericItemImageBlock">
<span class="genericItemImage">
<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->imageGeneric; ?>" 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('itemImageGeneric'); ?>px; height:auto;" />
</a>
</span>
<div class="clr"></div>
</div>
<?php endif; ?>

<?php if($this->params->get('genericItemIntroText')): ?>
<!-- Item introtext -->
<div class="genericItemIntroText">
<?php echo $item->introtext; ?>
</div>
<?php endif; ?>

<div class="clr"></div>
</div>

<div class="clr"></div>

<?php if($this->params->get('genericItemExtraFields') && count($item->extra_fields)): ?>
<!-- Item extra fields -->
<div class="genericItemExtraFields">
<h4><?php echo JText::_('K2_ADDITIONAL_INFO'); ?></h4>
<ul>
<?php foreach ($item->extra_fields as $key=>$extraField): ?>
<?php if($extraField->value != ''): ?>
<li class="<?php echo ($key%2) ? "odd" : "even"; ?> type<?php echo ucfirst($extraField->type); ?> group<?php echo $extraField->group; ?>">
<?php if($extraField->type == 'header'): ?>
<h4 class="genericItemExtraFieldsHeader"><?php echo $extraField->name; ?></h4>
<?php else: ?>
<span class="genericItemExtraFieldsLabel"><?php echo $extraField->name; ?></span>
<span class="genericItemExtraFieldsValue"><?php echo $extraField->value; ?></span>
<?php endif; ?>
</li>
<?php endif; ?>
<?php endforeach; ?>
</ul>
<div class="clr"></div>
</div>
<?php endif; ?>

<?php if($this->params->get('genericItemCategory')): ?>
<!-- Item category name -->
<div class="genericItemCategory">
<span><?php echo JText::_('K2_PUBLISHED_IN'); ?></span>
<a href="<?php echo $item->category->link; ?>"><?php echo $item->category->name; ?></a>
</div>
<?php endif; ?>

<?php if ($this->params->get('genericItemReadMore')): ?>
<!-- Item "read more..." link -->
<div class="genericItemReadMore">
<a class="k2ReadMore" href="<?php echo $item->link; ?>">
<?php echo JText::_('K2_READ_MORE'); ?>
</a>
</div>
<?php endif; ?>

<div class="clr"></div>

</div>

<!-- kotayy title--></li>
<!-- End K2 Item Layout -->

<?php endforeach; ?>
</ol>
</div>

<!-- Pagination -->
<?php if($this->pagination->getPagesLinks()): ?>
<div class="k2Pagination">
<?php echo $this->pagination->getPagesLinks(); ?>
<div class="clr"></div>
<?php echo $this->pagination->getPagesCounter(); ?>
</div>
<?php endif; ?>

<?php else: ?>

<?php if(!$this->params->get('googleSearch')): ?>
<!-- No results found -->
<div id="genericItemListNothingFound">
<p><?php echo JText::_('K2_NO_RESULTS_FOUND'); ?></p>
</div>
<?php endif; ?>

<?php endif; ?>

</div>

<!-- End K2 Generic (search/date) Layout -->
If you still cannot make it, then i strongly suggest to hire a developer to do it for you.

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

  • Alan
  • Alan's Avatar Topic Author
  • Offline
  • Senior Member
More
10 years 11 months ago #127291 by Alan
Replied by Alan on topic Re: k2 tools modeuls
thank you, that is what I need.
thank you again.

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

More
10 years 11 months ago #127292 by Lefteris
Replied by Lefteris on topic Re: k2 tools modeuls
You are welcome.

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


Powered by Kunena Forum