K2 related items with images

K2 related items with images

K2 related items with images

To view K2 related items with images on item page. Open com_k2->templates->default->item.php and search for

  <?php if($this->item->params->get('itemRelated') && isset($this->relatedItems)): ?>
  <!-- Related items by tag -->
	<div class="itemRelated">
		<h3><?php echo JText::_("Related items (by tag)"); ?></h3>
		<ul>
			<?php foreach($this->relatedItems as $key=>$item): ?>
			<li class="<?php echo ($key%2) ? "odd" : "even"; ?>">
				<a href="<?php echo $item->link ?>"><?php echo $item->title; ?></a>
			</li>
			<?php endforeach; ?>
		</ul>
		<div class="clr"></div>
	</div>
	<?php endif; ?>

and replace with

  <?php if($this->item->params->get('itemRelated') && isset($this->relatedItems)): ?>
  <!-- Related items by tag -->
	<div class="itemRelated">
		<h3><?php echo JText::_("Related items (by tag)"); ?></h3>
		<ul>
			<?php foreach($this->relatedItems as $key=>$item): ?>
			<li class="<?php echo ($key%2) ? "odd" : "even"; ?>">
                <div class="related-item">
                    <a href="<?php echo $item->link ?>"><img src="<?php echo $item->imageXSmall; ?>" alt="<?php echo $item->title; ?>" /></a>
                    <br />
    				<a href="<?php echo $item->link ?>"><?php echo $item->title; ?></a>
                </div>
			</li>
			<?php endforeach; ?>
		</ul>
		<div class="clr"></div>
	</div>
	<?php endif; ?>

Artio Joomsef Virtuemart Extension v2.0.32

This Joomla SEO extension for ARTIO JoomSEF enables generation of Search Engine Friendly (SEF) URLs for the VirtueMart e-business component and can generated automatic meta data.

It will translate VirtueMart category names, products names, manufacturers, cart links, etc. You have several of configurations options, such as using complete category tree in your URLs, or only the last one. You can also choose to add manufacturer names, … (see image for details).

Compatibility and Installation Instructions

This extension requires ARTIO JoomSEF 3.3.x or newer (if you need 2.x compatible version, please see other category).

Use the JoomSEF built-in extension installer to install the extension package. After installation, purge already existing URLs for VirtueMart component and clean all caches (JoomSEF, Joomla)! For more details on JoomSEF extensions installation, upgrade and configuration, please check JoomSEF Paid Extension Information guide and JoomSEF documentation.

Tested with VirtueMart versions 1.1.4, 1.1.5.

Download from here:
ext_joomsef3_virtuemart

phocadownload titles problem

phocadownload doesn’t show section, category, file and play name on the title !!!!!!!!!!
Solution:
for “section” view:
open that file
components/com_phocadownload/views/section/view.html.php
add this code

		// Set page title per category
		if (!empty($section[0]->title)) {
		    $document->setTitle($section[0]->title);
		}

after that code

		// Breadcrumbs
		if (!empty($section[0]->title)) {
			$pathway 		=& $mainframe->getPathway();
			$pathway->addItem($section[0]->title, JRoute::_(PhocaDownloadHelperRoute::getSectionsRoute()));
		}

for “category” view:
open that file
components/com_phocadownload/views/category/view.html.php
add this code

		// Set page title per category
		if (!empty($category[0]->title)) {
		    $document->setTitle($category[0]->title);
		}

after that code

		// Breadcrumbs
		$pathway 		=& $mainframe->getPathway();
		if (!empty($section[0]->title)) {
			$pathway->addItem($section[0]->title, JRoute::_(PhocaDownloadHelperRoute::getSectionRoute($section[0]->id, $section[0]->alias)));
		}
		if (!empty($category[0]->title)) {
			$pathway->addItem($category[0]->title);
		}

for “file” view:
open that file
components/com_phocadownload/views/file/view.html.php
add this code

		// Set page title per category
		if (!empty($file[0]->title)) {
		    $document->setTitle($file[0]->title);
		}

after that code

		// Breadcrumbs
		$pathway 		=& $mainframe->getPathway();
		if (!empty($category[0]->sectiontitle)) {
			$pathway->addItem($category[0]->sectiontitle, JRoute::_(PhocaDownloadHelperRoute::getSectionRoute($category[0]->sectionid, $category[0]->sectionalias)));
		}
		if (!empty($category[0]->sectiontitle) && !empty($category[0]->sectionid)) {
			$pathway->addItem($category[0]->title, JRoute::_(PhocaDownloadHelperRoute::getCategoryRoute($category[0]->id, $category[0]->alias, $category[0]->sectionid)));
		}
		if (!empty($file[0]->title)) {
			$pathway->addItem($file[0]->title);
		}

for “play” view:
open that file
components/com_phocadownload/views/play/view.html.php
add this code

		// Set page title per category
		if (!empty($file[0]->title)) {
		    $document->setTitle(JText::_('Play').' - '.$file[0]->title);
		}

after that code

		$tmpl['filetype']	= '';
		if ($fileExt == 'mp3') {
			$tmpl['filetype'] 		= 'mp3';
			$tmpl['playerheight']	= $params->get( 'player_mp3_height', 30 );
		}

—————————————————————————
XMap – google sitemap
you can download the new modified files for phocadownload extension from here:
xmap for phocadownload

Phoca Gallery title problem

open this file
components/com_phocagallery/views/category/view.html.php
search for

$document->setTitle($params->get( 'page_title') . ' - '. $category->title);

you will find this line within

// Set page title per category
if ($tmpl['displaycatnametitle'] == 1) {
	$document->setTitle($params->get( 'page_title') . ' - '. $category->title);
} else {
	$document->setTitle( $params->get( 'page_title' ));
}

replace with

$document->setTitle($category->title);

How to add iframe to joomla content?

Allows you to add external Scripts or even external webpages in an article. Just type in an article a code snipplet like

{CustomCode}src="http://www.ajaxel.de",width="400",height="300"{/CustomCode}

Add further functionality with the params in the administration.

download this plugin from here:
CustomCode.zip

Show image on JA K2 Search Module Results Page

To call the k2 item images on search page directly, please do try as following:
– Open “default_results.php” file in the folder “com_search\views\search\tmpl” and add custom code

    $db = JFactory::getDBO();
     $query = "
                SELECT i.id,i.title,
                i.metadesc,
                i.metakey,
                c.name as section,
                i.image_caption,
                i.image_credits,
                i.video_caption,
                i.video_credits,
                i.extra_fields_search,
                i.created,
                CONCAT(i.introtext, i.fulltext) AS text,
                CASE WHEN CHAR_LENGTH(i.alias) THEN CONCAT_WS(':', i.id, i.alias) ELSE i.id END as slug,
                CASE WHEN CHAR_LENGTH(c.alias) THEN CONCAT_WS(':', c.id, c.alias) ELSE c.id END as catslug
                FROM #__k2_items AS i
                INNER JOIN #__k2_categories AS c ON c.id=i.catid
                WHERE i.id = ". $result->id;
            $db->setQuery($query);

– Or please download my attach file and extract to your web root, it override “default_results.php” and “plugins/search/jak2_filter.php” files.
show_image_on_searchresultpage_2.zip

Page 2 of 6123456

Pin It on Pinterest